xref: /core/offapi/com/sun/star/ui/dialogs/XFilePicker.idl (revision 5687eba4)
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 *   Licensed to the Apache Software Foundation (ASF) under one or more
12 *   contributor license agreements. See the NOTICE file distributed
13 *   with this work for additional information regarding copyright
14 *   ownership. The ASF licenses this file to you under the Apache
15 *   License, Version 2.0 (the "License"); you may not use this file
16 *   except in compliance with the License. You may obtain a copy of
17 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20
21module com { module sun { module star { module ui { module dialogs {
22
23/** Specifies an interface for a FilePicker
24*/
25
26published interface XFilePicker: com::sun::star::ui::dialogs::XExecutableDialog
27{
28
29    /** Enable/disable multi-selection mode
30
31        <p>If the multi-selection mode is enabled, multiple files
32        may be selected by the user else only one file selection at a time is possible</p>
33
34        @param bMode
35        <p>A value of `TRUE` enables the multi-selection mode.</p>
36        <p>A value of `FALSE` disables the multi-selection mode, this is the default.</p>
37    */
38    void setMultiSelectionMode( [in] boolean bMode );
39
40    /** Sets the default string that appears in the file name box of a FilePicker.
41
42        @param aName
43        <p> Specifies the default file name, displayed when the FilePicker
44            is shown. The implementation may accept any string, and does not
45            have to check for a valid file name or if the file really exists.
46        </p>
47    */
48    void setDefaultName( [in] string aName );
49
50    /** Sets the directory that the file dialog initially displays.
51
52        @param aDirectory
53        Specifies the initial directory in URL format. The given URL must
54        conform to <a href="http://www.w3.org/Addressing/rfc1738.txt">Rfc1738</a>).
55
56        @throws com::sun::star::lang::IllegalArgumentException
57        if the URL is invalid (doesn't conform to <a href="http://www.w3.org/Addressing/rfc1738.txt">Rfc1738</a>).
58    */
59    void setDisplayDirectory( [in] string aDirectory )
60        raises( ::com::sun::star::lang::IllegalArgumentException );
61
62    /** Returns the directory that the file dialog is currently showing or
63        was last showing before closing the dialog with Ok. If the user
64        did cancel the dialog, the returned value is undefined.
65
66        @returns
67        The directory in URL format, must conform to <a href="http://www.w3.org/Addressing/rfc1738.txt">Rfc1738</a>.
68     */
69    string getDisplayDirectory();
70
71    /** Returns a sequence of the selected files including path information in
72        URL format, conforming to <a href="http://www.w3.org/Addressing/rfc1738.txt">Rfc1738</a>.
73
74        <p>If the user closed the dialog with cancel an empty sequence will be
75        returned.</p>
76        <br/>
77        <p>If the dialog is in execution mode and a single file is selected
78        the complete URL of this file will be returned.</p>
79        <p>If the dialog is in execution mode and the selected file name is false
80        or any other error occurs an empty sequence will be returned.</p>
81
82        @returns
83        <p> The complete path of the file or directory currently selected
84            in URL format. This always returns only the first entry of the sequence.
85            <br/>
86            <p><strong>Notes for the implementation of a FileSave dialog:</strong>If there exists
87            a checkbox "Automatic File Extension" which is checked and a valid filter is currently selected
88            the dialog may automatically add an extension to the selected file name.</p>
89        </p>
90        @deprecated use com::sun::star::ui::dialogs::XFilePicker2::getSelectedFiles instead
91    */
92    sequence< string > getFiles();
93};
94
95
96}; }; }; }; };
97
98
99/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
100