|
1 /* |
|
2 * Copyright (c) 2005 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: Base vew in GSTelPlugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef GSLOCALBASEVIEW_H |
|
20 #define GSLOCALBASEVIEW_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknview.h> |
|
24 #include <etelmm.h> |
|
25 #include <eikclb.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CGSBaseContainer; |
|
29 class CAknNavigationDecorator; |
|
30 class CAknViewAppUi; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 /*************************************************** |
|
34 * CGSLocalBaseView view class * |
|
35 ***************************************************/ |
|
36 class CGSLocalBaseView : public CAknView, |
|
37 public MEikListBoxObserver |
|
38 { |
|
39 public: |
|
40 // Panic code used in this class |
|
41 enum KGSViewPanicCodes |
|
42 { |
|
43 EGSViewPanicNullPtr = 1 |
|
44 }; |
|
45 |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Symbian OS default constructor. |
|
50 * |
|
51 */ |
|
52 virtual void ConstructL()=0; |
|
53 |
|
54 /* C++ Constructor */ |
|
55 CGSLocalBaseView(); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 ~CGSLocalBaseView(); |
|
61 |
|
62 public: |
|
63 |
|
64 /** |
|
65 * This function is used to set the current item in the listbox. |
|
66 * @param aIndex Current item. Default value is 0 i.e. the first item of the list. |
|
67 * |
|
68 */ |
|
69 virtual void SetCurrentItem( TInt aIndex = 0 ); |
|
70 |
|
71 protected: // from CAknView |
|
72 |
|
73 /** |
|
74 * Handles client rect change. |
|
75 * |
|
76 */ |
|
77 void HandleClientRectChange(); |
|
78 |
|
79 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
80 TUid aCustomMessageId, |
|
81 const TDesC8& aCustomMessage ); |
|
82 |
|
83 void DoDeactivate(); |
|
84 |
|
85 protected: // from MEikListBoxObserver |
|
86 |
|
87 /** |
|
88 * Handles listbox events. |
|
89 * @param aListBox Listbox where the event occurred. |
|
90 * @param aEventType Event type. |
|
91 * |
|
92 */ |
|
93 void HandleListBoxEventL( CEikListBox* aListBox, |
|
94 TListBoxEvent aEventType ); |
|
95 |
|
96 protected: //new |
|
97 |
|
98 /** |
|
99 * Sets the correct navi pane for the view (eg. tabs, empty, string etc.) |
|
100 * |
|
101 */ |
|
102 virtual void SetNaviPaneL(); |
|
103 |
|
104 /** |
|
105 * Creates context for view's navi pane. |
|
106 * @param aResourceId Resource id for navi pane context's resource. |
|
107 * |
|
108 */ |
|
109 virtual void CreateNaviPaneContextL( TInt aResourceId ); |
|
110 |
|
111 protected: |
|
112 // Called by DoActivateL |
|
113 virtual void NewContainerL() = 0; |
|
114 virtual void CreateContainerL(); |
|
115 |
|
116 private: |
|
117 |
|
118 /** |
|
119 * Handles selection of list box. |
|
120 * Called by HandleListBoxEventL |
|
121 */ |
|
122 virtual void HandleListBoxSelectionL() = 0; |
|
123 |
|
124 protected: // Member variables |
|
125 //Navi pane |
|
126 CAknNavigationDecorator* iNaviPaneContext; |
|
127 //Handle to get the view |
|
128 CAknViewAppUi* iAppUi; |
|
129 // currently selected listbox item |
|
130 TInt iCurrentItem; |
|
131 // first item in the listbox |
|
132 TInt iTopItemIndex; |
|
133 // pointer to the container |
|
134 CGSBaseContainer* iContainer; |
|
135 }; |
|
136 //end of file |
|
137 #endif //GSLOCALBASEVIEW_H |