alternative to assert
[gtkD.git] / gtkD / src / gtk / GammaCurve.d
blob6be19cbe76780557332ed330d492e37125057c2b
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 = GtkGammaCurve.html
26 * outPack = gtk
27 * outFile = GammaCurve
28 * strct = GtkGammaCurve
29 * realStrct=
30 * ctorStrct=
31 * clss = GammaCurve
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gtk_gamma_curve_
40 * - gtk_
41 * omit structs:
42 * omit prefixes:
43 * omit code:
44 * imports:
45 * structWrap:
46 * module aliases:
47 * local aliases:
50 module gtk.GammaCurve;
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 * Note
72 * This widget is considered too specialized/little-used for
73 * GTK+, and will in the future be moved to some other package. If
74 * your application needs this widget, feel free to use it, as the
75 * widget does work and is useful in some applications; it's just not
76 * of general interest. However, we are not accepting new features for
77 * the widget, and it will eventually move out of the GTK+
78 * distribution.
79 * The GtkGammaCurve widget is a variant of GtkCurve specifically for
80 * editing gamma curves, which are used in graphics applications such as the
81 * Gimp.
82 * The GtkGammaCurve widget shows a curve which the user can edit with the
83 * mouse just like a GtkCurve widget. On the right of the curve it also displays
84 * 5 buttons, 3 of which change between the 3 curve modes (spline, linear and
85 * free), and the other 2 set the curve to a particular gamma value, or reset it
86 * to a straight line.
88 private import gtk.VBox;
89 public class GammaCurve : VBox
92 /** the main Gtk struct */
93 protected GtkGammaCurve* gtkGammaCurve;
96 public GtkGammaCurve* getGammaCurveStruct()
98 return gtkGammaCurve;
102 /** the main Gtk struct as a void* */
103 protected void* getStruct()
105 return cast(void*)gtkGammaCurve;
109 * Sets our main struct and passes it to the parent class
111 public this (GtkGammaCurve* gtkGammaCurve)
113 version(noAssert)
115 if ( gtkGammaCurve is null )
117 int zero = 0;
118 version(Tango)
120 Stdout("struct gtkGammaCurve is null on constructor").newline;
122 else
124 printf("struct gtkGammaCurve is null on constructor");
126 zero = zero / zero;
129 else
131 assert(gtkGammaCurve !is null, "struct gtkGammaCurve is null on constructor");
133 super(cast(GtkVBox*)gtkGammaCurve);
134 this.gtkGammaCurve = gtkGammaCurve;
142 * Creates a new GtkGammaCurve.
143 * Returns:
144 * a new GtkGammaCurve.
146 public this ()
148 // GtkWidget* gtk_gamma_curve_new (void);
149 this(cast(GtkGammaCurve*)gtk_gamma_curve_new() );