diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2006-03-14 10:25:51 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2006-03-14 10:25:51 +0000 |
commit | d02d479bf3681198a432e23b20043dd16f36bf12 (patch) | |
tree | 5275c1b657bd0c4c0f89c505f29e42db09de739b /extensions/source/propctrlr/linedescriptor.hxx | |
parent | c9da02e7590e1b833a6c6a073097d639a70d11e9 (diff) |
INTEGRATION: CWS pbrwuno (1.6.158); FILE MERGED
2005/10/19 07:48:05 fs 1.6.158.6: #i53095# knitting some loose ends
2005/10/14 12:43:46 fs 1.6.158.5: #i53095# properly care for MAYBEVOID properties and AMBIGUOUS property values
2005/10/11 13:29:26 fs 1.6.158.4: #i53095# phase 3:
introduced XPropertyHandler and XObjectInspectorUI
same open issues as in previous phase
(plus probably some more, since not everything is tested, yet :-\)
2005/10/05 06:59:46 fs 1.6.158.3: RESYNC: (1.6-1.7); FILE MERGED
2005/09/05 07:41:52 fs 1.6.158.2: #i53095# phase 3, part 1: introduced XPropertyControl and relatives,
describing one control in the ObjectInspector, responsible for one
property
known issues:
- rebuildPropertyUI can cause problems now: If the user clicks into
the control for property A, which causes property B to be committed,
which causes the UI for property A to be rebuilt, then this will
crash currently. Reason: rebuildPropertyUI now synchronously replaces
the VCL-Window of the rebuilt control, which is exactly the one
which is still in some MouseButtonDown-handler.
possible solutions:
- see if rebuiltPropertyUI can be obsoleted - handlers should be able
to just obtain the XPropertyControl from the PropertyUI, and
re-initialize the control. Shouldn't they?`
- make one of the steps in the chain (mouse-click, handler-call,
rebuildPropertyUI-callback) asynchronous.
2005/08/09 14:00:03 fs 1.6.158.1: #i53095# phase 1:
- don't use strings to transver values between controls and introspectee, but Anys
- first version of a dedicated property handler for form-component-related properties
(not yet completed)
known regressions over previous phase:
- handlers for events not yet implemented, thus some assertions
- click handlers for form-component-related properties do not yet work,
thus the browse buttons mostly do not work
Diffstat (limited to 'extensions/source/propctrlr/linedescriptor.hxx')
-rw-r--r-- | extensions/source/propctrlr/linedescriptor.hxx | 130 |
1 files changed, 14 insertions, 116 deletions
diff --git a/extensions/source/propctrlr/linedescriptor.hxx b/extensions/source/propctrlr/linedescriptor.hxx index ecdf768662c9..1cfee8ae5817 100644 --- a/extensions/source/propctrlr/linedescriptor.hxx +++ b/extensions/source/propctrlr/linedescriptor.hxx @@ -4,9 +4,9 @@ * * $RCSfile: linedescriptor.hxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: rt $ $Date: 2005-09-08 20:16:00 $ + * last change: $Author: vg $ $Date: 2006-03-14 11:25:51 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -35,137 +35,35 @@ #ifndef _EXTENSIONS_PROPCTRLR_LINEDESCRIPTOR_HXX_ #define _EXTENSIONS_PROPCTRLR_LINEDESCRIPTOR_HXX_ -#ifndef _EXTENSIONS_PROPCTRLR_BRWCONTROL_HXX_ -#include "brwcontrol.hxx" -#endif -#ifndef _VCL_FLDUNIT_HXX -#include <vcl/fldunit.hxx> -#endif #ifndef _SV_IMAGE_HXX #include <vcl/image.hxx> #endif +/** === begin UNO includes === **/ +#ifndef _COM_SUN_STAR_INSPECTION_LINEDESCRIPTOR_HPP_ +#include <com/sun/star/inspection/LineDescriptor.hpp> +#endif +/** === end UNO includes === **/ //............................................................................ namespace pcr { //............................................................................ -#define LINE_FLAG_EVENT 0x0001 - // TODO: this could be handled with virtual properties, and a IPropertyHandler implementation, and PROP_FLAGs - - struct PropertyUIDescriptor - { - /// the type of the control which should be used to represent this property at the UI - BrowserControlType eControlType; - - /** a user-defined control, if the property cannot be represented by a standard control - Only evaluated if eControlType equals BCT_USERDEFINED - */ - IBrowserControl* pControl; - - /** a list of possible values for the property - Only evaluated if eControlType equals BCT_LISTBOX or BCT_COMBOBOX - */ - ::std::vector< ::rtl::OUString > - aListValues; - - /** a help id to give to the browse button, if necessary. - The line has a browse button if and only if this is not 0. - */ - sal_uInt32 nButtonHelpId; - - /** if the property supports two buttons, this is the help id of the second one - The line has a second button if and only if this is not 0. - Only evaluated if nButtonHelpId is not 0. - */ - sal_uInt32 nAdditionalButtonHelpId; - - /** an image to display on the browse button. If not set, the button - will contain the usual "..." text for browse buttons. - Only evaluated if nButtonHelpId is not 0. - */ - Image aButtonImage; - - /** an image to display on the second button. - Only evaluated if nAdditionalButtonHelpId is not 0. - */ - Image aAdditionalButtonImage; - - /** should the UI for this property get an indent, so it looks like a sub-aspect - of some super-ordinate property? - */ - sal_Bool bIndent : 1; - - /// is the UI for this property locked (i.e. read-only)? - sal_Bool bIsLocked : 1; - - /** does the (numeric) property have a min- and max value - If this is false, nMinValue and nMaxValue are to be ignored - */ - sal_Bool bHaveMinMax : 1; - - /// for numeric fields: number of digits - sal_uInt16 nDigits; - /// for numeric fields only: minimum value - sal_Int32 nMinValue; - /// for numeric fields only: maximum value - sal_Int32 nMaxValue; - /// for numeric fields only: measurement unit to display values - FieldUnit eDisplayUnit; - /// for numeric fields only: measurement unit to transfer values - FieldUnit eValueUnit; - - PropertyUIDescriptor() - { - clear(); - } - - void clear() - { - eControlType = BCT_UNDEFINED; - pControl = NULL; - aListValues.resize( 0 ); - nButtonHelpId = nAdditionalButtonHelpId = 0; - aButtonImage = aAdditionalButtonImage = Image(); - bIndent = bIsLocked = bHaveMinMax = sal_False; - nDigits = 0; - nMinValue = 0; - nMaxValue = -1; - eDisplayUnit = eValueUnit = FUNIT_NONE; - } - }; - - class IBrowserControl; //======================================================================== //= OLineDescriptor //======================================================================== - struct OLineDescriptor : public PropertyUIDescriptor + struct OLineDescriptor : public ::com::sun::star::inspection::LineDescriptor { - String sName; // the name of the property - String sTitle; // the human readable label for the property - String sValue; // the current value of the property, in it's string representation - sal_uInt32 nHelpId; // a help id to give to the input control + ::rtl::OUString sName; // the name of the property + ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler > + xPropertyHandler; // the handler for this property + ::com::sun::star::uno::Any aValue; // the current value of the property - sal_uInt16 nFlags; // special flag, see LINE_FLAG_* - sal_Bool bUnknownValue : 1; // is the property value currently "unknown"? - sal_Bool bHasDefaultValue : 1; // does the property support a "standard" value? - - // TODO: this class is a wild mix of property meta data, and information about a current property - // value. Can this be separated? Doesn't part of this belong into IPropertyInfoService? + bool bUnknownValue : 1; // is the property value currently "unknown"? (PropertyState_AMBIGUOUS) OLineDescriptor() + :bUnknownValue( false ) { - clear(); - } - - void clear() - { - PropertyUIDescriptor::clear(); - - sName = sTitle = sValue = String(); - nHelpId = 0; - nFlags = 0; - bUnknownValue = bHasDefaultValue = sal_False; } }; |