[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

LessonStep

inherits from Object

Object <- LessonStep



Operations

Get list of all operations

AcceptTouch
Action
AfterAction
BalloonDot
BeforeAction
HandleCantContinue
PerformTouch
ShouldAbortSuspended
ShouldResume
ShouldSuspend
TargetMissedFeedback
TouchTarget
Validate


Attributes

Get list of all attributes

LessonWindow
Target


Fields

Field Type
LessonStep: stepFlags: Flags
stepTargetBox: Box
stepTarget: Viewable
stepBalloonDot: Dot
stepWindowDot: Dot
stepText: Text


Instance template

instance LessonStep tag;
      stepFlags: 0x00000000;
  stepTargetBox: <0.0,0.0,0.0,0.0>;
     stepTarget: nilObject;
 stepBalloonDot: <0.0,0.0>;
  stepWindowDot: <0.0,0.0>;
       stepText: nilObject;
end instance;

Class definition

Define Class LessonStep;
    inherits from Object;

    field stepFlags:        Flags;      
        // holds various flags, window type, etc.; defined in Utilities.h
    field stepTargetBox:    Box;        
        // box sometimes used when target is larger than one viewable
    field stepTarget:       Viewable;   
        // viewable that step points at and/or requires user to touch (can be nilObject)
    field stepBalloonDot:   Dot;        
        // optional end point of balloon spout from LessonWindow for this step, used if stepFlags say so
    field stepWindowDot:    Dot;        
        // origin of LessonWindow for this step
    field stepText:         Text;       
        // text that appears in LessonWindow for this step

    operation BeforeAction();
        // called before window is displayed for this step; does nothing at this level
    operation Action();
        // called after window is displayed and tool is set to LessonTool; does nothing at this level
    operation AfterAction();
        // called just before setting up the following step; does nothing at this level
    
    operation TouchTarget(target: Viewable; touchInput: TouchInput), noFail;
        // calls AcceptTouch, then PerformTouch if accepted; also checks touches in windows, etc.
        // called from LessonTool_TouchTarget
    operation AcceptTouch(target: Viewable; where: Dot; var advance: Boolean): Boolean;
        // returns true and sets advance to true using conditions based on stepFlags
        // override to determine target accceptability differently
    operation PerformTouch(target: Viewable; touchInput: TouchInput);
        // calls Touch or Tap on accepted target, based on flags; override to use different tool, etc.
    operation TargetMissedFeedback();
        // called from TouchTarget when target is missed on this step; blinks target or targetBox based on flags
        // override to use different feedback
    
    operation ShouldSuspend(): Boolean;
        // called after step to "hide" lesson until NextStep called again; uses a stepFlag; override to determine more dynamically
    operation ShouldResume(): Boolean;
        // returns true; override to conditionally remain suspended when LessonTool_NextStep is called while this step is current
    operation ShouldAbortSuspended(): Boolean;
        // returns true; override to conditionally abort suspended lesson when LessonTool_AbortSuspendedLesson is called
    operation HandleCantContinue(): Boolean;
        // returns true if this step will not be able to succeed in current environment, after handling it (by aborting lesson, e.g.)

    operation BalloonDot(var balloonDot: Dot): Boolean;
        // returns stepBalloonDot or target origin, based on flags; override to make window point elsewhere
    attribute LessonWindow: LessonWindow, readOnly;
        // returns one of the four windows LessonTool knows about, based on flags
        // override to use different LessonWindow
    overrides Target;
        // returns stepTarget field; override to do something more dynamic

#ifdef VALIDATE
    overrides Validate;
        // checks for unused stepFlags or bad combinations thereof
#endif
end class;