LibreOffice Module slideshow (master) 1
viewlayer.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_INC_VIEWLAYER_HXX
21#define INCLUDED_SLIDESHOW_SOURCE_INC_VIEWLAYER_HXX
22
23#include <sal/config.h>
24#include <memory>
25#include <com/sun/star/geometry/IntegerSize2D.hpp>
26
27namespace basegfx
28{
29 class B1DRange;
30 class B2DRange;
31 class B2DVector;
32 class B2DHomMatrix;
33 class B2DPolyPolygon;
34 class B2DSize;
35}
36namespace cppcanvas
37{
38 class Canvas;
39 class CustomSprite;
40 typedef std::shared_ptr< Canvas > CanvasSharedPtr;
41 typedef std::shared_ptr< ::cppcanvas::CustomSprite > CustomSpriteSharedPtr;
42}
43
44
45/* Definition of ViewLayer interface */
46
47namespace slideshow::internal
48 {
49 class View;
50 typedef std::shared_ptr< View > ViewSharedPtr;
51
53 {
54 public:
55 virtual ~ViewLayer() {}
56
62 virtual bool isOnView(ViewSharedPtr const& rView) const = 0;
63
70
77 virtual void clear() const = 0;
78
88 virtual void clearAll() const = 0;
89
105 createSprite( const basegfx::B2DSize& rSpriteSizePixel,
106 double nPriority ) const = 0;
107
118 virtual void setPriority( const basegfx::B1DRange& rRange ) = 0;
119
133
134 virtual css::geometry::IntegerSize2D getTranslationOffset() const = 0;
135
143
152 virtual void setClip( const basegfx::B2DPolyPolygon& rClip ) = 0;
153
164 virtual bool resize( const basegfx::B2DRange& rArea ) = 0;
165
166 };
167
168 typedef std::shared_ptr< ViewLayer > ViewLayerSharedPtr;
169}
170
171#endif // INCLUDED_SLIDESHOW_SOURCE_INC_VIEWLAYER_HXX
172
173/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void clearAll() const =0
Clear the complete view.
virtual bool resize(const basegfx::B2DRange &rArea)=0
Resize this view layer.
virtual basegfx::B2DHomMatrix getTransformation() const =0
Get the overall view transformation.
virtual void setPriority(const basegfx::B1DRange &rRange)=0
Set the layer priority range.
virtual cppcanvas::CustomSpriteSharedPtr createSprite(const basegfx::B2DSize &rSpriteSizePixel, double nPriority) const =0
Create a sprite for this layer.
virtual void setClip(const basegfx::B2DPolyPolygon &rClip)=0
Set clipping on this view layer.
virtual cppcanvas::CanvasSharedPtr getCanvas() const =0
Get the associated canvas of this layer.
virtual basegfx::B2DHomMatrix getSpriteTransformation() const =0
Get the overall view transformation.
virtual bool isOnView(ViewSharedPtr const &rView) const =0
Query whether layer displays on given view.
virtual css::geometry::IntegerSize2D getTranslationOffset() const =0
virtual void clear() const =0
Clear the clipped view layer area.
std::shared_ptr< ::cppcanvas::CustomSprite > CustomSpriteSharedPtr
std::shared_ptr< Canvas > CanvasSharedPtr
std::shared_ptr< View > ViewSharedPtr
Definition: view.hxx:80
std::shared_ptr< ViewLayer > ViewLayerSharedPtr
Definition: viewlayer.hxx:168