// -*- c++ -*-
/* $Id: buttonbox.ccg,v 1.1 2003/01/21 13:38:43 murrayc Exp $ */

/*
 *
 * Copyright 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., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gtk/gtk.h>

namespace Gtk
{

VButtonBox::VButtonBox(ButtonBoxStyle layout, int spacing)
:
  _CONSTRUCT_SPECIFIC(ButtonBox, VButtonBox)
{
  set_layout(layout);
  set_spacing(spacing);
}

HButtonBox::HButtonBox(ButtonBoxStyle layout, int spacing)
:
  _CONSTRUCT_SPECIFIC(ButtonBox, HButtonBox)
{
  set_layout(layout);
  set_spacing(spacing);
}


int ButtonBox::get_child_min_width() const
{
  int result = 0;
  gtk_widget_style_get(const_cast<GtkWidget*>(GTK_WIDGET(gobj())), "child-min-width", &result, (void*)0);
  return result;
}

void ButtonBox::set_child_min_width(const int& value)
{
  //TODO: Find a way to set style properties in code, though this is deprecated anyway:
  gobj()->child_min_width = value;
}

int ButtonBox::get_child_min_height() const
{
  int result = 0;
  gtk_widget_style_get(const_cast<GtkWidget*>(GTK_WIDGET(gobj())), "child-min-width", &result, (void*)0);
  return result;
}

void ButtonBox::set_child_min_height(const int& value)
{
  //TODO: Find a way to set style properties in code, though this is deprecated anyway:
  gobj()->child_min_height = value;
}

int ButtonBox::get_child_ipadding_x() const
{
  int result = 0;
  gtk_widget_style_get(const_cast<GtkWidget*>(GTK_WIDGET(gobj())), "child-internal-padding-x", &result, (void*)0);
  return result;
}

void ButtonBox::set_child_ipadding_x(const int& value)
{
  //TODO: Find a way to set style properties in code, though this is deprecated anyway:
  gobj()->child_ipad_x = value;
}

int ButtonBox::get_child_ipadding_y() const
{
  int result = 0;
  gtk_widget_style_get(const_cast<GtkWidget*>(GTK_WIDGET(gobj())), "child-internal-padding-y", &result, (void*)0);
  return result;
}

void ButtonBox::set_child_ipadding_y(const int& value)
{
  //TODO: Find a way to set style properties in code, though this is deprecated anyway:
  gobj()->child_ipad_y = value;
}

} // namespace Gtk
