summaryrefslogtreecommitdiff
path: root/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx')
-rw-r--r--[-rwxr-xr-x]sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx61
1 files changed, 46 insertions, 15 deletions
diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
index 4a5c2b51ac28..bd2b542c5d87 100755..100644
--- a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
+++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
@@ -30,10 +30,10 @@
#include "cache/SlsCacheContext.hxx"
#include <sal/types.h>
-#include <vcl/bitmapex.hxx>
-#include <boost/function.hpp>
+#include <tools/gen.hxx>
#include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
+#include <vcl/bitmap.hxx>
+
namespace sd { namespace slidesorter { namespace view {
class PageObjectViewObjectContact;
@@ -87,37 +87,68 @@ public:
*/
PageCache (
const Size& rPreviewSize,
+ const bool bDoSuperSampling,
const SharedCacheContext& rpCacheContext);
~PageCache (void);
- void ChangeSize(const Size& rPreviewSize);
+ void ChangeSize(
+ const Size& rPreviewSize,
+ const bool bDoSuperSampling);
/** Request a preview bitmap for the specified page object in the
specified size. The returned bitmap may be a preview of the
preview, i.e. either a scaled (up or down) version of a previous
preview (of the wrong size) or an empty bitmap. In this case a
request for the generation of a new preview is created and inserted
- into the request queue. When the preview is available the page
- shape will be told to paint itself again. When it then calls this
- method again if receives the correctly sized preview bitmap.
+ into the request queue. When the preview is available in the right
+ size the page shape will be told to paint itself again. When it
+ then calls this method again if receives the correctly sized preview
+ bitmap.
@param rRequestData
This data is used to determine the preview.
- @param rSize
- The size of the requested preview bitmap.
+ @param bResize
+ When <TRUE/> then when the available bitmap has not the
+ requested size, it is scaled before it is returned. When
+ <FALSE/> then the bitmap is returned in the wrong size and it is
+ the task of the caller to scale it.
@return
Returns a bitmap that is either empty, contains a scaled (up or
down) version or is the requested bitmap.
*/
- BitmapEx GetPreviewBitmap (
- CacheKey aKey,
- const Size& rSize);
+ Bitmap GetPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize);
+
+ Bitmap GetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize);
+ void SetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const Bitmap& rBitmap);
+
+ /** When the requested preview bitmap does not yet exist or is not
+ up-to-date then the rendering of one is scheduled. Otherwise this
+ method does nothing.
+ */
+ void RequestPreviewBitmap (const CacheKey aKey);
+
+ /** Tell the cache that the bitmap associated with the given request
+ data is not up-to-date anymore. This will invalidate all previews
+ in other caches that represent the same page as well.
+ @param bRequestPreview
+ When <TRUE/> then a new preview is requested and will lead
+ eventually to a repaint of the associated page object.
+ */
+ void InvalidatePreviewBitmap (
+ const CacheKey aKey,
+ const bool bRequestPreview);
/** Call this method when a view-object-contact object is being deleted
and does not need (a) its current bitmap in the cache and (b) a
requested new bitmap.
*/
- void ReleasePreviewBitmap (CacheKey aKey);
+ void ReleasePreviewBitmap (const CacheKey aKey);
/** Call this method when all preview bitmaps have to be generated anew.
This is the case when the size of the page objects on the screen has
@@ -127,14 +158,14 @@ public:
are created. When it is <FALSE/> the existing previews are only
marked as not being up-to-date anymore.
*/
- void InvalidateCache (bool bUpdateCache = true);
+ void InvalidateCache (const bool bUpdateCache = true);
/** With the precious flag you can control whether a bitmap can be
removed or reduced in size to make room for other bitmaps or is so
precious that it will not touched. A typical use is to set the
precious flag for exactly the visible pages.
*/
- void SetPreciousFlag (CacheKey aKey, bool bIsPrecious);
+ void SetPreciousFlag (const CacheKey aKey, const bool bIsPrecious);
void Pause (void);
void Resume (void);