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 
67 private import glib.Str;
68 private import gtk.Window;
69 private import gtk.ColorChooserIF;
70 private import gtk.ColorChooserT;
71 
72 
73 
74 private import gtk.Dialog;
75 
76 /**
77  * The GtkColorChooserDialog widget is a dialog for choosing
78  * a color. It implements the GtkColorChooser interface.
79  */
80 public class ColorChooserDialog : Dialog, ColorChooserIF
81 {
82 	
83 	/** the main Gtk struct */
84 	protected GtkColorChooserDialog* gtkColorChooserDialog;
85 	
86 	
87 	public GtkColorChooserDialog* getColorChooserDialogStruct()
88 	{
89 		return gtkColorChooserDialog;
90 	}
91 	
92 	
93 	/** the main Gtk struct as a void* */
94 	protected override void* getStruct()
95 	{
96 		return cast(void*)gtkColorChooserDialog;
97 	}
98 	
99 	/**
100 	 * Sets our main struct and passes it to the parent class
101 	 */
102 	public this (GtkColorChooserDialog* gtkColorChooserDialog)
103 	{
104 		super(cast(GtkDialog*)gtkColorChooserDialog);
105 		this.gtkColorChooserDialog = gtkColorChooserDialog;
106 	}
107 	
108 	protected override void setStruct(GObject* obj)
109 	{
110 		super.setStruct(obj);
111 		gtkColorChooserDialog = cast(GtkColorChooserDialog*)obj;
112 	}
113 	
114 	// add the ColorChooser capabilities
115 	mixin ColorChooserT!(GtkColorChooserDialog);
116 	
117 	/**
118 	 */
119 	
120 	/**
121 	 * Creates a new GtkColorChooserDialog.
122 	 * Params:
123 	 * title = Title of the dialog, or NULL. [allow-none]
124 	 * parent = Transient parent of the dialog, or NULL. [allow-none]
125 	 * Throws: ConstructionException GTK+ fails to create the object.
126 	 */
127 	public this (string title, Window parent)
128 	{
129 		// GtkWidget * gtk_color_chooser_dialog_new (const gchar *title,  GtkWindow *parent);
130 		auto p = gtk_color_chooser_dialog_new(Str.toStringz(title), (parent is null) ? null : parent.getWindowStruct());
131 		if(p is null)
132 		{
133 			throw new ConstructionException("null returned by gtk_color_chooser_dialog_new(Str.toStringz(title), (parent is null) ? null : parent.getWindowStruct())");
134 		}
135 		this(cast(GtkColorChooserDialog*) p);
136 	}
137 }