next up previous contents
Next: Selections Up: The Editor Previous: The Editor

Indices

 

The type BaseIndex also models indices into list boxes, entry widgets etc., but for editors only the constructor IndexPos is important:

The class HasIndex models which way of indexing a position inside a widget is valid.gif For text widgets, we have

so we can just specify the index as a position (i.e. a row and column number, starting from 0), but we can also specify the index by the constant EndOfText (only constructor of the data type EndOfText), or by its screen coordinates (Pixels), or by modifying one of the other indices:

Index modifiers (only for editors) are modelled by type Editor.html#Editor.IndexModifierIndexModifier, and specify things like `three words forward', or a `one line back'.



Christoph Lueth
Wed May 29 13:20:38 MEST 2002