InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
VOS_Cursor Class Reference

#include <VOSCursor.h>

Inheritance diagram for VOS_Cursor:
VOS_SimpleCursor

Public Member Functions

 VOS_Cursor (IVOSCache *cache)
 
 VOS_Cursor (IVOSCache *cache, IVOSDiskPage *block, int32 offset)
 
 VOS_Cursor (const VOS_SimpleCursor &cursor)
 
VOS_Cursor GetPrevious (bool16 *found=nil) const
 
VOS_Cursor GetNext (bool16 *found=nil) const
 
void AppendAfter (VOS_Object *object, bool16 duplicate=kTrue)
 
void AppendAfterAndMove (VOS_Object *object, bool16 duplicate=kTrue)
 
void InsertBefore (VOS_Object *object, bool16 duplicate=kTrue)
 
void ReplaceObjectWith (VOS_Object *obj, bool16 duplicate=kTrue)
 
- Public Member Functions inherited from VOS_SimpleCursor
 VOS_SimpleCursor (IPMUnknown *cache)
 
 VOS_SimpleCursor (IPMUnknown *cache, IVOSDiskPage *block, int32 offset)
 
 VOS_SimpleCursor (const VOS_SimpleCursor &other)
 
VOS_SimpleCursoroperator= (const VOS_SimpleCursor &other)
 
VOS_SimpleCursor GetPreviousSimple (bool16 *prevExists=nil) const
 
VOS_SimpleCursor GetNextSimple (bool16 *nextExists=nil) const
 
bool16 MoveToNext ()
 
bool16 MoveToPrevious ()
 
bool16 AtBeginning () const
 
bool16 AtEnd () const
 
int32 LocalOffset () const
 
void IncrementOffset (int32 delta)
 
void SetOffset (int32 off)
 
int32 ObjectLength () const
 
void DirtyObject ()
 
VOS_ObjectQueryObject ()
 
bool16 IsEmpty () const
 
bool16 RemoveObject (bool16 deleteIt=kTrue)
 
void RemoveObjects (int32 *pLen2Del, VOS_SavedData *data)
 
void CopyObjects (int32 *pLen2Copy, VOS_SavedData *copyInto=nil)
 
void Rationalize ()
 
void Clear ()
 
IPMUnknownQueryOwningObject ()
 

Additional Inherited Members

- Static Public Member Functions inherited from VOS_SimpleCursor
static void ReleaseObject (VOS_Object *obj)
 
- Protected Member Functions inherited from VOS_SimpleCursor
void AddUndoObject (bool16 front, VOS_SavedData *undo, bool16 *nextExists, int32 len2Del)
 
void CopyObject (bool16 front, VOS_SavedData *copy, bool16 *nextExists, int32 len2Copy)
 
void CopyPageRef (VOS_SavedData *copy, bool16 *unused, int32 len2Copy)
 
- Protected Attributes inherited from VOS_SimpleCursor
IPMUnknownfOwner
 
VOS_ObjectfObject
 
int32 fObjOffset
 

Detailed Description

Like VOS_SimpleCursor, VOS_Cursor is basically an iterator used to iterate over text model strands. A VOS_Cursor is returned from IVOSCache::Locate(). The returned object must be deleted. The iterator points to an object (VOS_Object) and has an internal offset into that object. A particular run of characters could be contained within one VOS_Object and the exact position would be specified by the local offset. A VOS_Cursor allows more editing of the "container" than the VOS_SimpleCursor does. This is not meant to be directly constructed, but only retrieved from the IVOSCache interface of the strand. NOTE: This is not derived from IPMUnknown.

See Also
ITextModel
IVOSCache
VOS_Object
VOS_SimpleCursor

Member Function Documentation

void VOS_Cursor::AppendAfter (VOS_Objectobject,
bool16 duplicate = kTrue 
)

Append a new VOS_Object into the data structure after the position that this cursor is pointing to.

Parameters
objectis the new object to place into the container. It is appended after "this". indicates whether to use the object directly, or make a copy.
void VOS_Cursor::AppendAfterAndMove (VOS_Objectobject,
bool16 duplicate = kTrue 
)

Append a new VOS_Object into the data structure after the position that this cursor is pointing to and also reposition the cursor to point to the new object.

Parameters
objectis the new object to place into the container. It is appended after "this". indicates whether to use the object directly, or make a copy.
VOS_Cursor VOS_Cursor::GetNext (bool16 * found = nil) const

Get a cursor pointing to the next object. If there is no next object, the cursor is left in place, but "found" is set to false.

Parameters
foundis kTrue when the new cursor was positioned after this one.
Returns
a new VOS_Cursor.
VOS_Cursor VOS_Cursor::GetPrevious (bool16 * found = nil) const

Get a cursor pointing to the previous object. If there is no previous object, the cursor is left in place, but "found" is set to false.

Parameters
foundis kTrue when the new cursor was positioned before this one.
Returns
a new VOS_Cursor.
void VOS_Cursor::InsertBefore (VOS_Objectobject,
bool16 duplicate = kTrue 
)

Insert a new VOS_Object into the data structure before the position that this cursor is pointing to.

Parameters
objectis the new object to place into the container. It is inserted before "this". indicates whether to use the object directly, or make a copy.
void VOS_Cursor::ReplaceObjectWith (VOS_Objectobj,
bool16 duplicate = kTrue 
)

Replace the VOS_Object pointed to with the new one that is passed in.

Parameters
objectis the new object to place into the container. It replaces the object currently pointed to. indicates whether to use the object directly, or make a copy.