tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / canvas / inc / base / spritesurface.hxx
blobe49c82699c8421f27e0adbfa10c255835bc341f8
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 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include <base/sprite.hxx>
24 namespace canvas
26 /* Definition of the SpriteSurface interface */
28 /** Canvas surface containing sprites
30 Every canvas surface that contains sprites must implement this
31 interface, when employing the canvas base framework. The
32 methods provided here are used from the individual sprites to
33 notify the canvas about necessary screen updates.
35 class SpriteSurface : public css::uno::XInterface
37 public:
38 typedef ::rtl::Reference< SpriteSurface > Reference;
40 /// Sprites should call this from XSprite::show()
41 virtual void showSprite( const Sprite::Reference& rSprite ) = 0;
43 /// Sprites should call this from XSprite::hide()
44 virtual void hideSprite( const Sprite::Reference& rSprite ) = 0;
46 /// Sprites should call this from XSprite::move()
47 virtual void moveSprite( const Sprite::Reference& rSprite,
48 const ::basegfx::B2DPoint& rOldPos,
49 const ::basegfx::B2DPoint& rNewPos,
50 const ::basegfx::B2DVector& rSpriteSize ) = 0;
52 /** Sprites should call this when some part of the content has
53 changed.
55 That includes show/hide, i.e. for show, both showSprite()
56 and updateSprite() must be called.
58 virtual void updateSprite( const Sprite::Reference& rSprite,
59 const ::basegfx::B2DPoint& rPos,
60 const ::basegfx::B2DRange& rUpdateArea ) = 0;
62 protected:
63 ~SpriteSurface() {}
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */