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"><type>GtkBin</type></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"><type>GtkTreeView</type></link>.
52
These <glossterm linkend="view-column">view columns</glossterm> in
53
the tree view are represented by <link linkend="GtkTreeViewColumn"><type>GtkTreeViewColumn</type></link>
54
objects inside GTK+. They should not be confused with
55
<glossterm linkend="model-column">model columns</glossterm> which
56
are used to organize the data in tree models.
58
<glossseealso>model-view widget</glossseealso>
62
<glossentry id="container">
63
<glossterm>container</glossterm>
66
A <glossterm linkend="widget">widget</glossterm> that contains
67
other widgets; in that case, the container is the
68
<emphasis>parent</emphasis> of the <emphasis>child</emphasis>
69
widgets. Some containers don't draw anything on their own,
70
but rather just organize their children's <glossterm
71
linkend="geometry">geometry</glossterm>; for example, <link linkend="GtkVBox"><type>GtkVBox</type></link> lays out
72
its children vertically without painting anything on its own. Other
73
containers include decorative elements; for example, <link linkend="GtkFrame"><type>GtkFrame</type></link> contains
74
the frame's child and a label in addition to the shaded frame it draws.
75
The base class for containers is <link linkend="GtkContainer"><type>GtkContainer</type></link>.
78
<glossterm linkend="container">widget</glossterm>
79
<glossterm linkend="container">geometry</glossterm>
84
<glossentry id="display">
85
<glossterm>display</glossterm>
88
GDK inherited the concept of display from the X window system,
89
which considers a display to be the combination
90
of a keyboard, a pointing device and one or more
91
<glossterm linkend="screen">screens</glossterm>.
92
Applications open a display to show windows and interact with the user.
93
In GDK, a display is represented by a <link linkend="GdkDisplay"><type>GdkDisplay</type></link>.
98
<glossentry id="event">
99
<glossterm>event</glossterm>
102
Events are the way in which GDK informs GTK+ about external events
103
like pointer motion, button clicks, key presses, etc.
108
<glossentry id="geometry">
109
<glossterm>geometry</glossterm>
112
A <glossterm linkend="widget">widget's</glossterm> position
113
and size. Within its parent, this is called the widget's
114
<glossterm linkend="allocation">allocation</glossterm>.
119
<glossentry id="mapping">
120
<glossterm>mapping</glossterm>
123
This is the step in a <glossterm
124
linkend="widget">widget's</glossterm> life cycle where it
125
actually shows the GdkWindows it created when it was
126
<glossterm linkend="realization">realized</glossterm>. When a
127
widget is mapped, it must turn on its
128
<link linkend="GTK-MAPPED:CAPS"><literal>GTK_MAPPED</literal></link> <link linkend="GtkWidgetFlags">flag</link>.
132
Note that due to the asynchronous nature of the X window
133
system, a widget's window may not appear on the screen
134
immediatly after one calls <link linkend="gdk-window-show"><function>gdk_window_show()</function></link>:
135
you must wait for the corresponding map <glossterm
136
linkend="event">event</glossterm> to be received. You can do
138
linkend="GtkWidget-map-event"><methodname>GtkWidget::map-event</methodname>
144
<glossentry id="model-column">
145
<glossterm>model column</glossterm>
148
A column in a tree model, holding data of a certain type.
149
The types which can be stored in the columns of a model
150
have to be specified when the model is constructed, see
151
e.g. <link linkend="gtk-list-store-new"><function>gtk_list_store_new()</function></link>.
154
<glossterm linkend="view-column">view column</glossterm>
159
<glossentry id="model-view">
160
<glossterm>model-view widget</glossterm>
163
These widgets follow the well-known model-view pattern, which separates
164
the data (the model) to be displayed from the component which does the
165
actual visualization (the view). Examples of this pattern in GTK+ are
166
the <link linkend="GtkTreeView"><type>GtkTreeView</type></link>/<link linkend="GtkTreeModel"><type>GtkTreeModel</type></link> and <link linkend="GtkTextView"><type>GtkTextView</type></link>/<link linkend="GtkTextBuffer"><type>GtkTextBuffer</type></link>
169
One important advantage of this pattern is that it is possible to
170
display the same model in multiple views; another one that the
171
separation of the model allows a great deal of flexibility, as
172
demonstrated by e.g. <link linkend="GtkTreeModelSort"><type>GtkTreeModelSort</type></link> or <link linkend="GtkTreeModelFilter"><type>GtkTreeModelFilter</type></link>.
177
<glossentry id="no-window">
178
<glossterm>no-window widget</glossterm>
181
A widget that does not have a GdkWindow of its own on which to
182
draw its contents, but rather shares its <glossterm
183
linkend="parent">parent's</glossterm>. Such a widget has the
184
<link linkend="GTK-NO-WINDOW:CAPS"><literal>GTK_NO_WINDOW</literal></link> <link linkend="GtkWidgetFlags">flag</link> set, and
185
can be tested with the <link linkend="GTK-WIDGET-NO-WINDOW:CAPS"><function>GTK_WIDGET_NO_WINDOW()</function></link> macro.
190
<glossentry id="parent">
191
<glossterm>parent</glossterm>
194
A <glossterm linkend="widget">widget's</glossterm> parent is
195
the <glossterm linkend="container">container</glossterm>
196
inside which it resides.
201
<glossentry id="realization">
202
<glossterm>realization</glossterm>
205
This is the step in a <glossterm
206
linkend="widget">widget's</glossterm> life cycle where it
207
creates its own GdkWindow, or otherwise associates itself with
208
its <glossterm linkend="parent">parent's</glossterm>
209
GdkWindow. If the widget has its own window, then it must
210
also attach a <glossterm linkend="style">style</glossterm> to
211
it. A widget becomes unrealized by destroying its associated
212
GdkWindow. When a widget is realized, it must turn on its
213
<link linkend="GTK-REALIZED:CAPS"><literal>GTK_REALIZED</literal></link> <link linkend="GtkWidgetFlags">flag</link>.
217
Widgets that don't own the GdkWindow on which they draw are
218
called <glossterm linkend="no-window">no-window widgets</glossterm>.
219
This can be tested with the <link linkend="GTK-WIDGET-NO-WINDOW:CAPS"><function>GTK_WIDGET_NO_WINDOW()</function></link> macro. Normally,
220
these widgets draw on their parent's GdkWindow.
224
Note that when a widget creates a window in its <link
225
linkend="gtkwidget-realize"><methodname>::<link linkend="realize"><function>realize()</function></link></methodname></link>
226
handler, it does not actually show the window. That is, the
227
window's structure is just created in memory. The widget
228
actually shows the window when it gets <glossterm
229
linkend="mapping">mapped</glossterm>.
234
<glossentry id="requisition">
235
<glossterm>requisition</glossterm>
238
The size requisition of a <glossterm
239
linkend="widget">widget</glossterm> is the minimum amount of
240
space it requests from its <glossterm
241
linkend="parent">parent</glossterm>. Once the parent computes
242
the widget's final size, it gives it its <glossterm
243
linkend="allocation">size allocation</glossterm>.
246
<glossterm linkend="allocation">allocation</glossterm>
251
<glossentry id="screen">
252
<glossterm>screen</glossterm>
255
GDK inherited the concept of screen from the X window system,
256
which considers a screen to be a rectangular area, on which
257
applications may place their windows. Screens under X may have
258
quite dissimilar <glossterm linkend="visual">visuals</glossterm>.
259
Each screen can stretch across multiple physical monitors.
262
In GDK, screens are represented by <link linkend="GdkScreen"><type>GdkScreen</type></link> objects.
267
<glossentry id="style">
268
<glossterm>style</glossterm>
271
A style encapsulates what GTK+ needs to know in order to draw
272
a widget. Styles can be modified with
273
<link linkend="gtk-Resource-Files">resource files</link>.
278
<glossentry id="toplevel">
279
<glossterm>toplevel</glossterm>
282
A <glossterm linkend="widget">widget</glossterm> that does not
283
require a <glossterm linkend="parent">parent</glossterm> container.
284
The only toplevel widgets in GTK+ are <link linkend="GtkWindow"><type>GtkWindow</type></link> and widgets derived from it.
287
<glossterm linkend="container">container</glossterm>
292
<glossentry id="unmap">
293
<glossterm>unmap</glossterm>
294
<glosssee><glossterm linkend="mapping">mapping</glossterm></glosssee>
297
<glossentry id="unrealize">
298
<glossterm>unrealize</glossterm>
299
<glosssee><glossterm linkend="realization">realization</glossterm></glosssee>
302
<glossentry id="view-column">
303
<glossterm>view column</glossterm>
306
A displayed column in a tree view, represented by a
307
<link linkend="GtkTreeViewColumn"><type>GtkTreeViewColumn</type></link> object.
310
<glossterm linkend="model-column">model column</glossterm>
315
<glossentry id="visual">
316
<glossterm>visual</glossterm>
319
A visual describes how color information is stored in pixels.
320
A <glossterm linkend="screen">screen</glossterm> may support
321
multiple visuals. On modern hardware, the most common visuals
322
are truecolor visuals, which store a fixed number of bits
323
(typically 8) for the red, green and blue components of a color.
326
On ancient hardware, one may still meet indexed visuals, which
327
store color information as an index into a color map, or even
333
<glossentry id="widget">
334
<glossterm>widget</glossterm>
337
A control in a graphical user interface. Widgets can draw
338
themselves and process events from the mouse and keyboard.
339
Widget types include buttons, menus, text entry lines, and
340
lists. Widgets can be arranged into <glossterm
341
linkend="container">containers</glossterm>, and these take
342
care of assigning the <glossterm
343
linkend="geometry">geometry</glossterm> of the widgets: every
344
widget thus has a parent except those widgets which are
345
<glossterm linkend="toplevel">toplevels</glossterm>. The base
346
class for widgets is <link linkend="GtkWidget"><type>GtkWidget</type></link>.
349
<glossterm linkend="container">container</glossterm>
358
sgml-parent-document: ("gtk-docs.sgml" "book" "glossary")