1*b1cdbd2cSJim Jagielski/************************************************************** 2*b1cdbd2cSJim Jagielski * 3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski * distributed with this work for additional information 6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski * 11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski * under the License. 19*b1cdbd2cSJim Jagielski * 20*b1cdbd2cSJim Jagielski *************************************************************/ 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski 23*b1cdbd2cSJim Jagielski 24*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_inspection_LineDescriptor_idl__ 25*b1cdbd2cSJim Jagielski#define __com_sun_star_inspection_LineDescriptor_idl__ 26*b1cdbd2cSJim Jagielski 27*b1cdbd2cSJim Jagielski#ifndef com_sun_star_graphic_XGraphic_idl 28*b1cdbd2cSJim Jagielski#include <com/sun/star/graphic/XGraphic.idl> 29*b1cdbd2cSJim Jagielski#endif 30*b1cdbd2cSJim Jagielski 31*b1cdbd2cSJim Jagielski//============================================================================= 32*b1cdbd2cSJim Jagielskimodule com { module sun { module star { module inspection { 33*b1cdbd2cSJim Jagielski 34*b1cdbd2cSJim Jagielskipublished interface XPropertyControl; 35*b1cdbd2cSJim Jagielski 36*b1cdbd2cSJim Jagielski//----------------------------------------------------------------------------- 37*b1cdbd2cSJim Jagielski/** describes the appearance of a line representing a single property in an <type>ObjectInspector</type>. 38*b1cdbd2cSJim Jagielski 39*b1cdbd2cSJim Jagielski Such a line consists of 40*b1cdbd2cSJim Jagielski <ul><li>a label with a human-readable name for the property</li> 41*b1cdbd2cSJim Jagielski <li>a control which is used for user interaction - i.e. it displays the current property 42*b1cdbd2cSJim Jagielski value, and allows the user entering a new one.</li> 43*b1cdbd2cSJim Jagielski <li>(optional) one or two buttons which, when clicked, can start a more complex, interactive 44*b1cdbd2cSJim Jagielski property value input. For instance, if you have a property whose value is a path in the 45*b1cdbd2cSJim Jagielski file system, such a button could be used to let the user browse for a path with a 46*b1cdbd2cSJim Jagielski usual file picker.</li> 47*b1cdbd2cSJim Jagielski </ul> 48*b1cdbd2cSJim Jagielski 49*b1cdbd2cSJim Jagielski @see XPropertyHandler::describePropertyLine 50*b1cdbd2cSJim Jagielski @see PropertyLineElement 51*b1cdbd2cSJim Jagielski 52*b1cdbd2cSJim Jagielski @since OpenOffice 2.0.3 53*b1cdbd2cSJim Jagielski*/ 54*b1cdbd2cSJim Jagielskipublished struct LineDescriptor 55*b1cdbd2cSJim Jagielski{ 56*b1cdbd2cSJim Jagielski /** denotes the human-readable display name used to present a property to the user 57*b1cdbd2cSJim Jagielski */ 58*b1cdbd2cSJim Jagielski string DisplayName; 59*b1cdbd2cSJim Jagielski 60*b1cdbd2cSJim Jagielski /** denotes the control which should be used to represent the property at the UI. 61*b1cdbd2cSJim Jagielski 62*b1cdbd2cSJim Jagielski @see XPropertyControlFactory 63*b1cdbd2cSJim Jagielski */ 64*b1cdbd2cSJim Jagielski XPropertyControl Control; 65*b1cdbd2cSJim Jagielski 66*b1cdbd2cSJim Jagielski /** specifies the URL to the help topic to be associated with the property 67*b1cdbd2cSJim Jagielski */ 68*b1cdbd2cSJim Jagielski string HelpURL; 69*b1cdbd2cSJim Jagielski 70*b1cdbd2cSJim Jagielski /** detetrmines whether a button exists which can be used for a more complex, interactive 71*b1cdbd2cSJim Jagielski property value input. 72*b1cdbd2cSJim Jagielski 73*b1cdbd2cSJim Jagielski <p>If no image for the primary button is specified, but a primary button is present, 74*b1cdbd2cSJim Jagielski the three dots will be displayed on the button.</p> 75*b1cdbd2cSJim Jagielski 76*b1cdbd2cSJim Jagielski @see XPropertyHandler::onInteractivePropertySelection 77*b1cdbd2cSJim Jagielski @see HasSecondaryButton 78*b1cdbd2cSJim Jagielski @see PrimaryButtonImageURL 79*b1cdbd2cSJim Jagielski @see PrimaryButtonImage 80*b1cdbd2cSJim Jagielski */ 81*b1cdbd2cSJim Jagielski boolean HasPrimaryButton; 82*b1cdbd2cSJim Jagielski 83*b1cdbd2cSJim Jagielski /** describes a unique id to associate with the primary button 84*b1cdbd2cSJim Jagielski 85*b1cdbd2cSJim Jagielski <p>In OpenOffice.org, UI elements sometimes require a so-called UniqueID, which can be 86*b1cdbd2cSJim Jagielski used to uniquely (within the whole application) identify this UI element. For instance, 87*b1cdbd2cSJim Jagielski automating the OpenOffice.org UI via a dedicated separate application ("TestTool") requires 88*b1cdbd2cSJim Jagielski such IDs.</p> 89*b1cdbd2cSJim Jagielski 90*b1cdbd2cSJim Jagielski <p>If a primary button exists for a property's UI representation (<member>HasPrimaryButton</member>), 91*b1cdbd2cSJim Jagielski it gets the ID specified herein.</p> 92*b1cdbd2cSJim Jagielski */ 93*b1cdbd2cSJim Jagielski string PrimaryButtonId; 94*b1cdbd2cSJim Jagielski 95*b1cdbd2cSJim Jagielski /** describes the URL of an image to display on the primary button, if any. 96*b1cdbd2cSJim Jagielski 97*b1cdbd2cSJim Jagielski <p>This URL will be used to obtain an actual <type scope="com::sun::star::graphic">XGraphic</type> 98*b1cdbd2cSJim Jagielski object from an <type scope="com::sun::star::graphic">GraphicProvider</type>.</p> 99*b1cdbd2cSJim Jagielski 100*b1cdbd2cSJim Jagielski <p>The property will be ignored if <member>HasPrimaryButton</member> is <FALSE/>.</p> 101*b1cdbd2cSJim Jagielski 102*b1cdbd2cSJim Jagielski <p>If you need to specify a graphic which does not have an URL, but is available as 103*b1cdbd2cSJim Jagielski <type scope="com::sun::star::graphic">XGraphic</type> only, then you must leave 104*b1cdbd2cSJim Jagielski <code>PrimaryButtonImageURL</code> empty, and use the <member>PrimaryButtonImage</member> property. 105*b1cdbd2cSJim Jagielski 106*b1cdbd2cSJim Jagielski @see PrimaryButtonImage 107*b1cdbd2cSJim Jagielski */ 108*b1cdbd2cSJim Jagielski string PrimaryButtonImageURL; 109*b1cdbd2cSJim Jagielski 110*b1cdbd2cSJim Jagielski /** describes a graphics to display at the primary button, if any. 111*b1cdbd2cSJim Jagielski 112*b1cdbd2cSJim Jagielski <p>The property will be ignored if <member>HasPrimaryButton</member> is <FALSE/>, or 113*b1cdbd2cSJim Jagielski if <member>PrimaryButtonImageURL</member> is a non-empty string.</p> 114*b1cdbd2cSJim Jagielski 115*b1cdbd2cSJim Jagielski @see HasPrimaryButton 116*b1cdbd2cSJim Jagielski @see PrimaryButtonImageURL 117*b1cdbd2cSJim Jagielski */ 118*b1cdbd2cSJim Jagielski com::sun::star::graphic::XGraphic PrimaryButtonImage; 119*b1cdbd2cSJim Jagielski 120*b1cdbd2cSJim Jagielski /** detetrmines whether a secondary button exists which can be used for a more complex, interactive 121*b1cdbd2cSJim Jagielski property value input. 122*b1cdbd2cSJim Jagielski 123*b1cdbd2cSJim Jagielski <p>A secondary button subordinated to the primary button. If no primary button exists 124*b1cdbd2cSJim Jagielski (<member>HasPrimaryButton</member>), this member is ignored.</p> 125*b1cdbd2cSJim Jagielski 126*b1cdbd2cSJim Jagielski @see XPropertyHandler::onInteractivePropertySelection 127*b1cdbd2cSJim Jagielski @see HasSecondaryButton 128*b1cdbd2cSJim Jagielski */ 129*b1cdbd2cSJim Jagielski boolean HasSecondaryButton; 130*b1cdbd2cSJim Jagielski 131*b1cdbd2cSJim Jagielski /** describes a unique id to associate with the primary button 132*b1cdbd2cSJim Jagielski 133*b1cdbd2cSJim Jagielski <p>If a secondary button exists for a property's UI representation (<member>HasSecondaryButton</member>), 134*b1cdbd2cSJim Jagielski it gets the ID specified herein.</p> 135*b1cdbd2cSJim Jagielski 136*b1cdbd2cSJim Jagielski @see PrimaryButtonId 137*b1cdbd2cSJim Jagielski */ 138*b1cdbd2cSJim Jagielski string SecondaryButtonId; 139*b1cdbd2cSJim Jagielski 140*b1cdbd2cSJim Jagielski /** describes the URL of an image to display on the secondary button, if any. 141*b1cdbd2cSJim Jagielski 142*b1cdbd2cSJim Jagielski <p>This URL will be used to obtain an actual <type scope="com::sun::star::graphic">XGraphic</type> 143*b1cdbd2cSJim Jagielski object from an <type scope="com::sun::star::graphic">GraphicProvider</type>.</p> 144*b1cdbd2cSJim Jagielski 145*b1cdbd2cSJim Jagielski <p>The property will be ignored if <member>HasSecondaryButton</member> is <FALSE/>.</p> 146*b1cdbd2cSJim Jagielski 147*b1cdbd2cSJim Jagielski <p>If you need to specify a graphic which does not have an URL, but is available as 148*b1cdbd2cSJim Jagielski <type scope="com::sun::star::graphic">XGraphic</type> only, then you must leave 149*b1cdbd2cSJim Jagielski <code>SecondaryButtonImageURL</code> empty, and use the <member>SecondaryButtonImage</member> property. 150*b1cdbd2cSJim Jagielski 151*b1cdbd2cSJim Jagielski @see SecondaryButtonImage 152*b1cdbd2cSJim Jagielski */ 153*b1cdbd2cSJim Jagielski string SecondaryButtonImageURL; 154*b1cdbd2cSJim Jagielski 155*b1cdbd2cSJim Jagielski /** describes a graphics to display at the secondary button, if any. 156*b1cdbd2cSJim Jagielski 157*b1cdbd2cSJim Jagielski <p>The property will be ignored if <member>HasSecondaryButton</member> is <FALSE/>, or 158*b1cdbd2cSJim Jagielski if <member>SecondaryButtonImageURL</member> is a non-empty string.</p> 159*b1cdbd2cSJim Jagielski 160*b1cdbd2cSJim Jagielski @see HasSecondaryButton 161*b1cdbd2cSJim Jagielski @see SecondaryButtonImageURL 162*b1cdbd2cSJim Jagielski */ 163*b1cdbd2cSJim Jagielski com::sun::star::graphic::XGraphic SecondaryButtonImage; 164*b1cdbd2cSJim Jagielski 165*b1cdbd2cSJim Jagielski /** describes the indent level for the property 166*b1cdbd2cSJim Jagielski 167*b1cdbd2cSJim Jagielski <p>If a given property semantically depends on another one, the indent level 168*b1cdbd2cSJim Jagielski can be used to visually represent this fact. For this, the dependent property's 169*b1cdbd2cSJim Jagielski indent level would be one larger than the indent level of the other property.</p> 170*b1cdbd2cSJim Jagielski 171*b1cdbd2cSJim Jagielski <p>Normally, <type>XPropertyHandler</type>s will set this to <code>0</code> when describing 172*b1cdbd2cSJim Jagielski the UI for a normal property. 173*b1cdbd2cSJim Jagielski */ 174*b1cdbd2cSJim Jagielski short IndentLevel; 175*b1cdbd2cSJim Jagielski 176*b1cdbd2cSJim Jagielski /** describes the category into which the property should be sorted by the <type>ObjectInspector</type>. 177*b1cdbd2cSJim Jagielski 178*b1cdbd2cSJim Jagielski <p>An <type>ObjectInspector</type> can visually group properties which semantically belong 179*b1cdbd2cSJim Jagielski together (for instance using tab pages). The decision which properties actually belong together 180*b1cdbd2cSJim Jagielski is made using this <member>Category</member> attribute.</p> 181*b1cdbd2cSJim Jagielski 182*b1cdbd2cSJim Jagielski <p>For your implementation of <type>XPropertyHandler</type>, it's recommended that you document the programmatic 183*b1cdbd2cSJim Jagielski names used for property categories. This way, your handler might be re-used in 184*b1cdbd2cSJim Jagielski different contexts, where only the <type>XObjectInspectorModel</type> needs to provide consistent 185*b1cdbd2cSJim Jagielski UI names for the categories.</p> 186*b1cdbd2cSJim Jagielski 187*b1cdbd2cSJim Jagielski @see XObjectInspectorModel::describeCategories 188*b1cdbd2cSJim Jagielski */ 189*b1cdbd2cSJim Jagielski string Category; 190*b1cdbd2cSJim Jagielski}; 191*b1cdbd2cSJim Jagielski 192*b1cdbd2cSJim Jagielski//============================================================================= 193*b1cdbd2cSJim Jagielski 194*b1cdbd2cSJim Jagielski}; }; }; }; 195*b1cdbd2cSJim Jagielski 196*b1cdbd2cSJim Jagielski#endif 197*b1cdbd2cSJim Jagielski 198