tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / slideshow / source / engine / pointersymbol.hxx
blob44e74cd129575de5c8affb81e91ca651fd31328b
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/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>
25 #include <vector>
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
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( 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 presentation::internal
75 #endif
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */