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 = GtkGammaCurve.html 27 * outPack = gtk 28 * outFile = GammaCurve 29 * strct = GtkGammaCurve 30 * realStrct= 31 * ctorStrct= 32 * clss = GammaCurve 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gtk_gamma_curve_ 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.GammaCurve; 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.VBox; 66 67 /** 68 * Description 69 * The GtkGammaCurve widget is a variant of GtkCurve specifically for 70 * editing gamma curves, which are used in graphics applications such as the 71 * Gimp. 72 * The GtkGammaCurve widget shows a curve which the user can edit with the 73 * mouse just like a GtkCurve widget. On the right of the curve it also displays 74 * 5 buttons, 3 of which change between the 3 curve modes (spline, linear and 75 * free), and the other 2 set the curve to a particular gamma value, or reset it 76 * to a straight line. 77 * As of GTK+ 2.20, GtkGammaCurve has been deprecated since it is too specialized. 78 */ 79 public class GammaCurve : VBox 80 { 81 82 /** the main Gtk struct */ 83 protected GtkGammaCurve* gtkGammaCurve; 84 85 86 public GtkGammaCurve* getGammaCurveStruct() 87 { 88 return gtkGammaCurve; 89 } 90 91 92 /** the main Gtk struct as a void* */ 93 protected override void* getStruct() 94 { 95 return cast(void*)gtkGammaCurve; 96 } 97 98 /** 99 * Sets our main struct and passes it to the parent class 100 */ 101 public this (GtkGammaCurve* gtkGammaCurve) 102 { 103 super(cast(GtkVBox*)gtkGammaCurve); 104 this.gtkGammaCurve = gtkGammaCurve; 105 } 106 107 protected override void setStruct(GObject* obj) 108 { 109 super.setStruct(obj); 110 gtkGammaCurve = cast(GtkGammaCurve*)obj; 111 } 112 113 /** 114 */ 115 116 /** 117 * Warning 118 * gtk_gamma_curve_new has been deprecated since version 2.20 and should not be used in newly-written code. Don't use this widget anymore. 119 * Creates a new GtkGammaCurve. 120 * Throws: ConstructionException GTK+ fails to create the object. 121 */ 122 public this () 123 { 124 // GtkWidget * gtk_gamma_curve_new (void); 125 auto p = gtk_gamma_curve_new(); 126 if(p is null) 127 { 128 throw new ConstructionException("null returned by gtk_gamma_curve_new()"); 129 } 130 this(cast(GtkGammaCurve*) p); 131 } 132 }