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  = GtkFileChooserWidget.html
27  * outPack = gtk
28  * outFile = FileChooserWidget
29  * strct   = GtkFileChooserWidget
30  * realStrct=
31  * ctorStrct=GtkWidget
32  * clss    = FileChooserWidget
33  * interf  = 
34  * class Code: Yes
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_file_chooser_widget_
41  * 	- gtk_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- glib.Str
48  * 	- gtk.FileChooserT
49  * 	- gtk.FileChooserIF
50  * structWrap:
51  * module aliases:
52  * local aliases:
53  * overrides:
54  */
55 
56 module gtk.FileChooserWidget;
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.FileChooserT;
67 private import gtk.FileChooserIF;
68 
69 
70 
71 private import gtk.VBox;
72 
73 /**
74  * Description
75  *  GtkFileChooserWidget is a widget suitable for selecting files.
76  *  It is the main building block of a GtkFileChooserDialog. Most
77  *  applications will only need to use the latter; you can use
78  *  GtkFileChooserWidget as part of a larger window if you have
79  *  special needs.
80  *  Note that GtkFileChooserWidget does not have any methods of its
81  *  own. Instead, you should use the functions that work on a
82  *  GtkFileChooser.
83  */
84 public class FileChooserWidget : VBox
85 {
86 	
87 	/** the main Gtk struct */
88 	protected GtkFileChooserWidget* gtkFileChooserWidget;
89 	
90 	
91 	public GtkFileChooserWidget* getFileChooserWidgetStruct()
92 	{
93 		return gtkFileChooserWidget;
94 	}
95 	
96 	
97 	/** the main Gtk struct as a void* */
98 	protected override void* getStruct()
99 	{
100 		return cast(void*)gtkFileChooserWidget;
101 	}
102 	
103 	/**
104 	 * Sets our main struct and passes it to the parent class
105 	 */
106 	public this (GtkFileChooserWidget* gtkFileChooserWidget)
107 	{
108 		super(cast(GtkVBox*)gtkFileChooserWidget);
109 		this.gtkFileChooserWidget = gtkFileChooserWidget;
110 	}
111 	
112 	protected override void setStruct(GObject* obj)
113 	{
114 		super.setStruct(obj);
115 		gtkFileChooserWidget = cast(GtkFileChooserWidget*)obj;
116 	}
117 	
118 	// add the FileChooser capabilities
119 	mixin FileChooserT!(FileChooserWidget);
120 	
121 	/**
122 	 */
123 	
124 	/**
125 	 * Creates a new GtkFileChooserWidget. This is a file chooser widget that can
126 	 * be embedded in custom windows, and it is the same widget that is used by
127 	 * GtkFileChooserDialog.
128 	 * Since 2.4
129 	 * Params:
130 	 * action = Open or save mode for the widget
131 	 * Throws: ConstructionException GTK+ fails to create the object.
132 	 */
133 	public this (GtkFileChooserAction action)
134 	{
135 		// GtkWidget * gtk_file_chooser_widget_new (GtkFileChooserAction action);
136 		auto p = gtk_file_chooser_widget_new(action);
137 		if(p is null)
138 		{
139 			throw new ConstructionException("null returned by gtk_file_chooser_widget_new(action)");
140 		}
141 		this(cast(GtkFileChooserWidget*) p);
142 	}
143 	
144 	/**
145 	 * Warning
146 	 * gtk_file_chooser_widget_new_with_backend has been deprecated since version 2.14 and should not be used in newly-written code. Use gtk_file_chooser_widget_new() instead.
147 	 * Creates a new GtkFileChooserWidget with a specified backend. This is
148 	 * especially useful if you use gtk_file_chooser_set_local_only() to allow
149 	 * non-local files. This is a file chooser widget that can be embedded in
150 	 * custom windows and it is the same widget that is used by
151 	 * GtkFileChooserDialog.
152 	 * Since 2.4
153 	 * Params:
154 	 * action = Open or save mode for the widget
155 	 * backend = The name of the specific filesystem backend to use.
156 	 * Throws: ConstructionException GTK+ fails to create the object.
157 	 */
158 	public this (GtkFileChooserAction action, string backend)
159 	{
160 		// GtkWidget * gtk_file_chooser_widget_new_with_backend  (GtkFileChooserAction action,  const gchar *backend);
161 		auto p = gtk_file_chooser_widget_new_with_backend(action, Str.toStringz(backend));
162 		if(p is null)
163 		{
164 			throw new ConstructionException("null returned by gtk_file_chooser_widget_new_with_backend(action, Str.toStringz(backend))");
165 		}
166 		this(cast(GtkFileChooserWidget*) p);
167 	}
168 }