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

« back to all changes in this revision

Viewing changes to include/gtkmm-2.4/gtkmm/eventbox.h

  • 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
// -*- c++ -*-
 
2
// Generated by gtkmmproc -- DO NOT MODIFY!
 
3
#ifndef _GTKMM_EVENTBOX_H
 
4
#define _GTKMM_EVENTBOX_H
 
5
 
 
6
 
 
7
#include <glibmm.h>
 
8
 
 
9
/* $Id: eventbox.hg,v 1.2 2003/10/12 09:38:11 murrayc Exp $ */
 
10
 
 
11
/* eventbox.h
 
12
 * 
 
13
 * Copyright (C) 1998-2002 The gtkmm Development Team
 
14
 *
 
15
 * This library is free software; you can redistribute it and/or
 
16
 * modify it under the terms of the GNU Lesser General Public
 
17
 * License as published by the Free Software Foundation; either
 
18
 * version 2.1 of the License, or (at your option) any later version.
 
19
 *
 
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
 * Lesser General Public License for more details.
 
24
 *
 
25
 * You should have received a copy of the GNU Lesser 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.
 
28
 */
 
29
 
 
30
#include <gtkmm/bin.h>
 
31
 
 
32
 
 
33
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
34
typedef struct _GtkEventBox GtkEventBox;
 
35
typedef struct _GtkEventBoxClass GtkEventBoxClass;
 
36
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
37
 
 
38
 
 
39
namespace Gtk
 
40
{ class EventBox_Class; } // namespace Gtk
 
41
namespace Gtk
 
42
{
 
43
 
 
44
/** Event capturing box.
 
45
 *
 
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
 
49
 * with set_events().
 
50
 *
 
51
 * This widget is generally used to add Gtk::Tooltips, button presses,
 
52
 * and clipping to widgets derived from Gtk::Misc.
 
53
 *
 
54
 * @ingroup Widgets
 
55
 */
 
56
 
 
57
class EventBox : public Bin
 
58
{
 
59
  public:
 
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 */
 
66
 
 
67
  virtual ~EventBox();
 
68
 
 
69
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
70
 
 
71
private:
 
72
  friend class EventBox_Class;
 
73
  static CppClassType eventbox_class_;
 
74
 
 
75
  // noncopyable
 
76
  EventBox(const EventBox&);
 
77
  EventBox& operator=(const EventBox&);
 
78
 
 
79
protected:
 
80
  explicit EventBox(const Glib::ConstructParams& construct_params);
 
81
  explicit EventBox(GtkEventBox* castitem);
 
82
 
 
83
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
84
 
 
85
public:
 
86
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
87
  static GType get_type()      G_GNUC_CONST;
 
88
 
 
89
 
 
90
  static GType get_base_type() G_GNUC_CONST;
 
91
#endif
 
92
 
 
93
  ///Provides access to the underlying C GtkObject.
 
94
  GtkEventBox*       gobj()       { return reinterpret_cast<GtkEventBox*>(gobject_); }
 
95
 
 
96
  ///Provides access to the underlying C GtkObject.
 
97
  const GtkEventBox* gobj() const { return reinterpret_cast<GtkEventBox*>(gobject_); }
 
98
 
 
99
 
 
100
public:
 
101
  //C++ methods used to invoke GTK+ virtual functions:
 
102
 
 
103
protected:
 
104
  //GTK+ Virtual Functions (override these to change behaviour):
 
105
 
 
106
  //Default Signal Handlers::
 
107
 
 
108
 
 
109
private:
 
110
 
 
111
public:
 
112
  EventBox();
 
113
 
 
114
  
 
115
  /** Returns whether the event box has a visible window.
 
116
   * See set_visible_window() for details.
 
117
   * 
 
118
   * @newin{2,4}
 
119
   * @return <tt>true</tt> if the event box window is visible.
 
120
   */
 
121
  bool get_visible_window() const;
 
122
  
 
123
  /** Set whether the event box uses a visible or invisible child
 
124
   * window. The default is to use visible windows.
 
125
   * 
 
126
   * In an invisible window event box, the window that the
 
127
   * event box creates is a Gdk::INPUT_ONLY window, which 
 
128
   * means that it is invisible and only serves to receive
 
129
   * events.
 
130
   * 
 
131
   * A visible window event box creates a visible (Gdk::INPUT_OUTPUT)
 
132
   * window that acts as the parent window for all the widgets  
 
133
   * contained in the event box.
 
134
   * 
 
135
   * You should generally make your event box invisible if
 
136
   * you just want to trap events. Creating a visible window
 
137
   * may cause artifacts that are visible to the user, especially
 
138
   * if the user is using a theme with gradients or pixmaps.
 
139
   * 
 
140
   * The main reason to create a non input-only event box is if
 
141
   * you want to set the background to a different color or
 
142
   * draw on it.
 
143
   * 
 
144
   * <note>
 
145
   * There is one unexpected issue for an invisible event box that has its
 
146
   * window below the child. (See set_above_child().)
 
147
   * Since the input-only window is not an ancestor window of any windows
 
148
   * that descendent widgets of the event box create, events on these 
 
149
   * windows aren't propagated up by the windowing system, but only by GTK+.
 
150
   * The practical effect of this is if an event isn't in the event
 
151
   * mask for the descendant window (see Gtk::Widget::add_events()),  
 
152
   * it won't be received by the event box. 
 
153
   * 
 
154
   * This problem doesn't occur for visible event boxes, because in
 
155
   * that case, the event box window is actually the ancestor of the
 
156
   * descendant windows, not just at the same place on the screen.
 
157
   * </note>
 
158
   * 
 
159
   * @newin{2,4}
 
160
   * @param visible_window Boolean value.
 
161
   */
 
162
  void set_visible_window(bool visible_window =  true);
 
163
  
 
164
  /** Returns whether the event box window is above or below the
 
165
   * windows of its child. See set_above_child() for
 
166
   * details.
 
167
   * 
 
168
   * @newin{2,4}
 
169
   * @return <tt>true</tt> if the event box window is above the window
 
170
   * of its child.
 
171
   */
 
172
  bool get_above_child() const;
 
173
  
 
174
  /** Set whether the event box window is positioned above the windows of its child,
 
175
   * as opposed to below it. If the window is above, all events inside the
 
176
   * event box will go to the event box. If the window is below, events
 
177
   * in windows of child widgets will first got to that widget, and then
 
178
   * to its parents.
 
179
   * 
 
180
   * The default is to keep the window below the child.
 
181
   * 
 
182
   * @newin{2,4}
 
183
   * @param above_child <tt>true</tt> if the event box window is above the windows of its child.
 
184
   */
 
185
  void set_above_child(bool above_child =  true);
 
186
 
 
187
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
188
/** Whether the event box is visible, as opposed to invisible and only used to trap events.
 
189
   *
 
190
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
191
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
192
   * the value of the property changes.
 
193
   */
 
194
  Glib::PropertyProxy<bool> property_visible_window() ;
 
195
#endif //#GLIBMM_PROPERTIES_ENABLED
 
196
 
 
197
#ifdef GLIBMM_PROPERTIES_ENABLED
 
198
/** Whether the event box is visible, as opposed to invisible and only used to trap events.
 
199
   *
 
200
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
201
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
202
   * the value of the property changes.
 
203
   */
 
204
  Glib::PropertyProxy_ReadOnly<bool> property_visible_window() const;
 
205
#endif //#GLIBMM_PROPERTIES_ENABLED
 
206
 
 
207
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
208
/** Whether the event-trapping window of the eventbox is above the window of the child widget as opposed to below it.
 
209
   *
 
210
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
211
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
212
   * the value of the property changes.
 
213
   */
 
214
  Glib::PropertyProxy<bool> property_above_child() ;
 
215
#endif //#GLIBMM_PROPERTIES_ENABLED
 
216
 
 
217
#ifdef GLIBMM_PROPERTIES_ENABLED
 
218
/** Whether the event-trapping window of the eventbox is above the window of the child widget as opposed to below it.
 
219
   *
 
220
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
221
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
222
   * the value of the property changes.
 
223
   */
 
224
  Glib::PropertyProxy_ReadOnly<bool> property_above_child() const;
 
225
#endif //#GLIBMM_PROPERTIES_ENABLED
 
226
 
 
227
 
 
228
};
 
229
 
 
230
} /* namespace Gtk */
 
231
 
 
232
 
 
233
namespace Glib
 
234
{
 
235
  /** A Glib::wrap() method for this object.
 
236
   * 
 
237
   * @param object The C instance.
 
238
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
 
239
   * @result A C++ instance that wraps this C instance.
 
240
   *
 
241
   * @relates Gtk::EventBox
 
242
   */
 
243
  Gtk::EventBox* wrap(GtkEventBox* object, bool take_copy = false);
 
244
} //namespace Glib
 
245
 
 
246
 
 
247
#endif /* _GTKMM_EVENTBOX_H */
 
248