1Gtk2::Ex::Dialogs::ChooUsseePrreCvoinetwrFiibluet(e3d)PGetrkl2:D:oEcxu:m:eDnitaaltoigosn::ChoosePreviewFile(3)
2
3
4

NAME

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

SYNOPSIS

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

DESCRIPTION

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

OPTIONS

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

PUBLIC METHODS

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

SEE ALSO

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

BUGS

89       Please report any bugs to the mailing list.
90

MAILING LIST

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

AUTHORS

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