1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
29 #include "gtkorientable.h"
34 static gint default_spacing = 10;
35 static GtkButtonBoxStyle default_layout_style = GTK_BUTTONBOX_EDGE;
37 G_DEFINE_TYPE (GtkVButtonBox, gtk_vbutton_box, GTK_TYPE_BUTTON_BOX)
40 gtk_vbutton_box_class_init (GtkVButtonBoxClass *class)
45 gtk_vbutton_box_init (GtkVButtonBox *vbutton_box)
47 gtk_orientable_set_orientation (GTK_ORIENTABLE (vbutton_box),
48 GTK_ORIENTATION_VERTICAL);
52 gtk_vbutton_box_new (void)
54 return g_object_new (GTK_TYPE_VBUTTON_BOX, NULL);
59 /* set default value for spacing */
62 gtk_vbutton_box_set_spacing_default (gint spacing)
64 default_spacing = spacing;
68 /* set default value for layout style */
71 gtk_vbutton_box_set_layout_default (GtkButtonBoxStyle layout)
73 g_return_if_fail (layout >= GTK_BUTTONBOX_DEFAULT_STYLE &&
74 layout <= GTK_BUTTONBOX_CENTER);
76 default_layout_style = layout;
79 /* get default value for spacing */
82 gtk_vbutton_box_get_spacing_default (void)
84 return default_spacing;
89 /* get default value for layout style */
92 gtk_vbutton_box_get_layout_default (void)
94 return default_layout_style;
98 _gtk_vbutton_box_get_layout_default (void)
100 return default_layout_style;
104 #define __GTK_VBBOX_C__
105 #include "gtkaliasdef.c"