diff options
Diffstat (limited to 'goodies/source/graphic/grfcache.hxx')
-rw-r--r-- | goodies/source/graphic/grfcache.hxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/goodies/source/graphic/grfcache.hxx b/goodies/source/graphic/grfcache.hxx index 508ec2e15206..3cc9eae8536a 100644 --- a/goodies/source/graphic/grfcache.hxx +++ b/goodies/source/graphic/grfcache.hxx @@ -2,9 +2,9 @@ * * $RCSfile: grfcache.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:30:16 $ + * last change: $Author: ka $ $Date: 2001-05-08 09:09:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,6 +64,7 @@ #include <tools/list.hxx> #include <vcl/graph.hxx> +#include <vcl/timer.hxx> #include "grfmgr.hxx" // ----------------------- @@ -77,8 +78,10 @@ class GraphicCache private: GraphicManager& mrMgr; + Timer maReleaseTimer; List maGraphicCache; List maDisplayCache; + ULONG mnReleaseTimeoutSeconds; ULONG mnMaxDisplaySize; ULONG mnMaxObjDisplaySize; ULONG mnUsedDisplaySize; @@ -86,6 +89,9 @@ private: BOOL ImplFreeDisplayCacheSpace( ULONG nSizeToFree ); GraphicCacheEntry* ImplGetCacheEntry( const GraphicObject& rObj ); + + DECL_LINK( ReleaseTimeoutHdl, Timer* pTimer ); + public: GraphicCache( GraphicManager& rMgr, @@ -115,6 +121,9 @@ public: ULONG GetUsedDisplayCacheSize() const { return mnUsedDisplaySize; } ULONG GetFreeDisplayCacheSize() const { return( mnMaxDisplaySize - mnUsedDisplaySize ); } + void SetCacheTimeout( ULONG nTimeoutSeconds ); + ULONG GetCacheTimeout() const { return mnReleaseTimeoutSeconds; } + void ClearDisplayCache(); BOOL IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) const; |