merge the formfield patch from ooo-build
[ooovba.git] / slideshow / source / inc / mouseeventhandler.hxx
blobfbdb59b1be92e012daaebf8919f3a05112fca543
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: mouseeventhandler.hxx,v $
10 * $Revision: 1.6 $
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
38 struct MouseEvent;
39 } } } }
42 /* Definition of MouseEventHandler interface */
44 namespace slideshow
46 namespace internal
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
53 handle mouse events.
55 class MouseEventHandler
57 public:
58 virtual ~MouseEventHandler() {}
60 /** Handle a mouse button pressed event.
62 @param e
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
71 called, too.
73 virtual bool handleMousePressed( const ::com::sun::star::awt::MouseEvent& e ) = 0;
75 /** Handle a mouse button released event.
77 @param e
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
86 called, too.
88 virtual bool handleMouseReleased( const ::com::sun::star::awt::MouseEvent& e ) = 0;
90 /** Handle a mouse entered the view event.
92 @param e
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
101 called, too.
103 virtual bool handleMouseEntered( const ::com::sun::star::awt::MouseEvent& e ) = 0;
105 /** Handle a mouse exited the view event.
107 @param e
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
116 called, too.
118 virtual bool handleMouseExited( const ::com::sun::star::awt::MouseEvent& e ) = 0;
120 /** Handle a mouse was moved with a pressed button event.
122 @param e
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
131 called, too.
133 virtual bool handleMouseDragged( const ::com::sun::star::awt::MouseEvent& e ) = 0;
135 /** Handle a mouse was moved event.
137 @param e
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
146 called, too.
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 */