Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# Xfc::Pango::ScriptIter Class Reference

A PangoScriptIter C++ wrapper class. More...

`#include <xfc/pango/script.hh>`

List of all members.

## Public Member Functions

Constructors

- ScriptIter (const char *text, int length=-1)
    Construct a new script iterator, used to break a string of Unicode into runs by text.
- ScriptIter (const String &text)
    Construct a new script iterator, used to break a string of Unicode into runs by text.
- ~ScriptIter ()
    Destructor.

Accessors

- PangoScriptIter * pango_script_iter () const
    Get a pointer to the PangoScriptIter structure.
- operator PangoScriptIter * () const
    Conversion operator; safely converts a ScriptIter to a PangoScriptIter pointer.
- Script get_range (const char **start, const char **end)
    Gets information about the range to which the iterator currently points.
- Script get_range (String *range=0)
    Gets information about the range to which the iterator currently points.

Methods

- bool next ()
    Advances a script iterator to the next range.

## Detailed Description

A PangoScriptIter C++ wrapper class.

ScriptIter is used to iterate through a string and identify ranges in different scripts.

## Constructor & Destructor Documentation

Xfc::Pango::ScriptIter::ScriptIter | ( | const char * | text,
|  | int | length = `-1`
| ) | `[explicit]`

Construct a new script iterator, used to break a string of Unicode into runs by text.

Parameters:

  | text | A UTF-8 string.
  | length | The length of text, or -1 if text is null-terminated.

No copy is made of text, so the caller needs to make sure it remains valid until the iterator is destroyed. The newly created script iterator, initialized to point at the first range in the text. If the string is empty, it will point at an empty range.

Xfc::Pango::ScriptIter::ScriptIter | ( | const String & | text | ) | `[explicit]`

Construct a new script iterator, used to break a string of Unicode into runs by text.

Parameters:

  | text | A String.

No copy is made of text, so the caller needs to make sure it remains valid until the iterator is destroyed. The newly created script iterator, initialized to point at the first range in the text. If the string is empty, it will point at an empty range.

## Member Function Documentation

Script Xfc::Pango::ScriptIter::get_range | ( | String * | range = `0` | ) |

Gets information about the range to which the iterator currently points.

Parameters:

  | range | The location to store the characters of the range, or null.

Returns:
  The script for range.

Script Xfc::Pango::ScriptIter::get_range | ( | const char ** | start,
|  | const char ** | end
| ) |

Gets information about the range to which the iterator currently points.

Parameters:

  | start | The location to store the start position of the range, or null.
  | end | The location to store end position of the range, or null.

Returns:
  The script for range.

The range is the set of locations p where *start <= p < *end. (That is, it doesn't include the character stored at *end).

bool Xfc::Pango::ScriptIter::next | ( |  | ) |

Advances a script iterator to the next range.

Returns:
  true if the iter was succesfully advanced.

If the iter is already at the end, it is left unchanged and false is returned.

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

- script.hh

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3