|
1 /* |
|
2 * Copyright (c) 2006 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: This class represents the Widget Extension object |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "MenuItemClient.h" |
|
20 #include "WidgetEventHandler.h" |
|
21 |
|
22 // EXTERNAL DATA STRUCTURES |
|
23 |
|
24 // EXTERNAL FUNCTION PROTOTYPES |
|
25 |
|
26 // CONSTANTS |
|
27 |
|
28 // MACROS |
|
29 |
|
30 // LOCAL CONSTANTS AND MACROS |
|
31 |
|
32 // MODULE DATA STRUCTURES |
|
33 |
|
34 // LOCAL FUNCTION PROTOTYPES |
|
35 |
|
36 // ---------------------------------------------------------------------------- |
|
37 // CMenuItem::NewL |
|
38 // |
|
39 // |
|
40 // |
|
41 // ---------------------------------------------------------------------------- |
|
42 // |
|
43 CMenuItem* CMenuItem::NewL( |
|
44 const TDesC16& aText, TInt aCmdId, TInt aInternalId, TBool aDimmed, |
|
45 CMenuItem* aParent, void* aObj, TBool aShow ) |
|
46 { |
|
47 CMenuItem* self = new ( ELeave ) CMenuItem( |
|
48 aText, aCmdId, aInternalId, aDimmed, aParent, aObj, aShow ); |
|
49 CleanupStack::PushL( self ); |
|
50 self->ConstructL(); |
|
51 CleanupStack::Pop(); |
|
52 return self; |
|
53 } |
|
54 |
|
55 // ---------------------------------------------------------------------------- |
|
56 // CMenuItem::CMenuItem |
|
57 // |
|
58 // |
|
59 // |
|
60 // ---------------------------------------------------------------------------- |
|
61 // |
|
62 CMenuItem::CMenuItem( |
|
63 const TDesC16& aText, TInt aCmdId, TInt aInternalId, TBool aDimmed, |
|
64 CMenuItem* aParent, void* aObj, TBool aShow ) |
|
65 :iCmdId( aCmdId ), |
|
66 iInternalId( aInternalId ), |
|
67 iParent( aParent ), |
|
68 iDimmed( aDimmed ), |
|
69 iObj( aObj ), |
|
70 iShow( aShow ) |
|
71 { |
|
72 iText = aText.Alloc(); |
|
73 iFirstChild = NULL; |
|
74 iNextSibling = NULL; |
|
75 iCallback = NULL; |
|
76 } |
|
77 |
|
78 // ---------------------------------------------------------------------------- |
|
79 // CMenuItem::ConstructL |
|
80 // |
|
81 // |
|
82 // |
|
83 // ---------------------------------------------------------------------------- |
|
84 // |
|
85 void CMenuItem::ConstructL() |
|
86 { |
|
87 } |
|
88 |
|
89 // ---------------------------------------------------------------------------- |
|
90 // CMenuItem::~CMenuItem |
|
91 // |
|
92 // |
|
93 // |
|
94 // ---------------------------------------------------------------------------- |
|
95 // |
|
96 CMenuItem::~CMenuItem() |
|
97 { |
|
98 delete iText; |
|
99 } |
|
100 |
|
101 |
|
102 //END OF FILE |
|
103 |
|
104 |