/* $Id: buttonbox.hg,v 1.3 2003/10/12 09:38:11 murrayc Exp $ */

/* buttonbox.h
 *
 * 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)
  _IMPLEMENTS_INTERFACE(Orientable)
  _IGNORE(gtk_button_box_set_spacing, gtk_button_box_get_spacing, gtk_button_box_set_child_size,
          gtk_button_box_set_child_ipadding, gtk_button_box_get_child_size, gtk_button_box_get_child_ipadding)
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)

  //TODO: Deprecate set_child_ipadding_y() and friends in gtkmm 2.4, and replace them with something in gtkmm 3?
  
  _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>
