summaryrefslogtreecommitdiff
path: root/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/menuitems.md
diff options
context:
space:
mode:
authorRuben Rodriguez <ruben@gnu.org>2015-11-28 15:24:36 -0600
committerRuben Rodriguez <ruben@gnu.org>2015-11-28 16:27:06 -0600
commite4a3586a14996bbece3b26c9e3b7704ea6af8615 (patch)
tree499bdd16b3a90c30b01e4b47a5882d13b4800f50 /data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/menuitems.md
parent4dbc2fae927bb02ef243c87938e638af9afee8fa (diff)
LibreJS upgraded to 6.0.10
Diffstat (limited to 'data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/menuitems.md')
-rw-r--r--data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/menuitems.md66
1 files changed, 66 insertions, 0 deletions
diff --git a/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/menuitems.md b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/menuitems.md
new file mode 100644
index 0000000..2017c9c
--- /dev/null
+++ b/data/extensions/jid1-KtlZuoiikVfFew@jetpack/node_modules/pathfinder/docs/menuitems.md
@@ -0,0 +1,66 @@
+<!-- contributed by Erik Vold [erikvvold@gmail.com] -->
+
+
+The `menuitems` API is a simple way to create
+[Menuitems](https://developer.mozilla.org/en/XUL/PopupGuide/MenuItems), which
+can perform an action when clicked, and display state.
+
+## Example ##
+
+ exports.main = function(options) {
+ // create menuitem for the File menu,
+ // and insert it before the 'Quit' menuitem
+ require("menuitems").Menuitem({
+ id: "myextprefix-some-mi-id",
+ menuid: "menu_FilePopup",
+ insertbefore: "menu_FileQuitItem",
+ "label": _("label"),
+ "accesskey": _("label.ak"),
+ image: self.data.url("icon.png"),
+ className: 'pizazz',
+ disabled: false,
+ checked: false,
+ onCommand: function() {
+ // do something
+ }
+ });
+ };
+
+<api name="Menuitem">
+@class
+
+Module exports `Menuitem` constructor allowing users to create a
+[`menuitem`](https://developer.mozilla.org/en/XUL/menuitem).
+
+<api name="Menuitem">
+@constructor
+Creates a `menuitem`.
+
+@param options {Object}
+ Options for the `menuitem`, with the following parameters:
+
+@prop id {String}
+A id for the `menuitem`, this should be namespaced.
+
+@prop menuid {String}
+The id of the parent `<menu>` node.
+
+@prop label {String}
+A label for the `menuitem`.
+
+@prop image {String}
+A image url for the `menuitem`.
+
+@prop className {String}
+A default space delimited list of class names for the menuitem.
+
+@prop disabled {Boolean}
+When a menuitem is disabled it cannot be used, but is still displayed.
+
+@prop checked {Boolean}
+Displays a check beside the menuitem.
+
+@prop [onCommand] {Function}
+ A option function that is invoked when the `menuitem` is executed.
+</api>
+</api>