1 /* |
|
2 * Copyright (c) 2003 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: LandmarksUi Content File - |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 /* |
|
24 Change History |
|
25 22-05-2007 To resolve tool IDO warnings Komala Nagaraju |
|
26 */ |
|
27 |
|
28 #ifndef BCAPPLMKEDITORCONTAINER_H |
|
29 #define BCAPPLMKEDITORCONTAINER_H |
|
30 |
|
31 // INCLUDES |
|
32 #include <coecntrl.h> |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CRichText; |
|
36 class CParaFormatLayer; |
|
37 class CCharFormatLayer; |
|
38 class CEikRichTextEditor; |
|
39 |
|
40 |
|
41 // CLASS DECLARATION |
|
42 |
|
43 /** |
|
44 * CBCAppLmkEditorContainer container control class. |
|
45 * |
|
46 */ |
|
47 class CBCAppLmkEditorContainer : public CCoeControl, MCoeControlObserver |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * default constructor. |
|
53 * @param aRect Frame rectangle for container. |
|
54 */ |
|
55 void ConstructL(const TRect& aRect); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 ~CBCAppLmkEditorContainer(); |
|
61 |
|
62 public: // New functions |
|
63 |
|
64 /** |
|
65 * Clear the output window. |
|
66 */ |
|
67 void ClearOutputWindow(); |
|
68 |
|
69 public: // Functions from base classes |
|
70 |
|
71 // From MUINotify |
|
72 |
|
73 /** |
|
74 * Display text on output window |
|
75 * @param aDes text to display |
|
76 * @param aFontStyle style (italic/bold/etc) for this text |
|
77 */ |
|
78 void PrintNotify(const TDesC& aDes, TUint aFontStyle = 0); |
|
79 void PrintNotify(const TDesC8& aDes, TUint aFontStyle = 0); |
|
80 |
|
81 /** |
|
82 * Display integer as text on output window |
|
83 * @param aInt integer to display |
|
84 */ |
|
85 void PrintNotify(TInt aInt); |
|
86 |
|
87 private: // Functions from base classes |
|
88 |
|
89 /** |
|
90 * From CoeControl. Calls SizeChangedL with TRAP. |
|
91 */ |
|
92 void SizeChanged(); |
|
93 |
|
94 /** |
|
95 * Handle change of control size |
|
96 */ |
|
97 void SizeChangedL(); |
|
98 |
|
99 /** |
|
100 * From CoeControl. |
|
101 */ |
|
102 TInt CountComponentControls() const; |
|
103 |
|
104 /** |
|
105 * From CCoeControl. |
|
106 */ |
|
107 CCoeControl* ComponentControl(TInt aIndex) const; |
|
108 |
|
109 /** |
|
110 * Event handling section, e.g Listbox events. |
|
111 */ |
|
112 void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); |
|
113 |
|
114 /** |
|
115 * From CCoeControl,Draw. |
|
116 */ |
|
117 void Draw(const TRect& aRect) const; |
|
118 |
|
119 /** |
|
120 * Key event handler. Handles up and down arrow keys, so that |
|
121 * output window can be scrolled. |
|
122 */ |
|
123 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
|
124 |
|
125 /** |
|
126 * Change font style for subsequent text |
|
127 * @param aFontStyle new font style |
|
128 */ |
|
129 void SetFontStyle(TUint aFontStyle); |
|
130 |
|
131 /** |
|
132 * Set or clear an individual font attribute if necessary, |
|
133 * so that it matches the required style |
|
134 * @param aFontStyle required font style |
|
135 * @param aAttribute the individual attribute to correct |
|
136 */ |
|
137 void UpdateFontAttribute(TUint aFontStyle, TInt aAttribute); |
|
138 |
|
139 |
|
140 private: //data |
|
141 CParaFormatLayer* iParaFormat; // Used by CEikRichTextEditor |
|
142 CCharFormatLayer* iCharFormat; // Used by CEikRichTextEditor |
|
143 CRichText* iRichText; // Used by CEikRichTextEditor |
|
144 CEikRichTextEditor* iOutputWindow; // CRichText object for use as our output window |
|
145 TUint iFontStyle; // Current style in use by output window |
|
146 }; |
|
147 |
|
148 |
|
149 #endif |
|
150 |
|
151 // End of File |
|