### ITextStyleRunIterator

  A convenience class for walking through the style runs in an IText (i.e., the ranges over which the styles are consistent). The user can specify a propagation type, in which case he will iterate across the ranges over which the styles of the specified propagation type are consistent (regardless of what the other styles are doing). An unstyled IText is considered to have a single style run with an empty style set.

  Do not derive your own classes from this class.

### ITextStyleRunIterator - Member Functions and Data by Group

### Constructors & Destructor

Use these methods to create and destroy style run iterators.

~ITextStyleRunIterator

      public:
      ~ITextStyleRunIterator()

  This method deletes a style run iterator.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

ITextStyleRunIterator
  This method creates a style run iterator.

  Overload 1

      public:
      ITextStyleRunIterator(const ITextStyleRunIterator& that)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      public:
      ITextStyleRunIterator( const IText& theIText,
                             ITextStyle::EStylePropagation propagation = ITextStyle::kMaximumPropagation )

  Initializes the iterator to refer to the first style run in "theIText."

  theIText
    the IText whose style runs we want to examine
  propagation
    the propagation type we want to match. Only styles of the specified propagation type are considered in determining run lengths and positions. kMaximumPropagation causes the iterator to consider styles of all propagation types.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Accessing Style Runs

Use these methods to iterate over and get information about style runs.

end
  Returns an invalid iterator.

      public:
      static const ITextStyleRunIterator end()

  An iterator can be compared against the one returned by this function to test for loop termination

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator *

      public:
      const ITextStyleSet& operator *() const

  Returns a reference to the style set belonging to the current style run.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator ++
  Increments to the next run.

  Overload 1
  Advances the iterator to the next style run in the IText.

      public:
      ITextStyleRunIterator operator ++(int)

Return
  a copy of *this from before it was advanced

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2
  Advances the iterator to the next style run in the IText.

      public:
      ITextStyleRunIterator& operator ++()

Return
  *thi

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator --
  Decrements to the previous run.

  Overload 1
  Advances the iterator to the previous style run in the IText.

      public:
      ITextStyleRunIterator& operator --()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2
  Advances the iterator to the previous style run in the IText.

      public:
      ITextStyleRunIterator operator --(int)

Return
  a copy of *this from before it was advanced

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator ->

      public:
      const ITextStyleSet* operator ->() const

  Allows direct access to the members of the style set belonging to the curent style run.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator bool
  Returns true when the iterator is no longer valid.

      public:
      operator bool() const

  The iterator goes invalid when it is advanced off of either end of the IText's style run array. This operator can be used to test for loop termination.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

runLength
  Returns the number of characters in the current style run.

      public:
      length_type runLength() const

  Returns the length of the run.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

runStart
  Returns the character offset of the first character in the current style run.

      public:
      offset_type runStart() const

  Returns the start of the run.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setCharacterOffset

      public:
      void setCharacterOffset(offset_type charOffset)

  Sets the iterator to point to the style run containing the given character offset.

Exception

  IInvalidParameter | if charOffset is greater than the length of the IText being examined

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setPropagation
  Sets the iterator to examine only styles of the given propagation type.

      public:
      void
        setPropagation( ITextStyle::EStylePropagation propagation )

  (Because there is no way to map style-run positions and lengths from one propagation type to another, this also resets the iterator to point to the first style run in the IText (according to the new propagation type).)

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setText

      public:
      void setText(const IText& theText)

  Sets the iterator to point to the first style run in the specified IText.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Comparing Style Runs

Use these methods to compare style run iterators.

operator !=

      public:
      bool operator !=(const ITextStyleRunIterator& that) const

  This method returns true if the iterators are unequal.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator ==

      public:
      bool operator ==(const ITextStyleRunIterator& that) const

  This method returns true if the iterators are equal.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### ITextStyleRunIterator - Type Definitions

offset_type

      typedef size_t offset_type

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

length_type

      typedef size_t length_type

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### ITextStyleRunIterator - Inherited Member Functions and Data

#### Inherited Public Functions

  - None

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None