From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- offapi/com/sun/star/inspection/LineDescriptor.idl | 189 ++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 offapi/com/sun/star/inspection/LineDescriptor.idl (limited to 'offapi/com/sun/star/inspection/LineDescriptor.idl') diff --git a/offapi/com/sun/star/inspection/LineDescriptor.idl b/offapi/com/sun/star/inspection/LineDescriptor.idl new file mode 100644 index 000000000..93fc05cae --- /dev/null +++ b/offapi/com/sun/star/inspection/LineDescriptor.idl @@ -0,0 +1,189 @@ +/* -*- 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_LineDescriptor_idl__ +#define __com_sun_star_inspection_LineDescriptor_idl__ + +#include + +module com { module sun { module star { module inspection { + +interface XPropertyControl; + +/** describes the appearance of a line representing a single property in an ObjectInspector. + + Such a line consists of +
  • a label with a human-readable name for the property
  • +
  • a control which is used for user interaction - i.e. it displays the current property + value, and allows the user entering a new one.
  • +
  • (optional) one or two buttons which, when clicked, can start a more complex, interactive + property value input. For instance, if you have a property whose value is a path in the + file system, such a button could be used to let the user browse for a path with a + usual file picker.
  • +
+ + @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. + +

If no image for the primary button is specified, but a primary button is present, + the three dots will be displayed on the button.

+ + @see XPropertyHandler::onInteractivePropertySelection + @see HasSecondaryButton + @see PrimaryButtonImageURL + @see PrimaryButtonImage + */ + boolean HasPrimaryButton; + + /** describes a unique id to associate with the primary 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.

+ */ + string PrimaryButtonId; + + /** describes the URL of an image to display on the primary button, if any. + +

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 + PrimaryButtonImageURL empty, and use the #PrimaryButtonImage property. + + @see PrimaryButtonImage + */ + string PrimaryButtonImageURL; + + /** describes a graphics to display at the primary button, if any. + +

The property will be ignored if #HasPrimaryButton is `FALSE`, or + if #PrimaryButtonImageURL is a non-empty string.

+ + @see HasPrimaryButton + @see PrimaryButtonImageURL + */ + com::sun::star::graphic::XGraphic PrimaryButtonImage; + + /** determines whether a secondary button exists which can be used for a more complex, interactive + property value input. + +

A secondary button subordinated to the primary button. If no primary button exists + (#HasPrimaryButton), this member is ignored.

+ + @see XPropertyHandler::onInteractivePropertySelection + @see HasSecondaryButton + */ + boolean HasSecondaryButton; + + /** describes a unique id to associate with the primary button + +

If a secondary button exists for a property's UI representation (#HasSecondaryButton), + it gets the ID specified herein.

+ + @see PrimaryButtonId + */ + string SecondaryButtonId; + + /** describes the URL of an image to display on the secondary button, if any. + +

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 + SecondaryButtonImageURL empty, and use the #SecondaryButtonImage property. + + @see SecondaryButtonImage + */ + string SecondaryButtonImageURL; + + /** describes a graphics to display at the secondary button, if any. + +

The property will be ignored if #HasSecondaryButton is `FALSE`, or + if #SecondaryButtonImageURL is a non-empty string.

+ + @see HasSecondaryButton + @see SecondaryButtonImageURL + */ + com::sun::star::graphic::XGraphic SecondaryButtonImage; + + /** describes the indent level for the property + +

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 0 when describing + the UI for a normal property. + */ + short IndentLevel; + + /** describes the category into which the property should be sorted by the ObjectInspector. + +

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.

+ + @see XObjectInspectorModel::describeCategories + */ + string Category; +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3