1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef EVENT_MOUSEEVENT_HXX 29 #define EVENT_MOUSEEVENT_HXX 30 31 #include <com/sun/star/xml/dom/events/PhaseType.hpp> 32 #include <com/sun/star/xml/dom/events/XMouseEvent.hpp> 33 34 #include <cppuhelper/implbase1.hxx> 35 36 #include "uievent.hxx" 37 38 39 using ::rtl::OUString; 40 41 namespace DOM { namespace events { 42 43 typedef ::cppu::ImplInheritanceHelper1< CUIEvent, XMouseEvent > 44 CMouseEvent_Base; 45 46 class CMouseEvent 47 : public CMouseEvent_Base 48 { 49 protected: 50 sal_Int32 m_screenX; 51 sal_Int32 m_screenY; 52 sal_Int32 m_clientX; 53 sal_Int32 m_clientY; 54 sal_Bool m_ctrlKey; 55 sal_Bool m_shiftKey; 56 sal_Bool m_altKey; 57 sal_Bool m_metaKey; 58 sal_Int16 m_button; 59 Reference< XEventTarget > m_relatedTarget; 60 61 public: 62 explicit CMouseEvent(); 63 64 virtual sal_Int32 SAL_CALL getScreenX() throw (RuntimeException); 65 virtual sal_Int32 SAL_CALL getScreenY() throw (RuntimeException); 66 virtual sal_Int32 SAL_CALL getClientX() throw (RuntimeException); 67 virtual sal_Int32 SAL_CALL getClientY() throw (RuntimeException); 68 virtual sal_Bool SAL_CALL getCtrlKey() throw (RuntimeException); 69 virtual sal_Bool SAL_CALL getShiftKey() throw (RuntimeException); 70 virtual sal_Bool SAL_CALL getAltKey() throw (RuntimeException); 71 virtual sal_Bool SAL_CALL getMetaKey() throw (RuntimeException); 72 virtual sal_Int16 SAL_CALL getButton() throw (RuntimeException); 73 virtual Reference< XEventTarget > SAL_CALL getRelatedTarget() throw(RuntimeException); 74 75 virtual void SAL_CALL initMouseEvent( 76 const OUString& typeArg, 77 sal_Bool canBubbleArg, 78 sal_Bool cancelableArg, 79 const Reference< XAbstractView >& viewArg, 80 sal_Int32 detailArg, 81 sal_Int32 screenXArg, 82 sal_Int32 screenYArg, 83 sal_Int32 clientXArg, 84 sal_Int32 clientYArg, 85 sal_Bool ctrlKeyArg, 86 sal_Bool altKeyArg, 87 sal_Bool shiftKeyArg, 88 sal_Bool metaKeyArg, 89 sal_Int16 buttonArg, 90 const Reference< XEventTarget >& relatedTargetArg) 91 throw(RuntimeException); 92 93 // delegate to CUIevent 94 virtual Reference< XAbstractView > SAL_CALL getView() throw (RuntimeException); 95 virtual sal_Int32 SAL_CALL getDetail() throw (RuntimeException); 96 virtual void SAL_CALL initUIEvent(const OUString& typeArg, 97 sal_Bool canBubbleArg, 98 sal_Bool cancelableArg, 99 const Reference< XAbstractView >& viewArg, 100 sal_Int32 detailArg) throw (RuntimeException); 101 virtual OUString SAL_CALL getType() throw (RuntimeException); 102 virtual Reference< XEventTarget > SAL_CALL getTarget() throw (RuntimeException); 103 virtual Reference< XEventTarget > SAL_CALL getCurrentTarget() throw (RuntimeException); 104 virtual PhaseType SAL_CALL getEventPhase() throw (RuntimeException); 105 virtual sal_Bool SAL_CALL getBubbles() throw (RuntimeException); 106 virtual sal_Bool SAL_CALL getCancelable() throw (RuntimeException); 107 virtual com::sun::star::util::Time SAL_CALL getTimeStamp() throw (RuntimeException); 108 virtual void SAL_CALL stopPropagation() throw (RuntimeException); 109 virtual void SAL_CALL preventDefault() throw (RuntimeException); 110 virtual void SAL_CALL initEvent( 111 const OUString& eventTypeArg, 112 sal_Bool canBubbleArg, 113 sal_Bool cancelableArg) 114 throw (RuntimeException); 115 }; 116 }} 117 #endif 118