1 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
2
3
4 #include <glibmm.h>
5
6 #include <gtkmm/filechooserbutton.h>
7 #include <gtkmm/private/filechooserbutton_p.h>
8
9
10 // -*- c++ -*-
11 /* $Id: filechooserbutton.ccg,v 1.2 2005/01/09 12:42:07 murrayc Exp $ */
12
13 /*
14 *
15 * Copyright 2003 The gtkmm Development Team
16 *
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2.1 of the License, or (at your option) any later version.
21 *
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
26 *
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the Free
29 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 */
31
32 #include <gtk/gtk.h>
33
34 namespace Gtk
35 {
36
FileChooserButton(FileChooserAction action)37 FileChooserButton::FileChooserButton(FileChooserAction action)
38 :
39 // Mark this class as non-derived to allow C++ vfuncs to be skipped.
40 Glib::ObjectBase(0),
41 Gtk::HBox(Glib::ConstructParams(filechooserbutton_class_.init(), "action",action, static_cast<char*>(0)))
42 {
43 }
44
45
46 } // namespace Gtk
47
48
49 namespace
50 {
51
52
53 static const Glib::SignalProxyInfo FileChooserButton_signal_file_set_info =
54 {
55 "file-set",
56 (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
57 (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
58 };
59
60
61 } // anonymous namespace
62
63
64 namespace Glib
65 {
66
wrap(GtkFileChooserButton * object,bool take_copy)67 Gtk::FileChooserButton* wrap(GtkFileChooserButton* object, bool take_copy)
68 {
69 return dynamic_cast<Gtk::FileChooserButton *> (Glib::wrap_auto ((GObject*)(object), take_copy));
70 }
71
72 } /* namespace Glib */
73
74 namespace Gtk
75 {
76
77
78 /* The *_Class implementation: */
79
init()80 const Glib::Class& FileChooserButton_Class::init()
81 {
82 if(!gtype_) // create the GType if necessary
83 {
84 // Glib::Class has to know the class init function to clone custom types.
85 class_init_func_ = &FileChooserButton_Class::class_init_function;
86
87 // This is actually just optimized away, apparently with no harm.
88 // Make sure that the parent type has been created.
89 //CppClassParent::CppObjectType::get_type();
90
91 // Create the wrapper type, with the same class/instance size as the base type.
92 register_derived_type(gtk_file_chooser_button_get_type());
93
94 // Add derived versions of interfaces, if the C type implements any interfaces:
95 FileChooser::add_interface(get_type());
96
97 }
98
99 return *this;
100 }
101
102
class_init_function(void * g_class,void * class_data)103 void FileChooserButton_Class::class_init_function(void* g_class, void* class_data)
104 {
105 BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
106 CppClassParent::class_init_function(klass, class_data);
107
108
109 }
110
111
wrap_new(GObject * o)112 Glib::ObjectBase* FileChooserButton_Class::wrap_new(GObject* o)
113 {
114 return manage(new FileChooserButton((GtkFileChooserButton*)(o)));
115
116 }
117
118
119 /* The implementation: */
120
FileChooserButton(const Glib::ConstructParams & construct_params)121 FileChooserButton::FileChooserButton(const Glib::ConstructParams& construct_params)
122 :
123 Gtk::HBox(construct_params)
124 {
125 }
126
FileChooserButton(GtkFileChooserButton * castitem)127 FileChooserButton::FileChooserButton(GtkFileChooserButton* castitem)
128 :
129 Gtk::HBox((GtkHBox*)(castitem))
130 {
131 }
132
~FileChooserButton()133 FileChooserButton::~FileChooserButton()
134 {
135 destroy_();
136 }
137
138 FileChooserButton::CppClassType FileChooserButton::filechooserbutton_class_; // initialize static member
139
get_type()140 GType FileChooserButton::get_type()
141 {
142 return filechooserbutton_class_.init().get_type();
143 }
144
145
get_base_type()146 GType FileChooserButton::get_base_type()
147 {
148 return gtk_file_chooser_button_get_type();
149 }
150
151
FileChooserButton(const Glib::ustring & title,FileChooserAction action)152 FileChooserButton::FileChooserButton(const Glib::ustring& title, FileChooserAction action)
153 :
154 // Mark this class as non-derived to allow C++ vfuncs to be skipped.
155 Glib::ObjectBase(0),
156 Gtk::HBox(Glib::ConstructParams(filechooserbutton_class_.init(), "title", title.c_str(), "action", ((GtkFileChooserAction)(action)), static_cast<char*>(0)))
157 {
158
159
160 }
161
FileChooserButton(const Glib::ustring & title,FileChooserAction action,const Glib::ustring & backend)162 FileChooserButton::FileChooserButton(const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend)
163 :
164 // Mark this class as non-derived to allow C++ vfuncs to be skipped.
165 Glib::ObjectBase(0),
166 Gtk::HBox(Glib::ConstructParams(filechooserbutton_class_.init(), "title", title.c_str(), "action", ((GtkFileChooserAction)(action)), "backend", backend.c_str(), static_cast<char*>(0)))
167 {
168
169
170 }
171
FileChooserButton(FileChooserDialog & dialog)172 FileChooserButton::FileChooserButton(FileChooserDialog& dialog)
173 :
174 // Mark this class as non-derived to allow C++ vfuncs to be skipped.
175 Glib::ObjectBase(0),
176 Gtk::HBox(Glib::ConstructParams(filechooserbutton_class_.init(), "dialog", (dialog).Gtk::Widget::gobj(), static_cast<char*>(0)))
177 {
178
179
180 }
181
get_title() const182 Glib::ustring FileChooserButton::get_title() const
183 {
184 return Glib::convert_const_gchar_ptr_to_ustring(gtk_file_chooser_button_get_title(const_cast<GtkFileChooserButton*>(gobj())));
185 }
186
set_title(const Glib::ustring & title)187 void FileChooserButton::set_title(const Glib::ustring& title)
188 {
189 gtk_file_chooser_button_set_title(gobj(), title.c_str());
190 }
191
get_width_chars() const192 int FileChooserButton::get_width_chars() const
193 {
194 return gtk_file_chooser_button_get_width_chars(const_cast<GtkFileChooserButton*>(gobj()));
195 }
196
set_width_chars(int n_chars)197 void FileChooserButton::set_width_chars(int n_chars)
198 {
199 gtk_file_chooser_button_set_width_chars(gobj(), n_chars);
200 }
201
get_focus_on_click() const202 bool FileChooserButton::get_focus_on_click() const
203 {
204 return gtk_file_chooser_button_get_focus_on_click(const_cast<GtkFileChooserButton*>(gobj()));
205 }
206
set_focus_on_click(gboolean focus_on_click)207 void FileChooserButton::set_focus_on_click(gboolean focus_on_click)
208 {
209 gtk_file_chooser_button_set_focus_on_click(gobj(), focus_on_click);
210 }
211
212
signal_file_set()213 Glib::SignalProxy0< void > FileChooserButton::signal_file_set()
214 {
215 return Glib::SignalProxy0< void >(this, &FileChooserButton_signal_file_set_info);
216 }
217
218
property_focus_on_click()219 Glib::PropertyProxy< bool > FileChooserButton::property_focus_on_click()
220 {
221 return Glib::PropertyProxy< bool >(this, "focus-on-click");
222 }
223
property_focus_on_click() const224 Glib::PropertyProxy_ReadOnly< bool > FileChooserButton::property_focus_on_click() const
225 {
226 return Glib::PropertyProxy_ReadOnly< bool >(this, "focus-on-click");
227 }
228
property_title()229 Glib::PropertyProxy< Glib::ustring > FileChooserButton::property_title()
230 {
231 return Glib::PropertyProxy< Glib::ustring >(this, "title");
232 }
233
property_title() const234 Glib::PropertyProxy_ReadOnly< Glib::ustring > FileChooserButton::property_title() const
235 {
236 return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "title");
237 }
238
property_width_chars()239 Glib::PropertyProxy< int > FileChooserButton::property_width_chars()
240 {
241 return Glib::PropertyProxy< int >(this, "width-chars");
242 }
243
property_width_chars() const244 Glib::PropertyProxy_ReadOnly< int > FileChooserButton::property_width_chars() const
245 {
246 return Glib::PropertyProxy_ReadOnly< int >(this, "width-chars");
247 }
248
249
250 } // namespace Gtk
251
252
253