Package: gtk
Class gtk-file-filter
Superclassesg-object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct Slots
None
Details A gtk-file-filter class can be used to restrict the files being shown in a gtk-file-chooser widget.
Files can be filtered based on their name with the function gtk-file-filter-add-pattern, on their mime type with the function gtk-file-filter-add-mime-type, or by a custom filter function with the function 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 the gtk-file-filter class 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 gtk-file-chooser widget, see the function gtk-file-chooser-add-filter, but it is also possible to manually use a filter on a file with the function gtk-file-filter-filter. GtkFileFilter as GtkBuildableExample: A UI definition fragment specifying gtk-file-filter rules <object class="GtkFileFilter"> <mime-types> <mime-type>text/plain</mime-type> <mime-type>image/*</mime-type> </mime-types> <patterns> <pattern>*.txt</pattern> <pattern>*.png</pattern> </patterns> </object> | Inherited Slot Access FunctionsSee also |
*2021-1-29