From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001
From: Daniel Baumann The component registers a XPropertyControlObserver at an
+ XObjectInspectoryUI interface. Whenever it then is notified
+ of a XPropertyControl getting the focus, it will try to deduce
+ the extended help text of this control's window, and set this help text at the
+ object inspector's help section. The property handler implemented by this service will do an introspection
+ on the provided components, and expose the properties obtained via
+ XIntrospectionAccess::getProperties. The handler will automatically determine the best type of property control
+ to represent a certain property, depending on the property type. This includes,
+ for example, list box controls to represent enumeration properties. In this case, the obtained value is passed to the caller of
+ XPropertyHandler::onInteractivePropertySelection(), which is
+ responsible for forwarding this value to the inspected component. This is usually used when this selection involves non-modal user interface. If no image for the primary button is specified, but a primary button is present,
+ the three dots will be displayed on the button. In OpenOffice.org, UI elements sometimes require a so-called UniqueID, which can be
+ used to uniquely (within the whole application) identify this UI element. For instance,
+ automating the OpenOffice.org UI via a dedicated separate application ("TestTool") requires
+ such IDs. If a primary button exists for a property's UI representation (#HasPrimaryButton),
+ it gets the ID specified herein. This URL will be used to obtain an actual com::sun::star::graphic::XGraphic
+ object from a com::sun::star::graphic::GraphicProvider. The property will be ignored if #HasPrimaryButton is `FALSE`. If you need to specify a graphic which does not have a URL, but is available as
+ com::sun::star::graphic::XGraphic only, then you must leave
+ The property will be ignored if #HasPrimaryButton is `FALSE`, or
+ if #PrimaryButtonImageURL is a non-empty string. A secondary button subordinated to the primary button. If no primary button exists
+ (#HasPrimaryButton), this member is ignored. If a secondary button exists for a property's UI representation (#HasSecondaryButton),
+ it gets the ID specified herein. This URL will be used to obtain an actual com::sun::star::graphic::XGraphic
+ object from a com::sun::star::graphic::GraphicProvider. The property will be ignored if #HasSecondaryButton is `FALSE`. If you need to specify a graphic which does not have a URL, but is available as
+ com::sun::star::graphic::XGraphic only, then you must leave
+ The property will be ignored if #HasSecondaryButton is `FALSE`, or
+ if #SecondaryButtonImageURL is a non-empty string. If a given property semantically depends on another one, the indent level
+ can be used to visually represent this fact. For this, the dependent property's
+ indent level would be one larger than the indent level of the other property. Normally, XPropertyHandlers will set this to An ObjectInspector can visually group properties which semantically belong
+ together (for instance using tab pages). The decision which properties actually belong together
+ is made using this #Category attribute. For your implementation of XPropertyHandler, it's recommended that you document the programmatic
+ names used for property categories. This way, your handler might be re-used in
+ different contexts, where only the XObjectInspectorModel needs to provide consistent
+ UI names for the categories. The controller can be plugged into a com::sun::star::frame::XFrame, and will
+ provide a visual component for inspecting and modifying component properties. The basic idea is that one facet of the inspected component is represented by a single line
+ of controls: A label, an input control, and optionally one or two buttons which, when pressed,
+ trigger additional user interaction (e.g. a more sophisticated dialog to enter a property value). Additionally, property lines can be grouped into different categories. A usual implementation
+ of such categories would be tab pages, but other implementations are possible, too. Even more, the inspector can optionally display a help section at the bottom of its
+ window, which can display arbitrary (context-sensitive) help texts. An ObjectInspector needs one or more property handlers which describe
+ the facets of an inspected component - without such handlers, the inspector window will simply
+ stay empty. The property handlers, as well as more information about the layout of the inspector,
+ are provided by an inspector model, which has to be implemented by the user of the inspector.
+
+ @see XPropertyHandler::describePropertyLine
+ @see PropertyLineElement
+
+ @since OOo 2.0.3
+*/
+struct LineDescriptor
+{
+ /** denotes the human-readable display name used to present a property to the user
+ */
+ string DisplayName;
+
+ /** denotes the control which should be used to represent the property at the UI.
+
+ @see XPropertyControlFactory
+ */
+ XPropertyControl Control;
+
+ /** specifies the URL to the help topic to be associated with the property
+ */
+ string HelpURL;
+
+ /** determines whether a button exists which can be used for a more complex, interactive
+ property value input.
+
+ PrimaryButtonImageURL
empty, and use the #PrimaryButtonImage property.
+
+ @see PrimaryButtonImage
+ */
+ string PrimaryButtonImageURL;
+
+ /** describes a graphics to display at the primary button, if any.
+
+ SecondaryButtonImageURL
empty, and use the #SecondaryButtonImage property.
+
+ @see SecondaryButtonImage
+ */
+ string SecondaryButtonImageURL;
+
+ /** describes a graphics to display at the secondary button, if any.
+
+ 0
when describing
+ the UI for a normal property.
+ */
+ short IndentLevel;
+
+ /** describes the category into which the property should be sorted by the ObjectInspector.
+
+
+ Note that "property" here is a generic term - any aspect of a component can be considered a property,
+ as long as some property handler is able to describe this aspect in a property-like way.
Since property handlers might have the need to raise UI, they will be created with a context
+ value named "DialogParentWindow", which contains an XWindow which should be used as parent of
+ any windows to raise.
+ If the com::sun::star::uno::XComponentContext in which the ObjectInspector
+ was created already contains such a value, it is not overwritten. Only if it doesn't, the inspector
+ will add an own value - which contains the inspector's main window - to the context when creating
+ handlers.
This service simplifies usage of an ObjectInspector.
+ +The XObjectInspectorModel implemented by this service will not provide any property + categories, nor apply any particular order to the properties provided by its handler(s).
+ + @see ObjectInspector + @see XObjectInspectorModel + @see XObjectInspectorModel::describeCategories + @see XObjectInspectorModel::getPropertyOrderIndex + + @since OOo 2.0.3 +*/ +service ObjectInspectorModel : XObjectInspectorModel +{ + /** creates a default ObjectInspectorModel, whose one and only handler factory + creates a GenericPropertyHandler. + */ + createDefault(); + + /** creates a default ObjectInspectorModel, using an externally provided sequence of property handler + factories. + + @param handlerFactories + a sequence of handler factories, as to be provided in the XObjectInspectorModel::HandlerFactories + method. + @throws ::com::sun::star::lang::IllegalArgumentException + if the given sequence is empty. + + @see XObjectInspectorModel::HandlerFactories + */ + createWithHandlerFactories( [in] sequence< any > handlerFactories ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); + + /** creates a default ObjectInspectorModel, using an externally provided sequence of property handler + factories, and describing an ObjectInspector which has a help section. + + @param handlerFactories + a sequence of handler factories, as to be provided in the XObjectInspectorModel::HandlerFactories + method. + + @param minHelpTextLines + denotes the minimum number of lines of text to be reserved for the help + section. + + @param maxHelpTextLines + denotes the maximum number of lines of text to be reserved for the help + section. + + @throws ::com::sun::star::lang::IllegalArgumentException + if handlerFactories is empty. + + @throws ::com::sun::star::lang::IllegalArgumentException + if minHelpTextLines or maxHelpTextLines are negative, + or if minHelpTextLines is greater than maxHelpTextLines. + + @see XObjectInspectorModel::HandlerFactories + @see XObjectInspectorModel::HasHelpSection + @see XObjectInspectorModel::MinHelpTextLines + @see XObjectInspectorModel::MaxHelpTextLines + + @since OOo 2.2 + */ + createWithHandlerFactoriesAndHelpSection( + [in] sequence< any > handlerFactories, + [in] long minHelpTextLines, + [in] long maxHelpTextLines + ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); +}; + + +}; }; }; }; + +#endif + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/inspection/PropertyCategoryDescriptor.idl b/offapi/com/sun/star/inspection/PropertyCategoryDescriptor.idl new file mode 100644 index 000000000..e939df39d --- /dev/null +++ b/offapi/com/sun/star/inspection/PropertyCategoryDescriptor.idl @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_inspection_PropertyCategoryDescriptor_idl__ +#define __com_sun_star_inspection_PropertyCategoryDescriptor_idl__ + +module com { module sun { module star { module inspection { + +/** describes a category of properties + @see ObjectInspector + @see XObjectInspectorModel::describeCategory + @see LineDescriptor::Category + + @since OOo 2.0.3 +*/ +struct PropertyCategoryDescriptor +{ + /** contains the programmatic name of the category. + +This programmatic name is used internally: XPropertyHandler::describePropertyLine() + sets a programmatic category name at LineDescriptor::Category, + and an object inspector uses this to find the proper PropertyCategoryDescriptor.
+ */ + string ProgrammaticName; + + /** provides a human-readable name (which can be presented at the UI) for a category. + */ + string UIName; + + /** provides a help URL to be associated with a category + */ + string HelpURL; +}; + + +}; }; }; }; + +#endif + + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/inspection/PropertyControlType.idl b/offapi/com/sun/star/inspection/PropertyControlType.idl new file mode 100644 index 000000000..b5eb40952 --- /dev/null +++ b/offapi/com/sun/star/inspection/PropertyControlType.idl @@ -0,0 +1,144 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_inspection_PropertyControlType_idl__ +#define __com_sun_star_inspection_PropertyControlType_idl__ + +module com { module sun { module star { module inspection { + +/** describes pre-defined possible control types to be used to display and enter + property values within an ObjectInspector. + +The type of a control determines its visual appearance, its behavior, and - important + for property handlers using a control - the expected type when reading and writing the + control's value.
+ + @see XPropertyControl + @see XPropertyControlFactory + @see XPropertyControl::ValueType + + @since OOo 2.0.3 +*/ +constants PropertyControlType +{ + /** denotes a control which allows the user to choose from a list of + possible property values + +Controls of type #ListBox exchange their values as string
.
Additionally, those controls support the XStringListControl interface.
+ */ + const short ListBox = 1; + + /** denotes a control which allows the user to choose from a list of + possible property values, combined with the possibility to enter a new + property value. + +Controls of type #ComboBox exchange their values as string
.
Additionally, those controls support the XStringListControl interface.
+ */ + const short ComboBox = 2; + + /** denotes a control which allows the user to enter property values consisting of a single line of text + +Controls of type #TextField exchange their values as string
.
Controls of type #MultiLineTextField exchange their values as string
.
Controls of type #CharacterField exchange their values as short
,
+ being a single UTF-16 character.
Controls of type #StringListField exchange their values as
+ sequence< string >
.
Controls of type #ColorListBox usually exchange their values as + com::sun::star::util::Color.
+ +Additionally, those controls support the XStringListControl interface. If you use
+ this interface to add additional entries to the list box, which have no color associated with it,
+ then you can also exchange values as string
. That is, if you write a string into
+ XPropertyControl::Value, and if this string has previously been added to the list
+ using the XStringListControl interface, this string is selected. Vice versa, if the user
+ selects one of those non-color strings in the list, then reading XPropertyControl::Value
+ will retrieve you this string.
Controls of type #NumericField exchange their values as double
.
Additionally, those controls support the XNumericControl interface.
+ */ + const short NumericField = 8; + + /** denotes a control which allows the user to enter a date value + +Controls of type #DateField exchange their values as com::sun::star::util::Date.
+ */ + const short DateField = 9; + + /** denotes a control which allows the user to enter a time value + +Controls of type #TimeField exchange their values as com::sun::star::util::Time.
+ */ + const short TimeField = 10; + + /** denotes a control which allows the user to enter a combined date/time value + +Controls of type #DateTimeField exchange their values as com::sun::star::util::DateTime.
+ */ + const short DateTimeField = 11; + + /** denotes a control which displays a string in a hyperlink-like appearance + +Controls of type #HyperlinkField exchange their values as string
.
Additionally, those controls support the XHyperlinkControl interface.
+ */ + const short HyperlinkField = 12; + + /** denotes a non-standard property control, which is usually provided by an XPropertyHandler + */ + const short Unknown = 13; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/inspection/PropertyLineElement.idl b/offapi/com/sun/star/inspection/PropertyLineElement.idl new file mode 100644 index 000000000..0aba844f7 --- /dev/null +++ b/offapi/com/sun/star/inspection/PropertyLineElement.idl @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_inspection_PropertyLineElement_idl__ +#define __com_sun_star_inspection_PropertyLineElement_idl__ + +module com { module sun { module star { module inspection { + +/** describes elements of a single line in an object inspector, used to represent a + single property + + @see XPropertyHandler::describePropertyLine + @see LineDescriptor + + @since OOo 2.0.3 +*/ +constants PropertyLineElement +{ + /// specifies the input control in a group of controls related to a single property + const short InputControl = 0x01; + /// specifies the primary button (if present) in a group of controls related to a single property + const short PrimaryButton = 0x02; + /// specifies the secondary button (if present) in a group of controls related to a single property + const short SecondaryButton = 0x04; + + /// specifies all elements + const short All = 0xFF; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/inspection/StringRepresentation.idl b/offapi/com/sun/star/inspection/StringRepresentation.idl new file mode 100644 index 000000000..a0b400536 --- /dev/null +++ b/offapi/com/sun/star/inspection/StringRepresentation.idl @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_inspection_StringRepresentation_idl__ +#define __com_sun_star_inspection_StringRepresentation_idl__ + +#includeHyperlink controls exchange their value (XPropertyControl::Value) as strings.
+ + @since OOo 2.0.3 +*/ +interface XHyperlinkControl : XPropertyControl +{ + /** adds a listener which will be notified when the user clicked the hyperlink text in the control + @param listener + the listener to notify of hyperlink clicks + */ + void addActionListener( [in] com::sun::star::awt::XActionListener listener ); + + /** removes a listener which was previously added via addActionListener() + @param listener + the listener to revoke + */ + void removeActionListener( [in] com::sun::star::awt::XActionListener listener ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/inspection/XNumericControl.idl b/offapi/com/sun/star/inspection/XNumericControl.idl new file mode 100644 index 000000000..47a55cda5 --- /dev/null +++ b/offapi/com/sun/star/inspection/XNumericControl.idl @@ -0,0 +1,82 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_inspection_XNumericControl_idl__ +#define __com_sun_star_inspection_XNumericControl_idl__ + +#includeOnly a certain set of com::sun::star::util::MeasureUnit values is + supported. In particular, every value which denotes a fraction of another + unit (like 100th millimeters) cannot be used as DisplayUnit.
+ + @throws com::sun::star::lang::IllegalArgumentException + if the caller attempts to set an unsupported com::sun::star::util::MeasureUnit + */ + [attribute] short DisplayUnit + { + set raises (com::sun::star::lang::IllegalArgumentException); + }; + + /** describes a com::sun::star::util::MeasureUnit to be + applied for transferring values. + +The core measurement unit for a property value might differ from the unit which + is used by the control to display it. For instance, your property value might require + that your values denote 100th millimeters, but to the user, you want to present the + value as, say, inches. In this case, a numeric control can automatically handle the + value conversion for you, if you give it a ValueUnit different from the DisplayUnit.
+ + @see XPropertyControl::Value + */ + [attribute] short ValueUnit; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/inspection/XObjectInspector.idl b/offapi/com/sun/star/inspection/XObjectInspector.idl new file mode 100644 index 000000000..6d91b12f8 --- /dev/null +++ b/offapi/com/sun/star/inspection/XObjectInspector.idl @@ -0,0 +1,117 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_inspection_XObjectInspector_idl__ +#define __com_sun_star_inspection_XObjectInspector_idl__ + +#includeThe com::sun::star::frame::XController::setModel() method + accepts only XObjectInspectorModels, and will return `FALSE` if the + to-be-attached model is not `NULL`, but does not support this interface.
+ +If you do not want to support a full-blown com::sun::star::frame::XModel, + use the #InspectorModel attribute instead.
+ +The com::sun::star::frame::XController::getViewData() and + com::sun::star::frame::XController::restoreViewData() exchange + string values, which describes as much of the current view state as possible.
+ */ + interface com::sun::star::frame::XController; + + /** allows to intercept functionality + +This interface is inherited from the com::sun::star::frame::Controller + service, currently, there is no functionality to intercept at an XObjectInspector.
+ */ + interface com::sun::star::frame::XDispatchProvider; + + /** provides access to the current model of the inspector + +The model is mainly responsible for providing the property handlers. Additionally, + it can provide user interface names and help URLs for property categories.
+ +Note that there are two ways of setting or retrieving the current model: You can either + use com::sun::star::frame::XModel::setModel(), or, if you do not want + or need to implement the full-blown com::sun::star::frame::XModel interface, + you can use this property directly. Both approaches are semantically equivalent.
+ +If a new model is set at the inspector, the complete UI will be rebuilt to reflect + the change, using the new property handlers provided by the new model.
+ */ + [attribute] XObjectInspectorModel InspectorModel; + + /** provides access to the user interface of the object inspector. + +This interface can be used to access and manipulate various aspects of + the user interface. For instance, you can enable and disable certain + property controls (or parts thereof), or register observers for all property + controls.
+ + @since OOo 2.2 + */ + [attribute, readonly] XObjectInspectorUI InspectorUI; + + /** inspects a new collection of one or more objects. + +If the sequence is empty, the UI of the ObjectInspector will be + cleared.
+ +If the sequence contains more than one object, the XObjectInspector + will create a complete set of property handlers (as indicated by + XObjectInspectorModel::HandlerFactories) for every of + the objects, and compose their output.
+ + @throws com::sun::star::util::VetoException + if the inspector cannot switch to another object set. This typically happens if + one of the active XPropertyHandler's raised a non-modal user interface, + and vetoed suspension of this UI. + + @see XPropertyHandler::isComposable + @see XPropertyHandler::onInteractivePropertySelection + @see XPropertyHandler::suspend + */ + void inspect( [in] sequence< com::sun::star::uno::XInterface > Objects ) + raises (com::sun::star::util::VetoException); +}; + + +}; }; }; }; + +#endif + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/inspection/XObjectInspectorModel.idl b/offapi/com/sun/star/inspection/XObjectInspectorModel.idl new file mode 100644 index 000000000..4906c43cc --- /dev/null +++ b/offapi/com/sun/star/inspection/XObjectInspectorModel.idl @@ -0,0 +1,178 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_inspection_XObjectInspectorModel_idl__ +#define __com_sun_star_inspection_XObjectInspectorModel_idl__ + +#includeEvery element of the sequence must contain information to create a + XPropertyHandler instance. Two ways are currently supported: +
This attribute is usually only evaluated by the ObjectInspector instance + which the model is currently bound to.
+ +The order of factories is important: If two property handlers declare themselves responsible
+ for the same property, the one whose factory is listed last wins. Also,
+ if a handler B
wants to supersede a property of another handler A
,
+ A
's factory must precede the factory of B
.
Properties can be sorted into different categories, described by the LineDescriptor::Category
+ attribute, which is filled in XPropertyHandler::describePropertyLine()
+ method of your property handler.
+ Those names provided by the handlers are programmatic names. All other information
+ about categories is part of the PropertyCategoryDescriptor, and
+ describeCategories() assembles information about all categories which
+ all property handlers provided by the model use.
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 ObjectInspector will then sort the property lines in a way that they + have the same relative ordering as the "order indexes" of their properties.
+ +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 Foo
+ to be displayed after another property Bar
, then the order index
+ of Foo
should be greater than the order index of Bar
.
+
+
If for two different properties the same order index is returned, the
+ ObjectInspector will assume the order in which those properties
+ were provided by the respective property handler
+ (XPropertyHandler::getSupportedProperties()).
+ If two such properties originate from different handlers, they will be ordered according
+ to the order of the handlers, as provided in the #HandlerFactories attribute.
The object inspector displays lines of property/values, optionally grouped
+ into categories, as described by the property handlers.
+ Additionally, the inspector can optionally display a section dedicated to help
+ texts. Clients could use this section to display context-sensitive help, for
+ instance short texts explaining the currently selected property.
This property is ignored by the ObjectInspector if + #HasHelpSection is `FALSE`.
+ +The layout of the ObjectInspector is undefined if + #MinHelpTextLines is larger than + #MaxHelpTextLines.
+ + @since OOo 2.2 + */ + [attribute, readonly] long MinHelpTextLines; + + /** denotes the maximum number of lines of text to be reserved for the help + section. + +This property is ignored by the ObjectInspector if + #HasHelpSection is `FALSE`.
+ +The layout of the ObjectInspector is undefined if + #MaxHelpTextLines is smaller than + #MinHelpTextLines.
+ + @since OOo 2.2 + */ + [attribute, readonly] long MaxHelpTextLines; + + /** determines whether the object inspector's UI should be read-only. + +In this case, the user is able to browse through all properties, but cannot + change any of them.
+ +In a read-only object inspector, the property controls are readonly or + disabled themselves, and the primary and secondary buttons of a property line + are both disabled.
+ + @see XPropertyControl + @see LineDescriptor + */ + [attribute, bound] boolean IsReadOnly; +}; + + +}; }; }; }; + +#endif + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/inspection/XObjectInspectorUI.idl b/offapi/com/sun/star/inspection/XObjectInspectorUI.idl new file mode 100644 index 000000000..465c28c34 --- /dev/null +++ b/offapi/com/sun/star/inspection/XObjectInspectorUI.idl @@ -0,0 +1,169 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_inspection_XObjectInspectorUI_idl__ +#define __com_sun_star_inspection_XObjectInspectorUI_idl__ + +#includeThis interface is used as callback for XPropertyHandlers.
+ +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 Foo
, but another handler has superseded this property, then
+ the ObjectInspector will not have any UI for it. In this case, the call to
+ enablePropertyUI( "Foo" )
will simply be ignored.
This is usually used by an XPropertyHandler if it handles properties, + where one does only make sense if another one has a certain value.
+ + @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 + +Note that the complete UI for the property must be enabled in order for these settings to + be evaluated. That is, enablePropertyUIElements() does not have any effect if + somebody previously disabled the complete UI for this property with enablePropertyUI().
+ + @param PropertyName + the name of the property whose user interface elements are to be enabled or disabled + + @param Elements + a combination of PropertyLineElement flags specifying which elements are to be + enabled or disabled.This method might be used by an XPropertyHandler if it wants to change the type + of control (see PropertyControlType) used to display a certain property.
+ +The object inspector will then call describePropertyLine again, and update its UI accordingly.
+ +Note that the property whose UI should be rebuilt must not necessarily be (though usually is) + in the responsibility of the handler which calls this method. The object inspector will look up the + handler with the responsibility for PropertyName and call its + XPropertyHandler::describePropertyLine()
+ + @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 XPropertyControl 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 + +The given XPropertyControlObserver will be notified of all changes + in all property controls.
+ + @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 XObjectInspectorModel::HasHelpSection property + requires the help section to be unavailable. + + @since OOo 2.2 + */ + void setHelpSectionText( [in] string HelpText ) + raises ( ::com::sun::star::lang::NoSupportException ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/inspection/XPropertyControl.idl b/offapi/com/sun/star/inspection/XPropertyControl.idl new file mode 100644 index 000000000..f257a3bbb --- /dev/null +++ b/offapi/com/sun/star/inspection/XPropertyControl.idl @@ -0,0 +1,106 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_inspection_XPropertyControl_idl__ +#define __com_sun_star_inspection_XPropertyControl_idl__ + +#includeAt every point in time, this value is either `VOID`, or of the type + described by #ValueType.
+ + @throws com::sun::star::beans::IllegalTypeException + if an attempt is made to set a value which is not `VOID` and whose + type does not equal #ValueType. + */ + [attribute] any Value + { + set raises ( com::sun::star::beans::IllegalTypeException ); + }; + + /** denotes the value type of the control. + + @see Value + */ + [attribute, readonly] type ValueType; + + /** specifies the context of the control within the ObjectInspector. + +The property control should actively notify its state changes to the context. + In particular, changes in the focus and the value of the control must be notified. + */ + [attribute] XPropertyControlContext ControlContext; + + /** determines whether the control content is currently modified + +
An XPropertyControl internally manages a flag indicating whether + its content is modified. This flag is reset to `FALSE` every time our + #ControlContext is notified of our current value. Also, the control + implementation must set this flag to `TRUE` if and only if the user changed the + control content.
+ + @see notifyModifiedValue + @see ControlContext + @see XPropertyControlContext::valueChanged + */ + boolean isModified(); + + /** notifies the context in which the control lives of the current control value, + if this value is currently modified + + @see isModified + @see ControlContext + @see XPropertyControlListener::valueChanged + */ + void notifyModifiedValue(); + + /** denotes the window which is the real UI representation of the property control. + +The ObjectInspector will automatically position and size this control + as needed, care for its Z-order, and so on.
+ +This Window must not be `NULL`, else the whole control is not usable.
+ */ + [attribute, readonly] com::sun::star::awt::XWindow ControlWindow; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/inspection/XPropertyControlContext.idl b/offapi/com/sun/star/inspection/XPropertyControlContext.idl new file mode 100644 index 000000000..878710c0b --- /dev/null +++ b/offapi/com/sun/star/inspection/XPropertyControlContext.idl @@ -0,0 +1,48 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_inspection_XPropertyControlContext_idl__ +#define __com_sun_star_inspection_XPropertyControlContext_idl__ + +#includeA XPropertyControlFactory can create any of the control types denoted by + the PropertyControlType constants.
+ + @param ControlType + the type of the requested control + + @param CreateReadOnly + determines whether the newly created control should be readonly. + +If this argument is `TRUE`, this does not necessarily mean that the property cannot be + changed at all in the ObjectInspector. Instead, an XPropertyHandler + can still decide that there is a dedicated UI for entering the property value, + which is usually triggered by a LineDescriptor::PrimaryButton.
+ +Note that this parameter might be ignored if the XObjectInspectorModel::IsReadOnly + attribute is `TRUE`, in which case all created property controls must be readonly.
+ + @returns + a control of the given type. + + @throws com::sun::star::lang::IllegalArgumentException + if the given ControlType is not a value PropertyControlType + */ + XPropertyControl createPropertyControl( [in] short ControlType, [in] boolean CreateReadOnly ) + raises ( com::sun::star::lang::IllegalArgumentException ); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/inspection/XPropertyControlObserver.idl b/offapi/com/sun/star/inspection/XPropertyControlObserver.idl new file mode 100644 index 000000000..d9805dbd0 --- /dev/null +++ b/offapi/com/sun/star/inspection/XPropertyControlObserver.idl @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_inspection_XPropertyControlObserver_idl__ +#define __com_sun_star_inspection_XPropertyControlObserver_idl__ + +#includeThe ObjectInspector itself does not know anything about the object + it is inspecting, all information is obtained via XPropertyHandlers. + Also, property handlers are responsible for describing the user interface which should + be used to interact with the user, with respect to a given aspect of the inspected + component.
+ + @see ObjectInspector + @see LineDescriptor + + @since OOo 2.0.3 +*/ +interface XPropertyHandler +{ + /** used for controlling resources acquired by the handler + +com::sun::star::lang::XComponent::dispose() is invoked when the property handler is not + needed by the object inspector anymore. Handler implementations should clean up any + resources here.
+ */ + interface com::sun::star::lang::XComponent; + + /** binds the property handler to a new component + @param Component + the component to inspect. Must not be `NULL` + @throws com::sun::star::lang::NullPointerException + if the component is `NULL` + */ + void inspect( [in] com::sun::star::uno::XInterface Component ) + raises( com::sun::star::lang::NullPointerException ); + + /** retrieves the current value of a property + @param PropertyName + the name of the property whose value is to be retrieved + @throws com::sun::star::beans::UnknownPropertyException + if the given property is not supported by the property handler + */ + any + getPropertyValue( [in] string PropertyName ) + raises (::com::sun::star::beans::UnknownPropertyException); + + /** sets the value of a property + + @param PropertyName + the name of the property whose value is to be set + @param Value + the property value to set + @throws com::sun::star::beans::UnknownPropertyException + if the given property is not supported by the property handler + */ + void + setPropertyValue( [in] string PropertyName, [in] any Value ) + raises (::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException); + + /** returns the state of a property + + @param PropertyName + the name of the property whose state is to be retrieved + @throws com::sun::star::beans::UnknownPropertyException + if the given property is not supported by the property handler + */ + com::sun::star::beans::PropertyState + getPropertyState( [in] string PropertyName ) + raises (::com::sun::star::beans::UnknownPropertyException); + + /** describes the UI to be used to represent the property + @param PropertyName + the name of the property whose user interface is to be described + implementation + @param ControlFactory + a factory for creating XPropertyControl instances. Must not be `NULL`. + @return + the descriptor of the property line. + @throws com::sun::star::beans::UnknownPropertyException + if the given property is not supported by this handler + @throws com::sun::star::lang::NullPointerException + if ControlFactory is `NULL`. + @see PropertyControlType + @see LineDescriptor + */ + LineDescriptor + describePropertyLine( + [in] string PropertyName, + [in] XPropertyControlFactory ControlFactory + ) + raises (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException); + + /** converts a given control-compatible value to a property value + +In describePropertyLine(), a property handler declared which type of control + should be used to display the value of a certain property. To allow to use the same control + type for different properties, and in particular, for properties of different type, + conversions between controls values and property values are needed.
+ +This method converts a control value into a property value, which subsequently can be used + in conjunction with setPropertyValue().
+ + @param PropertyName + The name of the conversion's target property. + @param ControlValue + The to-be-converted control value. This value has been obtained from an XPropertyControl, + using its XPropertyControl::Value attribute. + + @throws com::sun::star::beans::UnknownPropertyException + if the given property is not supported by the property handler + + @see convertToControlValue + @see describePropertyLine + @see XPropertyControl + @see getPropertyValue + */ + any + convertToPropertyValue( + [in] string PropertyName, + [in] any ControlValue + ) + raises (::com::sun::star::beans::UnknownPropertyException); + + /** converts a given property value to a control-compatible value + +In describePropertyLine(), a property handler declared which type of control + should be used to display the value of a certain property. To allow to use the same control + type for different properties, and in particular, for properties of different type, + conversions between controls values and property values are needed.
+ +This method converts a property value, which has previously been obtained using + getPropertyValue(), into a control-compatible value, which can be used + with XPropertyControl's XPropertyControl::Value attribute.
+ +A usual application of this method are list boxes: There is a generic list box implementation, + which is able to display a simple list of strings. Usually, every string represents one + possible property value. To translate between those property values and the displayed strings, + convertToControlValue() and convertToPropertyValue() are used.
+ +The method is not invoked if the control's value type (XPropertyControl::ValueType + equals the property's value type.
+ + @param PropertyName + The name of the property whose value is to be converted. + @param PropertyValue + The to-be-converted property value. + @param ControlValueType + The target type of the conversion. This type is determined by the control which + is used to display the property, which in turn is determined by the handler itself + in describePropertyLine().An XPropertyHandler implementation might decide to ignore this call. + However, in this case property value changes made by third party components are not + reflected in the object inspector.
+ +If a handler implementation supports property change listeners, it must be able to cope + with a call to addPropertyChangeListener() even if currently no component is + being inspected. In this case, the listener must become active as soon as a new introspection + is set in the next inspect() call.
+ + @param Listener + the listener to notify about property changes + @throws com::sun::star::lang::NullPointerException + if the listener is `NULL` + @see removePropertyChangeListener + */ + void + addPropertyChangeListener( [in] com::sun::star::beans::XPropertyChangeListener Listener ) + raises ( com::sun::star::lang::NullPointerException ); + + /** revokes a listener for notification about property value changes + @see addPropertyChangeListener + */ + void + removePropertyChangeListener( [in] com::sun::star::beans::XPropertyChangeListener Listener ); + + /** returns the properties which the handler can handle + +A handler is allowed to return an empty sequence here, indicating that for + the given introspection, no properties handling can be provided. This might happen + when a fixed set of property handlers is used for a variety of components to inspect, + where not all handlers can really cope with all components.
+ +In the case of returning an empty sequence here, the property handler is ignored + by all further processing in the object inspector.
+ */ + sequence< com::sun::star::beans::Property > + getSupportedProperties(); + + /** returns the properties which are to be superseded by this handler + +Besides defining an own set of properties (see getSupportedProperties()), + a property handler can also declare that foreign properties (which it is + not responsible for) are superseded by its own properties.
+ +This is usually used if your handler is used with another, more generic one, which + should continue to be responsible for all properties, except a few which your + handler handles more elegantly.
+ +In such a case, simply return those properties here.
+ +There is a precedence in the property handlers used by an ObjectInspector, + which also is important for the superseded properties. This precedence is implied by the + precedence of factories to create the property handlers, as denoted in the + XObjectInspectorModel::HandlerFactories attribute.
+ +With this in mind, property handlers can only supersede properties which are supported + by a handler preceding them, but not properties of handlers succeeding them.
+ +For instance, imaging an XObjectInspectorModel which provides three
+ factories, for handler A
, B
, and C
- in this order.
+ Now if A
supports the property Foo
, C
supports
+ Bar
, and B
supersedes both Foo
and Bar
,
+ them the result is Bar
is still present. This is because B
precedes
+ C
, so it cannot, by definition, supersede properties which are supported by
+ C
.
If getSupportedProperties() returned an empty sequence, this method will + not be called.
+ + @see XObjectInspectorModel::HandlerFactories + */ + sequence< string > + getSupersededProperties( ); + + /** retrieve the actuating properties which this handler is interested in + +In general, properties can be declared as "actuating", that is, when their value + changes, the UI for other properties needs to be updated (e.g. enabled or disabled).
+ +With this method, a handler can declare that it feels responsible for some/all + of the depending properties of certain actuating properties.
+ +Whenever the value of an actuating property changes, all handlers which expressed + their interest in this particular actuating properties are called with their + actuatingPropertyChanged() method.
+ +If getSupportedProperties() returned an empty sequence, this method will + not be called
+ */ + sequence< string > + getActuatingProperties( ); + + /** determines whether a given property, which the handler is responsible for, is composable. + +An object inspector can inspect multiple components at once, displaying the intersection + of their properties. For this, all components are examined for their properties, and all properties + which exist for all components, and are declared to be composable by their respective handler, + are displayed in the inspector UI.
+ + @param PropertyName + the name of the property whose composability is to be determined + @throws com::sun::star::beans::UnknownPropertyException + if the given property is not supported by the property handler + */ + boolean isComposable( [in] string PropertyName ) + raises (::com::sun::star::beans::UnknownPropertyException); + + /** called when a browse button belonging to a property UI representation has been clicked + +Property handlers can raise a dedicated UI for entering or somehow changing a property value. + Usually, this will be a modal dialog, but it can also be a non-modal user interface component.
+ +Availability of this feature is indicated by the LineDescriptor::HasPrimaryButton + and LineDescriptor::HasSecondaryButton members of a LineDescriptor, + which the XPropertyHandler fills in its describePropertyLine() method.
+ +When this method is called, the property handler should raise the UI needed to enter the + property value, and return the result of this (see InteractiveSelectionResult).
+ +It is recommended that property handlers do not directly set the property value which has + been obtained from the user, but store it in the output-parameter Data, and return + InteractiveSelectionResult::ObtainedValue.
+ +If a handler sets the new property value directly, and returns + InteractiveSelectionResult::ObtainedValue, this implies that the property + cannot properly be handled in case the object inspector is inspecting an intersection of + multiple components, since in this case onInteractivePropertySelection() + will be called at one handler only, however the new property would have to be forwarded to + all handlers.
+ +If a property is not composable, directly setting the new property value does not yield any problem, + as long as property listeners are properly notified of the change.
+ + @param PropertyName + The name of the property whose browse button has been clicked + + @param Primary + `TRUE` if and only if the primary button has been clicked, `FALSE` otherwise + + @param outData + If the method returns InteractiveSelectionResult::ObtainedValue, + then outData contains the value which has been interactively obtained + from the user, and which still needs to be set at the inspected component. + + @param InspectorUI + provides access to the object inspector UI. Implementations should use this if + the property selection requires non-modal user input. In those cases, + onInteractivePropertySelection() should return InteractiveSelectionResult::Pending, + and the UI for (at least) the property whose input is still pending should be disabled. + + @return + the result of the interactive property value selection. + + @throws com::sun::star::beans::UnknownPropertyException + if the given property is not supported by the property handler + @throws com::sun::star::lang::NullPointerException + if InspectorUI is `NULL` + + @see describePropertyLine + @see addPropertyChangeListener + @see isComposable + */ + ::com::sun::star::inspection::InteractiveSelectionResult + onInteractivePropertySelection( + [in] string PropertyName, + [in] boolean Primary, + [out] any outData, + [in] XObjectInspectorUI InspectorUI + ) + raises (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException); + + /** updates the UI of dependent properties when the value of a certain actuating property changed + +This method is called whenever a property value changes, limited to those properties + whose changes the handler expressed interest in (see getActuatingProperties()).
+ + @param ActuatingPropertyName + the id of the actuating property. + @param NewValue + the new value of the property + @param OldValue + the old value of the property + @param InspectorUI + a callback for updating the object inspector UI + @param FirstTimeInit + If `TRUE`, the method is called for the first-time update of the respective property, that + is, when the property browser is just initializing with the properties of the introspected + object.A XPropertyHandler is used by a XObjectInspector instance, + which implements the XController interface. By definition, a XObjectInspector always forwards + all suspend requests (com::sun::star::frame::XController::suspend()) to + all its handlers.
+ +The usual use case for this method are non-modal user interface components used + for property value input. Such a component might have been opened during + onInteractivePropertySelection(). If a property handler receives a + suspend() call, it should forward the suspension request to the UI + component, and veto suspension of the XObjectInspector as appropriate.
+ +If suspension is not to be vetoed, then all non-modal UI components opened + by the handler should have been closed when it returns from the suspend() call.
+ + @param Suspend + Whether the handler is to be suspended `TRUE` or reactivated (`FALSE`). The + latter happens if a handler was successfully suspended, but an external instance + vetoed the whole suspension process. + + @return + `TRUE` if the handler does allow suspension, `FALSE` if it vetoes it. + */ + boolean suspend( [in] boolean Suspend ); +}; + + +}; }; }; }; + +#endif + + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/inspection/XStringListControl.idl b/offapi/com/sun/star/inspection/XStringListControl.idl new file mode 100644 index 000000000..caf38d601 --- /dev/null +++ b/offapi/com/sun/star/inspection/XStringListControl.idl @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_inspection_XStringListControl_idl__ +#define __com_sun_star_inspection_XStringListControl_idl__ + +#includeA control which would canonically implement this interface is a list box control: + The string list defined by XStringListControl would in the control be + represented as drop-down list containing all the strings.
+ + @since OOo 2.0.3 +*/ +interface XStringListControl : XPropertyControl +{ + /** clears the whole list + */ + void clearList(); + + /** prepends a new entry to the beginning of the list + */ + void prependListEntry( [in] string NewEntry ); + + /** appends a new entry to the end of the list + */ + void appendListEntry( [in] string NewEntry ); + + /** gets all list entries + */ + sequence< string > getListEntries(); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/inspection/XStringRepresentation.idl b/offapi/com/sun/star/inspection/XStringRepresentation.idl new file mode 100644 index 000000000..9a0cde4d7 --- /dev/null +++ b/offapi/com/sun/star/inspection/XStringRepresentation.idl @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_inspection_XStringRepresentation_idl__ +#define __com_sun_star_inspection_XStringRepresentation_idl__ + +#include