InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDVOffscreenViewPortCache Class Referenceabstract

#include <IDVOffscreenViewPortCache.h>

Inheritance diagram for IDVOffscreenViewPortCache:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IDVOFFSCREENVIEWPORTCACHE }
 

Public Member Functions

virtual IDVOffscreenPortDataQueryBackgroundViewPort (IGraphicsContext *gc)=0
 
virtual IDVOffscreenPortDataQueryBackgroundViewPort (IControlView *view)=0
 
virtual IDVOffscreenPortDataQueryForegroundViewPort (IGraphicsContext *gc)=0
 
virtual IDVOffscreenPortDataQueryForegroundViewPort (IControlView *view)=0
 
virtual void SetContentControlView (IControlView *iControlView)=0
 
virtual IControlViewGetContentControlView () const =0
 
virtual int32 GetContentReferenceID () const =0
 
virtual void Purge (uint32 level)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Interface for the offscreen view port cache. Manages a cached pair of offscreen ports, one for the foreground, and another for the background. The purpose for these and their use by InDesign are described in the IOffscreenPortData interface.

See Also
IDVOffscreenPortData

Member Function Documentation

virtual IControlView* IDVOffscreenViewPortCache::GetContentControlView () const
pure virtual

Returns the layout control view that the content represents.

DO NOT USE the returned pointer as a valid control view. It is only an identifier.

Returns
the layout control view
virtual int32 IDVOffscreenViewPortCache::GetContentReferenceID () const
pure virtual

Gets the current reference ID. The reference ID increments every time someone sets the content control view.

Returns
the current reference ID
virtual void IDVOffscreenViewPortCache::Purge (uint32 level)
pure virtual

During low memory states our purge method will get called The platform offscreen cache will release its reference to the cache. The next call to QueryPlatformOffscreen will attempt to create a new one

Parameters
levelthe purge level
virtual IDVOffscreenPortData* IDVOffscreenViewPortCache::QueryBackgroundViewPort (IGraphicsContextgc)
pure virtual

Queries for the background viewport. If one doesn't exist it will be created.

nil indicates failure – most likely from low memory

Parameters
gcIGraphicsContext *
Returns
the cached background viewport's IOffscreenPortData
See Also
IDVOffscreenPortData
virtual IDVOffscreenPortData* IDVOffscreenViewPortCache::QueryBackgroundViewPort (IControlViewview)
pure virtual

Queries for the background viewport. If one doesn't exist it will be created.

nil indicates failure – most likely from low memory

Parameters
view.Used to determine the bounds and scale factor of the desired offscreen
Returns
the cached background viewport's IDVOffscreenPortData
See Also
IDVOffscreenPortData
virtual IDVOffscreenPortData* IDVOffscreenViewPortCache::QueryForegroundViewPort (IGraphicsContextgc)
pure virtual

Queries for the foreground viewport. If one doesn't exist it will be created.

nil indicates failure – most likely from low memory.

Special mode: if 'gc' is passed as nil, the function will simply return the present cached foreground port, if any. It will not create the port if it doesn't exist already; nil is returned in this case but does not indicate failure. This is useful when trying to determine the current state of the cache without affecting it.

Parameters
gcThe graphics context on which to base newly created port, or nil
Returns
the cached foreground viewport's IDVOffscreenPortData
See Also
IDVOffscreenPortData
virtual IDVOffscreenPortData* IDVOffscreenViewPortCache::QueryForegroundViewPort (IControlViewview)
pure virtual

Queries for the foreground viewport. If one doesn't exist it will be created.

nil indicates failure – most likely from low memory.

Parameters
view.Used to determine the bounds and scale factor of the desired offscreen
Returns
the cached foreground viewport's IOffscreenPortData
See Also
IDVOffscreenPortData
virtual void IDVOffscreenViewPortCache::SetContentControlView (IControlViewiControlView)
pure virtual

This tells the cache which controlview created the content in the offscreen. It also increments the reference ID. Users can check the controlview against the front view for content validity. Dynamic users can check the control view and reference ID. In dynamic situations the reference ID will change during autoscroll, view % changes, etc. The layout control view calls SetContentControlView every time the content changes, even if the control view pointer hasn't changed. This increments the reference ID which uniquely indicates a new content bitmap.

This call does not bump the ref count on the control view. It only uses the pointer as an ID and not as a real pointer.

Parameters
iControlViewThe content's control view