1*7f654276SAndrew Rist /**************************************************************
2*7f654276SAndrew Rist  *
3*7f654276SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*7f654276SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*7f654276SAndrew Rist  * distributed with this work for additional information
6*7f654276SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*7f654276SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*7f654276SAndrew Rist  * "License"); you may not use this file except in compliance
9*7f654276SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*7f654276SAndrew Rist  *
11*7f654276SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*7f654276SAndrew Rist  *
13*7f654276SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*7f654276SAndrew Rist  * software distributed under the License is distributed on an
15*7f654276SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*7f654276SAndrew Rist  * KIND, either express or implied.  See the License for the
17*7f654276SAndrew Rist  * specific language governing permissions and limitations
18*7f654276SAndrew Rist  * under the License.
19*7f654276SAndrew Rist  *
20*7f654276SAndrew Rist  *************************************************************/
21*7f654276SAndrew Rist 
22*7f654276SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef EVENT_MOUSEEVENT_HXX
25cdf0e10cSrcweir #define EVENT_MOUSEEVENT_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <com/sun/star/xml/dom/events/PhaseType.hpp>
28cdf0e10cSrcweir #include <com/sun/star/xml/dom/events/XMouseEvent.hpp>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include "uievent.hxx"
33cdf0e10cSrcweir 
34cdf0e10cSrcweir 
35cdf0e10cSrcweir using ::rtl::OUString;
36cdf0e10cSrcweir 
37cdf0e10cSrcweir namespace DOM { namespace events {
38cdf0e10cSrcweir 
39cdf0e10cSrcweir typedef ::cppu::ImplInheritanceHelper1< CUIEvent, XMouseEvent >
40cdf0e10cSrcweir     CMouseEvent_Base;
41cdf0e10cSrcweir 
42cdf0e10cSrcweir class CMouseEvent
43cdf0e10cSrcweir     : public CMouseEvent_Base
44cdf0e10cSrcweir {
45cdf0e10cSrcweir protected:
46cdf0e10cSrcweir     sal_Int32 m_screenX;
47cdf0e10cSrcweir     sal_Int32 m_screenY;
48cdf0e10cSrcweir     sal_Int32 m_clientX;
49cdf0e10cSrcweir     sal_Int32 m_clientY;
50cdf0e10cSrcweir     sal_Bool m_ctrlKey;
51cdf0e10cSrcweir     sal_Bool m_shiftKey;
52cdf0e10cSrcweir     sal_Bool m_altKey;
53cdf0e10cSrcweir     sal_Bool m_metaKey;
54cdf0e10cSrcweir     sal_Int16 m_button;
55cdf0e10cSrcweir     Reference< XEventTarget > m_relatedTarget;
56cdf0e10cSrcweir 
57cdf0e10cSrcweir public:
58cdf0e10cSrcweir     explicit CMouseEvent();
59cdf0e10cSrcweir 
60cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getScreenX() throw (RuntimeException);
61cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getScreenY() throw (RuntimeException);
62cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getClientX() throw (RuntimeException);
63cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getClientY() throw (RuntimeException);
64cdf0e10cSrcweir     virtual sal_Bool SAL_CALL getCtrlKey() throw (RuntimeException);
65cdf0e10cSrcweir     virtual sal_Bool SAL_CALL getShiftKey() throw (RuntimeException);
66cdf0e10cSrcweir     virtual sal_Bool SAL_CALL getAltKey() throw (RuntimeException);
67cdf0e10cSrcweir     virtual sal_Bool SAL_CALL getMetaKey() throw (RuntimeException);
68cdf0e10cSrcweir     virtual sal_Int16 SAL_CALL getButton() throw (RuntimeException);
69cdf0e10cSrcweir     virtual Reference< XEventTarget > SAL_CALL getRelatedTarget()  throw(RuntimeException);
70cdf0e10cSrcweir 
71cdf0e10cSrcweir     virtual void SAL_CALL initMouseEvent(
72cdf0e10cSrcweir                         const OUString& typeArg,
73cdf0e10cSrcweir                         sal_Bool canBubbleArg,
74cdf0e10cSrcweir                         sal_Bool cancelableArg,
75cdf0e10cSrcweir                         const Reference< XAbstractView >& viewArg,
76cdf0e10cSrcweir                         sal_Int32 detailArg,
77cdf0e10cSrcweir                         sal_Int32 screenXArg,
78cdf0e10cSrcweir                         sal_Int32 screenYArg,
79cdf0e10cSrcweir                         sal_Int32 clientXArg,
80cdf0e10cSrcweir                         sal_Int32 clientYArg,
81cdf0e10cSrcweir                         sal_Bool ctrlKeyArg,
82cdf0e10cSrcweir                         sal_Bool altKeyArg,
83cdf0e10cSrcweir                         sal_Bool shiftKeyArg,
84cdf0e10cSrcweir                         sal_Bool metaKeyArg,
85cdf0e10cSrcweir                         sal_Int16 buttonArg,
86cdf0e10cSrcweir                         const Reference< XEventTarget >& relatedTargetArg)
87cdf0e10cSrcweir         throw(RuntimeException);
88cdf0e10cSrcweir 
89cdf0e10cSrcweir     // delegate to CUIevent
90cdf0e10cSrcweir     virtual Reference< XAbstractView > SAL_CALL getView() throw (RuntimeException);
91cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getDetail() throw (RuntimeException);
92cdf0e10cSrcweir     virtual void SAL_CALL initUIEvent(const OUString& typeArg,
93cdf0e10cSrcweir                      sal_Bool canBubbleArg,
94cdf0e10cSrcweir                      sal_Bool cancelableArg,
95cdf0e10cSrcweir                      const Reference< XAbstractView >& viewArg,
96cdf0e10cSrcweir                      sal_Int32 detailArg) throw (RuntimeException);
97cdf0e10cSrcweir     virtual OUString SAL_CALL getType() throw (RuntimeException);
98cdf0e10cSrcweir     virtual Reference< XEventTarget > SAL_CALL getTarget() throw (RuntimeException);
99cdf0e10cSrcweir     virtual Reference< XEventTarget > SAL_CALL getCurrentTarget() throw (RuntimeException);
100cdf0e10cSrcweir     virtual PhaseType SAL_CALL getEventPhase() throw (RuntimeException);
101cdf0e10cSrcweir     virtual sal_Bool SAL_CALL getBubbles() throw (RuntimeException);
102cdf0e10cSrcweir     virtual sal_Bool SAL_CALL getCancelable() throw (RuntimeException);
103cdf0e10cSrcweir     virtual com::sun::star::util::Time SAL_CALL getTimeStamp() throw (RuntimeException);
104cdf0e10cSrcweir     virtual void SAL_CALL stopPropagation() throw (RuntimeException);
105cdf0e10cSrcweir     virtual void SAL_CALL preventDefault() throw (RuntimeException);
106cdf0e10cSrcweir     virtual void SAL_CALL initEvent(
107cdf0e10cSrcweir         const OUString& eventTypeArg,
108cdf0e10cSrcweir         sal_Bool canBubbleArg,
109cdf0e10cSrcweir         sal_Bool cancelableArg)
110cdf0e10cSrcweir         throw (RuntimeException);
111cdf0e10cSrcweir };
112cdf0e10cSrcweir }}
113cdf0e10cSrcweir #endif
114