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 ************************************************************************/
28 #ifndef __com_sun_star_inspection_LineDescriptor_idl__
29 #define __com_sun_star_inspection_LineDescriptor_idl__
31 #ifndef com_sun_star_graphic_XGraphic_idl
32 #include
<com
/sun
/star
/graphic
/XGraphic.idl
>
35 //=============================================================================
36 module com
{ module sun
{ module star
{ module inspection
{
38 interface XPropertyControl
;
40 //-----------------------------------------------------------------------------
41 /** describes the appearance of a line representing a single property in an <type>ObjectInspector</type>.
43 Such a line consists of
44 <ul><li>a label with a human-readable name for the property</li>
45 <li>a control which is used for user interaction - i.e. it displays the current property
46 value, and allows the user entering a new one.</li>
47 <li>(optional) one or two buttons which, when clicked, can start a more complex, interactive
48 property value input. For instance, if you have a property whose value is a path in the
49 file system, such a button could be used to let the user browse for a path with a
50 usual file picker.</li>
53 @see XPropertyHandler::describePropertyLine
54 @see PropertyLineElement
60 /** denotes the human-readable display name used to present a property to the user
64 /** denotes the control which should be used to represent the property at the UI.
66 @see XPropertyControlFactory
68 XPropertyControl
Control;
70 /** specifies the URL to the help topic to be associated with the property
74 /** detetrmines whether a button exists which can be used for a more complex, interactive
77 <p>If no image for the primary button is specified, but a primary button is present,
78 the three dots will be displayed on the button.</p>
80 @see XPropertyHandler::onInteractivePropertySelection
81 @see HasSecondaryButton
82 @see PrimaryButtonImageURL
83 @see PrimaryButtonImage
85 boolean HasPrimaryButton
;
87 /** describes a unique id to associate with the primary button
89 <p>In OpenOffice.org, UI elements sometimes require a so-called UniqueID, which can be
90 used to uniquely (within the whole application) identify this UI element. For instance,
91 automating the OpenOffice.org UI via a dedicated separate application ("TestTool") requires
94 <p>If a primary button exists for a property's UI representation (<member>HasPrimaryButton</member>),
95 it gets the ID specified herein.</p>
99 /** describes the URL of an image to display on the primary button, if any.
101 <p>This URL will be used to obtain an actual <type scope="com::sun::star::graphic">XGraphic</type>
102 object from an <type scope="com::sun::star::graphic">GraphicProvider</type>.</p>
104 <p>The property will be ignored if <member>HasPrimaryButton</member> is <FALSE/>.</p>
106 <p>If you need to specify a graphic which does not have an URL, but is available as
107 <type scope="com::sun::star::graphic">XGraphic</type> only, then you must leave
108 <code>PrimaryButtonImageURL</code> empty, and use the <member>PrimaryButtonImage</member> property.
110 @see PrimaryButtonImage
112 string PrimaryButtonImageURL
;
114 /** describes a graphics to display at the primary button, if any.
116 <p>The property will be ignored if <member>HasPrimaryButton</member> is <FALSE/>, or
117 if <member>PrimaryButtonImageURL</member> is a non-empty string.</p>
119 @see HasPrimaryButton
120 @see PrimaryButtonImageURL
122 com
::sun
::star
::graphic
::XGraphic PrimaryButtonImage
;
124 /** detetrmines whether a secondary button exists which can be used for a more complex, interactive
125 property value input.
127 <p>A secondary button subordinated to the primary button. If no primary button exists
128 (<member>HasPrimaryButton</member>), this member is ignored.</p>
130 @see XPropertyHandler::onInteractivePropertySelection
131 @see HasSecondaryButton
133 boolean HasSecondaryButton
;
135 /** describes a unique id to associate with the primary button
137 <p>If a secondary button exists for a property's UI representation (<member>HasSecondaryButton</member>),
138 it gets the ID specified herein.</p>
142 long SecondaryButtonId
;
144 /** describes the URL of an image to display on the secondary button, if any.
146 <p>This URL will be used to obtain an actual <type scope="com::sun::star::graphic">XGraphic</type>
147 object from an <type scope="com::sun::star::graphic">GraphicProvider</type>.</p>
149 <p>The property will be ignored if <member>HasSecondaryButton</member> is <FALSE/>.</p>
151 <p>If you need to specify a graphic which does not have an URL, but is available as
152 <type scope="com::sun::star::graphic">XGraphic</type> only, then you must leave
153 <code>SecondaryButtonImageURL</code> empty, and use the <member>SecondaryButtonImage</member> property.
155 @see SecondaryButtonImage
157 string SecondaryButtonImageURL
;
159 /** describes a graphics to display at the secondary button, if any.
161 <p>The property will be ignored if <member>HasSecondaryButton</member> is <FALSE/>, or
162 if <member>SecondaryButtonImageURL</member> is a non-empty string.</p>
164 @see HasSecondaryButton
165 @see SecondaryButtonImageURL
167 com
::sun
::star
::graphic
::XGraphic SecondaryButtonImage
;
169 /** describes the indent level for the property
171 <p>If a given property semantically depends on another one, the indent level
172 can be used to visually represent this fact. For this, the dependent property's
173 indent level would be one larger than the indent level of the other property.</p>
175 <p>Normally, <type>XPropertyHandler</type>s will set this to <code>0</code> when describing
176 the UI for a normal property.
180 /** describes the category into which the property should be sorted by the <type>ObjectInspector</type>.
182 <p>An <type>ObjectInspector</type> can visually group properties which semantically belong
183 together (for instance using tab pages). The decision which properties actually belong together
184 is made using this <member>Category</member> attribute.</p>
186 <p>For your implementation of <type>XPropertyHandler</type>, it's recommended that you document the programmatic
187 names used for property categories. This way, your handler might be re-used in
188 different contexts, where only the <type>XObjectInspectorModel</type> needs to provide consistent
189 UI names for the categories.</p>
191 @see XObjectInspectorModel::describeCategories
196 //=============================================================================