summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-03-14 10:07:22 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-03-14 10:07:22 +0000
commit1c1677812a4e38646ffd46515b1da3926b7377a0 (patch)
treefa9ddf3eaea82fef7c79e0ce8abd0acadb3d15b7 /offapi
parent53efaf0e433086e493d099c2ce4741100e5414ad (diff)
INTEGRATION: CWS pbrwuno (1.1.2); FILE ADDED
2006/02/10 11:56:59 fs 1.1.2.8: don't mention XSingleServiceFactory anymore, since it's deprecated 2006/01/18 09:59:26 fs 1.1.2.7: no UnkwnonPropertyException in getPropertyOrderIndex, to ease implementations of this interface 2005/12/19 12:17:59 fs 1.1.2.6: #i53095# explicitly allow empty category sequence 2005/10/25 11:51:49 fs 1.1.2.5: #i53095# some exception specifications, and some conceptual changes for multiple handlers supporting the same property 2005/10/14 10:46:15 fs 1.1.2.4: #i53095# replace InspectorModel::InspectedObjects with Inspector::inspect 2005/10/14 09:35:43 fs 1.1.2.3: #i53095# getPropertyOrderIndex 2005/10/14 08:40:49 fs 1.1.2.2: #i53095# let the XObjectInspectorModel provide category meta information part 2005/10/13 13:13:17 fs 1.1.2.1: #i53095#
Diffstat (limited to 'offapi')
-rw-r--r--offapi/com/sun/star/inspection/XObjectInspectorModel.idl143
1 files changed, 143 insertions, 0 deletions
diff --git a/offapi/com/sun/star/inspection/XObjectInspectorModel.idl b/offapi/com/sun/star/inspection/XObjectInspectorModel.idl
new file mode 100644
index 000000000000..c59037ab9d8f
--- /dev/null
+++ b/offapi/com/sun/star/inspection/XObjectInspectorModel.idl
@@ -0,0 +1,143 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: XObjectInspectorModel.idl,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: vg $ $Date: 2006-03-14 11:07:22 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_inspection_XObjectInspectorModel_idl__
+#define __com_sun_star_inspection_XObjectInspectorModel_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+#ifndef __com_sun_star_inspection_PropertyCategoryDescriptor_idl__
+#include <com/sun/star/inspection/PropertyCategoryDescriptor.idl>
+#endif
+
+//=============================================================================
+module com { module sun { module star { module inspection {
+
+interface XPropertyHandler;
+
+//-----------------------------------------------------------------------------
+/** describes the model of an <type>ObjectInspector</type>
+ @see ObjectInspector
+*/
+interface XObjectInspectorModel
+{
+ /** describes a set of factories for creating <type>XPropertyHandler</type>s
+
+ <p>Every element of the sequence must contain information to create a
+ <type>XPropertyHandler</type> instance. Two ways are currently supported:
+ <ul>
+ <li>A sevice name:</br>
+ If a sequence element contains a string, this string is interpreted
+ as service name, and an <type scope="com::sun::star::lang">XMultiComponentFactory</type>
+ is asked to create an instance of this service.</li>
+ <li>A factory:<br/>
+ If a sequence element contains an instance implementing the
+ <type scope="com::sun::star::lang">XSingleComponentFactory</type> interface, this factory
+ is used to create a property handler.</li>
+ </ul></p>
+
+ <p>This attribute is usually only evaluated by the <type>ObjectInspector</type> instance
+ which the model is currently bound to.</p>
+
+ <p>The order of factories is important: If two property handlers declare themself responsible
+ for the same property, the one whose factory is listed <strong>last</strong> wins. Also,
+ if a handler <code>B</code> wants to supersede a property of another handler <code>A</code>,
+ <code>A</code>'s factory must precede the factory of <code>B</code>.</p>
+
+ @see XPropertyHandler::getSupportedProperties
+ @see XPropertyHandler::getSupersededProperties
+ */
+ [attribute, readonly] sequence< any > HandlerFactories;
+
+ /** describes the property categories used by the property handlers.
+
+ <p>Properties can be sorted into different categories, described by the <member>LineDescriptor::Category</member>
+ attribute, which is filled in <member>XPropertyHandler::describePropertyLine</member>
+ method of your property handler.<br/>
+ Those names provided by the handlers are programmatic names. All other information
+ about categories is part of the <type>PropertyCategoryDescriptor</type>, and
+ <member>describeCategories</member> assembles information about all categories which
+ all property handlers provided by the model use.</p>
+
+ @return
+ a sequence of category descriptors. Their relative ordering also describes
+ the relative ordering of the categories in the <type>ObjectInspector</type>'s
+ user interface.<br/>
+ The sequence must not contain two entries with the same programmatic name.<br/>
+ <br/>
+ The model implementation might return an empty sequence here, in this case, the ObjectInspector
+ automatically builds its category information from the categories provided by the
+ property handlers.
+ @see PropertyCategoryDescriptor
+ @see LineDescriptor::Category
+ */
+ sequence< PropertyCategoryDescriptor > describeCategories();
+
+ /** retrieves an index in a global property ordering, for a given property name
+
+ <p>In the user interface of an ObjectInspector, single properties are represented by
+ single lines, and those lines are displayed successively. To determine an order of
+ the property lines, the inspector model can associate an "order index" with each property.
+ The <type>ObjectInspector</type> will then sort the property lines in a way that they
+ have the same relative ordering as the "order indexes" of their properties.</p>
+
+ <p>Note that the concrete value the model returns for a given property does not
+ matter. All what matters is that if you want a certain property <code>Foo</code>
+ to be displayed after another property <code>Bar</code>, then the order index
+ of <code>Foo</code> should be greater than the order index of <code>Bar</code>.
+
+ <p>If for two different properties the same order index is returned, the
+ <type>ObjectInspector</type> will assume the order in which those properties
+ were provided by the respective property handler
+ (<member>XPropertyHandler::getSupportedProperties</member>).<br/>
+ If two such properties originate from different handlers, they will be ordered according
+ to the order of the handlers, as provided in the <member>HandlerFactories</member> attribute.</p>
+
+ @param PropertyName
+ the property whose global order index should be retrieved
+ @return
+ the global order index of <arg>PropertyName</arg>.
+ */
+ long getPropertyOrderIndex( [in] string PropertyName );
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
+