Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / paned.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_PANED_H
4 #define _GTKMM_PANED_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10
11 /* paned.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 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.
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  * Library General Public License for more details.
24  *
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.
28  */
29
30 #include <gtkmm/container.h>
31 #include <gtkmm/enums.h>
32
33
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GtkPaned GtkPaned;
36 typedef struct _GtkPanedClass GtkPanedClass;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38
39
40 namespace Gtk
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 */
46
47
48 namespace Gtk
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 */
54
55
56 namespace Gtk
57 { class VPaned_Class; } // namespace Gtk
58 namespace Gtk
59 {
60
61 /** This is the base class for widgets with two panes, arranged either
62  * horizontally (Gtk::HPaned) or vertically (Gtk::VPaned).
63  *
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.
67  *
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.
73  *
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.
80  *
81  * The application can set the position of the slider as if it were set by the
82  * user, by calling set_position().
83  *
84  * @ingroup Widgets
85  * @ingroup Containers
86  */
87
88 class Paned : public Container
89 {
90   public:
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 */
97
98   virtual ~Paned();
99
100 #ifndef DOXYGEN_SHOULD_SKIP_THIS
101
102 private:
103   friend class Paned_Class;
104   static CppClassType paned_class_;
105
106   // noncopyable
107   Paned(const Paned&);
108   Paned& operator=(const Paned&);
109
110 protected:
111   explicit Paned(const Glib::ConstructParams& construct_params);
112   explicit Paned(GtkPaned* castitem);
113
114 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
115
116 public:
117 #ifndef DOXYGEN_SHOULD_SKIP_THIS
118   static GType get_type()      G_GNUC_CONST;
119   static GType get_base_type() G_GNUC_CONST;
120 #endif
121
122   ///Provides access to the underlying C GtkObject.
123   GtkPaned*       gobj()       { return reinterpret_cast<GtkPaned*>(gobject_); }
124
125   ///Provides access to the underlying C GtkObject.
126   const GtkPaned* gobj() const { return reinterpret_cast<GtkPaned*>(gobject_); }
127
128
129 public:
130   //C++ methods used to invoke GTK+ virtual functions:
131
132 protected:
133   //GTK+ Virtual Functions (override these to change behaviour):
134
135   //Default Signal Handlers::
136
137
138 private:
139
140   
141 public:
142   Paned();
143
144   
145   void add1(Widget& child);
146   
147   void add2(Widget& child);
148
149   
150   void pack1(Widget& child, bool resize, bool shrink);
151   void pack1(Widget& child, AttachOptions options = Gtk::EXPAND);
152
153   
154   void pack2(Widget& child, bool resize, bool shrink);
155   void pack2(Widget& child, AttachOptions options  = Gtk::EXPAND);
156
157   
158   /** Obtains the position of the divider between the two panes.
159    * @return Position of the divider.
160    */
161   int get_position() const;
162   
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
165    * is unset.
166    */
167   void set_position(int position);
168
169   
170   /** Obtains the first child of the paned widget.
171    * @return First child, or <tt>0</tt> if it is not set.
172    * 
173    * Since: 2.4.
174    */
175   Widget* get_child1();
176   
177   /** Obtains the first child of the paned widget.
178    * @return First child, or <tt>0</tt> if it is not set.
179    * 
180    * Since: 2.4.
181    */
182   const Widget* get_child1() const;
183
184   
185   /** Obtains the second child of the paned widget.
186    * @return Second child, or <tt>0</tt> if it is not set.
187    * 
188    * Since: 2.4.
189    */
190   Widget* get_child2();
191   
192   /** Obtains the second child of the paned widget.
193    * @return Second child, or <tt>0</tt> if it is not set.
194    * 
195    * Since: 2.4.
196    */
197   const Widget* get_child2() const;
198  
199   //Keybinding signals:
200   
201   
202   /** Position of paned separator in pixels (0 means all the way to the left/top).
203    *
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.
207    */
208   Glib::PropertyProxy<int> property_position() ;
209
210 /** Position of paned separator in pixels (0 means all the way to the left/top).
211    *
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.
215    */
216   Glib::PropertyProxy_ReadOnly<int> property_position() const;
217
218   /** TRUE if the Position property should be used.
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<bool> property_position_set() ;
225
226 /** TRUE if the Position property should be used.
227    *
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.
231    */
232   Glib::PropertyProxy_ReadOnly<bool> property_position_set() const;
233
234   /** Smallest possible value for the position property.
235    *
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.
239    */
240   Glib::PropertyProxy_ReadOnly<int> property_min_position() const;
241
242
243   /** Largest possible value for the position property.
244    *
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.
248    */
249   Glib::PropertyProxy_ReadOnly<int> property_max_position() const;
250
251
252 };
253
254 /**
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. 
258  *
259  * @ingroup Widgets
260  */
261
262 class HPaned : public Paned
263 {
264   public:
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 */
271
272   virtual ~HPaned();
273
274 #ifndef DOXYGEN_SHOULD_SKIP_THIS
275
276 private:
277   friend class HPaned_Class;
278   static CppClassType hpaned_class_;
279
280   // noncopyable
281   HPaned(const HPaned&);
282   HPaned& operator=(const HPaned&);
283
284 protected:
285   explicit HPaned(const Glib::ConstructParams& construct_params);
286   explicit HPaned(GtkHPaned* castitem);
287
288 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
289
290 public:
291 #ifndef DOXYGEN_SHOULD_SKIP_THIS
292   static GType get_type()      G_GNUC_CONST;
293   static GType get_base_type() G_GNUC_CONST;
294 #endif
295
296   ///Provides access to the underlying C GtkObject.
297   GtkHPaned*       gobj()       { return reinterpret_cast<GtkHPaned*>(gobject_); }
298
299   ///Provides access to the underlying C GtkObject.
300   const GtkHPaned* gobj() const { return reinterpret_cast<GtkHPaned*>(gobject_); }
301
302
303 public:
304   //C++ methods used to invoke GTK+ virtual functions:
305
306 protected:
307   //GTK+ Virtual Functions (override these to change behaviour):
308
309   //Default Signal Handlers::
310
311
312 private:
313
314 public:
315   HPaned();
316
317
318 };
319
320 /**
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. 
324  *
325  * @ingroup Widgets
326  */
327
328 class VPaned : public Paned
329 {
330   public:
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 */
337
338   virtual ~VPaned();
339
340 #ifndef DOXYGEN_SHOULD_SKIP_THIS
341
342 private:
343   friend class VPaned_Class;
344   static CppClassType vpaned_class_;
345
346   // noncopyable
347   VPaned(const VPaned&);
348   VPaned& operator=(const VPaned&);
349
350 protected:
351   explicit VPaned(const Glib::ConstructParams& construct_params);
352   explicit VPaned(GtkVPaned* castitem);
353
354 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
355
356 public:
357 #ifndef DOXYGEN_SHOULD_SKIP_THIS
358   static GType get_type()      G_GNUC_CONST;
359   static GType get_base_type() G_GNUC_CONST;
360 #endif
361
362   ///Provides access to the underlying C GtkObject.
363   GtkVPaned*       gobj()       { return reinterpret_cast<GtkVPaned*>(gobject_); }
364
365   ///Provides access to the underlying C GtkObject.
366   const GtkVPaned* gobj() const { return reinterpret_cast<GtkVPaned*>(gobject_); }
367
368
369 public:
370   //C++ methods used to invoke GTK+ virtual functions:
371
372 protected:
373   //GTK+ Virtual Functions (override these to change behaviour):
374
375   //Default Signal Handlers::
376
377
378 private:
379
380 public:
381   VPaned();
382
383
384 };
385
386 } // namespace Gtk
387
388
389 namespace Glib
390 {
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.
395    */
396   Gtk::Paned* wrap(GtkPaned* object, bool take_copy = false);
397 }
398 namespace Glib
399 {
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.
404    */
405   Gtk::HPaned* wrap(GtkHPaned* object, bool take_copy = false);
406 }
407 namespace Glib
408 {
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.
413    */
414   Gtk::VPaned* wrap(GtkVPaned* object, bool take_copy = false);
415 }
416 #endif /* _GTKMM_PANED_H */
417