gtkmm 2.4: Gtk::FileFilter Class Reference

Main Page Widgets Namespaces Book

# Gtk::FileFilter Class Reference

Inheritance diagram for Gtk::FileFilter:

[legend]
List of all members.

## Public Types
typedef sigc::slot< bool, const Info& > | SlotCustom
| For instance, bool on_custom(const Gtk::FileFilter::Info& filter_info);.
## Public Member Functions
void | add_custom (FileFilterFlags needed, const SlotCustom& slot)
void | add_mime_type (const Glib::ustring& mime_type)
| Adds a rule allowing a given mime type to filter .
void | add_pattern (const Glib::ustring& pattern)
| Adds a rule allowing a shell style glob to a filter.
void | add_pixbuf_formats ()
| Adds a rule allowing image files in the formats supported by GdkPixbuf.
| FileFilter ()
Glib::ustring | get_name () const
| Gets the human-readable name for the filter.
FileFilterFlags | get_needed () const
| Gets the fields that need to be filled in for the structure passed to gtk_file_filter_filter().
const GtkFileFilter* | gobj () const
| Provides access to the underlying C GtkObject.
GtkFileFilter* | gobj ()
| Provides access to the underlying C GtkObject.
void | set_name (const Glib::ustring& name)
| 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.
virtual | ~FileFilter ()
## Related Functions
(Note that these are not member functions.)
Gtk::FileFilter* | wrap (GtkFileFilter* object, bool take_copy=false)
## Classes
class | Info

## Member Typedef Documentation

typedef sigc::slot<bool, const Info&> Gtk::FileFilter::SlotCustom

| For instance, bool on_custom(const Gtk::FileFilter::Info& filter_info);.

## Constructor & Destructor Documentation

virtual Gtk::FileFilter::~FileFilter | ( |  | ) | `[virtual]`

Gtk::FileFilter::FileFilter | ( |  | ) |

## Member Function Documentation

void Gtk::FileFilter::add_custom | ( | FileFilterFlags | needed,
|  | const SlotCustom& | slot
| ) |

void Gtk::FileFilter::add_mime_type | ( | const Glib::ustring& | mime_type | ) |

  | Adds a rule allowing a given mime type to filter . Since gtkmm 2.4: Parameters:
  | mime_type | Name of a MIME type.

void Gtk::FileFilter::add_pattern | ( | const Glib::ustring& | pattern | ) |

  | Adds a rule allowing a shell style glob to a filter. Since gtkmm 2.4: Parameters:
  | pattern | A shell style glob.

void Gtk::FileFilter::add_pixbuf_formats | ( |  | ) |

| Adds a rule allowing image files in the formats supported by GdkPixbuf. Since gtkmm 2.6:

Glib::ustring Gtk::FileFilter::get_name | ( |  | ) | const

| Gets the human-readable name for the filter. See gtk_file_filter_set_name(). Returns: The human-readable name of the filter, or `0`. This value is owned by GTK+ and must not be modified or freed. Since gtkmm 2.4:

FileFilterFlags Gtk::FileFilter::get_needed | ( |  | ) | const

| Gets the fields that need to be filled in for the structure passed to gtk_file_filter_filter(). This function will not typically be used by applications; it is intended principally for use in the implementation of Gtk::FileChooser. Returns: Bitfield of flags indicating needed fields when calling gtk_file_filter_filter() Since gtkmm 2.4:

const GtkFileFilter* Gtk::FileFilter::gobj | ( |  | ) | const`[inline]`

| Provides access to the underlying C GtkObject. Reimplemented from Gtk::Object.

GtkFileFilter* Gtk::FileFilter::gobj | ( |  | ) | `[inline]`

| Provides access to the underlying C GtkObject. Reimplemented from Gtk::Object.

void Gtk::FileFilter::set_name | ( | const Glib::ustring& | name | ) |

  | 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. Since gtkmm 2.4: Parameters:
  | name | The human-readable-name for the filter, or `0` to remove any existing name.

## Friends And Related Function Documentation

Gtk::FileFilter* wrap | ( | GtkFileFilter* | object,
|  | bool | take_copy = `false`
| ) | `[related]`

  | Parameters:
  | object | The C instance
  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns: A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- filefilter.h