[previous] [up] [next]     [index]
Next: Cut and Paste Time Up: Editor Toolbox Previous: Flattened Text

Caret Ownership

Within a frame, only one object can contain the keyboard focus. This property must be maintained when a frame contains multiple editors in multiple displays, and when a single editor contains other editors as items.

When a editor has the keyboard focus, it will usually display the current selection, or a line indicating the insertion point; this line is called the caret.

When a editor contains other editors, it keeps track of caret ownership among the sub-editors it contains. When the caret is taken away from the main editor, it will take away caret ownership from the appropriate sub-editor.

When a editor or snip is drawn, an argument to the drawing method specifies whether the caret should be drawn with the data. This argument can be any of (in increasing order):

The 'show-inactive-caret display mode is useful for showing selection ranges in text editors that do not have the focus. This 'show-inactive-caret mode is distinct from 'no-caret mode; when editors are embedded, only the locally-active editor shows its selection.



PLT