Bump version to 6.0-36
[LibreOffice.git] / slideshow / source / engine / pointersymbol.hxx
blob40e46018443baaf4f410ede557aa98eb2b9e0770
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 */
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/customsprite.hxx>
17 #include <com/sun/star/uno/Reference.hxx>
19 #include <vieweventhandler.hxx>
20 #include <screenupdater.hxx>
21 #include <eventmultiplexer.hxx>
22 #include <unoview.hxx>
24 #include <vector>
26 using namespace com::sun::star;
28 namespace slideshow {
29 namespace 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
37 public:
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);
48 private:
49 PointerSymbol( const css::uno::Reference<css::rendering::XBitmap>& xBitmap,
50 ScreenUpdater& rScreenUpdater,
51 const UnoViewContainer& rViewContainer );
53 // ViewEventHandler
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;
67 ViewsVecT maViews;
68 ScreenUpdater& mrScreenUpdater;
69 css::geometry::RealPoint2D maPos;
70 bool mbVisible;
73 } // namespace internal
74 } // namespace presentation
76 #endif
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */