summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/inspection/XObjectInspectorUI.idl
blob: 757473a34b353cfca2cfc9d5b7a564964aa23f7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
/*************************************************************************
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 * 
 * Copyright 2008 by Sun Microsystems, Inc.
 *
 * OpenOffice.org - a multi-platform office productivity suite
 *
 * $RCSfile: XObjectInspectorUI.idl,v $
 * $Revision: 1.5 $
 *
 * This file is part of OpenOffice.org.
 *
 * OpenOffice.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3
 * only, as published by the Free Software Foundation.
 *
 * OpenOffice.org is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License version 3 for more details
 * (a copy is included in the LICENSE file that accompanied this code).
 *
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with OpenOffice.org.  If not, see
 * <http://www.openoffice.org/license.html>
 * for a copy of the LGPLv3 License.
 *
 ************************************************************************/
#ifndef __com_sun_star_inspection_XObjectInspectorUI_idl__
#define __com_sun_star_inspection_XObjectInspectorUI_idl__

#ifndef __com_sun_star_inspection_XPropertyControl_idl__
#include <com/sun/star/inspection/XPropertyControl.idl>
#endif
#ifndef __com_sun_star_beans_Optional_idl__
#include <com/sun/star/beans/Optional.idl>
#endif
#ifndef __com_sun_star_container_NoSuchElementException_idl__
#include <com/sun/star/container/NoSuchElementException.idl>
#endif
#ifndef __com_sun_star_lang_NoSupportException_idl__ 
#include <com/sun/star/lang/NoSupportException.idl>
#endif

//=============================================================================
module com {  module sun {  module star {  module inspection {

interface XPropertyControlObserver;

//-----------------------------------------------------------------------------
/** grants access to certain aspects of the user interface of an object
    inspector

    <p>This interface is used as callback for <type>XPropertyHandler</type>s.</p>

    <p>As a consequence, methods operating on the UI for a property, and taking the name of this property,
    are tolerant against properties which do not exist. For instance, if a property handler tries to
    disable the UI for property <code>Foo</code>, but another handler has superseded this property, then
    the <type>ObjectInspector</type> will not <em>have</em> any UI for it. In this case, the call to
    <code>enablePropertyUI( "Foo" )</code> will simply be ignored.</p>

    @since OOo 2.0.3
*/
interface XObjectInspectorUI
{
    /** enables or disables all components belonging to the UI representation of a property

        <p>This is usually used by an <type>XPropertyHandler</type> if it handles properties,
        where one does only make sense if another one has a certain value.</p>

        @param  PropertyName
            denotes the name of the property whose UI is to be enabled or disabled.
        @param  Enable
            <TRUE/> if and only if the UI should be disabled, <FALSE/> otherwise.
    */
    void    enablePropertyUI( [in] string PropertyName, [in] boolean Enable );

    /** enables or disables the single elements which can be part of the UI representation of a property

        <p>Note that the complete UI for the property must be enabled in order for these settings to
        be evaluated. That is, <member>enablePropertyUIElements</member> does not have any effect if
        somebody previously disabled the complete UI for this property with <member>enablePropertyUI</member>.</p>

        @param  PropertyName
            the name of the property whose user interface elements are to be enabled or disabled

        @param  Elements
            a combination of <type>PropertyLineElement</type> flags specifying which elements are to be
            enabled or disabled.<br/>
            Note that if you don't set a particular bit here (say, <member>PropertyLineElement::PrimaryButton</member>),
            this does mean that this element's state is not affected by the call - it does
            <em>not</em> mean that it is disabled.
        @param  Enable
            <TRUE/> if the elements denoted by <arg>_nElements</arg> should be enabled, <FALSE/> if
            they should be disabled.
    */
    void    enablePropertyUIElements(
                        [in] string PropertyName,
                        [in] short Elements,
                        [in] boolean Enable
                    );

    /** completely rebuilds the UI for the given property.

        <p>This method might be used by an <type>XPropertyHandler</type> if it wants to change the type
        of control (see <type>PropertyControlType</type>) used to display a certain property.</p>

        <p>The object inspector will then call describePropertyLine again, and update its UI accordingly.</p>

        <p>Note that the property whose UI should be rebuilt must not necessarily be (though usually <em>is</em>)
        in the responsibility of the handler which calls this method. The object inspector will look up the
        handler with the responsibility for <arg>PropertyName</arg> and call its
        <member>XPropertyHandler::describePropertyLine</member></p>

        @param PropertyName
            the name of the property whose UI is to be completely rebuilt.
    */
    void    rebuildPropertyUI( [in] string PropertyName );

    /** shows the UI for a given property

        @param  PropertyName
            the name of the property whose UI is to be shown
    */
    void    showPropertyUI( [in] string PropertyName );

    /** hides the UI for a given property

        @param  PropertyName
            the name of the property whose UI is to be hidden
    */
    void    hidePropertyUI( [in] string PropertyName );

    /** shows or hides all properties belonging to a given category
        @see LineDescriptor::Category
        @see XObjectInspectorModel::describeCategories
    */
    void    showCategory( [in] string Category, [in] boolean Show );

    /** retrieves the control currently used to display a given property
    
        @param PropertyName
            the name of the property whose control should be retrieved

        @return
            the <type>XPropertyControl</type> representing the given property, or <NULL/>
            if there is no such property control.
    */
    XPropertyControl
            getPropertyControl( [in] string PropertyName );

    /** registers an observer for all property controls

        <p>The given XPropertyControlObserver will be notified of all changes
        in all property controls.</p>

        @see revokeControlObserver

        @since OOo 2.2
    */
    void    registerControlObserver( [in] XPropertyControlObserver Observer );

    /** revokes a previously registered control observer

        @see registerControlObserver

        @since OOo 2.2
    */
    void    revokeControlObserver( [in] XPropertyControlObserver Observer );

    /** sets the text of the help section, if the object inspector contains
        one.

        @throws NoSupportException
            if the <member>XObjectInspectorModel::HasHelpSection</member> property
            requires the help section to be unavailable.

        @since OOo 2.2
    */
    void setHelpSectionText( [in] string HelpText )
        raises ( ::com::sun::star::lang::NoSupportException );
};

//=============================================================================

}; }; }; };

#endif