logo top
Main Page   Widgets   Namespaces   Book  

Gtk::FileChooser Class Reference

Inheritance diagram for Gtk::FileChooser:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~FileChooser ()
GtkFileChooser* gobj ()
 Provides access to the underlying C GObject.

const GtkFileChooser* gobj () const
 Provides access to the underlying C GObject.

void set_action (FileChooserAction action)
 Sets the type of operation that that the chooser is performing; the user interface is adapted to suit the selected action.

FileChooserAction get_action () const
 Gets the type of operation that the file chooser is performing; see gtk_file_chooser_set_action().

void set_local_only (bool files_only=true)
 Sets whether only local files can be selected in the file selector.

bool get_local_only () const
 Gets whether only local files can be selected in the file selector.

void set_select_multiple (bool select_multiple=true)
 Sets whether multiple files can be selected in the file selector.

bool get_select_multiple () const
 Gets whether multiple files can be selected in the file selector.

void set_current_name (const Glib::ustring& name)
 Sets the current name in the file selector, as if entered by the user.

Glib::ustring get_filename () const
 Gets the filename for the currently selected file in the file selector.

void set_filename (const Glib::ustring& filename)
 Sets filename as the current filename for the the file chooser; If the file name isn't in the current folder of chooser , then the current folder of chooser will be changed to the folder containing filename .

void select_filename (const Glib::ustring& filename)
 Selects a filename.

void unselect_filename (const Glib::ustring& filename)
 Unselects a currently selected filename.

void select_all ()
 Selects all the files in the current folder of a file chooser.

void unselect_all ()
 Unselects all the files in the current folder of a file chooser.

Glib::SListHandle<Glib::ustringget_filenames () const
 Lists all the selected files and subfolders in the current folder of chooser .

void set_current_folder (const Glib::ustring& filename)
 Sets the current folder for chooser from a local filename.

Glib::ustring get_current_folder () const
 Gets the current folder of chooser as a local filename.

Glib::ustring get_uri () const
 Gets the URI for the currently selected file in the file selector.

void set_uri (const Glib::ustring& uri)
 Sets the file referred to by uri as the current file for the the file chooser; If the file name isn't in the current folder of chooser , then the current folder of chooser will be changed to the folder containing uri .

void select_uri (const Glib::ustring& uri)
 Selects the file to by uri .

void unselect_uri (const Glib::ustring& uri)
 Unselects the file referred to by uri .

Glib::SListHandle<Glib::ustringget_uris () const
 Lists all the selected files and subfolders in the current folder of chooser .

void set_current_folder_uri (const Glib::ustring& uri)
 Sets the current folder for chooser from an URI.

Glib::ustring get_current_folder_uri () const
 Gets the current folder of chooser as an URI.

void set_preview_widget (Gtk::Widget& preview_widget)
 Sets an application-supplied widget to use to display a custom preview of the currently selected file.

const Gtk::Widgetget_preview_widget () const
 Gets the current preview widget; see gtk_file_chooser_set_preview_widget().

Gtk::Widgetget_preview_widget ()
 Gets the current preview widget; see gtk_file_chooser_set_preview_widget().

void set_preview_widget_active (bool active=true)
 Sets whether the preview widget set by gtk_file_chooser_set_preview_widget_active() should be shown for the current filename.

bool get_preview_widget_active () const
 Gets whether the preview widget set by gtk_file_chooser_set_preview_widget_active() should be shown for the current filename.

void set_use_preview_label (bool use_label=true)
bool get_use_preview_label () const
Glib::ustring get_preview_filename () const
 Gets the filename that should be previewed in a custom preview widget.

Glib::ustring get_preview_uri () const
 Gets the URI that should be previewed in a custom preview widget.

void set_extra_widget (Gtk::Widget& extra_widget)
 Sets an application-supplied widget to provide extra options to the user.

Gtk::Widgetget_extra_widget ()
 Gets the current preview widget; see gtk_file_chooser_set_extra_widget().

const Gtk::Widgetget_extra_widget () const
 Gets the current preview widget; see gtk_file_chooser_set_extra_widget().

void add_filter (const Glib::RefPtr<FileFilter>& filter)
 Adds filter to the list of filters that the user can select between.

void remove_filter (const Glib::RefPtr<FileFilter>& filter)
 Removes filter from the list of filters that the user can select between.

Glib::SListHandle< Glib::RefPtr<
FileFilter > > 
list_filters ()
 Lists the current set of user-selectable filters; see gtk_file_chooser_add_filter(), gtk_file_chooser_remove_filter().

Glib::SListHandle< Glib::RefPtr<
const FileFilter > > 
list_filters () const
 Lists the current set of user-selectable filters; see gtk_file_chooser_add_filter(), gtk_file_chooser_remove_filter().

void set_filter (const Glib::RefPtr<FileFilter>& filter)
 Sets the current filter; only the files that pass the filter will be displayed.

Glib::RefPtr<FileFilterget_filter ()
 Gets the current filter; see gtk_file_chooser_set_filter().

Glib::RefPtr<const FileFilterget_filter () const
 Gets the current filter; see gtk_file_chooser_set_filter().

bool add_shortcut_folder (const Glib::ustring& folder)
 Adds a folder to be displayed with the shortcut folders in a file chooser.

bool remove_shortcut_folder (const Glib::ustring& folder)
 Removes a folder from a file chooser's list of shortcut folders.

Glib::SListHandle<Glib::ustringlist_shortcut_folders () const
 Queries the list of shortcut folders in the file chooser, as set by gtk_file_chooser_set_shortcut_folders().

bool add_shortcut_folder_uri (const Glib::ustring& folder)
 Adds a folder URI to be displayed with the shortcut folders in a file chooser.

bool remove_shortcut_folder_uri (const Glib::ustring& folder)
 Removes a folder URI from a file chooser's list of shortcut folders.

Glib::SListHandle<Glib::ustringlist_shortcut_folder_uris () const
 Queries the list of shortcut folders in the file chooser, as set by gtk_file_chooser_set_shortcut_folder_uris().

Glib::SignalProxy0<void> signal_current_folder_changed ()
Glib::SignalProxy0<void> signal_selection_changed ()
Glib::SignalProxy0<void> signal_update_preview ()
Glib::SignalProxy0<void> signal_file_activated ()
Glib::PropertyProxy<FileChooserActionproperty_action ()
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy_ReadOnly<
FileChooserAction
property_action () const
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy< Glib::RefPtr<
FileFilter > > 
property_filter ()
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy_ReadOnly<
Glib::RefPtr<FileFilter >> 
property_filter () const
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy<bool> property_folder_mode ()
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy_ReadOnly<
bool > 
property_folder_mode () const
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy<bool> property_local_only ()
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy_ReadOnly<
bool > 
property_local_only () const
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy<Widget*> property_preview_widget ()
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy_ReadOnly<
Widget* > 
property_preview_widget () const
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy<bool> property_preview_widget_active ()
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy_ReadOnly<
bool > 
property_preview_widget_active () const
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy<bool> property_use_preview_label ()
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy_ReadOnly<
bool > 
property_use_preview_label () const
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy<Widget*> property_extra_widget ()
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy_ReadOnly<
Widget* > 
property_extra_widget () const
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy<bool> property_select_multiple ()
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy_ReadOnly<
bool > 
property_select_multiple () const
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy<bool> property_show_hidden ()
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Glib::PropertyProxy_ReadOnly<
bool > 
property_show_hidden () const
 You rarely need to use properties because there are get_ and set_ methods for almost all of them.


Static Public Member Functions

void add_interface (GType gtype_implementer)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gtk::FileChooserwrap (GtkFileChooser* object, bool take_copy=false)

Constructor & Destructor Documentation

virtual Gtk::FileChooser::~FileChooser (  )  [virtual]
 


Member Function Documentation

void Gtk::FileChooser::add_filter ( const Glib::RefPtr<FileFilter>&  filter  ) 
 

Adds filter to the list of filters that the user can select between.

When a filter is selected, only files that are passed by that filter are displayed.

Since: 2.4

Parameters:
filter A Gtk::FileFilter.

void Gtk::FileChooser::add_interface ( GType  gtype_implementer  )  [static]
 

bool Gtk::FileChooser::add_shortcut_folder ( const Glib::ustring folder  ) 
 

Adds a folder to be displayed with the shortcut folders in a file chooser.

Note that shortcut folders do not get saved, as they are provided by the application. For example, you can use this to add a "/usr/share/mydrawprogram/Clipart" folder to the volume list.

Parameters:
folder Filename of the folder to add.
error Location to store error, or 0.
Returns:
true if the folder could be added successfully, false otherwise. In the latter case, the error will be set as appropriate.
Since: 2.4.

bool Gtk::FileChooser::add_shortcut_folder_uri ( const Glib::ustring folder  ) 
 

Adds a folder URI to be displayed with the shortcut folders in a file chooser.

Note that shortcut folders do not get saved, as they are provided by the application. For example, you can use this to add a "file:///usr/share/mydrawprogram/Clipart" folder to the volume list.

Parameters:
folder URI of the folder to add.
error Location to store error, or 0.
Returns:
true if the folder could be added successfully, false otherwise. In the latter case, the error will be set as appropriate.
Since: 2.4.

FileChooserAction Gtk::FileChooser::get_action (  )  const
 

Gets the type of operation that the file chooser is performing; see gtk_file_chooser_set_action().

Returns:
The action that the file selector is performing
Since: 2.4.

Glib::ustring Gtk::FileChooser::get_current_folder (  )  const
 

Gets the current folder of chooser as a local filename.

See gtk_file_chooser_set_current_folder().

Returns:
The full path of the current folder, or 0 if the current path cannot be represented as a local filename. Free with Glib::free().
Since: 2.4.

Glib::ustring Gtk::FileChooser::get_current_folder_uri (  )  const
 

Gets the current folder of chooser as an URI.

See gtk_file_chooser_set_current_folder_uri().

Returns:
The URI for the current folder. Free with Glib::free().
Since: 2.4.

const Gtk::Widget* Gtk::FileChooser::get_extra_widget (  )  const
 

Gets the current preview widget; see gtk_file_chooser_set_extra_widget().

Returns:
The current extra widget, or 0
Since: 2.4.

Gtk::Widget* Gtk::FileChooser::get_extra_widget (  ) 
 

Gets the current preview widget; see gtk_file_chooser_set_extra_widget().

Returns:
The current extra widget, or 0
Since: 2.4.

Glib::ustring Gtk::FileChooser::get_filename (  )  const
 

Gets the filename for the currently selected file in the file selector.

If multiple files are selected, one of the filenames will be returned at random.

Returns:
The currently selected filename, or 0 if no file is selected, or the selected file can't be represented with a local filename. Free with Glib::free().
Since: 2.4.

Glib::SListHandle<Glib::ustring> Gtk::FileChooser::get_filenames (  )  const
 

Lists all the selected files and subfolders in the current folder of chooser .

The returned names are full absolute paths. If files in the current folder cannot be represented as local filenames they will be ignored. (See gtk_file_chooser_get_uris())

Returns:
A G::SList containing the filenames of all selected files and subfolders in the current folder. Free the returned list with Glib::slist_free(), and the filenames with Glib::free().
Since: 2.4.

Glib::RefPtr<const FileFilter> Gtk::FileChooser::get_filter (  )  const
 

Gets the current filter; see gtk_file_chooser_set_filter().

Returns:
The current filter, or 0
Since: 2.4.

Glib::RefPtr<FileFilter> Gtk::FileChooser::get_filter (  ) 
 

Gets the current filter; see gtk_file_chooser_set_filter().

Returns:
The current filter, or 0
Since: 2.4.

bool Gtk::FileChooser::get_local_only (  )  const
 

Gets whether only local files can be selected in the file selector.

See gtk_file_chooser_set_local_only()

Returns:
true if only local files can be selected.
Since: 2.4.

Glib::ustring Gtk::FileChooser::get_preview_filename (  )  const
 

Gets the filename that should be previewed in a custom preview widget.

See gtk_file_chooser_set_preview_widget().

Returns:
The filename to preview, or 0 if no file is selected, or if the selected file cannot be represented as a local filename. Free with Glib::free()
Since: 2.4.

Glib::ustring Gtk::FileChooser::get_preview_uri (  )  const
 

Gets the URI that should be previewed in a custom preview widget.

See gtk_file_chooser_set_preview_widget().

Returns:
The URI for the file to preview, or 0 if no file is selected. Free with Glib::free().
Since: 2.4.

Gtk::Widget* Gtk::FileChooser::get_preview_widget (  ) 
 

Gets the current preview widget; see gtk_file_chooser_set_preview_widget().

Returns:
The current preview widget, or 0
Since: 2.4.

const Gtk::Widget* Gtk::FileChooser::get_preview_widget (  )  const
 

Gets the current preview widget; see gtk_file_chooser_set_preview_widget().

Returns:
The current preview widget, or 0
Since: 2.4.

bool Gtk::FileChooser::get_preview_widget_active (  )  const
 

Gets whether the preview widget set by gtk_file_chooser_set_preview_widget_active() should be shown for the current filename.

See gtk_file_chooser_set_preview_widget_active().

Returns:
true if the preview widget is active for the current filename.
Since: 2.4.

bool Gtk::FileChooser::get_select_multiple (  )  const
 

Gets whether multiple files can be selected in the file selector.

See gtk_file_chooser_set_select_multiple().

Returns:
true if multiple files can be selected.
Since: 2.4.

Glib::ustring Gtk::FileChooser::get_uri (  )  const
 

Gets the URI for the currently selected file in the file selector.

If multiple files are selected, one of the filenames will be returned at random.

Returns:
The currently selected URI, or 0 if no file is selected. Free with Glib::free()
Since: 2.4.

Glib::SListHandle<Glib::ustring> Gtk::FileChooser::get_uris (  )  const
 

Lists all the selected files and subfolders in the current folder of chooser .

The returned names are full absolute URIs.

Returns:
A G::SList containing the URIs of all selected files and subfolders in the current folder. Free the returned list with Glib::slist_free(), and the filenames with Glib::free().
Since: 2.4.

bool Gtk::FileChooser::get_use_preview_label (  )  const
 

const GtkFileChooser* Gtk::FileChooser::gobj (  )  const [inline]
 

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gtk::FileChooserDialog, and Gtk::FileChooserWidget.

GtkFileChooser* Gtk::FileChooser::gobj (  )  [inline]
 

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gtk::FileChooserDialog, and Gtk::FileChooserWidget.

Glib::SListHandle<Glib::RefPtr<const FileFilter>> Gtk::FileChooser::list_filters (  )  const
 

Lists the current set of user-selectable filters; see gtk_file_chooser_add_filter(), gtk_file_chooser_remove_filter().

Returns:
A G::SList containing the current set of user selectable filters. The contents of the list are owned by GTK+, but you must free the list itself with Glib::slist_free() when you are done with it.
Since: 2.4.

Glib::SListHandle<Glib::RefPtr<FileFilter>> Gtk::FileChooser::list_filters (  ) 
 

Lists the current set of user-selectable filters; see gtk_file_chooser_add_filter(), gtk_file_chooser_remove_filter().

Returns:
A G::SList containing the current set of user selectable filters. The contents of the list are owned by GTK+, but you must free the list itself with Glib::slist_free() when you are done with it.
Since: 2.4.

Glib::SListHandle<Glib::ustring> Gtk::FileChooser::list_shortcut_folder_uris (  )  const
 

Queries the list of shortcut folders in the file chooser, as set by gtk_file_chooser_set_shortcut_folder_uris().

Returns:
A list of folder URIs, or 0 if there are no shortcut folders. Free the returned list with Glib::slist_free(), and the URIs with Glib::free().
Since: 2.4.

Glib::SListHandle<Glib::ustring> Gtk::FileChooser::list_shortcut_folders (  )  const
 

Queries the list of shortcut folders in the file chooser, as set by gtk_file_chooser_set_shortcut_folders().

Returns:
A list of folder filenames, or 0 if there are no shortcut folders. Free the returned list with Glib::slist_free(), and the filenames with Glib::free().
Since: 2.4.

Glib::PropertyProxy_ReadOnly<FileChooserAction> Gtk::FileChooser::property_action (  )  const
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<FileChooserAction> Gtk::FileChooser::property_action (  ) 
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Widget*> Gtk::FileChooser::property_extra_widget (  )  const
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Widget*> Gtk::FileChooser::property_extra_widget (  ) 
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Glib::RefPtr<FileFilter>> Gtk::FileChooser::property_filter (  )  const
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Glib::RefPtr<FileFilter>> Gtk::FileChooser::property_filter (  ) 
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::FileChooser::property_folder_mode (  )  const
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::FileChooser::property_folder_mode (  ) 
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::FileChooser::property_local_only (  )  const
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::FileChooser::property_local_only (  ) 
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<Widget*> Gtk::FileChooser::property_preview_widget (  )  const
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<Widget*> Gtk::FileChooser::property_preview_widget (  ) 
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::FileChooser::property_preview_widget_active (  )  const
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::FileChooser::property_preview_widget_active (  ) 
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::FileChooser::property_select_multiple (  )  const
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::FileChooser::property_select_multiple (  ) 
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::FileChooser::property_show_hidden (  )  const
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::FileChooser::property_show_hidden (  ) 
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly<bool> Gtk::FileChooser::property_use_preview_label (  )  const
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Glib::PropertyProxy<bool> Gtk::FileChooser::property_use_preview_label (  ) 
 

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

void Gtk::FileChooser::remove_filter ( const Glib::RefPtr<FileFilter>&  filter  ) 
 

Removes filter from the list of filters that the user can select between.

Since: 2.4

Parameters:
filter A Gtk::FileFilter.

bool Gtk::FileChooser::remove_shortcut_folder ( const Glib::ustring folder  ) 
 

Removes a folder from a file chooser's list of shortcut folders.

Parameters:
folder Filename of the folder to remove.
error Location to store error, or 0.
Returns:
true if the operation succeeds, false otherwise. In the latter case, the error will be set as appropriate.
See also: gtk_file_chooser_add_shortcut_folder()

Since: 2.4.

bool Gtk::FileChooser::remove_shortcut_folder_uri ( const Glib::ustring folder  ) 
 

Removes a folder URI from a file chooser's list of shortcut folders.

Parameters:
uri URI of the folder to remove.
error Location to store error, or 0.
Returns:
true if the operation succeeds, false otherwise. In the latter case, the error will be set as appropriate.
See also: gtk_file_chooser_add_shortcut_folder_uri()

Since: 2.4.

void Gtk::FileChooser::select_all (  ) 
 

Selects all the files in the current folder of a file chooser.

Since: 2.4

void Gtk::FileChooser::select_filename ( const Glib::ustring filename  ) 
 

Selects a filename.

If the file name isn't in the current folder of chooser , then the current folder of chooser will be changed to the folder containing filename .

Since: 2.4

Parameters:
filename The filename to select.

void Gtk::FileChooser::select_uri ( const Glib::ustring uri  ) 
 

Selects the file to by uri .

If the URI doesn't refer to a file in the current folder of chooser , then the current folder of chooser will be changed to the folder containing filename .

Since: 2.4

Parameters:
uri The URI to select.

void Gtk::FileChooser::set_action ( FileChooserAction  action  ) 
 

Sets the type of operation that that the chooser is performing; the user interface is adapted to suit the selected action.

For example, an option to create a new folder might be shown if the action is Gtk::FILE_CHOOSER_ACTION_SAVE but not if the action is Gtk::FILE_CHOOSER_ACTION_OPEN.

Since: 2.4

Parameters:
action The action that the file selector is performing.

void Gtk::FileChooser::set_current_folder ( const Glib::ustring filename  ) 
 

Sets the current folder for chooser from a local filename.

The user will be shown the full contents of the current folder, plus user interface elements for navigating to other folders.

Since: 2.4

Parameters:
filename The full path of the new current folder.

void Gtk::FileChooser::set_current_folder_uri ( const Glib::ustring uri  ) 
 

Sets the current folder for chooser from an URI.

The user will be shown the full contents of the current folder, plus user interface elements for navigating to other folders.

Since: 2.4

Parameters:
uri The URI for the new current folder.

void Gtk::FileChooser::set_current_name ( const Glib::ustring name  ) 
 

Sets the current name in the file selector, as if entered by the user.

Note that the name passed in here is a UTF-8 string rather than a filename. This function is meant for such uses as a suggested name in a "Save As..." dialog.

If you want to preselect a particular existing file, you should use gtk_file_chooser_set_filename() instead.

Since: 2.4

Parameters:
name The filename to use, as a UTF-8 string.

void Gtk::FileChooser::set_extra_widget ( Gtk::Widget extra_widget  ) 
 

Sets an application-supplied widget to provide extra options to the user.

Since: 2.4

Parameters:
extra_widget Widget for extra options.

void Gtk::FileChooser::set_filename ( const Glib::ustring filename  ) 
 

Sets filename as the current filename for the the file chooser; If the file name isn't in the current folder of chooser , then the current folder of chooser will be changed to the folder containing filename .

This is equivalent to a sequence of gtk_file_chooser_unselect_all() followed by gtk_file_chooser_select_filename().

Note that the file must exist, or nothing will be done except for the directory change. To pre-enter a filename for the user, as in a save-as dialog, use gtk_file_chooser_set_current_name()

Since: 2.4

Parameters:
filename The filename to set as current.

void Gtk::FileChooser::set_filter ( const Glib::RefPtr<FileFilter>&  filter  ) 
 

Sets the current filter; only the files that pass the filter will be displayed.

If the user-selectable list of filters is non-empty, then the filter should be one of the filters in that list. Setting the current filter when the list of filters is empty is useful if you want to restrict the displayed set of files without letting the user change it.

Since: 2.4

Parameters:
filter A Gtk::FileFilter.

void Gtk::FileChooser::set_local_only ( bool  files_only = true  ) 
 

Sets whether only local files can be selected in the file selector.

If local_only is true (the default), then the selected file are files are guaranteed to be accessible through the operating systems native file file system and therefore the application only needs to worry about the filename functions in Gtk::FileChooser, like gtk_file_chooser_get_filename(), rather than the URI functions like gtk_file_chooser_get_uri(),

Since: 2.4

Parameters:
local_only true if only local files can be selected.

void Gtk::FileChooser::set_preview_widget ( Gtk::Widget preview_widget  ) 
 

Sets an application-supplied widget to use to display a custom preview of the currently selected file.

To implement a preview, after setting the preview widget, you connect to the ::selection-changed signal, and call gtk_file_chooser_get_preview_filename() or gtk_file_chooser_get_preview_uri() on each change. If you can display a preview of the new file, update your widget and set the preview active using gtk_file_chooser_set_preview_widget_active(). Otherwise, set the preview inactive.

When there is no application-supplied preview widget, or the application-supplied preview widget is not active, the file chooser may display an internally generated preview of the current file or it may display no preview at all.

Since: 2.4

Parameters:
preview_widget Widget for displaying preview.

void Gtk::FileChooser::set_preview_widget_active ( bool  active = true  ) 
 

Sets whether the preview widget set by gtk_file_chooser_set_preview_widget_active() should be shown for the current filename.

When active is set to false, the file chooser may display an internally generated preview of the current file or it may display no preview at all. See gtk_file_chooser_set_preview_widget() for more details.

Since: 2.4

Parameters:
active Whether to display the user-specified preview widget.

void Gtk::FileChooser::set_select_multiple ( bool  select_multiple = true  ) 
 

Sets whether multiple files can be selected in the file selector.

If the file selector if in folder mode (see gtk_file_selector_set_folder_mode()) then only one folder can be selected, without regard to this setting.

Since: 2.4

Parameters:
select_multiple true if multiple files can be selected.

void Gtk::FileChooser::set_uri ( const Glib::ustring uri  ) 
 

Sets the file referred to by uri as the current file for the the file chooser; If the file name isn't in the current folder of chooser , then the current folder of chooser will be changed to the folder containing uri .

This is equivalent to a sequence of gtk_file_chooser_unselect_all() followed by gtk_file_chooser_select_uri().

Note that the file must exist, or nothing will be done except for the directory change. To pre-enter a filename for the user, as in a save-as dialog, use gtk_file_chooser_set_current_name()

Since: 2.4

Parameters:
uri The URI to set as current.

void Gtk::FileChooser::set_use_preview_label ( bool  use_label = true  ) 
 

Glib::SignalProxy0<void> Gtk::FileChooser::signal_current_folder_changed (  ) 
 

Glib::SignalProxy0<void> Gtk::FileChooser::signal_file_activated (  ) 
 

Glib::SignalProxy0<void> Gtk::FileChooser::signal_selection_changed (  ) 
 

Glib::SignalProxy0<void> Gtk::FileChooser::signal_update_preview (  ) 
 

void Gtk::FileChooser::unselect_all (  ) 
 

Unselects all the files in the current folder of a file chooser.

Since: 2.4

void Gtk::FileChooser::unselect_filename ( const Glib::ustring filename  ) 
 

Unselects a currently selected filename.

If the filename is not in the current directory, does not exist, or is otherwise not currently selected, does nothing.

Since: 2.4

Parameters:
filename The filename to unselect.

void Gtk::FileChooser::unselect_uri ( const Glib::ustring uri  ) 
 

Unselects the file referred to by uri .

If the file is not in the current directory, does not exist, or is otherwise not currently selected, does nothing.

Since: 2.4

Parameters:
uri The URI to unselect.


Friends And Related Function Documentation

Glib::RefPtr<Gtk::FileChooser> wrap ( GtkFileChooser*  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:
Generated for gtkmm 2.4 by Doxygen 1.3.4 © 1997-2001