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  = GtkRecentChooserWidget.html
27  * outPack = gtk
28  * outFile = RecentChooserWidget
29  * strct   = GtkRecentChooserWidget
30  * realStrct=
31  * ctorStrct=
32  * clss    = RecentChooserWidget
33  * interf  = 
34  * class Code: Yes
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * 	- RecentChooserIF
40  * prefixes:
41  * 	- gtk_recent_chooser_widget_
42  * omit structs:
43  * omit prefixes:
44  * omit code:
45  * omit signals:
46  * imports:
47  * 	- gtk.RecentManager
48  * 	- gtk.RecentChooserIF
49  * 	- gtk.RecentChooserT
50  * structWrap:
51  * 	- GtkRecentManager* -> RecentManager
52  * module aliases:
53  * local aliases:
54  * overrides:
55  */
56 
57 module gtk.RecentChooserWidget;
58 
59 public  import gtkc.gtktypes;
60 
61 private import gtkc.gtk;
62 private import glib.ConstructionException;
63 private import gobject.ObjectG;
64 
65 private import gtk.RecentManager;
66 private import gtk.RecentChooserIF;
67 private import gtk.RecentChooserT;
68 
69 
70 private import gtk.Box;
71 
72 /**
73  * GtkRecentChooserWidget is a widget suitable for selecting recently used
74  * files. It is the main building block of a GtkRecentChooserDialog. Most
75  * applications will only need to use the latter; you can use
76  * GtkRecentChooserWidget as part of a larger window if you have special needs.
77  *
78  * Note that GtkRecentChooserWidget does not have any methods of its own.
79  * Instead, you should use the functions that work on a GtkRecentChooser.
80  *
81  * Recently used files are supported since GTK+ 2.10.
82  */
83 public class RecentChooserWidget : Box, RecentChooserIF
84 {
85 	
86 	/** the main Gtk struct */
87 	protected GtkRecentChooserWidget* gtkRecentChooserWidget;
88 	
89 	
90 	/** Get the main Gtk struct */
91 	public GtkRecentChooserWidget* getRecentChooserWidgetStruct()
92 	{
93 		return gtkRecentChooserWidget;
94 	}
95 	
96 	
97 	/** the main Gtk struct as a void* */
98 	protected override void* getStruct()
99 	{
100 		return cast(void*)gtkRecentChooserWidget;
101 	}
102 	
103 	/**
104 	 * Sets our main struct and passes it to the parent class
105 	 */
106 	public this (GtkRecentChooserWidget* gtkRecentChooserWidget)
107 	{
108 		super(cast(GtkBox*)gtkRecentChooserWidget);
109 		this.gtkRecentChooserWidget = gtkRecentChooserWidget;
110 	}
111 	
112 	protected override void setStruct(GObject* obj)
113 	{
114 		super.setStruct(obj);
115 		gtkRecentChooserWidget = cast(GtkRecentChooserWidget*)obj;
116 	}
117 	
118 	// add the RecentChooser capabilities
119 	mixin RecentChooserT!(GtkRecentChooserWidget);
120 	
121 	/**
122 	 */
123 	
124 	/**
125 	 * Creates a new GtkRecentChooserWidget object. This is an embeddable widget
126 	 * used to access the recently used resources list.
127 	 * Since 2.10
128 	 * Throws: ConstructionException GTK+ fails to create the object.
129 	 */
130 	public this ()
131 	{
132 		// GtkWidget * gtk_recent_chooser_widget_new (void);
133 		auto p = gtk_recent_chooser_widget_new();
134 		if(p is null)
135 		{
136 			throw new ConstructionException("null returned by gtk_recent_chooser_widget_new()");
137 		}
138 		this(cast(GtkRecentChooserWidget*) p);
139 	}
140 	
141 	/**
142 	 * Creates a new GtkRecentChooserWidget with a specified recent manager.
143 	 * This is useful if you have implemented your own recent manager, or if you
144 	 * have a customized instance of a GtkRecentManager object.
145 	 * Since 2.10
146 	 * Params:
147 	 * manager = a GtkRecentManager
148 	 * Throws: ConstructionException GTK+ fails to create the object.
149 	 */
150 	public this (RecentManager manager)
151 	{
152 		// GtkWidget * gtk_recent_chooser_widget_new_for_manager  (GtkRecentManager *manager);
153 		auto p = gtk_recent_chooser_widget_new_for_manager((manager is null) ? null : manager.getRecentManagerStruct());
154 		if(p is null)
155 		{
156 			throw new ConstructionException("null returned by gtk_recent_chooser_widget_new_for_manager((manager is null) ? null : manager.getRecentManagerStruct())");
157 		}
158 		this(cast(GtkRecentChooserWidget*) p);
159 	}
160 }