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  = GtkColorChooserWidget.html
27  * outPack = gtk
28  * outFile = ColorChooserWidget
29  * strct   = GtkColorChooserWidget
30  * realStrct=
31  * ctorStrct=
32  * clss    = ColorChooserWidget
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_widget_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- gtk.ColorChooserIF
48  * 	- gtk.ColorChooserT
49  * structWrap:
50  * module aliases:
51  * local aliases:
52  * overrides:
53  */
54 
55 module gtk.ColorChooserWidget;
56 
57 public  import gtkc.gtktypes;
58 
59 private import gtkc.gtk;
60 private import glib.ConstructionException;
61 private import gobject.ObjectG;
62 
63 
64 private import gtk.ColorChooserIF;
65 private import gtk.ColorChooserT;
66 
67 
68 
69 private import gtk.Box;
70 
71 /**
72  * The GtkColorChooserWidget widget lets the user select a
73  * color. By default, the chooser presents a prefined palette
74  * of colors, plus a small number of settable custom colors.
75  * It is also possible to select a different color with the
76  * single-color editor. To enter the single-color editing mode,
77  * use the context menu of any color of the palette, or use the
78  * '+' button to add a new custom color.
79  *
80  * The chooser automatically remembers the last selection, as well
81  * as custom colors.
82  *
83  * To change the initially selected color, use gtk_color_chooser_set_rgba().
84  * To get the selected font use gtk_color_chooser_get_rgba().
85  *
86  * The GtkColorChooserWidget is used in the GtkColorChooserDialog
87  * to provide a dialog for selecting colors.
88  */
89 public class ColorChooserWidget : Box, ColorChooserIF
90 {
91 	
92 	/** the main Gtk struct */
93 	protected GtkColorChooserWidget* gtkColorChooserWidget;
94 	
95 	
96 	public GtkColorChooserWidget* getColorChooserWidgetStruct()
97 	{
98 		return gtkColorChooserWidget;
99 	}
100 	
101 	
102 	/** the main Gtk struct as a void* */
103 	protected override void* getStruct()
104 	{
105 		return cast(void*)gtkColorChooserWidget;
106 	}
107 	
108 	/**
109 	 * Sets our main struct and passes it to the parent class
110 	 */
111 	public this (GtkColorChooserWidget* gtkColorChooserWidget)
112 	{
113 		super(cast(GtkBox*)gtkColorChooserWidget);
114 		this.gtkColorChooserWidget = gtkColorChooserWidget;
115 	}
116 	
117 	protected override void setStruct(GObject* obj)
118 	{
119 		super.setStruct(obj);
120 		gtkColorChooserWidget = cast(GtkColorChooserWidget*)obj;
121 	}
122 	
123 	// add the ColorChooser capabilities
124 	mixin ColorChooserT!(GtkColorChooserWidget);
125 	
126 	/**
127 	 */
128 	
129 	/**
130 	 * Creates a new GtkColorChooserWidget.
131 	 * Throws: ConstructionException GTK+ fails to create the object.
132 	 */
133 	public this ()
134 	{
135 		// GtkWidget * gtk_color_chooser_widget_new (void);
136 		auto p = gtk_color_chooser_widget_new();
137 		if(p is null)
138 		{
139 			throw new ConstructionException("null returned by gtk_color_chooser_widget_new()");
140 		}
141 		this(cast(GtkColorChooserWidget*) p);
142 	}
143 }