diff options
author | Stephan Bergmann <sb@openoffice.org> | 2002-07-22 12:30:00 +0000 |
---|---|---|
committer | Stephan Bergmann <sb@openoffice.org> | 2002-07-22 12:30:00 +0000 |
commit | ab6950fde1f2e14f088e25ae85f412bdd1926c71 (patch) | |
tree | 89a5ff5d0999abf07febb9a5f6cc2cc3db04dae5 /toolkit/inc | |
parent | ae6affc36e4f02fea6d76730f6e3e4522b9af054 (diff) |
#101115# Adapted support for XExtendedToolkit to new Application functionality.
Diffstat (limited to 'toolkit/inc')
-rw-r--r-- | toolkit/inc/toolkit/awt/vclxtoolkit.hxx | 56 |
1 files changed, 23 insertions, 33 deletions
diff --git a/toolkit/inc/toolkit/awt/vclxtoolkit.hxx b/toolkit/inc/toolkit/awt/vclxtoolkit.hxx index 181a18e2f8ac..9a1c1e58da3c 100644 --- a/toolkit/inc/toolkit/awt/vclxtoolkit.hxx +++ b/toolkit/inc/toolkit/awt/vclxtoolkit.hxx @@ -2,9 +2,9 @@ * * $RCSfile: vclxtoolkit.hxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: sb $ $Date: 2002-07-11 11:04:39 $ + * last change: $Author: sb $ $Date: 2002-07-22 13:29:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -96,12 +96,20 @@ #include <osl/module.h> #endif +#ifndef _LINK_HXX +#include <tools/link.hxx> +#endif + class Window; class VCLXWindow; +class VclSimpleEvent; namespace com { namespace sun { namespace star { +namespace lang { + struct EventObject; +} namespace awt { struct WindowDescriptor; class XDataTransfer; @@ -122,13 +130,6 @@ protected: ::osl::Mutex maMutex; }; -// FIXME Remove these dummies: -namespace vcl { - struct TopWindowEvent {}; - struct KeyEvent {}; - struct FocusEvent {}; -} - class VCLXToolkit : public VCLXToolkit_Impl, public cppu::WeakComponentImplHelper5< ::com::sun::star::awt::XToolkit, @@ -136,8 +137,6 @@ class VCLXToolkit : public VCLXToolkit_Impl, ::com::sun::star::awt::XSystemChildFactory, ::com::sun::star::awt::XDataTransferProviderAccess, ::drafts::com::sun::star::awt::XExtendedToolkit > -// FIXME Needs to be derived from Application/VCL TopWindowListener, -// KeyHandler, and FocusListener { ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > mxClipboard; ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > mxSelection; @@ -148,33 +147,24 @@ class VCLXToolkit : public VCLXToolkit_Impl, ::cppu::OInterfaceContainerHelper m_aTopWindowListeners; ::cppu::OInterfaceContainerHelper m_aKeyHandlers; ::cppu::OInterfaceContainerHelper m_aFocusListeners; - bool m_bTopWindowListener; - bool m_bKeyHandler; - bool m_bFocusListener; - - // FIXME Adopt the following skeleton methods if necessary: - - virtual void windowOpened(::vcl::TopWindowEvent const & rEvent); - - virtual void windowClosing(::vcl::TopWindowEvent const & rEvent); - - virtual void windowClosed(::vcl::TopWindowEvent const & rEvent); - - virtual void windowMinimized(::vcl::TopWindowEvent const & rEvent); - - virtual void windowNormalized(::vcl::TopWindowEvent const & rEvent); - - virtual void windowActivated(::vcl::TopWindowEvent const & rEvent); + ::Link m_aEventListenerLink; + ::Link m_aKeyListenerLink; + bool m_bEventListener; + bool m_bKeyListener; - virtual void windowDeactivated(::vcl::TopWindowEvent const & rEvent); + DECL_LINK(eventListenerHandler, ::VclSimpleEvent const *); - virtual bool keyPressed(::vcl::KeyEvent const & rEvent); + DECL_LINK(keyListenerHandler, ::VclSimpleEvent const *); - virtual bool keyReleased(::vcl::KeyEvent const & rEvent); + void callTopWindowListeners( + ::VclSimpleEvent const * pEvent, + void (SAL_CALL ::com::sun::star::awt::XTopWindowListener::* pFn)( + ::com::sun::star::lang::EventObject const &) + throw (::com::sun::star::uno::RuntimeException)); - virtual void focusGained(::vcl::FocusEvent const & rEvent); + long callKeyHandlers(::VclSimpleEvent const * pEvent, bool bPressed); - virtual void focusLost(::vcl::FocusEvent const & rEvent); + void callFocusListeners(::VclSimpleEvent const * pEvent, bool bGained); protected: ::osl::Mutex& GetMutex() { return maMutex; } |