1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
/*
* Copyright (C) 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <gtkmm/box.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/box_p.h)
namespace Gtk
{
// This is a #define in GTK+, and unrelated to the GtkButtonBoxStyle enum.
/** @ingroup gtkmmEnums */
enum { BUTTONBOX_DEFAULT_SPACING = -1 };
/** A container for arranging buttons.
*
* A button box should be used to provide a consistent layout of buttons
* throughout your application. The layout/spacing can be altered by the
* programmer, or if desired, by the user to alter the 'feel' of a
* program to a small degree.
*
* get_layout() et_layout() retrieve and
* alter the method used to spread the buttons in a button box across the
* container, respectively.
*
* The main purpose of ButtonBox is to make sure the children have all the
* same size. ButtonBox gives all children the same size, but it does allow
* 'outliers' to keep their own larger size. To force all children to be
* strictly the same size without exceptions, you can set the
* homogeneous property to true.
*
* To excempt individual children from homogeneous sizing regardless of their
* 'outlier' status, you can set the non-homogeneous child
* property.
*/
class ButtonBox
: public Box
{
_CLASS_GTKOBJECT(ButtonBox,GtkButtonBox,GTK_BUTTON_BOX,Gtk::Box,GtkBox)
public:
//Note that we try to use the same defaul parameter value as the default property value.
_WRAP_CTOR(ButtonBox(Orientation orientation = ORIENTATION_HORIZONTAL), gtk_button_box_new)
_WRAP_METHOD(ButtonBoxStyle get_layout() const, gtk_button_box_get_layout)
_WRAP_METHOD(void set_layout(ButtonBoxStyle layout_style), gtk_button_box_set_layout)
_WRAP_METHOD(void set_child_secondary(Widget& child, bool is_secondary = true), gtk_button_box_set_child_secondary)
_WRAP_METHOD(bool get_child_secondary(const Gtk::Widget& child) const, gtk_button_box_get_child_secondary)
_WRAP_METHOD(bool get_child_non_homogeneous(const Gtk::Widget& child) const, gtk_button_box_get_child_non_homogeneous )
_WRAP_METHOD(void set_child_non_homogeneous(Gtk::Widget& child, bool non_homogeneous = true), gtk_button_box_set_child_non_homogeneous)
_WRAP_PROPERTY("layout-style", ButtonBoxStyle)
};
} // namespace Gtk
//Include the deprecated header,
//whose classes were previously in this header,
//to preserve the "API" of the includes.
#include <gtkmm/hvbuttonbox.h>
|