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  = GtkFontChooserWidget.html
27  * outPack = gtk
28  * outFile = FontChooserWidget
29  * strct   = GtkFontChooserWidget
30  * realStrct=
31  * ctorStrct=
32  * clss    = FontChooserWidget
33  * interf  = 
34  * class Code: Yes
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * 	- FontChooserIF
40  * prefixes:
41  * 	- gtk_font_chooser_widget_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- glib.Str
48  * 	- gtk.FontChooserT
49  * 	- gtk.FontChooserIF
50  * structWrap:
51  * module aliases:
52  * local aliases:
53  * overrides:
54  */
55 
56 module gtk.FontChooserWidget;
57 
58 public  import gtkc.gtktypes;
59 
60 private import gtkc.gtk;
61 private import glib.ConstructionException;
62 private import gobject.ObjectG;
63 
64 private import glib.Str;
65 private import gtk.FontChooserT;
66 private import gtk.FontChooserIF;
67 
68 
69 private import gtk.Box;
70 
71 /**
72  * The GtkFontChooserWidget widget lists the available fonts,
73  * styles and sizes, allowing the user to select a font. It is
74  * used in the GtkFontChooserDialog widget to provide a
75  * dialog box for selecting fonts.
76  *
77  * To set the font which is initially selected, use
78  * gtk_font_chooser_set_font() or gtk_font_chooser_set_font_desc().
79  *
80  * To get the selected font use gtk_font_chooser_get_font() or
81  * gtk_font_chooser_get_font_desc().
82  *
83  * To change the text which is shown in the preview area, use
84  * gtk_font_chooser_set_preview_text().
85  */
86 public class FontChooserWidget : Box, FontChooserIF
87 {
88 	
89 	/** the main Gtk struct */
90 	protected GtkFontChooserWidget* gtkFontChooserWidget;
91 	
92 	
93 	/** Get the main Gtk struct */
94 	public GtkFontChooserWidget* getFontChooserWidgetStruct()
95 	{
96 		return gtkFontChooserWidget;
97 	}
98 	
99 	
100 	/** the main Gtk struct as a void* */
101 	protected override void* getStruct()
102 	{
103 		return cast(void*)gtkFontChooserWidget;
104 	}
105 	
106 	/**
107 	 * Sets our main struct and passes it to the parent class
108 	 */
109 	public this (GtkFontChooserWidget* gtkFontChooserWidget)
110 	{
111 		super(cast(GtkBox*)gtkFontChooserWidget);
112 		this.gtkFontChooserWidget = gtkFontChooserWidget;
113 	}
114 	
115 	protected override void setStruct(GObject* obj)
116 	{
117 		super.setStruct(obj);
118 		gtkFontChooserWidget = cast(GtkFontChooserWidget*)obj;
119 	}
120 	
121 	// add the FontChooser capabilities
122 	mixin FontChooserT!(GtkFontChooserWidget);
123 	
124 	/**
125 	 */
126 	
127 	/**
128 	 * Creates a new GtkFontChooserWidget.
129 	 * Throws: ConstructionException GTK+ fails to create the object.
130 	 */
131 	public this ()
132 	{
133 		// GtkWidget * gtk_font_chooser_widget_new (void);
134 		auto p = gtk_font_chooser_widget_new();
135 		if(p is null)
136 		{
137 			throw new ConstructionException("null returned by gtk_font_chooser_widget_new()");
138 		}
139 		this(cast(GtkFontChooserWidget*) p);
140 	}
141 }