Inherits:
::tycho::Interactor
-
Source File -
Contents:
public methods
- protected methods
- protected variables
An interactor for "editing" items. This provides the basic functionality
needed for labels and short text fields. More complex editing
interactions can be built by cascading editors.
The click, drag, and release methods are still used in this interactor,
for dragging out a region of text.
In addition, the method key
is used to insert a character.
FIXME: Change the cursor to the insertion cursor while editing
an item.
Public constructs
-
stop
- Stop editing an item.
-
key
key keysym state args
- Process a key press. If the key is a return, terminate the
interaction.
-
icursor
mode
- Manipulate the insertion cursor in useful ways. This proc only
works correctly if there is no selection. (Use the
select
proc if there is a selection.)
- start: Move to the start of the item
- end: Move to the end of the item
- +char: Move forward one character
- -char: Move back one character
- +word: Move forward one word
- -word: Move back one word
- index: Move to index
.
-
select
mode args
- Manipulate the selection in useful ways.
Protected constructs
-
activate
t x y args
- Activate the interactor on a picture object.
-
click
x y args
- Click on a text item. This moves the insertion cursor to the
point under the mouse. We assume that the item already has the
focus and the key insertion bindings.
-
dbclick
- Double-click on a text item. This selects the word underneath
and sets the mode for word-dragging.
-
deactivate
args
- Deactivate the interactor from the target. This method must be called
by the script bound to the release event.
-
drag
x y
- Drag-select a text region.
-
release
- Release the mouse from the item.
-
anchor
- The "anchor" of the selection.
-
wordmode
0
- A flag to indicate word-dragging mode.
Index of classes
Author: H. John Reekie
Version: @(#)Editor.itcl 1.4 18 Oct 1996
Copyright: (c) 1996 The Regents of the University of California.