applayerprotocols/telnetengine/TUIEDIT/TUIEDIT.H
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 #ifndef __TUIEDIT_H
       
    18 #define __TUIEDIT_H
       
    19 
       
    20 #include <e32cons.h>
       
    21 
       
    22 class CLineEdit : public CBase
       
    23 /**
       
    24 CLineEdit class - borrowed from F32 text window server
       
    25 @internalComponent
       
    26 */
       
    27     {
       
    28 public:
       
    29 	enum TCursorType {ECursorNone=0,ECursorNormal=20,ECursorInsert=100};
       
    30 	enum TEditMode {EEditOverWrite,EEditInsert};
       
    31 public:
       
    32 	IMPORT_C static CLineEdit* NewL(CConsoleBase* aConsole,TInt aMaxHistory);
       
    33 	~CLineEdit();
       
    34 	IMPORT_C void Edit(const TDesC& aPrompt,TDes* aBuf);
       
    35 protected:
       
    36 	CLineEdit();
       
    37 	TPoint Where();
       
    38 	TInt Lines();
       
    39 	TInt WordLeft();
       
    40 	TInt WordRight();
       
    41 	void ClearLine();
       
    42 	void ClearLast(TInt aCnt);
       
    43 	void Recall();
       
    44 	void Cursor();
       
    45 	void Refresh();
       
    46 	inline TDes& Buf() {return *iBuf;}
       
    47 private:
       
    48 	CArrayFixFlat<HBufC*>* iHistory;
       
    49 	CConsoleBase* iConsole; // Not owned
       
    50 	TInt iMaxHistory;
       
    51 	TInt iWidth;
       
    52 	TInt iHeight;
       
    53 	TInt iPos;
       
    54 	TInt iLine;
       
    55 	TInt iOrigin;
       
    56 	TInt iRecall;
       
    57 	TEditMode iMode;
       
    58 	TDes* iBuf;
       
    59 	};
       
    60 
       
    61 #endif