(private) new JSRootMenu()
Abstract class for creating context menu
- Description:
Use
createMenu
to create instance of the menu
- Source:
Methods
(private) addAlignMenu()
Add align selection menu
- Source:
(private) addAttributesMenu()
Fill context menu for graphical attributes in painter
- Description:
this method used to fill entries for different attributes of the object like TAttFill, TAttLine, TAttText There is special handling for the frame where attributes handled by the pad
- Source:
(protected) addColorMenu()
Add color selection menu entries
- Source:
(protected) addDrawMenu()
Add draw sub-menu with draw options
- Source:
(private) addFillStyleMenu()
Add fill style menu
- Source:
(private) addFontMenu()
Add font selection menu
- Source:
(private) addLineStyleMenu()
Add line style menu
- Source:
(protected) addPaletteMenu()
Add palette menu entries
- Source:
(protected) addRAttrTextItems()
Add items to change RAttrText
- Source:
(protected) addRColorMenu()
Add RColor selection menu entries
- Source:
(protected) addRebinMenu()
Add rebin menu entries
- Source:
(protected) addRedrawMenu()
Add redraw menu for the painter
- Source:
(protected) addSelectMenu(name, values, value, set_func, titleopt)
Add selection menu entries
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
String | name of submenu |
|
values |
Array | array of string entries used as list for selection |
|
value |
String | Number | currently selected value, either name or index |
|
set_func |
function | function called when item selected, either name or index depending from value parameter |
|
title |
String |
<optional> |
optional title for menu items |
(private) addSettingsMenu()
Fill menu to edit settings properties
- Source:
(protected) addSizeMenu()
Add size selection menu entries
- Source:
(private) addTAxisMenu()
Fill context menu for axis
- Source:
addchk(flag, name, func, titleopt)
Add checked menu item
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
flag |
boolean | flag |
|
name |
string | item name |
|
func |
function | func called when item is selected |
|
title |
string |
<optional> |
optional title |
(async, protected) confirm(title, message) → {Promise}
Show confirm dialog
- Source:
Parameters:
Name | Type | Description |
---|---|---|
title |
String | title |
message |
String | message |
Returns:
with true when 'Ok' pressed or false when 'Cancel' pressed
- Type
- Promise
endsub()
Mark end of submenu
- Source:
getEventPosition()
Returns object with mouse event position when context menu was activated
- Description:
Return object will have members 'clientX' and 'clientY'
- Source:
header()
Add menu header - must be first entry
- Source:
(protected) info(title, message)
Show modal info dialog
- Source:
Parameters:
Name | Type | Description |
---|---|---|
title |
String | title |
message |
String | message |
(async, protected) input(title, value, kindopt) → {Promise}
Input value
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
title |
string | input dialog title |
|
value |
initial value |
||
kind |
string |
<optional> |
use 'text' (default), 'number', 'float' or 'int' |
Returns:
with input value
- Type
- Promise
remove()
Close and remove menu
- Source:
(async, private) runModal() → {Promise}
Run modal dialog
- Source:
Returns:
with html element inside dialog
- Type
- Promise
separator()
Add separator
- Source:
(async) showCommandArgsDialog() → {Promise}
Let input arguments from the Command
- Source:
Returns:
with command argument
- Type
- Promise
(async) showMethodArgsDialog() → {Promise}
Let input arguments from the method
- Source:
Returns:
with method argument
- Type
- Promise
size()
Returns menu size
- Source:
sub()
Add sub-menu
- Source: