LibreOffice Module sdext (master)  1
PresenterSprite.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_SDEXT_SOURCE_PRESENTER_PRESENTERSPRITE_HXX
21 #define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERSPRITE_HXX
22 
23 #include <com/sun/star/rendering/XCustomSprite.hpp>
24 #include <com/sun/star/rendering/XSpriteCanvas.hpp>
25 
26 namespace sdext::presenter
27 {
35 class PresenterSprite final
36 {
37 public:
40  PresenterSprite(const PresenterSprite&) = delete;
41  PresenterSprite& operator=(const PresenterSprite&) = delete;
42 
47  void SetFactory(const css::uno::Reference<css::rendering::XSpriteCanvas>& rxSpriteFactory);
48 
49  css::uno::Reference<css::rendering::XCanvas> GetCanvas();
50 
51  void Show();
52  void Hide();
53 
54  void Resize(const css::geometry::RealSize2D& rSize);
55  void MoveTo(const css::geometry::RealPoint2D& rLocation);
56 
57  void Update();
58 
59 private:
60  css::uno::Reference<css::rendering::XSpriteCanvas> mxSpriteFactory;
61  css::uno::Reference<css::rendering::XCustomSprite> mxSprite;
62  css::geometry::RealSize2D maSize;
63  css::geometry::RealPoint2D maLocation;
65 
66  void ProvideSprite();
67  void DisposeSprite();
68 };
69 }
70 
71 #endif
72 
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::geometry::RealSize2D maSize
css::uno::Reference< css::rendering::XCustomSprite > mxSprite
PresenterSprite & operator=(const PresenterSprite &)=delete
void SetFactory(const css::uno::Reference< css::rendering::XSpriteCanvas > &rxSpriteFactory)
The given sprite canvas is used as factory to create the sprite that is wrapped by objects of this cl...
css::uno::Reference< css::rendering::XCanvas > GetCanvas()
css::uno::Reference< css::rendering::XSpriteCanvas > mxSpriteFactory
void MoveTo(const css::geometry::RealPoint2D &rLocation)
css::geometry::RealPoint2D maLocation
A wrapper around a css::rendering::XCustomSprite that allows not only setting values like size...
void Resize(const css::geometry::RealSize2D &rSize)