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  = GtkHRuler.html
27  * outPack = gtk
28  * outFile = HRuler
29  * strct   = GtkHRuler
30  * realStrct=
31  * ctorStrct=
32  * clss    = HRuler
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_hruler_
41  * 	- gtk_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * structWrap:
48  * module aliases:
49  * local aliases:
50  * overrides:
51  */
52 
53 module gtk.HRuler;
54 
55 public  import gtkc.gtktypes;
56 
57 private import gtkc.gtk;
58 private import glib.ConstructionException;
59 private import gobject.ObjectG;
60 
61 
62 
63 
64 
65 private import gtk.Ruler;
66 
67 /**
68  * Description
69  * Note
70  *  This widget is considered too specialized/little-used for
71  *  GTK+, and will be removed in GTK 3. If your application needs this widget,
72  *  feel free to use it, as the widget is useful in some applications; it's just
73  *  not of general interest. However, we are not accepting new features for the
74  *  widget, and it will move out of the GTK+ distribution.
75  * The HRuler widget is a widget arranged horizontally creating a ruler that is
76  * utilized around other widgets such as a text widget. The ruler is used to show
77  * the location of the mouse on the window and to show the size of the window in
78  * specified units. The available units of measurement are GTK_PIXELS, GTK_INCHES
79  * and GTK_CENTIMETERS. GTK_PIXELS is the default.
80  * rulers.
81  */
82 public class HRuler : Ruler
83 {
84 	
85 	/** the main Gtk struct */
86 	protected GtkHRuler* gtkHRuler;
87 	
88 	
89 	public GtkHRuler* getHRulerStruct()
90 	{
91 		return gtkHRuler;
92 	}
93 	
94 	
95 	/** the main Gtk struct as a void* */
96 	protected override void* getStruct()
97 	{
98 		return cast(void*)gtkHRuler;
99 	}
100 	
101 	/**
102 	 * Sets our main struct and passes it to the parent class
103 	 */
104 	public this (GtkHRuler* gtkHRuler)
105 	{
106 		super(cast(GtkRuler*)gtkHRuler);
107 		this.gtkHRuler = gtkHRuler;
108 	}
109 	
110 	protected override void setStruct(GObject* obj)
111 	{
112 		super.setStruct(obj);
113 		gtkHRuler = cast(GtkHRuler*)obj;
114 	}
115 	
116 	/**
117 	 */
118 	
119 	/**
120 	 * Warning
121 	 * gtk_hruler_new has been deprecated since version 2.24 and should not be used in newly-written code. GtkRuler has been removed from GTK 3 for being
122 	 *  unmaintained and too specialized. There is no replacement.
123 	 * Creates a new horizontal ruler.
124 	 * Throws: ConstructionException GTK+ fails to create the object.
125 	 */
126 	public this ()
127 	{
128 		// GtkWidget * gtk_hruler_new (void);
129 		auto p = gtk_hruler_new();
130 		if(p is null)
131 		{
132 			throw new ConstructionException("null returned by gtk_hruler_new()");
133 		}
134 		this(cast(GtkHRuler*) p);
135 	}
136 }