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 <glossterm
97 linkend="window">windows</glossterm> and interact with the user.
98 In GDK, a display is represented by a
99 <link linkend="GdkDisplay">GdkDisplay</link>.
104 <glossentry id="event">
105 <glossterm>event</glossterm>
108 Events are the way in which GDK informs GTK+ about external events
109 like pointer motion, button clicks, key presses, etc.
114 <glossentry id="geometry">
115 <glossterm>geometry</glossterm>
118 A <glossterm linkend="widget">widget's</glossterm> position
119 and size. Within its parent, this is called the widget's
120 <glossterm linkend="allocation">allocation</glossterm>.
125 <glossentry id="mapping">
126 <glossterm>mapping</glossterm>
129 This is the step in a <glossterm
130 linkend="widget">widget's</glossterm> life cycle where it
131 actually shows the GdkWindows it created when it was
132 <glossterm linkend="realization">realized</glossterm>. When a
133 widget is mapped, it must turn on its
134 <constant>GTK_MAPPED</constant> <link
135 linkend="GtkWidgetFlags">flag</link>.
139 Note that due to the asynchronous nature of the X window
140 system, a widget's window may not appear on the screen
141 immediatly after one calls <link
142 linkend="gdk-window-show"><function>gdk_window_show()</function></link>:
143 you must wait for the corresponding map <glossterm
144 linkend="event">event</glossterm> to be received. You can do
146 linkend="GtkWidget-map-event"><methodname>GtkWidget::map-event</methodname>
152 <glossentry id="model-column">
153 <glossterm>model column</glossterm>
156 A column in a tree model, holding data of a certain type.
157 The types which can be stored in the columns of a model
158 have to be specified when the model is constructed, see
159 e.g. <link linkend="gtk-list-store-new">gtk_list_store_new()</link>.
162 <glossterm linkend="view-column">view column</glossterm>
167 <glossentry id="model-view">
168 <glossterm>model-view widget</glossterm>
171 These widgets follow the well-known model-view pattern, which separates
172 the data (the model) to be displayed from the component which does the
173 actual visualization (the view). Examples of this pattern in GTK+ are
174 the <link linkend="GtkTreeView">GtkTreeView</link>/<link linkend="GtkTreeModel">GtkTreeModel</link>
176 <link linkend="GtkTextView">GtkTextView</link>/<link linkend="GtkTextBuffer">GtkTextBuffer</link>
179 One important advantage of this pattern is that it is possible to
180 display the same model in multiple views; another one that the
181 separation of the model allows a great deal of flexibility, as
183 <link linkend="GtkTreeModelSort">GtkTreeModelSort</link> or
184 <link linkend="GtkTreeModelFilter">GtkTreeModelFilter</link>.
189 <glossentry id="no-window">
190 <glossterm>no-window widget</glossterm>
193 A widget that does not have a GdkWindow of its own on which to
194 draw its contents, but rather shares its <glossterm
195 linkend="parent">parent's</glossterm>. Such a widget has the
196 <constant>GTK_NO_WINDOW</constant> <link
197 linkend="GtkWidgetFlags">flag</link> set, and can be tested
199 linkend="gtk-widget-no-window:caps"><function>GTK_WIDGET_NO_WINDOW()</function></link>
205 <glossentry id="parent">
206 <glossterm>parent</glossterm>
209 A <glossterm linkend="widget">widget's</glossterm> parent is
210 the <glossterm linkend="container">container</glossterm>
211 inside which it resides.
216 <glossentry id="realization">
217 <glossterm>realization</glossterm>
220 This is the step in a <glossterm
221 linkend="widget">widget's</glossterm> life cycle where it
222 creates its own GdkWindow, or otherwise associates itself with
223 its <glossterm linkend="parent">parent's</glossterm>
224 GdkWindow. If the widget has its own window, then it must
225 also attach a <glossterm linkend="style">style</glossterm> to
226 it. A widget becomes unrealized by destroying its associated
227 GdkWindow. When a widget is realized, it must turn on its
228 <constant>GTK_REALIZED</constant> <link
229 linkend="GtkWidgetFlags">flag</link>.
233 Widgets that don't own the GdkWindow on which they draw are
234 called <glossterm linkend="no-window">no-window
235 widgets</glossterm>. This can be tested with the <link
236 linkend="gtk-widget-no-window:caps"><function>GTK_WIDGET_NO_WINDOW()</function></link>
237 macro. Normally, these widgets draw on their parent's
242 Note that when a widget creates a window in its <link
243 linkend="gtkwidget-realize"><methodname>::realize()</methodname></link>
244 handler, it does not actually show the window. That is, the
245 window's structure is just created in memory. The widget
246 actually shows the window when it gets <glossterm
247 linkend="mapping">mapped</glossterm>.
252 <glossentry id="requisition">
253 <glossterm>requisition</glossterm>
256 The size requisition of a <glossterm
257 linkend="widget">widget</glossterm> is the minimum amount of
258 space it requests from its <glossterm
259 linkend="parent">parent</glossterm>. Once the parent computes
260 the widget's final size, it gives it its <glossterm
261 linkend="allocation">size allocation</glossterm>.
264 <glossterm linkend="allocation">allocation</glossterm>
269 <glossentry id="screen">
270 <glossterm>screen</glossterm>
273 GDK inherited the concept of screen from the X window system,
274 which considers a screen to be a rectangular area, on which
275 applications may place their windows. Screens under X may have
276 quite dissimilar <glossterm linkend="visual">visuals</glossterm>.
277 Each screen can stretch across multiple physical monitors.
280 In GDK, screens are represented by
281 <link linkend="GdkScreen">GdkScreen</link> objects.
286 <glossentry id="style">
287 <glossterm>style</glossterm>
290 A style encapsulates what GTK+ needs to know in order to draw
291 a widget. Styles can be modified with
292 <link linkend="gtk-Resource-Files">resource files</link>.
297 <glossentry id="toplevel">
298 <glossterm>toplevel</glossterm>
301 A <glossterm linkend="widget">widget</glossterm> that does not
302 require a <glossterm linkend="parent">parent</glossterm>
303 container. The only toplevel widgets in GTK+ are <link
304 linkend="GtkWindow">GtkWindow</link> and widgets derived from it.
307 <glossterm linkend="container">container</glossterm>
312 <glossentry id="unmap">
313 <glossterm>unmap</glossterm>
314 <glosssee><glossterm linkend="mapping">mapping</glossterm></glosssee>
317 <glossentry id="unrealize">
318 <glossterm>unrealize</glossterm>
319 <glosssee><glossterm linkend="realization">realization</glossterm></glosssee>
322 <glossentry id="view-column">
323 <glossterm>view column</glossterm>
326 A displayed column in a tree view, represented by a
327 <link linkend="GtkTreeViewColumn">GtkTreeViewColumn</link> object.
330 <glossterm linkend="model-column">model column</glossterm>
335 <glossentry id="visual">
336 <glossterm>visual</glossterm>
339 A visual describes how color information is stored in pixels.
340 A <glossterm linkend="screen">screen</glossterm> may support
341 multiple visuals. On modern hardware, the most common visuals
342 are truecolor visuals, which store a fixed number of bits
343 (typically 8) for the red, green and blue components of a color.
346 On ancient hardware, one may still meet indexed visuals, which
347 store color information as an index into a color map, or even
353 <glossentry id="widget">
354 <glossterm>widget</glossterm>
357 A control in a graphical user interface. Widgets can draw
358 themselves and process events from the mouse and keyboard.
359 Widget types include buttons, menus, text entry lines, and
360 lists. Widgets can be arranged into <glossterm
361 linkend="container">containers</glossterm>, and these take
362 care of assigning the <glossterm
363 linkend="geometry">geometry</glossterm> of the widgets: every
364 widget thus has a parent except those widgets which are
365 <glossterm linkend="toplevel">toplevels</glossterm>. The base
366 class for widgets is <link
367 linkend="GtkWidget">GtkWidget</link>.
370 <glossterm linkend="container">container</glossterm>
379 sgml-parent-document: ("gtk-docs.sgml" "book" "glossary")