|
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: ESMR observer for the custom list component |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MESMRLISTOBSERVER_H |
|
19 #define MESMRLISTOBSERVER_H |
|
20 |
|
21 //<cmail> |
|
22 #include "esmrdef.h" |
|
23 //</cmail> |
|
24 |
|
25 class CESMRField; |
|
26 |
|
27 /** |
|
28 * Observer interface for the custom list pane. |
|
29 * |
|
30 * @see cesmrlistpane.h |
|
31 * @lib esmrgui.lib |
|
32 */ |
|
33 class MESMRListObserver |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Method to be called when field wants to notify that its size has changed. |
|
38 * By calling this, all the positions and sizes in the list are recalculated |
|
39 * |
|
40 * @param aCtrl - caller field. |
|
41 */ |
|
42 virtual void ControlSizeChanged( CESMRField* aCtrl ) = 0; |
|
43 |
|
44 /** |
|
45 * Sets field to be visible in the list. |
|
46 * |
|
47 * @param aField - id of the field. |
|
48 */ |
|
49 virtual void ShowControl( TESMREntryFieldId aField ) = 0; |
|
50 |
|
51 /** |
|
52 * Disables field in the list. This method does not delete field. |
|
53 * |
|
54 * @param aField - id of the field. |
|
55 */ |
|
56 virtual void HideControl( TESMREntryFieldId aField ) = 0; |
|
57 |
|
58 /** |
|
59 * Is field visible or not. |
|
60 * |
|
61 * @return Boolean ETrue/EFalse |
|
62 */ |
|
63 virtual TBool IsControlVisible( TESMREntryFieldId aField ) = 0; |
|
64 |
|
65 /** |
|
66 * Sets field to be focused. |
|
67 * |
|
68 * @param aField - id of the field. |
|
69 */ |
|
70 virtual void SetControlFocusedL( TESMREntryFieldId aField ) = 0; |
|
71 |
|
72 /** |
|
73 * Scrolls the specific field to be fully visible |
|
74 * |
|
75 * @param aInd Index of the field that needs to be fully visible |
|
76 */ |
|
77 virtual void ScrollControlVisible( TInt aInd ) = 0; |
|
78 |
|
79 /** |
|
80 * Returns the height of the whole field container area containing all visible fields |
|
81 * |
|
82 * @return World height. |
|
83 */ |
|
84 virtual TInt ListHeight() = 0; |
|
85 |
|
86 /** |
|
87 * Returns ETrue if focused fields bottom is visible, otherwise EFalse |
|
88 * |
|
89 * @return Boolean ETrue/EFalse |
|
90 */ |
|
91 virtual TBool IsFocusedControlsBottomVisible() = 0; |
|
92 |
|
93 /** |
|
94 * Moves fields the amount of pixels given. |
|
95 * |
|
96 * @param aAmount, amount of the movement in pixels. Positive down, negative up. |
|
97 */ |
|
98 virtual void RePositionFields( TInt aAmount ) = 0; |
|
99 |
|
100 /** |
|
101 * Return viewable areas rect, which in other words is |
|
102 * listpanes rect. |
|
103 * |
|
104 * @return TRect, rect of the viewable area. |
|
105 */ |
|
106 virtual TRect ViewableAreaRect() = 0; |
|
107 }; |
|
108 |
|
109 #endif // MESMRLISTOBSERVER_H |