1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_ENGINE_SLIDE_USERPAINTOVERLAY_HXX
21 #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SLIDE_USERPAINTOVERLAY_HXX
23 #include <basegfx/polygon/b2dpolypolygon.hxx>
25 #include "unoview.hxx"
26 #include "rgbcolor.hxx"
28 #include <boost/utility.hpp>
29 #include <boost/shared_ptr.hpp>
32 /* Definition of UserPaintOverlay class */
38 class EventMultiplexer
;
39 struct SlideShowContext
;
41 class PaintOverlayHandler
;
42 typedef ::boost::shared_ptr
< class UserPaintOverlay
> UserPaintOverlaySharedPtr
;
43 typedef ::std::vector
< ::cppcanvas::PolyPolygonSharedPtr
> PolyPolygonVector
;
44 /** Slide overlay, which can be painted into by the user.
46 This class registers itself at the EventMultiplexer,
47 listening for mouse clicks and moves. When the mouse is
48 dragged, a hand sketching in the selected color is shown.
50 class UserPaintOverlay
: private boost::noncopyable
53 /** Create a UserPaintOverlay
56 Color to use for drawing
59 Width of the stroked path
61 static UserPaintOverlaySharedPtr
create( const RGBColor
& rStrokeColor
,
63 const SlideShowContext
& rContext
,
64 const PolyPolygonVector
& rPolygons
,
67 PolyPolygonVector
getPolygons();
71 UserPaintOverlay( const RGBColor
& rStrokeColor
,
73 const SlideShowContext
& rContext
,
74 const PolyPolygonVector
& rPolygons
,
77 ::boost::shared_ptr
<PaintOverlayHandler
> mpHandler
;
78 EventMultiplexer
& mrMultiplexer
;
83 #endif // INCLUDED_SLIDESHOW_SOURCE_ENGINE_SLIDE_USERPAINTOVERLAY_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */