JSDoc: Class: EmperorViewControllerABC

# Class: EmperorViewControllerABC

## EmperorViewControllerABC

EmperorViewControllerABC

Initializes an abstract tab. This has to be contained in a DOM object and will use the full size of that container. The title represents the title of the jQuery tab. The description will be used as help text to describe the functionality of each subclass tab.

## Constructor

#### new EmperorViewControllerABC(container, title, description) → {EmperorViewControllerABC}

##### Parameters:

Name | Type | Description
--- | --- | ---
`container` | Node | Container node to create the controller in.
`title` | String | title of the tab.
`description` | String | helper description.

Source:
  - view-controller.js, line 26

##### Returns:

Returns an instance of the EmperorViewControllerABC.

Type
  EmperorViewControllerABC

### Members

#### $body :Node

jQuery element for the body, which contains the lowermost elementsdisplayed in tab. This goes below the header.

##### Type:

- Node

Source:
  - view-controller.js, line 53

#### $canvas :Node

jQuery element for the canvas, which contains the header and the body.

##### Type:

- Node

Source:
  - view-controller.js, line 47

#### $container :Node

jQuery element for the parent container.

##### Type:

- Node

Source:
  - view-controller.js, line 31

#### $header :Node

jQuery element for the header which contains the uppermost elementsdisplayed in a tab.

##### Type:

- Node

Source:
  - view-controller.js, line 59

#### active :Boolean

Indicates whether the tab is front most

##### Type:

- Boolean

Default Value:
  - false
Source:
  - view-controller.js, line 65

#### description :String

Human-readable description of the tab.

##### Type:

- String

Source:
  - view-controller.js, line 41

#### enabled :Boolean

Indicates if tab can be accessed.

##### Type:

- Boolean

Default Value:
  - true
Source:
  - view-controller.js, line 77

#### identifier :String

Unique hash identifier for the tab instance.

##### Type:

- String

Default Value:
  - "EMPtab-xxxxxxx"
Source:
  - view-controller.js, line 71

#### title :String

Human-readable title of the tab.

##### Type:

- String

Source:
  - view-controller.js, line 36

### Methods

#### fromJSON(parsed)

Decodes JSON string and modifies its own instance variables accordingly.

##### Parameters:

Name | Type | Description
--- | --- | ---
`parsed` | Object | JSON string representation of an instance.

Source:
  - view-controller.js, line 185

#### resize(width, height)

Resizes the container, note that the body will take whatever space is available after considering the size of the header. The header shouldn't have height variable objects, once added their height shouldn't really change.

##### Parameters:

Name | Type | Description
--- | --- | ---
`width` | Float | the container width.
`height` | Float | the container height.

Source:
  - view-controller.js, line 156

#### setActive(trulse)

Sets whether or not the tab is visible.

##### Parameters:

Name | Type | Description
--- | --- | ---
`trulse` | Boolean | option to activate tab (i.e. move tab to foreground).

Source:
  - view-controller.js, line 136

#### setEnabled(trulse)

Sets whether or not the tab can be modified or accessed.

##### Parameters:

Name | Type | Description
--- | --- | ---
`trulse` | Boolean | option to enable tab.

Source:
  - view-controller.js, line 121

#### toJSON() → {Object}

Converts the current instance into a JSON string.

Source:
  - view-controller.js, line 176

##### Returns:

ready to serialize representation of self.

Type
  Object