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 
65 private import glib.Str;
66 private import gtk.FontChooserT;
67 private import gtk.FontChooserIF;
68 
69 
70 
71 private import gtk.Box;
72 
73 /**
74  * The GtkFontChooserWidget widget lists the available fonts,
75  * styles and sizes, allowing the user to select a font. It is
76  * used in the GtkFontChooserDialog widget to provide a
77  * dialog box for selecting fonts.
78  *
79  * To set the font which is initially selected, use
80  * gtk_font_chooser_set_font() or gtk_font_chooser_set_font_desc().
81  *
82  * To get the selected font use gtk_font_chooser_get_font() or
83  * gtk_font_chooser_get_font_desc().
84  *
85  * To change the text which is shown in the preview area, use
86  * gtk_font_chooser_set_preview_text().
87  */
88 public class FontChooserWidget : Box, FontChooserIF
89 {
90 	
91 	/** the main Gtk struct */
92 	protected GtkFontChooserWidget* gtkFontChooserWidget;
93 	
94 	
95 	public GtkFontChooserWidget* getFontChooserWidgetStruct()
96 	{
97 		return gtkFontChooserWidget;
98 	}
99 	
100 	
101 	/** the main Gtk struct as a void* */
102 	protected override void* getStruct()
103 	{
104 		return cast(void*)gtkFontChooserWidget;
105 	}
106 	
107 	/**
108 	 * Sets our main struct and passes it to the parent class
109 	 */
110 	public this (GtkFontChooserWidget* gtkFontChooserWidget)
111 	{
112 		super(cast(GtkBox*)gtkFontChooserWidget);
113 		this.gtkFontChooserWidget = gtkFontChooserWidget;
114 	}
115 	
116 	protected override void setStruct(GObject* obj)
117 	{
118 		super.setStruct(obj);
119 		gtkFontChooserWidget = cast(GtkFontChooserWidget*)obj;
120 	}
121 	
122 	// add the FontChooser capabilities
123 	mixin FontChooserT!(GtkFontChooserWidget);
124 	
125 	/**
126 	 */
127 	
128 	/**
129 	 * Creates a new GtkFontChooserWidget.
130 	 * Throws: ConstructionException GTK+ fails to create the object.
131 	 */
132 	public this ()
133 	{
134 		// GtkWidget * gtk_font_chooser_widget_new (void);
135 		auto p = gtk_font_chooser_widget_new();
136 		if(p is null)
137 		{
138 			throw new ConstructionException("null returned by gtk_font_chooser_widget_new()");
139 		}
140 		this(cast(GtkFontChooserWidget*) p);
141 	}
142 }