19#ifndef INCLUDED_SFX2_STBITEM_HXX
20#define INCLUDED_SFX2_STBITEM_HXX
33 const css::uno::Reference< css::frame::XFrame >& rFrame,
36 const OUString& aCommandURL );
46 const std::type_info& nTheTypeId, sal_uInt16 nTheSlotId ):
67 virtual void SAL_CALL
acquire() noexcept override;
68 virtual
void SAL_CALL release() noexcept override;
72 using
svt::StatusbarController::disposing;
75 using
svt::StatusbarController::dispose;
78 virtual
void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) override;
81 virtual
sal_Bool SAL_CALL mouseButtonDown( const css::awt::
MouseEvent& aMouseEvent ) override;
82 virtual
sal_Bool SAL_CALL mouseMove( const css::awt::
MouseEvent& aMouseEvent ) override;
83 virtual
sal_Bool SAL_CALL mouseButtonUp( const css::awt::
MouseEvent& aMouseEvent ) override;
84 virtual
void SAL_CALL command( const css::awt::
Point& aPos,
87 const css::
uno::Any&
aData ) override;
88 virtual
void SAL_CALL paint( const css::
uno::Reference< css::awt::XGraphics >& xGraphics,
89 const css::awt::Rectangle& rOutputRectangle,
90 ::sal_Int32 nStyle ) override;
91 virtual
void SAL_CALL click( const css::awt::
Point& aPos ) override;
92 virtual
void SAL_CALL doubleClick( const css::awt::
Point& aPos ) override;
95 virtual
void StateChangedAtStatusBarControl( sal_uInt16 nSID,
SfxItemState eState,
99 virtual
bool MouseButtonDown( const
MouseEvent & );
101 virtual
bool MouseButtonUp( const
MouseEvent & );
104 static sal_uInt16 convertAwtToVCLMouseButtons( sal_Int16 nAwtMouseButtons );
110 sal_uInt16 GetSlotId()
const {
return nSlotId; }
120#define SFX_DECL_STATUSBAR_CONTROL() \
121 static rtl::Reference<SfxStatusBarControl> CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar &rStb ); \
122 static void RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=nullptr)
124#define SFX_IMPL_STATUSBAR_CONTROL(Class, nItemClass) \
125 rtl::Reference<SfxStatusBarControl> Class::CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar &rStb ) \
126 { return new Class( nSlotId, nId, rStb ); } \
127 void Class::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) \
128 { SfxStatusBarControl::RegisterStatusBarControl( pMod, SfxStbCtrlFactory( \
129 Class::CreateImpl, typeid(nItemClass), nSlotId ) ); }
StatusBar & GetStatusBar() const
virtual void SAL_CALL acquire() noexcept override
rtl::Reference< svt::StatusbarController > SfxStatusBarControllerFactory(const css::uno::Reference< css::frame::XFrame > &rFrame, StatusBar *pStatusBar, unsigned short nID, const OUString &aCommandURL)
rtl::Reference< SfxStatusBarControl >(* SfxStatusBarControlCtor)(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar &rStb)
const std::type_info & nTypeId
SfxStbCtrlFactory(SfxStatusBarControlCtor pTheCtor, const std::type_info &nTheTypeId, sal_uInt16 nTheSlotId)
SfxStatusBarControlCtor pCtor