| Maintainer | gtk2hs-users@lists.sourceforge.net | 
|---|---|
| Stability | provisional | 
| Portability | portable (depends on GHC) | 
| Safe Haskell | None | 
| Language | Haskell98 | 
Graphics.UI.Gtk.Selectors.FileFilter
Description
A filter for selecting a file subset
- Module available since Gtk+ version 2.4
Synopsis
- data FileFilter
- class ObjectClass o => FileFilterClass o
- castToFileFilter :: GObjectClass obj => obj -> FileFilter
- gTypeFileFilter :: GType
- toFileFilter :: FileFilterClass o => o -> FileFilter
- data FileFilterFlags
- fileFilterNew :: IO FileFilter
- fileFilterSetName :: GlibString string => FileFilter -> string -> IO ()
- fileFilterGetName :: GlibString string => FileFilter -> IO string
- fileFilterAddMimeType :: GlibString string => FileFilter -> string -> IO ()
- fileFilterAddPattern :: GlibString string => FileFilter -> string -> IO ()
- fileFilterAddCustom :: GlibString string => FileFilter -> [FileFilterFlags] -> (Maybe string -> Maybe string -> Maybe string -> Maybe string -> IO Bool) -> IO ()
- fileFilterAddPixbufFormats :: FileFilter -> IO ()
- fileFilterName :: GlibString string => Attr FileFilter string
Detail
A FileFilter can be used to restrict the files being shown in a
 FileChooser. Files can be filtered based on their name (with
 fileFilterAddPattern), on their mime type (with fileFilterAddMimeType),
 or by a custom filter function (with fileFilterAddCustom).
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 FileFilter 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 FileChooser, see
 fileChooserAddFilter.
Class Hierarchy
Types
data FileFilter Source #
Instances
| Eq FileFilter Source # | |
| Defined in Graphics.UI.Gtk.Types | |
| Ord FileFilter Source # | |
| Defined in Graphics.UI.Gtk.Types Methods compare :: FileFilter -> FileFilter -> Ordering # (<) :: FileFilter -> FileFilter -> Bool # (<=) :: FileFilter -> FileFilter -> Bool # (>) :: FileFilter -> FileFilter -> Bool # (>=) :: FileFilter -> FileFilter -> Bool # max :: FileFilter -> FileFilter -> FileFilter # min :: FileFilter -> FileFilter -> FileFilter # | |
| GObjectClass FileFilter Source # | |
| Defined in Graphics.UI.Gtk.Types | |
| FileFilterClass FileFilter Source # | |
| Defined in Graphics.UI.Gtk.Types | |
| ObjectClass FileFilter Source # | |
| Defined in Graphics.UI.Gtk.Types | |
class ObjectClass o => FileFilterClass o Source #
Instances
| FileFilterClass FileFilter Source # | |
| Defined in Graphics.UI.Gtk.Types | |
castToFileFilter :: GObjectClass obj => obj -> FileFilter Source #
toFileFilter :: FileFilterClass o => o -> FileFilter Source #
data FileFilterFlags Source #
Instances
Constructors
fileFilterNew :: IO FileFilter Source #
Creates a new FileFilter with no rules added to it. Such a filter
 doesn't accept any files, so is not particularly useful until you add rules
 with fileFilterAddMimeType, fileFilterAddPattern, or
 fileFilterAddCustom.
Methods
Arguments
| :: GlibString string | |
| => FileFilter | |
| -> string | 
 | 
| -> IO () | 
Sets the human-readable name of the filter; this is the string that will be displayed in the file selector user interface if there is a selectable list of filters.
Arguments
| :: GlibString string | |
| => FileFilter | |
| -> IO string | returns The human-readable name of the filter | 
Gets the human-readable name for the filter. See fileFilterSetName.
fileFilterAddMimeType Source #
Arguments
| :: GlibString string | |
| => FileFilter | |
| -> string | 
 | 
| -> IO () | 
Adds a rule allowing a given mime type to filter.
Arguments
| :: GlibString string | |
| => FileFilter | |
| -> string | 
 | 
| -> IO () | 
Adds a rule allowing a shell style glob to a filter.
Arguments
| :: GlibString string | |
| => FileFilter | |
| -> [FileFilterFlags] | 
 | 
| -> (Maybe string -> Maybe string -> Maybe string -> Maybe string -> IO Bool) | 
 | 
| -> IO () | 
Adds rule to a filter that allows files based on a custom callback
 function. The list of flags needed which is passed in provides information
 about what sorts of information that the filter function needs; this allows
 Gtk+ to avoid retrieving expensive information when it isn't needed by the
 filter.
fileFilterAddPixbufFormats :: FileFilter -> IO () Source #
Adds a rule allowing image files in the formats supported by Pixbuf.
- Available since Gtk+ version 2.6
Attributes
fileFilterName :: GlibString string => Attr FileFilter string Source #
'name' property. See fileFilterGetName and fileFilterSetName