|
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: CCalenWeekLBView customized key action of |
|
15 * CFormattedCellListBoxView, and customized scrolling |
|
16 * for event indicator. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 #ifndef CALENWEEKLBVIEW_H |
|
23 #define CALENWEEKLBVIEW_H |
|
24 |
|
25 // INCLUDES |
|
26 #include <eikfrlb.h> |
|
27 #include <eikfrlbd.h> // For MListBoxAnimBackgroundDrawer |
|
28 |
|
29 // CLASS DEFINITIONS |
|
30 |
|
31 /** |
|
32 * Customized key action of CFormattedCellListBoxView. |
|
33 * Customized scrolling for event indicator |
|
34 */ |
|
35 NONSHARABLE_CLASS( CCalenWeekLBView ) : |
|
36 public CFormattedCellListBoxView, |
|
37 public MListBoxAnimBackgroundDrawer |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * C++ default constructor. |
|
43 */ |
|
44 CCalenWeekLBView(); |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CCalenWeekLBView(); |
|
49 |
|
50 public: // New function |
|
51 /** |
|
52 * Sets current Column |
|
53 * @param aColumn New current colunm |
|
54 * @param aRedraw ETrue : Draw now |
|
55 */ |
|
56 void SetColumn(TInt aColumn, TBool aRedraw = EFalse); |
|
57 /** |
|
58 * Gets current Column |
|
59 * @return current Column |
|
60 */ |
|
61 TInt Column() const; |
|
62 |
|
63 // Implementation of MListBoxAnimBackgroundDrawer |
|
64 TBool DrawHighlightAnimBackground( CFbsBitGc& aGc ) const; |
|
65 |
|
66 |
|
67 /** |
|
68 * Handle move from pointer event (touch ui) |
|
69 */ |
|
70 void PointerMoveToItemL(TInt aNewColumn); |
|
71 |
|
72 |
|
73 private: // New function |
|
74 /** |
|
75 * Calls form MoveCursorL(). |
|
76 * Left/Right arrow key handing function |
|
77 * @param aTargetSubCellIndex New current colunm |
|
78 * @param TSelectionMode ListBox selection mode |
|
79 */ |
|
80 void HorizontalMoveToItemL(TInt aTargetSubCellIndex, |
|
81 TSelectionMode aSelectionMode); |
|
82 /** |
|
83 * Check column existence |
|
84 * @param aColumn Column index |
|
85 * @return ETrue : A column exists |
|
86 */ |
|
87 TBool ColumnExist(TInt aColumn); |
|
88 |
|
89 private: // from CEikListBoxView |
|
90 /** |
|
91 * From CEikListBoxView Handling cursor move |
|
92 */ |
|
93 void MoveCursorL(TCursorMovement aCursorMovement, |
|
94 TSelectionMode aSelectionMode); |
|
95 /** |
|
96 * From CEikListBoxView Drawing all visible item |
|
97 */ |
|
98 //lint -e{1735} suppressed: default parameter is in original definition |
|
99 void Draw(const TRect* aClipRect = NULL) const; |
|
100 /** |
|
101 * From CEikListBoxView Drawing item |
|
102 */ |
|
103 void DrawItem(TInt aItemIndex) const; |
|
104 |
|
105 private: // data |
|
106 TInt iColumn; |
|
107 }; |
|
108 |
|
109 #endif // CALENWEEKLBVIEW_H |
|
110 |
|
111 |
|
112 // End of File |