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