CConsoleBase Class Reference

class CConsoleBase : public CBase

A base class that defines a console interface.

Inherits from

Constructor & Destructor Documentation

CConsoleBase()

IMPORT_CCConsoleBase()[protected]

~CConsoleBase()

IMPORT_C~CConsoleBase()[virtual]

Member Functions Documentation

ClearScreen()

voidClearScreen()[pure virtual]

Clears the console.

ClearToEndOfLine()

voidClearToEndOfLine()[pure virtual]

Clears the console from the current cursor position to the end of the line.

Create(const TDesC &, TSize)

TInt Create(const TDesC &aTitle,
TSizeaSize
)[pure virtual]

Creates a new console window.

KErrNone, if successful; otherwise one of the other system wide error codes.

Parameters

const TDesC & aTitleThe title text for the console. This should not be longer than 256 characters.
TSize aSizeThe size of the console window.

CursorPos()

TPoint CursorPos()const [pure virtual]

Gets the current cursor position relative to the console window.

The current cursor position.

Extension_(TUint, TAny *&, TAny *)

IMPORT_C TIntExtension_(TUintaExtensionId,
TAny *&a0,
TAny *a1
)[protected, virtual]

Parameters

TUint aExtensionId
TAny *& a0
TAny * a1

Getch()

IMPORT_C TKeyCodeGetch()

KeyCode()

TKeyCode KeyCode()const [pure virtual]

Gets the current key code value.

The key code value.

KeyModifiers()

TUint KeyModifiers()const [pure virtual]

Gets the current key modifiers.

The key modifiers.

Printf(TRefByValue< const TDesC >, ...)

IMPORT_C voidPrintf(TRefByValue< const TDesC >aFmt,
...
)

Parameters

TRefByValue< const TDesC > aFmt
...

Read(TRequestStatus &)

voidRead(TRequestStatus &aStatus)[pure virtual]

Gets a keystroke from the console window, asynchronously.

Parameters

TRequestStatus & aStatusThe request status object.

ReadCancel()

voidReadCancel()[pure virtual]

Cancels any outstanding request to get a keystroke from the console window.

ScreenSize()

TSize ScreenSize()const [pure virtual]

Gets the size of the console.

SetCursorHeight(TInt)

voidSetCursorHeight(TIntaPercentage)[pure virtual]

Sets the percentage height of the cursor.

Parameters

TInt aPercentageThe percentage height. This is a value from 0 to 100. If 0 is specified, then no cursor is displayed.

SetCursorPosAbs(const TPoint &)

voidSetCursorPosAbs(const TPoint &aPoint)[pure virtual]

Puts the cursor at the absolute position in the window.

Parameters

const TPoint & aPointThe cursor position.

SetCursorPosRel(const TPoint &)

voidSetCursorPosRel(const TPoint &aPoint)[pure virtual]

Puts the cursor at the specified position relative to the current cursor position.

Parameters

const TPoint & aPointThe cursor position.

SetPos(TInt)

IMPORT_C voidSetPos(TIntaX)

Parameters

TInt aX

SetPos(TInt, TInt)

IMPORT_C voidSetPos(TIntaX,
TIntaY
)

Parameters

TInt aX
TInt aY

SetTitle(const TDesC &)

voidSetTitle(const TDesC &aTitle)[pure virtual]

Sets a new console title.

Parameters

const TDesC & aTitleThe title text for the console. This should not be longer than 256 characters.

WhereX()

IMPORT_C TIntWhereX()const

WhereY()

IMPORT_C TIntWhereY()const

Write(const TDesC &)

voidWrite(const TDesC &aDes)[pure virtual]

Writes the content of the specified descriptor to the console window.

Parameters

const TDesC & aDesDescriptor containing the characters to be written to the console window.