webengine/widgetengine/inc/MenuFuncs.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2004 Nokia Corporation 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 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __MENUFUNCS_H
       
    21 #define __MENUFUNCS_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "config.h"
       
    25 #include <e32base.h>
       
    26 #include <kjs/object.h>
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // MACROS
       
    31 
       
    32 // DATA TYPES
       
    33 
       
    34 // FUNCTION PROTOTYPES
       
    35 
       
    36 // CLASS DECLARATION
       
    37 class MJSMenuCallbacks;
       
    38 
       
    39 /**
       
    40 *  CMenu
       
    41 *
       
    42 *  @lib widgetengine.dll
       
    43 *  @since 3.1
       
    44 */
       
    45 namespace KJS {
       
    46 
       
    47 class WidgetEventHandler;
       
    48 
       
    49 class JSMenuFunc : public JSObject
       
    50 {
       
    51     public:
       
    52         JSMenuFunc(ExecState* exec, MJSMenuCallbacks* callbacks, int aFunctionIndex);
       
    53         ~JSMenuFunc();
       
    54         
       
    55     //From JSObject
       
    56     public:
       
    57         bool implementsCall() const;
       
    58         JSValue* callAsFunction(ExecState *exec, JSObject *thisObj, const List &args);
       
    59         
       
    60         enum {
       
    61             Append,
       
    62             Remove,
       
    63             GetMenuItemById,
       
    64             GetMenuItemByName,
       
    65             SetRightSoftKeyLabel,
       
    66             ToString,
       
    67             HideSoftkeys,
       
    68             ShowSoftkeys,
       
    69             Location,
       
    70             SetLeftSoftKeyLabel
       
    71             };
       
    72 
       
    73     private:
       
    74         MJSMenuCallbacks*        m_callbacks;  //not owned
       
    75         int                      m_functionId;
       
    76 };
       
    77 
       
    78 
       
    79 };
       
    80 
       
    81 #endif