![]() | InDesign SDK 20.5 |
#include <IDVOffscreenViewPortCache.h>

Public Types | |
| enum | { kDefaultIID = IID_IDVOFFSCREENVIEWPORTCACHE } |
Public Member Functions | |
| virtual IDVOffscreenPortData * | QueryBackgroundViewPort (IGraphicsContext *gc)=0 |
| virtual IDVOffscreenPortData * | QueryBackgroundViewPort (IControlView *view)=0 |
| virtual IDVOffscreenPortData * | QueryForegroundViewPort (IGraphicsContext *gc)=0 |
| virtual IDVOffscreenPortData * | QueryForegroundViewPort (IControlView *view)=0 |
| virtual void | SetContentControlView (IControlView *iControlView)=0 |
| virtual IControlView * | GetContentControlView () const =0 |
| virtual int32 | GetContentReferenceID () const =0 |
| virtual void | Purge (uint32 level)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
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.
| 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.
| pure virtual |
Gets the current reference ID. The reference ID increments every time someone sets the content control view.
| 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
| level | the purge level |
| pure virtual |
Queries for the background viewport. If one doesn't exist it will be created.
nil indicates failure – most likely from low memory
| gc | IGraphicsContext * |
| pure virtual |
Queries for the background viewport. If one doesn't exist it will be created.
nil indicates failure – most likely from low memory
| view. | Used to determine the bounds and scale factor of the desired offscreen |
| 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.
| gc | The graphics context on which to base newly created port, or nil |
| pure virtual |
Queries for the foreground viewport. If one doesn't exist it will be created.
nil indicates failure – most likely from low memory.
| view. | Used to determine the bounds and scale factor of the desired offscreen |
| 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.
| iControlView | The content's control view |