PixelLightAPI  .
Public Member Functions | Protected Member Functions
PLCore::ConsoleLinux Class Reference

Linux 'Console' implementation. More...

#include <ConsoleLinux.h>

Inheritance diagram for PLCore::ConsoleLinux:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void Print (const String &sString) const override
 Print a string to the console.
virtual int IsKeyHit () const override
 Checks whether or not there's some keyboard input waiting on the console ('_kbhit()')
virtual int GetCharacter (bool bEcho=false) const override
 Reads a single character from the console ('_getch()')
virtual void ClearScreen () const override
 Clears the console screen ('clrscr()')
virtual void GetCursorPosition (uint16 &nX, uint16 &nY) const override
 Gets the absolute console cursor position ('wherex()' and 'wherey()')
virtual void SetCursorPosition (uint16 nX, uint16 nY) const override
 Sets the absolute console cursor position ('gotoxy()')

Protected Member Functions

 ConsoleLinux ()
 Constructor.
virtual ~ConsoleLinux ()
 Destructor.

Detailed Description

Linux 'Console' implementation.


Constructor & Destructor Documentation

virtual PLCore::ConsoleLinux::~ConsoleLinux ( ) [protected, virtual]

Destructor.


Member Function Documentation

virtual void PLCore::ConsoleLinux::Print ( const String sString) const [override, virtual]

Print a string to the console.

Parameters:
[in]sStringString that shall be printed

Implements PLCore::Console.

Reimplemented in PLCore::ConsoleAndroid.

virtual int PLCore::ConsoleLinux::IsKeyHit ( ) const [override, virtual]

Checks whether or not there's some keyboard input waiting on the console ('_kbhit()')

Returns:
0 if no key has been pressed, else not null

Implements PLCore::Console.

virtual int PLCore::ConsoleLinux::GetCharacter ( bool  bEcho = false) const [override, virtual]

Reads a single character from the console ('_getch()')

Parameters:
[in]bEchoEcho on the console?
Returns:
The read character - note that there's no error code

Implements PLCore::Console.

virtual void PLCore::ConsoleLinux::ClearScreen ( ) const [override, virtual]

Clears the console screen ('clrscr()')

Implements PLCore::Console.

virtual void PLCore::ConsoleLinux::GetCursorPosition ( uint16 &  nX,
uint16 &  nY 
) const [override, virtual]

Gets the absolute console cursor position ('wherex()' and 'wherey()')

Parameters:
[out]nXReceives the absolute x position of the console cursor, (0,0)=(left,top)
[out]nYReceives the absolute y position of the console cursor, (0,0)=(left,top)

Implements PLCore::Console.

virtual void PLCore::ConsoleLinux::SetCursorPosition ( uint16  nX,
uint16  nY 
) const [override, virtual]

Sets the absolute console cursor position ('gotoxy()')

Parameters:
[in]nXNew x absolute position of the console cursor, (0,0)=(left,top)
[in]nYNew y absolute position of the console cursor, (0,0)=(left,top)

Implements PLCore::Console.


The documentation for this class was generated from the following file:


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:16
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported