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_XFilePickerControlAccess_idl__
29#define __com_sun_star_ui_dialogs_XFilePickerControlAccess_idl__
30
31#ifndef __com_sun_star_ui_dialogs_XFilePicker_idl__
32#include <com/sun/star/ui/dialogs/XFilePicker.idl>
33#endif
34
35//=============================================================================
36
37module com { module sun { module star { module ui { module dialogs {
38
39//=============================================================================
40/** Provides access to the controls of a FilePicker.
41
42	<p> A FilePicker may contain additional elements according to the needs
43		of the different applications. These additional elements can be
44		addressed by this interface.</p>
45
46	@see com::sun::star::ui::dialogs::FilePicker
47*/
48published interface XFilePickerControlAccess: com::sun::star::ui::dialogs::XFilePicker
49{
50
51//-------------------------------------------------------------------------
52/** Set the value of an additional element within a FilePicker.
53
54	@param ControlId
55	Identifies the element which value is to be set.
56
57	@param aControlAction
58		Specifies an action to perform with the given value.
59		aControlAction has to be one of the values defined in <type>ControlActions</type>.
60		Not all of the values are valid for all controls.
61		To add a new filter to the FilePicker use the interface XFilterManager, but
62		optionally an implementation may also support adding new filter using this
63		method.
64
65	@param aValue
66	The value to set. For checkboxes aValue should be a boolean value that
67	should be <TRUE/> if the checkbox should be checked and <FALSE/> otherwise.
68
69	@see com::sun::star::ui::dialogs::CommonFilePickerElementIds
70	@see com::sun::star::ui::dialogs::ExtendedFilePickerElementIds
71	@see com::sun::star::ui::dialogs::ControlActions
72*/
73void setValue( [in] short aControlId, [in] short aControlAction, [in] any aValue );
74
75//-------------------------------------------------------------------------
76/** Get the value of an additional element within a FilePicker
77
78	@param aControlId
79	Identifies the element for which value is requested.
80
81	@param aControlAction
82	Specifies which value to retrieve.
83	aControlAction has to be one of the values defined in <type>ControlActions</type>.
84	Not all of the values are valid for all controls.
85
86	@returns
87	The value of the specified element. If the specified control
88	is a checkbox the returned value is a boolean that is <TRUE/>
89	if the checkbox is checked <FALSE/> otherwise.
90	If the specified element doesn't exist or the specified element
91	doesn't support the specidfied control action an empty any will be
92	returned.
93
94	@see com::sun::star::ui::dialogs::CommonFilePickerElementIds
95	@see com::sun::star::ui::dialogs::ExtendedFilePickerElementIds
96	@see com::sun::star::ui::dialogs::ControlActions
97*/
98any getValue( [in] short aControlId, [in] short aControlAction );
99
100//-------------------------------------------------------------------------
101/** Set the label of the specified element. If the specified element
102	doesn't support setting a label, this method has no effect.
103
104	@param aControlId
105	Identifies the element for which the label should be set.
106
107	@param aLabel
108	The label to be set.
109
110	@see com::sun::star::ui::dialogs::CommonFilePickerElementIds
111	@see com::sun::star::ui::dialogs::ExtendedFilePickerElementIds
112*/
113void setLabel( [in] short aControlId, [in] string aLabel );
114
115//-------------------------------------------------------------------------
116/** Returns the label of the specified element.
117
118	@param aControlId
119	Identifies the element for which the label should be returned.
120
121	@returns
122	The label of the specified element or an empty string if
123	the specified element has no or supports no label or the
124	specified element doesn't exist.
125
126	@see com::sun::star::ui::dialogs::CommonFilePickerElementIds
127	@see com::sun::star::ui::dialogs::ExtendedFilePickerElementIds
128*/
129string getLabel( [in] short aControlId );
130
131//-------------------------------------------------------------------------
132/** Enables or disables a control.
133
134    @param ControlId
135	Identifies the control.
136
137	@param bEnable
138	<p>If <TRUE/> the specified control will be enabled.</p>
139	<p>If <FALSE/> the specified control will be disabled.</p>
140
141	@see com::sun::star::ui::dialogs::CommonFilePickerElementIds
142	@see com::sun::star::ui::dialogs::ExtendedFilePickerElementIds
143*/
144void enableControl( [in] short aControlId, [in] boolean bEnable );
145};
146
147//=============================================================================
148
149}; }; }; }; };
150
151
152#endif
153
154