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 / static-nick / static-blurb)
130           The type of operation that the file selector is performing
131
132       'create-folders' (boolean : default true : readable / writable /
133       private / static-nick / static-blurb)
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 / static-nick / static-blurb)
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 / static-nick / static-blurb)
144           Application supplied widget for extra options.
145
146       'file-system-backend' (string : default undef : writable / construct-
147       only / private / static-nick / static-blurb)
148           Name of file system backend to use
149
150       'filter' (Gtk2::FileFilter : default undef : readable / writable /
151       private / static-nick / static-blurb)
152           The current filter for selecting which files are displayed
153
154       'local-only' (boolean : default true : readable / writable / private /
155       static-nick / static-blurb)
156           Whether the selected file(s) should be limited to local file: URLs
157
158       'preview-widget' (Gtk2::Widget : default undef : readable / writable /
159       private / static-nick / static-blurb)
160           Application supplied widget for custom previews.
161
162       'preview-widget-active' (boolean : default true : readable / writable /
163       private / static-nick / static-blurb)
164           Whether the application supplied widget for custom previews should
165           be shown.
166
167       'select-multiple' (boolean : default false : readable / writable /
168       private / static-nick / static-blurb)
169           Whether to allow multiple files to be selected
170
171       'show-hidden' (boolean : default false : readable / writable / private
172       / static-nick / static-blurb)
173           Whether the hidden files and folders should be displayed
174
175       'use-preview-label' (boolean : default true : readable / writable /
176       private / static-nick / static-blurb)
177           Whether to display a stock label with the name of the previewed
178           file.
179

SIGNALS

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

ENUMS AND FLAGS

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

SEE ALSO

215       Gtk2, Glib::Interface
216
218       Copyright (C) 2003-2011 by the gtk2-perl team.
219
220       This software is licensed under the LGPL.  See Gtk2 for a full notice.
221
222
223
224perl v5.36.0                      2023-01-20              Gtk2::FileChooser(3)
Impressum