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 * omit structs: 42 * omit prefixes: 43 * omit code: 44 * omit signals: 45 * imports: 46 * - gtk.Widget 47 * structWrap: 48 * module aliases: 49 * local aliases: 50 * overrides: 51 */ 52 53 module gtk.HPaned; 54 55 public import gtkc.gtktypes; 56 57 private import gtkc.gtk; 58 private import glib.ConstructionException; 59 private import gobject.ObjectG; 60 61 private import gtk.Widget; 62 63 64 private import gtk.Paned; 65 66 /** 67 * The HPaned widget is a container widget with two 68 * children arranged horizontally. The division between 69 * the two panes is adjustable by the user by dragging 70 * a handle. See GtkPaned for details. 71 * 72 * GtkHPaned has been deprecated, use GtkPaned instead. 73 */ 74 public class HPaned : Paned 75 { 76 77 /** the main Gtk struct */ 78 protected GtkHPaned* gtkHPaned; 79 80 81 /** Get the main Gtk struct */ 82 public GtkHPaned* getHPanedStruct() 83 { 84 return gtkHPaned; 85 } 86 87 88 /** the main Gtk struct as a void* */ 89 protected override void* getStruct() 90 { 91 return cast(void*)gtkHPaned; 92 } 93 94 /** 95 * Sets our main struct and passes it to the parent class 96 */ 97 public this (GtkHPaned* gtkHPaned) 98 { 99 super(cast(GtkPaned*)gtkHPaned); 100 this.gtkHPaned = gtkHPaned; 101 } 102 103 protected override void setStruct(GObject* obj) 104 { 105 super.setStruct(obj); 106 gtkHPaned = cast(GtkHPaned*)obj; 107 } 108 109 /** 110 * Creates a new HPaned and adds two widgets as it's children 111 * Params: 112 * child1 = 113 * child2 = 114 */ 115 this(Widget child1, Widget child2) 116 { 117 this(); 118 add1(child1); 119 add2(child2); 120 } 121 122 123 /** 124 */ 125 126 /** 127 * Warning 128 * gtk_hpaned_new has been deprecated since version 3.2 and should not be used in newly-written code. Use gtk_paned_new() with GTK_ORIENTATION_HORIZONTAL instead 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 }