Модуль для работы с интерфейсом Поддерживает только JsMB-Interpreter и NW.JS
Kind: global namespace
Author: PROPHESOR
Внимание! Если вы используете стандартную реализацию - префикс JsMB.
писать не обязательно.
- $Interface :
object
- .menuAdd(name, title, onClick, [type], [fortype]) ⇒
this
- .menuShow(name, x, y) ⇒
this
- .menuAddSeparator(name) ⇒
this
- .menuBarAdd(name, title, subMenu) ⇒
this
- .menuBarShow(name) ⇒
this
- .getClipboard([type]) ⇒
string
- .setClipboard(value, [type]) ⇒
this
- .clearClipboard() ⇒
this
- .menuTrayAdd([name], title, icon, menu) ⇒
this
- .fullScreen(mode) ⇒
this
- .menuAdd(name, title, onClick, [type], [fortype]) ⇒
Добавить пункт в контекстное меню
Kind: static method of $Interface
Param | Type | Description |
---|---|---|
name | string |
ID название меню |
title | string |
Текст пункта меню |
onClick | function |
Функция выполнится при нажатии на пункт меню |
[type] | string |
Тип меню (subMenu, checkbox, separator) |
[fortype] | string |
Родительское меню для subMenu |
Отобразить контекстное меню
Kind: static method of $Interface
Param | Type | Description |
---|---|---|
name | string |
ID название меню |
x | number |
XY координата |
y | number |
XY координата |
Добавляет разделитель в меню
Kind: static method of $Interface
Param | Type | Description |
---|---|---|
name | string |
ID название меню |
Добавляет меню в меню-бар
Kind: static method of $Interface
Param | Type | Description |
---|---|---|
name | string |
ID название меню-бара |
title | string |
Заголовок меню |
subMenu | string |
ID название меню |
Отобразить меню-бар на экране
Kind: static method of $Interface
Param | Type | Description |
---|---|---|
name | string |
ID название меню-бара |
Получить данные из буфера обмена
Kind: static method of $Interface
Param | Type | Default | Description |
---|---|---|---|
[type] | string |
"'text'" |
Тип получаемых данных |
Поместить данные в буфер обмена
Kind: static method of $Interface
Param | Type | Default | Description |
---|---|---|---|
value | string |
Данные для помещения | |
[type] | string |
"'text'" |
Тип данных |
Очищает буфер обмена
Kind: static method of $Interface
Добавить пункт в трэй
Kind: static method of $Interface
Param | Type | Description |
---|---|---|
[name] | string |
ID название трэя |
title | string |
Текст при удерживании мыши |
icon | string |
Иконка |
menu | string |
ID название открывающегося меню |
Переключить полноэкранный режим
Kind: static method of $Interface
Param | Type | Description |
---|---|---|
mode | bool |
true - включить, false - отключить |