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/.
11 #ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_POINTERSYMBOL_HXX
12 #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_POINTERSYMBOL_HXX
14 #include <com/sun/star/rendering/XBitmap.hpp>
15 #include <cppcanvas/sprite.hxx>
17 #include <com/sun/star/geometry/RealPoint2D.hpp>
18 #include <com/sun/star/uno/Reference.hxx>
20 #include <vieweventhandler.hxx>
21 #include <screenupdater.hxx>
22 #include <eventmultiplexer.hxx>
23 #include <unoview.hxx>
27 using namespace com::sun::star
;
29 namespace slideshow::internal
{
31 class EventMultiplexer
;
32 typedef std::shared_ptr
<class PointerSymbol
> PointerSymbolSharedPtr
;
34 /// On-screen 'laser pointer' from the Impress remote control
35 class PointerSymbol
: public ViewEventHandler
38 static PointerSymbolSharedPtr
create( const css::uno::Reference
<css::rendering::XBitmap
>& xBitmap
,
39 ScreenUpdater
& rScreenUpdater
,
40 EventMultiplexer
& rEventMultiplexer
,
41 const UnoViewContainer
& rViewContainer
);
43 /** Use this method to update the pointer's position
45 void setVisible( const bool bVisible
);
46 void viewsChanged(const css::geometry::RealPoint2D pos
);
49 PointerSymbol( css::uno::Reference
<css::rendering::XBitmap
> xBitmap
,
50 ScreenUpdater
& rScreenUpdater
,
51 const UnoViewContainer
& rViewContainer
);
54 virtual void viewAdded( const UnoViewSharedPtr
& rView
) override
;
55 virtual void viewRemoved( const UnoViewSharedPtr
& rView
) override
;
56 virtual void viewChanged( const UnoViewSharedPtr
& rView
) override
;
57 virtual void viewsChanged() override
;
59 ::basegfx::B2DPoint
calcSpritePos( UnoViewSharedPtr
const & rView
) const;
61 typedef ::std::vector
<
62 ::std::pair
<UnoViewSharedPtr
,
63 cppcanvas::CustomSpriteSharedPtr
> > ViewsVecT
;
65 css::uno::Reference
<css::rendering::XBitmap
> mxBitmap
;
68 ScreenUpdater
& mrScreenUpdater
;
69 css::geometry::RealPoint2D maPos
;
73 } // namespace presentation::internal
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */