1Gtk2::Ex::Dialogs::ChooUsseeFrilCeo(n3t)ributed Perl DocGutmke2n:t:aEtxi:o:nDialogs::ChooseFile(3)
2
3
4

NAME

6       Gtk2::Ex::Dialogs::ChooseFile - Provides a file selection dialog.
7

SYNOPSIS

9        use Gtk2::Ex::Dialogs::ChooseFile ( destroy_with_parent => TRUE,
10                                            modal => TRUE );
11
12        # do some stuff like creating your app's main $window then,
13        # to ensure that all messages use the right parent, set it:
14        $Gtk2::Ex::Dialogs::ChooseFile::parent_window = $window;
15
16        # now popup a new dialog for opening a file
17        my $file = ask_to_open
18                    Gtk2::Ex::Dialogs::ChooseFile ( "/path/to/something" );
19
20        # ok, now we need to save (as...) a file
21        my $save = ask_to_save
22                    Gtk2::Ex::Dialogs::ChooseFile ( "/path/to/something" );
23

DESCRIPTION

25       This module provides a simple file chooser api that wraps Gtk2::File‐
26       Chooser objectively. The objective is a simple ways to prompt a user to
27       open or save a file.
28

OPTIONS

30       All public methods (and the entire class) support the following
31       options:
32
33       title => STRING
34           The text string to use as the title of the dialog window. Defaults
35           to either "Open" or "Save" based on the action context.
36
37       path => STRING
38           The path to a file or directory to initialize the dialog with.
39           Defaults to the current working directory.
40
41       parent_window => Gtk2::Window
42           Reference to the main application window.
43
44       destroy_with_parent => BOOL
45           When the parent_window is destroyed, what do we do? Defaults to
46           FALSE.
47
48       modal => BOOL
49           Does this dialog make the parent_window freeze while the dialog
50           exists.  Defaults to FALSE.
51
52       must_exist => BOOL
53           The end-user must supply a path to an existing file or directory.
54           Should the end-user provide a non-existant path, the dialog will be
55           respawned until an existing file is chosen. Defaults to FALSE.
56

PUBLIC METHODS

58       OBJECT = new ( OPTIONS ⎪ PATH )
59           Create a Gtk2::FileChooserDialog with the options given and show it
60           to the end-user. Once the user has selected a file return only the
61           path to the file and clean up. In the special case of being passed
62           only one argument, all options are set to defaults and the one
63           argument is used as the path argument.
64
65       RESPONSE = ask_to_open ( OPTIONS ⎪ PATH )
66           Supports all the same arguments as new(). This will create a new
67           Gtk2::Ex::Dialogs::ChooseFile, with some specific defaults, and
68           return the user's response. In the event of being given only one
69           argument, it will be used as the path option.
70
71       RESPONSE = ask_to_save ( OPTIONS ⎪ PATH )
72           Supports all the same arguments as new(). This will create a new
73           Gtk2::Ex::Dialogs::ChooseFile, with some specific defaults, and
74           return the user's response. In the event of being given only one
75           argument, it will be used as the path option.
76

SEE ALSO

78        Gtk2::FileChooser
79        Gtk2::FileChooserDialog
80        Gtk2::Ex::Dialogs
81        Gtk2::Ex::Dialogs::ChooseDirectory
82        Gtk2::Ex::Dialogs::ChoosePreviewFile
83        Gtk2::Ex::Dialogs::ErrorMsg
84        Gtk2::Ex::Dialogs::Message
85        Gtk2::Ex::Dialogs::Question
86

BUGS

88       Please report any bugs to the mailing list.
89

MAILING LIST

91        http://opendoorsoftware.com/lists/gtk2-ex-list
92        gtk2-ex-list@opendoorsoftware.com
93

AUTHORS

95        Kevin C. Krinke, <kckrinke@opendoorsoftware.com>
96        James Greenhalgh, <jgreenhalgh@opendoorsoftware.com>
97
99        Gtk2::Ex::Dialogs::ChooseFile - Provides a file selection dialog.
100        Copyright (C) 2005 Open Door Software Inc. <ods@opendoorsoftware.com>
101
102        This library is free software; you can redistribute it and/or
103        modify it under the terms of the GNU Lesser General Public
104        License as published by the Free Software Foundation; either
105        version 2.1 of the License, or (at your option) any later version.
106
107        This library is distributed in the hope that it will be useful,
108        but WITHOUT ANY WARRANTY; without even the implied warranty of
109        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
110        Lesser General Public License for more details.
111
112        You should have received a copy of the GNU Lesser General Public
113        License along with this library; if not, write to the Free Software
114        Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
115
116
117
118perl v5.8.8                       2006-01-11  Gtk2::Ex::Dialogs::ChooseFile(3)
Impressum