GtkFileSelection            package:RGtk2            R Documentation

_G_t_k_F_i_l_e_S_e_l_e_c_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Prompt the user for a file or directory name

_M_e_t_h_o_d_s _a_n_d _F_u_n_c_t_i_o_n_s:

     'gtkFileSelectionNew(title = NULL, show = TRUE)'
      'gtkFileSelectionSetFilename(object, filename)'
      'gtkFileSelectionGetFilename(object)'
      'gtkFileSelectionComplete(object, pattern)'
      'gtkFileSelectionShowFileopButtons(object)'
      'gtkFileSelectionHideFileopButtons(object)'
      'gtkFileSelectionGetSelections(object)'
      'gtkFileSelectionSetSelectMultiple(object, select.multiple)'
      'gtkFileSelectionGetSelectMultiple(object)'
      'gtkFileSelection(title = NULL, show = TRUE)'

_H_i_e_r_a_r_c_h_y:

     GObject
        +----GInitiallyUnowned
              +----GtkObject
                    +----GtkWidget
                          +----GtkContainer
                                +----GtkBin
                                      +----GtkWindow
                                            +----GtkDialog
                                                  +----GtkFileSelection 

_I_n_t_e_r_f_a_c_e_s:

     GtkFileSelection implements AtkImplementorIface and 
     'GtkBuildable'.

_D_e_t_a_i_l_e_d _D_e_s_c_r_i_p_t_i_o_n:

     'GtkFileSelection' has been superseded by the newer
     'GtkFileChooser' family of widgets. 'GtkFileSelection' 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.

     File selection dialogs are created with a call to
     'gtkFileSelectionNew'.

     The default filename can be set using
     'gtkFileSelectionSetFilename' and the selected filename retrieved
     using 'gtkFileSelectionGetFilename'.

     Use 'gtkFileSelectionComplete' to display files and directories
     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 'gtkFileSelectionHideFileopButtons' and shown
     again using 'gtkFileSelectionShowFileopButtons'.

     _Getting a filename from the user._


     # Getting a filename from a user
     # Note how much easier GtkFileChooser is to use

     store_filename <- function(widget, file_selector) {
        selected_filename <- file_selector$getFilename();
        print(paste("Selected filename:", selected_filename))
     }

     create_file_selection <- function() {

       ## Create the selector

       file_selector <- gtkFileSelection("Please select a file for
     editing.",
                                         show = FALSE)

       gSignalConnect(file_selector[["ok_button"]], "clicked",
     store_filename,
                      file_selector)

       ## Ensure that the dialog box is destroyed when the user clicks
     a button.

       gSignalConnect(file_selector[["ok_button"]], "clicked",
     gtkWidgetDestroy, 
                      file_selector, user.data.first = TRUE)

       gSignalConnect(file_selector[["cancel_button"]], "clicked",
     gtkWidgetDestroy,
                      file_selector, user.data.first = TRUE) 

       ## Display that dialog

       file_selector$show()
     }


_S_t_r_u_c_t_u_r_e_s:


     '_G_t_k_F_i_l_e_S_e_l_e_c_t_i_o_n' *WARNING: 'GtkFileSelection' is deprecated and
          should not be used in newly-written code.* The
          'GtkFileSelection' struct contains the following 'GtkWidget'
          fields:

          '_d_i_r_L_i_s_t' ['GtkWidget'] 

          '_f_i_l_e_L_i_s_t' ['GtkWidget'] 

          '_s_e_l_e_c_t_i_o_n_E_n_t_r_y' ['GtkWidget'] 

          '_s_e_l_e_c_t_i_o_n_T_e_x_t' ['GtkWidget'] 

          '_m_a_i_n_V_b_o_x' ['GtkWidget'] 

          '_o_k_B_u_t_t_o_n' ['GtkWidget'] 

          '_c_a_n_c_e_l_B_u_t_t_o_n' ['GtkWidget'] the two main buttons that
               signals should be connected  to in order to perform an
               action when the user hits either OK or  Cancel.

          '_h_e_l_p_B_u_t_t_o_n' ['GtkWidget'] 

          '_h_i_s_t_o_r_y_P_u_l_l_d_o_w_n' ['GtkWidget'] the 'GtkOptionMenu' used to
               create the drop-down  directory history.

          '_h_i_s_t_o_r_y_M_e_n_u' ['GtkWidget'] 

          '_f_i_l_e_o_p_D_i_a_l_o_g' ['GtkWidget'] 

          '_f_i_l_e_o_p_E_n_t_r_y' ['GtkWidget'] the dialog box used to display
               the 'GtkFileSelection'.  It can be customized by
               adding/removing widgets from it using the  standard
               'GtkDialog' functions.

          '_f_i_l_e_o_p_F_i_l_e' [character] 

          '_f_i_l_e_o_p_C_D_i_r' ['GtkWidget'] 

          '_f_i_l_e_o_p_D_e_l_F_i_l_e' ['GtkWidget'] 

          '_f_i_l_e_o_p_R_e_n_F_i_l_e' ['GtkWidget'] 

          '_b_u_t_t_o_n_A_r_e_a' ['GtkWidget'] 

          '_a_c_t_i_o_n_A_r_e_a' ['GtkWidget'] the buttons that appear at the top
               of the file  selection dialog. These "operation buttons"
               can be hidden and  redisplayed with
               'gtkFileSelectionHideFileopButtons' and  
               'gtkFileSelectionShowFileopButtons' respectively.


_C_o_n_v_e_n_i_e_n_t _C_o_n_s_t_r_u_c_t_i_o_n:

     'gtkFileSelection' is the equivalent of 'gtkFileSelectionNew'.

_P_r_o_p_e_r_t_i_e_s:


     '_f_i_l_e_n_a_m_e' [_c_h_a_r_a_c_t_e_r : _R_e_a_d / _W_r_i_t_e] The currently selected
          filename.  Default value: NULL


     '_s_e_l_e_c_t-_m_u_l_t_i_p_l_e' [_l_o_g_i_c_a_l : _R_e_a_d / _W_r_i_t_e] Whether to allow
          multiple files to be selected.  Default value: FALSE


     '_s_h_o_w-_f_i_l_e_o_p_s' [_l_o_g_i_c_a_l : _R_e_a_d / _W_r_i_t_e] Whether buttons for
          creating/manipulating files should be displayed.  Default
          value: FALSE


_A_u_t_h_o_r(_s):

     Derived by RGtkGen from GTK+ documentation

_R_e_f_e_r_e_n_c_e_s:

     <URL:
     http://developer.gnome.org/doc/API/2.0/gtk/GtkFileSelection.html>

