|
1 /* |
|
2 * Copyright (c) 2006 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: PostcardTextDialogCustomDraw declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CPOSTCARDTEXTDIALOGCUSTOMDRAW_H |
|
21 #define CPOSTCARDTEXTDIALOGCUSTOMDRAW_H |
|
22 |
|
23 // ========== INCLUDE FILES ================================ |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <frmtlay.h> |
|
27 |
|
28 // ========== CONSTANTS ==================================== |
|
29 |
|
30 // ========== MACROS ======================================= |
|
31 |
|
32 // ========== DATA TYPES =================================== |
|
33 |
|
34 // ========== FUNCTION PROTOTYPES ========================== |
|
35 |
|
36 // ========== FORWARD DECLARATIONS ========================= |
|
37 class CGulIcon; |
|
38 class CEikEdwin; |
|
39 class CPostcardTextDialog; |
|
40 |
|
41 // ========== CLASS DECLARATION ============================ |
|
42 |
|
43 /** |
|
44 * Implementation of MFormCustomDraw |
|
45 * Class is used to draw editor lines to text editor. |
|
46 * |
|
47 * @since 3.1 |
|
48 */ |
|
49 NONSHARABLE_CLASS(CPostcardTextDialogCustomDraw): public CBase, |
|
50 public MFormCustomDraw |
|
51 { |
|
52 public: |
|
53 |
|
54 /** |
|
55 * Static constructor. |
|
56 * @since S60 3.2 |
|
57 * @param aParentCustomDraw IN Parent Custom drawer. |
|
58 * |
|
59 * @return pointer to instance |
|
60 */ |
|
61 static CPostcardTextDialogCustomDraw* NewL( |
|
62 const MFormCustomDraw* aParentCustomDraw, |
|
63 const CPostcardTextDialog* aParentControl ); |
|
64 |
|
65 /** |
|
66 * Destructor |
|
67 * @since S60 3.2 |
|
68 */ |
|
69 virtual ~CPostcardTextDialogCustomDraw(); |
|
70 |
|
71 /** |
|
72 * Resolves editor line layout from LAF. |
|
73 * @since S60 3.2 |
|
74 */ |
|
75 void ResolveLayouts(); |
|
76 |
|
77 public: // Functions from base classes |
|
78 |
|
79 /** |
|
80 * From MFormCustomDraw |
|
81 * See frmtlay.h for more information. |
|
82 * @since S60 3.2 |
|
83 */ |
|
84 void DrawBackground( const TParam& aParam, |
|
85 const TRgb& aRgb, |
|
86 TRect& aDrawn ) const; |
|
87 |
|
88 /** |
|
89 * From MFormCustomDraw |
|
90 * See frmtlay.h for more information. |
|
91 * @since S60 3.2 |
|
92 */ |
|
93 void DrawText( const TParam& aParam, |
|
94 const TLineInfo& aLineInfo, |
|
95 const TCharFormat& aFormat, |
|
96 const TDesC& aText, |
|
97 const TPoint& aTextOrigin, |
|
98 TInt aExtraPixels ) const; |
|
99 |
|
100 /** |
|
101 * From MFormCustomDraw |
|
102 * See frmtlay.h for more information. |
|
103 * @since S60 3.2 |
|
104 */ |
|
105 void DrawLineGraphics( const TParam& aParam, |
|
106 const TLineInfo& aLineInfo ) const; |
|
107 |
|
108 /** |
|
109 * From MFormCustomDraw |
|
110 * See frmtlay.h for more information. |
|
111 * @since S60 3.2 |
|
112 */ |
|
113 TRgb SystemColor( TUint aColorIndex, |
|
114 TRgb aDefaultColor) const; |
|
115 |
|
116 private: |
|
117 |
|
118 /** |
|
119 * C++ contructor |
|
120 * @since S60 3.2 |
|
121 */ |
|
122 CPostcardTextDialogCustomDraw( |
|
123 const MFormCustomDraw* aParentCustomDraw, |
|
124 const CPostcardTextDialog* aParentControl ); |
|
125 |
|
126 /** |
|
127 * 2nd phase constructor |
|
128 * @since S60 3.2 |
|
129 */ |
|
130 void ConstructL(); |
|
131 |
|
132 /** |
|
133 * Draws editor lines. |
|
134 * @since S60 3.2 |
|
135 */ |
|
136 void DrawEditorLines( const TParam& aParam ) const; |
|
137 |
|
138 private: // data |
|
139 |
|
140 const MFormCustomDraw* iParentCustomDraw; |
|
141 |
|
142 TRect iFirstLineRect; |
|
143 TInt iLineDelta; |
|
144 |
|
145 CGulIcon* iIcon; |
|
146 |
|
147 const CPostcardTextDialog* iParentControl; |
|
148 }; |
|
149 |
|
150 |
|
151 #endif // CPOSTCARDTEXTDIALOGCUSTOMDRAW_H |
|
152 |
|
153 // End of File |