Class
caplin.menu

Generator

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

Constructor Summary

Attributes Name and Description
caplin.menu.Generator()

Method Summary

Attributes Name and Description
void addParentControl( parentControl)

Sets the parent control.

void create( model, container)

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

void destroy()

Release any memory that the control holds.

caplin.menu.Control getParentControl()

Returns the parent control.

Constructor Detail

caplin.menu.Generator()

Method Detail

void addParentControl( parentControl)

Sets the parent control. This will be done automatically by the caplin.menu.Control.

Parameters
parentControl

void create( model, container)

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

Parameters
model {caplin.menu.Model} The model.
container {HTMLElement} The container element.

void destroy()

Release any memory that the control holds.

caplin.menu.Control getParentControl()

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

Returns
{caplin.menu.Control} The parent control.