add new sigc++2 directory
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / buttonbox.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_BUTTONBOX_H
4 #define _GTKMM_BUTTONBOX_H
5
6
7 #include <glibmm.h>
8
9 /* $Id$ */
10
11 /* buttonbox.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/box.h>
31
32
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkButtonBox GtkButtonBox;
35 typedef struct _GtkButtonBoxClass GtkButtonBoxClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
37
38
39 namespace Gtk
40 { class ButtonBox_Class; } // namespace Gtk
41 #ifndef DOXYGEN_SHOULD_SKIP_THIS
42 typedef struct _GtkVButtonBox GtkVButtonBox;
43 typedef struct _GtkVButtonBoxClass GtkVButtonBoxClass;
44 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
45
46
47 namespace Gtk
48 { class VButtonBox_Class; } // namespace Gtk
49 #ifndef DOXYGEN_SHOULD_SKIP_THIS
50 typedef struct _GtkHButtonBox GtkHButtonBox;
51 typedef struct _GtkHButtonBoxClass GtkHButtonBoxClass;
52 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
53
54
55 namespace Gtk
56 { class HButtonBox_Class; } // namespace Gtk
57 namespace Gtk
58 {
59
60 // This is a #define in GTK+, and unrelated to the GtkButtonBoxStyle enum.
61 /** @ingroup gtkmmEnums */
62 enum { BUTTONBOX_DEFAULT = -1 };
63
64
65 /** Base class for Gtk::HButtonBox and Gtk::VButtonBox
66  *
67  * A button box should be used to provide a consistent layout of buttons
68  * throughout your application.  There is one default layout and a default
69  * spacing value that are persistant across all ButtonBox widgets.
70  */
71
72 class ButtonBox : public Box
73 {
74   public:
75 #ifndef DOXYGEN_SHOULD_SKIP_THIS
76   typedef ButtonBox CppObjectType;
77   typedef ButtonBox_Class CppClassType;
78   typedef GtkButtonBox BaseObjectType;
79   typedef GtkButtonBoxClass BaseClassType;
80 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
81
82   virtual ~ButtonBox();
83
84 #ifndef DOXYGEN_SHOULD_SKIP_THIS
85
86 private:
87   friend class ButtonBox_Class;
88   static CppClassType buttonbox_class_;
89
90   // noncopyable
91   ButtonBox(const ButtonBox&);
92   ButtonBox& operator=(const ButtonBox&);
93
94 protected:
95   explicit ButtonBox(const Glib::ConstructParams& construct_params);
96   explicit ButtonBox(GtkButtonBox* castitem);
97
98 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
99
100 public:
101 #ifndef DOXYGEN_SHOULD_SKIP_THIS
102   static GType get_type()      G_GNUC_CONST;
103   static GType get_base_type() G_GNUC_CONST;
104 #endif
105
106   ///Provides access to the underlying C GtkObject.
107   GtkButtonBox*       gobj()       { return reinterpret_cast<GtkButtonBox*>(gobject_); }
108
109   ///Provides access to the underlying C GtkObject.
110   const GtkButtonBox* gobj() const { return reinterpret_cast<GtkButtonBox*>(gobject_); }
111
112
113 public:
114   //C++ methods used to invoke GTK+ virtual functions:
115 #ifdef GLIBMM_VFUNCS_ENABLED
116 #endif //GLIBMM_VFUNCS_ENABLED
117
118 protected:
119   //GTK+ Virtual Functions (override these to change behaviour):
120 #ifdef GLIBMM_VFUNCS_ENABLED
121 #endif //GLIBMM_VFUNCS_ENABLED
122
123   //Default Signal Handlers::
124 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
125 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
126
127
128 private:
129
130   
131 public:
132   
133   ButtonBoxStyle get_layout() const;
134   
135   void set_layout(ButtonBoxStyle layout_style);
136   
137   
138   /** Sets whether @a child  should appear in a secondary group of children.
139    * A typical use of a secondary child is the help button in a dialog.
140    * 
141    * This group appears after the other children if the style
142    * is Gtk::BUTTONBOX_START, Gtk::BUTTONBOX_SPREAD or
143    * Gtk::BUTTONBOX_EDGE, and before the other children if the style
144    * is Gtk::BUTTONBOX_END. For horizontal button boxes, the definition
145    * of before/after depends on direction of the widget (see
146    * Gtk::Widget::set_direction()). If the style is Gtk::BUTTONBOX_START
147    * or Gtk::BUTTONBOX_END, then the secondary children are aligned at
148    * the other end of the button box from the main children. For the
149    * other styles, they appear immediately next to the main children.
150    * @param child A child of @a widget .
151    * @param is_secondary If <tt>true</tt>, the @a child  appears in a secondary group of the
152    * button box.
153    */
154   void set_child_secondary(Widget& child, bool is_secondary = true);
155   
156   /** Return value: whether @a child  should appear in a secondary group of children.
157    * @param child A child of @a widget .
158    * @return Whether @a child  should appear in a secondary group of children.
159    * 
160    * @newin2p4.
161    */
162   bool get_child_secondary(const Gtk::Widget& child) const;
163
164    int get_child_min_width() const;
165     void set_child_min_width(const int& value);
166  
167    int get_child_min_height() const;
168     void set_child_min_height(const int& value);
169  
170    int get_child_ipadding_x() const;
171     void set_child_ipadding_x(const int& value);
172  
173    int get_child_ipadding_y() const;
174     void set_child_ipadding_y(const int& value);
175  
176   #ifdef GLIBMM_PROPERTIES_ENABLED
177 /** How to layout the buttons in the box. Possible values are default
178    *
179    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
180    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
181    * the value of the property changes.
182    */
183   Glib::PropertyProxy<ButtonBoxStyle> property_layout_style() ;
184 #endif //#GLIBMM_PROPERTIES_ENABLED
185
186 #ifdef GLIBMM_PROPERTIES_ENABLED
187 /** How to layout the buttons in the box. Possible values are default
188    *
189    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
190    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
191    * the value of the property changes.
192    */
193   Glib::PropertyProxy_ReadOnly<ButtonBoxStyle> property_layout_style() const;
194 #endif //#GLIBMM_PROPERTIES_ENABLED
195
196
197 };
198
199 /** A container for arranging buttons vertically.
200  *
201  * A button box should be used to provide a consistent layout of buttons
202  * throughout your application. There is one default layout and a default spacing
203  * value that are persistant across all Gtk::VButtonBox widgets. 
204  *
205  * The layout/spacing can then be altered by the programmer, or if desired,
206  * by the user to alter the 'feel' of a program to a small degree. 
207  *
208  * @ingroup Widgets
209  * @ingroup Containers
210  */
211
212 class VButtonBox : public ButtonBox
213 {
214   public:
215 #ifndef DOXYGEN_SHOULD_SKIP_THIS
216   typedef VButtonBox CppObjectType;
217   typedef VButtonBox_Class CppClassType;
218   typedef GtkVButtonBox BaseObjectType;
219   typedef GtkVButtonBoxClass BaseClassType;
220 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
221
222   virtual ~VButtonBox();
223
224 #ifndef DOXYGEN_SHOULD_SKIP_THIS
225
226 private:
227   friend class VButtonBox_Class;
228   static CppClassType vbuttonbox_class_;
229
230   // noncopyable
231   VButtonBox(const VButtonBox&);
232   VButtonBox& operator=(const VButtonBox&);
233
234 protected:
235   explicit VButtonBox(const Glib::ConstructParams& construct_params);
236   explicit VButtonBox(GtkVButtonBox* castitem);
237
238 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
239
240 public:
241 #ifndef DOXYGEN_SHOULD_SKIP_THIS
242   static GType get_type()      G_GNUC_CONST;
243   static GType get_base_type() G_GNUC_CONST;
244 #endif
245
246   ///Provides access to the underlying C GtkObject.
247   GtkVButtonBox*       gobj()       { return reinterpret_cast<GtkVButtonBox*>(gobject_); }
248
249   ///Provides access to the underlying C GtkObject.
250   const GtkVButtonBox* gobj() const { return reinterpret_cast<GtkVButtonBox*>(gobject_); }
251
252
253 public:
254   //C++ methods used to invoke GTK+ virtual functions:
255 #ifdef GLIBMM_VFUNCS_ENABLED
256 #endif //GLIBMM_VFUNCS_ENABLED
257
258 protected:
259   //GTK+ Virtual Functions (override these to change behaviour):
260 #ifdef GLIBMM_VFUNCS_ENABLED
261 #endif //GLIBMM_VFUNCS_ENABLED
262
263   //Default Signal Handlers::
264 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
265 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
266
267
268 private:
269
270 public:
271   explicit VButtonBox(ButtonBoxStyle layout = BUTTONBOX_DEFAULT_STYLE, int spacing = BUTTONBOX_DEFAULT);
272
273
274 };
275
276 /** A container for arranging buttons horizontally.
277  *
278  * A button box should be used to provide a consistent layout of buttons
279  * throughout your application. There is one default layout and a default spacing
280  * value that are persistant across all Gtk::HButtonBox widgets. 
281  *
282  * The layout/spacing can then be altered by the programmer, or if desired,
283  * by the user to alter the 'feel' of a program to a small degree. 
284  *
285  * @ingroup Widgets
286  * @ingroup Containers
287  */
288
289 class HButtonBox : public ButtonBox
290 {
291   public:
292 #ifndef DOXYGEN_SHOULD_SKIP_THIS
293   typedef HButtonBox CppObjectType;
294   typedef HButtonBox_Class CppClassType;
295   typedef GtkHButtonBox BaseObjectType;
296   typedef GtkHButtonBoxClass BaseClassType;
297 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
298
299   virtual ~HButtonBox();
300
301 #ifndef DOXYGEN_SHOULD_SKIP_THIS
302
303 private:
304   friend class HButtonBox_Class;
305   static CppClassType hbuttonbox_class_;
306
307   // noncopyable
308   HButtonBox(const HButtonBox&);
309   HButtonBox& operator=(const HButtonBox&);
310
311 protected:
312   explicit HButtonBox(const Glib::ConstructParams& construct_params);
313   explicit HButtonBox(GtkHButtonBox* castitem);
314
315 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
316
317 public:
318 #ifndef DOXYGEN_SHOULD_SKIP_THIS
319   static GType get_type()      G_GNUC_CONST;
320   static GType get_base_type() G_GNUC_CONST;
321 #endif
322
323   ///Provides access to the underlying C GtkObject.
324   GtkHButtonBox*       gobj()       { return reinterpret_cast<GtkHButtonBox*>(gobject_); }
325
326   ///Provides access to the underlying C GtkObject.
327   const GtkHButtonBox* gobj() const { return reinterpret_cast<GtkHButtonBox*>(gobject_); }
328
329
330 public:
331   //C++ methods used to invoke GTK+ virtual functions:
332 #ifdef GLIBMM_VFUNCS_ENABLED
333 #endif //GLIBMM_VFUNCS_ENABLED
334
335 protected:
336   //GTK+ Virtual Functions (override these to change behaviour):
337 #ifdef GLIBMM_VFUNCS_ENABLED
338 #endif //GLIBMM_VFUNCS_ENABLED
339
340   //Default Signal Handlers::
341 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
342 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
343
344
345 private:
346
347 public:
348   explicit HButtonBox(ButtonBoxStyle layout = BUTTONBOX_DEFAULT_STYLE, int spacing = BUTTONBOX_DEFAULT);
349
350
351 };
352
353 } // namespace Gtk
354
355
356 namespace Glib
357 {
358   /** A Glib::wrap() method for this object.
359    * 
360    * @param object The C instance.
361    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
362    * @result A C++ instance that wraps this C instance.
363    *
364    * @relates Gtk::ButtonBox
365    */
366   Gtk::ButtonBox* wrap(GtkButtonBox* object, bool take_copy = false);
367 } //namespace Glib
368
369
370 namespace Glib
371 {
372   /** A Glib::wrap() method for this object.
373    * 
374    * @param object The C instance.
375    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
376    * @result A C++ instance that wraps this C instance.
377    *
378    * @relates Gtk::VButtonBox
379    */
380   Gtk::VButtonBox* wrap(GtkVButtonBox* object, bool take_copy = false);
381 } //namespace Glib
382
383
384 namespace Glib
385 {
386   /** A Glib::wrap() method for this object.
387    * 
388    * @param object The C instance.
389    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
390    * @result A C++ instance that wraps this C instance.
391    *
392    * @relates Gtk::HButtonBox
393    */
394   Gtk::HButtonBox* wrap(GtkHButtonBox* object, bool take_copy = false);
395 } //namespace Glib
396
397
398 #endif /* _GTKMM_BUTTONBOX_H */
399