vegui. tabbeddialog. class.js

Summary
vegUI element type for VegUITabbedDialog
vegUI element type for VegUITab
The tabbed dialog widget that allows to cram lots of content into little space.
extends VegUINode
constructor
Adds a tab to the tabbeddialog.
Builds the tabbed dialog
Sets the most common template properties of the tabbeddialog
extends VegUINode
constructor
Builds the tab
Gives focus to this tab bringing it to the foreground and moving the tabs in this.Tabs to the background
sets the most common template properties of the tab

Constants

VUI_TABBEDDIALOG

vegUI element type for VegUITabbedDialog

VUI_TAB

vegUI element type for VegUITab

VegUITabbedDialog

The tabbed dialog widget that allows to cram lots of content into little space.

Hierarchy

extends VegUINode

Inherits all properties and methods from VegUINode

VegUINode
|
+--> VegUITabbedDialog

Dependencies

Child Elements

TplTabVegUITab, template tab all tabs will be cloned from this one

Properties

Object Properties

tabSpacingint, space between each tab (pixels)
Tabsobject, holds created tabs by their child name
tabNumint, holds the number of created tabs
tabWint, holds the default tab width

Template Properties

T.tabSpacingtabSpacing

Functions

VegUITabbedDialog

function VegUITabbedDialog(refName,
Parent,
Manager)

constructor

See Parent

VegUINode::VegUINode

add_tab

this.add_tab = function(tabName,
tabCaption,
tabW)

Adds a tab to the tabbeddialog.  This is a template function and must be called before the tabbeddialog is built.  Add tabs after building is currently not supported

Parameters

string tabNameunique name of the tab
string tabCaptioncaption text in the tab
int tabWwidth of the tab (pixels)

Returns

VegUITabthe created tab

Example

myTabDlg.add_tab('movies', 'Movies', 150);
myTabDlg.add_tab('music', 'Music', 150);
Manager.build_element(myTabDlg);

build_tabdlg

this.build = this.build_tabdlg = function(toNode)

Builds the tabbed dialog

private function

You should always use VegUIManager::build_element to build vegUI elements

Alias

build()

Parameters

<HTMLNode toNode>if submitted the created html node will be appended to toNode

Returns

nullon failure
int1 on success

See Parent

VegUINode::build_node

set_tabdlg

this.set = this.set_tabdlg = function(w,
h,
x,
y,
tabSpacing)

Sets the most common template properties of the tabbeddialog

Alias

set()

Parameters

int wwidth (pixels)
int hheight (pixels)
int xx position (pixels)
int yy position (pixels)
int tabSpacingspace between two tabs (pixels)

See parent

VegUINode::set_node

VegUITab

A tab in VegUITabbedDialog

Summary
extends VegUINode
constructor
Builds the tab
Gives focus to this tab bringing it to the foreground and moving the tabs in this.Tabs to the background
sets the most common template properties of the tab

Hierarchy

extends VegUINode

Inherits all properties and methods from VegUINode

VegUINode
|
+--> VegUITab

Child Elements

TabVegUIButton, The tab
TabCaptionVegUINode, holds the caption of the tab
PanelVegUINode, The background of the tab

Properties

Object properties

tabCaptionstring text of TabCaption
tabSelOffint offset of the focused tab on the y axis (pixels)
TabsArray tabs that are on the same tabbed dialog control as this tab

Template properties

T.tabCapiontabCaption
T.tabSelOfftabSelOff
T.tabWwidth of the tab button
T.tabXposition of the tab button on the x axis

Functions

VegUITab

function VegUITab(refName,
Parent,
Manager)

constructor

See Parent

VegUINode::VegUINode

build_tab

this.build = this.build_tab = function(toNode)

Builds the tab

Alias

build()

Parameters

<HTMLNode toNode>if submitted the created html node will be appended to toNode

Returns

int1 on success
nullon failure

See Parent

VegUINode::build_node

focus

this.focus = function()

Gives focus to this tab bringing it to the foreground and moving the tabs in this.Tabs to the background

Example

myTabDlg.Tabs['music'].focus();

set_tab

this.set = this.set_tab = function(w,
h,
x,
y,
tabW,
tabX,
tabCaption,
tabSelOff)

sets the most common template properties of the tab

Alias

set()

Parameters

int wwidth (pixels)
int hheight (pixels)
int xx position (pixels)
int yy position (pixels)
int tabWwidth of the tab button (this.Tab) (pixels)
int tabXx position of the tab button (this.Tab) (pixels)
string tabCaptioncaption of this tab
int tabSelOffy offset when tab is focused (pixels)

See Parent

VegUINode::set_node

The tabbed dialog widget that allows to cram lots of content into little space.
A tab in VegUITabbedDialog
vegUI element type for VegUITabbedDialog
function VegUITabbedDialog(refName,
Parent,
Manager)
constructor
this.add_tab = function(tabName,
tabCaption,
tabW)
Adds a tab to the tabbeddialog.
this.build = this.build_tabdlg = function(toNode)
Builds the tabbed dialog
this.set = this.set_tabdlg = function(w,
h,
x,
y,
tabSpacing)
Sets the most common template properties of the tabbeddialog
vegUI element type for VegUITab
function VegUITab(refName,
Parent,
Manager)
constructor
this.build = this.build_tab = function(toNode)
Builds the tab
this.focus = function()
Gives focus to this tab bringing it to the foreground and moving the tabs in this.Tabs to the background
this.set = this.set_tab = function(w,
h,
x,
y,
tabW,
tabX,
tabCaption,
tabSelOff)
sets the most common template properties of the tab
The most basic VegUI Element.
int, space between each tab (pixels)
function VegUINode(refName,
Parent,
Manager)
this.build_element = function(VegUIObj,
toNode)
builds a VegUIElement.
this.build = this.build_node = function(toNode,
takeNode)
build a HTML node from the template properties of this element.
this.set = this.set_node = function(nodeType,
w,
h,
x,
y,
pos,
z)
Template Function
string text of TabCaption
int offset of the focused tab on the y axis (pixels)