diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2006-03-14 10:17:13 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2006-03-14 10:17:13 +0000 |
commit | 63039a39f189712799438a6722996bc372552447 (patch) | |
tree | 689ad4f9c3e9f3e2528ea3f55d6e624ebb842fc5 /extensions/source/propctrlr/browserline.hxx | |
parent | 1e9005daebd53ef60b5e38695e500b3e15541188 (diff) |
INTEGRATION: CWS pbrwuno (1.6.158); FILE MERGED
2005/10/11 13:28:42 fs 1.6.158.6: #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:48:56 fs 1.6.158.5: RESYNC: (1.6-1.7); FILE MERGED
2005/09/05 07:41:46 fs 1.6.158.4: #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/31 08:28:52 fs 1.6.158.3: #i53095# get rid of Set/GetPropertyName at the IBrowserControl
2005/08/12 16:30:07 fs 1.6.158.2: - more fine-grained control in the IPropertyBrowserUI which elements
to enable or disable
- moved designing the SQL command into a dedicated handler
- some more reactions on actuating properties move to dedicated handlers
- *nearly* completed implementation of the "composed browser UI", which
collects and combines UI change requests (IPropertyBrowserUI)
(still missing: proper auto-firing)
2005/08/09 13:59:54 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/browserline.hxx')
-rw-r--r-- | extensions/source/propctrlr/browserline.hxx | 129 |
1 files changed, 65 insertions, 64 deletions
diff --git a/extensions/source/propctrlr/browserline.hxx b/extensions/source/propctrlr/browserline.hxx index c5c507800bf2..0bc7137a0054 100644 --- a/extensions/source/propctrlr/browserline.hxx +++ b/extensions/source/propctrlr/browserline.hxx @@ -4,9 +4,9 @@ * * $RCSfile: browserline.hxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: rt $ $Date: 2005-09-08 20:02:22 $ + * last change: $Author: vg $ $Date: 2006-03-14 11:17:13 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -36,18 +36,23 @@ #ifndef _EXTENSIONS_PROPCTRLR_BROWSERLINE_HXX_ #define _EXTENSIONS_PROPCTRLR_BROWSERLINE_HXX_ -#ifndef _COMPHELPER_STLTYPES_HXX_ -#include <comphelper/stl_types.hxx> +/** === begin UNO includes === **/ +#ifndef _COM_SUN_STAR_INSPECTION_XPROPERTYCONTROL_HPP_ +#include <com/sun/star/inspection/XPropertyControl.hpp> #endif +/** === end UNO includes === **/ + #ifndef _SV_FIXED_HXX #include <vcl/fixed.hxx> #endif #ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> #endif -#ifndef _EXTENSIONS_PROPCTRLR_BRWCONTROL_HXX_ -#include "brwcontrol.hxx" -#endif + +namespace com { namespace sun { namespace star { namespace inspection { namespace PropertyLineElement +{ + const sal_Int16 CompleteLine = 0x4000; +} } } } } //............................................................................ namespace pcr @@ -55,92 +60,88 @@ namespace pcr //............................................................................ class OBrowserLine; - class IBrowserControl; //======================================================================== class IButtonClickListener { public: - virtual void buttonClicked( OBrowserLine* _pLine, bool _bPrimary ) = 0; + virtual void buttonClicked( OBrowserLine* _pLine, sal_Bool _bPrimary ) = 0; }; -#define ENABLED_LINE ((sal_uInt16)0x0001) -#define ENABLED_INPUT ((sal_uInt16)0x0002) -#define ENABLED_PRIMARY ((sal_uInt16)0x0004) -#define ENABLED_SECONDARY ((sal_uInt16)0x0008) -#define ENABLED_ALL ((sal_uInt16)0xFFFF) - //======================================================================== class OBrowserLine { private: - FixedText m_aFtTitle; - Size m_aOutputSize; - Point m_aLinePos; - IBrowserControl* m_pBrowserControl; - PushButton* m_pBrowseButton; - PushButton* m_pAdditionalBrowseButton; - IButtonClickListener* m_pClickListener; - Window* m_pTheParent; - sal_uInt16 m_nFlags; - BrowserControlType m_eControlType; - sal_uInt16 m_nNameWidth; - sal_uInt16 m_nEnableFlags; - sal_Bool m_bIndentTitle : 1; - - protected: - void layoutComponents(); + ::rtl::OUString m_sEntryName; + FixedText m_aFtTitle; + Size m_aOutputSize; + Point m_aLinePos; + ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl > + m_xControl; + Window* m_pControlWindow; + PushButton* m_pBrowseButton; + PushButton* m_pAdditionalBrowseButton; + IButtonClickListener* m_pClickListener; + Window* m_pTheParent; + sal_uInt16 m_nNameWidth; + sal_uInt16 m_nEnableFlags; + sal_Bool m_bIndentTitle : 1; public: - OBrowserLine( Window* pParent); - ~OBrowserLine(); + OBrowserLine( const ::rtl::OUString& _rEntryName, Window* pParent); + ~OBrowserLine(); + + void setControl( const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& _rxControl ); + const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControl >& getControl() + { + return m_xControl; + } + inline const Window* getControlWindow() const + { + return m_pControlWindow; + } - void setControl(IBrowserControl*); - IBrowserControl* getControl(); + const ::rtl::OUString& + GetEntryName() const { return m_sEntryName; } - void SetKindOfControl(BrowserControlType); - BrowserControlType GetKindOfControl(); + void SetComponentHelpIds( sal_uInt32 _nControlId, sal_uInt32 _bPrimaryButtonId, sal_uInt32 _nSecondaryButtonId ); - void SetComponentHelpIds( sal_uInt32 _nControlId, sal_uInt32 _bPrimaryButtonId, sal_uInt32 _nSecondaryButtonId ); + void SetTitle(const String& rString ); + void FullFillTitleString(); + String GetTitle() const; + void SetTitleWidth(sal_uInt16); - void SetTitle(const String& rString ); - // #99102# --------------- - void FullFillTitleString(); - String GetTitle() const; - void SetTitleWidth(sal_uInt16); + void SetPosPixel(Point aPos); + void SetPosSizePixel(Point aPos,Size aSize); + Size GetSizePixel(); + void Show(sal_Bool bFlag=sal_True); + void Hide(); + sal_Bool IsVisible(); - void SetPosPixel(Point aPos); - void SetPosSizePixel(Point aPos,Size aSize); - Size GetSizePixel(); - void Show(sal_Bool bFlag=sal_True); - void Hide(); - sal_Bool IsVisible(); + Window* GetRefWindow(); + void SetTabOrder(Window* pRefWindow, sal_uInt16 nFlags ); - Window* GetRefWindow(); - void SetTabOrder(Window* pRefWindow, sal_uInt16 nFlags ); + sal_Bool GrabFocus(); + void ShowBrowseButton( const Image& _rImage, sal_Bool _bPrimary ); + void HideBrowseButton( sal_Bool _bPrimary ); - sal_Bool GrabFocus(); - void ShowBrowseButton( const Image& _rImage, bool _bPrimary ); - void HideBrowseButton( bool _bPrimary ); + void EnablePropertyControls( sal_Int16 _nControls, bool _bEnable ); + void EnablePropertyLine( bool _bEnable ); + sal_Bool IsPropertyInputEnabled( ) const; - void EnablePropertyControls( bool _bEnableInput, bool _bEnablePrimaryButton, bool _bEnableSecondaryButton ); - void EnablePropertyLine( bool _bEnable ); - sal_Bool IsPropertyInputEnabled( ) const; + void SetClickListener( IButtonClickListener* _pListener ); - void SetClickListener( IButtonClickListener* _pListener ); - void SetFlags( sal_uInt16 _nFlags ); - sal_uInt16 GetFlags(); + void IndentTitle( sal_Bool _bIndent ); - void IndentTitle( sal_Bool _bIndent ); private: DECL_LINK( OnButtonClicked, PushButton* ); DECL_LINK( OnButtonFocus, PushButton* ); - void implHideBrowseButton( bool _bPrimary, bool _bReLayout ); + void implHideBrowseButton( sal_Bool _bPrimary, bool _bReLayout ); void implUpdateEnabledDisabled(); - }; - DECLARE_STL_VECTOR( OBrowserLine*, OBrowserLinesArray ); + void impl_layoutComponents(); + }; //............................................................................ } // namespace pcr |