Source: menu.js

/*************************************************************
 *
 *  Copyright (c) 2015-2016 The MathJax Consortium
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
/**
 * @fileoverview Interface specification for context menus.
 *
 * @author volker.sorge@gmail.com (Volker Sorge)
 */
/**
 * @interface
 * @extends {Postable}
 */
Menu = function() {}

/**
     * Returns the items in that menu.
     * @return {Array.<Item>} The array of items.
     */
Menu.prototype.getItems = function() {};

/**
     * Returns the currently focused Item.
     * @return {Item} The focused Item.
     */
Menu.prototype.getFocused = function() {};

/**
     * Sets the currently focused Item.
     * @param {Item} item The new focused Item.
     */
Menu.prototype.setFocused = function() {};

/**
     * @return {VariablePool<string | boolean>} The variable pool associated to
     *     this menu.
     */
Menu.prototype.getPool = function() {};

/**
     * Unposts all submenus of this menu.
     */
Menu.prototype.unpostSubmenus = function() {};

/**
     * Retrieves a menu item via its id by depth-first search.
     * @param {string} id The item id.
     * @return {?Item} The item if it exists.
     */
Menu.prototype.find = function() {};

/**
     * Generates the HTML element containing the menu entries.
     */
Menu.prototype.generateMenu = function() {};