|
1 /* |
|
2 * Copyright (c) 2007-2009 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 "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: Meeting request stylus popup menu |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CMRSTYLUSPOPUPMENU_H |
|
19 #define CMRSTYLUSPOPUPMENU_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class MEikMenuObserver; |
|
26 class CAknStylusPopUpMenu; |
|
27 |
|
28 // CLASS DECLARATIONS |
|
29 NONSHARABLE_CLASS( CMRStylusPopupMenu ): public CBase |
|
30 { |
|
31 public: // Types |
|
32 /** |
|
33 * Class for capsulating one menu item in popupmenu |
|
34 */ |
|
35 NONSHARABLE_CLASS( TMenuItem ) |
|
36 { |
|
37 public: |
|
38 IMPORT_C TMenuItem(); |
|
39 IMPORT_C TMenuItem( const TDesC& aTxt, TInt aCommandId ); |
|
40 |
|
41 public: // Data |
|
42 /// Own: Text for the menu item |
|
43 TPtrC iTxt; |
|
44 /// Own: Command id for the menu item |
|
45 TInt iCommandId; |
|
46 }; |
|
47 |
|
48 public: // d'tor & c'tor |
|
49 /** |
|
50 * Static c'tor |
|
51 */ |
|
52 IMPORT_C static CMRStylusPopupMenu* NewL( MEikMenuObserver& aObserver ); |
|
53 |
|
54 /** |
|
55 * D'tor |
|
56 */ |
|
57 IMPORT_C ~CMRStylusPopupMenu(); |
|
58 |
|
59 public: // Interface |
|
60 /** |
|
61 * Launch stylus popup with specified items |
|
62 * @param aItems Array of menu items to be shown in popup menu |
|
63 * @param aPosition Position for the popupmenu |
|
64 */ |
|
65 IMPORT_C void LaunchPopupL( TArray<TMenuItem> aItems, const TPoint &aPosition ); |
|
66 |
|
67 private: // Implementation |
|
68 CMRStylusPopupMenu( MEikMenuObserver& aObserver ); |
|
69 void ConstructL(); |
|
70 |
|
71 private: // Data |
|
72 /// Own: Stylus popup menu |
|
73 CAknStylusPopUpMenu* iPopup; |
|
74 /// Ref: Menu observer |
|
75 MEikMenuObserver& iObserver; |
|
76 }; |
|
77 |
|
78 #endif // CMRSTYLUSPOPUPMENU_H |
|
79 |
|
80 // End of file |