LCOV - code coverage report
Current view: top level - svx/inc/svx/sdr/overlay - overlaymanagerbuffered.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 1 100.0 %
Date: 2012-08-25 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef _SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX
      30                 :            : #define _SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX
      31                 :            : 
      32                 :            : #include <svx/sdr/overlay/overlaymanager.hxx>
      33                 :            : #include <basegfx/range/b2irange.hxx>
      34                 :            : #include <vcl/virdev.hxx>
      35                 :            : 
      36                 :            : //////////////////////////////////////////////////////////////////////////////
      37                 :            : 
      38                 :            : namespace sdr
      39                 :            : {
      40                 :            :     namespace overlay
      41                 :            :     {
      42                 :            :         class OverlayManagerBuffered : public OverlayManager
      43                 :            :         {
      44                 :            :         protected:
      45                 :            :             // The VirtualDevice for draw window content buffering, this
      46                 :            :             // is the view content without overlay
      47                 :            :             VirtualDevice                           maBufferDevice;
      48                 :            : 
      49                 :            :             // #i73602# The VirtualDevice for OverlayPaint buffering. This
      50                 :            :             // is an extra device to avoid flickering of overlay paints
      51                 :            :             VirtualDevice                           maOutputBufferDevice;
      52                 :            : 
      53                 :            :             // Timer for buffering
      54                 :            :             Timer                                   maBufferTimer;
      55                 :            : 
      56                 :            :             // Range for buffering (in pixel to be independent from mapMode)
      57                 :            :             basegfx::B2IRange                       maBufferRememberedRangePixel;
      58                 :            : 
      59                 :            :             // bitfield
      60                 :            :             // Flag to decide if PreRendering shall be used for overlay refreshes.
      61                 :            :             // Default is false.
      62                 :            :             unsigned                                mbRefreshWithPreRendering : 1;
      63                 :            : 
      64                 :            :             // link for timer
      65                 :            :             DECL_LINK(ImpBufferTimerHandler, AutoTimer*);
      66                 :            : 
      67                 :            :             // Internal methods for buffering
      68                 :            :             void ImpPrepareBufferDevice();
      69                 :            :             void ImpRestoreBackground() const ;
      70                 :            :             void ImpRestoreBackground(const Region& rRegionPixel) const;
      71                 :            :             void ImpSaveBackground(const Region& rRegion, OutputDevice* pPreRenderDevice = 0L);
      72                 :            : 
      73                 :            :             // when handing over another OverlayManager at construction, the OverlayObjects
      74                 :            :             // will be taken over from it. The new one will have added all OverlayObjects
      75                 :            :             // while the handed over one will have none
      76                 :            :             OverlayManagerBuffered(
      77                 :            :                 OutputDevice& rOutputDevice,
      78                 :            :                 OverlayManager* pOldOverlayManager,
      79                 :            :                 bool bRefreshWithPreRendering);
      80                 :            :             virtual ~OverlayManagerBuffered();
      81                 :            : 
      82                 :            :         public:
      83                 :            :             static rtl::Reference<OverlayManager> create(OutputDevice& rOutputDevice,
      84                 :            :                 OverlayManager* pOldOverlayManager = 0, bool bRefreshWithPreRendering = false);
      85                 :            : 
      86                 :            :             // complete redraw
      87                 :            :             virtual void completeRedraw(const Region& rRegion, OutputDevice* pPreRenderDevice = 0L) const;
      88                 :            : 
      89                 :            :             // flush. Do buffered updates.
      90                 :            :             virtual void flush();
      91                 :            : 
      92                 :            :             // #i68597# part of content gets copied, react on it
      93                 :            :             virtual void copyArea(const Point& rDestPt, const Point& rSrcPt, const Size& rSrcSize);
      94                 :            : 
      95                 :            :             // restore part of background. Implemented form buffered versions only.
      96                 :            :             virtual void restoreBackground(const Region& rRegion) const;
      97                 :            : 
      98                 :            :             // invalidate the given range at local OutputDevice
      99                 :            :             virtual void invalidateRange(const basegfx::B2DRange& rRange);
     100                 :            : 
     101                 :            :             // access to RefreshWithPreRendering Flag
     102                 :       1123 :             bool DoRefreshWithPreRendering() const { return mbRefreshWithPreRendering; }
     103                 :            :         };
     104                 :            :     } // end of namespace overlay
     105                 :            : } // end of namespace sdr
     106                 :            : 
     107                 :            : //////////////////////////////////////////////////////////////////////////////
     108                 :            : 
     109                 :            : #endif //_SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX
     110                 :            : 
     111                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10