Bump version to 24.04.3.4
[LibreOffice.git] / slideshow / source / inc / mouseeventhandler.hxx
blob6be068e8a92aa4015cb157d838a1f7aeb587c50d
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 <sal/types.h>
25 #include <memory>
27 namespace com::sun::star::awt { struct MouseEvent; }
30 /* Definition of MouseEventHandler interface */
32 namespace slideshow::internal
35 /** Interface for handling mouse events.
37 Classes implementing this interface can be added to an
38 EventMultiplexer object, and are called from there to
39 handle mouse events.
41 class MouseEventHandler
43 public:
44 virtual ~MouseEventHandler() {}
46 /** Handle a mouse button pressed event.
48 @param e
49 The mouse event that occurred. The x,y coordinates of
50 the event are already transformed back to user
51 coordinate space, taking the inverse transform of the
52 view in which the event occurred.
54 @return true, if this handler has successfully
55 processed the mouse event. When this method returns
56 false, possibly other, less prioritized handlers can be
57 called, too.
59 virtual bool handleMousePressed( const css::awt::MouseEvent& e ) = 0;
61 /** Handle a mouse button released event.
63 @param e
64 The mouse event that occurred. The x,y coordinates of
65 the event are already transformed back to user
66 coordinate space, taking the inverse transform of the
67 view in which the event occurred.
69 @return true, if this handler has successfully
70 processed the pause event. When this method returns
71 false, possibly other, less prioritized handlers are
72 called, too.
74 virtual bool handleMouseReleased( const css::awt::MouseEvent& e ) = 0;
76 /** Handle a mouse was moved with a pressed button event.
78 @param e
79 The mouse event that occurred. The x,y coordinates of
80 the event are already transformed back to user
81 coordinate space, taking the inverse transform of the
82 view in which the event occurred.
84 @return true, if this handler has successfully
85 processed the pause event. When this method returns
86 false, possibly other, less prioritized handlers are
87 called, too.
89 virtual bool handleMouseDragged( const css::awt::MouseEvent& e ) = 0;
91 /** Handle a mouse was moved event.
93 @param e
94 The mouse event that occurred. The x,y coordinates of
95 the event are already transformed back to user
96 coordinate space, taking the inverse transform of the
97 view in which the event occurred.
99 @return true, if this handler has successfully
100 processed the pause event. When this method returns
101 false, possibly other, less prioritized handlers are
102 called, too.
104 virtual bool handleMouseMoved( const css::awt::MouseEvent& e ) = 0;
107 typedef ::std::shared_ptr< MouseEventHandler > MouseEventHandlerSharedPtr;
111 #endif // INCLUDED_SLIDESHOW_SOURCE_INC_MOUSEEVENTHANDLER_HXX
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */