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 = GtkVRuler.html 27 * outPack = gtk 28 * outFile = VRuler 29 * strct = GtkVRuler 30 * realStrct= 31 * ctorStrct= 32 * clss = VRuler 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gtk_vruler_ 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.VRuler; 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 VRuler widget is a widget arranged vertically 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 unit of measurement. 80 */ 81 public class VRuler : Ruler 82 { 83 84 /** the main Gtk struct */ 85 protected GtkVRuler* gtkVRuler; 86 87 88 public GtkVRuler* getVRulerStruct() 89 { 90 return gtkVRuler; 91 } 92 93 94 /** the main Gtk struct as a void* */ 95 protected override void* getStruct() 96 { 97 return cast(void*)gtkVRuler; 98 } 99 100 /** 101 * Sets our main struct and passes it to the parent class 102 */ 103 public this (GtkVRuler* gtkVRuler) 104 { 105 super(cast(GtkRuler*)gtkVRuler); 106 this.gtkVRuler = gtkVRuler; 107 } 108 109 protected override void setStruct(GObject* obj) 110 { 111 super.setStruct(obj); 112 gtkVRuler = cast(GtkVRuler*)obj; 113 } 114 115 /** 116 */ 117 118 /** 119 * Warning 120 * gtk_vruler_new is deprecated and should not be used in newly-written code. 121 * Creates a new vertical ruler 122 * Throws: ConstructionException GTK+ fails to create the object. 123 */ 124 public this () 125 { 126 // GtkWidget * gtk_vruler_new (void); 127 auto p = gtk_vruler_new(); 128 if(p is null) 129 { 130 throw new ConstructionException("null returned by gtk_vruler_new()"); 131 } 132 this(cast(GtkVRuler*) p); 133 } 134 }