]> Pileus Git - ~andy/gtk/blob - gtk/gtkvbbox.c
Updated Slovenian translation
[~andy/gtk] / gtk / gtkvbbox.c
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
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.
8  *
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.
13  *
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.
18  */
19
20 /*
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/.
25  */
26
27 #include "config.h"
28 #include "gtkvbbox.h"
29 #include "gtkorientable.h"
30 #include "gtkintl.h"
31 #include "gtkalias.h"
32
33
34 static gint default_spacing = 10;
35 static GtkButtonBoxStyle default_layout_style = GTK_BUTTONBOX_EDGE;
36
37 G_DEFINE_TYPE (GtkVButtonBox, gtk_vbutton_box, GTK_TYPE_BUTTON_BOX)
38
39 static void
40 gtk_vbutton_box_class_init (GtkVButtonBoxClass *class)
41 {
42 }
43
44 static void
45 gtk_vbutton_box_init (GtkVButtonBox *vbutton_box)
46 {
47   gtk_orientable_set_orientation (GTK_ORIENTABLE (vbutton_box),
48                                   GTK_ORIENTATION_VERTICAL);
49 }
50
51 GtkWidget *
52 gtk_vbutton_box_new (void)
53 {
54   return g_object_new (GTK_TYPE_VBUTTON_BOX, NULL);
55 }
56
57
58
59 /* set default value for spacing */
60
61 void
62 gtk_vbutton_box_set_spacing_default (gint spacing)
63 {
64   default_spacing = spacing;
65 }
66
67
68 /* set default value for layout style */
69
70 void
71 gtk_vbutton_box_set_layout_default (GtkButtonBoxStyle layout)
72 {
73   g_return_if_fail (layout >= GTK_BUTTONBOX_DEFAULT_STYLE &&
74                     layout <= GTK_BUTTONBOX_CENTER);
75
76   default_layout_style = layout;
77 }
78
79 /* get default value for spacing */
80
81 gint
82 gtk_vbutton_box_get_spacing_default (void)
83 {
84   return default_spacing;
85 }
86
87
88
89 /* get default value for layout style */
90
91 GtkButtonBoxStyle
92 gtk_vbutton_box_get_layout_default (void)
93 {
94   return default_layout_style;
95 }
96
97 GtkButtonBoxStyle
98 _gtk_vbutton_box_get_layout_default (void)
99 {
100   return default_layout_style;
101 }
102
103
104 #define __GTK_VBBOX_C__
105 #include "gtkaliasdef.c"