equal
deleted
inserted
replaced
|
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 __MENUITEMFUNCS_H |
|
21 #define __MENUITEMFUNCS_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 MJSMenuItemCallbacks; |
|
38 |
|
39 /** |
|
40 * CMenuItem |
|
41 * |
|
42 * @lib widgetengine.dll |
|
43 * @since 3.1 |
|
44 */ |
|
45 namespace KJS { |
|
46 |
|
47 class WidgetEventHandler; |
|
48 |
|
49 class JSMenuItemFunc : public JSObject |
|
50 { |
|
51 public: |
|
52 JSMenuItemFunc(ExecState *exec, MJSMenuItemCallbacks* callbacks, int functionIndex ); |
|
53 |
|
54 //From ObjectImp |
|
55 public: |
|
56 bool implementsCall() const; |
|
57 JSValue *callAsFunction(ExecState *exec, JSObject *thisObj, const List &args); |
|
58 |
|
59 enum { |
|
60 Append, |
|
61 Remove, |
|
62 Disable, |
|
63 Enable, |
|
64 ToString |
|
65 }; |
|
66 |
|
67 private: |
|
68 int m_functionId; |
|
69 MJSMenuItemCallbacks* m_callbacks; //not owned |
|
70 }; |
|
71 |
|
72 }; |
|
73 |
|
74 |
|
75 #endif |