]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkstatusbar.sgml
Updates to new gtk-doc, gsignal, causing quite a bit of diffs but little
[~andy/gtk] / docs / reference / gtk / tmpl / gtkstatusbar.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkStatusbar
3
4 <!-- ##### SECTION Short_Description ##### -->
5 report messages of minor importance to the user.
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
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).
14 </para>
15 <para>
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.
18 </para>
19 <para>
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.
26 </para>
27 <para>
28 Status bars are created using gtk_statusbar_new().
29 </para>
30 <para>
31 Messages are added to the bar's stack with gtk_statusbar_push().
32 </para>
33 <para>
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().
35 </para>
36
37 <!-- ##### SECTION See_Also ##### -->
38 <para>
39 <variablelist>
40 <varlistentry>
41 <term>#GtkDialog</term>
42 <listitem><para>another way of reporting information to the user.</para></listitem>
43 </varlistentry>
44 </variablelist>
45 </para>
46
47 <!-- ##### STRUCT GtkStatusbar ##### -->
48 <para>
49 Contains private data that should be modified with the functions described below.
50 </para>
51
52
53 <!-- ##### STRUCT GtkStatusbarMsg ##### -->
54 <para>
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.
56 </para>
57
58 @text: 
59 @context_id: 
60 @message_id: 
61
62 <!-- ##### FUNCTION gtk_statusbar_new ##### -->
63 <para>
64 Creates a new #GtkStatusbar ready for messages.
65 </para>
66
67 @Returns: the new #GtkStatusbar.
68
69
70 <!-- ##### FUNCTION gtk_statusbar_get_context_id ##### -->
71 <para>
72 Returns a new context identifier, given a description of the actual context.
73 </para>
74
75 @statusbar: a #GtkStatusbar.
76 @context_description: textual description of what context the new message is
77 being used in.
78 @Returns: an integer id.
79
80
81 <!-- ##### FUNCTION gtk_statusbar_push ##### -->
82 <para>
83 Pushes a new message onto a statusbar's stack.
84 </para>
85
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().
91
92
93 <!-- ##### FUNCTION gtk_statusbar_pop ##### -->
94 <para>
95 Removes the message at the top of a #GtkStatusBar's stack.
96 </para>
97
98 @statusbar: a #GtkStatusBar.
99 @context_id: a context identifier.
100
101
102 <!-- ##### FUNCTION gtk_statusbar_remove ##### -->
103 <para>
104 Forces the removal of a message from a statusbar's stack. The exact context_id and message_id must be specified.
105 </para>
106
107 @statusbar: a #GtkStatusBar.
108 @context_id: a context identifier.
109 @message_id: a message identifier, as returned by gtk_statusbar_push().
110
111
112 <!-- ##### SIGNAL GtkStatusbar::text-popped ##### -->
113 <para>
114 Is emitted whenever a new message is popped off a statusbar's stack.
115 </para>
116
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.
120
121 <!-- ##### SIGNAL GtkStatusbar::text-pushed ##### -->
122 <para>
123 Is emitted whenever a new message gets pushed onto a statusbar's stack.
124 </para>
125
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.
129