fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / slideshow / source / inc / mouseeventhandler.hxx
blobcce75d6c7f9a9edb3b63114763b6e11ed46ca8c1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SLIDESHOW_MOUSEEVENTHANDLER_HXX
21 #define INCLUDED_SLIDESHOW_MOUSEEVENTHANDLER_HXX
23 #include <boost/shared_ptr.hpp>
25 namespace com { namespace sun { namespace star { namespace awt
27 struct MouseEvent;
28 } } } }
31 /* Definition of MouseEventHandler interface */
33 namespace slideshow
35 namespace internal
38 /** Interface for handling mouse events.
40 Classes implementing this interface can be added to an
41 EventMultiplexer object, and are called from there to
42 handle mouse events.
44 class MouseEventHandler
46 public:
47 virtual ~MouseEventHandler() {}
49 /** Handle a mouse button pressed event.
51 @param e
52 The mouse event that occurred. The x,y coordinates of
53 the event are already transformed back to user
54 coordinate space, taking the inverse transform of the
55 view in which the event occurred.
57 @return true, if this handler has successfully
58 processed the mouse event. When this method returns
59 false, possibly other, less prioritized handlers can be
60 called, too.
62 virtual bool handleMousePressed( const ::com::sun::star::awt::MouseEvent& e ) = 0;
64 /** Handle a mouse button released event.
66 @param e
67 The mouse event that occurred. The x,y coordinates of
68 the event are already transformed back to user
69 coordinate space, taking the inverse transform of the
70 view in which the event occurred.
72 @return true, if this handler has successfully
73 processed the pause event. When this method returns
74 false, possibly other, less prioritized handlers are
75 called, too.
77 virtual bool handleMouseReleased( const ::com::sun::star::awt::MouseEvent& e ) = 0;
79 /** Handle a mouse entered the view event.
81 @param e
82 The mouse event that occurred. The x,y coordinates of
83 the event are already transformed back to user
84 coordinate space, taking the inverse transform of the
85 view in which the event occurred.
87 @return true, if this handler has successfully
88 processed the pause event. When this method returns
89 false, possibly other, less prioritized handlers are
90 called, too.
92 virtual bool handleMouseEntered( const ::com::sun::star::awt::MouseEvent& e ) = 0;
94 /** Handle a mouse exited the view event.
96 @param e
97 The mouse event that occurred. The x,y coordinates of
98 the event are already transformed back to user
99 coordinate space, taking the inverse transform of the
100 view in which the event occurred.
102 @return true, if this handler has successfully
103 processed the pause event. When this method returns
104 false, possibly other, less prioritized handlers are
105 called, too.
107 virtual bool handleMouseExited( const ::com::sun::star::awt::MouseEvent& e ) = 0;
109 /** Handle a mouse was moved with a pressed button event.
111 @param e
112 The mouse event that occurred. The x,y coordinates of
113 the event are already transformed back to user
114 coordinate space, taking the inverse transform of the
115 view in which the event occurred.
117 @return true, if this handler has successfully
118 processed the pause event. When this method returns
119 false, possibly other, less prioritized handlers are
120 called, too.
122 virtual bool handleMouseDragged( const ::com::sun::star::awt::MouseEvent& e ) = 0;
124 /** Handle a mouse was moved event.
126 @param e
127 The mouse event that occurred. The x,y coordinates of
128 the event are already transformed back to user
129 coordinate space, taking the inverse transform of the
130 view in which the event occurred.
132 @return true, if this handler has successfully
133 processed the pause event. When this method returns
134 false, possibly other, less prioritized handlers are
135 called, too.
137 virtual bool handleMouseMoved( const ::com::sun::star::awt::MouseEvent& e ) = 0;
140 typedef ::boost::shared_ptr< MouseEventHandler > MouseEventHandlerSharedPtr;
145 #endif /* INCLUDED_SLIDESHOW_MOUSEEVENTHANDLER_HXX */
147 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */