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