Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef INCLUDED_FORMS_SOURCE_XFORMS_XFORMSEVENT_HXX
20 : #define INCLUDED_FORMS_SOURCE_XFORMS_XFORMSEVENT_HXX
21 :
22 : #include <sal/types.h>
23 : #include <cppuhelper/implbase1.hxx>
24 : #include <com/sun/star/uno/Reference.h>
25 : #include <com/sun/star/xforms/XFormsEvent.hpp>
26 : #include <com/sun/star/xml/dom/events/XEventTarget.hpp>
27 :
28 : namespace com {
29 : namespace sun {
30 : namespace star {
31 : namespace xforms {
32 :
33 : class XFormsEventConcrete : public cppu::WeakImplHelper1< XFormsEvent > {
34 :
35 : public:
36 :
37 : typedef com::sun::star::uno::RuntimeException RuntimeException_t;
38 : typedef com::sun::star::uno::Reference< com::sun::star::xml::dom::events::XEventTarget > XEventTarget_t;
39 : typedef com::sun::star::xml::dom::events::PhaseType PhaseType_t;
40 : typedef com::sun::star::util::Time Time_t;
41 :
42 0 : XFormsEventConcrete()
43 : : m_canceled(false)
44 : , m_phase(com::sun::star::xml::dom::events::PhaseType_CAPTURING_PHASE)
45 : , m_bubbles(false)
46 0 : , m_cancelable(false)
47 : {
48 0 : }
49 0 : virtual ~XFormsEventConcrete() {}
50 :
51 : virtual OUString SAL_CALL getType() throw (RuntimeException_t, std::exception) SAL_OVERRIDE;
52 : virtual XEventTarget_t SAL_CALL getTarget() throw (RuntimeException_t, std::exception) SAL_OVERRIDE;
53 : virtual XEventTarget_t SAL_CALL getCurrentTarget() throw (RuntimeException_t, std::exception) SAL_OVERRIDE;
54 : virtual PhaseType_t SAL_CALL getEventPhase() throw (RuntimeException_t, std::exception) SAL_OVERRIDE;
55 : virtual sal_Bool SAL_CALL getBubbles() throw (RuntimeException_t, std::exception) SAL_OVERRIDE;
56 : virtual sal_Bool SAL_CALL getCancelable() throw (RuntimeException_t, std::exception) SAL_OVERRIDE;
57 : virtual Time_t SAL_CALL getTimeStamp() throw (RuntimeException_t, std::exception) SAL_OVERRIDE;
58 : virtual void SAL_CALL stopPropagation() throw (RuntimeException_t, std::exception) SAL_OVERRIDE;
59 : virtual void SAL_CALL preventDefault() throw (RuntimeException_t, std::exception) SAL_OVERRIDE;
60 :
61 : virtual void SAL_CALL initXFormsEvent(
62 : const OUString& typeArg,
63 : sal_Bool canBubbleArg,
64 : sal_Bool cancelableArg )
65 : throw (RuntimeException_t, std::exception) SAL_OVERRIDE;
66 :
67 : virtual void SAL_CALL initEvent(
68 : const OUString& eventTypeArg,
69 : sal_Bool canBubbleArg,
70 : sal_Bool cancelableArg)
71 : throw (RuntimeException_t, std::exception) SAL_OVERRIDE;
72 :
73 : private:
74 :
75 : bool m_canceled;
76 :
77 : protected:
78 :
79 : OUString m_eventType;
80 : XEventTarget_t m_target;
81 : XEventTarget_t m_currentTarget;
82 : PhaseType_t m_phase;
83 : bool m_bubbles;
84 : bool m_cancelable;
85 : Time_t m_time;
86 : };
87 :
88 : } } } }
89 :
90 : #endif
91 :
92 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|