Package: gtk

Class gtk:statusbar

Superclasses

Documented Subclasses

None

Direct Slots

None

Details

The gtk:statusbar widget is usually placed along the bottom of the main gtk:window widget of the application. It may provide a regular commentary of the status of the application 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.

Figure: GtkStatusbar

Statusbars in GTK maintain a stack of messages. The message at the top of the stack of the statusbar is the one that will currently be displayed.

Any messages added to the stack of the statusbar must specify a context ID that is used to uniquely identify the source of a message. This context ID can be generated by the gtk:statusbar-context-id function, 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).

Statusbars are created using the gtk:statusbar-new function.

Messages are added to the stack of the statusbar with the gtk:statusbar-push function.

The message at the top of the stack can be removed using the gtk:statusbar-pop function. 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 the gtk:statusbar-remove function.

CSS node

The gtk:statusbar implementation has a single CSS node with name statusbar.

Warning

The gtk:statusbar implementation is deprecated since 4.10. This widget will be removed in GTK 5.

Signal Details

The "text-popped" signal
lambda (statusbar context text)    :run-last      
statusbar
The gtk:statusbar widget which received the signal.
context
The unsigned integer with the context ID of the relevant message/statusbar.
text
The string with the message that was just popped.
Is emitted whenever a new message is popped off the stack of the status bar.
The "text-pushed" signal
lambda (statusbar context text)    :run-last      
statusbar
The gtk:statusbar widget which received the signal.
context
The unsigned integer with the context ID of the relevant message/statusbar.
text
The string with the message that was pushed.
Is emitted whenever a new message gets pushed onto the stack of the status bar.
 

Returned by

Inherited Slot Access Functions

2024-5-2