JSRootMenu

JSRootMenu

(private) new JSRootMenu()

Abstract class for creating context menu

Description:
Source:

Methods

(private) addAlignMenu()

Add align selection menu

Source:

(private) addAttributesMenu()

Fill context menu for graphical attributes in painter

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) addSelectMenu(name, values, value, set_func)

Add selection menu entries

Source:
Parameters:
Name Type Description
name String

name of submenu

values Array

array of string entries used as list for selection

value String | Number

currently elected value, either name or index

set_func function

function called when item selected, either name or index depending from value parameter

(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)

Add checked menu item

Source:
Parameters:
Name Type Description
flag boolean

flag

name string

item name

func function

func called when item is selected

(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

getEventPosition()

Returns object with mouse event position when context menu was actiavted

Description:
  • Return object will have members 'clientX' and 'clientY'

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 dialg

Type
Promise

(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: