alternative to assert
[gtkD.git] / gtkD / src / gtk / Scrollbar.d
blob101a00a67a9438a38620acc7d8b183ce41a12396
1 /*
2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = GtkScrollbar.html
26 * outPack = gtk
27 * outFile = Scrollbar
28 * strct = GtkScrollbar
29 * realStrct=
30 * ctorStrct=
31 * clss = Scrollbar
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gtk_scrollbar_
40 * - gtk_
41 * omit structs:
42 * omit prefixes:
43 * omit code:
44 * imports:
45 * structWrap:
46 * module aliases:
47 * local aliases:
50 module gtk.Scrollbar;
52 version(noAssert)
54 version(Tango)
56 import tango.io.Stdout; // use the tango loging?
60 private import gtkc.gtktypes;
62 private import gtkc.gtk;
69 /**
70 * Description
71 * The GtkScrollbar widget is an abstract base class for GtkHScrollbar and
72 * GtkVScrollbar. It is not very useful in itself.
73 * The position of the thumb in a scrollbar is controlled by the scroll
74 * adjustments. See GtkAdjustment for the fields in an adjustment - for
75 * GtkScrollbar, the "value" field represents the position of the
76 * scrollbar, which must be between the "lower" field and "upper -
77 * page_size." The "page_size" field represents the size of the visible
78 * scrollable area. The "step_increment" and "page_increment" fields are
79 * used when the user asks to step down (using the small stepper arrows)
80 * or page down (using for example the PageDown key).
82 private import gtk.Range;
83 public class Scrollbar : Range
86 /** the main Gtk struct */
87 protected GtkScrollbar* gtkScrollbar;
90 public GtkScrollbar* getScrollbarStruct()
92 return gtkScrollbar;
96 /** the main Gtk struct as a void* */
97 protected void* getStruct()
99 return cast(void*)gtkScrollbar;
103 * Sets our main struct and passes it to the parent class
105 public this (GtkScrollbar* gtkScrollbar)
107 version(noAssert)
109 if ( gtkScrollbar is null )
111 int zero = 0;
112 version(Tango)
114 Stdout("struct gtkScrollbar is null on constructor").newline;
116 else
118 printf("struct gtkScrollbar is null on constructor");
120 zero = zero / zero;
123 else
125 assert(gtkScrollbar !is null, "struct gtkScrollbar is null on constructor");
127 super(cast(GtkRange*)gtkScrollbar);
128 this.gtkScrollbar = gtkScrollbar;