47 * Destructor. |
48 * Destructor. |
48 */ |
49 */ |
49 ~CXnTextEditorAdapter(); |
50 ~CXnTextEditorAdapter(); |
50 |
51 |
51 public: |
52 public: |
52 // New functions |
53 // new functions |
53 |
54 |
54 /** |
55 /** |
55 * Gets editor |
56 * Gets editor |
56 * |
57 * |
57 * @since S60 5.0 |
58 * @since S60 5.0 |
58 * @return Editor, ownership is not transfered |
59 * @return Editor, ownership is not transfered |
59 */ |
60 */ |
60 CEikEdwin* Editor() const { return iEditor; }; |
61 CEikEdwin* Editor() const; |
61 |
62 |
62 /** |
63 /** |
63 * Set text to the text field |
64 * Set text to the text field |
64 * |
65 * |
65 * @since S60 5.0 |
66 * @since S60 5.0 |
66 * @param aText Text to set |
67 * @param aText Text to set |
67 */ |
68 */ |
68 void SetTextL( const TDesC& aText ); |
69 void SetTextL( const TDesC& aText ); |
69 |
70 |
70 /** |
71 /** |
|
72 * Queries wheter text content change is caused by call to SetTextL |
|
73 * |
|
74 * @since S60 5.2 |
|
75 * @return ETrue if set text, EFalse otherwise |
|
76 */ |
|
77 TBool IsSetText() const; |
|
78 |
|
79 /** |
71 * Return the text of the text field |
80 * Return the text of the text field |
72 * |
81 * |
73 * @since S60 5.0 |
82 * @since S60 5.0 |
74 * @return Text, ownership is transfered |
83 * @return Text, ownership is transfered |
75 */ |
84 */ |
76 HBufC* Text() const; |
85 HBufC* Text() const; |
77 |
86 |
78 /** |
87 public: |
79 * Handles editor events |
88 // from base classes |
80 * |
|
81 * @since S60 5.2 |
|
82 * @param aReason, editor event |
|
83 */ |
|
84 void HandleEditorEvent( TInt aReason ); |
|
85 |
|
86 public: // from base classes |
|
87 |
89 |
88 /** |
90 /** |
89 * See CCoeControl documentation |
91 * See CCoeControl documentation |
90 */ |
92 */ |
91 TInt CountComponentControls() const; |
93 TInt CountComponentControls() const; |
102 |
104 |
103 /** |
105 /** |
104 * See CCoeControl documentation |
106 * See CCoeControl documentation |
105 */ |
107 */ |
106 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
108 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); |
107 |
109 |
108 /** |
|
109 * See CXnControlAdapter documentation |
|
110 */ |
|
111 TBool RefusesFocusLoss() const; |
|
112 |
|
113 /** |
110 /** |
114 * See CCoeControl documentation |
111 * See CCoeControl documentation |
115 */ |
112 */ |
116 void FocusChanged( TDrawNow aDrawNow ); |
113 void FocusChanged( TDrawNow aDrawNow ); |
117 |
114 |
120 */ |
117 */ |
121 void Draw( const TRect& aRect ) const; |
118 void Draw( const TRect& aRect ) const; |
122 |
119 |
123 /** |
120 /** |
124 * See CCoeControl documentation |
121 * See CCoeControl documentation |
125 */ |
|
126 void HandleResourceChange( TInt aType ); |
|
127 |
|
128 /** |
|
129 * See CCoeControl documentation |
|
130 */ |
122 */ |
131 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
123 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
132 |
124 |
133 /** |
125 private: |
134 * See CCoeAppUiBase. |
126 // from MCoeControlBackground |
135 */ |
|
136 void HandleScreenDeviceChangedL(); |
|
137 |
|
138 private: // from base classes |
|
139 |
127 |
140 /** |
128 /** |
141 * See MCoeControlBackground documentation |
129 * @see MCoeControlBackground |
142 */ |
130 */ |
143 void Draw( CWindowGc& aGc, const CCoeControl& aControl, |
131 void Draw( CWindowGc& aGc, const CCoeControl& aControl, |
144 const TRect& aRect ) const; |
132 const TRect& aRect ) const; |
145 |
133 |
146 private: |
134 private: |
147 // private constrcutors |
135 // private constrcutors |
148 |
136 |
|
137 /** |
|
138 * C++ constructor |
|
139 */ |
149 CXnTextEditorAdapter( CXnControlAdapter* aParent, CXnNodePluginIf& aNode ); |
140 CXnTextEditorAdapter( CXnControlAdapter* aParent, CXnNodePluginIf& aNode ); |
150 |
141 |
|
142 /** |
|
143 * 2nd phase constructor |
|
144 */ |
151 void ConstructL(); |
145 void ConstructL(); |
152 |
146 |
153 private: |
147 private: |
154 // new functions |
148 // new functions |
155 |
149 |
156 void SetPropertiesL(); |
150 void SetPropertiesL(); |
157 |
151 |
158 void SetEditorMarginPropertiesL(); |
152 void SetEditorMarginPropertiesL(); |
159 |
153 |
160 private: |
154 private: |
161 // data |
155 // data |
|
156 |
162 /** Parent control, not owned */ |
157 /** Parent control, not owned */ |
163 CXnControlAdapter* iParent; |
158 CXnControlAdapter* iParent; |
164 /** UI node, not owned */ |
159 /** UI node, not owned */ |
165 CXnNodePluginIf& iNode; |
160 CXnNodePluginIf& iNode; |
166 /** UI engine, not owned */ |
161 /** UI engine, not owned */ |
174 // Font, owned */ |
169 // Font, owned */ |
175 CFont* iFont; |
170 CFont* iFont; |
176 /** Flag to indicate whether the font needs to be released or not */ |
171 /** Flag to indicate whether the font needs to be released or not */ |
177 TBool iReleaseFont; |
172 TBool iReleaseFont; |
178 /** Max line amount */ |
173 /** Max line amount */ |
179 TInt iMaxLines; |
174 TInt iMaxLines; |
180 /** Flag to indicate whether focus loss is refused */ |
175 /** Flags */ |
181 TBool iRefusesFocusLoss; |
176 TBitFlags32 iFlags; |
182 /** Split input states*/ |
|
183 TInt iSplitInputFlags; |
|
184 }; |
177 }; |
185 |
178 |
186 #endif // _XNTEXTEDITORADAPTER_H |
179 #endif // _XNTEXTEDITORADAPTER_H |
187 |
180 |
188 // End of File |
181 // End of File |