|
1 /* |
|
2 * Copyright (c) 2003-2005 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: Declares AIW Menu utilities for providers to access consumer menu. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef _AIW_MENUBINDING_H |
|
22 #define _AIW_MENUBINDING_H |
|
23 |
|
24 #include "AiwServiceIfMenu.h" |
|
25 #include "AiwBinding.h" |
|
26 |
|
27 /** |
|
28 * This utility class is used for binding a set of providers to a menu placeholder. |
|
29 */ |
|
30 NONSHARABLE_CLASS(CAiwMenuBinding) : public CAiwBinding |
|
31 { |
|
32 public: |
|
33 static CAiwMenuBinding* NewL(); |
|
34 static CAiwMenuBinding* NewL(TInt aMenuItemIndex, TInt aMenuId); |
|
35 static CAiwMenuBinding* NewLC(); |
|
36 static CAiwMenuBinding* NewLC(TInt aMenuItemIndex, TInt aMenuId); |
|
37 |
|
38 virtual ~CAiwMenuBinding(); |
|
39 |
|
40 inline void SetMenuItemIndex(TInt aMenuItemIndex); |
|
41 inline TInt MenuItemIndex() const; |
|
42 inline CAiwServiceIfMenu* MenuProvider(TInt aIndex); |
|
43 inline TInt MenuCmd() const; |
|
44 inline void SetMenuCmd(TInt aMenuCmd); |
|
45 inline TInt MenuId(); |
|
46 inline void SetMenuId(TInt aId); |
|
47 inline void SetMenuPane(CAiwMenuPane* aPane); |
|
48 inline CAiwMenuPane* MenuPane(); |
|
49 |
|
50 private: |
|
51 CAiwMenuBinding(); |
|
52 CAiwMenuBinding(TInt aMenuItemIndex, TInt aParentId); |
|
53 void ConstructL(); |
|
54 |
|
55 private: |
|
56 TInt iMenuItemIndex; |
|
57 TInt iMenuCmd; |
|
58 TInt iMenuId; |
|
59 CAiwMenuPane* iMenuPane; |
|
60 }; |
|
61 |
|
62 #include "AiwMenuBinding.inl" |
|
63 |
|
64 #endif // _AIW_MENUBINDING_H |
|
65 |
|
66 // End of file |