Class Statusbar

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Proxy

@Generated("org.javagi.JavaGI") @Deprecated public class Statusbar extends Widget implements Accessible, Buildable, ConstraintTarget
Deprecated.
This widget will be removed in GTK 5

A GtkStatusbar widget is usually placed along the bottom of an application's main Window.

An example GtkStatusbar

A GtkStatusBar may provide a regular commentary of the application's status (as is usually the case in a web browser, for example), or may be used to simply output a message when the status changes, (when an upload is complete in an FTP client, for example).

Status bars in GTK maintain a stack of messages. The message at the top of the each bar’s stack is the one that will currently be displayed.

Any messages added to a statusbar’s stack must specify a context id that is used to uniquely identify the source of a message. This context id can be generated by getContextId(String), given a message and the statusbar that it will be added to. Note that messages are stored in a stack, and when choosing which message to display, the stack structure is adhered to, regardless of the context identifier of a message.

One could say that a statusbar maintains one stack of messages for display purposes, but allows multiple message producers to maintain sub-stacks of the messages they produced (via context ids).

Status bars are created using Statusbar().

Messages are added to the bar’s stack with push(int, String).

The message at the top of the stack can be removed using pop(int). A message can be removed from anywhere in the stack if its message id was recorded at the time it was added. This is done using remove(int, int).

CSS node

GtkStatusbar has a single CSS node with name statusbar.

  • Constructor Details

    • Statusbar

      public Statusbar(MemorySegment address)
      Deprecated.
      Create a Statusbar instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Statusbar

      public Statusbar()
      Deprecated.
      Create a new Statusbar.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Deprecated.
      Get the GType of the Statusbar class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      Deprecated.
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected Statusbar asParent()
      Deprecated.
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Widget
      Returns:
      the instance as if it were its parent type
    • getContextId

      @Deprecated public int getContextId(String contextDescription)
      Deprecated.
      This widget will be removed in GTK 5

      Returns a new context identifier, given a description of the actual context.

      Note that the description is not shown in the UI.

      Parameters:
      contextDescription - textual description of what context the new message is being used in
      Returns:
      an integer id
    • pop

      @Deprecated public void pop(int contextId)
      Deprecated.
      This widget will be removed in GTK 5

      Removes the first message in the GtkStatusbar’s stack with the given context id.

      Note that this may not change the displayed message, if the message at the top of the stack has a different context id.

      Parameters:
      contextId - a context identifier
    • push

      @Deprecated public int push(int contextId, String text)
      Deprecated.
      This widget will be removed in GTK 5
      Pushes a new message onto a statusbar’s stack.
      Parameters:
      contextId - the message’s context id, as returned by gtk_statusbar_get_context_id()
      text - the message to add to the statusbar
      Returns:
      a message id that can be used with remove(int, int).
    • remove

      @Deprecated public void remove(int contextId, int messageId)
      Deprecated.
      This widget will be removed in GTK 5
      Forces the removal of a message from a statusbar’s stack. The exact contextId and messageId must be specified.
      Parameters:
      contextId - a context identifier
      messageId - a message identifier, as returned by push(int, String)
    • removeAll

      @Deprecated public void removeAll(int contextId)
      Deprecated.
      This widget will be removed in GTK 5
      Forces the removal of all messages from a statusbar's stack with the exact contextId.
      Parameters:
      contextId - a context identifier
    • onTextPopped

      Deprecated.
      This widget will be removed in GTK 5
      Emitted whenever a new message is popped off a statusbar's stack.
      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      See Also:
    • emitTextPopped

      @Deprecated public void emitTextPopped(int contextId, String text)
      Deprecated.
      Emits the "text-popped" signal. See onTextPopped(Statusbar.TextPoppedCallback).
    • onTextPushed

      Deprecated.
      This widget will be removed in GTK 5
      Emitted whenever a new message gets pushed onto a statusbar's stack.
      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      See Also:
    • emitTextPushed

      @Deprecated public void emitTextPushed(int contextId, String text)
      Deprecated.
      Emits the "text-pushed" signal. See onTextPushed(Statusbar.TextPushedCallback).
    • builder

      public static Statusbar.Builder<? extends Statusbar.Builder> builder()
      Deprecated.
      A Statusbar.Builder object constructs a Statusbar with the specified properties. Use the various set...() methods to set properties, and finish construction with Statusbar.Builder.build().
      Returns:
      the builder object