25
25
+----GtkFileFilter}}
26
26
\section{Detailed Description}{A GtkFileFilter can be used to restrict the files being shown
27
in a \verb{\link{GtkFileChooser}}. Files can be filtered based on their name
27
in a \code{\link{GtkFileChooser}}. Files can be filtered based on their name
28
28
(with \code{\link{gtkFileFilterAddPattern}}), on their mime type (with
29
29
\code{\link{gtkFileFilterAddMimeType}}), or by a custom filter function
30
(with \code{\link{gtkFileFilterAddCustom}}).
30
(with \code{\link{gtkFileFilterAddCustom}}).
32
32
Filtering by mime types handles aliasing and subclassing of mime
33
types; e.g. a filter for text/plain also matches a file with mime
34
type application/rtf, since application/rtf is a subclass of
35
text/plain. Note that \verb{\link{GtkFileFilter}} allows wildcards for the
33
types; e.g. a filter for text/plain also matches a file with mime
34
type application/rtf, since application/rtf is a subclass of
35
text/plain. Note that \code{\link{GtkFileFilter}} allows wildcards for the
36
36
subtype of a mime type, so you can e.g. filter for image/*.
38
Normally, filters are used by adding them to a \verb{\link{GtkFileChooser}},
38
Normally, filters are used by adding them to a \code{\link{GtkFileChooser}},
39
39
see \code{\link{gtkFileChooserAddFilter}}, but it is also possible
40
40
to manually use a filter on a file with \code{\link{gtkFileFilterFilter}}.}
41
41
\section{Structures}{\describe{
47
47
\item{\verb{GtkFileFilterInfo}}{
48
48
A \code{GtkFileFilterInfo} struct is used
49
to pass information about the tested file to
50
\code{\link{gtkFileFilterFilter}}.
49
to pass information about the tested file to
50
\code{\link{gtkFileFilterFilter}}.
51
51
\strong{\verb{GtkFileFilterInfo} is a \link{transparent-type}.}
65
65
\section{Convenient Construction}{\code{gtkFileFilter} is the equivalent of \code{\link{gtkFileFilterNew}}.}
66
66
\section{Enums and Flags}{\describe{\item{\verb{GtkFileFilterFlags}}{
67
These flags indicate what parts of a \verb{\link{GtkFileFilterInfo}} struct
68
are filled or need to be filled.
67
These flags indicate what parts of a \code{\link{GtkFileFilterInfo}} struct
68
are filled or need to be filled.
71
71
\item{\verb{filename}}{the filename of the file being tested}
81
81
see \code{\link{gtkFileFilterAddCustom}}.
84
\item{\code{filter.info}}{[\verb{\link{GtkFileFilterInfo}}] a \verb{\link{GtkFileFilterInfo}} that is filled according
84
\item{\code{filter.info}}{a \code{\link{GtkFileFilterInfo}} that is filled according
85
85
to the \code{needed} flags passed to \code{\link{gtkFileFilterAddCustom}}}
86
\item{\code{data}}{[R object] user data passed to \code{\link{gtkFileFilterAddCustom}}}
86
\item{\code{data}}{user data passed to \code{\link{gtkFileFilterAddCustom}}}
89
89
\emph{Returns:} [logical] \code{TRUE} if the file should be displayed
92
\references{\url{http://developer.gnome.org/doc/API/2.0/gtk/gtk-gtkfilefilter.html}}
92
\references{\url{http://library.gnome.org/devel//gtk/gtk-gtkfilefilter.html}}
93
93
\author{Derived by RGtkGen from GTK+ documentation}
94
\seealso{\verb{\link{GtkFileChooser}}}
94
\seealso{\code{\link{GtkFileChooser}}}