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.VPaned; 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 VPaned widget is a container widget with two 38 * children arranged vertically. The division between 39 * the two panes is adjustable by the user by dragging 40 * a handle. See #GtkPaned for details. 41 * 42 * GtkVPaned has been deprecated, use #GtkPaned instead. 43 */ 44 public class VPaned : Paned 45 { 46 /** the main Gtk struct */ 47 protected GtkVPaned* gtkVPaned; 48 49 /** Get the main Gtk struct */ 50 public GtkVPaned* getVPanedStruct(bool transferOwnership = false) 51 { 52 if (transferOwnership) 53 ownedRef = false; 54 return gtkVPaned; 55 } 56 57 /** the main Gtk struct as a void* */ 58 protected override void* getStruct() 59 { 60 return cast(void*)gtkVPaned; 61 } 62 63 /** 64 * Sets our main struct and passes it to the parent class. 65 */ 66 public this (GtkVPaned* gtkVPaned, bool ownedRef = false) 67 { 68 this.gtkVPaned = gtkVPaned; 69 super(cast(GtkPaned*)gtkVPaned, 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_vpaned_get_type(); 92 } 93 94 /** 95 * Create a new #GtkVPaned 96 * 97 * Deprecated: Use gtk_paned_new() with %GTK_ORIENTATION_VERTICAL instead 98 * 99 * Returns: the new #GtkVPaned 100 * 101 * Throws: ConstructionException GTK+ fails to create the object. 102 */ 103 public this() 104 { 105 auto p = gtk_vpaned_new(); 106 107 if(p is null) 108 { 109 throw new ConstructionException("null returned by new"); 110 } 111 112 this(cast(GtkVPaned*) p); 113 } 114 }