object = DFrame, Bar or BarLayer

object: addTaskMenu

DFrame: addTaskBar

DFrame: addToTaskBars

DFrame: addToTaskMenus

A task Menu (Menu object) is a pop-up Menu showing opened DFrames.

A task Bar (Bar object) is a Bar showing one Button for each opened DFrames.

DFrame.addTaskMenu: Create the default Bar and the default BarLayer if the default Bar if not yet created and create a TaskMenu on the default BarLayer of the default Bar.

DFrame.addToTaskMenus: Specifies if the DFrame will be added or not to TaskMenus

DFrame.addTaskBar: Create the unique Task Bar of a DFrame.

DFrame.addToTaskBars: Specifies if the DFrame will be added to Task Bars

Bar.addTaskMenu: Create a TaskMenu on the default BarLayer of the specified Bar.

BarLayer.addTaskMenu: Create a TaskMenu on the specified BarLayer.

Take care: Correct spellings are addToTaskBars and addToTaskMenus

Example

var bar = dFrame.addTaskBar('keyForThisTaskBar')

Demo

file: addTaskBarAndMenu.html

Run the example
See the source code

Syntaxes

object.addTaskMenu(title[, [menuStyle[, position[, key]]]])

DFrame.addTaskBar([barStyle[, title[, position[, key]]]]])

DFrame.addToTaskMenus(key)

DFrame.addToTaskBars(key)

Parameters

title

addTaskMenu method. String. The title of the Button of the (pop-up) taskMenu.

menuStyle

addTaskMenu method. MenuStyle object. The style that will be used to draw the task Menu. Set menuStyle to null to use the default MenuStyle properties of the styles of the Menu's parent (BarStyle default MenuStyle).

key

addTaskMenu and addTaskBar methods:
String.
The key that identifies a TaskMenu or a Task Bar and has to be used in addToTaskMenus and addToTaskBars methods.

addToTaskMenus and addToTaskBars methods:
String or boolean:
true: (default) The DFrame will be added to all TaskBars / TaskMenus.
false: The DFrame will be added to no taskBars / taskMenus.
String: The DFrame will only be added to all taskBars / taskMenus having the same key when created.

position

See position

addTaskBar method only. Set the position of the task Bar. Can be:
String. 'LEFT', 'RIGHT', 'TOP' or 'BOTTOM'
Array. Four integer indicating the left, top, right and bottom positions and sizes of the Bar. In percentages of the parent's Bar.

barStyle

addTaskBar method. BarStyle object. The style that will be used to draw the task Bar. Set barStyle to null to use the default task BarStyle property of the styles of the Bar's parent (DFrameStyle default Task BarStyle).

Return value

Bar for addTaskBar methods, Menu for addTaskMenu methods, no return value for addToTaskBars and addToTaskMenus methods.

Usage

The task Menu and the task Bar have the same function that allow  to jump from a DFrame to another. The difference resides in appearances, a Menu in one hand and a Bar of Buttons in the other hand.

The methods addToTaskMenus and addToTaskBars have the same functions that consist in controlling on which Menus and Bars DFrames will be recorded.

Caution: addToTaskBars and addToTaskMenus.