1// -*- c++ -*-
2/* $Id: buttonbox.ccg,v 1.1 2003/01/21 13:38:43 murrayc Exp $ */
3
4/*
5 *
6 * Copyright 1998-2002 The gtkmm Development Team
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free
20 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23#include <gtk/gtk.h>
24
25namespace Gtk
26{
27
28VButtonBox::VButtonBox(ButtonBoxStyle layout, int spacing)
29:
30  _CONSTRUCT_SPECIFIC(ButtonBox, VButtonBox)
31{
32  set_layout(layout);
33  set_spacing(spacing);
34}
35
36HButtonBox::HButtonBox(ButtonBoxStyle layout, int spacing)
37:
38  _CONSTRUCT_SPECIFIC(ButtonBox, HButtonBox)
39{
40  set_layout(layout);
41  set_spacing(spacing);
42}
43
44
45int ButtonBox::get_child_min_width() const
46{
47  int result = 0;
48  gtk_widget_style_get(const_cast<GtkWidget*>(GTK_WIDGET(gobj())), "child-min-width", &result, (void*)0);
49  return result;
50}
51
52void ButtonBox::set_child_min_width(const int& value)
53{
54  //TODO: Find a way to set style properties in code, though this is deprecated anyway:
55  gobj()->child_min_width = value;
56}
57
58int ButtonBox::get_child_min_height() const
59{
60  int result = 0;
61  gtk_widget_style_get(const_cast<GtkWidget*>(GTK_WIDGET(gobj())), "child-min-width", &result, (void*)0);
62  return result;
63}
64
65void ButtonBox::set_child_min_height(const int& value)
66{
67  //TODO: Find a way to set style properties in code, though this is deprecated anyway:
68  gobj()->child_min_height = value;
69}
70
71int ButtonBox::get_child_ipadding_x() const
72{
73  int result = 0;
74  gtk_widget_style_get(const_cast<GtkWidget*>(GTK_WIDGET(gobj())), "child-internal-padding-x", &result, (void*)0);
75  return result;
76}
77
78void ButtonBox::set_child_ipadding_x(const int& value)
79{
80  //TODO: Find a way to set style properties in code, though this is deprecated anyway:
81  gobj()->child_ipad_x = value;
82}
83
84int ButtonBox::get_child_ipadding_y() const
85{
86  int result = 0;
87  gtk_widget_style_get(const_cast<GtkWidget*>(GTK_WIDGET(gobj())), "child-internal-padding-y", &result, (void*)0);
88  return result;
89}
90
91void ButtonBox::set_child_ipadding_y(const int& value)
92{
93  //TODO: Find a way to set style properties in code, though this is deprecated anyway:
94  gobj()->child_ipad_y = value;
95}
96
97} // namespace Gtk
98