Stefano Corsi > Quizzer-0.08 > Quizzer::FrontEnd

Download:
Quizzer-0.08.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Quizzer::FrontEnd - base FrontEnd

DESCRIPTION ^

This is the base of the FrontEnd class. Each FrontEnd presents a user interface of some kind to the user, and handles generating and communicating with Elements to form that FrontEnd.

METHODS ^

new

Creates a new FrontEnd object and returns it.

makeelement

This helper function creates an Element. Pass in the type of Frontend the Element is for, and the Question that will be bound to the Element. It returns the generated Element, or false if it was unable to make an Element of the given type.

add

Add a Question to the list to be displayed to the user. Pass the Question and text indicating the level of the Question. This creates an Element and adds it to the array in the elements property. Returns true if the created Element is visible.

go

Display accumulated Elements to the user. The Elements are in the elements property, and that property is cleared after the Elements are presented.

After showing each element, checks to see if the object's backup property has been set; if so, doen't display any of the other pending questions (remove them from the buffer), and return false. The default is to return true.

The return value of each element's show() method is used to set the value of the question associated with that element.

clear

Clear out the accumulated elements.

default_title

This sets the title property to a default. Pass in the name of the package that is being configured.

AUTHOR ^

Joey Hess <joey@kitenet.net>

syntax highlighting: