Logo Search packages:      
Sourcecode: inkscape version File versions

Inkscape::Text::Layout::iterator Class Reference

#include <Layout-TNG.h>

List of all members.


Detailed Description

Holds a position within the glyph output of Layout.

Used to access the output of a Layout, query information and generally move around in it. See Layout for a glossary of the names of functions.

I'm not going to document all the methods because most of their names make their function self-evident.

A lot of the functions would do the same thing in a naive implementation for latin-only text, for example nextCharacter(), nextCursorPosition() and cursorRight(). Generally it's fairly obvious which one you should use in a given situation, but sometimes you might need to put some thought in to it.

All the methods return false if the requested action would have caused the current position to move out of bounds. In this case the position is moved to either begin() or end(), depending on which direction you were going.

Note that some characters do not have a glyph representation (eg line breaks), so if you try using prev/nextGlyph() from one of these you're heading for a crash.

Definition at line 796 of file Layout-TNG.h.


Public Member Functions

bool cursorDown ()
bool cursorDownWithControl ()
bool cursorLeft ()
bool cursorLeftWithControl ()
bool cursorRight ()
bool cursorRightWithControl ()
bool cursorUp ()
bool cursorUpWithControl ()
bool nextCharacter ()
bool nextCursorPosition ()
bool nextEndOfSentence ()
bool nextEndOfWord ()
bool nextGlyph ()
bool nextLineCursor ()
bool nextStartOfChunk ()
bool nextStartOfLine ()
bool nextStartOfParagraph ()
bool nextStartOfSentence ()
bool nextStartOfShape ()
bool nextStartOfSource ()
bool nextStartOfSpan ()
bool nextStartOfWord ()
bool operator!= (iterator const &other) const
bool operator< (iterator const &other) const
bool operator<= (iterator const &other) const
bool operator== (iterator const &other) const
bool operator> (iterator const &other) const
bool operator>= (iterator const &other) const
bool prevCharacter ()
bool prevCursorPosition ()
bool prevEndOfSentence ()
bool prevEndOfWord ()
bool prevGlyph ()
bool prevLineCursor ()
bool prevStartOfChunk ()
bool prevStartOfLine ()
bool prevStartOfParagraph ()
bool prevStartOfSentence ()
bool prevStartOfShape ()
bool prevStartOfSource ()
bool prevStartOfSpan ()
bool prevStartOfWord ()
bool thisEndOfLine ()
bool thisStartOfChunk ()
bool thisStartOfLine ()
bool thisStartOfParagraph ()
bool thisStartOfShape ()
bool thisStartOfSource ()
bool thisStartOfSpan ()

Private Member Functions

bool _cursorLeftOrRightLocalX (Direction direction)
 stores the current x coordinate so that the cursor won't drift. See _x_coordinate
bool _cursorLeftOrRightLocalXByWord (Direction direction)
void beginCursorUpDown ()
 iterator (Layout const *p, unsigned c)
 iterator (Layout const *p, unsigned c, int g)

Private Attributes

unsigned _char_index
 index into Layout::glyphs, or -1
bool _cursor_moving_vertically
 index into Layout::character
int _glyph_index
Layout const * _parent_layout
double _x_coordinate

Friends

class Layout

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

Generated by  Doxygen 1.6.0   Back to index