Ardour  9.0-pre0-582-g084a23a80d
recentmanager.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_RECENTMANAGER_H
4 #define _GTKMM_RECENTMANAGER_H
5 
6 #include <gtkmmconfig.h>
7 
8 
9 #include <glibmm/ustring.h>
10 #include <sigc++/sigc++.h>
11 
12 /* Copyright (C) 2006 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28 
29 
30 #include <gdkmm/screen.h>
31 #include <gdkmm/pixbuf.h>
32 
33 #include <gtkmm/recentinfo.h>
34 
35 #include <glibmm/object.h>
36 #include <glibmm/containers.h>
37 
38 
39 #ifndef DOXYGEN_SHOULD_SKIP_THIS
40 typedef struct _GtkRecentManager GtkRecentManager;
42 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
43 
44 
45 #ifndef DOXYGEN_SHOULD_SKIP_THIS
46 namespace Gtk
47 { class RecentManager_Class; } // namespace Gtk
48 #endif //DOXYGEN_SHOULD_SKIP_THIS
49 
50 namespace Gtk
51 {
52 
55 class RecentManagerError : public Glib::Error
56 {
57 public:
60  enum Code
61  {
68  UNKNOWN
69  };
70 
71  RecentManagerError(Code error_code, const Glib::ustring& error_message);
72  explicit RecentManagerError(GError* gobject);
73  Code code() const;
74 
75 #ifndef DOXYGEN_SHOULD_SKIP_THIS
76 private:
77 
78  static void throw_func(GError* gobject);
79 
80  friend void wrap_init(); // uses throw_func()
81 
82  #endif //DOXYGEN_SHOULD_SKIP_THIS
83 };
84 
85 } // namespace Gtk
86 
87 #ifndef DOXYGEN_SHOULD_SKIP_THIS
88 namespace Glib
89 {
90 
91 template <>
92 class Value<Gtk::RecentManagerError::Code> : public Glib::Value_Enum<Gtk::RecentManagerError::Code>
93 {
94 public:
95  static GType value_type() G_GNUC_CONST;
96 };
97 
98 } // namespace Glib
99 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
100 
101 
102 namespace Gtk
103 {
104 
105 
130 class RecentManager : public Glib::Object
131 {
132 
133 #ifndef DOXYGEN_SHOULD_SKIP_THIS
134 
135 public:
136  typedef RecentManager CppObjectType;
137  typedef RecentManager_Class CppClassType;
138  typedef GtkRecentManager BaseObjectType;
139  typedef GtkRecentManagerClass BaseClassType;
140 
141 private: friend class RecentManager_Class;
142  static CppClassType recentmanager_class_;
143 
144 private:
145  // noncopyable
147  RecentManager& operator=(const RecentManager&);
148 
149 protected:
150  explicit RecentManager(const Glib::ConstructParams& construct_params);
151  explicit RecentManager(GtkRecentManager* castitem);
152 
153 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
154 
155 public:
156  virtual ~RecentManager();
157 
160  static GType get_type() G_GNUC_CONST;
161 
162 #ifndef DOXYGEN_SHOULD_SKIP_THIS
163 
164 
165  static GType get_base_type() G_GNUC_CONST;
166 #endif
167 
169  GtkRecentManager* gobj() { return reinterpret_cast<GtkRecentManager*>(gobject_); }
170 
172  const GtkRecentManager* gobj() const { return reinterpret_cast<GtkRecentManager*>(gobject_); }
173 
176 
177 private:
178 
179 
180 protected:
182 
183 public:
184 
185  static Glib::RefPtr<RecentManager> create();
186 
187 
194  static Glib::RefPtr<RecentManager> get_default();
195 
196 #ifndef GTKMM_DISABLE_DEPRECATED
197 
217  static Glib::RefPtr<RecentManager> get_for_screen(const Glib::RefPtr<Gdk::Screen>& screen);
218 #endif // GTKMM_DISABLE_DEPRECATED
219 
220 
234  class Data
235  {
236  public:
237  Glib::ustring display_name;
238  Glib::ustring description;
239 
240  Glib::ustring mime_type;
241 
242  Glib::ustring app_name;
243  Glib::ustring app_exec;
244 
245  std::vector<Glib::ustring> groups;
246 
248  };
249 
250 
251 #ifndef GTKMM_DISABLE_DEPRECATED
252 
263  void set_screen(const Glib::RefPtr<Gdk::Screen>& screen);
264 #endif // GTKMM_DISABLE_DEPRECATED
265 
266 
272  bool add_item(const Glib::ustring& uri);
273 
277  bool add_item(const Glib::ustring& uri, const Data& recent_data);
278 
279 
287  bool remove_item(const Glib::ustring& uri);
288 
299  Glib::RefPtr<RecentInfo> lookup_item(const Glib::ustring& uri);
300 
311  Glib::RefPtr<const RecentInfo> lookup_item(const Glib::ustring& uri) const;
312 
319  bool has_item(const Glib::ustring& uri) const;
320 
331  bool move_item(const Glib::ustring& uri, const Glib::ustring& new_uri);
332 
343  void set_limit(int limit);
344 
354  int get_limit() const;
355 
356  typedef Glib::ListHandle<RecentInfo, RecentInfoTraits> ListHandle_RecentInfos;
357 
358 
367 
368 
374  int purge_items();
375 
377  typedef sigc::slot<void> SlotChanged;
378 
379 
387  Glib::SignalProxy0< void > signal_changed();
388 
389 
395  Glib::PropertyProxy_ReadOnly< Glib::ustring > property_filename() const;
396 
397 
403  Glib::PropertyProxy< int > property_limit() ;
404 
410  Glib::PropertyProxy_ReadOnly< int > property_limit() const;
411 
417  Glib::PropertyProxy_ReadOnly< int > property_size() const;
418 
419 
420 public:
421 
422 public:
423  //C++ methods used to invoke GTK+ virtual functions:
424 
425 protected:
426  //GTK+ Virtual Functions (override these to change behaviour):
427 
428  //Default Signal Handlers::
430  virtual void on_changed();
431 
432 
433 };
434 
435 } // namespace Gtk
436 
437 
438 namespace Glib
439 {
448  Glib::RefPtr<Gtk::RecentManager> wrap(GtkRecentManager* object, bool take_copy = false);
449 }
450 
451 
452 #endif /* _GTKMM_RECENTMANAGER_H */
453 
RecentManagerError(GError *gobject)
RecentManagerError(Code error_code, const Glib::ustring &error_message)
Glib::ustring display_name
std::vector< Glib::ustring > groups
Glib::RefPtr< RecentInfo > lookup_item(const Glib::ustring &uri)
Glib::PropertyProxy_ReadOnly< int > property_limit() const
sigc::slot< void > SlotChanged
For instance, void on_changed();.
bool move_item(const Glib::ustring &uri, const Glib::ustring &new_uri)
bool add_item(const Glib::ustring &uri)
GtkRecentManager * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
Glib::RefPtr< Gtk::RecentManager > wrap(GtkRecentManager *object, bool take_copy=false)
static Glib::RefPtr< RecentManager > create()
static Glib::RefPtr< RecentManager > get_default()
bool add_item(const Glib::ustring &uri, const Data &recent_data)
bool remove_item(const Glib::ustring &uri)
bool has_item(const Glib::ustring &uri) const
int get_limit() const
static Glib::RefPtr< RecentManager > get_for_screen(const Glib::RefPtr< Gdk::Screen > &screen)
Glib::RefPtr< const RecentInfo > lookup_item(const Glib::ustring &uri) const
Glib::SignalProxy0< void > signal_changed()
const GtkRecentManager * gobj() const
Provides access to the underlying C GObject.
virtual void on_changed()
This is a default handler for the signal signal_changed().
ListHandle_RecentInfos get_items() const
void set_screen(const Glib::RefPtr< Gdk::Screen > &screen)
Glib::ListHandle< RecentInfo, RecentInfoTraits > ListHandle_RecentInfos
Glib::PropertyProxy_ReadOnly< int > property_size() const
void set_limit(int limit)
virtual ~RecentManager()
GtkRecentManager * gobj()
Provides access to the underlying C GObject.
static GType get_type() G_GNUC_CONST
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_filename() const
Glib::PropertyProxy< int > property_limit()
Definition: ardour_ui.h:188
void wrap_init()
Definition: lobject.h:100