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