1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 report messages of minor importance to the user.
7 <!-- ##### SECTION Long_Description ##### -->
9 A #GtkStatusbar is usually placed along the bottom of an application's main
10 #GtkWindow. It may provide a regular commentary of the application's status
11 (as is usually the case in a web browser, for example), or may be used to
12 simply output a message when the status changes, (when an upload is complete
13 in an FTP client, for example).
16 Status bars in Gtk+ maintain a stack of messages. The message at
17 the top of the each bar's stack is the one that will currently be displayed.
20 Any messages added to a statusbar's stack must specify a <emphasis>context_id</emphasis>
21 that is used to uniquely identify the source of a message. This context_id can be
22 generated by gtk_statusbar_get_context_id(), given a message and the
23 statusbar that it will be added to. Note that messages are stored in a
24 stack, and when choosing which message to display, the stack structure is
25 adhered to, regardless of the context identifier of a message.
28 Status bars are created using gtk_statusbar_new().
31 Messages are added to the bar's stack with gtk_statusbar_push().
34 The message at the top of the stack can be removed using gtk_statusbar_pop(). A message can be removed from anywhere in the stack if it's message_id was recorded at the time it was added. This is done using gtk_statusbar_remove().
37 <!-- ##### SECTION See_Also ##### -->
41 <term>#GtkDialog</term>
42 <listitem><para>another way of reporting information to the user.</para></listitem>
47 <!-- ##### STRUCT GtkStatusbar ##### -->
49 Contains private data that should be modified with the functions described below.
53 <!-- ##### STRUCT GtkStatusbarMsg ##### -->
55 Holds the data for a statusbar message. <structfield>text</structfield> holds the actual text string. <structfield>context_id</structfield> is the context that this message is associated with, and <structfield>message_id</structfield> is this particular message's identifier. However, these fields should not be modified directly.
62 <!-- ##### FUNCTION gtk_statusbar_new ##### -->
64 Creates a new #GtkStatusbar ready for messages.
67 @Returns: the new #GtkStatusbar.
70 <!-- ##### FUNCTION gtk_statusbar_get_context_id ##### -->
72 Returns a new context identifier, given a description of the actual context.
75 @statusbar: a #GtkStatusbar.
76 @context_description: textual description of what context the new message is
78 @Returns: an integer id.
81 <!-- ##### FUNCTION gtk_statusbar_push ##### -->
83 Pushes a new message onto a statusbar's stack.
86 @statusbar: a #GtkStatusbar.
87 @context_id: the message's context id, as returned by
88 gkt_statusbar_get_context_id().
89 @text: the message to add to the statusbar.
90 @Returns: the message's new message id for use with gtk_statusbar_remove().
93 <!-- ##### FUNCTION gtk_statusbar_pop ##### -->
95 Removes the message at the top of a #GtkStatusBar's stack.
98 @statusbar: a #GtkStatusBar.
99 @context_id: a context identifier.
102 <!-- ##### FUNCTION gtk_statusbar_remove ##### -->
104 Forces the removal of a message from a statusbar's stack. The exact context_id and message_id must be specified.
107 @statusbar: a #GtkStatusBar.
108 @context_id: a context identifier.
109 @message_id: a message identifier, as returned by gtk_statusbar_push().
112 <!-- ##### SIGNAL GtkStatusbar::text-popped ##### -->
114 Is emitted whenever a new message is popped off a statusbar's stack.
117 @statusbar: the object which received the signal.
118 @context_id: the context id of the relevant message/statusbar.
119 @text: the message that was just popped.
121 <!-- ##### SIGNAL GtkStatusbar::text-pushed ##### -->
123 Is emitted whenever a new message gets pushed onto a statusbar's stack.
126 @statusbar: the object which received the signal.
127 @context_id: the context id of the relevant message/statusbar.
128 @text: the message that was pushed.