1 <glossary id="glossary">
2 <title>Glossary</title>
4 <glossentry id="allocation">
5 <glossterm>allocation</glossterm>
8 The final size of a <glossterm
9 linkend="widget">widget</glossterm> within its <glossterm
10 linkend="parent">parent</glossterm>. For example, a widget
11 may request a minimum size of 20×20 pixels, but its
12 parent may decide to allocate 50×20 pixels for it
16 <glossterm linkend="requisition">requisition</glossterm>
22 <glossterm>bin</glossterm>
25 A <glossterm linkend="container">container</glossterm> that
26 can hold at most one child widget. The base class for bins is
27 <link linkend="GtkBin">GtkBin</link>.
30 <glossterm linkend="container">container</glossterm>
35 <glossentry id="child">
36 <glossterm>child</glossterm>
39 A <glossterm linkend="container">container's</glossterm> child
40 is a <glossterm linkend="widget">widget</glossterm> contained
46 <glossentry id="column">
47 <glossterm>column</glossterm>
50 GTK+ contains several widgets which display data in columns,
51 e.g. the <link linkend="GtkTreeView">GtkTreeView</link>.
52 These <glossterm linkend="view-column">view columns</glossterm> in
53 the tree view are represented by
54 <link linkend="GtkTreeViewColumn">GtkTreeViewColumn</link>
55 objects inside GTK+. They should not be confused with
56 <glossterm linkend="model-column">model columns</glossterm> which
57 are used to organize the data in tree models.
59 <glossseealso>model-view widget</glossseealso>
63 <glossentry id="container">
64 <glossterm>container</glossterm>
67 A <glossterm linkend="widget">widget</glossterm> that contains
68 other widgets; in that case, the container is the
69 <emphasis>parent</emphasis> of the <emphasis>child</emphasis>
70 widgets. Some containers don't draw anything on their own,
71 but rather just organize their children's <glossterm
72 linkend="geometry">geometry</glossterm>; for example, <link
73 linkend="GtkVBox">GtkVBox</link> lays out its children
74 vertically without painting anything on its own. Other
75 containers include decorative elements; for example, <link
76 linkend="GtkFrame">GtkFrame</link> contains the frame's child
77 and a label in addition to the shaded frame it draws. The
78 base class for containers is <link
79 linkend="GtkContainer">GtkContainer</link>.
82 <glossterm linkend="container">widget</glossterm>
83 <glossterm linkend="container">geometry</glossterm>
88 <glossentry id="display">
89 <glossterm>display</glossterm>
92 GDK inherited the concept of display from the X window system,
93 which considers a display to be the combination
94 of a keyboard, a pointing device and one or more
95 <glossterm linkend="screen">screens</glossterm>.
96 Applications open a display to show windows and interact with the user.
97 In GDK, a display is represented by a
98 <link linkend="GdkDisplay">GdkDisplay</link>.
103 <glossentry id="event">
104 <glossterm>event</glossterm>
107 Events are the way in which GDK informs GTK+ about external events
108 like pointer motion, button clicks, key presses, etc.
113 <glossentry id="geometry">
114 <glossterm>geometry</glossterm>
117 A <glossterm linkend="widget">widget's</glossterm> position
118 and size. Within its parent, this is called the widget's
119 <glossterm linkend="allocation">allocation</glossterm>.
124 <glossentry id="mapping">
125 <glossterm>mapping</glossterm>
128 This is the step in a <glossterm
129 linkend="widget">widget's</glossterm> life cycle where it
130 actually shows the GdkWindows it created when it was
131 <glossterm linkend="realization">realized</glossterm>. When a
132 widget is mapped, it must turn on its
133 <constant>GTK_MAPPED</constant> <link
134 linkend="GtkWidgetFlags">flag</link>.
138 Note that due to the asynchronous nature of the X window
139 system, a widget's window may not appear on the screen
140 immediatly after one calls <link
141 linkend="gdk-window-show"><function>gdk_window_show()</function></link>:
142 you must wait for the corresponding map <glossterm
143 linkend="event">event</glossterm> to be received. You can do
145 linkend="GtkWidget-map-event"><methodname>GtkWidget::map-event</methodname>
151 <glossentry id="model-column">
152 <glossterm>model column</glossterm>
155 A column in a tree model, holding data of a certain type.
156 The types which can be stored in the columns of a model
157 have to be specified when the model is constructed, see
158 e.g. <link linkend="gtk-list-store-new">gtk_list_store_new()</link>.
161 <glossterm linkend="view-column">view column</glossterm>
166 <glossentry id="model-view">
167 <glossterm>model-view widget</glossterm>
170 These widgets follow the well-known model-view pattern, which separates
171 the data (the model) to be displayed from the component which does the
172 actual visualization (the view). Examples of this pattern in GTK+ are
173 the <link linkend="GtkTreeView">GtkTreeView</link>/<link linkend="GtkTreeModel">GtkTreeModel</link>
175 <link linkend="GtkTextView">GtkTextView</link>/<link linkend="GtkTextBuffer">GtkTextBuffer</link>
178 One important advantage of this pattern is that it is possible to
179 display the same model in multiple views; another one that the
180 separation of the model allows a great deal of flexibility, as
182 <link linkend="GtkTreeModelSort">GtkTreeModelSort</link> or
183 <link linkend="GtkTreeModelFilter">GtkTreeModelFilter</link>.
188 <glossentry id="no-window">
189 <glossterm>no-window widget</glossterm>
192 A widget that does not have a GdkWindow of its own on which to
193 draw its contents, but rather shares its <glossterm
194 linkend="parent">parent's</glossterm>. Such a widget has the
195 <constant>GTK_NO_WINDOW</constant> <link
196 linkend="GtkWidgetFlags">flag</link> set, and can be tested
198 linkend="gtk-widget-no-window:caps"><function>GTK_WIDGET_NO_WINDOW()</function></link>
204 <glossentry id="parent">
205 <glossterm>parent</glossterm>
208 A <glossterm linkend="widget">widget's</glossterm> parent is
209 the <glossterm linkend="container">container</glossterm>
210 inside which it resides.
215 <glossentry id="realization">
216 <glossterm>realization</glossterm>
219 This is the step in a <glossterm
220 linkend="widget">widget's</glossterm> life cycle where it
221 creates its own GdkWindow, or otherwise associates itself with
222 its <glossterm linkend="parent">parent's</glossterm>
223 GdkWindow. If the widget has its own window, then it must
224 also attach a <glossterm linkend="style">style</glossterm> to
225 it. A widget becomes unrealized by destroying its associated
226 GdkWindow. When a widget is realized, it must turn on its
227 <constant>GTK_REALIZED</constant> <link
228 linkend="GtkWidgetFlags">flag</link>.
232 Widgets that don't own the GdkWindow on which they draw are
233 called <glossterm linkend="no-window">no-window
234 widgets</glossterm>. This can be tested with the <link
235 linkend="gtk-widget-no-window:caps"><function>GTK_WIDGET_NO_WINDOW()</function></link>
236 macro. Normally, these widgets draw on their parent's
241 Note that when a widget creates a window in its <link
242 linkend="gtkwidget-realize"><methodname>::realize()</methodname></link>
243 handler, it does not actually show the window. That is, the
244 window's structure is just created in memory. The widget
245 actually shows the window when it gets <glossterm
246 linkend="mapping">mapped</glossterm>.
251 <glossentry id="requisition">
252 <glossterm>requisition</glossterm>
255 The size requisition of a <glossterm
256 linkend="widget">widget</glossterm> is the minimum amount of
257 space it requests from its <glossterm
258 linkend="parent">parent</glossterm>. Once the parent computes
259 the widget's final size, it gives it its <glossterm
260 linkend="allocation">size allocation</glossterm>.
263 <glossterm linkend="allocation">allocation</glossterm>
268 <glossentry id="screen">
269 <glossterm>screen</glossterm>
272 GDK inherited the concept of screen from the X window system,
273 which considers a screen to be a rectangular area, on which
274 applications may place their windows. Screens under X may have
275 quite dissimilar <glossterm linkend="visual">visuals</glossterm>.
276 Each screen can stretch across multiple physical monitors.
279 In GDK, screens are represented by
280 <link linkend="GdkScreen">GdkScreen</link> objects.
285 <glossentry id="style">
286 <glossterm>style</glossterm>
289 A style encapsulates what GTK+ needs to know in order to draw
290 a widget. Styles can be modified with
291 <link linkend="gtk-Resource-Files">resource files</link>.
296 <glossentry id="toplevel">
297 <glossterm>toplevel</glossterm>
300 A <glossterm linkend="widget">widget</glossterm> that does not
301 require a <glossterm linkend="parent">parent</glossterm>
302 container. The only toplevel widgets in GTK+ are <link
303 linkend="GtkWindow">GtkWindow</link> and widgets derived from it.
306 <glossterm linkend="container">container</glossterm>
311 <glossentry id="unmap">
312 <glossterm>unmap</glossterm>
313 <glosssee><glossterm linkend="mapping">mapping</glossterm></glosssee>
316 <glossentry id="unrealize">
317 <glossterm>unrealize</glossterm>
318 <glosssee><glossterm linkend="realization">realization</glossterm></glosssee>
321 <glossentry id="view-column">
322 <glossterm>view column</glossterm>
325 A displayed column in a tree view, represented by a
326 <link linkend="GtkTreeViewColumn">GtkTreeViewColumn</link> object.
329 <glossterm linkend="model-column">model column</glossterm>
334 <glossentry id="visual">
335 <glossterm>visual</glossterm>
338 A visual describes how color information is stored in pixels.
339 A <glossterm linkend="screen">screen</glossterm> may support
340 multiple visuals. On modern hardware, the most common visuals
341 are truecolor visuals, which store a fixed number of bits
342 (typically 8) for the red, green and blue components of a color.
345 On ancient hardware, one may still meet indexed visuals, which
346 store color information as an index into a color map, or even
352 <glossentry id="widget">
353 <glossterm>widget</glossterm>
356 A control in a graphical user interface. Widgets can draw
357 themselves and process events from the mouse and keyboard.
358 Widget types include buttons, menus, text entry lines, and
359 lists. Widgets can be arranged into <glossterm
360 linkend="container">containers</glossterm>, and these take
361 care of assigning the <glossterm
362 linkend="geometry">geometry</glossterm> of the widgets: every
363 widget thus has a parent except those widgets which are
364 <glossterm linkend="toplevel">toplevels</glossterm>. The base
365 class for widgets is <link
366 linkend="GtkWidget">GtkWidget</link>.
369 <glossterm linkend="container">container</glossterm>
378 sgml-parent-document: ("gtk-docs.sgml" "book" "glossary")