Options
All
  • Public
  • Public/Protected
  • All
Menu

Creates and has methods to update a Terminal DOM that contains cells in a grid pattern.

Hierarchy

Implements

Index

Constructors

constructor

  • new DOMCellController(width: number, height: number, container?: HTMLDivElement): DOMCellController

Properties

cells

cells: HTMLSpanElement[]

Span elements that hold characters.

code

code: HTMLElement

Code / Monospace, should be the direct child of the pre tag.

container

container: HTMLDivElement

The main DOM wrapper for all DOM elements. Nothing from the terminal should be outside of this element.

display

display: HTMLSpanElement

Span that contains the final display text of the terminal.

Protected height

height: number

Height of instance.

idNumber

idNumber: number

ID number for this instance of the TerminalDOM.

pre

pre: HTMLPreElement

Preformatted Text, should be the direct child of the container.

Protected width

width: number

Width of instance.

Static idCounter

idCounter: number = 0

Keeps track of number of ids that have been created.

Methods

clear

  • clear(): void

getHeight

  • getHeight(): number

getWidth

  • getWidth(): number

Protected initCells

  • initCells(): void

setCellValue

  • setCellValue(value: string, index: number): void
  • setCellValue(value: string, column: number, row: number): void

Protected setClasses

  • setClasses(): void

setColor

  • setColor(index: number, color: string): void

Protected setIDs

  • setIDs(): void

Static defaultContainer

  • defaultContainer(): HTMLDivElement

Static getID

  • getID(): number

Generated using TypeDoc