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 Lesser General Public
11
* License as published by the Free Software Foundation; either
12
* version 2.1 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
* Lesser General Public License for more details.
19
* You should have received a copy of the GNU Lesser 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 <glibmm/vectorutils.h>
28
// This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
30
static int SignalProxy_Compare_gtk_callback(GtkRecentInfo* a, GtkRecentInfo* b, gpointer data)
32
const Gtk::RecentChooser::SlotCompare* the_slot = static_cast<Gtk::RecentChooser::SlotCompare*>(data);
36
return (*the_slot)(Glib::wrap(a, true /* take reference */), Glib::wrap(b, true /* take reference */));
40
Glib::exception_handlers_invoke();
46
static void SignalProxy_Compare_gtk_callback_destroy(gpointer data)
48
delete static_cast<Gtk::RecentChooser::SlotCompare*>(data);
55
void RecentChooser::set_sort_func(const SlotCompare& slot)
57
SlotCompare* slot_copy = new SlotCompare(slot);
59
gtk_recent_chooser_set_sort_func(
61
&SignalProxy_Compare_gtk_callback, slot_copy,
62
&SignalProxy_Compare_gtk_callback_destroy);
65
std::vector<Glib::ustring> RecentChooser::get_uris() const
67
return Glib::ArrayHandler<Glib::ustring>::array_to_vector(gtk_recent_chooser_get_uris(const_cast<GtkRecentChooser*>(gobj()), NULL), Glib::OWNERSHIP_DEEP);
70
void RecentChooser::unset_limit()
72
gtk_recent_chooser_set_limit(gobj(), -1 /* See C docs */);
82
static const Glib::SignalProxyInfo RecentChooser_signal_selection_changed_info =
85
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
86
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback
90
static const Glib::SignalProxyInfo RecentChooser_signal_item_activated_info =
93
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
94
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback
98
} // anonymous namespace
101
GType Glib::Value<Gtk::RecentSortType>::value_type()
103
return gtk_recent_sort_type_get_type();
107
Gtk::RecentChooserError::RecentChooserError(Gtk::RecentChooserError::Code error_code, const Glib::ustring& error_message)
109
Glib::Error (GTK_RECENT_CHOOSER_ERROR, error_code, error_message)
112
Gtk::RecentChooserError::RecentChooserError(GError* gobject)
114
Glib::Error (gobject)
117
Gtk::RecentChooserError::Code Gtk::RecentChooserError::code() const
119
return static_cast<Code>(Glib::Error::code());
122
void Gtk::RecentChooserError::throw_func(GError* gobject)
124
throw Gtk::RecentChooserError(gobject);
128
GType Glib::Value<Gtk::RecentChooserError::Code>::value_type()
130
return gtk_recent_chooser_error_get_type();
137
Glib::RefPtr<Gtk::RecentChooser> wrap(GtkRecentChooser* object, bool take_copy)
139
return Glib::RefPtr<Gtk::RecentChooser>( dynamic_cast<Gtk::RecentChooser*> (Glib::wrap_auto_interface<Gtk::RecentChooser> ((GObject*)(object), take_copy)) );
140
//We use dynamic_cast<> in case of multiple inheritance.
150
/* The *_Class implementation: */
152
const Glib::Interface_Class& RecentChooser_Class::init()
154
if(!gtype_) // create the GType if necessary
156
// Glib::Interface_Class has to know the interface init function
157
// in order to add interfaces to implementing types.
158
class_init_func_ = &RecentChooser_Class::iface_init_function;
160
// We can not derive from another interface, and it is not necessary anyway.
161
gtype_ = gtk_recent_chooser_get_type();
167
void RecentChooser_Class::iface_init_function(void* g_iface, void*)
169
BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
171
//This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
172
//This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
173
g_assert(klass != 0);
175
klass->get_current_uri = &get_current_uri_vfunc_callback;
176
klass->unselect_uri = &unselect_uri_vfunc_callback;
177
klass->select_all = &select_all_vfunc_callback;
178
klass->unselect_all = &unselect_all_vfunc_callback;
179
klass->get_recent_manager = &get_recent_manager_vfunc_callback;
180
klass->add_filter = &add_filter_vfunc_callback;
181
klass->remove_filter = &remove_filter_vfunc_callback;
183
klass->selection_changed = &selection_changed_callback;
184
klass->item_activated = &item_activated_callback;
187
gchar* RecentChooser_Class::get_current_uri_vfunc_callback(GtkRecentChooser* self)
189
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
190
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
192
// Non-gtkmmproc-generated custom classes implicitly call the default
193
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
194
// generated classes can use this optimisation, which avoids the unnecessary
195
// parameter conversions if there is no possibility of the virtual function
197
if(obj_base && obj_base->is_derived_())
199
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
200
if(obj) // This can be NULL during destruction.
202
#ifdef GLIBMM_EXCEPTIONS_ENABLED
203
try // Trap C++ exceptions which would normally be lost because this is a C callback.
205
#endif //GLIBMM_EXCEPTIONS_ENABLED
206
// Call the virtual member method, which derived classes might override.
207
return g_strdup((obj->get_current_uri_vfunc()).c_str());
208
#ifdef GLIBMM_EXCEPTIONS_ENABLED
212
Glib::exception_handlers_invoke();
214
#endif //GLIBMM_EXCEPTIONS_ENABLED
218
BaseClassType *const base = static_cast<BaseClassType*>(
219
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
220
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
223
// Call the original underlying C function:
224
if(base && base->get_current_uri)
225
return (*base->get_current_uri)(self);
228
typedef gchar* RType;
231
void RecentChooser_Class::unselect_uri_vfunc_callback(GtkRecentChooser* self, const gchar* uri)
233
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
234
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
236
// Non-gtkmmproc-generated custom classes implicitly call the default
237
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
238
// generated classes can use this optimisation, which avoids the unnecessary
239
// parameter conversions if there is no possibility of the virtual function
241
if(obj_base && obj_base->is_derived_())
243
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
244
if(obj) // This can be NULL during destruction.
246
#ifdef GLIBMM_EXCEPTIONS_ENABLED
247
try // Trap C++ exceptions which would normally be lost because this is a C callback.
249
#endif //GLIBMM_EXCEPTIONS_ENABLED
250
// Call the virtual member method, which derived classes might override.
251
obj->unselect_uri_vfunc(Glib::convert_const_gchar_ptr_to_ustring(uri)
254
#ifdef GLIBMM_EXCEPTIONS_ENABLED
258
Glib::exception_handlers_invoke();
260
#endif //GLIBMM_EXCEPTIONS_ENABLED
264
BaseClassType *const base = static_cast<BaseClassType*>(
265
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
266
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
269
// Call the original underlying C function:
270
if(base && base->unselect_uri)
271
(*base->unselect_uri)(self, uri);
274
void RecentChooser_Class::select_all_vfunc_callback(GtkRecentChooser* self)
276
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
277
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
279
// Non-gtkmmproc-generated custom classes implicitly call the default
280
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
281
// generated classes can use this optimisation, which avoids the unnecessary
282
// parameter conversions if there is no possibility of the virtual function
284
if(obj_base && obj_base->is_derived_())
286
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
287
if(obj) // This can be NULL during destruction.
289
#ifdef GLIBMM_EXCEPTIONS_ENABLED
290
try // Trap C++ exceptions which would normally be lost because this is a C callback.
292
#endif //GLIBMM_EXCEPTIONS_ENABLED
293
// Call the virtual member method, which derived classes might override.
294
obj->select_all_vfunc();
296
#ifdef GLIBMM_EXCEPTIONS_ENABLED
300
Glib::exception_handlers_invoke();
302
#endif //GLIBMM_EXCEPTIONS_ENABLED
306
BaseClassType *const base = static_cast<BaseClassType*>(
307
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
308
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
311
// Call the original underlying C function:
312
if(base && base->select_all)
313
(*base->select_all)(self);
316
void RecentChooser_Class::unselect_all_vfunc_callback(GtkRecentChooser* self)
318
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
319
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
321
// Non-gtkmmproc-generated custom classes implicitly call the default
322
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
323
// generated classes can use this optimisation, which avoids the unnecessary
324
// parameter conversions if there is no possibility of the virtual function
326
if(obj_base && obj_base->is_derived_())
328
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
329
if(obj) // This can be NULL during destruction.
331
#ifdef GLIBMM_EXCEPTIONS_ENABLED
332
try // Trap C++ exceptions which would normally be lost because this is a C callback.
334
#endif //GLIBMM_EXCEPTIONS_ENABLED
335
// Call the virtual member method, which derived classes might override.
336
obj->unselect_all_vfunc();
338
#ifdef GLIBMM_EXCEPTIONS_ENABLED
342
Glib::exception_handlers_invoke();
344
#endif //GLIBMM_EXCEPTIONS_ENABLED
348
BaseClassType *const base = static_cast<BaseClassType*>(
349
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
350
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
353
// Call the original underlying C function:
354
if(base && base->unselect_all)
355
(*base->unselect_all)(self);
358
GtkRecentManager* RecentChooser_Class::get_recent_manager_vfunc_callback(GtkRecentChooser* self)
360
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
361
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
363
// Non-gtkmmproc-generated custom classes implicitly call the default
364
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
365
// generated classes can use this optimisation, which avoids the unnecessary
366
// parameter conversions if there is no possibility of the virtual function
368
if(obj_base && obj_base->is_derived_())
370
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
371
if(obj) // This can be NULL during destruction.
373
#ifdef GLIBMM_EXCEPTIONS_ENABLED
374
try // Trap C++ exceptions which would normally be lost because this is a C callback.
376
#endif //GLIBMM_EXCEPTIONS_ENABLED
377
// Call the virtual member method, which derived classes might override.
378
return Glib::unwrap(obj->get_recent_manager_vfunc());
379
#ifdef GLIBMM_EXCEPTIONS_ENABLED
383
Glib::exception_handlers_invoke();
385
#endif //GLIBMM_EXCEPTIONS_ENABLED
389
BaseClassType *const base = static_cast<BaseClassType*>(
390
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
391
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
394
// Call the original underlying C function:
395
if(base && base->get_recent_manager)
396
return (*base->get_recent_manager)(self);
399
typedef GtkRecentManager* RType;
402
void RecentChooser_Class::add_filter_vfunc_callback(GtkRecentChooser* self, GtkRecentFilter* filter)
404
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
405
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
407
// Non-gtkmmproc-generated custom classes implicitly call the default
408
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
409
// generated classes can use this optimisation, which avoids the unnecessary
410
// parameter conversions if there is no possibility of the virtual function
412
if(obj_base && obj_base->is_derived_())
414
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
415
if(obj) // This can be NULL during destruction.
417
#ifdef GLIBMM_EXCEPTIONS_ENABLED
418
try // Trap C++ exceptions which would normally be lost because this is a C callback.
420
#endif //GLIBMM_EXCEPTIONS_ENABLED
421
// Call the virtual member method, which derived classes might override.
422
obj->add_filter_vfunc(Glib::wrap(filter, true)
425
#ifdef GLIBMM_EXCEPTIONS_ENABLED
429
Glib::exception_handlers_invoke();
431
#endif //GLIBMM_EXCEPTIONS_ENABLED
435
BaseClassType *const base = static_cast<BaseClassType*>(
436
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
437
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
440
// Call the original underlying C function:
441
if(base && base->add_filter)
442
(*base->add_filter)(self, filter);
445
void RecentChooser_Class::remove_filter_vfunc_callback(GtkRecentChooser* self, GtkRecentFilter* filter)
447
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
448
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
450
// Non-gtkmmproc-generated custom classes implicitly call the default
451
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
452
// generated classes can use this optimisation, which avoids the unnecessary
453
// parameter conversions if there is no possibility of the virtual function
455
if(obj_base && obj_base->is_derived_())
457
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
458
if(obj) // This can be NULL during destruction.
460
#ifdef GLIBMM_EXCEPTIONS_ENABLED
461
try // Trap C++ exceptions which would normally be lost because this is a C callback.
463
#endif //GLIBMM_EXCEPTIONS_ENABLED
464
// Call the virtual member method, which derived classes might override.
465
obj->remove_filter_vfunc(Glib::wrap(filter, true)
468
#ifdef GLIBMM_EXCEPTIONS_ENABLED
472
Glib::exception_handlers_invoke();
474
#endif //GLIBMM_EXCEPTIONS_ENABLED
478
BaseClassType *const base = static_cast<BaseClassType*>(
479
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
480
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
483
// Call the original underlying C function:
484
if(base && base->remove_filter)
485
(*base->remove_filter)(self, filter);
489
void RecentChooser_Class::selection_changed_callback(GtkRecentChooser* self)
491
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
492
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
494
// Non-gtkmmproc-generated custom classes implicitly call the default
495
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
496
// generated classes can use this optimisation, which avoids the unnecessary
497
// parameter conversions if there is no possibility of the virtual function
499
if(obj_base && obj_base->is_derived_())
501
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
502
if(obj) // This can be NULL during destruction.
504
#ifdef GLIBMM_EXCEPTIONS_ENABLED
505
try // Trap C++ exceptions which would normally be lost because this is a C callback.
507
#endif //GLIBMM_EXCEPTIONS_ENABLED
508
// Call the virtual member method, which derived classes might override.
509
obj->on_selection_changed();
511
#ifdef GLIBMM_EXCEPTIONS_ENABLED
515
Glib::exception_handlers_invoke();
517
#endif //GLIBMM_EXCEPTIONS_ENABLED
521
BaseClassType *const base = static_cast<BaseClassType*>(
522
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
523
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
526
// Call the original underlying C function:
527
if(base && base->selection_changed)
528
(*base->selection_changed)(self);
530
void RecentChooser_Class::item_activated_callback(GtkRecentChooser* self)
532
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
533
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
535
// Non-gtkmmproc-generated custom classes implicitly call the default
536
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
537
// generated classes can use this optimisation, which avoids the unnecessary
538
// parameter conversions if there is no possibility of the virtual function
540
if(obj_base && obj_base->is_derived_())
542
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
543
if(obj) // This can be NULL during destruction.
545
#ifdef GLIBMM_EXCEPTIONS_ENABLED
546
try // Trap C++ exceptions which would normally be lost because this is a C callback.
548
#endif //GLIBMM_EXCEPTIONS_ENABLED
549
// Call the virtual member method, which derived classes might override.
550
obj->on_item_activated();
552
#ifdef GLIBMM_EXCEPTIONS_ENABLED
556
Glib::exception_handlers_invoke();
558
#endif //GLIBMM_EXCEPTIONS_ENABLED
562
BaseClassType *const base = static_cast<BaseClassType*>(
563
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
564
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
567
// Call the original underlying C function:
568
if(base && base->item_activated)
569
(*base->item_activated)(self);
573
Glib::ObjectBase* RecentChooser_Class::wrap_new(GObject* object)
575
return new RecentChooser((GtkRecentChooser*)(object));
579
/* The implementation: */
581
RecentChooser::RecentChooser()
583
Glib::Interface(recentchooser_class_.init())
586
RecentChooser::RecentChooser(GtkRecentChooser* castitem)
588
Glib::Interface((GObject*)(castitem))
591
RecentChooser::RecentChooser(const Glib::Interface_Class& interface_class)
592
: Glib::Interface(interface_class)
596
RecentChooser::~RecentChooser()
600
void RecentChooser::add_interface(GType gtype_implementer)
602
recentchooser_class_.init().add_interface(gtype_implementer);
605
RecentChooser::CppClassType RecentChooser::recentchooser_class_; // initialize static member
607
GType RecentChooser::get_type()
609
return recentchooser_class_.init().get_type();
613
GType RecentChooser::get_base_type()
615
return gtk_recent_chooser_get_type();
619
void RecentChooser::set_show_private(bool show_private)
621
gtk_recent_chooser_set_show_private(gobj(), static_cast<int>(show_private));
624
bool RecentChooser::get_show_private() const
626
return gtk_recent_chooser_get_show_private(const_cast<GtkRecentChooser*>(gobj()));
629
void RecentChooser::set_show_not_found(bool show_not_found)
631
gtk_recent_chooser_set_show_not_found(gobj(), static_cast<int>(show_not_found));
634
bool RecentChooser::get_show_not_found() const
636
return gtk_recent_chooser_get_show_not_found(const_cast<GtkRecentChooser*>(gobj()));
639
void RecentChooser::set_select_multiple(bool select_multiple)
641
gtk_recent_chooser_set_select_multiple(gobj(), static_cast<int>(select_multiple));
644
bool RecentChooser::get_select_multiple() const
646
return gtk_recent_chooser_get_select_multiple(const_cast<GtkRecentChooser*>(gobj()));
649
void RecentChooser::set_limit(int limit)
651
gtk_recent_chooser_set_limit(gobj(), limit);
654
int RecentChooser::get_limit() const
656
return gtk_recent_chooser_get_limit(const_cast<GtkRecentChooser*>(gobj()));
659
void RecentChooser::set_local_only(bool local_only)
661
gtk_recent_chooser_set_local_only(gobj(), static_cast<int>(local_only));
664
bool RecentChooser::get_local_only() const
666
return gtk_recent_chooser_get_local_only(const_cast<GtkRecentChooser*>(gobj()));
669
void RecentChooser::set_show_tips(bool show_tips)
671
gtk_recent_chooser_set_show_tips(gobj(), static_cast<int>(show_tips));
674
bool RecentChooser::get_show_tips() const
676
return gtk_recent_chooser_get_show_tips(const_cast<GtkRecentChooser*>(gobj()));
679
void RecentChooser::set_show_icons(bool show_icons)
681
gtk_recent_chooser_set_show_icons(gobj(), static_cast<int>(show_icons));
684
bool RecentChooser::get_show_icons() const
686
return gtk_recent_chooser_get_show_icons(const_cast<GtkRecentChooser*>(gobj()));
689
void RecentChooser::set_sort_type(RecentSortType sort_type)
691
gtk_recent_chooser_set_sort_type(gobj(), ((GtkRecentSortType)(sort_type)));
694
RecentSortType RecentChooser::get_sort_type() const
696
return ((RecentSortType)(gtk_recent_chooser_get_sort_type(const_cast<GtkRecentChooser*>(gobj()))));
699
bool RecentChooser::set_current_uri(const Glib::ustring& uri)
702
bool retvalue = gtk_recent_chooser_set_current_uri(gobj(), uri.c_str(), &(gerror));
704
::Glib::Error::throw_exception(gerror);
710
Glib::ustring RecentChooser::get_current_uri() const
712
return Glib::convert_return_gchar_ptr_to_ustring(gtk_recent_chooser_get_current_uri(const_cast<GtkRecentChooser*>(gobj())));
715
Glib::RefPtr<RecentInfo> RecentChooser::get_current_item()
718
Glib::RefPtr<RecentInfo> retvalue = Glib::wrap(gtk_recent_chooser_get_current_item(gobj()));
720
retvalue->reference(); //The function does not do a ref for us.
725
Glib::RefPtr<const RecentInfo> RecentChooser::get_current_item() const
728
Glib::RefPtr<const RecentInfo> retvalue = Glib::wrap(gtk_recent_chooser_get_current_item(const_cast<GtkRecentChooser*>(gobj())));
730
retvalue->reference(); //The function does not do a ref for us.
735
bool RecentChooser::select_uri(const Glib::ustring& uri)
738
bool retvalue = gtk_recent_chooser_select_uri(gobj(), uri.c_str(), &(gerror));
740
::Glib::Error::throw_exception(gerror);
746
void RecentChooser::unselect_uri(const Glib::ustring& uri)
748
gtk_recent_chooser_unselect_uri(gobj(), uri.c_str());
751
void RecentChooser::select_all()
753
gtk_recent_chooser_select_all(gobj());
756
void RecentChooser::unselect_all()
758
gtk_recent_chooser_unselect_all(gobj());
761
std::vector<Glib::RefPtr<RecentInfo> > RecentChooser::get_items() const
763
return Glib::ListHandler<Glib::RefPtr<RecentInfo>, RecentInfoTraits>::list_to_vector(gtk_recent_chooser_get_items(const_cast<GtkRecentChooser*>(gobj())), Glib::OWNERSHIP_SHALLOW);
766
void RecentChooser::add_filter(const Glib::RefPtr<RecentFilter>& filter)
768
gtk_recent_chooser_add_filter(gobj(), Glib::unwrap(filter));
771
void RecentChooser::remove_filter(const Glib::RefPtr<RecentFilter>& filter)
773
gtk_recent_chooser_remove_filter(gobj(), Glib::unwrap(filter));
776
std::vector< Glib::RefPtr<RecentFilter> > RecentChooser::list_filters()
778
return Glib::SListHandler<Glib::RefPtr<RecentFilter> >::slist_to_vector(gtk_recent_chooser_list_filters(gobj()), Glib::OWNERSHIP_SHALLOW);
781
std::vector< Glib::RefPtr<const RecentFilter> > RecentChooser::list_filters() const
783
return Glib::SListHandler<Glib::RefPtr<const RecentFilter> >::slist_to_vector(gtk_recent_chooser_list_filters(const_cast<GtkRecentChooser*>(gobj())), Glib::OWNERSHIP_SHALLOW);
786
void RecentChooser::set_filter(const Glib::RefPtr<RecentFilter>& filter)
788
gtk_recent_chooser_set_filter(gobj(), Glib::unwrap(filter));
791
Glib::RefPtr<RecentFilter> RecentChooser::get_filter()
794
Glib::RefPtr<RecentFilter> retvalue = Glib::wrap(gtk_recent_chooser_get_filter(gobj()));
796
retvalue->reference(); //The function does not do a ref for us.
801
Glib::RefPtr<const RecentFilter> RecentChooser::get_filter() const
803
return const_cast<RecentChooser*>(this)->get_filter();
807
Glib::SignalProxy0< void > RecentChooser::signal_selection_changed()
809
return Glib::SignalProxy0< void >(this, &RecentChooser_signal_selection_changed_info);
813
Glib::SignalProxy0< void > RecentChooser::signal_item_activated()
815
return Glib::SignalProxy0< void >(this, &RecentChooser_signal_item_activated_info);
819
#ifdef GLIBMM_PROPERTIES_ENABLED
820
Glib::PropertyProxy<bool> RecentChooser::property_show_private()
822
return Glib::PropertyProxy<bool>(this, "show-private");
824
#endif //GLIBMM_PROPERTIES_ENABLED
826
#ifdef GLIBMM_PROPERTIES_ENABLED
827
Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_show_private() const
829
return Glib::PropertyProxy_ReadOnly<bool>(this, "show-private");
831
#endif //GLIBMM_PROPERTIES_ENABLED
833
#ifdef GLIBMM_PROPERTIES_ENABLED
834
Glib::PropertyProxy<bool> RecentChooser::property_show_tips()
836
return Glib::PropertyProxy<bool>(this, "show-tips");
838
#endif //GLIBMM_PROPERTIES_ENABLED
840
#ifdef GLIBMM_PROPERTIES_ENABLED
841
Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_show_tips() const
843
return Glib::PropertyProxy_ReadOnly<bool>(this, "show-tips");
845
#endif //GLIBMM_PROPERTIES_ENABLED
847
#ifdef GLIBMM_PROPERTIES_ENABLED
848
Glib::PropertyProxy<bool> RecentChooser::property_show_icons()
850
return Glib::PropertyProxy<bool>(this, "show-icons");
852
#endif //GLIBMM_PROPERTIES_ENABLED
854
#ifdef GLIBMM_PROPERTIES_ENABLED
855
Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_show_icons() const
857
return Glib::PropertyProxy_ReadOnly<bool>(this, "show-icons");
859
#endif //GLIBMM_PROPERTIES_ENABLED
861
#ifdef GLIBMM_PROPERTIES_ENABLED
862
Glib::PropertyProxy<bool> RecentChooser::property_show_not_found()
864
return Glib::PropertyProxy<bool>(this, "show-not-found");
866
#endif //GLIBMM_PROPERTIES_ENABLED
868
#ifdef GLIBMM_PROPERTIES_ENABLED
869
Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_show_not_found() const
871
return Glib::PropertyProxy_ReadOnly<bool>(this, "show-not-found");
873
#endif //GLIBMM_PROPERTIES_ENABLED
875
#ifdef GLIBMM_PROPERTIES_ENABLED
876
Glib::PropertyProxy<bool> RecentChooser::property_select_multiple()
878
return Glib::PropertyProxy<bool>(this, "select-multiple");
880
#endif //GLIBMM_PROPERTIES_ENABLED
882
#ifdef GLIBMM_PROPERTIES_ENABLED
883
Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_select_multiple() const
885
return Glib::PropertyProxy_ReadOnly<bool>(this, "select-multiple");
887
#endif //GLIBMM_PROPERTIES_ENABLED
889
#ifdef GLIBMM_PROPERTIES_ENABLED
890
Glib::PropertyProxy<bool> RecentChooser::property_local_only()
892
return Glib::PropertyProxy<bool>(this, "local-only");
894
#endif //GLIBMM_PROPERTIES_ENABLED
896
#ifdef GLIBMM_PROPERTIES_ENABLED
897
Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_local_only() const
899
return Glib::PropertyProxy_ReadOnly<bool>(this, "local-only");
901
#endif //GLIBMM_PROPERTIES_ENABLED
903
#ifdef GLIBMM_PROPERTIES_ENABLED
904
Glib::PropertyProxy<int> RecentChooser::property_limit()
906
return Glib::PropertyProxy<int>(this, "limit");
908
#endif //GLIBMM_PROPERTIES_ENABLED
910
#ifdef GLIBMM_PROPERTIES_ENABLED
911
Glib::PropertyProxy_ReadOnly<int> RecentChooser::property_limit() const
913
return Glib::PropertyProxy_ReadOnly<int>(this, "limit");
915
#endif //GLIBMM_PROPERTIES_ENABLED
917
#ifdef GLIBMM_PROPERTIES_ENABLED
918
Glib::PropertyProxy<RecentSortType> RecentChooser::property_sort_type()
920
return Glib::PropertyProxy<RecentSortType>(this, "sort-type");
922
#endif //GLIBMM_PROPERTIES_ENABLED
924
#ifdef GLIBMM_PROPERTIES_ENABLED
925
Glib::PropertyProxy_ReadOnly<RecentSortType> RecentChooser::property_sort_type() const
927
return Glib::PropertyProxy_ReadOnly<RecentSortType>(this, "sort-type");
929
#endif //GLIBMM_PROPERTIES_ENABLED
931
#ifdef GLIBMM_PROPERTIES_ENABLED
932
Glib::PropertyProxy< Glib::RefPtr<RecentFilter> > RecentChooser::property_filter()
934
return Glib::PropertyProxy< Glib::RefPtr<RecentFilter> >(this, "filter");
936
#endif //GLIBMM_PROPERTIES_ENABLED
938
#ifdef GLIBMM_PROPERTIES_ENABLED
939
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<RecentFilter> > RecentChooser::property_filter() const
941
return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<RecentFilter> >(this, "filter");
943
#endif //GLIBMM_PROPERTIES_ENABLED
946
void Gtk::RecentChooser::on_selection_changed()
948
BaseClassType *const base = static_cast<BaseClassType*>(
949
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
950
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
953
if(base && base->selection_changed)
954
(*base->selection_changed)(gobj());
956
void Gtk::RecentChooser::on_item_activated()
958
BaseClassType *const base = static_cast<BaseClassType*>(
959
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
960
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
963
if(base && base->item_activated)
964
(*base->item_activated)(gobj());
967
Glib::ustring Gtk::RecentChooser::get_current_uri_vfunc() const
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->get_current_uri)
975
return Glib::convert_const_gchar_ptr_to_ustring((*base->get_current_uri)(const_cast<GtkRecentChooser*>(gobj())));
977
typedef Glib::ustring RType;
980
void Gtk::RecentChooser::unselect_uri_vfunc(const Glib::ustring& uri)
982
BaseClassType *const base = static_cast<BaseClassType*>(
983
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
984
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
987
if(base && base->unselect_uri)
988
(*base->unselect_uri)(gobj(),uri.c_str());
990
void Gtk::RecentChooser::select_all_vfunc()
992
BaseClassType *const base = static_cast<BaseClassType*>(
993
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
994
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
997
if(base && base->select_all)
998
(*base->select_all)(gobj());
1000
void Gtk::RecentChooser::unselect_all_vfunc()
1002
BaseClassType *const base = static_cast<BaseClassType*>(
1003
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1004
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1007
if(base && base->unselect_all)
1008
(*base->unselect_all)(gobj());
1010
Glib::RefPtr<RecentManager> Gtk::RecentChooser::get_recent_manager_vfunc()
1012
BaseClassType *const base = static_cast<BaseClassType*>(
1013
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1014
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1017
if(base && base->get_recent_manager)
1018
return Glib::wrap((*base->get_recent_manager)(gobj()));
1020
typedef Glib::RefPtr<RecentManager> RType;
1023
void Gtk::RecentChooser::add_filter_vfunc(const Glib::RefPtr<RecentFilter>& filter)
1025
BaseClassType *const base = static_cast<BaseClassType*>(
1026
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1027
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1030
if(base && base->add_filter)
1031
(*base->add_filter)(gobj(),Glib::unwrap(filter));
1033
void Gtk::RecentChooser::remove_filter_vfunc(const Glib::RefPtr<RecentFilter>& filter)
1035
BaseClassType *const base = static_cast<BaseClassType*>(
1036
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1037
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1040
if(base && base->remove_filter)
1041
(*base->remove_filter)(gobj(),Glib::unwrap(filter));