Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

Unknown macro: {div}

DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.

Enter additional information related to this 'class' inside the {div} macro with 'id=description'

Unknown macro: {div}


Unknown macro: {table}

{column:width=80px|padding=0px}{column}{column}{column}

Unknown macro: {tr}
Unknown macro: {th}

Constants Summary

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Number

Unknown macro: {td}

ALIGN_CENTER
Constant for centering menu items/checkbox/radiobuttons at creation.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Number

Unknown macro: {td}

ALIGN_LEFT
Constant for left aligning menu items/checkbox/radiobuttons at creation.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Number

Unknown macro: {td}

ALIGN_RIGHT
Constant for right aligning menu items/checkbox/radiobuttons at creation.


Unknown macro: {table}

{column:width=80px|padding=0px}{column}{column}{column}

Unknown macro: {tr}
Unknown macro: {th}

Property Summary

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Boolean

Unknown macro: {td}

enabled
Enable/disable the menu item/checkbox/radiobutton.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Object[]

Unknown macro: {td}

methodArguments
Set arguments that are sent to the callback method.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

String

Unknown macro: {td}

name
The name of the menu item/checkbox/radiobutton.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Boolean

Unknown macro: {td}

selected
Select/unselect the checkbox/radiobutton.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

String

Unknown macro: {td}

text
Get/set the text of the menu item/checkbox/radiobutton.


Unknown macro: {table}

{column:width=80px|padding=0px}{column}{column}{column}

Unknown macro: {tr}
Unknown macro: {th}

Method Summary

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

doClick()
Script the selection (emulate a mouse click) of the item.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

Object

Unknown macro: {td}

getClientProperty(key)
Gets the specified client property for the menu item/checkbox/radiobutton based on a key.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

putClientProperty(key, value)
Sets the value for the specified client property key of the menu item/checkbox/radiobutton.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

MenuItem

Unknown macro: {td}

setAccelerator()
Set the accelerator key of the menu item/checkbox/radiobutton.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

setBackgroundColor()
Set the background color of the menu item/checkbox/radiobutton.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

void

Unknown macro: {td}

setForegroundColor()
Set the foreground color of the menu item/checkbox/radiobutton.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

MenuItem

Unknown macro: {td}

setIcon()
Set the icon of the menu item/checkbox/radiobutton.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

MenuItem

Unknown macro: {td}

setMethod(method)
Set the method for the menu item/checkbox/radiobutton.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

MenuItem

Unknown macro: {td}

setMethod(method, arguments)
Set the method for the menu item/checkbox/radiobutton.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

MenuItem

Unknown macro: {td}

setMnemonic()
Set the mnemonic key of the menu item/checkbox/radiobutton.

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}

MenuItem

Unknown macro: {td}

setVisible(visible)
Set the item visible.


Unknown macro: {table}

{column:width=100%|padding=0px}{column}

Unknown macro: {tr}
Unknown macro: {th}

Constants Details

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
ALIGN_CENTER
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Constant for centering menu items/checkbox/radiobuttons at creation.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

Number

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a left aligned menu item
menu.addMenuItem("significantly long text", feedback, null, null, true, MenuItem.ALIGN_LEFT);
// add a centered checkbox
menu.addCheckBox("a bit shorter", feedback, null, null, true, MenuItem.ALIGN_CENTER);
// add a right aligned radiobutton
menu.addRadioButton("short", feedback, null, null, true, MenuItem.ALIGN_RIGHT);
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
ALIGN_LEFT
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Constant for left aligning menu items/checkbox/radiobuttons at creation.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

Number

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a left aligned menu item
menu.addMenuItem("significantly long text", feedback, null, null, true, MenuItem.ALIGN_LEFT);
// add a centered checkbox
menu.addCheckBox("a bit shorter", feedback, null, null, true, MenuItem.ALIGN_CENTER);
// add a right aligned radiobutton
menu.addRadioButton("short", feedback, null, null, true, MenuItem.ALIGN_RIGHT);
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
ALIGN_RIGHT
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Constant for right aligning menu items/checkbox/radiobuttons at creation.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

Number

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a left aligned menu item
menu.addMenuItem("significantly long text", feedback, null, null, true, MenuItem.ALIGN_LEFT);
// add a centered checkbox
menu.addCheckBox("a bit shorter", feedback, null, null, true, MenuItem.ALIGN_CENTER);
// add a right aligned radiobutton
menu.addRadioButton("short", feedback, null, null, true, MenuItem.ALIGN_RIGHT);
Unknown macro: {tr}
Unknown macro: {td}


Unknown macro: {table}

{column:width=100%|padding=0px}{column}

Unknown macro: {tr}
Unknown macro: {th}

Property Details

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
enabled
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Enable/disable the menu item/checkbox/radiobutton.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

Boolean

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item at the first position in the menu
var entry = menu.addMenuItem(0);
// alternatively add a checkbox at the first position
//var entry = menu.addCheckBox(0);
// or alternatively add a radiobutton at the first position
//var entry = menu.addRadioButton(0);

// disable the newly added entry
entry.enabled = false;
// give a name to the entry (the name is not visible anywhere)
entry.name = "my_name";
// make the entry selected (affects checkboxes and radiobuttons)
entry.selected = true;
// set the text of the entry
entry.text = "menu entry";
// set the callback method
entry.setMethod(feedback);
// set the arguments to be sent to the callback method
// (an array of elements which will be passed as arguments 5, 6 and so on to the callback method)
// the first 5 arguments are fixed: 
//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
entry.methodArguments = [17, "data"];
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
methodArguments
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Set arguments that are sent to the callback method.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

Object[]

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item at the first position in the menu
var entry = menu.addMenuItem(0);
// alternatively add a checkbox at the first position
//var entry = menu.addCheckBox(0);
// or alternatively add a radiobutton at the first position
//var entry = menu.addRadioButton(0);

// disable the newly added entry
entry.enabled = false;
// give a name to the entry (the name is not visible anywhere)
entry.name = "my_name";
// make the entry selected (affects checkboxes and radiobuttons)
entry.selected = true;
// set the text of the entry
entry.text = "menu entry";
// set the callback method
entry.setMethod(feedback);
// set the arguments to be sent to the callback method
// (an array of elements which will be passed as arguments 5, 6 and so on to the callback method)
// the first 5 arguments are fixed: 
//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
entry.methodArguments = [17, "data"];
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
name
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

The name of the menu item/checkbox/radiobutton. The name is used only internally, it is not
visible in the user interface.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

String

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item at the first position in the menu
var entry = menu.addMenuItem(0);
// alternatively add a checkbox at the first position
//var entry = menu.addCheckBox(0);
// or alternatively add a radiobutton at the first position
//var entry = menu.addRadioButton(0);

// disable the newly added entry
entry.enabled = false;
// give a name to the entry (the name is not visible anywhere)
entry.name = "my_name";
// make the entry selected (affects checkboxes and radiobuttons)
entry.selected = true;
// set the text of the entry
entry.text = "menu entry";
// set the callback method
entry.setMethod(feedback);
// set the arguments to be sent to the callback method
// (an array of elements which will be passed as arguments 5, 6 and so on to the callback method)
// the first 5 arguments are fixed: 
//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
entry.methodArguments = [17, "data"];
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
selected
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Select/unselect the checkbox/radiobutton.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

Boolean

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item at the first position in the menu
var entry = menu.addMenuItem(0);
// alternatively add a checkbox at the first position
//var entry = menu.addCheckBox(0);
// or alternatively add a radiobutton at the first position
//var entry = menu.addRadioButton(0);

// disable the newly added entry
entry.enabled = false;
// give a name to the entry (the name is not visible anywhere)
entry.name = "my_name";
// make the entry selected (affects checkboxes and radiobuttons)
entry.selected = true;
// set the text of the entry
entry.text = "menu entry";
// set the callback method
entry.setMethod(feedback);
// set the arguments to be sent to the callback method
// (an array of elements which will be passed as arguments 5, 6 and so on to the callback method)
// the first 5 arguments are fixed: 
//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
entry.methodArguments = [17, "data"];
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
text
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Get/set the text of the menu item/checkbox/radiobutton.; This can be also html if enclosed between html tags

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

String

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item at the first position in the menu
var entry = menu.addMenuItem(0);
// alternatively add a checkbox at the first position
//var entry = menu.addCheckBox(0);
// or alternatively add a radiobutton at the first position
//var entry = menu.addRadioButton(0);

// disable the newly added entry
entry.enabled = false;
// give a name to the entry (the name is not visible anywhere)
entry.name = "my_name";
// make the entry selected (affects checkboxes and radiobuttons)
entry.selected = true;
// set the text of the entry
entry.text = "menu entry";
// set the callback method
entry.setMethod(feedback);
// set the arguments to be sent to the callback method
// (an array of elements which will be passed as arguments 5, 6 and so on to the callback method)
// the first 5 arguments are fixed: 
//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
entry.methodArguments = [17, "data"];
Unknown macro: {tr}
Unknown macro: {td}


Unknown macro: {table}

{column:width=100%|padding=0px}{column}

Unknown macro: {tr}
Unknown macro: {th}

Method Details

Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
doClick
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

doClick

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Script the selection (emulate a mouse click) of the item.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

void

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);

// simulate a click on the entry
entry.doClick();
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
getClientProperty
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

Object

Unknown macro: {span}

getClientProperty

Unknown macro: {span}

(key)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Gets the specified client property for the menu item/checkbox/radiobutton based on a key.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {div}

{Object} key

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

Object

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);

// NOTE: Depending on the operating system, a user interface property name may be available.
// set the tooltip of the menu item/checkbox/radiobutton via client properties
// keep the original tooltip in a form or global variable
originalTooltip = entry.getClientProperty("ToolTipText");
entry.putClientProperty("ToolTipText", "changed tooltip");

// later restore the original tooltip from the variable
//var menubar = plugins.window.getMenuBar();
//var menuIndex = menubar.getMenuIndexByText("New Menu");
//var menu = menubar.getMenu(menuIndex);
//var entry = menu.getItem(0);
//entry.putClientProperty("ToolTipText", originalTooltip);
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
putClientProperty
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

putClientProperty

Unknown macro: {span}

(key, value)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Sets the value for the specified client property key of the menu item/checkbox/radiobutton.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {div}

{Object} key
{Object} value

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

void

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);

// NOTE: Depending on the operating system, a user interface property name may be available.
// set the tooltip of the menu item/checkbox/radiobutton via client properties
// keep the original tooltip in a form or global variable
originalTooltip = entry.getClientProperty("ToolTipText");
entry.putClientProperty("ToolTipText", "changed tooltip");

// later restore the original tooltip from the variable
//var menubar = plugins.window.getMenuBar();
//var menuIndex = menubar.getMenuIndexByText("New Menu");
//var menu = menubar.getMenu(menuIndex);
//var entry = menu.getItem(0);
//entry.putClientProperty("ToolTipText", originalTooltip);
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setAccelerator
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

MenuItem

Unknown macro: {span}

setAccelerator

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Set the accelerator key of the menu item/checkbox/radiobutton.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

MenuItem

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);

// define an accelerator for the menu entry
entry.setAccelerator("ctrl alt Y");
// also define a mnemonic
entry.setMnemonic("y");
// set a custom background color
entry.setBackgroundColor("#111111");
// set a custom foreground color
entry.setForegroundColor("#EE5555");
// set an icon
entry.setIcon("media:///yourimage.gif");
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setBackgroundColor
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

setBackgroundColor

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Set the background color of the menu item/checkbox/radiobutton.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

void

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);

// define an accelerator for the menu entry
entry.setAccelerator("ctrl alt Y");
// also define a mnemonic
entry.setMnemonic("y");
// set a custom background color
entry.setBackgroundColor("#111111");
// set a custom foreground color
entry.setForegroundColor("#EE5555");
// set an icon
entry.setIcon("media:///yourimage.gif");
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setForegroundColor
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

void

Unknown macro: {span}

setForegroundColor

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Set the foreground color of the menu item/checkbox/radiobutton.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

void

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);

// define an accelerator for the menu entry
entry.setAccelerator("ctrl alt Y");
// also define a mnemonic
entry.setMnemonic("y");
// set a custom background color
entry.setBackgroundColor("#111111");
// set a custom foreground color
entry.setForegroundColor("#EE5555");
// set an icon
entry.setIcon("media:///yourimage.gif");
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setIcon
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

MenuItem

Unknown macro: {span}

setIcon

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Set the icon of the menu item/checkbox/radiobutton.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

MenuItem

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);

// define an accelerator for the menu entry
entry.setAccelerator("ctrl alt Y");
// also define a mnemonic
entry.setMnemonic("y");
// set a custom background color
entry.setBackgroundColor("#111111");
// set a custom foreground color
entry.setForegroundColor("#EE5555");
// set an icon
entry.setIcon("media:///yourimage.gif");
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setMethod
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

MenuItem

Unknown macro: {span}

setMethod

Unknown macro: {span}

(method)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Set the method for the menu item/checkbox/radiobutton.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {div}

{Function} method

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

MenuItem

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item at the first position in the menu
var entry = menu.addMenuItem(0);
// alternatively add a checkbox at the first position
//var entry = menu.addCheckBox(0);
// or alternatively add a radiobutton at the first position
//var entry = menu.addRadioButton(0);

// disable the newly added entry
entry.enabled = false;
// give a name to the entry (the name is not visible anywhere)
entry.name = "my_name";
// make the entry selected (affects checkboxes and radiobuttons)
entry.selected = true;
// set the text of the entry
entry.text = "menu entry";
// set the callback method
entry.setMethod(feedback);
// set the arguments to be sent to the callback method
// (an array of elements which will be passed as arguments 5, 6 and so on to the callback method)
// the first 5 arguments are fixed: 
//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
entry.methodArguments = [17, "data"];
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setMethod
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

MenuItem

Unknown macro: {span}

setMethod

Unknown macro: {span}

(method, arguments)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Set the method for the menu item/checkbox/radiobutton.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {div}

{Function} method
{Object[]} arguments

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

MenuItem

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item at the first position in the menu
var entry = menu.addMenuItem(0);
// alternatively add a checkbox at the first position
//var entry = menu.addCheckBox(0);
// or alternatively add a radiobutton at the first position
//var entry = menu.addRadioButton(0);

// disable the newly added entry
entry.enabled = false;
// give a name to the entry (the name is not visible anywhere)
entry.name = "my_name";
// make the entry selected (affects checkboxes and radiobuttons)
entry.selected = true;
// set the text of the entry
entry.text = "menu entry";
// set the callback method
entry.setMethod(feedback);
// set the arguments to be sent to the callback method
// (an array of elements which will be passed as arguments 5, 6 and so on to the callback method)
// the first 5 arguments are fixed: 
//	[0] item index
//	[1] parent item index
//	[2] isSelected boolean
//	[3] parent menu text
//	[4] menu text
entry.methodArguments = [17, "data"];
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setMnemonic
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

MenuItem

Unknown macro: {span}

setMnemonic

Unknown macro: {span}

()

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Set the mnemonic key of the menu item/checkbox/radiobutton.

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

MenuItem

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item
var entry = menu.addMenuItem("menu entry", feedback);
// alternatively add a checkbox
//var entry = menu.addCheckBox("menu entry", feedback);
// or alternatively add a radiobutton
//var entry = menu.addRadioButton("menu entry", feedback);

// define an accelerator for the menu entry
entry.setAccelerator("ctrl alt Y");
// also define a mnemonic
entry.setMnemonic("y");
// set a custom background color
entry.setBackgroundColor("#111111");
// set a custom foreground color
entry.setForegroundColor("#EE5555");
// set an icon
entry.setIcon("media:///yourimage.gif");
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {tbody}
Unknown macro: {tr}
Unknown macro: {td}
setVisible
Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {span}

MenuItem

Unknown macro: {span}

setVisible

Unknown macro: {span}

(visible)

Unknown macro: {tr}
Unknown macro: {td}
Unknown macro: {div}

Set the item visible.

Unknown macro: {tr}
Unknown macro: {td}

Parameters

Unknown macro: {div}

{Boolean} visible

Unknown macro: {tr}
Unknown macro: {td}

Returns

Unknown macro: {div}

MenuItem

Unknown macro: {tr}
Unknown macro: {td}

Sample

Unknown macro: {div}
// add a new menu to the menubar
var menubar = plugins.window.getMenuBar();
var menu = menubar.addMenu();
menu.text = "New Menu";
// alternatively create a popup menu
//var menu = plugins.window.createPopupMenu();

// add a menu item
var entry_one = menu.addMenuItem("an entry", feedback);
// add a checkbox
var entry_two = menu.addCheckBox("another entry", feedback);
// add a radiobutton
var entry_three = menu.addRadioButton("yet another entry", feedback);

// hide the menu item
entry_one.setVisible(false);
// make sure the checkbox is visible
entry_two.setVisible(true);
// hide the radiobutton
entry_three.setVisible(false);
Unknown macro: {tr}
Unknown macro: {td}
  • No labels