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