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 INCLUDED_SLIDESHOW_MOUSEEVENTHANDLER_HXX
30 #define INCLUDED_SLIDESHOW_MOUSEEVENTHANDLER_HXX
32 #include <boost/shared_ptr.hpp>
34 namespace com
{ namespace sun
{ namespace star
{ namespace awt
40 /* Definition of MouseEventHandler interface */
47 /** Interface for handling mouse events.
49 Classes implementing this interface can be added to an
50 EventMultiplexer object, and are called from there to
53 class MouseEventHandler
56 virtual ~MouseEventHandler() {}
58 /** Handle a mouse button pressed event.
61 The mouse event that occurred. The x,y coordinates of
62 the event are already transformed back to user
63 coordinate space, taking the inverse transform of the
64 view in which the event occurred.
66 @return true, if this handler has successfully
67 processed the mouse event. When this method returns
68 false, possibly other, less prioritized handlers can be
71 virtual bool handleMousePressed( const ::com::sun::star::awt::MouseEvent
& e
) = 0;
73 /** Handle a mouse button released event.
76 The mouse event that occurred. The x,y coordinates of
77 the event are already transformed back to user
78 coordinate space, taking the inverse transform of the
79 view in which the event occurred.
81 @return true, if this handler has successfully
82 processed the pause event. When this method returns
83 false, possibly other, less prioritized handlers are
86 virtual bool handleMouseReleased( const ::com::sun::star::awt::MouseEvent
& e
) = 0;
88 /** Handle a mouse entered the view event.
91 The mouse event that occurred. The x,y coordinates of
92 the event are already transformed back to user
93 coordinate space, taking the inverse transform of the
94 view in which the event occurred.
96 @return true, if this handler has successfully
97 processed the pause event. When this method returns
98 false, possibly other, less prioritized handlers are
101 virtual bool handleMouseEntered( const ::com::sun::star::awt::MouseEvent
& e
) = 0;
103 /** Handle a mouse exited the view event.
106 The mouse event that occurred. The x,y coordinates of
107 the event are already transformed back to user
108 coordinate space, taking the inverse transform of the
109 view in which the event occurred.
111 @return true, if this handler has successfully
112 processed the pause event. When this method returns
113 false, possibly other, less prioritized handlers are
116 virtual bool handleMouseExited( const ::com::sun::star::awt::MouseEvent
& e
) = 0;
118 /** Handle a mouse was moved with a pressed button event.
121 The mouse event that occurred. The x,y coordinates of
122 the event are already transformed back to user
123 coordinate space, taking the inverse transform of the
124 view in which the event occurred.
126 @return true, if this handler has successfully
127 processed the pause event. When this method returns
128 false, possibly other, less prioritized handlers are
131 virtual bool handleMouseDragged( const ::com::sun::star::awt::MouseEvent
& e
) = 0;
133 /** Handle a mouse was moved event.
136 The mouse event that occurred. The x,y coordinates of
137 the event are already transformed back to user
138 coordinate space, taking the inverse transform of the
139 view in which the event occurred.
141 @return true, if this handler has successfully
142 processed the pause event. When this method returns
143 false, possibly other, less prioritized handlers are
146 virtual bool handleMouseMoved( const ::com::sun::star::awt::MouseEvent
& e
) = 0;
149 typedef ::boost::shared_ptr
< MouseEventHandler
> MouseEventHandlerSharedPtr
;
154 #endif /* INCLUDED_SLIDESHOW_MOUSEEVENTHANDLER_HXX */
156 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */