1Gtk2::FileChooser(3)  User Contributed Perl Documentation Gtk2::FileChooser(3)
2
3
4

NAME

6       Gtk2::FileChooser - wrapper for GtkFileChooser
7

HIERARCHY

9         Glib::Interface
10         +----Gtk2::FileChooser
11

METHODS

13   filechooseraction = $chooser->get_action
14   $chooser->set_action ($action)
15       ·   $action (Gtk2::FileChooserAction)
16
17   $chooser->add_filter ($filter)
18       ·   $filter (Gtk2::FileFilter)
19
20   $chooser->add_shortcut_folder ($folder)
21       ·   $folder (string)
22
23   $chooser->add_shortcut_folder_uri ($folder)
24       ·   $folder (string)
25
26   boolean = $chooser->get_create_folders
27       Since: gtk+ 2.18
28
29   $chooser->set_create_folders ($create_folders)
30       ·   $create_folders (boolean)
31
32       Since: gtk+ 2.18
33
34   string = $chooser->get_current_folder
35   boolean = $chooser->set_current_folder ($filename)
36       ·   $filename (string)
37
38   string = $chooser->get_current_folder_uri
39   boolean = $chooser->set_current_folder_uri ($uri)
40       ·   $uri (string)
41
42   $chooser->set_current_name ($name)
43       ·   $name (string)
44
45   boolean = $chooser->get_do_overwrite_confirmation
46       Since: gtk+ 2.8
47
48   $chooser->set_do_overwrite_confirmation ($do_overwrite_confirmation)
49       ·   $do_overwrite_confirmation (boolean)
50
51       Since: gtk+ 2.8
52
53   widget = $chooser->get_extra_widget
54   $chooser->set_extra_widget ($extra_widget)
55       ·   $extra_widget (Gtk2::Widget)
56
57   string = $chooser->get_filename
58   boolean = $chooser->set_filename ($filename)
59       ·   $filename (string)
60
61   list = $chooser->get_filenames
62   filefilter = $chooser->get_filter
63   $chooser->set_filter ($filter)
64       ·   $filter (Gtk2::FileFilter)
65
66   list = $chooser->list_filters
67   list = $chooser->list_shortcut_folder_uris
68   list = $chooser->list_shortcut_folders
69   boolean = $chooser->get_local_only
70   $chooser->set_local_only ($files_only)
71       ·   $files_only (boolean)
72
73   localized file name = $file_chooser->get_preview_filename
74   string = $file_chooser->get_preview_uri
75   boolean = $chooser->get_preview_widget_active
76   $chooser->set_preview_widget_active ($active)
77       ·   $active (boolean)
78
79   widget = $chooser->get_preview_widget
80   $chooser->set_preview_widget ($preview_widget)
81       ·   $preview_widget (Gtk2::Widget)
82
83   $chooser->remove_filter ($filter)
84       ·   $filter (Gtk2::FileFilter)
85
86   $chooser->remove_shortcut_folder ($folder)
87       ·   $folder (string)
88
89   $chooser->remove_shortcut_folder_uri ($folder)
90       ·   $folder (string)
91
92   $chooser->select_all
93   boolean = $chooser->select_filename ($filename)
94       ·   $filename (string)
95
96   boolean = $chooser->get_select_multiple
97   $chooser->set_select_multiple ($select_multiple)
98       ·   $select_multiple (boolean)
99
100   boolean = $chooser->select_uri ($uri)
101       ·   $uri (string)
102
103   boolean = $chooser->get_show_hidden
104       Since: gtk+ 2.6
105
106   $chooser->set_show_hidden ($show_hidden)
107       ·   $show_hidden (boolean)
108
109       Since: gtk+ 2.6
110
111   $chooser->unselect_all
112   $chooser->unselect_filename ($filename)
113       ·   $filename (string)
114
115   $chooser->unselect_uri ($uri)
116       ·   $uri (string)
117
118   string = $chooser->get_uri
119   boolean = $chooser->set_uri ($uri)
120       ·   $uri (string)
121
122   list = $chooser->get_uris
123   boolean = $chooser->get_use_preview_label
124   $chooser->set_use_preview_label ($use_label)
125       ·   $use_label (boolean)
126

PROPERTIES

128       'action' (Gtk2::FileChooserAction : default "open" : readable /
129       writable / private)
130           The type of operation that the file selector is performing
131
132       'create-folders' (boolean : default true : readable / writable /
133       private)
134           Whether a file chooser not in open mode will offer the user to
135           create new folders.
136
137       'do-overwrite-confirmation' (boolean : default false : readable /
138       writable / private)
139           Whether a file chooser in save mode will present an overwrite
140           confirmation dialog if necessary.
141
142       'extra-widget' (Gtk2::Widget : default undef : readable / writable /
143       private)
144           Application supplied widget for extra options.
145
146       'file-system-backend' (string : default undef : writable / construct-
147       only / private)
148           Name of file system backend to use
149
150       'filter' (Gtk2::FileFilter : default undef : readable / writable /
151       private)
152           The current filter for selecting which files are displayed
153
154       'local-only' (boolean : default true : readable / writable / private)
155           Whether the selected file(s) should be limited to local file: URLs
156
157       'preview-widget' (Gtk2::Widget : default undef : readable / writable /
158       private)
159           Application supplied widget for custom previews.
160
161       'preview-widget-active' (boolean : default true : readable / writable /
162       private)
163           Whether the application supplied widget for custom previews should
164           be shown.
165
166       'select-multiple' (boolean : default false : readable / writable /
167       private)
168           Whether to allow multiple files to be selected
169
170       'show-hidden' (boolean : default false : readable / writable / private)
171           Whether the hidden files and folders should be displayed
172
173       'use-preview-label' (boolean : default true : readable / writable /
174       private)
175           Whether to display a stock label with the name of the previewed
176           file.
177

SIGNALS

179       Gtk2::FileChooserConfirmation = confirm-overwrite (Gtk2::FileChooser)
180       current-folder-changed (Gtk2::FileChooser)
181       file-activated (Gtk2::FileChooser)
182       selection-changed (Gtk2::FileChooser)
183       update-preview (Gtk2::FileChooser)
184

ENUMS AND FLAGS

186   enum Gtk2::FileChooserAction
187       ·   'open' / 'GTK_FILE_CHOOSER_ACTION_OPEN'
188
189       ·   'save' / 'GTK_FILE_CHOOSER_ACTION_SAVE'
190
191       ·   'select-folder' / 'GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER'
192
193       ·   'create-folder' / 'GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER'
194
195   enum Gtk2::FileChooserConfirmation
196       ·   'confirm' / 'GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM'
197
198       ·   'accept-filename' / 'GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME'
199
200       ·   'select-again' / 'GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN'
201
202   enum Gtk2::FileChooserError
203       ·   'nonexistent' / 'GTK_FILE_CHOOSER_ERROR_NONEXISTENT'
204
205       ·   'bad-filename' / 'GTK_FILE_CHOOSER_ERROR_BAD_FILENAME'
206
207       ·   'already-exists' / 'GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS'
208
209       ·   'incomplete-hostname' /
210           'GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME'
211

SEE ALSO

213       Gtk2, Glib::Interface
214
216       Copyright (C) 2003-2011 by the gtk2-perl team.
217
218       This software is licensed under the LGPL.  See Gtk2 for a full notice.
219
220
221
222perl v5.28.0                      2018-07-18              Gtk2::FileChooser(3)
Impressum