1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937
|
// Generated by gtkmmproc -- DO NOT MODIFY!
#include <gtkmm/recentchooser.h>
#include <gtkmm/private/recentchooser_p.h>
/* Copyright 2006 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <gtk/gtk.h>
// This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
static int SignalProxy_Compare_gtk_callback(GtkRecentInfo* a, GtkRecentInfo* b, gpointer data)
{
const Gtk::RecentChooser::SlotCompare* the_slot = static_cast<Gtk::RecentChooser::SlotCompare*>(data);
try
{
return (*the_slot)(Glib::wrap(a, true /* take reference */), Glib::wrap(b, true /* take reference */));
}
catch(...)
{
Glib::exception_handlers_invoke();
}
return 0;
}
static void SignalProxy_Compare_gtk_callback_destroy(gpointer data)
{
delete static_cast<Gtk::RecentChooser::SlotCompare*>(data);
}
namespace Gtk
{
//Allow the generated code to work without the prefix:
typedef RecentChooser::ListHandle_RecentInfos ListHandle_RecentInfos;
void RecentChooser::set_sort_func(const SlotCompare& slot)
{
SlotCompare* slot_copy = new SlotCompare(slot);
gtk_recent_chooser_set_sort_func(
gobj(),
&SignalProxy_Compare_gtk_callback, slot_copy,
&SignalProxy_Compare_gtk_callback_destroy);
}
Glib::StringArrayHandle RecentChooser::get_uris() const
{
return Glib::StringArrayHandle(gtk_recent_chooser_get_uris(const_cast<GtkRecentChooser*>(gobj()), NULL));
}
void RecentChooser::unset_limit()
{
gtk_recent_chooser_set_limit(gobj(), -1 /* See C docs */);
}
} // namespace Gtk
namespace
{
static const Glib::SignalProxyInfo RecentChooser_signal_selection_changed_info =
{
"selection-changed",
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback
};
static const Glib::SignalProxyInfo RecentChooser_signal_item_activated_info =
{
"item-activated",
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback
};
} // anonymous namespace
// static
GType Glib::Value<Gtk::RecentSortType>::value_type()
{
return gtk_recent_sort_type_get_type();
}
Gtk::RecentChooserError::RecentChooserError(Gtk::RecentChooserError::Code error_code, const Glib::ustring& error_message)
:
Glib::Error (GTK_RECENT_CHOOSER_ERROR, error_code, error_message)
{}
Gtk::RecentChooserError::RecentChooserError(GError* gobject)
:
Glib::Error (gobject)
{}
Gtk::RecentChooserError::Code Gtk::RecentChooserError::code() const
{
return static_cast<Code>(Glib::Error::code());
}
void Gtk::RecentChooserError::throw_func(GError* gobject)
{
throw Gtk::RecentChooserError(gobject);
}
// static
GType Glib::Value<Gtk::RecentChooserError::Code>::value_type()
{
return gtk_recent_chooser_error_get_type();
}
namespace Glib
{
Glib::RefPtr<Gtk::RecentChooser> wrap(GtkRecentChooser* object, bool take_copy)
{
return Glib::RefPtr<Gtk::RecentChooser>( dynamic_cast<Gtk::RecentChooser*> (Glib::wrap_auto_interface<Gtk::RecentChooser> ((GObject*)(object), take_copy)) );
//We use dynamic_cast<> in case of multiple inheritance.
}
} // namespace Glib
namespace Gtk
{
/* The *_Class implementation: */
const Glib::Interface_Class& RecentChooser_Class::init()
{
if(!gtype_) // create the GType if necessary
{
// Glib::Interface_Class has to know the interface init function
// in order to add interfaces to implementing types.
class_init_func_ = &RecentChooser_Class::iface_init_function;
// We can not derive from another interface, and it is not necessary anyway.
gtype_ = gtk_recent_chooser_get_type();
}
return *this;
}
void RecentChooser_Class::iface_init_function(void* g_iface, void*)
{
BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
//This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
//This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
g_assert(klass != 0);
klass->get_current_uri = &get_current_uri_vfunc_callback;
klass->unselect_uri = &unselect_uri_vfunc_callback;
klass->select_all = &select_all_vfunc_callback;
klass->unselect_all = &unselect_all_vfunc_callback;
klass->get_recent_manager = &get_recent_manager_vfunc_callback;
klass->add_filter = &add_filter_vfunc_callback;
klass->remove_filter = &remove_filter_vfunc_callback;
}
gchar* RecentChooser_Class::get_current_uri_vfunc_callback(GtkRecentChooser* self)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj_base && obj_base->is_derived_())
{
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
#endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
return g_strdup((obj->get_current_uri_vfunc()).c_str());
#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
) );
// Call the original underlying C function:
if(base && base->get_current_uri)
return (*base->get_current_uri)(self);
typedef gchar* RType;
return RType();
}
void RecentChooser_Class::unselect_uri_vfunc_callback(GtkRecentChooser* self, const gchar* uri)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj_base && obj_base->is_derived_())
{
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
#endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
obj->unselect_uri_vfunc(Glib::convert_const_gchar_ptr_to_ustring(uri)
);
return;
#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
) );
// Call the original underlying C function:
if(base && base->unselect_uri)
(*base->unselect_uri)(self, uri);
}
void RecentChooser_Class::select_all_vfunc_callback(GtkRecentChooser* self)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj_base && obj_base->is_derived_())
{
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
#endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
obj->select_all_vfunc();
return;
#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
) );
// Call the original underlying C function:
if(base && base->select_all)
(*base->select_all)(self);
}
void RecentChooser_Class::unselect_all_vfunc_callback(GtkRecentChooser* self)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj_base && obj_base->is_derived_())
{
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
#endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
obj->unselect_all_vfunc();
return;
#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
) );
// Call the original underlying C function:
if(base && base->unselect_all)
(*base->unselect_all)(self);
}
GtkRecentManager* RecentChooser_Class::get_recent_manager_vfunc_callback(GtkRecentChooser* self)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj_base && obj_base->is_derived_())
{
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
#endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
return Glib::unwrap(obj->get_recent_manager_vfunc());
#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
) );
// Call the original underlying C function:
if(base && base->get_recent_manager)
return (*base->get_recent_manager)(self);
typedef GtkRecentManager* RType;
return RType();
}
void RecentChooser_Class::add_filter_vfunc_callback(GtkRecentChooser* self, GtkRecentFilter* filter)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj_base && obj_base->is_derived_())
{
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
#endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
obj->add_filter_vfunc(*Glib::wrap(filter)
);
return;
#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
) );
// Call the original underlying C function:
if(base && base->add_filter)
(*base->add_filter)(self, filter);
}
void RecentChooser_Class::remove_filter_vfunc_callback(GtkRecentChooser* self, GtkRecentFilter* filter)
{
Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
Glib::ObjectBase::_get_current_wrapper((GObject*)self));
// Non-gtkmmproc-generated custom classes implicitly call the default
// Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
// generated classes can use this optimisation, which avoids the unnecessary
// parameter conversions if there is no possibility of the virtual function
// being overridden:
if(obj_base && obj_base->is_derived_())
{
CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
if(obj) // This can be NULL during destruction.
{
#ifdef GLIBMM_EXCEPTIONS_ENABLED
try // Trap C++ exceptions which would normally be lost because this is a C callback.
{
#endif //GLIBMM_EXCEPTIONS_ENABLED
// Call the virtual member method, which derived classes might override.
obj->remove_filter_vfunc(*Glib::wrap(filter)
);
return;
#ifdef GLIBMM_EXCEPTIONS_ENABLED
}
catch(...)
{
Glib::exception_handlers_invoke();
}
#endif //GLIBMM_EXCEPTIONS_ENABLED
}
}
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
) );
// Call the original underlying C function:
if(base && base->remove_filter)
(*base->remove_filter)(self, filter);
}
Glib::ObjectBase* RecentChooser_Class::wrap_new(GObject* object)
{
return new RecentChooser((GtkRecentChooser*)(object));
}
/* The implementation: */
RecentChooser::RecentChooser()
:
Glib::Interface(recentchooser_class_.init())
{}
RecentChooser::RecentChooser(GtkRecentChooser* castitem)
:
Glib::Interface((GObject*)(castitem))
{}
RecentChooser::RecentChooser(const Glib::Interface_Class& interface_class)
: Glib::Interface(interface_class)
{
}
RecentChooser::~RecentChooser()
{}
// static
void RecentChooser::add_interface(GType gtype_implementer)
{
recentchooser_class_.init().add_interface(gtype_implementer);
}
RecentChooser::CppClassType RecentChooser::recentchooser_class_; // initialize static member
GType RecentChooser::get_type()
{
return recentchooser_class_.init().get_type();
}
GType RecentChooser::get_base_type()
{
return gtk_recent_chooser_get_type();
}
void RecentChooser::set_show_private(bool show_private)
{
gtk_recent_chooser_set_show_private(gobj(), static_cast<int>(show_private));
}
bool RecentChooser::get_show_private() const
{
return gtk_recent_chooser_get_show_private(const_cast<GtkRecentChooser*>(gobj()));
}
void RecentChooser::set_show_not_found(bool show_not_found)
{
gtk_recent_chooser_set_show_not_found(gobj(), static_cast<int>(show_not_found));
}
bool RecentChooser::get_show_not_found() const
{
return gtk_recent_chooser_get_show_not_found(const_cast<GtkRecentChooser*>(gobj()));
}
void RecentChooser::set_select_multiple(bool select_multiple)
{
gtk_recent_chooser_set_select_multiple(gobj(), static_cast<int>(select_multiple));
}
bool RecentChooser::get_select_multiple() const
{
return gtk_recent_chooser_get_select_multiple(const_cast<GtkRecentChooser*>(gobj()));
}
void RecentChooser::set_limit(int limit)
{
gtk_recent_chooser_set_limit(gobj(), limit);
}
int RecentChooser::get_limit() const
{
return gtk_recent_chooser_get_limit(const_cast<GtkRecentChooser*>(gobj()));
}
void RecentChooser::set_local_only(bool local_only)
{
gtk_recent_chooser_set_local_only(gobj(), static_cast<int>(local_only));
}
bool RecentChooser::get_local_only() const
{
return gtk_recent_chooser_get_local_only(const_cast<GtkRecentChooser*>(gobj()));
}
void RecentChooser::set_show_tips(bool show_tips)
{
gtk_recent_chooser_set_show_tips(gobj(), static_cast<int>(show_tips));
}
bool RecentChooser::get_show_tips() const
{
return gtk_recent_chooser_get_show_tips(const_cast<GtkRecentChooser*>(gobj()));
}
void RecentChooser::set_show_icons(bool show_icons)
{
gtk_recent_chooser_set_show_icons(gobj(), static_cast<int>(show_icons));
}
bool RecentChooser::get_show_icons() const
{
return gtk_recent_chooser_get_show_icons(const_cast<GtkRecentChooser*>(gobj()));
}
void RecentChooser::set_sort_type(RecentSortType sort_type)
{
gtk_recent_chooser_set_sort_type(gobj(), ((GtkRecentSortType)(sort_type)));
}
RecentSortType RecentChooser::get_sort_type() const
{
return ((RecentSortType)(gtk_recent_chooser_get_sort_type(const_cast<GtkRecentChooser*>(gobj()))));
}
bool RecentChooser::set_current_uri(const Glib::ustring& uri)
{
GError* gerror = 0;
bool retvalue = gtk_recent_chooser_set_current_uri(gobj(), uri.c_str(), &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
return retvalue;
}
Glib::ustring RecentChooser::get_current_uri() const
{
return Glib::convert_return_gchar_ptr_to_ustring(gtk_recent_chooser_get_current_uri(const_cast<GtkRecentChooser*>(gobj())));
}
Glib::RefPtr<RecentInfo> RecentChooser::get_current_item()
{
Glib::RefPtr<RecentInfo> retvalue = Glib::wrap(gtk_recent_chooser_get_current_item(gobj()));
if(retvalue)
retvalue->reference(); //The function does not do a ref for us.
return retvalue;
}
Glib::RefPtr<const RecentInfo> RecentChooser::get_current_item() const
{
Glib::RefPtr<const RecentInfo> retvalue = Glib::wrap(gtk_recent_chooser_get_current_item(const_cast<GtkRecentChooser*>(gobj())));
if(retvalue)
retvalue->reference(); //The function does not do a ref for us.
return retvalue;
}
bool RecentChooser::select_uri(const Glib::ustring& uri)
{
GError* gerror = 0;
bool retvalue = gtk_recent_chooser_select_uri(gobj(), uri.c_str(), &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
return retvalue;
}
void RecentChooser::unselect_uri(const Glib::ustring& uri)
{
gtk_recent_chooser_unselect_uri(gobj(), uri.c_str());
}
void RecentChooser::select_all()
{
gtk_recent_chooser_select_all(gobj());
}
void RecentChooser::unselect_all()
{
gtk_recent_chooser_unselect_all(gobj());
}
ListHandle_RecentInfos RecentChooser::get_items() const
{
return ListHandle_RecentInfos(gtk_recent_chooser_get_items(const_cast<GtkRecentChooser*>(gobj())), Glib::OWNERSHIP_SHALLOW);
}
void RecentChooser::add_filter(const RecentFilter& filter)
{
gtk_recent_chooser_add_filter(gobj(), const_cast<GtkRecentFilter*>((filter).gobj()));
}
void RecentChooser::remove_filter(const RecentFilter& filter)
{
gtk_recent_chooser_remove_filter(gobj(), const_cast<GtkRecentFilter*>((filter).gobj()));
}
Glib::SListHandle<RecentFilter*> RecentChooser::list_filters()
{
return Glib::SListHandle<RecentFilter*>(gtk_recent_chooser_list_filters(gobj()), Glib::OWNERSHIP_SHALLOW);
}
Glib::SListHandle<const RecentFilter*> RecentChooser::list_filters() const
{
return Glib::SListHandle<const RecentFilter*>(gtk_recent_chooser_list_filters(const_cast<GtkRecentChooser*>(gobj())), Glib::OWNERSHIP_SHALLOW);
}
void RecentChooser::set_filter(const RecentFilter& filter)
{
gtk_recent_chooser_set_filter(gobj(), const_cast<GtkRecentFilter*>((filter).gobj()));
}
RecentFilter* RecentChooser::get_filter()
{
return Glib::wrap(gtk_recent_chooser_get_filter(gobj()));
}
const RecentFilter* RecentChooser::get_filter() const
{
return Glib::wrap(gtk_recent_chooser_get_filter(const_cast<GtkRecentChooser*>(gobj())));
}
Glib::SignalProxy0< void > RecentChooser::signal_selection_changed()
{
return Glib::SignalProxy0< void >(this, &RecentChooser_signal_selection_changed_info);
}
Glib::SignalProxy0< void > RecentChooser::signal_item_activated()
{
return Glib::SignalProxy0< void >(this, &RecentChooser_signal_item_activated_info);
}
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<bool> RecentChooser::property_show_private()
{
return Glib::PropertyProxy<bool>(this, "show-private");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_show_private() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "show-private");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<bool> RecentChooser::property_show_tips()
{
return Glib::PropertyProxy<bool>(this, "show-tips");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_show_tips() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "show-tips");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<bool> RecentChooser::property_show_icons()
{
return Glib::PropertyProxy<bool>(this, "show-icons");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_show_icons() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "show-icons");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<bool> RecentChooser::property_show_not_found()
{
return Glib::PropertyProxy<bool>(this, "show-not-found");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_show_not_found() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "show-not-found");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<bool> RecentChooser::property_select_multiple()
{
return Glib::PropertyProxy<bool>(this, "select-multiple");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_select_multiple() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "select-multiple");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<bool> RecentChooser::property_local_only()
{
return Glib::PropertyProxy<bool>(this, "local-only");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<bool> RecentChooser::property_local_only() const
{
return Glib::PropertyProxy_ReadOnly<bool>(this, "local-only");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<int> RecentChooser::property_limit()
{
return Glib::PropertyProxy<int>(this, "limit");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<int> RecentChooser::property_limit() const
{
return Glib::PropertyProxy_ReadOnly<int>(this, "limit");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<RecentSortType> RecentChooser::property_sort_type()
{
return Glib::PropertyProxy<RecentSortType>(this, "sort-type");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<RecentSortType> RecentChooser::property_sort_type() const
{
return Glib::PropertyProxy_ReadOnly<RecentSortType>(this, "sort-type");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy<RecentFilter*> RecentChooser::property_filter()
{
return Glib::PropertyProxy<RecentFilter*>(this, "filter");
}
#endif //GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
Glib::PropertyProxy_ReadOnly<RecentFilter*> RecentChooser::property_filter() const
{
return Glib::PropertyProxy_ReadOnly<RecentFilter*>(this, "filter");
}
#endif //GLIBMM_PROPERTIES_ENABLED
Glib::ustring Gtk::RecentChooser::get_current_uri_vfunc() const
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
) );
if(base && base->get_current_uri)
return Glib::convert_const_gchar_ptr_to_ustring((*base->get_current_uri)(const_cast<GtkRecentChooser*>(gobj())));
typedef Glib::ustring RType;
return RType();
}
void Gtk::RecentChooser::unselect_uri_vfunc(const Glib::ustring& uri)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
) );
if(base && base->unselect_uri)
(*base->unselect_uri)(gobj(),uri.c_str());
}
void Gtk::RecentChooser::select_all_vfunc()
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
) );
if(base && base->select_all)
(*base->select_all)(gobj());
}
void Gtk::RecentChooser::unselect_all_vfunc()
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
) );
if(base && base->unselect_all)
(*base->unselect_all)(gobj());
}
Glib::RefPtr<RecentManager> Gtk::RecentChooser::get_recent_manager_vfunc()
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
) );
if(base && base->get_recent_manager)
return Glib::wrap((*base->get_recent_manager)(gobj()));
typedef Glib::RefPtr<RecentManager> RType;
return RType();
}
void Gtk::RecentChooser::add_filter_vfunc(const RecentFilter& filter)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
) );
if(base && base->add_filter)
(*base->add_filter)(gobj(),const_cast<GtkRecentFilter*>((filter).gobj()));
}
void Gtk::RecentChooser::remove_filter_vfunc(const RecentFilter& filter)
{
BaseClassType *const base = static_cast<BaseClassType*>(
g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
) );
if(base && base->remove_filter)
(*base->remove_filter)(gobj(),const_cast<GtkRecentFilter*>((filter).gobj()));
}
} // namespace Gtk
|