21.31 Tooltip Interface

ORIGIN '~beta/guienv/guienv';
BODY 'private/tooltipBody';

INCLUDE '~beta/guienv/graphmath';

-- windowlib: attributes --
tool:
  (# theWindowItem: ^windowItem;
     theTip: ^text;
  #);

rectTool: tool
  (# 
     theRect: ^rectangle; (* Coordinates of the bounding rectangle of the 
                           * tool.
                           * The coordinates are relative to the upper-left 
                           * corner theWindowItem. 
                           * NOT supported on unix.
                           *)
  #);

toolTipControl: 
  (# 
     <<SLOT GUIENVtooltipLib: attributes>>;
     
     
     (* Duration types  used in setDelayTime. *)
     
     AUTOMATIC: (# exit 0 #); (* Automatically calculates the initial, 
                               * reshow, and autopopup durations based 
                               * on the value of delay. *)
     
     RESHOW: (# exit 1 #);  (* Sets the length of the delay before 
                             * subsequent ToolTip windows are displayed
                             * when the cursor is moved from one tool 
                             * to another.*)
     
     AUTOPOP: (# exit 2 #);  (* Sets the length of time before the 
                              * ToolTip window is hidden if the cursor 
                              * remains stationary in the tool's 
                              * bounding rectangle after the ToolTip 
                              * window has appeared. *)
     
     INITIAL: (# exit 3 #);  (* Sets the length of time that the 
                              * cursor must remain stationary within 
                              * the bounding rectangle of a tool before
                              * the ToolTip window is displayed. *)
     
     setDelayTime:
       (# delay: @integer; (* New duration, in milliseconds. *)
          durationType: @integer;
       enter (durationType, delay)
       ...
       #);

     
     add: 
       (# theTool: ^tool;
       enter theTool[] 
       ...
       #);
     
     delete: 
       (# theTool: ^tool;
       enter theTool[] 
       ...
       #);
     
     open:<(# ... #);
     
     close:<
       (# ... #);
     
     tooltipPriv: @...;
  #);

-- windowitemlib:attributes--
addToolTip:
  (# t:^text;
     thetool:^tool;
     tooltipc:^tooltipcontrol;
  enter t[]
     ...
  #);
addToolTipExt:
  (# t:^text;
     thetool:^tool;
     theWindow:^window;
     tooltipc:^tooltipcontrol;
  enter (theWindow[], t[])
     ...
  #)


21.31 Tooltip Interface
© 1994-2002 Mjølner Informatics
[Modified: Friday August 4th 2000 at 17:07]