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

#include <ITextOffscreen.h>

Inheritance diagram for ITextOffscreen:
IPMUnknown

Public Member Functions

virtual bool16 CreateOffscreen (IPMUnknown *pShape, IGraphicsContext *gc)=0
 
virtual bool16 Draw (IPMUnknown *pShape, IGraphicsContext *gc)=0
 
virtual bool16 IsSupported (const IPMUnknown *pShape) const =0
 
virtual bool16 Clear (const IPMUnknown *pShape=0)=0
 
virtual void Enable (bool16 bOn=kTrue)=0
 
virtual bool16 IsEnabled () const =0
 
virtual void SetLowMemory (bool16 bOn=kTrue)=0
 
virtual bool16 IsLowMemory () const =0
 
virtual void SetTypingMode (bool16 bOn=kTrue)=0
 
virtual bool16 IsInTypingMode () const =0
 
virtual bool16 IsInDrawingMode () const =0
 
virtual bool16 HasPendingInvals () const =0
 
virtual IPMUnknownGetTargetTextFrame () const =0
 
virtual bool16 Draw (IPMUnknown *pShape, IGraphicsContext *gc, dvaui::drawbot::Drawbot *drawbotP)=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

ITextOffscreen is a class which is used to quickly process IPendingInvals on the text model. The idea is that when a text frame has focus and the user is typing, we want to draw the text frontmost and quickly update the view without going through the typical OS level invalidation followed by the processing of a paint/update message from the OS.

Member Function Documentation

virtual bool16 ITextOffscreen::Clear (const IPMUnknownpShape = 0)
pure virtual

Called by the TextEditor and the TextOffscreenObserver if the offscreen needs to be recalculated.

Parameters
pShape- IN: the text frame (kFrameItemBoss).
Returns
kTrue if this shape is currently supported. If pShape is nil it will clear all sprites.
virtual bool16 ITextOffscreen::CreateOffscreen (IPMUnknownpShape,
IGraphicsContextgc 
)
pure virtual

Initializes the text offscreen for the given text frame (kFrameItemBoss).

Parameters
pShape- IN: Pointer to the text frame with focus (kFrameItemBoss).
gc- IN: Pointer to the graphics context (the view/window that we are drawing to).
Returns
kFalse if it was not possible to create the offscreen or if the pShape does not have typing focus. If CreateOffscreen is successful, kTrue is returned. If the textoffscreen has already been initialized with the given pShape, then this method is a no-op and kTrue is returned.
virtual bool16 ITextOffscreen::Draw (IPMUnknownpShape,
IGraphicsContextgc 
)
pure virtual

Draw causes an update to occur for the text frame to the provided graphics context.

Parameters
pShape- IN: the text frame (kFrameItemBoss).
gc- IN: Pointer to the graphics context (the view/window that we are drawing to).
Returns
kTrue if the draw occurred successfully, kFalse otherwise.
virtual bool16 ITextOffscreen::Draw (IPMUnknownpShape,
IGraphicsContextgc,
dvaui::drawbot::Drawbot * drawbotP 
)
pure virtual

INTERNAL USE ONLY

Draw causes an update to occur for the text frame to the provided graphics context.

Parameters
pShape- IN: the text frame (kFrameItemBoss).
gc- IN: Pointer to the graphics context (the view/window that we are drawing to).
drawbotP- IN: The destination drawbot to draw to. Used when drawing from the view's DV_Draw.
Returns
kTrue if the draw occurred successfully, kFalse otherwise.
virtual void ITextOffscreen::Enable (bool16 bOn = kTrue)
pure virtual

Enables/Disables the text offscreen.

Parameters
bOn- IN: if kTrue, then enable text offscreening, otherwise disable.
virtual IPMUnknown* ITextOffscreen::GetTargetTextFrame () const
pure virtual
Returns
Returns a pointer to the text frame for which this offscreen is setup. Nil if the offscreen is not set up. You should be able to query for the ITextFrameColumn using the returned pointer.
virtual bool16 ITextOffscreen::HasPendingInvals () const
pure virtual
Returns
Returns true if we are typing, this offscreen is active for the frame that has focus and the frame has invals pending.
virtual bool16 ITextOffscreen::IsEnabled () const
pure virtual
Returns
Returns the current Enabled state of the text offscreen.
virtual bool16 ITextOffscreen::IsInDrawingMode () const
pure virtual
Returns
Returns whether it is currently drawing
virtual bool16 ITextOffscreen::IsInTypingMode () const
pure virtual
Returns
Returns the current typing mode state.
virtual bool16 ITextOffscreen::IsLowMemory () const
pure virtual
Returns
Returns the low memory state.
virtual bool16 ITextOffscreen::IsSupported (const IPMUnknownpShape) const
pure virtual

IsSupported is used to determine if the text offscreen is active for the given pShape.

Parameters
pShape- IN: the text frame (kFrameItemBoss).
Returns
kTrue if the textoffscreen is active for the given pShape.
virtual void ITextOffscreen::SetLowMemory (bool16 bOn = kTrue)
pure virtual

Set by the TextOffscreenSprite if it was not able to create a sprite. Low memory mode for sprites typically means that the drawing will be in XOr mode instead of using offscreens.

Parameters
bOn- IN: kTrue if in low memory mode.
virtual void ITextOffscreen::SetTypingMode (bool16 bOn = kTrue)
pure virtual

Set the typing mode. Set by the TextEditor on GetFocus/LoseFocus()

Parameters
bOn- IN: kTrue if we are in typing mode.