PHP-GTK
Saturday, November 01, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkFileChooserWidget Constructor
GtkFileFilter Constructornext

Last updated: Sun, 12 May 2013
view this page in English

GtkFileFilter

A filter to select a subset of files.

Object Hierarchy

Description

This is a filter that is basically used to restrict the the files that are shown in a GtkFileChooserWidget. You may filter the files either by basis of their names (add_pattern() ), mime types (add_mime_type() ), or files that are supported by GdkPixbuf (add_pixbuf_formats() ). To check with your very own function, use add_custom() with a callback.

When you choose to filter by mime types, note that selecting a particular mime type will also automatically include all subclasses of that type. For example, filtering for the mime type text/plain will also include all files of type application/rtf since it a subclass of text/plain. You may also use wild card to specify your mime type, such as image/*.

The most common way to use a file filter is to add it to a GtkFileChooserWidget with the set_filter method. Of course, the same method may also be used on a GtkFileChooserButton or a GtkFileChooserDialog.

Constructors

-- Creates a new file filter.

Methods

add_custom()
  Display files passing checks of your own function.
add_mime_type()
  Allow files of specified mime type to be displayed.
add_pattern()
  Allow files with names that match with the specified pattern to be displayed.
add_pixbuf_formats()
  Allow images supported by GdkPixbuf to be displayed.
filter()
  Test file filters.
get_name()
  Returns the human-readable name of the file filter.
get_needed()
  FIXME!
set_name()
  Sets the human-readable name of the file filter.


User Contributed Notes
gtk.gtkfilefilter.php
add a note about notes
There are no user contributed notes for this page.


previousGtkFileChooserWidget Constructor
GtkFileFilter Constructornext

Last updated: Sun, 12 May 2013
view this page in English


credits 

PHP  Copyright © 2001-2014 The PHP Group
 All rights reserved.
Last updated: Sun May 12 20:50:57 2013 CEST