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  = GtkColorSelectionDialog.html
27  * outPack = gtk
28  * outFile = ColorSelectionDialog
29  * strct   = GtkColorSelectionDialog
30  * realStrct=
31  * ctorStrct=
32  * clss    = ColorSelectionDialog
33  * interf  = 
34  * class Code: Yes
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_color_selection_dialog_
41  * 	- gtk_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * 	- gtk_color_selection_dialog_get_color_selection
46  * omit signals:
47  * imports:
48  * 	- glib.Str
49  * 	- gtk.Widget
50  * 	- gtk.ColorSelection
51  * structWrap:
52  * 	- GtkWidget* -> Widget
53  * module aliases:
54  * local aliases:
55  * overrides:
56  */
57 
58 module gtk.ColorSelectionDialog;
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.Widget;
69 private import gtk.ColorSelection;
70 
71 
72 
73 private import gtk.Dialog;
74 
75 /**
76  * Description
77  * The GtkColorSelectionDialog provides a standard dialog which
78  * allows the user to select a color much like the GtkFileSelection
79  * provides a standard dialog for file selection.
80  * GtkColorSelectionDialog as GtkBuildable
81  * The GtkColorSelectionDialog implementation of the GtkBuildable interface
82  * exposes the embedded GtkColorSelection as internal child with the
83  * name "color_selection". It also exposes the buttons with the names
84  * "ok_button", "cancel_button" and "help_button".
85  */
86 public class ColorSelectionDialog : Dialog
87 {
88 	
89 	/** the main Gtk struct */
90 	protected GtkColorSelectionDialog* gtkColorSelectionDialog;
91 	
92 	
93 	public GtkColorSelectionDialog* getColorSelectionDialogStruct()
94 	{
95 		return gtkColorSelectionDialog;
96 	}
97 	
98 	
99 	/** the main Gtk struct as a void* */
100 	protected override void* getStruct()
101 	{
102 		return cast(void*)gtkColorSelectionDialog;
103 	}
104 	
105 	/**
106 	 * Sets our main struct and passes it to the parent class
107 	 */
108 	public this (GtkColorSelectionDialog* gtkColorSelectionDialog)
109 	{
110 		super(cast(GtkDialog*)gtkColorSelectionDialog);
111 		this.gtkColorSelectionDialog = gtkColorSelectionDialog;
112 	}
113 	
114 	protected override void setStruct(GObject* obj)
115 	{
116 		super.setStruct(obj);
117 		gtkColorSelectionDialog = cast(GtkColorSelectionDialog*)obj;
118 	}
119 	
120 	/**
121 	 * Retrieves the GtkColorSelection widget embedded in the dialog.
122 	 * Since 2.14
123 	 * Returns: the embedded GtkColorSelection
124 	 */
125 	public ColorSelection getColorSelection()
126 	{
127 		// GtkWidget* gtk_color_selection_dialog_get_color_selection  (GtkColorSelectionDialog *colorsel);
128 		auto p = gtk_color_selection_dialog_get_color_selection(gtkColorSelectionDialog);
129 		if(p is null)
130 		{
131 			return null;
132 		}
133 		return new ColorSelection(cast(GtkColorSelection*) p);
134 	}
135 	
136 	/**
137 	 */
138 	
139 	/**
140 	 * Creates a new GtkColorSelectionDialog.
141 	 * Params:
142 	 * title = a string containing the title text for the dialog.
143 	 * Throws: ConstructionException GTK+ fails to create the object.
144 	 */
145 	public this (string title)
146 	{
147 		// GtkWidget * gtk_color_selection_dialog_new (const gchar *title);
148 		auto p = gtk_color_selection_dialog_new(Str.toStringz(title));
149 		if(p is null)
150 		{
151 			throw new ConstructionException("null returned by gtk_color_selection_dialog_new(Str.toStringz(title))");
152 		}
153 		this(cast(GtkColorSelectionDialog*) p);
154 	}
155 }