Back to Seed Clases

Gtk


Classes

Interfaces

Structs

Unions

Enums

Class Gtk.FileFilter

Import line: Gtk = imports.gi.Gtk;
GIR File: Gtk-3.0.gir
C documentation: GtkFileFilter
Class : FileFilter
Implements: Gtk.Buildable
Extends: GObject.InitiallyUnowned
A GtkFileFilter can be used to restrict the files being shown in a
GtkFileChooser. Files can be filtered based on their name (with
gtk_file_filter_add_pattern()), on their mime type (with
gtk_file_filter_add_mime_type()), or by a custom filter function
(with gtk_file_filter_add_custom()).
Filtering by mime types 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 GtkFileFilter 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 GtkFileChooser,
see gtk_file_chooser_add_filter(), but it is also possible
to manually use a filter on a file with gtk_file_filter_filter().

GtkFileFilter as GtkBuildable

The GtkFileFilter implementation of the GtkBuildable interface
supports adding rules using the <mime-types>, <patterns> and
<applications> elements and listing the rules within. Specifying
a <mime-type> or <pattern> is the same
as calling gtk_recent_filter_add_mime_type() or gtk_recent_filter_add_pattern()

A UI definition fragment specifying GtkFileFilter rules


text/plain
image/*


*.txt
*.png


]]>



Properties
Properties Defined By
Methods / Constructors
Method / Constructor Defined By
Events
None
Used by These Methods / Signals / Properties
Class / Namespace Method / Signal / Properties
Gtk.FileChooser
Property
filter : Gtk.FileFilter
Gtk.FileChooser
Method
add_filter (FileFilter filter) : none
Adds filter to the list of filters that the user can select between.
Gtk.FileChooser
Method
get_filter () : Gtk.FileFilter
Gets the current filter; see gtk_file_chooser_set_filter().
Gtk.FileChooser
Method
remove_filter (FileFilter filter) : none
Removes filter from the list of filters that the user can select between.
Gtk.FileChooser
Method
set_filter (FileFilter filter) : none
Sets the current filter; only the files that pass the
filter will be displayed.
Documentation generated by Introspection Doc Generator Loosely Based on JsDoc Toolkit on Sat Apr 16 2011 17:12:41 GMT+0800 (HKT)