Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: e32cons.h
Link against: euser.lib

Class CConsoleBase

class CConsoleBase : public CBase;

Description

A base class that defines a console interface.

Derivation

Members

Defined in CConsoleBase:
CConsoleBase(), ClearScreen(), ClearToEndOfLine(), Create(), CursorPos(), Extension_(), Getch(), KeyCode(), KeyModifiers(), Printf(), Read(), ReadCancel(), ScreenSize(), SetCursorHeight(), SetCursorPosAbs(), SetCursorPosRel(), SetPos(), SetPos(), SetTitle(), WhereX(), WhereY(), Write(), ~CConsoleBase()

Inherited from CBase:
Delete(), operator new()


Construction and destruction


~CConsoleBase()

virtual IMPORT_C ~CConsoleBase();

Description

Destructor.


CConsoleBase()

protected: IMPORT_C CConsoleBase();

Description

Default constructor.

[Top]


Member functions


Getch()

IMPORT_C TKeyCode Getch();

Description

Gets a character from the console.

Return value

TKeyCode

the key code from the console.


Printf()

IMPORT_C void Printf(TRefByValue< const TDesC > aFmt,...);

Description

Prints characters to the console window.

Parameters

TRefByValue< const TDesC > aFmt

The non-modifiable descriptor containing the format string. The TRefByValue class provides a constructor which takes a TDesC type.

...


SetPos()

IMPORT_C void SetPos(TInt aX);

Description

Sets the cursor's x-position.

Parameters

TInt aX

The x-position.


SetPos()

IMPORT_C void SetPos(TInt aX, TInt aY);

Description

Sets the cursor's x-position and y-position.

Parameters

TInt aX

The x-position.

TInt aY

The y-position.


WhereX()

IMPORT_C TInt WhereX() const;

Description

Gets the cursor's x-position.

Return value

TInt

The cursor's x-position.


WhereY()

IMPORT_C TInt WhereY() const;

Description

Gets the cursor's y-position.

Return value

TInt

The cursor's y-position.


Create()

virtual TInt Create(const TDesC &aTitle, TSize aSize)=0;

Description

Creates a new console window.

Parameters

const TDesC &aTitle

The title text for the console. This should not be longer than 256 characters.

TSize aSize

The size of the console window.

Return value

TInt

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


Read()

virtual void Read(TRequestStatus &aStatus)=0;

Description

Gets a keystroke from the console window, asynchronously.

Parameters

TRequestStatus &aStatus

The request status object.


ReadCancel()

virtual void ReadCancel()=0;

Description

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


Write()

virtual void Write(const TDesC &aDes)=0;

Description

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

Parameters

const TDesC &aDes

Descriptor containing the characters to be written to the console window.


CursorPos()

virtual TPoint CursorPos() const=0;

Description

Gets the current cursor position relative to the console window.

Return value

TPoint

The current cursor position.


SetCursorPosAbs()

virtual void SetCursorPosAbs(const TPoint &aPoint)=0;

Description

Puts the cursor at the absolute position in the window.

Parameters

const TPoint &aPoint

The cursor position.


SetCursorPosRel()

virtual void SetCursorPosRel(const TPoint &aPoint)=0;

Description

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

Parameters

const TPoint &aPoint

The cursor position.


SetCursorHeight()

virtual void SetCursorHeight(TInt aPercentage)=0;

Description

Sets the percentage height of the cursor.

Parameters

TInt aPercentage

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


SetTitle()

virtual void SetTitle(const TDesC &aTitle)=0;

Description

Sets a new console title.

Parameters

const TDesC &aTitle

The title text for the console. This should not be longer than 256 characters.


ClearScreen()

virtual void ClearScreen()=0;

Description

Clears the console.


ClearToEndOfLine()

virtual void ClearToEndOfLine()=0;

Description

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


ScreenSize()

virtual TSize ScreenSize() const=0;

Description

Gets the size of the console.

Return value

TSize


KeyCode()

virtual TKeyCode KeyCode() const=0;

Description

Gets the current key code value.

Return value

TKeyCode

The key code value.


KeyModifiers()

virtual TUint KeyModifiers() const=0;

Description

Gets the current key modifiers.

Return value

TUint

The key modifiers.


Extension_()

protected: virtual IMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1);

Description

Extension function

Parameters

TUint aExtensionId

TAny *&a0

TAny *a1

Return value

TInt