1 /* |
1 /* |
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: ESMR titlepane handler header |
14 * Description: MR titlepane handler header |
15 |
15 * |
16 * |
|
17 */ |
16 */ |
18 |
17 |
19 |
|
20 |
|
21 |
|
22 #ifndef CESMRTITLEPANEHANDLER_H |
18 #ifndef CESMRTITLEPANEHANDLER_H |
23 |
|
24 #define CESMRTITLEPANEHANDLER_H |
19 #define CESMRTITLEPANEHANDLER_H |
25 |
20 |
26 |
|
27 |
|
28 // INCLUDES |
21 // INCLUDES |
29 |
|
30 #include <e32base.h> |
22 #include <e32base.h> |
31 |
23 |
32 |
|
33 |
|
34 // FORWARD DECLARATIONS |
24 // FORWARD DECLARATIONS |
35 |
|
36 class CAknTitlePane; |
25 class CAknTitlePane; |
37 |
|
38 class CEikonEnv; |
26 class CEikonEnv; |
39 |
27 |
|
28 // CLASS DECLARATIONS |
|
29 NONSHARABLE_CLASS( CESMRTitlePaneHandler ) : public CBase |
|
30 { |
|
31 public: |
|
32 static CESMRTitlePaneHandler* NewL( CEikonEnv& aEnv ); |
|
33 ~CESMRTitlePaneHandler(); |
40 |
34 |
|
35 public: |
|
36 /** |
|
37 * Restores the original titlepane text that was saved |
|
38 * before setting new one into titlepane. If called before |
|
39 * SetNewTitle() does nothing. |
|
40 */ |
|
41 void Rollback(); |
41 |
42 |
42 // CLASS DECLARATIONS |
43 /** |
|
44 * Sets new title. If aNewTitle is NULL the titlepane |
|
45 * default is used. |
|
46 * @param aNewTitle New titlepane text as reference |
|
47 */ |
|
48 void SetNewTitle( const TDesC* aNewTitle ); |
43 |
49 |
44 NONSHARABLE_CLASS( CESMRTitlePaneHandler ) : public CBase |
50 private: |
|
51 CESMRTitlePaneHandler( CEikonEnv& aEnv ); |
|
52 void ConstructL(); |
|
53 void SetTitlePaneTextL( const TDesC* aNewTitle ); |
45 |
54 |
46 { |
55 private: |
47 |
56 // Own: Original title pane text before change |
48 public: |
57 HBufC* iSaveTitlePaneText; |
49 |
58 // Ref: |
50 static CESMRTitlePaneHandler* NewL( CEikonEnv& aEnv ); |
59 CEikonEnv& iEikEnv; |
51 |
60 // Ref: |
52 ~CESMRTitlePaneHandler(); |
61 CAknTitlePane* iTitlePane; |
53 |
62 }; |
54 |
|
55 |
|
56 public: |
|
57 |
|
58 /** |
|
59 |
|
60 * Restores the original titlepane text that was saved |
|
61 |
|
62 * before setting new one into titlepane. If called before |
|
63 |
|
64 * SetNewTitle() does nothing. |
|
65 |
|
66 */ |
|
67 |
|
68 void Rollback(); |
|
69 |
|
70 |
|
71 |
|
72 /** |
|
73 |
|
74 * Sets new title. If aNewTitle is NULL the titlepane |
|
75 |
|
76 * default is used. |
|
77 |
|
78 * @param aNewTitle New titlepane text as reference |
|
79 |
|
80 */ |
|
81 |
|
82 void SetNewTitle( const TDesC* aNewTitle ); |
|
83 |
|
84 |
|
85 |
|
86 private: |
|
87 |
|
88 CESMRTitlePaneHandler( CEikonEnv& aEnv ); |
|
89 |
|
90 void ConstructL(); |
|
91 |
|
92 |
|
93 |
|
94 void SetTitlePaneTextL( const TDesC* aNewTitle ); |
|
95 |
|
96 |
|
97 |
|
98 private: |
|
99 |
|
100 // Own: Original title pane text before change |
|
101 |
|
102 HBufC* iSaveTitlePaneText; |
|
103 |
|
104 // Ref: |
|
105 |
|
106 CEikonEnv& iEikEnv; |
|
107 |
|
108 // Ref: |
|
109 |
|
110 CAknTitlePane* iTitlePane; |
|
111 |
|
112 }; |
|
113 |
|
114 |
|
115 |
63 |
116 #endif // CESMRTITLEPANEHANDLER_H |
64 #endif // CESMRTITLEPANEHANDLER_H |
117 |
65 |
118 |
|
119 |
|
120 // End of file |
66 // End of file |
121 |
67 |