Skip to content

Instantly share code, notes, and snippets.

@PROPHESSOR
Last active January 24, 2018 06:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PROPHESSOR/d8a03ba6c737912afc2e738e8da9aa69 to your computer and use it in GitHub Desktop.
Save PROPHESSOR/d8a03ba6c737912afc2e738e8da9aa69 to your computer and use it in GitHub Desktop.
Документация для модуля $Interface

$Interface : object

Модуль для работы с интерфейсом Поддерживает только JsMB-Interpreter и NW.JS

Kind: global namespace
Author: PROPHESOR

Внимание! Если вы используете стандартную реализацию - префикс JsMB. писать не обязательно.

JsMB.menuAdd(name, title, onClick, [type], [fortype]) ⇒ this

Добавить пункт в контекстное меню

Kind: static method of $Interface

Param Type Description
name string ID название меню
title string Текст пункта меню
onClick function Функция выполнится при нажатии на пункт меню
[type] string Тип меню (subMenu, checkbox, separator)
[fortype] string Родительское меню для subMenu

JsMB.menuShow(name, x, y) ⇒ this

Отобразить контекстное меню

Kind: static method of $Interface

Param Type Description
name string ID название меню
x number XY координата
y number XY координата

JsMB.menuAddSeparator(name) ⇒ this

Добавляет разделитель в меню

Kind: static method of $Interface

Param Type Description
name string ID название меню

JsMB.menuBarAdd(name, title, subMenu) ⇒ this

Добавляет меню в меню-бар

Kind: static method of $Interface

Param Type Description
name string ID название меню-бара
title string Заголовок меню
subMenu string ID название меню

JsMB.menuBarShow(name) ⇒ this

Отобразить меню-бар на экране

Kind: static method of $Interface

Param Type Description
name string ID название меню-бара

JsMB.getClipboard([type]) ⇒ string

Получить данные из буфера обмена

Kind: static method of $Interface

Param Type Default Description
[type] string "'text'" Тип получаемых данных

JsMB.setClipboard(value, [type]) ⇒ this

Поместить данные в буфер обмена

Kind: static method of $Interface

Param Type Default Description
value string Данные для помещения
[type] string "'text'" Тип данных

JsMB.clearClipboard() ⇒ this

Очищает буфер обмена

Kind: static method of $Interface

JsMB.menuTrayAdd([name], title, icon, menu) ⇒ this

Добавить пункт в трэй

Kind: static method of $Interface

Param Type Description
[name] string ID название трэя
title string Текст при удерживании мыши
icon string Иконка
menu string ID название открывающегося меню

JsMB.fullScreen(mode) ⇒ this

Переключить полноэкранный режим

Kind: static method of $Interface

Param Type Description
mode bool true - включить, false - отключить
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment