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 module gtk.HPaned; 26 27 private import glib.ConstructionException; 28 private import gobject.ObjectG; 29 private import gtk.Paned; 30 private import gtk.Widget; 31 private import gtk.c.functions; 32 public import gtk.c.types; 33 public import gtkc.gtktypes; 34 35 36 /** 37 * The HPaned widget is a container widget with two 38 * children arranged horizontally. The division between 39 * the two panes is adjustable by the user by dragging 40 * a handle. See #GtkPaned for details. 41 * 42 * GtkHPaned has been deprecated, use #GtkPaned instead. 43 */ 44 public class HPaned : Paned 45 { 46 /** the main Gtk struct */ 47 protected GtkHPaned* gtkHPaned; 48 49 /** Get the main Gtk struct */ 50 public GtkHPaned* getHPanedStruct(bool transferOwnership = false) 51 { 52 if (transferOwnership) 53 ownedRef = false; 54 return gtkHPaned; 55 } 56 57 /** the main Gtk struct as a void* */ 58 protected override void* getStruct() 59 { 60 return cast(void*)gtkHPaned; 61 } 62 63 /** 64 * Sets our main struct and passes it to the parent class. 65 */ 66 public this (GtkHPaned* gtkHPaned, bool ownedRef = false) 67 { 68 this.gtkHPaned = gtkHPaned; 69 super(cast(GtkPaned*)gtkHPaned, ownedRef); 70 } 71 72 /** 73 * Creates a new HPaned and adds two widgets as it's children 74 * Params: 75 * child1 = 76 * child2 = 77 */ 78 this(Widget child1, Widget child2) 79 { 80 this(); 81 add1(child1); 82 add2(child2); 83 } 84 85 /** 86 */ 87 88 /** */ 89 public static GType getType() 90 { 91 return gtk_hpaned_get_type(); 92 } 93 94 /** 95 * Create a new #GtkHPaned 96 * 97 * Deprecated: Use gtk_paned_new() with %GTK_ORIENTATION_HORIZONTAL instead 98 * 99 * Returns: the new #GtkHPaned 100 * 101 * Throws: ConstructionException GTK+ fails to create the object. 102 */ 103 public this() 104 { 105 auto p = gtk_hpaned_new(); 106 107 if(p is null) 108 { 109 throw new ConstructionException("null returned by new"); 110 } 111 112 this(cast(GtkHPaned*) p); 113 } 114 }