Ardour
9.0-pre0-582-g084a23a80d
|
#include <recentfilter.h>
Classes | |
class | Info |
Public Types | |
typedef sigc::slot< bool, const Info & > | SlotCustom |
For instance, bool on_custom(const Gtk::RecentFilter::Info& filter_info);. More... | |
Public Member Functions | |
virtual | ~RecentFilter () |
GtkRecentFilter * | gobj () |
Provides access to the underlying C GtkObject. More... | |
const GtkRecentFilter * | gobj () const |
Provides access to the underlying C GtkObject. More... | |
RecentFilter () | |
void | set_name (const Glib::ustring &name) |
Glib::ustring | get_name () const |
void | add_mime_type (const Glib::ustring &mime_type) |
void | add_pattern (const Glib::ustring &pattern) |
void | add_pixbuf_formats () |
void | add_application (const Glib::ustring &application) |
void | add_group (const Glib::ustring &group) |
void | add_age (int days) |
void | add_custom (RecentFilterFlags needed, const SlotCustom &slot) |
RecentFilterFlags | get_needed () const |
Public Member Functions inherited from Gtk::Object | |
virtual | ~Object () |
GtkObject * | gobj () |
Provides access to the underlying C GtkObject. More... | |
const GtkObject * | gobj () const |
Provides access to the underlying C GtkObject. More... | |
Glib::PropertyProxy< void * > | property_user_data () |
Glib::PropertyProxy_ReadOnly< void * > | property_user_data () const |
Related Functions | |
(Note that these are not member functions.) | |
Gtk::RecentFilter * | wrap (GtkRecentFilter *object, bool take_copy=false) |
Related Functions inherited from Gtk::Object | |
Gtk::Object * | wrap (GtkObject *object, bool take_copy=false) |
RecentFilter can be used to restrict the files being shown in a RecentChooser. 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().
Definition at line 134 of file recentfilter.h.
typedef sigc::slot<bool, const Info&> Gtk::RecentFilter::SlotCustom |
For instance, bool on_custom(const Gtk::RecentFilter::Info& filter_info);.
Definition at line 276 of file recentfilter.h.
|
virtual |
Gtk::RecentFilter::RecentFilter | ( | ) |
void Gtk::RecentFilter::add_age | ( | int | days | ) |
Adds a rule that allows resources based on their age - that is, the number of days elapsed since they were last modified.
days | Number of days. |
void Gtk::RecentFilter::add_application | ( | const Glib::ustring & | application | ) |
Adds a rule that allows resources based on the name of the application that has registered them.
application | An application name. |
void Gtk::RecentFilter::add_custom | ( | RecentFilterFlags | needed, |
const SlotCustom & | slot | ||
) |
void Gtk::RecentFilter::add_group | ( | const Glib::ustring & | group | ) |
Adds a rule that allows resources based on the name of the group to which they belong
group | A group name. |
void Gtk::RecentFilter::add_mime_type | ( | const Glib::ustring & | mime_type | ) |
Adds a rule that allows resources based on their registered MIME type.
mime_type | A MIME type. |
void Gtk::RecentFilter::add_pattern | ( | const Glib::ustring & | pattern | ) |
Adds a rule that allows resources based on a pattern matching their display name.
pattern | A file pattern. |
void Gtk::RecentFilter::add_pixbuf_formats | ( | ) |
Adds a rule allowing image files in the formats supported by GdkPixbuf.
Glib::ustring Gtk::RecentFilter::get_name | ( | ) | const |
Gets the human-readable name for the filter. See set_name().
0
. The returned string is owned by the filter object and should not be freed. RecentFilterFlags Gtk::RecentFilter::get_needed | ( | ) | const |
Gets the fields that need to be filled in for the structure passed to filter()
This function will not typically be used by applications; it is intended principally for use in the implementation of Gtk::RecentChooser.
|
inline |
Provides access to the underlying C GtkObject.
Definition at line 171 of file recentfilter.h.
|
inline |
Provides access to the underlying C GtkObject.
Definition at line 174 of file recentfilter.h.
void Gtk::RecentFilter::set_name | ( | const Glib::ustring & | name | ) |
Sets the human-readable name of the filter; this is the string that will be displayed in the recently used resources selector user interface if there is a selectable list of filters.
name | Then human readable name of filter. |
|
related |
A Glib::wrap() method for this object.
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. |