63
|
1 |
/*
|
|
2 |
* Copyright (c) 2005-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: Phonebook 2 Group UI extension group view.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef CPGUGROUPVIEW_H
|
|
20 |
#define CPGUGROUPVIEW_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <e32base.h>
|
|
24 |
#include <MPbk2UIExtensionView.h>
|
|
25 |
#include <MPbk2ControlObserver.h>
|
|
26 |
#include <MPbk2StoreConfigurationObserver.h>
|
|
27 |
#include <MPbk2MenuCommandObserver.h>
|
|
28 |
#include <eiklbo.h>
|
|
29 |
|
|
30 |
// FORWARD DECLARATIONS
|
|
31 |
class CPbk2UIExtensionView;
|
|
32 |
class CPbk2NamesListControl;
|
|
33 |
template<class ControlType> class CPbk2ControlContainer;
|
|
34 |
class MPbk2CommandHandler;
|
|
35 |
class MPbk2PointerEventInspector;
|
|
36 |
class CPbk2StoreConfiguration;
|
|
37 |
|
|
38 |
// CLASS DECLARATION
|
|
39 |
|
|
40 |
/**
|
|
41 |
* Phonebook 2 Group UI extension group view.
|
|
42 |
*/
|
|
43 |
class CPguGroupView : public CBase,
|
|
44 |
public MPbk2UIExtensionView,
|
|
45 |
private MPbk2ControlObserver,
|
|
46 |
private MPbk2StoreConfigurationObserver,
|
|
47 |
private MPbk2MenuCommandObserver,
|
|
48 |
public MEikListBoxObserver
|
|
49 |
{
|
|
50 |
public: // Construction and destruction
|
|
51 |
|
|
52 |
/**
|
|
53 |
* Creates a new instance of this class.
|
|
54 |
*
|
|
55 |
* @param aView Phonebook 2 UI Extension view.
|
|
56 |
* @return A new instance of this class.
|
|
57 |
*/
|
|
58 |
static CPguGroupView* NewL(
|
|
59 |
CPbk2UIExtensionView& aView );
|
|
60 |
|
|
61 |
/**
|
|
62 |
* Destructor.
|
|
63 |
*/
|
|
64 |
~CPguGroupView();
|
|
65 |
|
|
66 |
public: // new function
|
|
67 |
|
|
68 |
void CheckUiControlL();
|
|
69 |
|
|
70 |
public: // From MPbk2UIExtensionView
|
|
71 |
void HandleStatusPaneSizeChange();
|
|
72 |
CPbk2ViewState* ViewStateLC() const;
|
|
73 |
TBool HandleCommandKeyL(
|
|
74 |
const TKeyEvent& aKeyEvent,
|
|
75 |
TEventCode aType );
|
|
76 |
void HandlePointerEventL(
|
|
77 |
const TPointerEvent& aPointerEvent );
|
|
78 |
TInt GetViewSpecificMenuFilteringFlagsL() const;
|
|
79 |
void DoActivateL(
|
|
80 |
const TVwsViewId& aPrevViewId,
|
|
81 |
TUid aCustomMessageId,
|
|
82 |
const TDesC8& aCustomMessage );
|
|
83 |
void DoDeactivate();
|
|
84 |
void HandleCommandL(
|
|
85 |
TInt aCommand );
|
|
86 |
void DynInitMenuPaneL(
|
|
87 |
TInt aResourceId,
|
|
88 |
CEikMenuPane* aMenuPane );
|
|
89 |
void HandleLongTapEventL(
|
|
90 |
const TPoint& aPenEventLocation,
|
|
91 |
const TPoint& aPenEventScreenLocation);
|
|
92 |
|
|
93 |
protected:
|
|
94 |
// from MEikListBoxObserver
|
|
95 |
void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
|
|
96 |
|
|
97 |
|
|
98 |
private: // From MPbk2ControlObserver
|
|
99 |
void HandleControlEventL(
|
|
100 |
MPbk2ContactUiControl& aControl,
|
|
101 |
const TPbk2ControlEvent& aEvent );
|
|
102 |
|
|
103 |
private: // From MPbk2StoreConfigurationObserver
|
|
104 |
void ConfigurationChanged();
|
|
105 |
void ConfigurationChangedComplete();
|
|
106 |
|
|
107 |
private: // From MPbk2MenuCommandObserver
|
|
108 |
void PreCommandExecutionL(
|
|
109 |
const MPbk2Command& aCommand );
|
|
110 |
void PostCommandExecutionL(
|
|
111 |
const MPbk2Command& aCommand );
|
|
112 |
|
|
113 |
private: // Implementation
|
|
114 |
CPguGroupView(
|
|
115 |
CPbk2UIExtensionView& aView );
|
|
116 |
void ConstructL();
|
|
117 |
TBool CurrentStoreSupportsGroupsL() const;
|
|
118 |
TBool CurrentStoreIsAvailableL() const;
|
|
119 |
void CreateControlsL();
|
|
120 |
void StoreStateL();
|
|
121 |
void RestoreStateL();
|
|
122 |
void UpdateCbasL();
|
|
123 |
void UpdateListEmptyTextL();
|
|
124 |
void HandleConfigurationChangeL();
|
|
125 |
void ShowContextMenuL();
|
|
126 |
|
|
127 |
private: // Types
|
|
128 |
/// This view's control container type
|
|
129 |
typedef CPbk2ControlContainer<CPbk2NamesListControl> CContainer;
|
|
130 |
|
|
131 |
private: // Data
|
|
132 |
/// Ref: View that contains this extension view
|
|
133 |
CPbk2UIExtensionView& iView;
|
|
134 |
/// Own: This view's control container
|
|
135 |
CContainer* iContainer;
|
|
136 |
/// Ref: This view's control
|
|
137 |
CPbk2NamesListControl* iControl;
|
|
138 |
/// Ref: Pointer event inspector
|
|
139 |
MPbk2PointerEventInspector* iPointerEventInspector;
|
|
140 |
/// Own: Stored control state
|
|
141 |
CPbk2ViewState* iControlState;
|
|
142 |
/// Own: Control state passed as parameter
|
|
143 |
CPbk2ViewState* iParamState;
|
|
144 |
/// Ref: Command handler
|
|
145 |
MPbk2CommandHandler* iCommandHandler;
|
|
146 |
/// Own: Latest group name list control state
|
|
147 |
TInt iListControlState;
|
|
148 |
/// Ref: Phonebook store configuration
|
|
149 |
CPbk2StoreConfiguration* iStoreConfiguration;
|
|
150 |
/// Own: Stylus popup menu state indicator
|
|
151 |
TBool iStylusPopupMenuLaunched;
|
|
152 |
};
|
|
153 |
|
|
154 |
#endif // CPGUGROUPVIEW_H
|
|
155 |
|
|
156 |
// End of File
|