]> Pileus Git - ~andy/gtk/blob - gtk/gtkvbbox.c
Modify the gettext translation domain for the gtk3 rename
[~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  * SECTION:gtkvbbox
35  * @Short_description: A container for arranging buttons vertically
36  * @Title: GtkVButtonBox
37  * @See_also: #GtkBox, #GtkButtonBox, #GtkHButtonBox
38  *
39  * A button box should be used to provide a consistent layout of buttons
40  * throughout your application. The layout/spacing can be altered by the
41  * programmer, or if desired, by the user to alter the 'feel' of a
42  * program to a small degree.
43  *
44  * A #GtkVButtonBox is created with gtk_vbutton_box_new(). Buttons are
45  * packed into a button box the same way widgets are added to any other
46  * container, using gtk_container_add(). You can also use
47  * gtk_box_pack_start() or gtk_box_pack_end(), but for button boxes both
48  * these functions work just like gtk_container_add(), ie., they pack the
49  * button in a way that depends on the current layout style and on
50  * whether the button has had gtk_button_box_set_child_secondary() called
51  * on it.
52  *
53  * The spacing between buttons can be set with gtk_box_set_spacing(). The
54  * arrangement and layout of the buttons can be changed with
55  * gtk_button_box_set_layout().
56  */
57
58 static GtkButtonBoxStyle default_layout_style = GTK_BUTTONBOX_EDGE;
59
60 G_DEFINE_TYPE (GtkVButtonBox, gtk_vbutton_box, GTK_TYPE_BUTTON_BOX)
61
62 static void
63 gtk_vbutton_box_class_init (GtkVButtonBoxClass *class)
64 {
65 }
66
67 static void
68 gtk_vbutton_box_init (GtkVButtonBox *vbutton_box)
69 {
70   gtk_orientable_set_orientation (GTK_ORIENTABLE (vbutton_box),
71                                   GTK_ORIENTATION_VERTICAL);
72 }
73
74 /**
75  * gtk_vbutton_box_new:
76  *
77  * Creates a new vertical button box.
78  *
79  * Returns: a new button box #GtkWidget.
80  */
81 GtkWidget *
82 gtk_vbutton_box_new (void)
83 {
84   return g_object_new (GTK_TYPE_VBUTTON_BOX, NULL);
85 }
86
87
88 GtkButtonBoxStyle
89 _gtk_vbutton_box_get_layout_default (void)
90 {
91   return default_layout_style;
92 }
93
94
95 #define __GTK_VBBOX_C__
96 #include "gtkaliasdef.c"