1 // Generated by gtkmmproc -- DO NOT MODIFY!
4 #include <gtkmm/recentchooser.h>
5 #include <gtkmm/private/recentchooser_p.h>
7 /* Copyright 2006 The gtkmm Development Team
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details.
19 * You should have received a copy of the GNU Library General Public
20 * License along with this library; if not, write to the Free
21 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #include <gtk/gtkrecentchooser.h>
26 // This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
28 static int SignalProxy_Compare_gtk_callback(GtkRecentInfo* a, GtkRecentInfo* b, gpointer data)
30 const Gtk::RecentChooser::SlotCompare* the_slot = static_cast<Gtk::RecentChooser::SlotCompare*>(data);
32 #ifdef GLIBMM_EXCEPTIONS_ENABLED
35 #endif //GLIBMM_EXCEPTIONS_ENABLED
36 return (*the_slot)(Glib::wrap(a, true /* take reference */), Glib::wrap(b, true /* take reference */));
37 #ifdef GLIBMM_EXCEPTIONS_ENABLED
41 Glib::exception_handlers_invoke();
45 #endif //GLIBMM_EXCEPTIONS_ENABLED
48 static void SignalProxy_Compare_gtk_callback_destroy(gpointer data)
50 delete static_cast<Gtk::RecentChooser::SlotCompare*>(data);
57 //Allow the generated code to work without the prefix:
58 typedef RecentChooser::ListHandle_RecentInfos ListHandle_RecentInfos;
60 void RecentChooser::set_sort_func(const SlotCompare& slot)
62 SlotCompare* slot_copy = new SlotCompare(slot);
64 gtk_recent_chooser_set_sort_func(
66 &SignalProxy_Compare_gtk_callback, slot_copy,
67 &SignalProxy_Compare_gtk_callback_destroy);
70 Glib::StringArrayHandle RecentChooser::get_uris() const
72 return Glib::StringArrayHandle(gtk_recent_chooser_get_uris(const_cast<GtkRecentChooser*>(gobj()), NULL));
75 void RecentChooser::unset_limit()
77 gtk_recent_chooser_set_limit(gobj(), -1 /* See C docs */);
87 static const Glib::SignalProxyInfo RecentChooser_signal_selection_changed_info =
90 (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
91 (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
95 static const Glib::SignalProxyInfo RecentChooser_signal_item_activated_info =
98 (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
99 (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
103 } // anonymous namespace
106 GType Glib::Value<Gtk::RecentSortType>::value_type()
108 return gtk_recent_sort_type_get_type();
112 Gtk::RecentChooserError::RecentChooserError(Gtk::RecentChooserError::Code error_code, const Glib::ustring& error_message)
114 Glib::Error (GTK_RECENT_CHOOSER_ERROR, error_code, error_message)
117 Gtk::RecentChooserError::RecentChooserError(GError* gobject)
119 Glib::Error (gobject)
122 Gtk::RecentChooserError::Code Gtk::RecentChooserError::code() const
124 return static_cast<Code>(Glib::Error::code());
127 #ifdef GLIBMM_EXCEPTIONS_ENABLED
128 void Gtk::RecentChooserError::throw_func(GError* gobject)
130 throw Gtk::RecentChooserError(gobject);
133 //When not using exceptions, we just pass the Exception object around without throwing it:
134 std::auto_ptr<Glib::Error> Gtk::RecentChooserError::throw_func(GError* gobject)
136 return std::auto_ptr<Glib::Error>(new Gtk::RecentChooserError(gobject));
138 #endif //GLIBMM_EXCEPTIONS_ENABLED
141 GType Glib::Value<Gtk::RecentChooserError::Code>::value_type()
143 return gtk_recent_chooser_error_get_type();
150 Glib::RefPtr<Gtk::RecentChooser> wrap(GtkRecentChooser* object, bool take_copy)
152 return Glib::RefPtr<Gtk::RecentChooser>( dynamic_cast<Gtk::RecentChooser*> (Glib::wrap_auto_interface<Gtk::RecentChooser> ((GObject*)(object), take_copy)) );
153 //We use dynamic_cast<> in case of multiple inheritance.
163 /* The *_Class implementation: */
165 const Glib::Interface_Class& RecentChooser_Class::init()
167 if(!gtype_) // create the GType if necessary
169 // Glib::Interface_Class has to know the interface init function
170 // in order to add interfaces to implementing types.
171 class_init_func_ = &RecentChooser_Class::iface_init_function;
173 // We can not derive from another interface, and it is not necessary anyway.
174 gtype_ = gtk_recent_chooser_get_type();
180 void RecentChooser_Class::iface_init_function(void* g_iface, void*)
182 BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
184 //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
185 //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
186 g_assert(klass != 0);
188 #ifdef GLIBMM_VFUNCS_ENABLED
189 klass->get_current_uri = &get_current_uri_vfunc_callback;
190 klass->unselect_uri = &unselect_uri_vfunc_callback;
191 klass->select_all = &select_all_vfunc_callback;
192 klass->unselect_all = &unselect_all_vfunc_callback;
193 klass->get_recent_manager = &get_recent_manager_vfunc_callback;
194 klass->add_filter = &add_filter_vfunc_callback;
195 klass->remove_filter = &remove_filter_vfunc_callback;
196 #endif //GLIBMM_VFUNCS_ENABLED
198 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
199 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
202 #ifdef GLIBMM_VFUNCS_ENABLED
203 gchar* RecentChooser_Class::get_current_uri_vfunc_callback(GtkRecentChooser* self)
205 Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
206 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
208 // Non-gtkmmproc-generated custom classes implicitly call the default
209 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
210 // generated classes can use this optimisation, which avoids the unnecessary
211 // parameter conversions if there is no possibility of the virtual function
213 if(obj_base && obj_base->is_derived_())
215 CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
216 if(obj) // This can be NULL during destruction.
218 #ifdef GLIBMM_EXCEPTIONS_ENABLED
219 try // Trap C++ exceptions which would normally be lost because this is a C callback.
221 #endif //GLIBMM_EXCEPTIONS_ENABLED
222 // Call the virtual member method, which derived classes might override.
223 return g_strdup((obj->get_current_uri_vfunc()).c_str());
224 #ifdef GLIBMM_EXCEPTIONS_ENABLED
228 Glib::exception_handlers_invoke();
230 #endif //GLIBMM_EXCEPTIONS_ENABLED
234 BaseClassType *const base = static_cast<BaseClassType*>(
235 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
236 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
239 // Call the original underlying C function:
240 if(base && base->get_current_uri)
241 return (*base->get_current_uri)(self);
244 typedef gchar* RType;
247 void RecentChooser_Class::unselect_uri_vfunc_callback(GtkRecentChooser* self, const gchar* uri)
249 Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
250 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
252 // Non-gtkmmproc-generated custom classes implicitly call the default
253 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
254 // generated classes can use this optimisation, which avoids the unnecessary
255 // parameter conversions if there is no possibility of the virtual function
257 if(obj_base && obj_base->is_derived_())
259 CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
260 if(obj) // This can be NULL during destruction.
262 #ifdef GLIBMM_EXCEPTIONS_ENABLED
263 try // Trap C++ exceptions which would normally be lost because this is a C callback.
265 #endif //GLIBMM_EXCEPTIONS_ENABLED
266 // Call the virtual member method, which derived classes might override.
267 obj->unselect_uri_vfunc(Glib::convert_const_gchar_ptr_to_ustring(uri)
270 #ifdef GLIBMM_EXCEPTIONS_ENABLED
274 Glib::exception_handlers_invoke();
276 #endif //GLIBMM_EXCEPTIONS_ENABLED
280 BaseClassType *const base = static_cast<BaseClassType*>(
281 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
282 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
285 // Call the original underlying C function:
286 if(base && base->unselect_uri)
287 (*base->unselect_uri)(self, uri);
290 void RecentChooser_Class::select_all_vfunc_callback(GtkRecentChooser* self)
292 Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
293 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
295 // Non-gtkmmproc-generated custom classes implicitly call the default
296 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
297 // generated classes can use this optimisation, which avoids the unnecessary
298 // parameter conversions if there is no possibility of the virtual function
300 if(obj_base && obj_base->is_derived_())
302 CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
303 if(obj) // This can be NULL during destruction.
305 #ifdef GLIBMM_EXCEPTIONS_ENABLED
306 try // Trap C++ exceptions which would normally be lost because this is a C callback.
308 #endif //GLIBMM_EXCEPTIONS_ENABLED
309 // Call the virtual member method, which derived classes might override.
310 obj->select_all_vfunc();
312 #ifdef GLIBMM_EXCEPTIONS_ENABLED
316 Glib::exception_handlers_invoke();
318 #endif //GLIBMM_EXCEPTIONS_ENABLED
322 BaseClassType *const base = static_cast<BaseClassType*>(
323 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
324 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
327 // Call the original underlying C function:
328 if(base && base->select_all)
329 (*base->select_all)(self);
332 void RecentChooser_Class::unselect_all_vfunc_callback(GtkRecentChooser* self)
334 Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
335 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
337 // Non-gtkmmproc-generated custom classes implicitly call the default
338 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
339 // generated classes can use this optimisation, which avoids the unnecessary
340 // parameter conversions if there is no possibility of the virtual function
342 if(obj_base && obj_base->is_derived_())
344 CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
345 if(obj) // This can be NULL during destruction.
347 #ifdef GLIBMM_EXCEPTIONS_ENABLED
348 try // Trap C++ exceptions which would normally be lost because this is a C callback.
350 #endif //GLIBMM_EXCEPTIONS_ENABLED
351 // Call the virtual member method, which derived classes might override.
352 obj->unselect_all_vfunc();
354 #ifdef GLIBMM_EXCEPTIONS_ENABLED
358 Glib::exception_handlers_invoke();
360 #endif //GLIBMM_EXCEPTIONS_ENABLED
364 BaseClassType *const base = static_cast<BaseClassType*>(
365 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
366 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
369 // Call the original underlying C function:
370 if(base && base->unselect_all)
371 (*base->unselect_all)(self);
374 GtkRecentManager* RecentChooser_Class::get_recent_manager_vfunc_callback(GtkRecentChooser* self)
376 Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
377 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
379 // Non-gtkmmproc-generated custom classes implicitly call the default
380 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
381 // generated classes can use this optimisation, which avoids the unnecessary
382 // parameter conversions if there is no possibility of the virtual function
384 if(obj_base && obj_base->is_derived_())
386 CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
387 if(obj) // This can be NULL during destruction.
389 #ifdef GLIBMM_EXCEPTIONS_ENABLED
390 try // Trap C++ exceptions which would normally be lost because this is a C callback.
392 #endif //GLIBMM_EXCEPTIONS_ENABLED
393 // Call the virtual member method, which derived classes might override.
394 return Glib::unwrap(obj->get_recent_manager_vfunc());
395 #ifdef GLIBMM_EXCEPTIONS_ENABLED
399 Glib::exception_handlers_invoke();
401 #endif //GLIBMM_EXCEPTIONS_ENABLED
405 BaseClassType *const base = static_cast<BaseClassType*>(
406 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
407 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
410 // Call the original underlying C function:
411 if(base && base->get_recent_manager)
412 return (*base->get_recent_manager)(self);
415 typedef GtkRecentManager* RType;
418 void RecentChooser_Class::add_filter_vfunc_callback(GtkRecentChooser* self, GtkRecentFilter* filter)
420 Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
421 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
423 // Non-gtkmmproc-generated custom classes implicitly call the default
424 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
425 // generated classes can use this optimisation, which avoids the unnecessary
426 // parameter conversions if there is no possibility of the virtual function
428 if(obj_base && obj_base->is_derived_())
430 CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
431 if(obj) // This can be NULL during destruction.
433 #ifdef GLIBMM_EXCEPTIONS_ENABLED
434 try // Trap C++ exceptions which would normally be lost because this is a C callback.
436 #endif //GLIBMM_EXCEPTIONS_ENABLED
437 // Call the virtual member method, which derived classes might override.
438 obj->add_filter_vfunc(*Glib::wrap(filter)
441 #ifdef GLIBMM_EXCEPTIONS_ENABLED
445 Glib::exception_handlers_invoke();
447 #endif //GLIBMM_EXCEPTIONS_ENABLED
451 BaseClassType *const base = static_cast<BaseClassType*>(
452 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
453 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
456 // Call the original underlying C function:
457 if(base && base->add_filter)
458 (*base->add_filter)(self, filter);
461 void RecentChooser_Class::remove_filter_vfunc_callback(GtkRecentChooser* self, GtkRecentFilter* filter)
463 Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
464 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
466 // Non-gtkmmproc-generated custom classes implicitly call the default
467 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
468 // generated classes can use this optimisation, which avoids the unnecessary
469 // parameter conversions if there is no possibility of the virtual function
471 if(obj_base && obj_base->is_derived_())
473 CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
474 if(obj) // This can be NULL during destruction.
476 #ifdef GLIBMM_EXCEPTIONS_ENABLED
477 try // Trap C++ exceptions which would normally be lost because this is a C callback.
479 #endif //GLIBMM_EXCEPTIONS_ENABLED
480 // Call the virtual member method, which derived classes might override.
481 obj->remove_filter_vfunc(*Glib::wrap(filter)
484 #ifdef GLIBMM_EXCEPTIONS_ENABLED
488 Glib::exception_handlers_invoke();
490 #endif //GLIBMM_EXCEPTIONS_ENABLED
494 BaseClassType *const base = static_cast<BaseClassType*>(
495 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
496 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
499 // Call the original underlying C function:
500 if(base && base->remove_filter)
501 (*base->remove_filter)(self, filter);
504 #endif //GLIBMM_VFUNCS_ENABLED
506 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
507 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
510 Glib::ObjectBase* RecentChooser_Class::wrap_new(GObject* object)
512 return new RecentChooser((GtkRecentChooser*)(object));
516 /* The implementation: */
518 RecentChooser::RecentChooser()
520 Glib::Interface(recentchooser_class_.init())
523 RecentChooser::RecentChooser(GtkRecentChooser* castitem)
525 Glib::Interface((GObject*)(castitem))
528 RecentChooser::~RecentChooser()
532 void RecentChooser::add_interface(GType gtype_implementer)
534 recentchooser_class_.init().add_interface(gtype_implementer);
537 RecentChooser::CppClassType RecentChooser::recentchooser_class_; // initialize static member
539 GType RecentChooser::get_type()
541 return recentchooser_class_.init().get_type();
544 GType RecentChooser::get_base_type()
546 return gtk_recent_chooser_get_type();
550 void RecentChooser::set_show_private(bool show_private)
552 gtk_recent_chooser_set_show_private(gobj(), static_cast<int>(show_private));
555 bool RecentChooser::get_show_private() const
557 return gtk_recent_chooser_get_show_private(const_cast<GtkRecentChooser*>(gobj()));
560 void RecentChooser::set_show_not_found(bool show_not_found)
562 gtk_recent_chooser_set_show_not_found(gobj(), static_cast<int>(show_not_found));
565 bool RecentChooser::get_show_not_found() const
567 return gtk_recent_chooser_get_show_not_found(const_cast<GtkRecentChooser*>(gobj()));
570 void RecentChooser::set_select_multiple(bool select_multiple)
572 gtk_recent_chooser_set_select_multiple(gobj(), static_cast<int>(select_multiple));
575 bool RecentChooser::get_select_multiple() const
577 return gtk_recent_chooser_get_select_multiple(const_cast<GtkRecentChooser*>(gobj()));
580 void RecentChooser::set_limit(int limit)
582 gtk_recent_chooser_set_limit(gobj(), limit);
585 int RecentChooser::get_limit() const
587 return gtk_recent_chooser_get_limit(const_cast<GtkRecentChooser*>(gobj()));
590 void RecentChooser::set_local_only(bool local_only)
592 gtk_recent_chooser_set_local_only(gobj(), static_cast<int>(local_only));
595 bool RecentChooser::get_local_only() const
597 return gtk_recent_chooser_get_local_only(const_cast<GtkRecentChooser*>(gobj()));
600 void RecentChooser::set_show_tips(bool show_tips)
602 gtk_recent_chooser_set_show_tips(gobj(), static_cast<int>(show_tips));
605 bool RecentChooser::get_show_tips() const
607 return gtk_recent_chooser_get_show_tips(const_cast<GtkRecentChooser*>(gobj()));
610 void RecentChooser::set_show_icons(bool show_icons)
612 gtk_recent_chooser_set_show_icons(gobj(), static_cast<int>(show_icons));
615 bool RecentChooser::get_show_icons() const
617 return gtk_recent_chooser_get_show_icons(const_cast<GtkRecentChooser*>(gobj()));
620 void RecentChooser::set_sort_type(RecentSortType sort_type)
622 gtk_recent_chooser_set_sort_type(gobj(), ((GtkRecentSortType)(sort_type)));
625 RecentSortType RecentChooser::get_sort_type() const
627 return ((RecentSortType)(gtk_recent_chooser_get_sort_type(const_cast<GtkRecentChooser*>(gobj()))));
630 #ifdef GLIBMM_EXCEPTIONS_ENABLED
631 bool RecentChooser::set_current_uri(const Glib::ustring& uri)
633 bool RecentChooser::set_current_uri(const Glib::ustring& uri, std::auto_ptr<Glib::Error>& error)
634 #endif //GLIBMM_EXCEPTIONS_ENABLED
637 bool retvalue = gtk_recent_chooser_set_current_uri(gobj(), uri.c_str(), &(gerror));
638 #ifdef GLIBMM_EXCEPTIONS_ENABLED
640 ::Glib::Error::throw_exception(gerror);
643 error = ::Glib::Error::throw_exception(gerror);
644 #endif //GLIBMM_EXCEPTIONS_ENABLED
650 Glib::ustring RecentChooser::get_current_uri() const
652 return Glib::convert_return_gchar_ptr_to_ustring(gtk_recent_chooser_get_current_uri(const_cast<GtkRecentChooser*>(gobj())));
655 Glib::RefPtr<RecentInfo> RecentChooser::get_current_item()
658 Glib::RefPtr<RecentInfo> retvalue = Glib::wrap(gtk_recent_chooser_get_current_item(gobj()));
660 retvalue->reference(); //The function does not do a ref for us.
665 Glib::RefPtr<const RecentInfo> RecentChooser::get_current_item() const
668 Glib::RefPtr<const RecentInfo> retvalue = Glib::wrap(gtk_recent_chooser_get_current_item(const_cast<GtkRecentChooser*>(gobj())));
670 retvalue->reference(); //The function does not do a ref for us.
675 #ifdef GLIBMM_EXCEPTIONS_ENABLED
676 bool RecentChooser::select_uri(const Glib::ustring& uri)
678 bool RecentChooser::select_uri(const Glib::ustring& uri, std::auto_ptr<Glib::Error>& error)
679 #endif //GLIBMM_EXCEPTIONS_ENABLED
682 bool retvalue = gtk_recent_chooser_select_uri(gobj(), uri.c_str(), &(gerror));
683 #ifdef GLIBMM_EXCEPTIONS_ENABLED
685 ::Glib::Error::throw_exception(gerror);
688 error = ::Glib::Error::throw_exception(gerror);
689 #endif //GLIBMM_EXCEPTIONS_ENABLED
695 void RecentChooser::unselect_uri(const Glib::ustring& uri)
697 gtk_recent_chooser_unselect_uri(gobj(), uri.c_str());
700 void RecentChooser::select_all()
702 gtk_recent_chooser_select_all(gobj());
705 void RecentChooser::unselect_all()
707 gtk_recent_chooser_unselect_all(gobj());
710 ListHandle_RecentInfos RecentChooser::get_items() const
712 return ListHandle_RecentInfos(gtk_recent_chooser_get_items(const_cast<GtkRecentChooser*>(gobj())), Glib::OWNERSHIP_SHALLOW);
715 void RecentChooser::add_filter(const RecentFilter& filter)
717 gtk_recent_chooser_add_filter(gobj(), const_cast<GtkRecentFilter*>((filter).gobj()));
720 void RecentChooser::remove_filter(const RecentFilter& filter)
722 gtk_recent_chooser_remove_filter(gobj(), const_cast<GtkRecentFilter*>((filter).gobj()));
725 Glib::SListHandle<RecentFilter*> RecentChooser::list_filters()
727 return Glib::SListHandle<RecentFilter*>(gtk_recent_chooser_list_filters(gobj()), Glib::OWNERSHIP_SHALLOW);
730 Glib::SListHandle<const RecentFilter*> RecentChooser::list_filters() const
732 return Glib::SListHandle<const RecentFilter*>(gtk_recent_chooser_list_filters(const_cast<GtkRecentChooser*>(gobj())), Glib::OWNERSHIP_SHALLOW);
735 void RecentChooser::set_filter(const RecentFilter& filter)
737 gtk_recent_chooser_set_filter(gobj(), const_cast<GtkRecentFilter*>((filter).gobj()));
740 RecentFilter* RecentChooser::get_filter()
742 return Glib::wrap(gtk_recent_chooser_get_filter(gobj()));
745 const RecentFilter* RecentChooser::get_filter() const
747 return Glib::wrap(gtk_recent_chooser_get_filter(const_cast<GtkRecentChooser*>(gobj())));
751 Glib::SignalProxy0< void > RecentChooser::signal_selection_changed()
753 return Glib::SignalProxy0< void >(this, &RecentChooser_signal_selection_changed_info);
757 Glib::SignalProxy0< void > RecentChooser::signal_item_activated()
759 return Glib::SignalProxy0< void >(this, &RecentChooser_signal_item_activated_info);
763 #ifdef GLIBMM_PROPERTIES_ENABLED
764 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<RecentManager> > RecentChooser::property_recent_manager() const
766 return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<RecentManager> >(this, "recent-manager");
768 #endif //GLIBMM_PROPERTIES_ENABLED
770 #ifdef GLIBMM_PROPERTIES_ENABLED
771 Glib::PropertyProxy<bool> RecentChooser::property_show_private()
773 return Glib::PropertyProxy<bool>(this, "show-private");
775 #endif //GLIBMM_PROPERTIES_ENABLED
777 #ifdef GLIBMM_PROPERTIES_ENABLED
778 Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_show_private() const
780 return Glib::PropertyProxy_ReadOnly<bool>(this, "show-private");
782 #endif //GLIBMM_PROPERTIES_ENABLED
784 #ifdef GLIBMM_PROPERTIES_ENABLED
785 Glib::PropertyProxy<bool> RecentChooser::property_show_tips()
787 return Glib::PropertyProxy<bool>(this, "show-tips");
789 #endif //GLIBMM_PROPERTIES_ENABLED
791 #ifdef GLIBMM_PROPERTIES_ENABLED
792 Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_show_tips() const
794 return Glib::PropertyProxy_ReadOnly<bool>(this, "show-tips");
796 #endif //GLIBMM_PROPERTIES_ENABLED
798 #ifdef GLIBMM_PROPERTIES_ENABLED
799 Glib::PropertyProxy<bool> RecentChooser::property_show_icons()
801 return Glib::PropertyProxy<bool>(this, "show-icons");
803 #endif //GLIBMM_PROPERTIES_ENABLED
805 #ifdef GLIBMM_PROPERTIES_ENABLED
806 Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_show_icons() const
808 return Glib::PropertyProxy_ReadOnly<bool>(this, "show-icons");
810 #endif //GLIBMM_PROPERTIES_ENABLED
812 #ifdef GLIBMM_PROPERTIES_ENABLED
813 Glib::PropertyProxy<bool> RecentChooser::property_show_not_found()
815 return Glib::PropertyProxy<bool>(this, "show-not-found");
817 #endif //GLIBMM_PROPERTIES_ENABLED
819 #ifdef GLIBMM_PROPERTIES_ENABLED
820 Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_show_not_found() const
822 return Glib::PropertyProxy_ReadOnly<bool>(this, "show-not-found");
824 #endif //GLIBMM_PROPERTIES_ENABLED
826 #ifdef GLIBMM_PROPERTIES_ENABLED
827 Glib::PropertyProxy<bool> RecentChooser::property_select_multiple()
829 return Glib::PropertyProxy<bool>(this, "select-multiple");
831 #endif //GLIBMM_PROPERTIES_ENABLED
833 #ifdef GLIBMM_PROPERTIES_ENABLED
834 Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_select_multiple() const
836 return Glib::PropertyProxy_ReadOnly<bool>(this, "select-multiple");
838 #endif //GLIBMM_PROPERTIES_ENABLED
840 #ifdef GLIBMM_PROPERTIES_ENABLED
841 Glib::PropertyProxy<bool> RecentChooser::property_local_only()
843 return Glib::PropertyProxy<bool>(this, "local-only");
845 #endif //GLIBMM_PROPERTIES_ENABLED
847 #ifdef GLIBMM_PROPERTIES_ENABLED
848 Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_local_only() const
850 return Glib::PropertyProxy_ReadOnly<bool>(this, "local-only");
852 #endif //GLIBMM_PROPERTIES_ENABLED
854 #ifdef GLIBMM_PROPERTIES_ENABLED
855 Glib::PropertyProxy<int> RecentChooser::property_limit()
857 return Glib::PropertyProxy<int>(this, "limit");
859 #endif //GLIBMM_PROPERTIES_ENABLED
861 #ifdef GLIBMM_PROPERTIES_ENABLED
862 Glib::PropertyProxy_ReadOnly<int> RecentChooser::property_limit() const
864 return Glib::PropertyProxy_ReadOnly<int>(this, "limit");
866 #endif //GLIBMM_PROPERTIES_ENABLED
868 #ifdef GLIBMM_PROPERTIES_ENABLED
869 Glib::PropertyProxy<RecentSortType> RecentChooser::property_sort_type()
871 return Glib::PropertyProxy<RecentSortType>(this, "sort-type");
873 #endif //GLIBMM_PROPERTIES_ENABLED
875 #ifdef GLIBMM_PROPERTIES_ENABLED
876 Glib::PropertyProxy_ReadOnly<RecentSortType> RecentChooser::property_sort_type() const
878 return Glib::PropertyProxy_ReadOnly<RecentSortType>(this, "sort-type");
880 #endif //GLIBMM_PROPERTIES_ENABLED
882 #ifdef GLIBMM_PROPERTIES_ENABLED
883 Glib::PropertyProxy<RecentFilter*> RecentChooser::property_filter()
885 return Glib::PropertyProxy<RecentFilter*>(this, "filter");
887 #endif //GLIBMM_PROPERTIES_ENABLED
889 #ifdef GLIBMM_PROPERTIES_ENABLED
890 Glib::PropertyProxy_ReadOnly<RecentFilter*> RecentChooser::property_filter() const
892 return Glib::PropertyProxy_ReadOnly<RecentFilter*>(this, "filter");
894 #endif //GLIBMM_PROPERTIES_ENABLED
897 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
898 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
900 #ifdef GLIBMM_VFUNCS_ENABLED
901 Glib::ustring Gtk::RecentChooser::get_current_uri_vfunc() const
903 BaseClassType *const base = static_cast<BaseClassType*>(
904 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
905 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
908 if(base && base->get_current_uri)
909 return Glib::convert_const_gchar_ptr_to_ustring((*base->get_current_uri)(const_cast<GtkRecentChooser*>(gobj())));
911 typedef Glib::ustring RType;
914 void Gtk::RecentChooser::unselect_uri_vfunc(const Glib::ustring& uri)
916 BaseClassType *const base = static_cast<BaseClassType*>(
917 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
918 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
921 if(base && base->unselect_uri)
922 (*base->unselect_uri)(gobj(),uri.c_str());
924 void Gtk::RecentChooser::select_all_vfunc()
926 BaseClassType *const base = static_cast<BaseClassType*>(
927 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
928 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
931 if(base && base->select_all)
932 (*base->select_all)(gobj());
934 void Gtk::RecentChooser::unselect_all_vfunc()
936 BaseClassType *const base = static_cast<BaseClassType*>(
937 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
938 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
941 if(base && base->unselect_all)
942 (*base->unselect_all)(gobj());
944 Glib::RefPtr<RecentManager> Gtk::RecentChooser::get_recent_manager_vfunc()
946 BaseClassType *const base = static_cast<BaseClassType*>(
947 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
948 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
951 if(base && base->get_recent_manager)
952 return Glib::wrap((*base->get_recent_manager)(gobj()));
954 typedef Glib::RefPtr<RecentManager> RType;
957 void Gtk::RecentChooser::add_filter_vfunc(const RecentFilter& filter)
959 BaseClassType *const base = static_cast<BaseClassType*>(
960 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
961 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
964 if(base && base->add_filter)
965 (*base->add_filter)(gobj(),const_cast<GtkRecentFilter*>((filter).gobj()));
967 void Gtk::RecentChooser::remove_filter_vfunc(const RecentFilter& filter)
969 BaseClassType *const base = static_cast<BaseClassType*>(
970 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
971 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
974 if(base && base->remove_filter)
975 (*base->remove_filter)(gobj(),const_cast<GtkRecentFilter*>((filter).gobj()));
977 #endif //GLIBMM_VFUNCS_ENABLED