Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Copyright (c) 1997-1999 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #if !defined(__EIKLBED_H__)
22 #if !defined(__E32BASE_H__)
26 #if !defined(__EIKLBM_H__)
30 #if !defined(__W32STD_H__)
34 #if !defined(__COEDEF_H__)
38 #if !defined(__COECNTRL_H__)
42 #include <akncontrol.h>
45 class CParaFormatLayer;
46 class CCharFormatLayer;
49 * The MEikListBoxEditor class specifies an interface to a text editor which can be used inside
54 class MEikListBoxEditor
58 * Returns a pointer to the current editable item text.
60 virtual TPtrC ItemText() = 0;
63 * Creates the editor inside the list box aContainer. The editor occupies the rectangle aRect
64 * and is used to editor the contents of the item at index aItemIndex up to a maximum length of
65 * aMaxLength characters..
67 virtual void StartEditingL(const CCoeControl& aContainer,const TRect& aRect,TInt aItemIndex,TInt aMaxLength) = 0;
70 * Stops editing and deletes the item editor.
72 virtual void StopEditingL() = 0;
75 * Updates the list box model with the new item contents.
77 virtual TBool UpdateModelL() = 0;
82 virtual void Release() = 0;
84 IMPORT_C virtual void MEikListBoxEditor_Reserved_1();
87 class MListBoxEditorObserver
90 virtual TKeyResponse HandleListBoxEditorEventL(MEikListBoxEditor* aListBoxEditor, const TKeyEvent& aKeyEvent)=0;
94 * The @c CEikListBoxTextEditor implements a text list box item editor. This
95 * editor is used inside of listbox items for editing the list box item text.
99 class CEikListBoxTextEditor : public CAknControl, public MEikListBoxEditor
104 * C++ default constructor.
106 * @param aModel Model class of the list box.
108 IMPORT_C CEikListBoxTextEditor(MListBoxModel* aModel);
113 IMPORT_C ~CEikListBoxTextEditor();
116 * Sets font to the text editor
118 * @param aFont New font for the text editor.
120 IMPORT_C void SetFont(const CFont* aFont);
123 * Gets text editor instance as @c CEikEdwin.
125 * @return CEikEdwin* Pointer to the text editor base class instance.
127 IMPORT_C CEikEdwin* Editor();
130 * Sets observer to the text editor.
132 * @param aObserver The list box editor observer interface.
134 IMPORT_C void SetListBoxEditorObserver(MListBoxEditorObserver* aObserver);
136 public: // from MEikListBoxEditor
139 * From @c MEikListBoxEditor.
140 * This function returns the text of the list box item.
142 * @return TPtrC Pointer descriptor to the list box item text.
144 IMPORT_C TPtrC ItemText();
147 * From @c MEikListBoxEditor.
148 * This function creates text editor inside the
149 * list box item and starts editing of the item text. The list box item can
150 * contain partly editable text. This text is between '\\n' chars and this
151 * control does not modify it.
153 * @param aContainer Container class of the list box.
154 * @param aRect Retangle of the list box item.
155 * @param aItemIndex Index of the list box item where text editor will be
157 * @param aMaxLength Maximum length of editor in characters.
159 IMPORT_C void StartEditingL(const CCoeControl& aContainer,
165 * From @c MEikListBoxEditor.
166 * Stops editing the current item and deletes the text editor.
168 IMPORT_C void StopEditingL();
171 * From @c MEikListBoxEditor.
172 * Updates the list box model with new text from text editor. If text is
173 * partly editable, string between '\n' chars is not updated.
175 * @return TBool @c EFalse if editing is not currently on otherwise @c ETrue
177 IMPORT_C TBool UpdateModelL();
180 * From @c CCoeControl.
181 * Handles key press events. Called by the control framework.
183 * @param aKeyEvent The key event
184 * @param aType The type of key event: @c EEventKey, @c EEventKeyUp or
186 * @return TKeyResponse Indicates whether or not the key event was used by
189 IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
192 public: // From CCoeControl
195 * From @c CCoeControl.
196 * Handles pointer events.
198 * @param aPointerEvent The pointer event.
200 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
202 protected: // from MEikListBoxEditor
205 * From @c MEikListBoxEditor.
206 * Deletes the editor.
208 IMPORT_C void Release();
213 * Gets the list box model.
215 * @return MListBoxModel* Pointer to the list box model instance.
217 IMPORT_C MListBoxModel* ListBoxModel();
220 * Function for getting the list box item index that holds the text editor.
222 * @return TInt Index of the list box item that holds the text editor.
224 IMPORT_C TInt ItemIndex() const;
226 private: // from MEikListBoxEditor
228 IMPORT_C void MEikListBoxEditor_Reserved_1();
233 * This function writes the internal state of the control and its components
234 * to @c aStream in debug mode. Does nothing in release mode.
236 * @param aWriteStream Stream where control and its components internal
237 * state will be written.
239 IMPORT_C void WriteInternalStateL(RWriteStream& aWriteStream) const;
243 void UseFontL(CEikEdwin& editor, const CFont& aFont);
245 TPtrC EditableItemText(TRect* aRect=NULL);
251 IMPORT_C void* ExtensionInterface(TUid aInterface);
254 MListBoxEditorObserver* iEditorObserver;
255 MListBoxModel* iModel;
261 CParaFormatLayer* iParaFormatLayer;
262 CCharFormatLayer* iCharFormatLayer;