-
Notifications
You must be signed in to change notification settings - Fork 3
Controller
Anthony Ma edited this page May 26, 2015
·
1 revision
Holds the windows of the program and handles events
Class documentation updated for v1.0.0 #Fields
-
componentsdefault: {} - all the components that have been added to the controller -
windowsdefault: {} - all the windows that have been added to the controller -
termSizedefault: {} - populated with term widthtermSize[1]and heighttermSize[2]whenstartUpdateCycle()is called
#Functions
-
function drawAll(self)- draws all visible windows added to the controller -
function appUpdate(self)- called every update cycle after events have been handled -
function startUpdateCycle(self)- starts the update cycle -
function setVisibleWindow(self, windowTbl)- sets the window to be the only visible window -
function addWindow(self, windowTbl)- add a window to the controller -
function closeWindow(self, windowTbl)- queue a window to be closed -
function addComponent(self, componentTbl)- add a component to the controller -
function removeComponent(self, componentTbl)- queue a component to be removed -
function terminate(self)- called on a terminate event -
function exit(self)- clears the terminal and exits the program -
function cloneComponent(self, obj, [copied])- clones the componentobjby deep copy, thecopiedargument is used internally and should not be set by the user -
function inheritComponent(self, obj, componentTbl)- clones the componentobjand overrides it with elements incomponentTbl