|
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: Declares container control for application. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef USSDNAVIPANE_H |
|
20 #define USSDNAVIPANE_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <coecntrl.h> |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CUssdAppUi; |
|
29 class CAknNaviLabel; |
|
30 class CAknNavigationDecorator; |
|
31 class CAknNavigationControlContainer; |
|
32 class CCnvCharacterSetConverter; |
|
33 |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * CUssdNaviPane |
|
39 * Declares navi pane control for application. |
|
40 * @since 2.8. |
|
41 * |
|
42 */ |
|
43 class CUssdNaviPane : public CCoeControl |
|
44 { |
|
45 public: // Constructors and destructor |
|
46 |
|
47 /** |
|
48 * Constructor. |
|
49 * @param aAppUi A reference to AppUI for container. |
|
50 */ |
|
51 CUssdNaviPane( CUssdAppUi& aAppUi ); |
|
52 |
|
53 /** |
|
54 * Two-phased constructor. |
|
55 * @param aAppUi A reference to AppUI for container. |
|
56 */ |
|
57 static CUssdNaviPane* NewL( CUssdAppUi& aAppUi ); |
|
58 |
|
59 /** |
|
60 * 2nd phase constructor |
|
61 * |
|
62 */ |
|
63 void ConstructL(); |
|
64 |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 ~CUssdNaviPane(); |
|
69 |
|
70 public: // New functions |
|
71 |
|
72 /** |
|
73 * Update the message length information to navipane |
|
74 * @param aInputString Reference to a string to be checked |
|
75 * @param aControl for handling backspace key event |
|
76 * @return Updated value of maximum size of string |
|
77 */ |
|
78 TInt UpdateMsgLengthL( |
|
79 const TDesC& aInputString, |
|
80 CCoeControl* aControl ); |
|
81 |
|
82 public: // Functions from base classes |
|
83 |
|
84 |
|
85 private: // Functions from base classes |
|
86 |
|
87 |
|
88 private: //new functions |
|
89 |
|
90 /** |
|
91 * Creates an extra navi label. It is needed so that the msg length |
|
92 * won't dissapear when the focus is on the picture of a picture msg. |
|
93 */ |
|
94 void CreateExtraNaviLabelL(); |
|
95 |
|
96 /** |
|
97 * Checks if there are any unicode characters in the message |
|
98 * @param aInputString Reference to a string to be checked |
|
99 * @return ETrue whether we have unicode chars otherwise EFalse |
|
100 */ |
|
101 TBool NeedsToBeSentAsUnicodeL( const TDesC& aInputString ) const; |
|
102 |
|
103 /** |
|
104 * Counts if there are 7bit extended table characters in message |
|
105 * (see more info from ETSI 03.38) |
|
106 * @param aInputString Reference to chars to be checked |
|
107 * @return amount of extended table chars |
|
108 */ |
|
109 TInt CountExtendedTableChars( const TDesC& aInputString ) const; |
|
110 |
|
111 /** |
|
112 * Generates a backspace key press event. |
|
113 * @param aControl Reference to control class |
|
114 */ |
|
115 void GenerateBackSpaceKeyL(CCoeControl* aControl); |
|
116 |
|
117 |
|
118 private: //data |
|
119 |
|
120 // Application UI. |
|
121 CUssdAppUi& iAppUi; |
|
122 |
|
123 // Char converter. |
|
124 CCnvCharacterSetConverter* iCharacterSetConverter; |
|
125 |
|
126 // The navipane decorator. |
|
127 CAknNavigationDecorator* iNaviDecorator; |
|
128 |
|
129 // The navipane label. |
|
130 CAknNaviLabel* iNaviLabel; |
|
131 |
|
132 // The navipane control container. |
|
133 CAknNavigationControlContainer* iNaviPane; |
|
134 |
|
135 |
|
136 |
|
137 }; |
|
138 |
|
139 #endif // USSDNAVIPANE_H |
|
140 |
|
141 // End of File |