Bump version to 6.0-36
[LibreOffice.git] / slideshow / source / engine / slide / userpaintoverlay.hxx
blob4c2e16288c88aebc945547d7f8ddd7e8287fe64f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 <memory>
29 #include <vector>
31 /* Definition of UserPaintOverlay class */
33 namespace slideshow
35 namespace internal
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
51 public:
52 /** Create a UserPaintOverlay
54 @param rStrokeColor
55 Color to use for drawing
57 @param nStrokeWidth
58 Width of the stroked path
60 static UserPaintOverlaySharedPtr create( const RGBColor& rStrokeColor,
61 double nStrokeWidth,
62 const SlideShowContext& rContext,
63 const PolyPolygonVector& rPolygons,
64 bool bActive);
65 ~UserPaintOverlay();
66 UserPaintOverlay(const UserPaintOverlay&) = delete;
67 UserPaintOverlay& operator=(const UserPaintOverlay&) = delete;
68 PolyPolygonVector getPolygons();
69 void drawPolygons();
71 private:
72 UserPaintOverlay( const RGBColor& rStrokeColor,
73 double nStrokeWidth,
74 const SlideShowContext& rContext,
75 const PolyPolygonVector& rPolygons,
76 bool bActive );
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: */