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  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * structWrap:
47  * module aliases:
48  * local aliases:
49  * overrides:
50  */
51 
52 module gtk.VButtonBox;
53 
54 public  import gtkc.gtktypes;
55 
56 private import gtkc.gtk;
57 private import glib.ConstructionException;
58 private import gobject.ObjectG;
59 
60 
61 
62 private import gtk.ButtonBox;
63 
64 /**
65  * A button box should be used to provide a consistent layout of buttons
66  * throughout your application. The layout/spacing can be altered by the
67  * programmer, or if desired, by the user to alter the 'feel' of a
68  * program to a small degree.
69  *
70  * A GtkVButtonBox is created with gtk_vbutton_box_new(). Buttons are
71  * packed into a button box the same way widgets are added to any other
72  * container, using gtk_container_add(). You can also use
73  * gtk_box_pack_start() or gtk_box_pack_end(), but for button boxes both
74  * these functions work just like gtk_container_add(), ie., they pack the
75  * button in a way that depends on the current layout style and on
76  * whether the button has had gtk_button_box_set_child_secondary() called
77  * on it.
78  *
79  * The spacing between buttons can be set with gtk_box_set_spacing(). The
80  * arrangement and layout of the buttons can be changed with
81  * gtk_button_box_set_layout().
82  *
83  * GtkVButtonBox has been deprecated, use GtkButtonBox instead.
84  */
85 public class VButtonBox : ButtonBox
86 {
87 	
88 	/** the main Gtk struct */
89 	protected GtkVButtonBox* gtkVButtonBox;
90 	
91 	
92 	/** Get the main Gtk struct */
93 	public GtkVButtonBox* getVButtonBoxStruct()
94 	{
95 		return gtkVButtonBox;
96 	}
97 	
98 	
99 	/** the main Gtk struct as a void* */
100 	protected override void* getStruct()
101 	{
102 		return cast(void*)gtkVButtonBox;
103 	}
104 	
105 	/**
106 	 * Sets our main struct and passes it to the parent class
107 	 */
108 	public this (GtkVButtonBox* gtkVButtonBox)
109 	{
110 		super(cast(GtkButtonBox*)gtkVButtonBox);
111 		this.gtkVButtonBox = gtkVButtonBox;
112 	}
113 	
114 	protected override void setStruct(GObject* obj)
115 	{
116 		super.setStruct(obj);
117 		gtkVButtonBox = cast(GtkVButtonBox*)obj;
118 	}
119 	
120 	/**
121 	 * Creates a new vertical button box and sets standart values for it's comon parameters
122 	 * Returns: a new vertical button box
123 	 */
124 	static VButtonBox createActionBox()
125 	{
126 		VButtonBox bBox = new VButtonBox();
127 		bBox.setLayout(ButtonBoxStyle.START);
128 		bBox.setBorderWidth(5);
129 		bBox.setSpacing(7);
130 		return bBox;
131 	}
132 	
133 	/**
134 	 */
135 	
136 	/**
137 	 * Warning
138 	 * gtk_vbutton_box_new has been deprecated since version 3.2 and should not be used in newly-written code. Use gtk_button_box_new() with GTK_ORIENTATION_VERTICAL instead
139 	 * Creates a new vertical button box.
140 	 * Throws: ConstructionException GTK+ fails to create the object.
141 	 */
142 	public this ()
143 	{
144 		// GtkWidget * gtk_vbutton_box_new (void);
145 		auto p = gtk_vbutton_box_new();
146 		if(p is null)
147 		{
148 			throw new ConstructionException("null returned by gtk_vbutton_box_new()");
149 		}
150 		this(cast(GtkVButtonBox*) p);
151 	}
152 }