1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 #ifndef __XFORMSEVENT_HXX 23 #define __XFORMSEVENT_HXX 24 25 #include <sal/types.h> 26 #include <cppuhelper/implbase1.hxx> 27 #include <com/sun/star/uno/Reference.h> 28 #include <com/sun/star/xforms/XFormsEvent.hpp> 29 #include <com/sun/star/xml/dom/events/XEventTarget.hpp> 30 31 namespace com { 32 namespace sun { 33 namespace star { 34 namespace xforms { 35 36 class XFormsEventConcrete : public cppu::WeakImplHelper1< XFormsEvent > { 37 38 public: 39 40 typedef com::sun::star::uno::RuntimeException RuntimeException_t; 41 typedef com::sun::star::uno::Reference< com::sun::star::xml::dom::events::XEventTarget > XEventTarget_t; 42 typedef com::sun::star::xml::dom::events::PhaseType PhaseType_t; 43 typedef com::sun::star::util::Time Time_t; 44 XFormsEventConcrete(void)45 inline XFormsEventConcrete( void ) : m_canceled(sal_False) {} ~XFormsEventConcrete(void)46 virtual ~XFormsEventConcrete( void ) {} 47 48 virtual rtl::OUString SAL_CALL getType() throw (RuntimeException_t); 49 virtual XEventTarget_t SAL_CALL getTarget() throw (RuntimeException_t); 50 virtual XEventTarget_t SAL_CALL getCurrentTarget() throw (RuntimeException_t); 51 virtual PhaseType_t SAL_CALL getEventPhase() throw (RuntimeException_t); 52 virtual sal_Bool SAL_CALL getBubbles() throw (RuntimeException_t); 53 virtual sal_Bool SAL_CALL getCancelable() throw (RuntimeException_t); 54 virtual Time_t SAL_CALL getTimeStamp() throw (RuntimeException_t); 55 virtual void SAL_CALL stopPropagation() throw (RuntimeException_t); 56 virtual void SAL_CALL preventDefault() throw (RuntimeException_t); 57 58 virtual void SAL_CALL initXFormsEvent( 59 const rtl::OUString& typeArg, 60 sal_Bool canBubbleArg, 61 sal_Bool cancelableArg ) 62 throw (RuntimeException_t); 63 64 virtual void SAL_CALL initEvent( 65 const rtl::OUString& eventTypeArg, 66 sal_Bool canBubbleArg, 67 sal_Bool cancelableArg) 68 throw (RuntimeException_t); 69 70 private: 71 72 sal_Bool m_canceled; 73 74 protected: 75 76 rtl::OUString m_eventType; 77 XEventTarget_t m_target; 78 XEventTarget_t m_currentTarget; 79 PhaseType_t m_phase; 80 sal_Bool m_bubbles; 81 sal_Bool m_cancelable; 82 Time_t m_time; 83 }; 84 85 } } } } 86 87 #endif 88