|
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 "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: Declaration of class CCmListbox. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CM_LISTBOX_H |
|
19 #define CM_LISTBOX_H |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <aknlists.h> |
|
23 |
|
24 // FORWARD DECLARATION |
|
25 class CCmListboxModel; |
|
26 |
|
27 /** |
|
28 * Model for the connection methods listbox. It is an array of CCmListItem |
|
29 * pointers; items are owned. |
|
30 * @lib cmmanager.lib |
|
31 * @since S60 v3.2 |
|
32 */ |
|
33 NONSHARABLE_CLASS( CCmListbox ) : public CAknDoubleGraphicStyleListBox |
|
34 { |
|
35 public: // Construct / cmruct |
|
36 |
|
37 /** |
|
38 * Two-phased constructor. Leaves on failure. |
|
39 * @param aParent Parent control. |
|
40 * @return The constructed listbox. |
|
41 */ |
|
42 static CCmListbox* NewL |
|
43 ( const CCoeControl* aParent ); |
|
44 |
|
45 /** |
|
46 * Cmructor. |
|
47 */ |
|
48 virtual ~CCmListbox(); |
|
49 |
|
50 /** |
|
51 * Constructor. |
|
52 */ |
|
53 CCmListbox(); |
|
54 |
|
55 public : |
|
56 /** |
|
57 * Handle key event. |
|
58 * @param aKeyEvent The key event. |
|
59 * @param aType Key event type. |
|
60 * @return Response (was the key event consumed?). |
|
61 */ |
|
62 TKeyResponse OfferKeyEventL |
|
63 ( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
64 |
|
65 /** |
|
66 * Handle focus change. |
|
67 * @param aDrawNow Draw now? |
|
68 */ |
|
69 void FocusChanged( TDrawNow aDrawNow ); |
|
70 |
|
71 /** |
|
72 * Gets the UID from a given item |
|
73 * @param The index of the item |
|
74 * @return The UID of the item given by itemindex |
|
75 */ |
|
76 TUint32 Uid4Item( TInt aItem ) const; |
|
77 |
|
78 /** |
|
79 * Gets the UID of the current item |
|
80 * @return The UID of the current item |
|
81 */ |
|
82 TUint32 CurrentItemUid() const; |
|
83 |
|
84 /** |
|
85 * Gets the name of the current item |
|
86 * @return The name of the current item |
|
87 */ |
|
88 const TDesC& CurrentItemNameL(); |
|
89 |
|
90 // from CCoeControl |
|
91 void HandleResourceChange(TInt aType); |
|
92 }; |
|
93 |
|
94 |
|
95 #endif |
|
96 |
|
97 // End of file |