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 	protected override void setStruct(GObject* obj)
64 	{
65 		gtkVPaned = cast(GtkVPaned*)obj;
66 		super.setStruct(obj);
67 	}
68 
69 	/**
70 	 * Sets our main struct and passes it to the parent class.
71 	 */
72 	public this (GtkVPaned* gtkVPaned, bool ownedRef = false)
73 	{
74 		this.gtkVPaned = gtkVPaned;
75 		super(cast(GtkPaned*)gtkVPaned, ownedRef);
76 	}
77 
78 	/**
79 	 * Creates a new HPaned and adds two widgets as it's children
80 	 * Params:
81 	 *  child1 =
82 	 *  child2 =
83 	 */
84 	this(Widget child1, Widget child2)
85 	{
86 		this();
87 		add1(child1);
88 		add2(child2);
89 	}
90 
91 	/**
92 	 */
93 
94 	/** */
95 	public static GType getType()
96 	{
97 		return gtk_vpaned_get_type();
98 	}
99 
100 	/**
101 	 * Create a new #GtkVPaned
102 	 *
103 	 * Deprecated: Use gtk_paned_new() with %GTK_ORIENTATION_VERTICAL instead
104 	 *
105 	 * Returns: the new #GtkVPaned
106 	 *
107 	 * Throws: ConstructionException GTK+ fails to create the object.
108 	 */
109 	public this()
110 	{
111 		auto p = gtk_vpaned_new();
112 
113 		if(p is null)
114 		{
115 			throw new ConstructionException("null returned by new");
116 		}
117 
118 		this(cast(GtkVPaned*) p);
119 	}
120 }