XTkLabelsExtras.mesa
Copyright Ó 1992 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, July 9, 1992 2:01:19 pm PDT
Christian Jacobi, July 9, 1992 4:14 pm PDT
DIRECTORY
Xl USING [Point],
XTk USING [Widget],
XTkCommon USING [RepaintMode];
XTkLabelsExtras: CEDAR DEFINITIONS ~
BEGIN
RepaintMode: TYPE = XTkCommon.RepaintMode;
For now labels must be real labels; this procedures do not use delegation. This is thought as a friends level extras interface used to implement fields only.
SetCharInsertionIndex: PROC [label: XTk.Widget, pos: INT, repaint: RepaintMode ¬ immediately];
GetCharInsertionIndex: PROC [label: XTk.Widget] RETURNS [pos: INT];
SetCharInsertionPos: PROC [label: XTk.Widget, pos: Xl.Point, repaint: RepaintMode ¬ immediately];
ToCharPos: PROC [label: XTk.Widget, pos: Xl.Point] RETURNS [INT];
Given a X coordinate, returns closest index into widgets text.
0 <= index <= Rope.Length[text]
END.