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 = GtkVScrollbar.html 27 * outPack = gtk 28 * outFile = VScrollbar 29 * strct = GtkVScrollbar 30 * realStrct= 31 * ctorStrct= 32 * clss = VScrollbar 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gtk_vscrollbar_ 41 * - gtk_ 42 * omit structs: 43 * omit prefixes: 44 * omit code: 45 * omit signals: 46 * imports: 47 * - gtk.Adjustment 48 * structWrap: 49 * - GtkAdjustment* -> Adjustment 50 * module aliases: 51 * local aliases: 52 * overrides: 53 */ 54 55 module gtk.VScrollbar; 56 57 public import gtkc.gtktypes; 58 59 private import gtkc.gtk; 60 private import glib.ConstructionException; 61 private import gobject.ObjectG; 62 63 64 private import gtk.Adjustment; 65 66 67 68 private import gtk.Scrollbar; 69 70 /** 71 * Description 72 * The GtkVScrollbar widget is a widget arranged vertically creating a 73 * scrollbar. See GtkScrollbar for details on 74 * scrollbars. GtkAdjustment pointers may be added to handle the 75 * adjustment of the scrollbar or it may be left NULL in which case one 76 * will be created for you. See GtkScrollbar for a description of what the 77 * fields in an adjustment represent for a scrollbar. 78 */ 79 public class VScrollbar : Scrollbar 80 { 81 82 /** the main Gtk struct */ 83 protected GtkVScrollbar* gtkVScrollbar; 84 85 86 public GtkVScrollbar* getVScrollbarStruct() 87 { 88 return gtkVScrollbar; 89 } 90 91 92 /** the main Gtk struct as a void* */ 93 protected override void* getStruct() 94 { 95 return cast(void*)gtkVScrollbar; 96 } 97 98 /** 99 * Sets our main struct and passes it to the parent class 100 */ 101 public this (GtkVScrollbar* gtkVScrollbar) 102 { 103 super(cast(GtkScrollbar*)gtkVScrollbar); 104 this.gtkVScrollbar = gtkVScrollbar; 105 } 106 107 protected override void setStruct(GObject* obj) 108 { 109 super.setStruct(obj); 110 gtkVScrollbar = cast(GtkVScrollbar*)obj; 111 } 112 113 /** 114 */ 115 116 /** 117 * Creates a new vertical scrollbar. 118 * Params: 119 * adjustment = the GtkAdjustment to use, or NULL to create a new adjustment. [allow-none] 120 * Throws: ConstructionException GTK+ fails to create the object. 121 */ 122 public this (Adjustment adjustment) 123 { 124 // GtkWidget * gtk_vscrollbar_new (GtkAdjustment *adjustment); 125 auto p = gtk_vscrollbar_new((adjustment is null) ? null : adjustment.getAdjustmentStruct()); 126 if(p is null) 127 { 128 throw new ConstructionException("null returned by gtk_vscrollbar_new((adjustment is null) ? null : adjustment.getAdjustmentStruct())"); 129 } 130 this(cast(GtkVScrollbar*) p); 131 } 132 }