Adobe.com
Contents Suites Classes Class Index Member Index

ATE::ITextRunsIterator Class Reference

This object allows you to iterate through a set of text runs in a story. More...

#include <IText.h>

List of all members.

Public Member Functions

 ITextRunsIterator ()
 Constructor.
 ITextRunsIterator (const ITextRunsIterator &src)
 Copy constructor.
ITextRunsIteratoroperator= (const ITextRunsIterator &rhs)
 Assignment operator.
bool operator== (const ITextRunsIterator &rhs) const
 Comparison operator tests for equality.
bool operator!= (const ITextRunsIterator &rhs) const
 Comparison operator tests for inequality.
 ITextRunsIterator (TextRunsIteratorRef textrunsiterator)
 Constructs this C++ object from the corresponding C object returned by an ATE suite function.
virtual ~ITextRunsIterator ()
 Destructor.
TextRunsIteratorRef GetRef () const
 Retrieves a reference to this object.
bool IsNull () const
 Reports whether this is a null object.
 ITextRunsIterator (const ITextRanges &ranges, Direction direction=kForward)
 Constructor.
bool IsNotDone () const
 Reports whether the end of the set has been reached.
bool IsDone () const
 Reports whether the end of the set has been reached.
bool IsEmpty () const
 Reports whether the set is empty.
void MoveToFirst ()
 Sets the current position to the first member of this set.
void MoveToLast ()
 Sets the current position to the last member of this set.
void Next ()
 Increments the current position in the set in the iterator's current direction.
ITextRange Item () const
 Retrieves the text range containing the current text run.

Detailed Description

This object allows you to iterate through a set of text runs in a story.

A text run is a range of text whose characters all share the same set of attributes. If the text of the story changes through insertions or deletions, an existing text run iterator is rendered invalid.

Create a text run iterator object using ITextRange::GetTextRunsIterator(), or the corresponding method in ITextRanges, IStory, IStories, or IGlyphs.


Constructor & Destructor Documentation

ATE::ITextRunsIterator::ITextRunsIterator (  ) 

Constructor.

Returns:
The new object.
ATE::ITextRunsIterator::ITextRunsIterator ( const ITextRunsIterator src  ) 

Copy constructor.

Parameters:
src The object to copy.
Returns:
The new object.

References ATE::sTextRunsIterator.

ATE::ITextRunsIterator::ITextRunsIterator ( TextRunsIteratorRef  textrunsiterator  )  [explicit]

Constructs this C++ object from the corresponding C object returned by an ATE suite function.

The C++ object manages reference counting.

Parameters:
textrunsiterator The C object.
Returns:
The new C++ object.
ATE::ITextRunsIterator::~ITextRunsIterator (  )  [virtual]

Destructor.

References ATE::sTextRunsIterator.

ATE::ITextRunsIterator::ITextRunsIterator ( const ITextRanges ranges,
Direction  direction = kForward 
)

Constructor.

Creates an iterator object for a the text runs in a specific text range set that is ordered first-to-last or last-to-first.

Parameters:
ranges The text range set object.
direction Optional. The order of iteration. Default is first-to-last.
Returns:
The new iterator object.

References ATE::ITextRanges::GetRef(), ATE::sTextRunsIterator, and ATE::Throw_ATE_Exception().


Member Function Documentation

TextRunsIteratorRef ATE::ITextRunsIterator::GetRef (  )  const

Retrieves a reference to this object.

Returns:
The object reference.
bool ATE::ITextRunsIterator::IsDone (  )  const

Reports whether the end of the set has been reached.

Returns:
True if no more members remain in the set.

References ATE::sTextRunsIterator, and ATE::Throw_ATE_Exception().

bool ATE::ITextRunsIterator::IsEmpty (  )  const

Reports whether the set is empty.

Returns:
True if the set is empty.

References ATE::sTextRunsIterator, and ATE::Throw_ATE_Exception().

bool ATE::ITextRunsIterator::IsNotDone (  )  const

Reports whether the end of the set has been reached.

Returns:
True if more members remain in the set.

References ATE::sTextRunsIterator, and ATE::Throw_ATE_Exception().

bool ATE::ITextRunsIterator::IsNull (  )  const

Reports whether this is a null object.

Returns:
True if this is a null object.

References ATE::sTextRunsIterator.

ITextRange ATE::ITextRunsIterator::Item (  )  const

Retrieves the text range containing the current text run.

Returns:
The text range object.
Note:
This can change from one call to the next if the story text changes. For foward iteration, the new text run begins at or before the old one. For backward iteration, the new text run begins at or after the old one.

References ATE::sTextRunsIterator, and ATE::Throw_ATE_Exception().

void ATE::ITextRunsIterator::MoveToFirst (  ) 

Sets the current position to the first member of this set.

Returns:
Nothing.

References ATE::sTextRunsIterator, and ATE::Throw_ATE_Exception().

void ATE::ITextRunsIterator::MoveToLast (  ) 

Sets the current position to the last member of this set.

Returns:
Nothing.

References ATE::sTextRunsIterator, and ATE::Throw_ATE_Exception().

void ATE::ITextRunsIterator::Next (  ) 

Increments the current position in the set in the iterator's current direction.

Returns:
Nothing.

References ATE::sTextRunsIterator, and ATE::Throw_ATE_Exception().

bool ATE::ITextRunsIterator::operator!= ( const ITextRunsIterator rhs  )  const

Comparison operator tests for inequality.

Parameters:
rhs The object to compare to this one.
Returns:
True if the two objects are not the same.
ITextRunsIterator & ATE::ITextRunsIterator::operator= ( const ITextRunsIterator rhs  ) 

Assignment operator.

Parameters:
rhs The object to assign to this one.
Returns:
A reference to this object.

References ATE::sTextRunsIterator.

bool ATE::ITextRunsIterator::operator== ( const ITextRunsIterator rhs  )  const

Comparison operator tests for equality.

Parameters:
rhs The object to compare to this one.
Returns:
True if the two objects are the same.

The documentation for this class was generated from the following files:


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2016 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks