1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef __com_sun_star_ui_dialogs_FilePicker_idl__
29#define __com_sun_star_ui_dialogs_FilePicker_idl__
30
31#ifndef __com_sun_star_lang_XComponent_idl__
32#include <com/sun/star/lang/XComponent.idl>
33#endif
34
35#ifndef __com_sun_star_lang_XServiceInfo_idl__
36#include <com/sun/star/lang/XServiceInfo.idl>
37#endif
38
39#ifndef __com_sun_star_lang_XTypeProvider_idl__
40#include <com/sun/star/lang/XTypeProvider.idl>
41#endif
42
43#ifndef __com_sun_star_lang_XInitialization_idl__
44#include <com/sun/star/lang/XInitialization.idl>
45#endif
46
47#ifndef __com_sun_star_util_XCancellable_idl__
48#include <com/sun/star/util/XCancellable.idl>
49#endif
50
51//=============================================================================
52
53module com { module sun { module star { module ui { module dialogs {
54
55//=============================================================================
56
57//=============================================================================
58/** A FilePicker.
59
60    It is <strong>NOT</strong> recommended to cache a reference to a file
61    picker instance. Due to restrictions by the underlying system there can
62    be specific limitations possible. To overcome these problems it'
63    s recommended to create a new instance on demand.
64
65	@see XFilePicker
66*/
67
68 published interface XFilePicker;
69 published interface XFilePickerNotifier;
70 published interface XFilePickerControlAccess;
71 published interface XFilterManager;
72 published interface XFilePreview;
73 published interface XFilterGroupManager;
74
75published service FilePicker
76{
77	//-------------------------------------------------------------------------
78	/** Allows to associate a help URL with the file picker instance.
79	*/
80	[optional, property] string HelpURL;
81
82	//-------------------------------------------------------------------------
83	/** Provides access to the basic FilePicker functionality.
84	*/
85	interface XFilePicker;
86
87	//-------------------------------------------------------------------------
88	/** Provides the ability to request notifications about changes.
89	*/
90	interface XFilePickerNotifier;
91
92	//-------------------------------------------------------------------------
93	/** Provides the ability to add different filter, query for the current
94		filters and set a current filter
95	*/
96	interface XFilterManager;
97
98	//-------------------------------------------------------------------------
99	/** Provides the ability to show a preview of a selected file
100	*/
101	[optional] interface XFilePreview;
102
103	//-------------------------------------------------------------------------
104	/** Provides the ability manage additional controls (checkboxes, listboxes etc.)
105		offered by an extended FilePicker, these controls extend the subset of
106		common controls that a FilePicker usually supports.
107
108		@see com::sun::star::ui::dialogs::CommonFilePickerElementIds
109		@see com::sun::star::ui::dialogs::ExtendedFilePickerElementIds
110
111		@deprecated
112	*/
113	[optional] interface XFilePickerControlAccess;
114
115	//-------------------------------------------------------------------------
116	/** An interface which allows manipulation of groups of filters
117	*/
118	[optional] interface XFilterGroupManager;
119
120	//-------------------------------------------------------------------------
121	/** Provides the ability to choose between different custom templates that
122		do extend the subset of common controls a FilePicker usually supports.
123		Implementers may omit this interface if the FileOpen
124		dialog doesn't support custom templates. In this case a createInstance
125		will create an ordinary FileOpen dialog with only the common FilePicker
126		elements.
127		The client has to provide one of the specified constants in
128		TemplateDescription.
129		<br/><br/>
130		<p><strong>Notes for the implementation of a FileSave dialog:</strong>
131		The implementation of a FileSave dialog should automatically check
132		for existens of a file and issue a warning if a file with the same
133		name already exist.</p>
134
135		@see com::sun::star::ui::dialogs::TemplateDescription
136	*/
137	[optional] interface com::sun::star::lang::XInitialization;
138
139	//-------------------------------------------------------------------------
140	/** For canceling a running dialog instance.
141		<p>This may be usefull for automatic test tools for instance.</p>
142	*/
143	[optional] interface com::sun::star::util::XCancellable;
144
145	//-------------------------------------------------------------------------
146	/** For shutdown and listener support.
147	*/
148	interface com::sun::star::lang::XComponent;
149
150	//-------------------------------------------------------------------------
151	/** Service should always support this interface.
152	*/
153	interface com::sun::star::lang::XServiceInfo;
154
155	//-------------------------------------------------------------------------
156	/** Service should always support this interface.
157	*/
158	interface com::sun::star::lang::XTypeProvider;
159};
160
161//=============================================================================
162
163}; }; }; }; };
164
165#endif
166