org.symbian.tools.wrttools/libraries/core/menu.js
changeset 216 914d053d42b1
child 224 b408478166d3
equal deleted inserted replaced
215:c9394af976fe 216:914d053d42b1
       
     1 /**
       
     2  * Copyright (c) 2009-2010 Symbian Foundation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the License "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Symbian Foundation - initial contribution.
       
    11  * Contributors:
       
    12  */
       
    13 
       
    14 function Menu() {};
       
    15 Menu.prototype = new Object();
       
    16 Menu.prototype.menu = new Menu();
       
    17 
       
    18 /**
       
    19  * Adds a menu item to the top level of the options menu list.
       
    20  * @param {MenuItem}
       
    21  * @return {Void}
       
    22  */
       
    23 Menu.prototype.append = function(MenuItem)	{};
       
    24 	
       
    25 	
       
    26 /**
       
    27  * Removes menu item from options menu list. If the 
       
    28  * removed menu item has a cascading submenu in it, 
       
    29  * the submenu will also be removed.
       
    30  * @param {MenuItem}
       
    31  * @return {Void}
       
    32  */
       
    33 Menu.prototype.remove = function(MenuItem) {};
       
    34 
       
    35 /**
       
    36  * Retrieves handle of the menu item instance by its ID 
       
    37  * @param {Integer}
       
    38  * @return {MenuItem}
       
    39  */
       
    40 Menu.prototype.getMenuItemById = function(id) {
       
    41 	return new MenuItem();
       
    42 };
       
    43 
       
    44 /**
       
    45  * Retrieves handle of the menu item instance by its ID 
       
    46  * @param {String}
       
    47  * @return {MenuItem}
       
    48  */
       
    49 Menu.prototype.getMenuItemByName = function(name) {
       
    50 	return new MenuItem();
       
    51 };
       
    52 
       
    53 /**
       
    54  * Customizes label and operation associated with right softkey.
       
    55  */
       
    56 Menu.prototype.setRightSoftkeyLabel = function(label, callback) {};
       
    57 
       
    58 /**
       
    59  * Customizes label and operation associated with right softkey.
       
    60  */
       
    61 Menu.prototype.setLeftSoftkeyLabel = function(label, callback) {};
       
    62 	
       
    63 /**
       
    64  * Displays the softkeys.
       
    65  */
       
    66 Menu.prototype.showSoftkeys = function() {};
       
    67 
       
    68 /**
       
    69  * Displays the softkeys.
       
    70  */
       
    71 Menu.prototype.hideSoftkeys = function() {};
       
    72 
       
    73 /**
       
    74  * Removes all items from the options menu pane. This operation 
       
    75  * will also clear all submenus if such exist.
       
    76  */
       
    77 Menu.prototype.clear = function() {};
       
    78 
       
    79 /**
       
    80  * The onShow property of the menu object is an event handler 
       
    81  * for the event of when the options menu is open.
       
    82  */
       
    83 Menu.prototype.onShow = new Object();
       
    84 
       
    85 
       
    86 /**
       
    87  * Creates and instantiates an instance of the MenuItem object.
       
    88  */
       
    89 function MenuItem(name, id) {};
       
    90 MenuItem.prototype = new Object();
       
    91 
       
    92 
       
    93 /**
       
    94  * Adds a child menu item to the parent menu item in the options 
       
    95  * menu list. This results in the creation of a submenu list in 
       
    96  * the menu tree. 
       
    97  */
       
    98 MenuItem.prototype.append = function(childMenuItem) {}
       
    99 
       
   100 
       
   101 /**
       
   102  * Removes a child menu item and its children (if any) from the parent menu item.
       
   103  */
       
   104 MenuItem.prototype.remove = function(childMenuItem) {}
       
   105 
       
   106 /**
       
   107  * Call the setDimmed method to show or hide an existing menu item.
       
   108  */
       
   109 MenuItem.prototype.setDimmed = function(flag) {}
       
   110 
       
   111 /**
       
   112  * Event handler for the event when the menu item is selected.
       
   113  */
       
   114 MenuItem.prototype.onSelect = new Object();