Branch data 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 : :
20 : : #include <mouseevent.hxx>
21 : :
22 : : namespace DOM { namespace events
23 : : {
24 : 0 : CMouseEvent::CMouseEvent()
25 : : : CMouseEvent_Base()
26 : : , m_screenX(0)
27 : : , m_screenY(0)
28 : : , m_clientX(0)
29 : : , m_clientY(0)
30 : : , m_ctrlKey(sal_False)
31 : : , m_shiftKey(sal_False)
32 : : , m_altKey(sal_False)
33 : : , m_metaKey(sal_False)
34 : 0 : , m_button(0)
35 : : {
36 : 0 : }
37 : :
38 : 0 : sal_Int32 SAL_CALL CMouseEvent::getScreenX() throw (RuntimeException)
39 : : {
40 [ # # ]: 0 : ::osl::MutexGuard const g(m_Mutex);
41 [ # # ]: 0 : return m_screenX;
42 : : }
43 : 0 : sal_Int32 SAL_CALL CMouseEvent::getScreenY() throw (RuntimeException)
44 : : {
45 [ # # ]: 0 : ::osl::MutexGuard const g(m_Mutex);
46 [ # # ]: 0 : return m_screenY;
47 : : }
48 : 0 : sal_Int32 SAL_CALL CMouseEvent::getClientX() throw (RuntimeException)
49 : : {
50 [ # # ]: 0 : ::osl::MutexGuard const g(m_Mutex);
51 [ # # ]: 0 : return m_clientX;
52 : : }
53 : 0 : sal_Int32 SAL_CALL CMouseEvent::getClientY() throw (RuntimeException)
54 : : {
55 [ # # ]: 0 : ::osl::MutexGuard const g(m_Mutex);
56 [ # # ]: 0 : return m_clientY;
57 : : }
58 : 0 : sal_Bool SAL_CALL CMouseEvent::getCtrlKey() throw (RuntimeException)
59 : : {
60 [ # # ]: 0 : ::osl::MutexGuard const g(m_Mutex);
61 [ # # ]: 0 : return m_ctrlKey;
62 : : }
63 : 0 : sal_Bool SAL_CALL CMouseEvent::getShiftKey() throw (RuntimeException)
64 : : {
65 [ # # ]: 0 : ::osl::MutexGuard const g(m_Mutex);
66 [ # # ]: 0 : return m_shiftKey;
67 : : }
68 : 0 : sal_Bool SAL_CALL CMouseEvent::getAltKey() throw (RuntimeException)
69 : : {
70 [ # # ]: 0 : ::osl::MutexGuard const g(m_Mutex);
71 [ # # ]: 0 : return m_altKey;
72 : : }
73 : 0 : sal_Bool SAL_CALL CMouseEvent::getMetaKey() throw (RuntimeException)
74 : : {
75 [ # # ]: 0 : ::osl::MutexGuard const g(m_Mutex);
76 [ # # ]: 0 : return m_metaKey;
77 : : }
78 : 0 : sal_Int16 SAL_CALL CMouseEvent::getButton() throw (RuntimeException)
79 : : {
80 [ # # ]: 0 : ::osl::MutexGuard const g(m_Mutex);
81 [ # # ]: 0 : return m_button;
82 : : }
83 : 0 : Reference< XEventTarget > SAL_CALL CMouseEvent::getRelatedTarget() throw(RuntimeException)
84 : : {
85 [ # # ]: 0 : ::osl::MutexGuard const g(m_Mutex);
86 [ # # ]: 0 : return m_relatedTarget;
87 : : }
88 : :
89 : 0 : void SAL_CALL CMouseEvent::initMouseEvent(
90 : : const OUString& typeArg,
91 : : sal_Bool canBubbleArg,
92 : : sal_Bool cancelableArg,
93 : : const Reference< XAbstractView >& viewArg,
94 : : sal_Int32 detailArg,
95 : : sal_Int32 screenXArg,
96 : : sal_Int32 screenYArg,
97 : : sal_Int32 clientXArg,
98 : : sal_Int32 clientYArg,
99 : : sal_Bool ctrlKeyArg,
100 : : sal_Bool altKeyArg,
101 : : sal_Bool shiftKeyArg,
102 : : sal_Bool metaKeyArg,
103 : : sal_Int16 buttonArg,
104 : : const Reference< XEventTarget >& /*relatedTargetArg*/)
105 : : throw(RuntimeException)
106 : : {
107 [ # # ]: 0 : ::osl::MutexGuard const g(m_Mutex);
108 : :
109 [ # # ]: 0 : CUIEvent::initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg);
110 : 0 : m_screenX = screenXArg;
111 : 0 : m_screenY = screenYArg;
112 : 0 : m_clientX = clientXArg;
113 : 0 : m_clientY = clientYArg;
114 : 0 : m_ctrlKey = ctrlKeyArg;
115 : 0 : m_altKey = altKeyArg;
116 : 0 : m_shiftKey = shiftKeyArg;
117 : 0 : m_metaKey = metaKeyArg;
118 [ # # ]: 0 : m_button = buttonArg;
119 : 0 : }
120 : :
121 : : // delegate to CUIEvent, since we are inheriting from CUIEvent and XUIEvent
122 : 0 : Reference< XAbstractView > SAL_CALL CMouseEvent::getView() throw(RuntimeException)
123 : : {
124 : 0 : return CUIEvent::getView();
125 : : }
126 : :
127 : 0 : sal_Int32 SAL_CALL CMouseEvent::getDetail() throw(RuntimeException)
128 : : {
129 : 0 : return CUIEvent::getDetail();
130 : : }
131 : :
132 : 0 : void SAL_CALL CMouseEvent::initUIEvent(const OUString& typeArg,
133 : : sal_Bool canBubbleArg,
134 : : sal_Bool cancelableArg,
135 : : const Reference< XAbstractView >& viewArg,
136 : : sal_Int32 detailArg) throw(RuntimeException)
137 : : {
138 : 0 : CUIEvent::initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg);
139 : 0 : }
140 : :
141 : 0 : OUString SAL_CALL CMouseEvent::getType() throw (RuntimeException)
142 : : {
143 : 0 : return CUIEvent::getType();
144 : : }
145 : :
146 : 0 : Reference< XEventTarget > SAL_CALL CMouseEvent::getTarget() throw (RuntimeException)
147 : : {
148 : 0 : return CUIEvent::getTarget();
149 : : }
150 : :
151 : 0 : Reference< XEventTarget > SAL_CALL CMouseEvent::getCurrentTarget() throw (RuntimeException)
152 : : {
153 : 0 : return CUIEvent::getCurrentTarget();
154 : : }
155 : :
156 : 0 : PhaseType SAL_CALL CMouseEvent::getEventPhase() throw (RuntimeException)
157 : : {
158 : 0 : return CUIEvent::getEventPhase();
159 : : }
160 : :
161 : 0 : sal_Bool SAL_CALL CMouseEvent::getBubbles() throw (RuntimeException)
162 : : {
163 : 0 : return CEvent::getBubbles();
164 : : }
165 : :
166 : 0 : sal_Bool SAL_CALL CMouseEvent::getCancelable() throw (RuntimeException)
167 : : {
168 : 0 : return CUIEvent::getCancelable();
169 : : }
170 : :
171 : 0 : com::sun::star::util::Time SAL_CALL CMouseEvent::getTimeStamp() throw (RuntimeException)
172 : : {
173 : 0 : return CUIEvent::getTimeStamp();
174 : : }
175 : :
176 : 0 : void SAL_CALL CMouseEvent::stopPropagation() throw (RuntimeException)
177 : : {
178 : 0 : CUIEvent::stopPropagation();
179 : 0 : }
180 : :
181 : 0 : void SAL_CALL CMouseEvent::preventDefault() throw (RuntimeException)
182 : : {
183 : 0 : CUIEvent::preventDefault();
184 : 0 : }
185 : :
186 : 0 : void SAL_CALL CMouseEvent::initEvent(const OUString& eventTypeArg, sal_Bool canBubbleArg,
187 : : sal_Bool cancelableArg) throw (RuntimeException)
188 : : {
189 : : // base initializer
190 : 0 : CUIEvent::initEvent(eventTypeArg, canBubbleArg, cancelableArg);
191 : 0 : }
192 : : }}
193 : :
194 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|