/* $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 Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, 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 = -1 };


/** Base class for Gtk::HButtonBox and Gtk::VButtonBox
 *
 * A button box should be used to provide a consistent layout of buttons
 * throughout your application.  There is one default layout and a default
 * spacing value that are persistant across all ButtonBox widgets.
 */
class ButtonBox : public Box
{
  _CLASS_GTKOBJECT(ButtonBox,GtkButtonBox,GTK_BUTTON_BOX,Gtk::Box,GtkBox)
  _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:
  _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)

  _MEMBER_GET(child_min_width,child_min_width,int,int)
  _MEMBER_SET(child_min_width,child_min_width,int,int)

  _MEMBER_GET(child_min_height,child_min_height,int,int)
  _MEMBER_SET(child_min_height,child_min_height,int,int)

  _MEMBER_GET(child_ipadding_x,child_ipad_x,int,int)
  _MEMBER_SET(child_ipadding_x,child_ipad_x,int,int)

  _MEMBER_GET(child_ipadding_y,child_ipad_y,int,int)
  _MEMBER_SET(child_ipadding_y,child_ipad_y,int,int)

  _WRAP_PROPERTY("layout-style", ButtonBoxStyle)
};

/** A container for arranging buttons vertically.
 *
 * A button box should be used to provide a consistent layout of buttons
 * throughout your application. There is one default layout and a default spacing
 * value that are persistant across all Gtk::VButtonBox widgets. 
 *
 * The layout/spacing can then be altered by the programmer, or if desired,
 * by the user to alter the 'feel' of a program to a small degree. 
 *
 * @ingroup Widgets
 * @ingroup Containers
 */
class VButtonBox : public ButtonBox
{
  _CLASS_GTKOBJECT(VButtonBox,GtkVButtonBox,GTK_VBUTTON_BOX,Gtk::ButtonBox,GtkButtonBox)
public:
  explicit VButtonBox(ButtonBoxStyle layout = BUTTONBOX_DEFAULT_STYLE, int spacing = BUTTONBOX_DEFAULT);
};

/** A container for arranging buttons horizontally.
 *
 * A button box should be used to provide a consistent layout of buttons
 * throughout your application. There is one default layout and a default spacing
 * value that are persistant across all Gtk::HButtonBox widgets. 
 *
 * The layout/spacing can then be altered by the programmer, or if desired,
 * by the user to alter the 'feel' of a program to a small degree. 
 *
 * @ingroup Widgets
 * @ingroup Containers
 */
class HButtonBox : public ButtonBox
{
  _CLASS_GTKOBJECT(HButtonBox,GtkHButtonBox,GTK_HBUTTON_BOX,Gtk::ButtonBox,GtkButtonBox)
public:
  explicit HButtonBox(ButtonBoxStyle layout = BUTTONBOX_DEFAULT_STYLE, int spacing = BUTTONBOX_DEFAULT);
};

} // namespace Gtk

