diff options
Diffstat (limited to 'scratch/scsolver/source/inc/baselistener.hxx')
-rw-r--r-- | scratch/scsolver/source/inc/baselistener.hxx | 51 |
1 files changed, 49 insertions, 2 deletions
diff --git a/scratch/scsolver/source/inc/baselistener.hxx b/scratch/scsolver/source/inc/baselistener.hxx index 5629ad167..4fdfc9ac7 100644 --- a/scratch/scsolver/source/inc/baselistener.hxx +++ b/scratch/scsolver/source/inc/baselistener.hxx @@ -32,13 +32,16 @@ #include "cppu/macros.hxx" #endif -#include <unoglobal.hxx> +#include "unoglobal.hxx" #include <cppuhelper/implbase1.hxx> #include <com/sun/star/awt/XActionListener.hpp> #include <com/sun/star/awt/XItemListener.hpp> #include <com/sun/star/awt/XFocusListener.hpp> #include <com/sun/star/awt/XMouseListener.hpp> +#include <com/sun/star/awt/XTopWindowListener.hpp> + +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -68,6 +71,14 @@ private: BaseDialog* m_pDlg; }; +class SimpleActionObject +{ +public: + SimpleActionObject(); + virtual ~SimpleActionObject() throw() = 0; + virtual void execute( BaseDialog* dlg ) = 0; +}; + /** * This class defines action for ActionListener object. */ @@ -100,7 +111,6 @@ private: ActionObject* m_pAction; }; - class ItemListener : public ::cppu::WeakImplHelper1< awt::XItemListener >, public Listener { public: @@ -137,6 +147,43 @@ public: virtual void SAL_CALL disposing( const lang::EventObject& ) throw ( RuntimeException ) {} }; +class TopWindowListenerImpl; + +class TopWindowListener : public ::cppu::WeakImplHelper1<awt::XTopWindowListener>, public Listener +{ +public: + TopWindowListener( BaseDialog* pDlg ); + virtual ~TopWindowListener() throw(); + + virtual void SAL_CALL windowOpened( const ::com::sun::star::lang::EventObject& e ) + throw (RuntimeException); + + virtual void SAL_CALL windowClosing( const ::com::sun::star::lang::EventObject& e ) + throw (RuntimeException); + + virtual void SAL_CALL windowClosed( const ::com::sun::star::lang::EventObject& e ) + throw (RuntimeException); + + virtual void SAL_CALL windowMinimized( const ::com::sun::star::lang::EventObject& e ) + throw (RuntimeException); + + virtual void SAL_CALL windowNormalized( const ::com::sun::star::lang::EventObject& e ) + throw (RuntimeException); + + virtual void SAL_CALL windowActivated( const ::com::sun::star::lang::EventObject& e ) + throw (RuntimeException); + + virtual void SAL_CALL windowDeactivated( const ::com::sun::star::lang::EventObject& e ) + throw (RuntimeException); + + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& e ) + throw (RuntimeException); + + void setActionClosing( SimpleActionObject* p ); + +private: + ::std::auto_ptr<TopWindowListenerImpl> m_pImpl; +}; } |