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 = GtkColorChooserDialog.html 27 * outPack = gtk 28 * outFile = ColorChooserDialog 29 * strct = GtkColorChooserDialog 30 * realStrct= 31 * ctorStrct= 32 * clss = ColorChooserDialog 33 * interf = 34 * class Code: Yes 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * - ColorChooserIF 40 * prefixes: 41 * - gtk_color_chooser_dialog_ 42 * omit structs: 43 * omit prefixes: 44 * omit code: 45 * omit signals: 46 * imports: 47 * - glib.Str 48 * - gtk.Window 49 * - gtk.ColorChooserIF 50 * - gtk.ColorChooserT 51 * structWrap: 52 * - GtkWindow* -> Window 53 * module aliases: 54 * local aliases: 55 * overrides: 56 */ 57 58 module gtk.ColorChooserDialog; 59 60 public import gtkc.gtktypes; 61 62 private import gtkc.gtk; 63 private import glib.ConstructionException; 64 private import gobject.ObjectG; 65 66 private import glib.Str; 67 private import gtk.Window; 68 private import gtk.ColorChooserIF; 69 private import gtk.ColorChooserT; 70 71 72 private import gtk.Dialog; 73 74 /** 75 * The GtkColorChooserDialog widget is a dialog for choosing 76 * a color. It implements the GtkColorChooser interface. 77 */ 78 public class ColorChooserDialog : Dialog, ColorChooserIF 79 { 80 81 /** the main Gtk struct */ 82 protected GtkColorChooserDialog* gtkColorChooserDialog; 83 84 85 /** Get the main Gtk struct */ 86 public GtkColorChooserDialog* getColorChooserDialogStruct() 87 { 88 return gtkColorChooserDialog; 89 } 90 91 92 /** the main Gtk struct as a void* */ 93 protected override void* getStruct() 94 { 95 return cast(void*)gtkColorChooserDialog; 96 } 97 98 /** 99 * Sets our main struct and passes it to the parent class 100 */ 101 public this (GtkColorChooserDialog* gtkColorChooserDialog) 102 { 103 super(cast(GtkDialog*)gtkColorChooserDialog); 104 this.gtkColorChooserDialog = gtkColorChooserDialog; 105 } 106 107 protected override void setStruct(GObject* obj) 108 { 109 super.setStruct(obj); 110 gtkColorChooserDialog = cast(GtkColorChooserDialog*)obj; 111 } 112 113 // add the ColorChooser capabilities 114 mixin ColorChooserT!(GtkColorChooserDialog); 115 116 /** 117 */ 118 119 /** 120 * Creates a new GtkColorChooserDialog. 121 * Params: 122 * title = Title of the dialog, or NULL. [allow-none] 123 * parent = Transient parent of the dialog, or NULL. [allow-none] 124 * Throws: ConstructionException GTK+ fails to create the object. 125 */ 126 public this (string title, Window parent) 127 { 128 // GtkWidget * gtk_color_chooser_dialog_new (const gchar *title, GtkWindow *parent); 129 auto p = gtk_color_chooser_dialog_new(Str.toStringz(title), (parent is null) ? null : parent.getWindowStruct()); 130 if(p is null) 131 { 132 throw new ConstructionException("null returned by gtk_color_chooser_dialog_new(Str.toStringz(title), (parent is null) ? null : parent.getWindowStruct())"); 133 } 134 this(cast(GtkColorChooserDialog*) p); 135 } 136 }