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  = GtkFontChooserDialog.html
27  * outPack = gtk
28  * outFile = FontChooserDialog
29  * strct   = GtkFontChooserDialog
30  * realStrct=
31  * ctorStrct=
32  * clss    = FontChooserDialog
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_dialog_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- glib.Str
48  * 	- gtk.Window
49  * 	- gtk.FontChooserT
50  * 	- gtk.FontChooserIF
51  * structWrap:
52  * 	- GtkWindow* -> Window
53  * module aliases:
54  * local aliases:
55  * overrides:
56  */
57 
58 module gtk.FontChooserDialog;
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.FontChooserT;
70 private import gtk.FontChooserIF;
71 
72 
73 
74 private import gtk.Dialog;
75 
76 /**
77  * The GtkFontChooserDialog widget is a dialog for selecting a font.
78  * It implements the GtkFontChooser interface.
79  *
80  * GtkFontChooserDialog as GtkBuildable
81  *
82  * The GtkFontChooserDialog implementation of the GtkBuildable interface
83  * exposes the buttons with the names
84  * "select_button" and "cancel_button.
85  */
86 public class FontChooserDialog : Dialog, FontChooserIF
87 {
88 	
89 	/** the main Gtk struct */
90 	protected GtkFontChooserDialog* gtkFontChooserDialog;
91 	
92 	
93 	public GtkFontChooserDialog* getFontChooserDialogStruct()
94 	{
95 		return gtkFontChooserDialog;
96 	}
97 	
98 	
99 	/** the main Gtk struct as a void* */
100 	protected override void* getStruct()
101 	{
102 		return cast(void*)gtkFontChooserDialog;
103 	}
104 	
105 	/**
106 	 * Sets our main struct and passes it to the parent class
107 	 */
108 	public this (GtkFontChooserDialog* gtkFontChooserDialog)
109 	{
110 		super(cast(GtkDialog*)gtkFontChooserDialog);
111 		this.gtkFontChooserDialog = gtkFontChooserDialog;
112 	}
113 	
114 	protected override void setStruct(GObject* obj)
115 	{
116 		super.setStruct(obj);
117 		gtkFontChooserDialog = cast(GtkFontChooserDialog*)obj;
118 	}
119 	
120 	// add the FontChooser capabilities
121 	mixin FontChooserT!(GtkFontChooserDialog);
122 	
123 	/**
124 	 */
125 	
126 	/**
127 	 * Creates a new GtkFontChooserDialog.
128 	 * Params:
129 	 * title = Title of the dialog, or NULL. [allow-none]
130 	 * parent = Transient parent of the dialog, or NULL. [allow-none]
131 	 * Throws: ConstructionException GTK+ fails to create the object.
132 	 */
133 	public this (string title, Window parent)
134 	{
135 		// GtkWidget * gtk_font_chooser_dialog_new (const gchar *title,  GtkWindow *parent);
136 		auto p = gtk_font_chooser_dialog_new(Str.toStringz(title), (parent is null) ? null : parent.getWindowStruct());
137 		if(p is null)
138 		{
139 			throw new ConstructionException("null returned by gtk_font_chooser_dialog_new(Str.toStringz(title), (parent is null) ? null : parent.getWindowStruct())");
140 		}
141 		this(cast(GtkFontChooserDialog*) p);
142 	}
143 }