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 = GtkHPaned.html 27 * outPack = gtk 28 * outFile = HPaned 29 * strct = GtkHPaned 30 * realStrct= 31 * ctorStrct= 32 * clss = HPaned 33 * interf = 34 * class Code: Yes 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gtk_hpaned_ 41 * - gtk_ 42 * omit structs: 43 * omit prefixes: 44 * omit code: 45 * omit signals: 46 * imports: 47 * - gtk.Widget 48 * structWrap: 49 * - GtkWidget* -> Widget 50 * module aliases: 51 * local aliases: 52 * overrides: 53 */ 54 55 module gtk.HPaned; 56 57 public import gtkc.gtktypes; 58 59 private import gtkc.gtk; 60 private import glib.ConstructionException; 61 private import gobject.ObjectG; 62 63 64 private import gtk.Widget; 65 66 67 68 private import gtk.Paned; 69 70 /** 71 * Description 72 * The HPaned widget is a container widget with two 73 * children arranged horizontally. The division between 74 * the two panes is adjustable by the user by dragging 75 * a handle. See GtkPaned for details. 76 */ 77 public class HPaned : Paned 78 { 79 80 /** the main Gtk struct */ 81 protected GtkHPaned* gtkHPaned; 82 83 84 public GtkHPaned* getHPanedStruct() 85 { 86 return gtkHPaned; 87 } 88 89 90 /** the main Gtk struct as a void* */ 91 protected override void* getStruct() 92 { 93 return cast(void*)gtkHPaned; 94 } 95 96 /** 97 * Sets our main struct and passes it to the parent class 98 */ 99 public this (GtkHPaned* gtkHPaned) 100 { 101 super(cast(GtkPaned*)gtkHPaned); 102 this.gtkHPaned = gtkHPaned; 103 } 104 105 protected override void setStruct(GObject* obj) 106 { 107 super.setStruct(obj); 108 gtkHPaned = cast(GtkHPaned*)obj; 109 } 110 111 /** 112 * Creates a new HPaned and adds two widgets as it's children 113 * Params: 114 * child1 = 115 * child2 = 116 */ 117 this(Widget child1, Widget child2) 118 { 119 this(); 120 add1(child1); 121 add2(child2); 122 } 123 124 125 /** 126 */ 127 128 /** 129 * Create a new GtkHPaned 130 * Throws: ConstructionException GTK+ fails to create the object. 131 */ 132 public this () 133 { 134 // GtkWidget * gtk_hpaned_new (void); 135 auto p = gtk_hpaned_new(); 136 if(p is null) 137 { 138 throw new ConstructionException("null returned by gtk_hpaned_new()"); 139 } 140 this(cast(GtkHPaned*) p); 141 } 142 }