|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Logs "Event list" view container control class implementation |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __Logs_App_CLogsEventListControlContainer_H__ |
|
21 #define __Logs_App_CLogsEventListControlContainer_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include "CLogsBaseControlContainer.h" |
|
25 |
|
26 // CONSTANTS |
|
27 |
|
28 // MACROS |
|
29 |
|
30 // DATA TYPES |
|
31 |
|
32 // FUNCTION PROTOTYPES |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CLogsEventListView; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * Logs "Event list" view container control class implementation. |
|
41 */ |
|
42 class CLogsEventListControlContainer : public CLogsBaseControlContainer |
|
43 { |
|
44 public: // construction |
|
45 /** |
|
46 * Standard creation function. |
|
47 * |
|
48 * @param aView Parent view. |
|
49 * @param aRect rect size |
|
50 * @return new object |
|
51 */ |
|
52 static CLogsEventListControlContainer* NewL |
|
53 ( CLogsEventListView* aView |
|
54 , const TRect& aRect |
|
55 ); |
|
56 |
|
57 /** |
|
58 * Destructor. Deletes child controls. |
|
59 */ |
|
60 ~CLogsEventListControlContainer(); |
|
61 |
|
62 private: // construction |
|
63 /** |
|
64 * C++ constructor |
|
65 * @param aView Parent view. |
|
66 */ |
|
67 CLogsEventListControlContainer ( CLogsEventListView* aView ); |
|
68 |
|
69 /** |
|
70 * Constructor, second phase. |
|
71 * |
|
72 * @param aRect rect size |
|
73 */ |
|
74 void ConstructL( const TRect& aRect ); |
|
75 |
|
76 public: |
|
77 /** |
|
78 * Returns the iListBox. |
|
79 * @return listbox |
|
80 */ |
|
81 CAknSingleGraphicHeadingStyleListBox* ListBox(); |
|
82 |
|
83 /** |
|
84 * Returns the View. |
|
85 * @return view |
|
86 */ |
|
87 CLogsEventListView* View(); |
|
88 |
|
89 /** |
|
90 * Update contents |
|
91 */ |
|
92 void UpdateL(); |
|
93 |
|
94 protected: // from CCoeControl |
|
95 /** |
|
96 * Returns the child controls at aIndex. |
|
97 * |
|
98 * @param aIndex control index |
|
99 * @return Sub control from the aIndex. |
|
100 */ |
|
101 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
102 |
|
103 /** |
|
104 * Called when control's size changed. |
|
105 */ |
|
106 void SizeChanged(); |
|
107 |
|
108 void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
109 |
|
110 protected: // CLogsBaseControlContainer |
|
111 /** |
|
112 * Called from HandleResourceChange. Calls AddIconL funtion |
|
113 * for each icon in the list box. |
|
114 * |
|
115 */ |
|
116 void AddControlContainerIconsL(); |
|
117 |
|
118 private: // operations |
|
119 /** |
|
120 * Set the empty view text. |
|
121 */ |
|
122 void UpdateEmptyViewTextL(); |
|
123 |
|
124 /** |
|
125 * Inits the listbox top & current item index. |
|
126 */ |
|
127 void InitListBoxL(); |
|
128 |
|
129 /** |
|
130 * Handles focus change events. This will hand over focus changes to list so that |
|
131 * focus animations are displayed on the list. |
|
132 */ |
|
133 void FocusChanged(TDrawNow aDrawNow); |
|
134 |
|
135 |
|
136 private: // data |
|
137 /// Own: ListBox control |
|
138 CAknSingleGraphicHeadingStyleListBox* iListBox; |
|
139 |
|
140 /// Ref: Pointer to parent view. |
|
141 CLogsEventListView* iView; |
|
142 }; |
|
143 |
|
144 #endif // __Logs_App_CLogsEventListControlContainer_H__ |
|
145 |
|
146 |
|
147 // End of File |
|
148 |