Bump version to 6.0-36
[LibreOffice.git] / slideshow / source / inc / mouseeventhandler.hxx
blob0a25b4170bab2176eb20f83ec1b02d345555faf6
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_SOURCE_INC_MOUSEEVENTHANDLER_HXX
21 #define INCLUDED_SLIDESHOW_SOURCE_INC_MOUSEEVENTHANDLER_HXX
23 #include <memory>
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 css::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 css::awt::MouseEvent& e ) = 0;
79 /** Handle a mouse was moved with a pressed button 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 handleMouseDragged( const css::awt::MouseEvent& e ) = 0;
94 /** Handle a mouse was moved 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 handleMouseMoved( const css::awt::MouseEvent& e ) = 0;
110 typedef ::std::shared_ptr< MouseEventHandler > MouseEventHandlerSharedPtr;
115 #endif // INCLUDED_SLIDESHOW_SOURCE_INC_MOUSEEVENTHANDLER_HXX
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */