gtk.Statusbar — report messages of minor importance to the user.
class gtk.Statusbar(gtk.HBox): |
+--gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.Box +-- gtk.HBox +-- gtk.Statusbar
|
gtk.Container Signal Prototypes
| "text-popped" | def callback( |
| "text-pushed" | def callback( |
A gtk.Statusbar is
usually placed along the bottom of an application's main gtk.Window. It 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). It may also have a resize grip
(a triangular area in the lower right corner) which can be clicked on to
resize the window containing the statusbar. Status bars in PyGTK 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. The context_id can be generated by the
get_context_id()
method, and associated with a context message. An existing context_id can be
retrieved using the context message using the get_context_id()
method. 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.
def get_context_id(context_description)context_description : | a string identifying the context for the message |
| Returns : | an integer context identifier |
The get_context_id() method returns a
new or existing context identifier, given a description of the actual
context specified by context_description. In effect,
get_context_id() both registers and retrieves a
context identifier.
def push(context_id, text)context_id : | a context identifier |
text : | the message text |
| Returns : | an integer message identifier |
The push() method pushes a new message
specified by text with the specified
context_id onto a statusbar's stack and returns a
message id that that can be used with the remove()
method.
def pop(context_id)context_id : | a context identifier |
The pop() method removes the top
message with the specified context_id from the
statusbar's stack.
def remove(context_id, message_id)context_id : | the context identifier |
message_id : | the message identifier |
The remove() method removes the message
with the specified message_id and
context_id from the statusbar's message stack.
def callback(statusbar, context_id, text, user_param1, ...)statusbar : | the statusbar that received the signal |
context_id : | the context identifier of the top message |
text : | the string containing the top message text |
user_param1 : | the first user parameter (if any) specified
with the connect() |
... : | additional user parameters (if any) |
The "text-popped" signal is emitted when a message is removed from the statusbar message stack. Note the text and context_id are for the top message on the statusbar stack not the message that was actually removed.
def callback(statusbar, context_id, text, user_param1, ...)statusbar : | the statusbar that received the signal |
context_id : | the context identifier of the message added |
text : | the string containing the message text |
user_param1 : | the first user parameter (if any) specified
with the connect() |
... : | additional user parameters (if any) |
The "text-pushed" signal is emitted when a message is added to the statusbar message stack.