merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / inspection / XObjectInspectorUI.idl
blobf6a90c824426ed829ec8215a2e1410c1baa0b667
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_inspection_XObjectInspectorUI_idl__
28 #define __com_sun_star_inspection_XObjectInspectorUI_idl__
30 #ifndef __com_sun_star_inspection_XPropertyControl_idl__
31 #include <com/sun/star/inspection/XPropertyControl.idl>
32 #endif
33 #ifndef __com_sun_star_beans_Optional_idl__
34 #include <com/sun/star/beans/Optional.idl>
35 #endif
36 #ifndef __com_sun_star_container_NoSuchElementException_idl__
37 #include <com/sun/star/container/NoSuchElementException.idl>
38 #endif
39 #ifndef __com_sun_star_lang_NoSupportException_idl__
40 #include <com/sun/star/lang/NoSupportException.idl>
41 #endif
43 //=============================================================================
44 module com { module sun { module star { module inspection {
46 interface XPropertyControlObserver;
48 //-----------------------------------------------------------------------------
49 /** grants access to certain aspects of the user interface of an object
50 inspector
52 <p>This interface is used as callback for <type>XPropertyHandler</type>s.</p>
54 <p>As a consequence, methods operating on the UI for a property, and taking the name of this property,
55 are tolerant against properties which do not exist. For instance, if a property handler tries to
56 disable the UI for property <code>Foo</code>, but another handler has superseded this property, then
57 the <type>ObjectInspector</type> will not <em>have</em> any UI for it. In this case, the call to
58 <code>enablePropertyUI( "Foo" )</code> will simply be ignored.</p>
60 @since OOo 2.0.3
62 interface XObjectInspectorUI
64 /** enables or disables all components belonging to the UI representation of a property
66 <p>This is usually used by an <type>XPropertyHandler</type> if it handles properties,
67 where one does only make sense if another one has a certain value.</p>
69 @param PropertyName
70 denotes the name of the property whose UI is to be enabled or disabled.
71 @param Enable
72 <TRUE/> if and only if the UI should be disabled, <FALSE/> otherwise.
74 void enablePropertyUI( [in] string PropertyName, [in] boolean Enable );
76 /** enables or disables the single elements which can be part of the UI representation of a property
78 <p>Note that the complete UI for the property must be enabled in order for these settings to
79 be evaluated. That is, <member>enablePropertyUIElements</member> does not have any effect if
80 somebody previously disabled the complete UI for this property with <member>enablePropertyUI</member>.</p>
82 @param PropertyName
83 the name of the property whose user interface elements are to be enabled or disabled
85 @param Elements
86 a combination of <type>PropertyLineElement</type> flags specifying which elements are to be
87 enabled or disabled.<br/>
88 Note that if you don't set a particular bit here (say, <member>PropertyLineElement::PrimaryButton</member>),
89 this does mean that this element's state is not affected by the call - it does
90 <em>not</em> mean that it is disabled.
91 @param Enable
92 <TRUE/> if the elements denoted by <arg>_nElements</arg> should be enabled, <FALSE/> if
93 they should be disabled.
95 void enablePropertyUIElements(
96 [in] string PropertyName,
97 [in] short Elements,
98 [in] boolean Enable
101 /** completely rebuilds the UI for the given property.
103 <p>This method might be used by an <type>XPropertyHandler</type> if it wants to change the type
104 of control (see <type>PropertyControlType</type>) used to display a certain property.</p>
106 <p>The object inspector will then call describePropertyLine again, and update its UI accordingly.</p>
108 <p>Note that the property whose UI should be rebuilt must not necessarily be (though usually <em>is</em>)
109 in the responsibility of the handler which calls this method. The object inspector will look up the
110 handler with the responsibility for <arg>PropertyName</arg> and call its
111 <member>XPropertyHandler::describePropertyLine</member></p>
113 @param PropertyName
114 the name of the property whose UI is to be completely rebuilt.
116 void rebuildPropertyUI( [in] string PropertyName );
118 /** shows the UI for a given property
120 @param PropertyName
121 the name of the property whose UI is to be shown
123 void showPropertyUI( [in] string PropertyName );
125 /** hides the UI for a given property
127 @param PropertyName
128 the name of the property whose UI is to be hidden
130 void hidePropertyUI( [in] string PropertyName );
132 /** shows or hides all properties belonging to a given category
133 @see LineDescriptor::Category
134 @see XObjectInspectorModel::describeCategories
136 void showCategory( [in] string Category, [in] boolean Show );
138 /** retrieves the control currently used to display a given property
140 @param PropertyName
141 the name of the property whose control should be retrieved
143 @return
144 the <type>XPropertyControl</type> representing the given property, or <NULL/>
145 if there is no such property control.
147 XPropertyControl
148 getPropertyControl( [in] string PropertyName );
150 /** registers an observer for all property controls
152 <p>The given XPropertyControlObserver will be notified of all changes
153 in all property controls.</p>
155 @see revokeControlObserver
157 @since OOo 2.2
159 void registerControlObserver( [in] XPropertyControlObserver Observer );
161 /** revokes a previously registered control observer
163 @see registerControlObserver
165 @since OOo 2.2
167 void revokeControlObserver( [in] XPropertyControlObserver Observer );
169 /** sets the text of the help section, if the object inspector contains
170 one.
172 @throws NoSupportException
173 if the <member>XObjectInspectorModel::HasHelpSection</member> property
174 requires the help section to be unavailable.
176 @since OOo 2.2
178 void setHelpSectionText( [in] string HelpText )
179 raises ( ::com::sun::star::lang::NoSupportException );
182 //=============================================================================
184 }; }; }; };
186 #endif