64
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 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: Take care of touch event handling and component states.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef C_EUIEMAILLISTTOUCHMANAGER_H
|
|
19 |
#define C_EUIEMAILLISTTOUCHMANAGER_H
|
|
20 |
|
|
21 |
#include <e32base.h>
|
|
22 |
|
|
23 |
#include "fscontrolbarobserver.h"
|
|
24 |
#include "fstreelistobserver.h"
|
|
25 |
|
|
26 |
class CFSEmailUiMailListVisualiser;
|
|
27 |
|
|
28 |
/**
|
|
29 |
* Part of FreestyleEmailUi application.
|
|
30 |
* Helper class for touch management to handling different touch events.
|
|
31 |
*
|
|
32 |
* @code
|
|
33 |
* CEUiEmailListTouchManager* manager = CEUiEmailListTouchManager::NewL(*this);
|
|
34 |
* CFsControlBar* controlBar = CFsControlBar::NewL( iEnv );
|
|
35 |
* controlBar->AddObserverL( *manager );
|
|
36 |
* @endcode
|
|
37 |
*
|
|
38 |
* @lib FreestyleEmailUi.exe
|
|
39 |
* @since S60 v9.1
|
|
40 |
*/
|
|
41 |
class CEUiEmailListTouchManager : public CBase,
|
|
42 |
public MFsControlBarObserver,
|
|
43 |
public MFsTreeListObserver
|
|
44 |
{
|
|
45 |
public:
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Two-phased constructor.
|
|
49 |
*
|
|
50 |
* @param aVisualiser Reference to the mail list visualiser.
|
|
51 |
*/
|
|
52 |
static CEUiEmailListTouchManager* NewL(
|
|
53 |
CFSEmailUiMailListVisualiser& aVisualiser);
|
|
54 |
|
|
55 |
/**
|
|
56 |
* Destructor.
|
|
57 |
*/
|
|
58 |
~CEUiEmailListTouchManager();
|
|
59 |
|
|
60 |
/**
|
|
61 |
* Disable/Activate manager
|
|
62 |
*
|
|
63 |
* @since S60 v9.1
|
|
64 |
* @param TBool for state.
|
|
65 |
*/
|
|
66 |
void SetDisabled(TBool aState);
|
|
67 |
|
|
68 |
private:
|
|
69 |
|
|
70 |
// from base class MFsControlBarObserver
|
|
71 |
|
|
72 |
/**
|
|
73 |
* From MFsControlBarObserver.
|
|
74 |
* Invoked when event occurs.
|
|
75 |
*
|
|
76 |
* @param aEvent event type.
|
|
77 |
* @param aData additional data. For EButton - id of pressed button.
|
|
78 |
*/
|
|
79 |
void HandleControlBarEvent(TFsControlBarEvent aEvent, TInt aData);
|
|
80 |
|
|
81 |
// from base class MFsTreeListObserver
|
|
82 |
|
|
83 |
/**
|
|
84 |
* From MFsTreeListObserver.
|
|
85 |
* Observer of the tree list is notified of changes in the tree list
|
|
86 |
* through this function.
|
|
87 |
*
|
|
88 |
* @param aEvent Event which happend in the tree list.
|
|
89 |
* @param aId Id of the node/item associated with the event. KFsTreeNoneID
|
|
90 |
* means that the event is not associated with a node/item.
|
|
91 |
*/
|
|
92 |
void TreeListEventL( const TFsTreeListEvent aEvent,
|
|
93 |
const TFsTreeItemId aId,
|
|
94 |
const TPoint& aPoint );
|
|
95 |
|
|
96 |
private:
|
|
97 |
|
|
98 |
CEUiEmailListTouchManager(CFSEmailUiMailListVisualiser& aVisualiser);
|
|
99 |
|
|
100 |
void ConstructL();
|
|
101 |
|
|
102 |
/**
|
|
103 |
* Helper class for handling long tap actions.
|
|
104 |
*
|
|
105 |
* @since S60 v9.1
|
|
106 |
* @param aPoint Coordinates of the long tap event.
|
|
107 |
*/
|
|
108 |
void DoHandleLongTapL( const TPoint& aPoint );
|
|
109 |
|
|
110 |
/**
|
|
111 |
* Helper class for handling actions. (Open viewer, expand/collapse etc.)
|
|
112 |
*
|
|
113 |
* @since S60 v9.1
|
|
114 |
* @param TInt used for pass which folderlist or shortlist should be opened.
|
|
115 |
*/
|
|
116 |
void DoHandleActionL(TInt aData = 0);
|
|
117 |
|
|
118 |
/**
|
|
119 |
* Helper class for changing focus.
|
|
120 |
*
|
|
121 |
* @since S60 v9.1
|
|
122 |
*/
|
|
123 |
void DoHandleTreelistFocusChangeL();
|
|
124 |
|
|
125 |
private:
|
|
126 |
// data
|
|
127 |
|
|
128 |
/**
|
|
129 |
* Mail list visualise
|
|
130 |
* Not own.
|
|
131 |
*/
|
|
132 |
CFSEmailUiMailListVisualiser& iVisualiser;
|
|
133 |
|
|
134 |
/**
|
|
135 |
* Disable actions. Used when folderlist is launched.
|
|
136 |
*/
|
|
137 |
TBool iDisableActions;
|
|
138 |
};
|
|
139 |
|
|
140 |
#endif //C_EUIEMAILLISTTOUCHMANAGER_H
|