1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: mouseeventhandler.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef INCLUDED_SLIDESHOW_MOUSEEVENTHANDLER_HXX
32 #define INCLUDED_SLIDESHOW_MOUSEEVENTHANDLER_HXX
34 #include <boost/shared_ptr.hpp>
36 namespace com
{ namespace sun
{ namespace star
{ namespace awt
42 /* Definition of MouseEventHandler interface */
49 /** Interface for handling mouse events.
51 Classes implementing this interface can be added to an
52 EventMultiplexer object, and are called from there to
55 class MouseEventHandler
58 virtual ~MouseEventHandler() {}
60 /** Handle a mouse button pressed event.
63 The mouse event that occurred. The x,y coordinates of
64 the event are already transformed back to user
65 coordinate space, taking the inverse transform of the
66 view in which the event occurred.
68 @return true, if this handler has successfully
69 processed the mouse event. When this method returns
70 false, possibly other, less prioritized handlers can be
73 virtual bool handleMousePressed( const ::com::sun::star::awt::MouseEvent
& e
) = 0;
75 /** Handle a mouse button released event.
78 The mouse event that occurred. The x,y coordinates of
79 the event are already transformed back to user
80 coordinate space, taking the inverse transform of the
81 view in which the event occurred.
83 @return true, if this handler has successfully
84 processed the pause event. When this method returns
85 false, possibly other, less prioritized handlers are
88 virtual bool handleMouseReleased( const ::com::sun::star::awt::MouseEvent
& e
) = 0;
90 /** Handle a mouse entered the view event.
93 The mouse event that occurred. The x,y coordinates of
94 the event are already transformed back to user
95 coordinate space, taking the inverse transform of the
96 view in which the event occurred.
98 @return true, if this handler has successfully
99 processed the pause event. When this method returns
100 false, possibly other, less prioritized handlers are
103 virtual bool handleMouseEntered( const ::com::sun::star::awt::MouseEvent
& e
) = 0;
105 /** Handle a mouse exited the view event.
108 The mouse event that occurred. The x,y coordinates of
109 the event are already transformed back to user
110 coordinate space, taking the inverse transform of the
111 view in which the event occurred.
113 @return true, if this handler has successfully
114 processed the pause event. When this method returns
115 false, possibly other, less prioritized handlers are
118 virtual bool handleMouseExited( const ::com::sun::star::awt::MouseEvent
& e
) = 0;
120 /** Handle a mouse was moved with a pressed button event.
123 The mouse event that occurred. The x,y coordinates of
124 the event are already transformed back to user
125 coordinate space, taking the inverse transform of the
126 view in which the event occurred.
128 @return true, if this handler has successfully
129 processed the pause event. When this method returns
130 false, possibly other, less prioritized handlers are
133 virtual bool handleMouseDragged( const ::com::sun::star::awt::MouseEvent
& e
) = 0;
135 /** Handle a mouse was moved event.
138 The mouse event that occurred. The x,y coordinates of
139 the event are already transformed back to user
140 coordinate space, taking the inverse transform of the
141 view in which the event occurred.
143 @return true, if this handler has successfully
144 processed the pause event. When this method returns
145 false, possibly other, less prioritized handlers are
148 virtual bool handleMouseMoved( const ::com::sun::star::awt::MouseEvent
& e
) = 0;
151 typedef ::boost::shared_ptr
< MouseEventHandler
> MouseEventHandlerSharedPtr
;
156 #endif /* INCLUDED_SLIDESHOW_MOUSEEVENTHANDLER_HXX */