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.VScrollbar;
26 
27 private import glib.ConstructionException;
28 private import gobject.ObjectG;
29 private import gtk.Adjustment;
30 private import gtk.Scrollbar;
31 private import gtk.Widget;
32 private import gtkc.gtk;
33 public  import gtkc.gtktypes;
34 
35 
36 /**
37  * The #GtkVScrollbar widget is a widget arranged vertically creating a
38  * scrollbar. See #GtkScrollbar for details on
39  * scrollbars. #GtkAdjustment pointers may be added to handle the
40  * adjustment of the scrollbar or it may be left %NULL in which case one
41  * will be created for you. See #GtkScrollbar for a description of what the
42  * fields in an adjustment represent for a scrollbar.
43  * 
44  * GtkVScrollbar has been deprecated, use #GtkScrollbar instead.
45  */
46 public class VScrollbar : Scrollbar
47 {
48 	/** the main Gtk struct */
49 	protected GtkVScrollbar* gtkVScrollbar;
50 
51 	/** Get the main Gtk struct */
52 	public GtkVScrollbar* getVScrollbarStruct()
53 	{
54 		return gtkVScrollbar;
55 	}
56 
57 	/** the main Gtk struct as a void* */
58 	protected override void* getStruct()
59 	{
60 		return cast(void*)gtkVScrollbar;
61 	}
62 
63 	protected override void setStruct(GObject* obj)
64 	{
65 		gtkVScrollbar = cast(GtkVScrollbar*)obj;
66 		super.setStruct(obj);
67 	}
68 
69 	/**
70 	 * Sets our main struct and passes it to the parent class.
71 	 */
72 	public this (GtkVScrollbar* gtkVScrollbar, bool ownedRef = false)
73 	{
74 		this.gtkVScrollbar = gtkVScrollbar;
75 		super(cast(GtkScrollbar*)gtkVScrollbar, ownedRef);
76 	}
77 
78 
79 	/** */
80 	public static GType getType()
81 	{
82 		return gtk_vscrollbar_get_type();
83 	}
84 
85 	/**
86 	 * Creates a new vertical scrollbar.
87 	 *
88 	 * Deprecated: Use gtk_scrollbar_new() with %GTK_ORIENTATION_VERTICAL instead
89 	 *
90 	 * Params:
91 	 *     adjustment = the #GtkAdjustment to use, or %NULL to create a new adjustment
92 	 *
93 	 * Return: the new #GtkVScrollbar
94 	 *
95 	 * Throws: ConstructionException GTK+ fails to create the object.
96 	 */
97 	public this(Adjustment adjustment)
98 	{
99 		auto p = gtk_vscrollbar_new((adjustment is null) ? null : adjustment.getAdjustmentStruct());
100 		
101 		if(p is null)
102 		{
103 			throw new ConstructionException("null returned by new");
104 		}
105 		
106 		this(cast(GtkVScrollbar*) p);
107 	}
108 }