Forum und email

GtkFileSelection

Prompts the user for a file/directory name.

Йерархия на обектите

GObject
`-- GtkObject
       `-- GtkWidget
              `-- GtkContainer
                     `-- GtkBin
                            `-- GtkWindow
                                   `-- GtkDialog
                                          `-- GtkFileSelection

Описание

This widget is particularly useful when you want to retrieve a file or directory name from the user. It is slightly more advanced than the file selector in two ways: firstly, the user may select a directory here, and secondly, you have the choice to let the user create

You may create a new GtkFileSelection by using its constructor. This will generate a dialog box containing a directory list, and a file list corresponding to the current working directory. The file system may be navigated using the directory list or the drop-down history menu (the visibility of which may be controlled).

Note that the TAB key may also be used for completing file/directory names.

The GtkFileSelection is actually made of the following GtkWidget fields:
  • fileop_dialog: This dialog box is used to display the GtkFileSelection. You may customize it using the standard GtkDialog functions.
  • ok_button, cancel_button: These two buttons should be connected appropriately to handle situations when the user clicks the OK or Cancel buttons respectively in the GtkFileSelection widget.
  • history_pulldown: This is effectively a GtkOptionMenu that may be used to control the drop-down history of directories.
  • fileop_c_dir, fileop_del_file, fileop_ren_file: These are the operation buttons that appear at the top of the GtkFileSelection and perform the operations of creating a directory, deleting a file and renaming a file respectively. You may use the hide_fileop_buttons() and show_fileop_buttons() methods to control their visibility.

Constructors

GtkFileSelection ([string title = null]);

-- Creates a GtkFileSelection prompt.

Методи

complete()
  Matches the given pattern to valid file/directory names.
get_filename()
  Returns the selected filename.
get_select_multiple()
  Returns whether or not multiple selections are allowed.
get_selections()
  Returns the list of file selection made by the user.
hide_fileop_buttons()
  Hides the file operation buttons.
set_filename()
  Sets the default path for the file selector.
set_select_multiple()
  Sets whether multiple selections are allowed.
show_fileop_buttons()
  Shows the file operation buttons.

Полета

action_area:
 
button_area:
 
cancel_button:
  Refers to the cancel button of the file selection prompt.
dir_list:
  Refers to the directory list displayed on the left of the file selection prompt.
file_list:
  Refers to the file list displayed on the right of the file selection prompt.
fileop_c_dir:
  Refers to the create directory operation button of the dialog.
fileop_del_file:
  Refers to the delete file operation button of the dialog.
fileop_dialog:
  Refers to the dialog that contains the operation buttons.
fileop_entry:
 
fileop_file:
 
fileop_ren_file:
  Refers to the rename file operation button of the dialog.
help_button:
  Refers to the help button of the file selection prompt.
history_menu:
 
history_pulldown:
 
main_vbox:
 
ok_button:
  Refers to the OK button of the file selection prompt.
selection_entry:
 
selection_text: