LibreOffice Module slideshow (master) 1
waitsymbol.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_WAITSYMBOL_HXX
21#define INCLUDED_SLIDESHOW_SOURCE_ENGINE_WAITSYMBOL_HXX
22
23#include <com/sun/star/rendering/XBitmap.hpp>
24#include <cppcanvas/sprite.hxx>
25
26#include <vieweventhandler.hxx>
27#include <screenupdater.hxx>
28#include <eventmultiplexer.hxx>
29#include <unoview.hxx>
30
31#include <memory>
32#include <vector>
33
34namespace slideshow::internal {
35
36class EventMultiplexer;
37typedef std::shared_ptr<class WaitSymbol> WaitSymbolSharedPtr;
38
41{
42public:
43 WaitSymbol(const WaitSymbol&) = delete;
44 WaitSymbol& operator=(const WaitSymbol&) = delete;
45
46 static WaitSymbolSharedPtr create( const css::uno::Reference<css::rendering::XBitmap>& xBitmap,
47 ScreenUpdater& rScreenUpdater,
48 EventMultiplexer& rEventMultiplexer,
49 const UnoViewContainer& rViewContainer );
50
53 void show() { setVisible(true); }
54
57 void hide() { setVisible(false); }
58
59private:
60 WaitSymbol( css::uno::Reference<css::rendering::XBitmap> xBitmap,
61 ScreenUpdater& rScreenUpdater,
62 const UnoViewContainer& rViewContainer );
63
64 // ViewEventHandler
65 virtual void viewAdded( const UnoViewSharedPtr& rView ) override;
66 virtual void viewRemoved( const UnoViewSharedPtr& rView ) override;
67 virtual void viewChanged( const UnoViewSharedPtr& rView ) override;
68 virtual void viewsChanged() override;
69
70 void setVisible( const bool bVisible );
72
73 typedef ::std::vector<
74 ::std::pair<UnoViewSharedPtr,
76
77 css::uno::Reference<css::rendering::XBitmap> mxBitmap;
78
82};
83
84} // namespace presentation::internal
85
86#endif
87
88/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class multiplexes user-activated and slide-show global events.
Interface for handling view events.
On-screen 'hour glass' for when slideshow is unresponsive.
Definition: waitsymbol.hxx:41
void setVisible(const bool bVisible)
Definition: waitsymbol.cxx:73
virtual void viewChanged(const UnoViewSharedPtr &rView) override
Notify changed view.
Definition: waitsymbol.cxx:149
void hide()
Hides the wait symbol.
Definition: waitsymbol.hxx:57
WaitSymbol & operator=(const WaitSymbol &)=delete
css::uno::Reference< css::rendering::XBitmap > mxBitmap
Definition: waitsymbol.hxx:77
virtual void viewRemoved(const UnoViewSharedPtr &rView) override
Notify removed view.
Definition: waitsymbol.cxx:138
static WaitSymbolSharedPtr create(const css::uno::Reference< css::rendering::XBitmap > &xBitmap, ScreenUpdater &rScreenUpdater, EventMultiplexer &rEventMultiplexer, const UnoViewContainer &rViewContainer)
Definition: waitsymbol.cxx:46
void show()
Shows the wait symbol.
Definition: waitsymbol.hxx:53
WaitSymbol(const WaitSymbol &)=delete
WaitSymbol(css::uno::Reference< css::rendering::XBitmap > xBitmap, ScreenUpdater &rScreenUpdater, const UnoViewContainer &rViewContainer)
virtual void viewAdded(const UnoViewSharedPtr &rView) override
Notify new view.
Definition: waitsymbol.cxx:107
virtual void viewsChanged() override
Notify that all views changed.
Definition: waitsymbol.cxx:169
::basegfx::B2DPoint calcSpritePos(UnoViewSharedPtr const &rView) const
Definition: waitsymbol.cxx:95
::std::vector< ::std::pair< UnoViewSharedPtr, cppcanvas::CustomSpriteSharedPtr > > ViewsVecT
Definition: waitsymbol.hxx:75
std::shared_ptr< ::cppcanvas::CustomSprite > CustomSpriteSharedPtr
std::shared_ptr< class WaitSymbol > WaitSymbolSharedPtr
Definition: waitsymbol.hxx:36
std::shared_ptr< UnoView > UnoViewSharedPtr