Class Index | Cross Index | Namespace Index |
Prompt the user for a file or directory name.
Contained in: Gtk
Derived from:
Gtk::Window
Derived by:
none
#include <gtk--/fileselection.h>
public function member index: |
||
explicit | FileSelection | (const nstring& title=0); |
void | complete | (const string& pattern); |
HBox* | get_action_area | () const; |
Button* | get_cancel_button | () const; |
string | get_filename | () const; |
Button* | get_ok_button | () const; |
Entry* | get_selection_entry | () const; |
Label* | get_selection_text | () const; |
GtkFileSelection* | gtkobj | (); |
const GtkFileSelection* | gtkobj | () const; |
void | hide_fileop_buttons | (); |
static bool | isA | (Object* object); |
void | set_filename | (const string& filename); |
void | show_fileop_buttons | (); |
virtual | ~FileSelection | (); |
The default filename can be set using set_filename and the selected filename retrieved using get_filename.
Use complete to display files that match a given pattern. This can be used for example, to show only *.txt files, or only files beginning with gtk*.
Simple file operations; create directory, delete file, and rename
file, are available from buttons at the top of the dialog. These
can be hidden using hide_fileop_buttons and shown again using
show_fileop_buttons.
By default it will contain a Gtk::CList of the application's current working directory, and a file listing. Operation buttons that allow the user to create a directory, delete files and rename files, are also present.title: A message that will be placed in the file requestor's titlebar.
If no file is selected then the selected directory path is returned.Returns: A string containing the selected file's full path.
Useful if you wish to create a custom file selector, based on Gtk::FileSelection.
If filename includes a directory path, then the requestor will open with that path as its current working directory.filename: A string to set as the default file name.
The rest of the widgets in the dialog will be resized accordingly.