|
1 /* |
|
2 * Copyright (c) 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: This file contains CTestSetBaseMenuContainer |
|
15 * class declaration. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef CTestSetBaseMenuContainer_H |
|
20 #define CTestSetBaseMenuContainer_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <coecntrl.h> |
|
24 #include <eiklbo.h> |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 //class CEikLabel; // for example labels |
|
29 class CEikTextListBox; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * CTestSetBaseMenuContainer container control class. |
|
35 * |
|
36 */ |
|
37 class CTestSetBaseMenuContainer : public CCoeControl |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Symbian OS default constructor. |
|
43 * @param aRect Frame rectangle for container. |
|
44 * @return Observer for list box. |
|
45 */ |
|
46 void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver); |
|
47 |
|
48 /** |
|
49 * Destructor. |
|
50 */ |
|
51 ~CTestSetBaseMenuContainer(); |
|
52 |
|
53 public: // New functions |
|
54 |
|
55 /** |
|
56 * Get currently selected items index. |
|
57 * @return Current item index. |
|
58 */ |
|
59 TInt GetActiveLine(); |
|
60 |
|
61 /** |
|
62 * Stores current position of focus of iListBox to the CAppUiAppUi object |
|
63 */ |
|
64 void SaveActiveLine(); |
|
65 |
|
66 public: // Functions from base classes |
|
67 |
|
68 /** |
|
69 * Method HandleSelectedListItemL handles valix index. |
|
70 * @param TInt aIndex |
|
71 * @return nothing |
|
72 */ |
|
73 void HandleSelectedListItemL( TInt aIndex ); |
|
74 |
|
75 private: // Functions from base classes |
|
76 |
|
77 /** |
|
78 * From CoeControl,SizeChanged. |
|
79 * Called by framework when the view size is changed. |
|
80 */ |
|
81 void SizeChanged(); |
|
82 |
|
83 /** |
|
84 * From CoeControl,CountComponentControls. |
|
85 * Gets a count of the component controls of this list box control. |
|
86 * This information is used for DrawNow(). |
|
87 */ |
|
88 TInt CountComponentControls() const; |
|
89 |
|
90 /** |
|
91 * From CCoeControl,ComponentControl. |
|
92 * Gets a pointer to the specified component control. |
|
93 * @param aIndex Index of the component control to look up. |
|
94 * @return The control at aIndex. |
|
95 */ |
|
96 CCoeControl* ComponentControl(TInt aIndex) const; |
|
97 |
|
98 /** |
|
99 * From CCoeControl,Draw. |
|
100 * Draw a control, called by window server. |
|
101 * @param aRect The region of the control to be redrawn. Co-ordinates |
|
102 * are relative to the control's origin (top left corner). |
|
103 */ |
|
104 void Draw(const TRect& aRect) const; |
|
105 |
|
106 /** |
|
107 * From CCoeControl,OfferKeyEventL |
|
108 * Handles key events. |
|
109 * @param aKeyEvent The key event. |
|
110 * @param aType The type of key event. |
|
111 * @return Indicates whether or not the key event was used |
|
112 * by this control. |
|
113 */ |
|
114 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
|
115 |
|
116 |
|
117 private: //data |
|
118 |
|
119 CEikTextListBox* iListBox; |
|
120 }; |
|
121 |
|
122 #endif // CTestSetBaseMenuContainer_H |
|
123 |
|
124 // End of File |