2 // Generated by gtkmmproc -- DO NOT MODIFY!
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/container.h>
31 #include <gtkmm/enums.h>
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GtkPaned GtkPaned;
36 typedef struct _GtkPanedClass GtkPanedClass;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41 { class Paned_Class; } // namespace Gtk
42 #ifndef DOXYGEN_SHOULD_SKIP_THIS
43 typedef struct _GtkHPaned GtkHPaned;
44 typedef struct _GtkHPanedClass GtkHPanedClass;
45 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
49 { class HPaned_Class; } // namespace Gtk
50 #ifndef DOXYGEN_SHOULD_SKIP_THIS
51 typedef struct _GtkVPaned GtkVPaned;
52 typedef struct _GtkVPanedClass GtkVPanedClass;
53 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
57 { class VPaned_Class; } // namespace Gtk
61 /** This is the base class for widgets with two panes, arranged either
62 * horizontally (Gtk::HPaned) or vertically (Gtk::VPaned).
64 * Child widgets are added to the panes of the widget with pack1() and pack2().
65 * The division beween the two children is set by default from the size
66 * requests of the children, but it can be adjusted by the user.
68 * A paned widget draws a separator between the two child widgets and a small
69 * handle that the user can drag to adjust the division. It does not draw any
70 * relief around the children or around the separator. Often, it is useful to
71 * put each child inside a Gtk::Frame with the shadow type set to Gtk::SHADOW_IN
72 * so that the gutter appears as a ridge.
74 * Each child has two options that can be set - resize and shrink. If resize is
75 * true, then when the GtkPaned is resized, that child will expand or shrink
76 * along with the paned widget. If shrink is true, then when that child can be
77 * made smaller than it's requisition. Setting shrink to false allows the
78 * application to set a minimum size. If resize is false for both children,
79 * then this is treated as if resize is true for both children.
81 * The application can set the position of the slider as if it were set by the
82 * user, by calling set_position().
88 class Paned : public Container
91 #ifndef DOXYGEN_SHOULD_SKIP_THIS
92 typedef Paned CppObjectType;
93 typedef Paned_Class CppClassType;
94 typedef GtkPaned BaseObjectType;
95 typedef GtkPanedClass BaseClassType;
96 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
100 #ifndef DOXYGEN_SHOULD_SKIP_THIS
103 friend class Paned_Class;
104 static CppClassType paned_class_;
108 Paned& operator=(const Paned&);
111 explicit Paned(const Glib::ConstructParams& construct_params);
112 explicit Paned(GtkPaned* castitem);
114 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
117 #ifndef DOXYGEN_SHOULD_SKIP_THIS
118 static GType get_type() G_GNUC_CONST;
119 static GType get_base_type() G_GNUC_CONST;
122 ///Provides access to the underlying C GtkObject.
123 GtkPaned* gobj() { return reinterpret_cast<GtkPaned*>(gobject_); }
125 ///Provides access to the underlying C GtkObject.
126 const GtkPaned* gobj() const { return reinterpret_cast<GtkPaned*>(gobject_); }
130 //C++ methods used to invoke GTK+ virtual functions:
133 //GTK+ Virtual Functions (override these to change behaviour):
135 //Default Signal Handlers::
145 void add1(Widget& child);
147 void add2(Widget& child);
150 void pack1(Widget& child, bool resize, bool shrink);
151 void pack1(Widget& child, AttachOptions options = Gtk::EXPAND);
154 void pack2(Widget& child, bool resize, bool shrink);
155 void pack2(Widget& child, AttachOptions options = Gtk::EXPAND);
158 /** Obtains the position of the divider between the two panes.
159 * @return Position of the divider.
161 int get_position() const;
163 /** Sets the position of the divider between the two panes.
164 * @param position Pixel position of divider, a negative value means that the position
167 void set_position(int position);
170 /** Obtains the first child of the paned widget.
171 * @return First child, or <tt>0</tt> if it is not set.
175 Widget* get_child1();
177 /** Obtains the first child of the paned widget.
178 * @return First child, or <tt>0</tt> if it is not set.
182 const Widget* get_child1() const;
185 /** Obtains the second child of the paned widget.
186 * @return Second child, or <tt>0</tt> if it is not set.
190 Widget* get_child2();
192 /** Obtains the second child of the paned widget.
193 * @return Second child, or <tt>0</tt> if it is not set.
197 const Widget* get_child2() const;
199 //Keybinding signals:
202 /** Position of paned separator in pixels (0 means all the way to the left/top).
204 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
205 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
206 * the value of the property changes.
208 Glib::PropertyProxy<int> property_position() ;
210 /** Position of paned separator in pixels (0 means all the way to the left/top).
212 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
213 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
214 * the value of the property changes.
216 Glib::PropertyProxy_ReadOnly<int> property_position() const;
218 /** TRUE if the Position property should be used.
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.
224 Glib::PropertyProxy<bool> property_position_set() ;
226 /** TRUE if the Position property should be used.
228 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
229 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
230 * the value of the property changes.
232 Glib::PropertyProxy_ReadOnly<bool> property_position_set() const;
234 /** Smallest possible value for the position property.
236 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
237 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
238 * the value of the property changes.
240 Glib::PropertyProxy_ReadOnly<int> property_min_position() const;
243 /** Largest possible value for the position property.
245 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
246 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
247 * the value of the property changes.
249 Glib::PropertyProxy_ReadOnly<int> property_max_position() const;
255 * The Gtk::HPaned widget is a container widget with two children arranged
256 * horizontally. The division between the two panes is adjustable by the
257 * user by dragging a handle. See Gtk::Paned for details.
262 class HPaned : public Paned
265 #ifndef DOXYGEN_SHOULD_SKIP_THIS
266 typedef HPaned CppObjectType;
267 typedef HPaned_Class CppClassType;
268 typedef GtkHPaned BaseObjectType;
269 typedef GtkHPanedClass BaseClassType;
270 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
274 #ifndef DOXYGEN_SHOULD_SKIP_THIS
277 friend class HPaned_Class;
278 static CppClassType hpaned_class_;
281 HPaned(const HPaned&);
282 HPaned& operator=(const HPaned&);
285 explicit HPaned(const Glib::ConstructParams& construct_params);
286 explicit HPaned(GtkHPaned* castitem);
288 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
291 #ifndef DOXYGEN_SHOULD_SKIP_THIS
292 static GType get_type() G_GNUC_CONST;
293 static GType get_base_type() G_GNUC_CONST;
296 ///Provides access to the underlying C GtkObject.
297 GtkHPaned* gobj() { return reinterpret_cast<GtkHPaned*>(gobject_); }
299 ///Provides access to the underlying C GtkObject.
300 const GtkHPaned* gobj() const { return reinterpret_cast<GtkHPaned*>(gobject_); }
304 //C++ methods used to invoke GTK+ virtual functions:
307 //GTK+ Virtual Functions (override these to change behaviour):
309 //Default Signal Handlers::
321 * The Gtk::VPaned widget is a container widget with two children arranged
322 * horizontally. The division between the two panes is adjustable by the
323 * user by dragging a handle. See Gtk::Paned for details.
328 class VPaned : public Paned
331 #ifndef DOXYGEN_SHOULD_SKIP_THIS
332 typedef VPaned CppObjectType;
333 typedef VPaned_Class CppClassType;
334 typedef GtkVPaned BaseObjectType;
335 typedef GtkVPanedClass BaseClassType;
336 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
340 #ifndef DOXYGEN_SHOULD_SKIP_THIS
343 friend class VPaned_Class;
344 static CppClassType vpaned_class_;
347 VPaned(const VPaned&);
348 VPaned& operator=(const VPaned&);
351 explicit VPaned(const Glib::ConstructParams& construct_params);
352 explicit VPaned(GtkVPaned* castitem);
354 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
357 #ifndef DOXYGEN_SHOULD_SKIP_THIS
358 static GType get_type() G_GNUC_CONST;
359 static GType get_base_type() G_GNUC_CONST;
362 ///Provides access to the underlying C GtkObject.
363 GtkVPaned* gobj() { return reinterpret_cast<GtkVPaned*>(gobject_); }
365 ///Provides access to the underlying C GtkObject.
366 const GtkVPaned* gobj() const { return reinterpret_cast<GtkVPaned*>(gobject_); }
370 //C++ methods used to invoke GTK+ virtual functions:
373 //GTK+ Virtual Functions (override these to change behaviour):
375 //Default Signal Handlers::
391 /** @relates Gtk::Paned
392 * @param object The C instance
393 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
394 * @result A C++ instance that wraps this C instance.
396 Gtk::Paned* wrap(GtkPaned* object, bool take_copy = false);
400 /** @relates Gtk::HPaned
401 * @param object The C instance
402 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
403 * @result A C++ instance that wraps this C instance.
405 Gtk::HPaned* wrap(GtkHPaned* object, bool take_copy = false);
409 /** @relates Gtk::VPaned
410 * @param object The C instance
411 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
412 * @result A C++ instance that wraps this C instance.
414 Gtk::VPaned* wrap(GtkVPaned* object, bool take_copy = false);
416 #endif /* _GTKMM_PANED_H */