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