2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_EVENTBOX_H
4 #define _GTKMM_EVENTBOX_H
13 * Copyright (C) 1998-2002 The gtkmm Development Team
15 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Library General Public
17 * License as published by the Free Software Foundation; either
18 * version 2 of the License, or (at your option) any later version.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Library General Public License for more details.
25 * You should have received a copy of the GNU Library General Public
26 * License along with this library; if not, write to the Free
27 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 #include <gtkmm/bin.h>
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkEventBox GtkEventBox;
35 typedef struct _GtkEventBoxClass GtkEventBoxClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 { class EventBox_Class; } // namespace Gtk
44 /** Event capturing box.
46 * This widget adds an X Window where one does not
47 * normally appear, allowing you to capture events.
48 * It will receive any event which is specified
51 * This widget is generally used to add Gtk::Tooltips, button presses,
52 * and clipping to widgets derived from Gtk::Misc.
57 class EventBox : public Bin
60 #ifndef DOXYGEN_SHOULD_SKIP_THIS
61 typedef EventBox CppObjectType;
62 typedef EventBox_Class CppClassType;
63 typedef GtkEventBox BaseObjectType;
64 typedef GtkEventBoxClass BaseClassType;
65 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
69 #ifndef DOXYGEN_SHOULD_SKIP_THIS
72 friend class EventBox_Class;
73 static CppClassType eventbox_class_;
76 EventBox(const EventBox&);
77 EventBox& operator=(const EventBox&);
80 explicit EventBox(const Glib::ConstructParams& construct_params);
81 explicit EventBox(GtkEventBox* castitem);
83 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
86 #ifndef DOXYGEN_SHOULD_SKIP_THIS
87 static GType get_type() G_GNUC_CONST;
88 static GType get_base_type() G_GNUC_CONST;
91 ///Provides access to the underlying C GtkObject.
92 GtkEventBox* gobj() { return reinterpret_cast<GtkEventBox*>(gobject_); }
94 ///Provides access to the underlying C GtkObject.
95 const GtkEventBox* gobj() const { return reinterpret_cast<GtkEventBox*>(gobject_); }
99 //C++ methods used to invoke GTK+ virtual functions:
100 #ifdef GLIBMM_VFUNCS_ENABLED
101 #endif //GLIBMM_VFUNCS_ENABLED
104 //GTK+ Virtual Functions (override these to change behaviour):
105 #ifdef GLIBMM_VFUNCS_ENABLED
106 #endif //GLIBMM_VFUNCS_ENABLED
108 //Default Signal Handlers::
109 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
110 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
119 /** Return value: <tt>true</tt> if the event box window is visible
120 * @return <tt>true</tt> if the event box window is visible
124 bool get_visible_window() const;
126 /** Set whether the event box uses a visible or invisible child
127 * window. The default is to use visible windows.
129 * In an invisible window event box, the window that the
130 * event box creates is a Gdk::INPUT_ONLY window, which
131 * means that it is invisible and only serves to receive
134 * A visible window event box creates a visible (Gdk::INPUT_OUTPUT)
135 * window that acts as the parent window for all the widgets
136 * contained in the event box.
138 * You should generally make your event box invisible if
139 * you just want to trap events. Creating a visible window
140 * may cause artifacts that are visible to the user, especially
141 * if the user is using a theme with gradients or pixmaps.
143 * The main reason to create a non input-only event box is if
144 * you want to set the background to a different color or
148 * There is one unexpected issue for an invisible event box that has its
149 * window below the child. (See set_above_child().)
150 * Since the input-only window is not an ancestor window of any windows
151 * that descendent widgets of the event box create, events on these
152 * windows aren't propagated up by the windowing system, but only by GTK+.
153 * The practical effect of this is if an event isn't in the event
154 * mask for the descendant window (see Gtk::Widget::add_events()),
155 * it won't be received by the event box.
157 * This problem doesn't occur for visible event boxes, because in
158 * that case, the event box window is actually the ancestor of the
159 * descendant windows, not just at the same place on the screen.
163 * @param visible_window Boolean value.
165 void set_visible_window(bool visible_window = true);
167 /** Return value: <tt>true</tt> if the event box window is above the window
168 * @return <tt>true</tt> if the event box window is above the window
173 bool get_above_child() const;
175 /** Set whether the event box window is positioned above the windows of its child,
176 * as opposed to below it. If the window is above, all events inside the
177 * event box will go to the event box. If the window is below, events
178 * in windows of child widgets will first got to that widget, and then
181 * The default is to keep the window below the child.
184 * @param above_child <tt>true</tt> if the event box window is above the windows of its child.
186 void set_above_child(bool above_child = true);
188 #ifdef GLIBMM_PROPERTIES_ENABLED
189 /** Whether the event box is visible
191 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
192 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
193 * the value of the property changes.
195 Glib::PropertyProxy<bool> property_visible_window() ;
196 #endif //#GLIBMM_PROPERTIES_ENABLED
198 #ifdef GLIBMM_PROPERTIES_ENABLED
199 /** Whether the event box is visible
201 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
202 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
203 * the value of the property changes.
205 Glib::PropertyProxy_ReadOnly<bool> property_visible_window() const;
206 #endif //#GLIBMM_PROPERTIES_ENABLED
208 #ifdef GLIBMM_PROPERTIES_ENABLED
209 /** Whether the event-trapping window of the eventbox is above the window of the child widget as opposed to below it.
211 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
212 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
213 * the value of the property changes.
215 Glib::PropertyProxy<bool> property_above_child() ;
216 #endif //#GLIBMM_PROPERTIES_ENABLED
218 #ifdef GLIBMM_PROPERTIES_ENABLED
219 /** Whether the event-trapping window of the eventbox is above the window of the child widget as opposed to below it.
221 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
222 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
223 * the value of the property changes.
225 Glib::PropertyProxy_ReadOnly<bool> property_above_child() const;
226 #endif //#GLIBMM_PROPERTIES_ENABLED
231 } /* namespace Gtk */
236 /** A Glib::wrap() method for this object.
238 * @param object The C instance.
239 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
240 * @result A C++ instance that wraps this C instance.
242 * @relates Gtk::EventBox
244 Gtk::EventBox* wrap(GtkEventBox* object, bool take_copy = false);
248 #endif /* _GTKMM_EVENTBOX_H */