merge the formfield patch from ooo-build
[ooovba.git] / slideshow / source / engine / slide / userpaintoverlay.hxx
blobdbcdf6e6f038d4c1bd026ff1c45d7fe17673c2c2
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: userpaintoverlay.hxx,v $
10 * $Revision: 1.3 $
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_USERPAINTOVERLAY_HXX
32 #define INCLUDED_SLIDESHOW_USERPAINTOVERLAY_HXX
34 #include <basegfx/polygon/b2dpolypolygon.hxx>
36 #include "unoview.hxx"
37 #include "rgbcolor.hxx"
39 #include <boost/utility.hpp>
40 #include <boost/shared_ptr.hpp>
43 /* Definition of UserPaintOverlay class */
45 namespace slideshow
47 namespace internal
49 class EventMultiplexer;
50 struct SlideShowContext;
52 class PaintOverlayHandler;
53 typedef ::boost::shared_ptr< class UserPaintOverlay > UserPaintOverlaySharedPtr;
55 /** Slide overlay, which can be painted into by the user.
57 This class registers itself at the EventMultiplexer,
58 listening for mouse clicks and moves. When the mouse is
59 dragged, a hand sketching in the selected color is shown.
61 class UserPaintOverlay : private boost::noncopyable
63 public:
64 /** Create a UserPaintOverlay
66 @param rStrokeColor
67 Color to use for drawing
69 @param nStrokeWidth
70 Width of the stroked path
72 static UserPaintOverlaySharedPtr create( const RGBColor& rStrokeColor,
73 double nStrokeWidth,
74 const SlideShowContext& rContext );
75 ~UserPaintOverlay();
77 private:
78 UserPaintOverlay( const RGBColor& rStrokeColor,
79 double nStrokeWidth,
80 const SlideShowContext& rContext );
82 ::boost::shared_ptr<PaintOverlayHandler> mpHandler;
83 EventMultiplexer& mrMultiplexer;
88 #endif /* INCLUDED_SLIDESHOW_USERPAINTOVERLAY_HXX */