wcMenu (Web Cabin Menu) is a light weight file and toolbar menu system. It is designed to be extremely simple, yet powerful.
- wcMenu is developed and maintained by Jeff Houde (lochemage@webcabin.org).
Dependencies
Begin by including the necessary dependencies:
- JQuery Library version 1.11.1 http://jquery.com/
- Font-Awesome http://fortawesome.github.io/Font-Awesome/
Installation
You can use bower for easy installation using the Node Package Manager
{@lang bash}npm install -g bower
bower install wcMenuOnce installed, all of the source files will now be located in the bower_components folder and ready to link into your project.
You can also download the source files and link them directly.
Basic Implementation
{@lang xml}<!-- Include external dependencies -->
<link rel="stylesheet" type="text/css" href="bower_components/font-awesome/css/font-awesome.css"/>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!-- Include the Core wcMenu Library -->
<link rel="stylesheet" type="text/css" href="bower_components/wcMenu/Build/wcMenu.min.css"/>
<script src="bower_components/wcMenu/Build/wcMenu.min.js"></script>Once the proper files have been included, you can create an instance of wcMenu:
var myMenu = new wcMenu(containerDomNode);Then add some menu options:
// A simple menu option.
myMenu.addOption('File', 'Open', {
hotkeys: 'Alt+O,Shift+O',
icon: "fa fa-folder-open-o fa-lg",
description: "Open a new file.",
toolbarIndex: -1,
onActivated: function(data) {
// Open a file...
}
});For additional information, take a look at the API documentation.