1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = GtkVButtonBox.html
27  * outPack = gtk
28  * outFile = VButtonBox
29  * strct   = GtkVButtonBox
30  * realStrct=
31  * ctorStrct=
32  * clss    = VButtonBox
33  * interf  = 
34  * class Code: Yes
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_vbutton_box_
41  * 	- gtk_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * structWrap:
48  * module aliases:
49  * local aliases:
50  * overrides:
51  */
52 
53 module gtk.VButtonBox;
54 
55 public  import gtkc.gtktypes;
56 
57 private import gtkc.gtk;
58 private import glib.ConstructionException;
59 private import gobject.ObjectG;
60 
61 
62 
63 
64 
65 private import gtk.ButtonBox;
66 
67 /**
68  * Description
69  * A button box should be used to provide a consistent layout of buttons
70  * throughout your application. The layout/spacing can be altered by the
71  * programmer, or if desired, by the user to alter the 'feel' of a
72  * program to a small degree.
73  * A GtkVButtonBox is created with gtk_vbutton_box_new(). Buttons are
74  * packed into a button box the same way widgets are added to any other
75  * container, using gtk_container_add(). You can also use
76  * gtk_box_pack_start() or gtk_box_pack_end(), but for button boxes both
77  * these functions work just like gtk_container_add(), ie., they pack the
78  * button in a way that depends on the current layout style and on
79  * whether the button has had gtk_button_box_set_child_secondary() called
80  * on it.
81  * The spacing between buttons can be set with gtk_box_set_spacing(). The
82  * arrangement and layout of the buttons can be changed with
83  * gtk_button_box_set_layout().
84  */
85 public class VButtonBox : ButtonBox
86 {
87 	
88 	/** the main Gtk struct */
89 	protected GtkVButtonBox* gtkVButtonBox;
90 	
91 	
92 	public GtkVButtonBox* getVButtonBoxStruct()
93 	{
94 		return gtkVButtonBox;
95 	}
96 	
97 	
98 	/** the main Gtk struct as a void* */
99 	protected override void* getStruct()
100 	{
101 		return cast(void*)gtkVButtonBox;
102 	}
103 	
104 	/**
105 	 * Sets our main struct and passes it to the parent class
106 	 */
107 	public this (GtkVButtonBox* gtkVButtonBox)
108 	{
109 		super(cast(GtkButtonBox*)gtkVButtonBox);
110 		this.gtkVButtonBox = gtkVButtonBox;
111 	}
112 	
113 	protected override void setStruct(GObject* obj)
114 	{
115 		super.setStruct(obj);
116 		gtkVButtonBox = cast(GtkVButtonBox*)obj;
117 	}
118 	
119 	/**
120 	 * Creates a new vertical button box and sets standart values for it's comon parameters
121 	 * Returns: a new vertical button box
122 	 */
123 	static VButtonBox createActionBox()
124 	{
125 		VButtonBox bBox = new VButtonBox();
126 		bBox.setLayout(ButtonBoxStyle.START);
127 		bBox.setBorderWidth(5);
128 		bBox.setSpacing(7);
129 		return bBox;
130 	}
131 	
132 	/**
133 	 */
134 	
135 	/**
136 	 * Creates a new vertical button box.
137 	 * Throws: ConstructionException GTK+ fails to create the object.
138 	 */
139 	public this ()
140 	{
141 		// GtkWidget * gtk_vbutton_box_new (void);
142 		auto p = gtk_vbutton_box_new();
143 		if(p is null)
144 		{
145 			throw new ConstructionException("null returned by gtk_vbutton_box_new()");
146 		}
147 		this(cast(GtkVButtonBox*) p);
148 	}
149 	
150 	/**
151 	 * Warning
152 	 * gtk_vbutton_box_get_spacing_default has been deprecated since version 2.0 and should not be used in newly-written code. Use gtk_box_get_spacing() instead.
153 	 * Retrieves the current default spacing for vertical button boxes. This is the number of pixels
154 	 * to be placed between the buttons when they are arranged.
155 	 * Returns: the default number of pixels between buttons.
156 	 */
157 	public static int getSpacingDefault()
158 	{
159 		// gint gtk_vbutton_box_get_spacing_default (void);
160 		return gtk_vbutton_box_get_spacing_default();
161 	}
162 	
163 	/**
164 	 * Warning
165 	 * gtk_vbutton_box_set_spacing_default has been deprecated since version 2.0 and should not be used in newly-written code. Use gtk_box_set_spacing() instead.
166 	 * Changes the default spacing that is placed between widgets in an
167 	 * vertical button box.
168 	 * Params:
169 	 * spacing = an integer value.
170 	 */
171 	public static void setSpacingDefault(int spacing)
172 	{
173 		// void gtk_vbutton_box_set_spacing_default (gint spacing);
174 		gtk_vbutton_box_set_spacing_default(spacing);
175 	}
176 	
177 	/**
178 	 * Warning
179 	 * gtk_vbutton_box_get_layout_default has been deprecated since version 2.0 and should not be used in newly-written code. Use gtk_button_box_get_layout() instead.
180 	 * Retrieves the current layout used to arrange buttons in button box widgets.
181 	 * Returns: the current GtkButtonBoxStyle.
182 	 */
183 	public static GtkButtonBoxStyle getLayoutDefault()
184 	{
185 		// GtkButtonBoxStyle gtk_vbutton_box_get_layout_default (void);
186 		return gtk_vbutton_box_get_layout_default();
187 	}
188 	
189 	/**
190 	 * Warning
191 	 * gtk_vbutton_box_set_layout_default has been deprecated since version 2.0 and should not be used in newly-written code. Use gtk_button_box_set_layout() instead.
192 	 * Sets a new layout mode that will be used by all button boxes.
193 	 * Params:
194 	 * layout = a new GtkButtonBoxStyle.
195 	 */
196 	public static void setLayoutDefault(GtkButtonBoxStyle layout)
197 	{
198 		// void gtk_vbutton_box_set_layout_default (GtkButtonBoxStyle layout);
199 		gtk_vbutton_box_set_layout_default(layout);
200 	}
201 }