Ardour  9.0-pre0-386-g96ef4d20f2
recentchooser.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_RECENTCHOOSER_H
4 #define _GTKMM_RECENTCHOOSER_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* Copyright (C) 2006 The gtkmm Development Team
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free
24  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25  */
26 
27 #include <glibmm/interface.h>
28 #include <gtkmm/recentinfo.h>
29 #include <gtkmm/recentfilter.h>
30 #include <gtkmm/recentmanager.h>
31 
32 
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 extern "C"
35 {
37 }
38 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
39 
40 
41 #ifndef DOXYGEN_SHOULD_SKIP_THIS
42 typedef struct _GtkRecentChooser GtkRecentChooser;
43 typedef struct _GtkRecentChooserClass GtkRecentChooserClass;
44 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
45 
46 
47 #ifndef DOXYGEN_SHOULD_SKIP_THIS
48 namespace Gtk
49 { class RecentChooser_Class; } // namespace Gtk
50 #endif // DOXYGEN_SHOULD_SKIP_THIS
51 
52 namespace Gtk
53 {
54 
62 {
67 };
68 
69 } // namespace Gtk
70 
71 
72 #ifndef DOXYGEN_SHOULD_SKIP_THIS
73 namespace Glib
74 {
75 
76 template <>
77 class Value<Gtk::RecentSortType> : public Glib::Value_Enum<Gtk::RecentSortType>
78 {
79 public:
80  static GType value_type() G_GNUC_CONST;
81 };
82 
83 } // namespace Glib
84 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
85 
86 
87 namespace Gtk
88 {
89 
90 
93 class RecentChooserError : public Glib::Error
94 {
95 public:
98  enum Code
99  {
102  };
103 
104  RecentChooserError(Code error_code, const Glib::ustring& error_message);
105  explicit RecentChooserError(GError* gobject);
106  Code code() const;
107 
108 #ifndef DOXYGEN_SHOULD_SKIP_THIS
109 private:
110 
111  static void throw_func(GError* gobject);
112 
113  friend void wrap_init(); // uses throw_func()
114 
115  #endif //DOXYGEN_SHOULD_SKIP_THIS
116 };
117 
118 } // namespace Gtk
119 
120 #ifndef DOXYGEN_SHOULD_SKIP_THIS
121 namespace Glib
122 {
123 
124 template <>
125 class Value<Gtk::RecentChooserError::Code> : public Glib::Value_Enum<Gtk::RecentChooserError::Code>
126 {
127 public:
128  static GType value_type() G_GNUC_CONST;
129 };
130 
131 } // namespace Glib
132 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
133 
134 
135 namespace Gtk
136 {
137 
138 
147 class RecentChooser : public Glib::Interface
148 {
149 
150 #ifndef DOXYGEN_SHOULD_SKIP_THIS
151 
152 public:
153  typedef RecentChooser CppObjectType;
154  typedef RecentChooser_Class CppClassType;
155  typedef GtkRecentChooser BaseObjectType;
156  typedef GtkRecentChooserIface BaseClassType;
157 
158 private:
159  friend class RecentChooser_Class;
160  static CppClassType recentchooser_class_;
161 
162  // noncopyable
164  RecentChooser& operator=(const RecentChooser&);
165 
166 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
167 protected:
172 
173 #ifndef DOXYGEN_SHOULD_SKIP_THIS
180  explicit RecentChooser(const Glib::Interface_Class& interface_class);
181 
182 public:
183  // This is public so that C++ wrapper instances can be
184  // created for C instances of unwrapped types.
185  // For instance, if an unexpected C type implements the C interface.
186  explicit RecentChooser(GtkRecentChooser* castitem);
187 
188 protected:
189 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
190 
191 public:
192  virtual ~RecentChooser();
193 
194  static void add_interface(GType gtype_implementer);
195 
198  static GType get_type() G_GNUC_CONST;
199 
200 #ifndef DOXYGEN_SHOULD_SKIP_THIS
201  static GType get_base_type() G_GNUC_CONST;
202 #endif
203 
205  GtkRecentChooser* gobj() { return reinterpret_cast<GtkRecentChooser*>(gobject_); }
206 
208  const GtkRecentChooser* gobj() const { return reinterpret_cast<GtkRecentChooser*>(gobject_); }
209 
210 private:
211 
212 public:
213 
214 
219  void set_show_private(bool show_private = true);
220 
227  bool get_show_private() const;
228 
234  void set_show_not_found(bool show_not_found = true);
235 
242  bool get_show_not_found() const;
243 
248  void set_select_multiple(bool select_multiple = true);
249 
254  bool get_select_multiple() const;
255 
261  void set_limit(int limit);
262  void unset_limit();
263 
270  int get_limit() const;
271 
279  void set_local_only(bool local_only = true);
280 
286  bool get_local_only() const;
287 
293  void set_show_tips(bool show_tips = true);
294 
301  bool get_show_tips() const;
302 
303  // Deprecated in GTK+ 2.12. murrayc:
304 
305 
311  void set_show_icons(bool show_icons = true);
312 
317  bool get_show_icons() const;
318 
324  void set_sort_type(RecentSortType sort_type);
325 
331 
332 
337  typedef sigc::slot<int, const Glib::RefPtr<RecentInfo>&, const Glib::RefPtr<RecentInfo>&> SlotCompare;
338 
339 
343  void set_sort_func(const SlotCompare& slot);
344 
345  // TODO: Return type should be void since it will never return false but
346  // throwing RecentChooserError instead
347 
353  bool set_current_uri(const Glib::ustring& uri);
354 
359  Glib::ustring get_current_uri() const;
360 
366  Glib::RefPtr<RecentInfo> get_current_item();
367 
373  Glib::RefPtr<const RecentInfo> get_current_item() const;
374  // TODO: Same here
375 
381  bool select_uri(const Glib::ustring& uri);
382 
387  void unselect_uri(const Glib::ustring& uri);
388 
392  void select_all();
393 
396  void unselect_all();
397 
398  typedef Glib::ListHandle<RecentInfo, RecentInfoTraits> ListHandle_RecentInfos;
399 
400 
412 
418  Glib::StringArrayHandle get_uris() const;
419 
420 
428  void add_filter(const RecentFilter& filter);
429 
434  void remove_filter(const RecentFilter& filter);
435 
442  Glib::SListHandle<RecentFilter*> list_filters();
443 
450  Glib::SListHandle<const RecentFilter*> list_filters() const;
451 
457  void set_filter(const RecentFilter& filter);
458 
465 
471  const RecentFilter* get_filter() const;
472 
473 
484  Glib::SignalProxy0< void > signal_selection_changed();
485 
486 
497  Glib::SignalProxy0< void > signal_item_activated();
498 
499 
500  //Not wrapped because it's write-only and construct-only: _WRAP_PROPERTY("recent-manager", Glib::RefPtr<RecentManager>)
506  Glib::PropertyProxy< bool > property_show_private() ;
507 
513  Glib::PropertyProxy_ReadOnly< bool > property_show_private() const;
514 
520  Glib::PropertyProxy< bool > property_show_tips() ;
521 
527  Glib::PropertyProxy_ReadOnly< bool > property_show_tips() const;
528 
534  Glib::PropertyProxy< bool > property_show_icons() ;
535 
541  Glib::PropertyProxy_ReadOnly< bool > property_show_icons() const;
542 
548  Glib::PropertyProxy< bool > property_show_not_found() ;
549 
555  Glib::PropertyProxy_ReadOnly< bool > property_show_not_found() const;
556 
562  Glib::PropertyProxy< bool > property_select_multiple() ;
563 
569  Glib::PropertyProxy_ReadOnly< bool > property_select_multiple() const;
570 
576  Glib::PropertyProxy< bool > property_local_only() ;
577 
583  Glib::PropertyProxy_ReadOnly< bool > property_local_only() const;
584 
590  Glib::PropertyProxy< int > property_limit() ;
591 
597  Glib::PropertyProxy_ReadOnly< int > property_limit() const;
598 
604  Glib::PropertyProxy< RecentSortType > property_sort_type() ;
605 
611  Glib::PropertyProxy_ReadOnly< RecentSortType > property_sort_type() const;
612 
618  Glib::PropertyProxy< RecentFilter* > property_filter() ;
619 
625  Glib::PropertyProxy_ReadOnly< RecentFilter* > property_filter() const;
626 
627 
628 protected:
629 
630 
631  // TODO: How to wrap those vfuncs?
632 
633  //__CONVERSION(`ListHandle_RecentInfos', `GList*', `($3).data()')
634  //__CONVERSION(`Glib::SListHandle<RecentFilter*>', `GSList*', `($3).data()')
635 
636  //_WRAP_VFUNC(bool set_current_uri(const Glib::ustring& uri), "set_current_uri", errthrow)
637  virtual Glib::ustring get_current_uri_vfunc() const;
638 
639 
640  //_WRAP_VFUNC(bool select_uri(const Glib::ustring& uri), "select_uri", errthrow)
641  virtual void unselect_uri_vfunc(const Glib::ustring& uri);
642 
643  virtual void select_all_vfunc();
644 
645  virtual void unselect_all_vfunc();
646 
647  //_WRAP_VFUNC(ArrayHandle_RecentInfos get_items() const, "get_items")
648  virtual Glib::RefPtr<RecentManager> get_recent_manager_vfunc();
649 
650  virtual void add_filter_vfunc(const RecentFilter& filter);
651 
652  virtual void remove_filter_vfunc(const RecentFilter& filter);
653 
654  //_WRAP_VFUNC(Glib::SListHandle<RecentFilter*> list_filters(), "list_filters")
655  //_WRAP_VFUNC(void set_sort_func(const SlotCompare& slot), "set_sort_func")
656 
657 
658 public:
659 
660 public:
661  //C++ methods used to invoke GTK+ virtual functions:
662 
663 protected:
664  //GTK+ Virtual Functions (override these to change behaviour):
665 
666  //Default Signal Handlers::
667 
668 
669 };
670 
671 } // namespace Gtk
672 
673 
674 namespace Glib
675 {
684  Glib::RefPtr<Gtk::RecentChooser> wrap(GtkRecentChooser* object, bool take_copy = false);
685 
686 } // namespace Glib
687 
688 
689 #endif /* _GTKMM_RECENTCHOOSER_H */
690 
RecentChooserError(Code error_code, const Glib::ustring &error_message)
RecentChooserError(GError *gobject)
Glib::PropertyProxy_ReadOnly< bool > property_show_private() const
virtual void add_filter_vfunc(const RecentFilter &filter)
Glib::PropertyProxy< bool > property_show_private()
Glib::RefPtr< Gtk::RecentChooser > wrap(GtkRecentChooser *object, bool take_copy=false)
Glib::PropertyProxy< int > property_limit()
bool select_uri(const Glib::ustring &uri)
virtual Glib::ustring get_current_uri_vfunc() const
Glib::SListHandle< RecentFilter * > list_filters()
void set_select_multiple(bool select_multiple=true)
Glib::RefPtr< const RecentInfo > get_current_item() const
virtual Glib::RefPtr< RecentManager > get_recent_manager_vfunc()
void set_show_tips(bool show_tips=true)
int get_limit() const
Glib::PropertyProxy_ReadOnly< bool > property_local_only() const
Glib::ustring get_current_uri() const
Glib::SListHandle< const RecentFilter * > list_filters() const
static GType get_type() G_GNUC_CONST
bool get_show_tips() const
bool get_local_only() const
sigc::slot< int, const Glib::RefPtr< RecentInfo > &, const Glib::RefPtr< RecentInfo > & > SlotCompare
Glib::PropertyProxy_ReadOnly< bool > property_show_not_found() const
void remove_filter(const RecentFilter &filter)
Glib::PropertyProxy< bool > property_show_icons()
Glib::SignalProxy0< void > signal_item_activated()
Glib::PropertyProxy< bool > property_show_tips()
Glib::PropertyProxy< RecentSortType > property_sort_type()
Glib::PropertyProxy_ReadOnly< bool > property_show_icons() const
virtual ~RecentChooser()
virtual void unselect_all_vfunc()
RecentFilter * get_filter()
bool get_show_icons() const
GtkRecentChooser * gobj()
Provides access to the underlying C GObject.
Glib::PropertyProxy_ReadOnly< bool > property_show_tips() const
void add_filter(const RecentFilter &filter)
Glib::StringArrayHandle get_uris() const
void set_show_icons(bool show_icons=true)
bool get_show_private() const
virtual void unselect_uri_vfunc(const Glib::ustring &uri)
Glib::PropertyProxy_ReadOnly< bool > property_select_multiple() const
Glib::PropertyProxy< bool > property_local_only()
const RecentFilter * get_filter() const
RecentSortType get_sort_type() const
bool set_current_uri(const Glib::ustring &uri)
virtual void select_all_vfunc()
ListHandle_RecentInfos get_items() const
Glib::RefPtr< RecentInfo > get_current_item()
Glib::PropertyProxy_ReadOnly< RecentSortType > property_sort_type() const
void set_show_not_found(bool show_not_found=true)
Glib::PropertyProxy_ReadOnly< int > property_limit() const
bool get_select_multiple() const
Glib::ListHandle< RecentInfo, RecentInfoTraits > ListHandle_RecentInfos
static void add_interface(GType gtype_implementer)
void set_sort_func(const SlotCompare &slot)
void unselect_uri(const Glib::ustring &uri)
bool get_show_not_found() const
Glib::SignalProxy0< void > signal_selection_changed()
Glib::PropertyProxy_ReadOnly< RecentFilter * > property_filter() const
void set_filter(const RecentFilter &filter)
Glib::PropertyProxy< bool > property_select_multiple()
void set_sort_type(RecentSortType sort_type)
virtual void remove_filter_vfunc(const RecentFilter &filter)
Glib::PropertyProxy< RecentFilter * > property_filter()
void set_show_private(bool show_private=true)
const GtkRecentChooser * gobj() const
Provides access to the underlying C GObject.
void set_limit(int limit)
void set_local_only(bool local_only=true)
Glib::PropertyProxy< bool > property_show_not_found()
RecentSortType
Definition: recentchooser.h:62
@ RECENT_SORT_NONE
Definition: recentchooser.h:63
@ RECENT_SORT_LRU
Definition: recentchooser.h:65
@ RECENT_SORT_MRU
Definition: recentchooser.h:64
@ RECENT_SORT_CUSTOM
Definition: recentchooser.h:66
struct _GtkRecentChooser GtkRecentChooser
Definition: ardour_ui.h:187
void wrap_init()
Definition: lobject.h:100