Install ardour as a binary, a script and a set of shared
[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 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* buttonbox.h
11  * 
12  * Copyright (C) 1998-2002 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Library General Public
16  * License as published by the Free Software Foundation; either
17  * version 2 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22  * Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU Library General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28
29 #include <gtkmm/box.h>
30
31
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GtkButtonBox GtkButtonBox;
34 typedef struct _GtkButtonBoxClass GtkButtonBoxClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36
37
38 namespace Gtk
39 { class ButtonBox_Class; } // namespace Gtk
40 #ifndef DOXYGEN_SHOULD_SKIP_THIS
41 typedef struct _GtkVButtonBox GtkVButtonBox;
42 typedef struct _GtkVButtonBoxClass GtkVButtonBoxClass;
43 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
44
45
46 namespace Gtk
47 { class VButtonBox_Class; } // namespace Gtk
48 #ifndef DOXYGEN_SHOULD_SKIP_THIS
49 typedef struct _GtkHButtonBox GtkHButtonBox;
50 typedef struct _GtkHButtonBoxClass GtkHButtonBoxClass;
51 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
52
53
54 namespace Gtk
55 { class HButtonBox_Class; } // namespace Gtk
56 namespace Gtk
57 {
58
59 // This is a #define in GTK+, and unrelated to the GtkButtonBoxStyle enum.
60 /** @ingroup gtkmmEnums */
61 enum { BUTTONBOX_DEFAULT = -1 };
62
63
64 /** Base class for Gtk::HButtonBox and Gtk::VButtonBox
65  *
66  * A button box should be used to provide a consistent layout of buttons
67  * throughout your application.  There is one default layout and a default
68  * spacing value that are persistant across all ButtonBox widgets.
69  */
70
71 class ButtonBox : public Box
72 {
73   public:
74 #ifndef DOXYGEN_SHOULD_SKIP_THIS
75   typedef ButtonBox CppObjectType;
76   typedef ButtonBox_Class CppClassType;
77   typedef GtkButtonBox BaseObjectType;
78   typedef GtkButtonBoxClass BaseClassType;
79 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
80
81   virtual ~ButtonBox();
82
83 #ifndef DOXYGEN_SHOULD_SKIP_THIS
84
85 private:
86   friend class ButtonBox_Class;
87   static CppClassType buttonbox_class_;
88
89   // noncopyable
90   ButtonBox(const ButtonBox&);
91   ButtonBox& operator=(const ButtonBox&);
92
93 protected:
94   explicit ButtonBox(const Glib::ConstructParams& construct_params);
95   explicit ButtonBox(GtkButtonBox* castitem);
96
97 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
98
99 public:
100 #ifndef DOXYGEN_SHOULD_SKIP_THIS
101   static GType get_type()      G_GNUC_CONST;
102   static GType get_base_type() G_GNUC_CONST;
103 #endif
104
105   ///Provides access to the underlying C GtkObject.
106   GtkButtonBox*       gobj()       { return reinterpret_cast<GtkButtonBox*>(gobject_); }
107
108   ///Provides access to the underlying C GtkObject.
109   const GtkButtonBox* gobj() const { return reinterpret_cast<GtkButtonBox*>(gobject_); }
110
111
112 public:
113   //C++ methods used to invoke GTK+ virtual functions:
114
115 protected:
116   //GTK+ Virtual Functions (override these to change behaviour):
117
118   //Default Signal Handlers::
119
120
121 private:
122
123   
124 public:
125   
126   ButtonBoxStyle get_layout() const;
127   
128   void set_layout(ButtonBoxStyle layout_style);
129   
130   
131   /** Sets whether @a child  should appear in a secondary group of children.
132    * A typical use of a secondary child is the help button in a dialog.
133    * 
134    * This group appears after the other children if the style
135    * is Gtk::BUTTONBOX_START, Gtk::BUTTONBOX_SPREAD or
136    * Gtk::BUTTONBOX_EDGE, and before the the other children if the style
137    * is Gtk::BUTTONBOX_END. For horizontal button boxes, the definition
138    * of before/after depends on direction of the widget (see
139    * Gtk::Widget::set_direction()). If the style is Gtk::BUTTONBOX_START
140    * or Gtk::BUTTONBOX_END, then the secondary children are aligned at
141    * the other end of the button box from the main children. For the
142    * other styles, they appear immediately next to the main children.
143    * @param child A child of @a widget .
144    * @param is_secondary If <tt>true</tt>, the @a child  appears in a secondary group of the
145    * button box.
146    */
147   void set_child_secondary(Widget& child, bool is_secondary = true);
148   
149   /** Returns whether @a child  should appear in a secondary group of children.
150    * @param child A child of @a widget .
151    * @return Whether @a child  should appear in a secondary group of children.
152    * 
153    * Since: 2.4.
154    */
155   bool get_child_secondary(const Gtk::Widget& child) const;
156
157   int get_child_min_width() const;
158   void set_child_min_width(const int& value);
159
160   int get_child_min_height() const;
161   void set_child_min_height(const int& value);
162
163   int get_child_ipadding_x() const;
164   void set_child_ipadding_x(const int& value);
165
166   int get_child_ipadding_y() const;
167   void set_child_ipadding_y(const int& value);
168
169   /** How to layout the buttons in the box. Possible values are default
170    *
171    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
172    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
173    * the value of the property changes.
174    */
175   Glib::PropertyProxy<ButtonBoxStyle> property_layout_style() ;
176
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_ReadOnly<ButtonBoxStyle> property_layout_style() const;
184
185
186 };
187
188 /** A container for arranging buttons vertically.
189  *
190  * A button box should be used to provide a consistent layout of buttons
191  * throughout your application. There is one default layout and a default spacing
192  * value that are persistant across all Gtk::VButtonBox widgets. 
193  *
194  * The layout/spacing can then be altered by the programmer, or if desired,
195  * by the user to alter the 'feel' of a program to a small degree. 
196  *
197  * @ingroup Widgets
198  * @ingroup Containers
199  */
200
201 class VButtonBox : public ButtonBox
202 {
203   public:
204 #ifndef DOXYGEN_SHOULD_SKIP_THIS
205   typedef VButtonBox CppObjectType;
206   typedef VButtonBox_Class CppClassType;
207   typedef GtkVButtonBox BaseObjectType;
208   typedef GtkVButtonBoxClass BaseClassType;
209 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
210
211   virtual ~VButtonBox();
212
213 #ifndef DOXYGEN_SHOULD_SKIP_THIS
214
215 private:
216   friend class VButtonBox_Class;
217   static CppClassType vbuttonbox_class_;
218
219   // noncopyable
220   VButtonBox(const VButtonBox&);
221   VButtonBox& operator=(const VButtonBox&);
222
223 protected:
224   explicit VButtonBox(const Glib::ConstructParams& construct_params);
225   explicit VButtonBox(GtkVButtonBox* castitem);
226
227 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
228
229 public:
230 #ifndef DOXYGEN_SHOULD_SKIP_THIS
231   static GType get_type()      G_GNUC_CONST;
232   static GType get_base_type() G_GNUC_CONST;
233 #endif
234
235   ///Provides access to the underlying C GtkObject.
236   GtkVButtonBox*       gobj()       { return reinterpret_cast<GtkVButtonBox*>(gobject_); }
237
238   ///Provides access to the underlying C GtkObject.
239   const GtkVButtonBox* gobj() const { return reinterpret_cast<GtkVButtonBox*>(gobject_); }
240
241
242 public:
243   //C++ methods used to invoke GTK+ virtual functions:
244
245 protected:
246   //GTK+ Virtual Functions (override these to change behaviour):
247
248   //Default Signal Handlers::
249
250
251 private:
252
253 public:
254   explicit VButtonBox(ButtonBoxStyle layout = BUTTONBOX_DEFAULT_STYLE, int spacing = BUTTONBOX_DEFAULT);
255
256
257 };
258
259 /** A container for arranging buttons horizontally.
260  *
261  * A button box should be used to provide a consistent layout of buttons
262  * throughout your application. There is one default layout and a default spacing
263  * value that are persistant across all Gtk::HButtonBox widgets. 
264  *
265  * The layout/spacing can then be altered by the programmer, or if desired,
266  * by the user to alter the 'feel' of a program to a small degree. 
267  *
268  * @ingroup Widgets
269  * @ingroup Containers
270  */
271
272 class HButtonBox : public ButtonBox
273 {
274   public:
275 #ifndef DOXYGEN_SHOULD_SKIP_THIS
276   typedef HButtonBox CppObjectType;
277   typedef HButtonBox_Class CppClassType;
278   typedef GtkHButtonBox BaseObjectType;
279   typedef GtkHButtonBoxClass BaseClassType;
280 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
281
282   virtual ~HButtonBox();
283
284 #ifndef DOXYGEN_SHOULD_SKIP_THIS
285
286 private:
287   friend class HButtonBox_Class;
288   static CppClassType hbuttonbox_class_;
289
290   // noncopyable
291   HButtonBox(const HButtonBox&);
292   HButtonBox& operator=(const HButtonBox&);
293
294 protected:
295   explicit HButtonBox(const Glib::ConstructParams& construct_params);
296   explicit HButtonBox(GtkHButtonBox* castitem);
297
298 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
299
300 public:
301 #ifndef DOXYGEN_SHOULD_SKIP_THIS
302   static GType get_type()      G_GNUC_CONST;
303   static GType get_base_type() G_GNUC_CONST;
304 #endif
305
306   ///Provides access to the underlying C GtkObject.
307   GtkHButtonBox*       gobj()       { return reinterpret_cast<GtkHButtonBox*>(gobject_); }
308
309   ///Provides access to the underlying C GtkObject.
310   const GtkHButtonBox* gobj() const { return reinterpret_cast<GtkHButtonBox*>(gobject_); }
311
312
313 public:
314   //C++ methods used to invoke GTK+ virtual functions:
315
316 protected:
317   //GTK+ Virtual Functions (override these to change behaviour):
318
319   //Default Signal Handlers::
320
321
322 private:
323
324 public:
325   explicit HButtonBox(ButtonBoxStyle layout = BUTTONBOX_DEFAULT_STYLE, int spacing = BUTTONBOX_DEFAULT);
326
327
328 };
329
330 } // namespace Gtk
331
332
333 namespace Glib
334 {
335   /** @relates Gtk::ButtonBox
336    * @param object The C instance
337    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
338    * @result A C++ instance that wraps this C instance.
339    */
340   Gtk::ButtonBox* wrap(GtkButtonBox* object, bool take_copy = false);
341 }
342 namespace Glib
343 {
344   /** @relates Gtk::VButtonBox
345    * @param object The C instance
346    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
347    * @result A C++ instance that wraps this C instance.
348    */
349   Gtk::VButtonBox* wrap(GtkVButtonBox* object, bool take_copy = false);
350 }
351 namespace Glib
352 {
353   /** @relates Gtk::HButtonBox
354    * @param object The C instance
355    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
356    * @result A C++ instance that wraps this C instance.
357    */
358   Gtk::HButtonBox* wrap(GtkHButtonBox* object, bool take_copy = false);
359 }
360 #endif /* _GTKMM_BUTTONBOX_H */
361