Update ooo320-m1
[ooovba.git] / unoxml / source / events / event.hxx
blobb041f1963a3bd6e5c65acd137aa9a86b85efdba0
1 #ifndef __EVENT_HXX
2 #define __EVENT_HXX
4 #include <sal/types.h>
6 #include <cppuhelper/implbase1.hxx>
7 #include <cppuhelper/implbase2.hxx>
8 #include <cppuhelper/implbase3.hxx>
9 #include <com/sun/star/uno/Reference.h>
10 #include <com/sun/star/uno/Exception.hpp>
11 #include <com/sun/star/xml/dom/events/XEventTarget.hpp>
12 #include <com/sun/star/util/Time.hpp>
14 #include "../dom/node.hxx"
16 #include <libxml/tree.h>
18 using namespace com::sun::star::uno;
19 using namespace com::sun::star::xml::dom;
20 using namespace com::sun::star::xml::dom::events;
23 namespace DOM {namespace events
25 class CEvent : public cppu::WeakImplHelper1< XEvent >
27 friend class CEventDispatcher;
28 friend class CNode;
29 friend class CDocument;
30 friend class CElement;
31 friend class CText;
32 friend class CCharacterData;
33 friend class CAttr;
36 private:
37 sal_Bool m_canceled;
39 protected:
40 OUString m_eventType;
41 Reference< XEventTarget > m_target;
42 Reference< XEventTarget > m_currentTarget;
43 //xmlNodePtr m_target;
44 //xmlNodePtr m_currentTarget;
45 PhaseType m_phase;
46 sal_Bool m_bubbles;
47 sal_Bool m_cancelable;
48 com::sun::star::util::Time m_time;
50 public:
52 CEvent() : m_canceled(sal_False){}
54 virtual ~CEvent();
55 virtual OUString SAL_CALL getType() throw (RuntimeException);
56 virtual Reference< XEventTarget > SAL_CALL getTarget() throw (RuntimeException);
57 virtual Reference< XEventTarget > SAL_CALL getCurrentTarget() throw (RuntimeException);
58 virtual PhaseType SAL_CALL getEventPhase() throw (RuntimeException);
59 virtual sal_Bool SAL_CALL getBubbles() throw (RuntimeException);
60 virtual sal_Bool SAL_CALL getCancelable() throw (RuntimeException);
61 virtual com::sun::star::util::Time SAL_CALL getTimeStamp() throw (RuntimeException);
62 virtual void SAL_CALL stopPropagation() throw (RuntimeException);
63 virtual void SAL_CALL preventDefault() throw (RuntimeException);
64 virtual void SAL_CALL initEvent(
65 const OUString& eventTypeArg,
66 sal_Bool canBubbleArg,
67 sal_Bool cancelableArg) throw (RuntimeException);
70 #endif