LCOV - code coverage report
Current view: top level - include/canvas/base - spritesurface.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 2 0.0 %
Date: 2014-04-14 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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_CANVAS_BASE_SPRITESURFACE_HXX
      21             : #define INCLUDED_CANVAS_BASE_SPRITESURFACE_HXX
      22             : 
      23             : #include <canvas/base/sprite.hxx>
      24             : 
      25             : namespace canvas
      26             : {
      27             :     /* Definition of the SpriteSurface interface */
      28             : 
      29             :     /** Canvas surface containing sprites
      30             : 
      31             :         Every canvas surface that contains sprites must implement this
      32             :         interface, when employing the canvas base framework. The
      33             :         methods provided here are used from the individual sprites to
      34             :         notify the canvas about necessary screen updates.
      35             :      */
      36           0 :     class SpriteSurface : public ::com::sun::star::uno::XInterface
      37             :     {
      38             :     public:
      39             :         typedef ::rtl::Reference< SpriteSurface > Reference;
      40             : 
      41             :         /// Sprites should call this from XSprite::show()
      42             :         virtual void showSprite( const Sprite::Reference& rSprite ) = 0;
      43             : 
      44             :         /// Sprites should call this from XSprite::hide()
      45             :         virtual void hideSprite( const Sprite::Reference& rSprite ) = 0;
      46             : 
      47             :         /// Sprites should call this from XSprite::move()
      48             :         virtual void moveSprite( const Sprite::Reference&       rSprite,
      49             :                                  const ::basegfx::B2DPoint&     rOldPos,
      50             :                                  const ::basegfx::B2DPoint&     rNewPos,
      51             :                                  const ::basegfx::B2DVector&    rSpriteSize ) = 0;
      52             : 
      53             :         /** Sprites should call this when some part of the content has
      54             :             changed.
      55             : 
      56             :             That includes show/hide, i.e. for show, both showSprite()
      57             :             and updateSprite() must be called.
      58             :         */
      59             :         virtual void updateSprite( const Sprite::Reference&     rSprite,
      60             :                                    const ::basegfx::B2DPoint&   rPos,
      61             :                                    const ::basegfx::B2DRange&   rUpdateArea ) = 0;
      62             : 
      63             :     protected:
      64           0 :         ~SpriteSurface() {}
      65             :     };
      66             : }
      67             : 
      68             : #endif // INCLUDED_CANVAS_BASE_SPRITESURFACE_HXX
      69             : 
      70             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10