![]() |
![]() |
Gtk::FileSelection should be used to retrieve file or directory names from the user. It will create a new dialog window containing a directory list, and a file list corresponding to the current working directory. The filesystem can be navigated using the directory list or the drop-down history menu. Alternatively, the TAB key can be used to navigate using filename completion - common in text based editors such as emacs and jed.
Public Member Functions | |
virtual | ~FileSelection () |
GtkFileSelection* | gobj () |
Provides access to the underlying C GtkObject. | |
const GtkFileSelection* | gobj () const |
Provides access to the underlying C GtkObject. | |
FileSelection () | |
FileSelection (const Glib::ustring& title) | |
void | set_filename (const std::string& filename) |
Sets a default path for the file requestor. | |
std::string | get_filename () const |
This function returns the selected filename in the on-disk encoding (see Glib::filename_from_utf8()), which may or may not be the same as that used by GTK+ (UTF-8). | |
void | complete (const Glib::ustring& pattern) |
void | show_fileop_buttons () |
void | hide_fileop_buttons () |
Glib::ArrayHandle<std::string> | get_selections () const |
Retrieves the list of file selections the user has made in the dialog box. | |
void | set_select_multiple (bool select_multiple=true) |
Sets whether the user is allowed to select multiple files in the file list. | |
bool | get_select_multiple () const |
Determines whether or not the user is allowed to select multiple files in the file list. | |
TreeView* | get_dir_list () |
const TreeView* | get_dir_list () const |
TreeView* | get_file_list () |
const TreeView* | get_file_list () const |
OptionMenu* | get_history_pulldown () |
const OptionMenu* | get_history_pulldown () const |
Entry* | get_selection_entry () |
const Entry* | get_selection_entry () const |
Label* | get_selection_text () |
const Label* | get_selection_text () const |
VBox* | get_main_vbox () |
const VBox* | get_main_vbox () const |
Button* | get_ok_button () |
const Button* | get_ok_button () const |
Button* | get_cancel_button () |
const Button* | get_cancel_button () const |
Button* | get_help_button () |
const Button* | get_help_button () const |
HButtonBox* | get_button_area () |
const HButtonBox* | get_button_area () const |
HBox* | get_action_area () |
const HBox* | get_action_area () const |
Glib::PropertyProxy<bool> | property_show_fileops () |
You rarely need to use properties because there are get_ and set_ methods for almost all of them. | |
Glib::PropertyProxy<std::string> | property_filename () |
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. | |
Related Functions | |
(Note that these are not member functions.) | |
Gtk::FileSelection* | wrap (GtkFileSelection* object, bool take_copy=false) |
|
|
|
|
|
|
|
|
|
Reimplemented from Gtk::Dialog. |
|
Reimplemented from Gtk::Dialog. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This function returns the selected filename in the on-disk encoding (see Glib::filename_from_utf8()), which may or may not be the same as that used by GTK+ (UTF-8). To convert to UTF-8, call Glib::filename_to_utf8(). The returned string points to a statically allocated buffer and should be copied if you plan to keep it around. If no file is selected then the selected directory path is returned.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Determines whether or not the user is allowed to select multiple files in the file list.
|
|
|
|
|
|
|
|
|
|
Retrieves the list of file selections the user has made in the dialog box. This function is intended for use when the user can select multiple files in the file list. The first file in the list is equivalent to what get_filename() would return. The filenames are in the encoding of Glib::filename_from_utf8(), which may or may not be the same as that used by GTK+ (UTF-8). To convert to UTF-8, call Glib::filename_to_utf8() on each string.
|
|
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::Dialog. |
|
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::Dialog. |
|
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
|
Sets a default path for the file requestor. If filename includes a directory path, then the requestor will open with that path as its current working directory. The encoding of filename is the on-disk encoding, which may not be UTF-8. See Glib::filename_from_utf8().
|
|
Sets whether the user is allowed to select multiple files in the file list. Use get_selections() to get the list of selected files.
|
|
|
|
|