LibreOffice Module canvas (master) 1
spritesurface.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#pragma once
21
22#include <base/sprite.hxx>
23
24namespace canvas
25{
26 /* Definition of the SpriteSurface interface */
27
35 class SpriteSurface : public css::uno::XInterface
36 {
37 public:
38 typedef ::rtl::Reference< SpriteSurface > Reference;
39
41 virtual void showSprite( const Sprite::Reference& rSprite ) = 0;
42
44 virtual void hideSprite( const Sprite::Reference& rSprite ) = 0;
45
47 virtual void moveSprite( const Sprite::Reference& rSprite,
48 const ::basegfx::B2DPoint& rOldPos,
49 const ::basegfx::B2DPoint& rNewPos,
50 const ::basegfx::B2DVector& rSpriteSize ) = 0;
51
58 virtual void updateSprite( const Sprite::Reference& rSprite,
59 const ::basegfx::B2DPoint& rPos,
60 const ::basegfx::B2DRange& rUpdateArea ) = 0;
61
62 protected:
64 };
65}
66
67/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Canvas surface containing sprites.
virtual void showSprite(const Sprite::Reference &rSprite)=0
Sprites should call this from XSprite::show()
virtual void hideSprite(const Sprite::Reference &rSprite)=0
Sprites should call this from XSprite::hide()
virtual void updateSprite(const Sprite::Reference &rSprite, const ::basegfx::B2DPoint &rPos, const ::basegfx::B2DRange &rUpdateArea)=0
Sprites should call this when some part of the content has changed.
::rtl::Reference< SpriteSurface > Reference
virtual void moveSprite(const Sprite::Reference &rSprite, const ::basegfx::B2DPoint &rOldPos, const ::basegfx::B2DPoint &rNewPos, const ::basegfx::B2DVector &rSpriteSize)=0
Sprites should call this from XSprite::move()