]> Pileus Git - ~andy/gtk/blob - gtk/deprecated/gtkhbbox.c
entry: Use GtkSelectionWindow for touch text selection
[~andy/gtk] / gtk / deprecated / gtkhbbox.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, see <http://www.gnu.org/licenses/>.
16  */
17
18 /*
19  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
20  * file for a list of people on the GTK+ Team.  See the ChangeLog
21  * files for a list of changes.  These files are distributed with
22  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
23  */
24
25 #include "config.h"
26
27 #include "gtkhbbox.h"
28 #include "gtkorientable.h"
29 #include "gtkintl.h"
30
31
32 /**
33  * SECTION:gtkhbbox
34  * @Short_description: A container for arranging buttons horizontally
35  * @Title: GtkHButtonBox
36  * @See_also: #GtkBox, #GtkButtonBox, #GtkVButtonBox
37  *
38  * A button box should be used to provide a consistent layout of buttons
39  * throughout your application. The layout/spacing can be altered by the
40  * programmer, or if desired, by the user to alter the 'feel' of a
41  * program to a small degree.
42  *
43  * A #GtkHButtonBox is created with gtk_hbutton_box_new(). Buttons are
44  * packed into a button box the same way widgets are added to any other
45  * container, using gtk_container_add(). You can also use
46  * gtk_box_pack_start() or gtk_box_pack_end(), but for button boxes both
47  * these functions work just like gtk_container_add(), ie., they pack the
48  * button in a way that depends on the current layout style and on
49  * whether the button has had gtk_button_box_set_child_secondary() called
50  * on it.
51  *
52  * The spacing between buttons can be set with gtk_box_set_spacing(). The
53  * arrangement and layout of the buttons can be changed with
54  * gtk_button_box_set_layout().
55  *
56  * GtkHButtonBox has been deprecated, use #GtkButtonBox instead.
57  */
58
59
60 G_DEFINE_TYPE (GtkHButtonBox, gtk_hbutton_box, GTK_TYPE_BUTTON_BOX)
61
62 static void
63 gtk_hbutton_box_class_init (GtkHButtonBoxClass *class)
64 {
65 }
66
67 static void
68 gtk_hbutton_box_init (GtkHButtonBox *hbutton_box)
69 {
70   gtk_orientable_set_orientation (GTK_ORIENTABLE (hbutton_box),
71                                   GTK_ORIENTATION_HORIZONTAL);
72 }
73
74 /**
75  * gtk_hbutton_box_new:
76  *
77  * Creates a new horizontal button box.
78  *
79  * Returns: a new button box #GtkWidget.
80  *
81  * Deprecated: 3.2: Use gtk_button_box_new() with %GTK_ORIENTATION_HORIZONTAL instead
82  */
83 GtkWidget *
84 gtk_hbutton_box_new (void)
85 {
86   return g_object_new (GTK_TYPE_HBUTTON_BOX, NULL);
87 }
88