Caplin Trader 5.1.0

Class: module:ct-menu/Generator

(abstract) module:ct-menu/Generator()

The class Generator represents the view control for any module:ct-menu/Model inserted on a menu.
Keep in mind that a single Generator will be contained inside the module:ct-menu/Control to render every model type.

Constructor

(abstract) new module:ct-menu/Generator()

Methods

addParentControl()

Sets the parent control. This will be done automatically by the module:ct-menu/Control.

create(model, container)

Appends the html element representation of the given model to the provided container.

Parameters:
Name Type Description
model module:ct-menu/Model

The model.

container HTMLElement

The container element.

destroy()

Release any memory that the control holds.

getParentControl() → {module:ct-menu/Control}

Returns the parent control. Use this method in order to be able to call the append method from other generator types.

Returns:

The parent control.

Type
module:ct-menu/Control