1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
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">
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">
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>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#GtkEventBox.synopsis" class="shortcut">Top</a>
26
<a href="#GtkEventBox.description" class="shortcut">Description</a>
28
<a href="#GtkEventBox.object-hierarchy" class="shortcut">Object Hierarchy</a>
30
<a href="#GtkEventBox.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
32
<a href="#GtkEventBox.properties" class="shortcut">Properties</a>
35
<div class="refentry">
36
<a name="GtkEventBox"></a><div class="titlepage"></div>
37
<div class="refnamediv"><table width="100%"><tr>
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>
42
<td valign="top" align="right"></td>
44
<div class="refsynopsisdiv">
45
<a name="GtkEventBox.synopsis"></a><h2>Synopsis</h2>
46
<pre class="synopsis">
47
#include <gtk/gtk.h>
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>);
59
<div class="refsect1">
60
<a name="GtkEventBox.object-hierarchy"></a><h2>Object Hierarchy</h2>
61
<pre class="synopsis">
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>
71
<div class="refsect1">
72
<a name="GtkEventBox.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
74
GtkEventBox implements
75
AtkImplementorIface and <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
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
84
<div class="refsect1">
85
<a name="GtkEventBox.description"></a><h2>Description</h2>
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.
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>
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.
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>
107
Creates a new <a class="link" href="GtkEventBox.html" title="GtkEventBox"><span class="type">GtkEventBox</span></a>.
109
<div class="variablelist"><table border="0" class="variablelist">
111
<col align="left" valign="top">
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>
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>
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
133
The default is to keep the window below the child.
135
<div class="variablelist"><table border="0" class="variablelist">
137
<col align="left" valign="top">
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>
147
<td><p><span class="term"><em class="parameter"><code>above_child</code></em> :</span></p></td>
149
<code class="literal">TRUE</code> if the event box window is above the windows of its child</td>
153
<p class="since">Since 2.4</p>
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>
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
164
<div class="variablelist"><table border="0" class="variablelist">
166
<col align="left" valign="top">
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>
176
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
178
<code class="literal">TRUE</code> if the event box window is above the window
183
<p class="since">Since 2.4</p>
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>
191
Set whether the event box uses a visible or invisible child
192
window. The default is to use visible windows.
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
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.
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.
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
218
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
219
<h3 class="title">Note</h3>
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.
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.
238
<div class="variablelist"><table border="0" class="variablelist">
240
<col align="left" valign="top">
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>
250
<td><p><span class="term"><em class="parameter"><code>visible_window</code></em> :</span></p></td>
251
<td>boolean value</td>
255
<p class="since">Since 2.4</p>
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>
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.
265
<div class="variablelist"><table border="0" class="variablelist">
267
<col align="left" valign="top">
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>
277
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
279
<code class="literal">TRUE</code> if the event box window is visible</td>
283
<p class="since">Since 2.4</p>
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>
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>
305
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'