fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / slideshow / source / engine / slide / userpaintoverlay.hxx
blobb07e63f2b0eb8424b14e4c429c739c78e3718eac
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 <boost/utility.hpp>
29 #include <boost/shared_ptr.hpp>
30 #include <vector>
32 /* Definition of UserPaintOverlay class */
34 namespace slideshow
36 namespace internal
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
52 public:
53 /** Create a UserPaintOverlay
55 @param rStrokeColor
56 Color to use for drawing
58 @param nStrokeWidth
59 Width of the stroked path
61 static UserPaintOverlaySharedPtr create( const RGBColor& rStrokeColor,
62 double nStrokeWidth,
63 const SlideShowContext& rContext,
64 const PolyPolygonVector& rPolygons,
65 bool bActive);
66 ~UserPaintOverlay();
67 PolyPolygonVector getPolygons();
68 void drawPolygons();
70 private:
71 UserPaintOverlay( const RGBColor& rStrokeColor,
72 double nStrokeWidth,
73 const SlideShowContext& rContext,
74 const PolyPolygonVector& rPolygons,
75 bool bActive );
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: */