Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <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:

Inherited from CBase:


Construction and destruction


~CConsoleBase()

IMPORT_C virtual ~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(TRefByValue< const TDesC >,...)

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

Description

Prints characters to the console window.

Parameters

TRefByValue< const TDesC16 > aFmt

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

...


SetPos(TInt)

IMPORT_C void SetPos(TInt aX);

Description

Sets the cursor's x-position.

Parameters

TInt aX

The x-position.


SetPos(TInt,TInt)

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()const

IMPORT_C TInt WhereX() const;

Description

Gets the cursor's x-position.

Return value

TInt

The cursor's x-position.


WhereY()const

IMPORT_C TInt WhereY() const;

Description

Gets the cursor's y-position.

Return value

TInt

The cursor's y-position.


Create(const TDesC &,TSize)

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

Description

Creates a new console window.

Parameters

const TDesC16 &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(TRequestStatus &)

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(const TDesC &)

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

Description

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

Parameters

const TDesC16 &aDes

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


CursorPos()const

virtual TPoint CursorPos() const=0;

Description

Gets the current cursor position relative to the console window.

Return value

TPoint

The current cursor position.


SetCursorPosAbs(const TPoint &)

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(const TPoint &)

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(TInt)

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(const TDesC &)

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

Description

Sets a new console title.

Parameters

const TDesC16 &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()const

virtual TSize ScreenSize() const=0;

Description

Gets the size of the console.

Return value

TSize


KeyCode()const

virtual TKeyCode KeyCode() const=0;

Description

Gets the current key code value.

Return value

TKeyCode

The key code value.


KeyModifiers()const

virtual TUint KeyModifiers() const=0;

Description

Gets the current key modifiers.

Return value

TUint

The key modifiers.


Extension_(TUint,TAny *&,TAny *)

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

Description

Extension function

Parameters

TUint aExtensionId

TAny *&a0

TAny *a1

Return value

TInt