![]() |
![]() |
Each recently used file is identified by its URI, and has meta-data associated to it, like the names and command lines of the applications that have registered it, the number of time each application has registered the same file, the mime type of the file and whether the file should be displayed only by the applications that have registered it.
The RecentManager acts like a database of all the recently used files. You can create new RecentManager objects, but it is more efficient to use the standard recent manager for the Gdk::Screen so that informations about the recently used files is shared with other people using them. Normally, you retrieve the recent manager for a particular screen using get_for_screen() and it will contain information about current recent manager for that screen.
Public Types | |
typedef Glib::ListHandle< RecentInfo, RecentInfoTraits > | ListHandle_RecentInfos |
typedef sigc::slot<void> | SlotChanged |
For instance, void on_changed();. | |
Public Member Functions | |
bool | add_item (const Glib::ustring& uri, const Data& recent_data) |
bool | add_item (const Glib::ustring& uri) |
ListHandle_RecentInfos | get_items () const |
int | get_limit () const |
const GtkRecentManager* | gobj () const |
Provides access to the underlying C GObject. | |
GtkRecentManager* | gobj () |
Provides access to the underlying C GObject. | |
GtkRecentManager* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
bool | has_item (const Glib::ustring& uri) const |
Glib::RefPtr<const RecentInfo> | lookup_item (const Glib::ustring& uri) const |
Glib::RefPtr<RecentInfo> | lookup_item (const Glib::ustring& uri) |
bool | move_item (const Glib::ustring& uri, const Glib::ustring& new_uri) |
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_filename () const |
The full path to the file to be used to store and read the list. | |
Glib::PropertyProxy_ReadOnly< int > | property_limit () const |
The maximum number of items to be returned by gtk_recent_manager_get_items. | |
Glib::PropertyProxy<int> | property_limit () |
The maximum number of items to be returned by gtk_recent_manager_get_items. | |
Glib::PropertyProxy_ReadOnly< int > | property_size () const |
The size of the recently used resources list. | |
int | purge_items () |
bool | remove_item (const Glib::ustring& uri) |
void | set_limit (int limit) |
void | set_screen (const Glib::RefPtr<Gdk::Screen>& screen) |
Glib::SignalProxy0<void> | signal_changed () |
virtual | ~RecentManager () |
Static Public Member Functions | |
static Glib::RefPtr<RecentManager> | create () |
static Glib::RefPtr<RecentManager> | get_default () |
static Glib::RefPtr<RecentManager> | get_for_screen (const Glib::RefPtr<Gdk::Screen>& screen) |
Protected Member Functions | |
virtual void | on_changed () |
RecentManager () | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr<Gtk::RecentManager> | wrap (GtkRecentManager* object, bool take_copy=false) |
Classes | |
class | Data |
Meta-data passed to add_item(). More... |
typedef Glib::ListHandle<RecentInfo, RecentInfoTraits> Gtk::RecentManager::ListHandle_RecentInfos |
typedef sigc::slot<void> Gtk::RecentManager::SlotChanged |
For instance, void on_changed();.
virtual Gtk::RecentManager::~RecentManager | ( | ) | [virtual] |
Gtk::RecentManager::RecentManager | ( | ) | [protected] |
bool Gtk::RecentManager::add_item | ( | const Glib::ustring & | uri, | |
const Data& | recent_data | |||
) |
bool Gtk::RecentManager::add_item | ( | const Glib::ustring & | uri | ) |
static Glib::RefPtr<RecentManager> Gtk::RecentManager::create | ( | ) | [static] |
static Glib::RefPtr<RecentManager> Gtk::RecentManager::get_default | ( | ) | [static] |
static Glib::RefPtr<RecentManager> Gtk::RecentManager::get_for_screen | ( | const Glib::RefPtr<Gdk::Screen>& | screen | ) | [static] |
ListHandle_RecentInfos Gtk::RecentManager::get_items | ( | ) | const |
int Gtk::RecentManager::get_limit | ( | ) | const |
const GtkRecentManager* Gtk::RecentManager::gobj | ( | ) | const [inline] |
GtkRecentManager* Gtk::RecentManager::gobj | ( | ) | [inline] |
GtkRecentManager* Gtk::RecentManager::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool Gtk::RecentManager::has_item | ( | const Glib::ustring & | uri | ) | const |
Glib::RefPtr<const RecentInfo> Gtk::RecentManager::lookup_item | ( | const Glib::ustring & | uri | ) | const |
Glib::RefPtr<RecentInfo> Gtk::RecentManager::lookup_item | ( | const Glib::ustring & | uri | ) |
bool Gtk::RecentManager::move_item | ( | const Glib::ustring & | uri, | |
const Glib::ustring & | new_uri | |||
) |
virtual void Gtk::RecentManager::on_changed | ( | ) | [protected, virtual] |
Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::RecentManager::property_filename | ( | ) | const |
The full path to the file to be used to store and read the list.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<int> Gtk::RecentManager::property_limit | ( | ) | const |
The maximum number of items to be returned by gtk_recent_manager_get_items.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<int> Gtk::RecentManager::property_limit | ( | ) |
The maximum number of items to be returned by gtk_recent_manager_get_items.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<int> Gtk::RecentManager::property_size | ( | ) | const |
The size of the recently used resources list.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
int Gtk::RecentManager::purge_items | ( | ) |
bool Gtk::RecentManager::remove_item | ( | const Glib::ustring & | uri | ) |
void Gtk::RecentManager::set_limit | ( | int | limit | ) |
void Gtk::RecentManager::set_screen | ( | const Glib::RefPtr<Gdk::Screen>& | screen | ) |
Glib::SignalProxy0< void > Gtk::RecentManager::signal_changed | ( | ) |
void changed()
Glib::RefPtr<Gtk::RecentManager> wrap | ( | GtkRecentManager * | object, | |
bool | take_copy = false | |||
) | [related] |
object | The C instance | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |