![]() |
![]() |
Files can be filtered based on their name (with add_pattern()), on their mime type (with add_mime_type()), on the application that has registered them (with add_application()), or by a custom filter function (with add_custom()).
Filtering by mime type handles aliasing and subclassing of mime types; e.g. a filter for text/plain also matches a file with mime type application/rtf, since application/rtf is a subclass of text/plain. Note that RecentFilter allows wildcards for the subtype of a mime type, so you can e.g. filter for image/*.
Normally, filters are used by adding them to a RecentChooser, see RecentChooser::add_filter(), but it is also possible to manually use a filter on a file with filter().
Public Types | ||||
typedef sigc::slot< bool, const Info& > | SlotCustom | |||
For instance, bool on_custom(const Gtk::RecentFilter::Info& filter_info);. | ||||
Public Member Functions | ||||
void | add_age (int days) | |||
void | add_application (const Glib::ustring& application) | |||
void | add_custom (RecentFilterFlags needed, const SlotCustom& slot) | |||
void | add_group (const Glib::ustring& group) | |||
void | add_mime_type (const Glib::ustring& mime_type) | |||
void | add_pattern (const Glib::ustring& pattern) | |||
void | add_pixbuf_formats () | |||
Glib::ustring | get_name () const | |||
RecentFilterFlags | get_needed () const | |||
const GtkRecentFilter* | gobj () const | |||
Provides access to the underlying C GtkObject. | ||||
GtkRecentFilter* | gobj () | |||
Provides access to the underlying C GtkObject. | ||||
RecentFilter () | ||||
void | set_name (const Glib::ustring& name) | |||
virtual | ~RecentFilter () | |||
Related Functions | ||||
(Note that these are not member functions.) | ||||
Gtk::RecentFilter* | wrap (GtkRecentFilter* object, bool take_copy=false) | |||
| ||||
Classes | ||||
class | Info | |||
A RecentFilter::Info class is used to pass information about the tested file to filter(). More... |
typedef sigc::slot<bool, const Info&> Gtk::RecentFilter::SlotCustom |
For instance, bool on_custom(const Gtk::RecentFilter::Info& filter_info);.
virtual Gtk::RecentFilter::~RecentFilter | ( | ) | [virtual] |
Gtk::RecentFilter::RecentFilter | ( | ) |
void Gtk::RecentFilter::add_age | ( | int | days | ) |
void Gtk::RecentFilter::add_application | ( | const Glib::ustring & | application | ) |
void Gtk::RecentFilter::add_custom | ( | RecentFilterFlags | needed, | |
const SlotCustom& | slot | |||
) |
void Gtk::RecentFilter::add_group | ( | const Glib::ustring & | group | ) |
void Gtk::RecentFilter::add_mime_type | ( | const Glib::ustring & | mime_type | ) |
void Gtk::RecentFilter::add_pattern | ( | const Glib::ustring & | pattern | ) |
void Gtk::RecentFilter::add_pixbuf_formats | ( | ) |
Glib::ustring Gtk::RecentFilter::get_name | ( | ) | const |
RecentFilterFlags Gtk::RecentFilter::get_needed | ( | ) | const |
const GtkRecentFilter* Gtk::RecentFilter::gobj | ( | ) | const [inline] |
GtkRecentFilter* Gtk::RecentFilter::gobj | ( | ) | [inline] |
void Gtk::RecentFilter::set_name | ( | const Glib::ustring & | name | ) |
Gtk::RecentFilter* wrap | ( | GtkRecentFilter * | 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. |