Skip to content
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

  • components default: {} - all the components that have been added to the controller
  • windows default: {} - all the windows that have been added to the controller
  • termSize default: {} - populated with term width termSize[1] and height termSize[2] when startUpdateCycle() 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 component obj by deep copy, the copied argument is used internally and should not be set by the user
  • function inheritComponent(self, obj, componentTbl) - clones the component obj and overrides it with elements in componentTbl

Clone this wiki locally