previous chapter contents page top page next chapter


LessonTool

March 15, 1996

inherits from ChooseableTool;

Class Description

When a lesson is active, Magic Cap sets the current tool to the lesson tool, a special tool that constrains the user's touch to a desired viewable only.

Programming information

Instantiate: sometimes
Subclass: sometimes
Call its methods: often

You probably won't ever create an object or a subclass of class LessonTool. The information in this chapter is provided for debugging and curiosity only.

Methods defined by class LessonTool

Class LessonTool defines the following methods:

Method Description
PrepareLesson Starts the lesson.
PrepareRegistrationLesson Starts the lesson that lets the user register for the e-mail service.
NextStep Advances to the next step in the lesson.
AbortLesson Hides the lesson window and resets the touch tool.
AbortLessonWithAnnouncement Puts up a public address window telling why the lesson was aborted.
AbortLessonWithConfirm Puts up a confirmation dialog for aborting the lesson.
AbortSuspendedLesson Aborts a suspended lesson and puts up announcement.
ShouldForceBorders Overridden to always return false.
TouchAsTouchTool Redispatches touch after setting touch tool.
TouchTarget Overridden to eheck lesson step conditions.
CurrentStepNum Returns current step's position in lesson.
SetCurrentStepNum Sets current step's position in lesson.
Lesson Returns list of steps in lesson.
SetLesson Sets list of steps in lesson.
LessonWindow Returns current lesson window.
Suspended Indicates whether current lesson is suspended.
SetSuspended Sets whether current lesson is suspended.

Fields defined by class LessonTool

Class LessonTool defines the following fields:

Field Type Description
Inherited from class ChooseableTool
image Image Image displayed by this tool
Defined by class LessonTool
lesson LessonStepList Steps associated with this lesson
horzWindow LessonWindow Horizontal lesson window
vertWindow LessonWindow Vertical lesson window
bigWindow LessonWindow Large lesson window used for step info
bootWindow LessonWindow Lesson window used at cold start time
currentWindow LessonWindow Lesson window used by current step
currentStep LessonStep Lesson step currently active
currentStepNum Unsigned Number of current step
lessonToolFlags Flags Various flags, including suspended setting

Method Descriptions

PrepareLesson

operation PrepareLesson(stepList: Object)
Call: rarely
Override: rarely

Magic Cap calls PrepareLesson to start the lesson.

PrepareRegistrationLesson

operation PrepareRegistrationLesson()
Call: rarely
Override: rarely

Magic Cap calls PrepareRegistrationLesson to start the lesson that helps the user register for the mail service.

NextStep

operation NextStep()
Call: rarely
Override: rarely

Magic Cap calls NextStep to advance to the next step in the lesson.

AbortLesson

operation AbortLesson()
Call: rarely
Override: rarely

Magic Cap calls AbortLesson to end the lesson prematurely. AbortLesson hides the lesson window and resets the touch tool.

AbortLessonWithAnnouncement

operation AbortLessonWithAnnouncement(announcement: Announcement)
Call: rarely
Override: rarely

Magic Cap calls AbortLessonWithAnnouncement to put up a public address window explaining why the lesson was aborted.

AbortLessonWithConfirm

operation AbortLessonWithConfirm()
Call: rarely
Override: rarely

Magic Cap calls AbortLessonWithConfirm to put up a confirmation dialog asking the user whether the current lesson should be aborted.

AbortSuspendedLesson

operation AbortSuspendedLesson()
Call: rarely
Override: rarely

Magic Cap calls AbortSuspendedLesson to abort the current lesson if it is suspended and put up a public address window explaining why the lesson was aborted.

ShouldForceBorders

overrides Appear
Call: rarely
Override: sometimes

Class MagicWindow overrides ShouldForceBorders to always return false.

TouchAsTouchTool

operation TouchAsTouchTool(touchInput: TouchInput)
Call: rarely
Override: rarely

Magic Cap calls TouchAsTouchTool to redispatch the touch after setting the touch tool.

TouchTarget

overrides TouchTarget
Call: rarely
Override: sometimes

Class MagicWindow overrides TouchTarget to check the conditions of the lesson step and handle them appropriately.

CurrentStepNum

attribute CurrentStepNum: Unsigned
// operation CurrentStepNum(): Unsigned
// operation SetCurrentStepNum(newValue)
Call: rarely
Override: rarely

The attribute CurrentStepNum refers to the number of the active lesson step.

Lesson

attribute Lesson: LessonStepList
// operation Lesson(): LessonStepList
// operation SetLesson(newValue)
Call: rarely
Override: rarely

The attribute Lesson refers to the list of lesson steps associated with the current lesson.

LessonWindow

attribute LessonWindow: LessonWindow, readOnly
// operation LessonWindow(): Unsigned
Call: rarely
Override: rarely

The attribute LessonWindow refers to the lesson window being used for the current lesson step.

Suspended

attribute Suspended: Boolean
// operation Suspended(): Boolean
// operation SetSuspended(newValue)
Call: rarely
Override: rarely

The attribute Suspended indicates whether the lesson is currently suspended.