21.33 Walkingants Interface

ORIGIN '../guienv';
LIB_DEF 'guienvutilsants' '../../lib';
BODY 'private/walkingantsbody';

-- GUIenvLib: attributes --

oneWay: (# exit 1 #);
twoWay: (# exit 2 #);

walkingAnts:
  (* WalkingsAnts provides a way to highlight an area inside a windowItem.
   * 
   * The walking ants are an animated stippled rectangle.
   * 
   * Interval is the pause in microseconds between each step.
   * 
   * More than one area can be animated at once.
   *  
   *)
  (# <<SLOT walkingAntsLib: attributes>>;
     
     (* Interval is the pause in microseconds 
      * between each step.
      *)
     interval: @integer;
     
     (* Style is oneWay or twoWay. 
      *   oneWay: the ants walks clockwise around the edge 
      *           of the area.
      *   twoWay: the ants alternates between clock 
      *           and counterclock wise.
      *)
     style: @integer;
     
     (* Size (width and hight) of pen to use *)
     pensize: @integer;
     
     init:<(# 
       ... 
       #);
     
     add:
       (* Add an area. *)
       (# theRectangle: ^rectangle;
          theWindowItem: ^window.windowItem;
       enter (theWindowItem[], theRectangle[])
       ...
       #);
     delete:
       (* Delete an area. *)
       (# theRectangle: ^rectangle;
          theWindowItem: ^window.windowItem;
       enter (theWindowItem[], theRectangle[])
       ...
       #);
     clear:
       (* Delete all areas *)
       (# ... #);
     
     start:
       (* Start the animation *)
       (#
       ...
       #);
     stop:
       (* Stop the animation *)
       (# ... #);
     
     private: @...;
  #)


21.33 Walkingants Interface
© 1994-2002 Mjølner Informatics
[Modified: Friday January 21st 2000 at 8:41]