LibreOffice Module forms (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
frm::OButtonControl Class Reference

#include <Button.hxx>

Inheritance diagram for frm::OButtonControl:
[legend]
Collaboration diagram for frm::OButtonControl:
[legend]

Public Member Functions

 OButtonControl (const css::uno::Reference< css::uno::XComponentContext > &_rxFactory)
 
virtual ~OButtonControl () override
 
OUString SAL_CALL getImplementationName () override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual css::uno::Any SAL_CALL queryAggregation (const css::uno::Type &_rType) override
 
virtual void SAL_CALL actionPerformed (const css::awt::ActionEvent &rEvent) override
 
virtual void SAL_CALL addActionListener (const css::uno::Reference< css::awt::XActionListener > &_rxListener) override
 
virtual void SAL_CALL removeActionListener (const css::uno::Reference< css::awt::XActionListener > &_rxListener) override
 
virtual void SAL_CALL setLabel (const OUString &Label) override
 
virtual void SAL_CALL setActionCommand (const OUString &_rCommand) override
 
virtual void SAL_CALL disposing () override
 
virtual void SAL_CALL propertyChange (const css::beans::PropertyChangeEvent &evt) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &_rSource) override
 
virtual sal_Bool SAL_CALL setModel (const css::uno::Reference< css::awt::XControlModel > &_rxModel) override
 
void SAL_CALL setDesignMode (sal_Bool bOn) override
 
- Public Member Functions inherited from cppu::ImplHelper3< class Ifc1, class Ifc2, class Ifc3 >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 
- Public Member Functions inherited from frm::OClickableImageBaseControl
 OClickableImageBaseControl (const css::uno::Reference< css::uno::XComponentContext > &_rxFactory, const OUString &_aService)
 
virtual ~OClickableImageBaseControl () override
 
- Public Member Functions inherited from frm::OControl
 OControl (const css::uno::Reference< css::uno::XComponentContext > &_rFactory, const OUString &_rAggregateService, const bool _bSetDelegator=true)
 constructs a control More...
 
- Public Member Functions inherited from cppu::OComponentHelper
 OComponentHelper (::osl::Mutex &rMutex)
 
virtual ~OComponentHelper () SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL queryAggregation (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual void SAL_CALL acquire () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual void SAL_CALL release () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE=0
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual void SAL_CALL dispose () SAL_OVERRIDE
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &aListener) SAL_OVERRIDE
 
- Public Member Functions inherited from cppu::OWeakAggObject
 OWeakAggObject ()
 
virtual void SAL_CALL acquire () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual void SAL_CALL release () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) SAL_OVERRIDE
 
virtual void SAL_CALL setDelegator (const css::uno::Reference< css::uno::XInterface > &Delegator) SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL queryAggregation (const css::uno::Type &rType) SAL_OVERRIDE
 
- Public Member Functions inherited from cppu::OWeakObject
 OWeakObject ()
 
 OWeakObject (const OWeakObject &)
 
OWeakObject &SAL_CALL operator= (const OWeakObject &)
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) SAL_OVERRIDE
 
virtual void SAL_CALL acquire () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual void SAL_CALL release () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual css::uno::Reference< css::uno::XAdapter > SAL_CALL queryAdapter () SAL_OVERRIDE
 
SAL_CALL operator css::uno::Reference< css::uno::XInterface > ()
 
- Public Member Functions inherited from cppu::ImplHelper2< class Ifc1, class Ifc2 >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 
virtual void dispatch (sal_Int16 _nFeatureId) const =0
 dispatches a feature More...
 
virtual void dispatchWithArgument (sal_Int16 _nFeatureId, const char *_pParamName, const css::uno::Any &_rParamValue) const =0
 dispatches a feature, with an additional named parameter More...
 
virtual bool isEnabled (sal_Int16 _nFeatureId) const =0
 checks whether a given feature is enabled More...
 
virtual bool getBooleanState (sal_Int16 _nFeatureId) const =0
 returns the boolean state of a feature More...
 
virtual OUString getStringState (sal_Int16 _nFeatureId) const =0
 returns the string state of a feature More...
 
virtual sal_Int32 getIntegerState (sal_Int16 _nFeatureId) const =0
 returns the integer state of a feature More...
 

Protected Member Functions

virtual css::uno::Sequence< css::uno::Type > _getTypes () override
 
virtual void getSupportedFeatures (::std::vector< sal_Int16 > &_rFeatureIds) override
 retrieves the list of supported features More...
 
virtual void featureStateChanged (sal_Int16 _nFeatureId, bool _bEnabled) override
 called when the status of a feature changed More...
 
virtual void allFeatureStatesChanged () override
 notification for (potential) changes in the state of all features More...
 
virtual bool isEnabled (sal_Int16 _nFeatureId) const override
 checks whether a given feature is enabled More...
 
virtual void SAL_CALL registerDispatchProviderInterceptor (const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &Interceptor) override
 
virtual void SAL_CALL releaseDispatchProviderInterceptor (const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &Interceptor) override
 
virtual void actionPerformed_Impl (bool bNotifyListener, const css::awt::MouseEvent &_rEvt) override
 
- Protected Member Functions inherited from cppu::ImplHelper3< class Ifc1, class Ifc2, class Ifc3 >
 ~ImplHelper3 () SAL_NOEXCEPT
 
- Protected Member Functions inherited from frm::OClickableImageBaseControl
virtual void SAL_CALL submit () override
 
virtual void SAL_CALL submitWithInteraction (const css::uno::Reference< css::task::XInteractionHandler > &aHandler) override
 
virtual void SAL_CALL addSubmissionVetoListener (const css::uno::Reference< css::form::submission::XSubmissionVetoListener > &listener) override
 
virtual void SAL_CALL removeSubmissionVetoListener (const css::uno::Reference< css::form::submission::XSubmissionVetoListener > &listener) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual css::uno::Any SAL_CALL queryAggregation (const css::uno::Type &_rType) override
 
virtual void SAL_CALL disposing () override
 
virtual void SAL_CALL addApproveActionListener (const css::uno::Reference< css::form::XApproveActionListener > &_rxListener) override
 
virtual void SAL_CALL removeApproveActionListener (const css::uno::Reference< css::form::XApproveActionListener > &_rxListener) override
 
virtual void SAL_CALL registerDispatchProviderInterceptor (const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &Interceptor) override
 
virtual void SAL_CALL releaseDispatchProviderInterceptor (const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &Interceptor) override
 
virtual void actionPerformed_Impl (bool bNotifyListener, const css::awt::MouseEvent &rEvt)
 
css::uno::Sequence< css::uno::Type > _getTypes () override
 
bool approveAction ()
 approves the action by calling the approve listeners More...
 
OImageProducerThread_ImplgetImageProducerThread ()
 retrieves (and if necessary creates) the image producer thread. More...
 
virtual void SAL_CALL disposing () override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
- Protected Member Functions inherited from frm::OControl
virtual ~OControl () override
 
void doSetDelegator ()
 sets the control as delegator at the aggregate More...
 
void doResetDelegator ()
 
virtual css::uno::Any SAL_CALL queryAggregation (const css::uno::Type &_rType) override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual void SAL_CALL disposing () override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &_rxListener) override
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &_rxListener) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual OUString SAL_CALL getImplementationName () override=0
 
virtual void SAL_CALL setContext (const css::uno::Reference< css::uno::XInterface > &Context) override
 
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext () override
 
virtual void SAL_CALL createPeer (const css::uno::Reference< css::awt::XToolkit > &Toolkit, const css::uno::Reference< css::awt::XWindowPeer > &Parent) override
 
virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer () override
 
virtual sal_Bool SAL_CALL setModel (const css::uno::Reference< css::awt::XControlModel > &Model) override
 
virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel () override
 
virtual css::uno::Reference< css::awt::XView > SAL_CALL getView () override
 
virtual void SAL_CALL setDesignMode (sal_Bool bOn) override
 
virtual sal_Bool SAL_CALL isDesignMode () override
 
virtual sal_Bool SAL_CALL isTransparent () override
 
virtual css::uno::Sequence< css::uno::Type > _getTypes ()
 
css::uno::Sequence< OUString > getAggregateServiceNames () const
 
virtual void SAL_CALL disposing ()
 
- Protected Member Functions inherited from cppu::OWeakAggObject
virtual ~OWeakAggObject () SAL_OVERRIDE
 
- Protected Member Functions inherited from cppu::OWeakObject
virtual ~OWeakObject () COVERITY_NOEXCEPT_FALSE
 
void disposeWeakConnectionPoint ()
 
- Protected Member Functions inherited from frm::OFormNavigationHelper
 OFormNavigationHelper (const css::uno::Reference< css::uno::XComponentContext > &_rxORB)
 
virtual ~OFormNavigationHelper ()
 
void dispose ()
 
virtual void SAL_CALL registerDispatchProviderInterceptor (const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &Interceptor) override
 
virtual void SAL_CALL releaseDispatchProviderInterceptor (const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &Interceptor) override
 
virtual void SAL_CALL statusChanged (const css::frame::FeatureStateEvent &State) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void dispatch (sal_Int16 _nFeatureId) const override
 dispatches a feature More...
 
virtual void dispatchWithArgument (sal_Int16 _nFeatureId, const char *_pParamName, const css::uno::Any &_rParamValue) const override
 dispatches a feature, with an additional named parameter More...
 
virtual bool isEnabled (sal_Int16 _nFeatureId) const override
 checks whether a given feature is enabled More...
 
virtual bool getBooleanState (sal_Int16 _nFeatureId) const override
 returns the boolean state of a feature More...
 
virtual OUString getStringState (sal_Int16 _nFeatureId) const override
 returns the string state of a feature More...
 
virtual sal_Int32 getIntegerState (sal_Int16 _nFeatureId) const override
 returns the integer state of a feature More...
 
virtual void interceptorsChanged ()
 is called when the interceptors have. More...
 
virtual void featureStateChanged (sal_Int16 _nFeatureId, bool _bEnabled)
 called when the status of a feature changed More...
 
virtual void allFeatureStatesChanged ()
 notification for (potential) changes in the state of all features More...
 
virtual void getSupportedFeatures (::std::vector< sal_Int16 > &_rFeatureIds)=0
 retrieves the list of supported features More...
 
void updateDispatches ()
 update all our dispatches which are controlled by our dispatch interceptors More...
 
void connectDispatchers ()
 connect to the dispatch interceptors More...
 
void disconnectDispatchers ()
 disconnect from the dispatch interceptors More...
 
css::uno::Reference< css::frame::XDispatch > queryDispatch (const css::util::URL &_rURL)
 queries the interceptor chain for a dispatcher for the given URL More...
 
void invalidateSupportedFeaturesSet ()
 invalidates the set of supported features More...
 
- Protected Member Functions inherited from cppu::ImplHelper2< class Ifc1, class Ifc2 >
 ~ImplHelper2 () SAL_NOEXCEPT
 
- Protected Member Functions inherited from frm::IFeatureDispatcher
 ~IFeatureDispatcher ()
 

Private Member Functions

 DECL_LINK (OnClick, void *, void)
 
void modelFeatureUrlPotentiallyChanged ()
 to be called whenever the feature URL represented by our model has potentially changed More...
 
sal_Int16 getModelUrlFeatureId () const
 retrieves the feature id (see OFormNavigationHelper) of the TargetURL of the model. More...
 
void startOrStopModelPropertyListening (bool _bStart)
 starts or stops listening for changes in model properties we're interested in More...
 

Private Attributes

ImplSVEventm_nClickEvent
 
sal_Int16 m_nTargetUrlFeatureId
 
bool m_bEnabledByPropertyValue
 caches the value of the "Enabled" property of our model More...
 

Additional Inherited Members

- Protected Attributes inherited from frm::OClickableImageBaseControl
::comphelper::OInterfaceContainerHelper3< css::form::XApproveActionListener > m_aApproveActionListeners
 
::comphelper::OInterfaceContainerHelper3< css::awt::XActionListener > m_aActionListeners
 
OUString m_aActionCommand
 
- Protected Attributes inherited from frm::OControl
::osl::Mutex m_aMutex
 
css::uno::Reference< css::awt::XControl > m_xControl
 
css::uno::Reference< css::uno::XAggregation > m_xAggregate
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
WindowStateGuard m_aWindowStateGuard
 
- Protected Attributes inherited from cppu::OWeakAggObject
css::uno::WeakReferenceHelper xDelegator
 
- Protected Attributes inherited from cppu::OWeakObject
oslInterlockedCount m_refCount
 

Detailed Description

Definition at line 120 of file Button.hxx.

Constructor & Destructor Documentation

◆ OButtonControl()

frm::OButtonControl::OButtonControl ( const css::uno::Reference< css::uno::XComponentContext > &  _rxFactory)
explicit

◆ ~OButtonControl()

frm::OButtonControl::~OButtonControl ( )
overridevirtual

Definition at line 387 of file Button.cxx.

References m_nClickEvent, and Application::RemoveUserEvent().

Member Function Documentation

◆ _getTypes()

Sequence< Type > frm::OButtonControl::_getTypes ( )
overrideprotectedvirtual

◆ actionPerformed()

void frm::OButtonControl::actionPerformed ( const css::awt::ActionEvent &  rEvent)
overridevirtual

◆ actionPerformed_Impl()

void frm::OButtonControl::actionPerformed_Impl ( bool  bNotifyListener,
const css::awt::MouseEvent &  _rEvt 
)
overrideprotectedvirtual

◆ addActionListener()

void SAL_CALL frm::OButtonControl::addActionListener ( const css::uno::Reference< css::awt::XActionListener > &  _rxListener)
overridevirtual

◆ allFeatureStatesChanged()

void frm::OButtonControl::allFeatureStatesChanged ( )
overrideprotectedvirtual

notification for (potential) changes in the state of all features

The base class implementation does nothing. Derived classes could force their peer to update it's state, depending on the result of calls to <member>IFeatureDispatcher::isEnabled</member>.

Reimplemented from frm::OFormNavigationHelper.

Definition at line 732 of file Button.cxx.

◆ DECL_LINK()

frm::OButtonControl::DECL_LINK ( OnClick  ,
void *  ,
void   
)
private

◆ disposing() [1/2]

void SAL_CALL frm::OButtonControl::disposing ( )
overridevirtual

◆ disposing() [2/2]

virtual void SAL_CALL frm::OButtonControl::disposing ( const css::lang::EventObject &  _rSource)
overridevirtual

Reimplemented from frm::OFormNavigationHelper.

◆ featureStateChanged()

void frm::OButtonControl::featureStateChanged ( sal_Int16  _nFeatureId,
bool  _bEnabled 
)
overrideprotectedvirtual

called when the status of a feature changed

The default implementation does nothing.

If the feature in question does support more state information that just the enabled/disabled state, then this additional information is to be retrieved in a separate call.

Parameters
_nFeatureIdthe id of the feature
_bEnableddetermines if the features is enabled or disabled
See also
getBooleanState

Reimplemented from frm::OFormNavigationHelper.

Definition at line 713 of file Button.cxx.

References Any, and PROPERTY_ENABLED.

◆ getImplementationName()

OUString SAL_CALL frm::OButtonControl::getImplementationName ( )
inlineoverridevirtual

Implements frm::OControl.

Definition at line 140 of file Button.hxx.

◆ getModelUrlFeatureId()

sal_Int16 frm::OButtonControl::getModelUrlFeatureId ( ) const
private

retrieves the feature id (see OFormNavigationHelper) of the TargetURL of the model.

Definition at line 665 of file Button.cxx.

References PROPERTY_BUTTONTYPE, and PROPERTY_TARGET_URL.

◆ getSupportedFeatures()

void frm::OButtonControl::getSupportedFeatures ( ::std::vector< sal_Int16 > &  _rFeatureIds)
overrideprotectedvirtual

retrieves the list of supported features

To be overridden by derived classes

Parameters
_rFeatureIdsthe array of features to support. Out parameter to fill by the derivee's implementation

Implements frm::OFormNavigationHelper.

Definition at line 706 of file Button.cxx.

◆ getSupportedServiceNames()

css::uno::Sequence< OUString > frm::OButtonControl::getSupportedServiceNames ( )
overridevirtual

◆ isEnabled()

bool frm::OButtonControl::isEnabled ( sal_Int16  _nFeatureId) const
overrideprotectedvirtual

checks whether a given feature is enabled

Reimplemented from frm::OFormNavigationHelper.

Definition at line 743 of file Button.cxx.

◆ modelFeatureUrlPotentiallyChanged()

void frm::OButtonControl::modelFeatureUrlPotentiallyChanged ( )
private

to be called whenever the feature URL represented by our model has potentially changed

Definition at line 624 of file Button.cxx.

◆ propertyChange()

void SAL_CALL frm::OButtonControl::propertyChange ( const css::beans::PropertyChangeEvent &  evt)
overridevirtual

Definition at line 639 of file Button.cxx.

References PROPERTY_BUTTONTYPE, PROPERTY_ENABLED, and PROPERTY_TARGET_URL.

◆ queryAggregation()

Any SAL_CALL frm::OButtonControl::queryAggregation ( const css::uno::Type &  _rType)
overridevirtual

◆ registerDispatchProviderInterceptor()

void SAL_CALL frm::OButtonControl::registerDispatchProviderInterceptor ( const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &  Interceptor)
overrideprotectedvirtual

Reimplemented from frm::OClickableImageBaseControl.

Definition at line 753 of file Button.cxx.

◆ releaseDispatchProviderInterceptor()

void SAL_CALL frm::OButtonControl::releaseDispatchProviderInterceptor ( const css::uno::Reference< css::frame::XDispatchProviderInterceptor > &  Interceptor)
overrideprotectedvirtual

Reimplemented from frm::OClickableImageBaseControl.

Definition at line 760 of file Button.cxx.

◆ removeActionListener()

void SAL_CALL frm::OButtonControl::removeActionListener ( const css::uno::Reference< css::awt::XActionListener > &  _rxListener)
overridevirtual

◆ setActionCommand()

void SAL_CALL frm::OButtonControl::setActionCommand ( const OUString &  _rCommand)
overridevirtual

◆ setDesignMode()

void SAL_CALL frm::OButtonControl::setDesignMode ( sal_Bool  bOn)
overridevirtual

Reimplemented from frm::OControl.

Definition at line 694 of file Button.cxx.

◆ setLabel()

void frm::OButtonControl::setLabel ( const OUString &  Label)
overridevirtual

Definition at line 519 of file Button.cxx.

References Label, frm::OControl::m_xAggregate, and query_aggregation().

◆ setModel()

sal_Bool SAL_CALL frm::OButtonControl::setModel ( const css::uno::Reference< css::awt::XControlModel > &  _rxModel)
overridevirtual

Reimplemented from frm::OControl.

Definition at line 607 of file Button.cxx.

References PROPERTY_ENABLED.

◆ startOrStopModelPropertyListening()

void frm::OButtonControl::startOrStopModelPropertyListening ( bool  _bStart)
private

starts or stops listening for changes in model properties we're interested in

Definition at line 598 of file Button.cxx.

References PROPERTY_BUTTONTYPE, PROPERTY_ENABLED, and PROPERTY_TARGET_URL.

Referenced by disposing().

Member Data Documentation

◆ m_bEnabledByPropertyValue

bool frm::OButtonControl::m_bEnabledByPropertyValue
private

caches the value of the "Enabled" property of our model

Definition at line 128 of file Button.hxx.

◆ m_nClickEvent

ImplSVEvent* frm::OButtonControl::m_nClickEvent
private

Definition at line 125 of file Button.hxx.

Referenced by actionPerformed(), and ~OButtonControl().

◆ m_nTargetUrlFeatureId

sal_Int16 frm::OButtonControl::m_nTargetUrlFeatureId
private

Definition at line 126 of file Button.hxx.

Referenced by actionPerformed_Impl().


The documentation for this class was generated from the following files: