/* 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, see . */ #include _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 GTKMM_API ButtonBox : public Box { _CLASS_GTKOBJECT(ButtonBox,GtkButtonBox,GTK_BUTTON_BOX,Gtk::Box,GtkBox,,,GTKMM_API) 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 #ifndef GTKMM_DISABLE_DEPRECATED //Include the deprecated header, //whose classes were previously in this header, //to preserve the "API" of the includes. #include #endif // GTKMM_DISABLE_DEPRECATED