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>
31 /* Definition of UserPaintOverlay class */
37 class EventMultiplexer
;
38 struct SlideShowContext
;
40 class PaintOverlayHandler
;
41 typedef ::std::shared_ptr
< class UserPaintOverlay
> UserPaintOverlaySharedPtr
;
42 typedef ::std::vector
< ::cppcanvas::PolyPolygonSharedPtr
> PolyPolygonVector
;
43 /** Slide overlay, which can be painted into by the user.
45 This class registers itself at the EventMultiplexer,
46 listening for mouse clicks and moves. When the mouse is
47 dragged, a hand sketching in the selected color is shown.
49 class UserPaintOverlay
52 /** Create a UserPaintOverlay
55 Color to use for drawing
58 Width of the stroked path
60 static UserPaintOverlaySharedPtr
create( const RGBColor
& rStrokeColor
,
62 const SlideShowContext
& rContext
,
63 const PolyPolygonVector
& rPolygons
,
66 UserPaintOverlay(const UserPaintOverlay
&) = delete;
67 UserPaintOverlay
& operator=(const UserPaintOverlay
&) = delete;
68 PolyPolygonVector
getPolygons();
72 UserPaintOverlay( const RGBColor
& rStrokeColor
,
74 const SlideShowContext
& rContext
,
75 const PolyPolygonVector
& rPolygons
,
78 ::std::shared_ptr
<PaintOverlayHandler
> mpHandler
;
79 EventMultiplexer
& mrMultiplexer
;
84 #endif // INCLUDED_SLIDESHOW_SOURCE_ENGINE_SLIDE_USERPAINTOVERLAY_HXX
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */