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#ifndef __GTK_BUTTON_BOX_H__
26#define __GTK_BUTTON_BOX_H__
27
28#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
29#error "Only <gtk/gtk.h> can be included directly."
30#endif
31
32#include <gtk/gtkbox.h>
33
34
35G_BEGIN_DECLS
36
37#define GTK_TYPE_BUTTON_BOX (gtk_button_box_get_type ())
38#define GTK_BUTTON_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BUTTON_BOX, GtkButtonBox))
39#define GTK_BUTTON_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON_BOX, GtkButtonBoxClass))
40#define GTK_IS_BUTTON_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_BUTTON_BOX))
41#define GTK_IS_BUTTON_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BUTTON_BOX))
42#define GTK_BUTTON_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_BUTTON_BOX, GtkButtonBoxClass))
43
44
45typedef struct _GtkButtonBox GtkButtonBox;
46typedef struct _GtkButtonBoxPrivate GtkButtonBoxPrivate;
47typedef struct _GtkButtonBoxClass GtkButtonBoxClass;
48
49struct _GtkButtonBox
50{
51 GtkBox box;
52
53 /*< private >*/
54 GtkButtonBoxPrivate *priv;
55};
56
57/**
58 * GtkButtonBoxClass:
59 * @parent_class: The parent class.
60 */
61struct _GtkButtonBoxClass
62{
63 GtkBoxClass parent_class;
64
65 /*< private >*/
66
67 /* Padding for future expansion */
68 void (*_gtk_reserved1) (void);
69 void (*_gtk_reserved2) (void);
70 void (*_gtk_reserved3) (void);
71 void (*_gtk_reserved4) (void);
72};
73
74
75/**
76 * GtkButtonBoxStyle:
77 * @GTK_BUTTONBOX_SPREAD: Buttons are evenly spread across the box.
78 * @GTK_BUTTONBOX_EDGE: Buttons are placed at the edges of the box.
79 * @GTK_BUTTONBOX_START: Buttons are grouped towards the start of the box,
80 * (on the left for a HBox, or the top for a VBox).
81 * @GTK_BUTTONBOX_END: Buttons are grouped towards the end of the box,
82 * (on the right for a HBox, or the bottom for a VBox).
83 * @GTK_BUTTONBOX_CENTER: Buttons are centered in the box. Since 2.12.
84 * @GTK_BUTTONBOX_EXPAND: Buttons expand to fill the box. This entails giving
85 * buttons a "linked" appearance, making button sizes homogeneous, and
86 * setting spacing to 0 (same as calling gtk_box_set_homogeneous() and
87 * gtk_box_set_spacing() manually). Since 3.12.
88 *
89 * Used to dictate the style that a #GtkButtonBox uses to layout the buttons it
90 * contains.
91 */
92typedef enum
93{
94 GTK_BUTTONBOX_SPREAD = 1,
95 GTK_BUTTONBOX_EDGE,
96 GTK_BUTTONBOX_START,
97 GTK_BUTTONBOX_END,
98 GTK_BUTTONBOX_CENTER,
99 GTK_BUTTONBOX_EXPAND
100} GtkButtonBoxStyle;
101
102
103GDK_AVAILABLE_IN_ALL
104GType gtk_button_box_get_type (void) G_GNUC_CONST;
105GDK_AVAILABLE_IN_ALL
106GtkWidget * gtk_button_box_new (GtkOrientation orientation);
107GDK_AVAILABLE_IN_ALL
108GtkButtonBoxStyle gtk_button_box_get_layout (GtkButtonBox *widget);
109GDK_AVAILABLE_IN_ALL
110void gtk_button_box_set_layout (GtkButtonBox *widget,
111 GtkButtonBoxStyle layout_style);
112GDK_AVAILABLE_IN_ALL
113gboolean gtk_button_box_get_child_secondary (GtkButtonBox *widget,
114 GtkWidget *child);
115GDK_AVAILABLE_IN_ALL
116void gtk_button_box_set_child_secondary (GtkButtonBox *widget,
117 GtkWidget *child,
118 gboolean is_secondary);
119GDK_AVAILABLE_IN_3_2
120gboolean gtk_button_box_get_child_non_homogeneous (GtkButtonBox *widget,
121 GtkWidget *child);
122GDK_AVAILABLE_IN_3_2
123void gtk_button_box_set_child_non_homogeneous (GtkButtonBox *widget,
124 GtkWidget *child,
125 gboolean non_homogeneous);
126
127
128G_END_DECLS
129
130#endif /* __GTK_BUTTON_BOX_H__ */
131