~inkscape.dev/inkscape-devlibs/devlibs-gtk3

« back to all changes in this revision

Viewing changes to share/gtk-doc/html/gtk2/GtkEventBox.html

  • Committer: JazzyNico
  • Date: 2013-01-21 10:11:05 UTC
  • Revision ID: nicoduf@yahoo.fr-20130121101105-i8d8slkq9ng4olx8
Adding gtk2 libraries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
5
<title>GtkEventBox</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
 
7
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
 
8
<link rel="up" href="MiscObjects.html" title="Miscellaneous">
 
9
<link rel="prev" href="GtkDrawingArea.html" title="GtkDrawingArea">
 
10
<link rel="next" href="GtkHandleBox.html" title="GtkHandleBox">
 
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
</head>
 
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
16
<tr valign="middle">
 
17
<td><a accesskey="p" href="GtkDrawingArea.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
18
<td><a accesskey="u" href="MiscObjects.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
20
<th width="100%" align="center">GTK+ 2 Reference Manual</th>
 
21
<td><a accesskey="n" href="GtkHandleBox.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
22
</tr>
 
23
<tr><td colspan="5" class="shortcuts">
 
24
<a href="#GtkEventBox.synopsis" class="shortcut">Top</a>
 
25
                   | 
 
26
                  <a href="#GtkEventBox.description" class="shortcut">Description</a>
 
27
                   | 
 
28
                  <a href="#GtkEventBox.object-hierarchy" class="shortcut">Object Hierarchy</a>
 
29
                   | 
 
30
                  <a href="#GtkEventBox.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
 
31
                   | 
 
32
                  <a href="#GtkEventBox.properties" class="shortcut">Properties</a>
 
33
</td></tr>
 
34
</table>
 
35
<div class="refentry">
 
36
<a name="GtkEventBox"></a><div class="titlepage"></div>
 
37
<div class="refnamediv"><table width="100%"><tr>
 
38
<td valign="top">
 
39
<h2><span class="refentrytitle"><a name="GtkEventBox.top_of_page"></a>GtkEventBox</span></h2>
 
40
<p>GtkEventBox — A widget used to catch events for widgets which do not have their own window</p>
 
41
</td>
 
42
<td valign="top" align="right"></td>
 
43
</tr></table></div>
 
44
<div class="refsynopsisdiv">
 
45
<a name="GtkEventBox.synopsis"></a><h2>Synopsis</h2>
 
46
<pre class="synopsis">
 
47
#include &lt;gtk/gtk.h&gt;
 
48
 
 
49
struct              <a class="link" href="GtkEventBox.html#GtkEventBox-struct" title="struct GtkEventBox">GtkEventBox</a>;
 
50
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkEventBox.html#gtk-event-box-new" title="gtk_event_box_new ()">gtk_event_box_new</a>                   (<em class="parameter"><code><span class="type">void</span></code></em>);
 
51
<span class="returnvalue">void</span>                <a class="link" href="GtkEventBox.html#gtk-event-box-set-above-child" title="gtk_event_box_set_above_child ()">gtk_event_box_set_above_child</a>       (<em class="parameter"><code><a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a> *event_box</code></em>,
 
52
                                                         <em class="parameter"><code><span class="type">gboolean</span> above_child</code></em>);
 
53
<span class="returnvalue">gboolean</span>            <a class="link" href="GtkEventBox.html#gtk-event-box-get-above-child" title="gtk_event_box_get_above_child ()">gtk_event_box_get_above_child</a>       (<em class="parameter"><code><a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a> *event_box</code></em>);
 
54
<span class="returnvalue">void</span>                <a class="link" href="GtkEventBox.html#gtk-event-box-set-visible-window" title="gtk_event_box_set_visible_window ()">gtk_event_box_set_visible_window</a>    (<em class="parameter"><code><a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a> *event_box</code></em>,
 
55
                                                         <em class="parameter"><code><span class="type">gboolean</span> visible_window</code></em>);
 
56
<span class="returnvalue">gboolean</span>            <a class="link" href="GtkEventBox.html#gtk-event-box-get-visible-window" title="gtk_event_box_get_visible_window ()">gtk_event_box_get_visible_window</a>    (<em class="parameter"><code><a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a> *event_box</code></em>);
 
57
</pre>
 
58
</div>
 
59
<div class="refsect1">
 
60
<a name="GtkEventBox.object-hierarchy"></a><h2>Object Hierarchy</h2>
 
61
<pre class="synopsis">
 
62
  GObject
 
63
   +----GInitiallyUnowned
 
64
         +----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>
 
65
               +----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
 
66
                     +----<a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
 
67
                           +----<a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
 
68
                                 +----GtkEventBox
 
69
</pre>
 
70
</div>
 
71
<div class="refsect1">
 
72
<a name="GtkEventBox.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
 
73
<p>
 
74
GtkEventBox implements
 
75
 AtkImplementorIface and  <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
 
76
</div>
 
77
<div class="refsect1">
 
78
<a name="GtkEventBox.properties"></a><h2>Properties</h2>
 
79
<pre class="synopsis">
 
80
  "<a class="link" href="GtkEventBox.html#GtkEventBox--above-child" title='The "above-child" property'>above-child</a>"              <span class="type">gboolean</span>              : Read / Write
 
81
  "<a class="link" href="GtkEventBox.html#GtkEventBox--visible-window" title='The "visible-window" property'>visible-window</a>"           <span class="type">gboolean</span>              : Read / Write
 
82
</pre>
 
83
</div>
 
84
<div class="refsect1">
 
85
<a name="GtkEventBox.description"></a><h2>Description</h2>
 
86
<p>
 
87
The <a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a> widget is a subclass of <a class="link" href="GtkBin.html" title="GtkBin"><span class="type">GtkBin</span></a> which also has its own window.
 
88
It is useful since it allows you to catch events for widgets which do not
 
89
have their own window.
 
90
</p>
 
91
</div>
 
92
<div class="refsect1">
 
93
<a name="GtkEventBox.details"></a><h2>Details</h2>
 
94
<div class="refsect2">
 
95
<a name="GtkEventBox-struct"></a><h3>struct GtkEventBox</h3>
 
96
<pre class="programlisting">struct GtkEventBox;</pre>
 
97
<p>
 
98
The <a class="link" href="GtkEventBox.html#GtkEventBox-struct" title="struct GtkEventBox"><span class="type">GtkEventBox</span></a> struct contains private data only, and
 
99
should be accessed using the functions below.
 
100
</p>
 
101
</div>
 
102
<hr>
 
103
<div class="refsect2">
 
104
<a name="gtk-event-box-new"></a><h3>gtk_event_box_new ()</h3>
 
105
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_event_box_new                   (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
 
106
<p>
 
107
Creates a new <a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a>.
 
108
</p>
 
109
<div class="variablelist"><table border="0" class="variablelist">
 
110
<colgroup>
 
111
<col align="left" valign="top">
 
112
<col>
 
113
</colgroup>
 
114
<tbody><tr>
 
115
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
116
<td>a new <a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a>.</td>
 
117
</tr></tbody>
 
118
</table></div>
 
119
</div>
 
120
<hr>
 
121
<div class="refsect2">
 
122
<a name="gtk-event-box-set-above-child"></a><h3>gtk_event_box_set_above_child ()</h3>
 
123
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_event_box_set_above_child       (<em class="parameter"><code><a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a> *event_box</code></em>,
 
124
                                                         <em class="parameter"><code><span class="type">gboolean</span> above_child</code></em>);</pre>
 
125
<p>
 
126
Set whether the event box window is positioned above the windows of its child,
 
127
as opposed to below it. If the window is above, all events inside the
 
128
event box will go to the event box. If the window is below, events
 
129
in windows of child widgets will first got to that widget, and then
 
130
to its parents.
 
131
</p>
 
132
<p>
 
133
The default is to keep the window below the child.
 
134
</p>
 
135
<div class="variablelist"><table border="0" class="variablelist">
 
136
<colgroup>
 
137
<col align="left" valign="top">
 
138
<col>
 
139
</colgroup>
 
140
<tbody>
 
141
<tr>
 
142
<td><p><span class="term"><em class="parameter"><code>event_box</code></em> :</span></p></td>
 
143
<td>a <a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a>
 
144
</td>
 
145
</tr>
 
146
<tr>
 
147
<td><p><span class="term"><em class="parameter"><code>above_child</code></em> :</span></p></td>
 
148
<td>
 
149
<code class="literal">TRUE</code> if the event box window is above the windows of its child</td>
 
150
</tr>
 
151
</tbody>
 
152
</table></div>
 
153
<p class="since">Since 2.4</p>
 
154
</div>
 
155
<hr>
 
156
<div class="refsect2">
 
157
<a name="gtk-event-box-get-above-child"></a><h3>gtk_event_box_get_above_child ()</h3>
 
158
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gtk_event_box_get_above_child       (<em class="parameter"><code><a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a> *event_box</code></em>);</pre>
 
159
<p>
 
160
Returns whether the event box window is above or below the
 
161
windows of its child. See <a class="link" href="GtkEventBox.html#gtk-event-box-set-above-child" title="gtk_event_box_set_above_child ()"><code class="function">gtk_event_box_set_above_child()</code></a> for
 
162
details.
 
163
</p>
 
164
<div class="variablelist"><table border="0" class="variablelist">
 
165
<colgroup>
 
166
<col align="left" valign="top">
 
167
<col>
 
168
</colgroup>
 
169
<tbody>
 
170
<tr>
 
171
<td><p><span class="term"><em class="parameter"><code>event_box</code></em> :</span></p></td>
 
172
<td>a <a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a>
 
173
</td>
 
174
</tr>
 
175
<tr>
 
176
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
177
<td>
 
178
<code class="literal">TRUE</code> if the event box window is above the window
 
179
of its child.</td>
 
180
</tr>
 
181
</tbody>
 
182
</table></div>
 
183
<p class="since">Since 2.4</p>
 
184
</div>
 
185
<hr>
 
186
<div class="refsect2">
 
187
<a name="gtk-event-box-set-visible-window"></a><h3>gtk_event_box_set_visible_window ()</h3>
 
188
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_event_box_set_visible_window    (<em class="parameter"><code><a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a> *event_box</code></em>,
 
189
                                                         <em class="parameter"><code><span class="type">gboolean</span> visible_window</code></em>);</pre>
 
190
<p>
 
191
Set whether the event box uses a visible or invisible child
 
192
window. The default is to use visible windows.
 
193
</p>
 
194
<p>
 
195
In an invisible window event box, the window that the
 
196
event box creates is a <a href="../gdk2/gdk2-Windows.html#GDK-INPUT-ONLY:CAPS"><code class="literal">GDK_INPUT_ONLY</code></a> window, which 
 
197
means that it is invisible and only serves to receive
 
198
events.
 
199
</p>
 
200
<p>
 
201
A visible window event box creates a visible (<a href="../gdk2/gdk2-Windows.html#GDK-INPUT-OUTPUT:CAPS"><code class="literal">GDK_INPUT_OUTPUT</code></a>)
 
202
window that acts as the parent window for all the widgets  
 
203
contained in the event box.
 
204
</p>
 
205
<p>
 
206
You should generally make your event box invisible if
 
207
you just want to trap events. Creating a visible window
 
208
may cause artifacts that are visible to the user, especially
 
209
if the user is using a theme with gradients or pixmaps.
 
210
</p>
 
211
<p>
 
212
The main reason to create a non input-only event box is if
 
213
you want to set the background to a different color or
 
214
draw on it.
 
215
</p>
 
216
<p>
 
217
</p>
 
218
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
 
219
<h3 class="title">Note</h3>
 
220
<p>
 
221
There is one unexpected issue for an invisible event box that has its
 
222
window below the child. (See <a class="link" href="GtkEventBox.html#gtk-event-box-set-above-child" title="gtk_event_box_set_above_child ()"><code class="function">gtk_event_box_set_above_child()</code></a>.)
 
223
Since the input-only window is not an ancestor window of any windows
 
224
that descendent widgets of the event box create, events on these 
 
225
windows aren't propagated up by the windowing system, but only by GTK+.
 
226
The practical effect of this is if an event isn't in the event
 
227
mask for the descendant window (see <a class="link" href="GtkWidget.html#gtk-widget-add-events" title="gtk_widget_add_events ()"><code class="function">gtk_widget_add_events()</code></a>),  
 
228
it won't be received by the event box. 
 
229
</p>
 
230
<p>
 
231
This problem doesn't occur for visible event boxes, because in
 
232
that case, the event box window is actually the ancestor of the
 
233
descendant windows, not just at the same place on the screen.
 
234
</p>
 
235
</div>
 
236
<p>
 
237
</p>
 
238
<div class="variablelist"><table border="0" class="variablelist">
 
239
<colgroup>
 
240
<col align="left" valign="top">
 
241
<col>
 
242
</colgroup>
 
243
<tbody>
 
244
<tr>
 
245
<td><p><span class="term"><em class="parameter"><code>event_box</code></em> :</span></p></td>
 
246
<td>a <a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a>
 
247
</td>
 
248
</tr>
 
249
<tr>
 
250
<td><p><span class="term"><em class="parameter"><code>visible_window</code></em> :</span></p></td>
 
251
<td>boolean value</td>
 
252
</tr>
 
253
</tbody>
 
254
</table></div>
 
255
<p class="since">Since 2.4</p>
 
256
</div>
 
257
<hr>
 
258
<div class="refsect2">
 
259
<a name="gtk-event-box-get-visible-window"></a><h3>gtk_event_box_get_visible_window ()</h3>
 
260
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gtk_event_box_get_visible_window    (<em class="parameter"><code><a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a> *event_box</code></em>);</pre>
 
261
<p>
 
262
Returns whether the event box has a visible window.
 
263
See <a class="link" href="GtkEventBox.html#gtk-event-box-set-visible-window" title="gtk_event_box_set_visible_window ()"><code class="function">gtk_event_box_set_visible_window()</code></a> for details.
 
264
</p>
 
265
<div class="variablelist"><table border="0" class="variablelist">
 
266
<colgroup>
 
267
<col align="left" valign="top">
 
268
<col>
 
269
</colgroup>
 
270
<tbody>
 
271
<tr>
 
272
<td><p><span class="term"><em class="parameter"><code>event_box</code></em> :</span></p></td>
 
273
<td>a <a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a>
 
274
</td>
 
275
</tr>
 
276
<tr>
 
277
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
278
<td>
 
279
<code class="literal">TRUE</code> if the event box window is visible</td>
 
280
</tr>
 
281
</tbody>
 
282
</table></div>
 
283
<p class="since">Since 2.4</p>
 
284
</div>
 
285
</div>
 
286
<div class="refsect1">
 
287
<a name="GtkEventBox.property-details"></a><h2>Property Details</h2>
 
288
<div class="refsect2">
 
289
<a name="GtkEventBox--above-child"></a><h3>The <code class="literal">"above-child"</code> property</h3>
 
290
<pre class="programlisting">  "above-child"              <span class="type">gboolean</span>              : Read / Write</pre>
 
291
<p>Whether the event-trapping window of the eventbox is above the window of the child widget as opposed to below it.</p>
 
292
<p>Default value: FALSE</p>
 
293
</div>
 
294
<hr>
 
295
<div class="refsect2">
 
296
<a name="GtkEventBox--visible-window"></a><h3>The <code class="literal">"visible-window"</code> property</h3>
 
297
<pre class="programlisting">  "visible-window"           <span class="type">gboolean</span>              : Read / Write</pre>
 
298
<p>Whether the event box is visible, as opposed to invisible and only used to trap events.</p>
 
299
<p>Default value: TRUE</p>
 
300
</div>
 
301
</div>
 
302
</div>
 
303
<div class="footer">
 
304
<hr>
 
305
          Generated by GTK-Doc V1.18</div>
 
306
</body>
 
307
</html>
 
 
b'\\ No newline at end of file'