TConsoleShell

From Ultibo.org
Jump to: navigation, search

Return to Unit Console Shell


Description


To be documented

Class definitions



TConsoleShell = class(TShell)

public
constructor Create(AConsole:PConsoleDevice);  
destructor Destroy; override;  
private
FConsole:PConsoleDevice;  
FThread:TConsoleShellThread;  
FDefaultSession:TShellSession;  
 
procedure Reset(ASession:TConsoleSession);  
 
procedure MoveFirst(ASession:TConsoleSession);  
procedure MoveLast(ASession:TConsoleSession);  
procedure MoveLeft(ASession:TConsoleSession);  
procedure MoveRight(ASession:TConsoleSession);  
 
procedure EraseLine(ASession:TConsoleSession);  
procedure OutputLine(ASession:TConsoleSession; const AValue:String);  
function ExpandLine(ASession:TConsoleSession):Boolean;  
 
procedure EraseCharacter(ASession:TConsoleSession);  
procedure DeleteCharacter(ASession:TConsoleSession);  
procedure InsertCharacter(ASession:TConsoleSession; ACh:Char);  
procedure OverwriteCharacter(ASession:TConsoleSession; ACh:Char);  
 
procedure PrevHistory(ASession:TConsoleSession);  
procedure NextHistory(ASession:TConsoleSession);  
procedure FirstHistory(ASession:TConsoleSession);  
procedure LastHistory(ASession:TConsoleSession);  
procedure CurrentHistory(ASession:TConsoleSession);  
protected
function CreateWindow:TShellSession;  
function DestroyWindow(ASession:TShellSession):Boolean;  
public
property Console:PConsoleDevice read FConsole;  
property DefaultSession:TShellSession read FDefaultSession;  
 
function DoReset(ASession:TShellSession):Boolean; override;  
 
function DoClear(ASession:TShellSession):Boolean; override;  
 
function DoInput(ASession:TShellSession; var AInput:String):Boolean; override;  
 
function DoOutputEx(ASession:TShellSession; const AOutput:String; AReturn:Boolean):Boolean; override;  
 
function DoGetSize(ASession:TShellSession; var ARows,ACols:LongWord):Boolean; override;  
function DoSetSize(ASession:TShellSession; ARows,ACols:LongWord):Boolean; override;  
 
function DoGetCursor(ASession:TShellSession; var ARow,ACol:LongWord):Boolean; override;  
function DoSetCursor(ASession:TShellSession; ARow,ACol:LongWord):Boolean; override;  
 
function DoGetColors(ASession:TShellSession; var AForecolor,ABackcolor:LongWord):Boolean; override;  
function DoSetColors(ASession:TShellSession; AForecolor,ABackcolor:LongWord):Boolean; override;  
 
function DoGetCoordinates(ASession:TShellSession; var ARow,ACol:LongWord):Boolean; override;  
function DoSetCoordinates(ASession:TShellSession; ARow,ACol:LongWord):Boolean; override;  
 
function DoGetCursorMode(ASession:TShellSession; var AMode:LongWord):Boolean; override;  
function DoSetCursorMode(ASession:TShellSession; AMode:LongWord):Boolean; override;  
 
function DoGetCursorShape(ASession:TShellSession; var AShape:LongWord):Boolean; override;  
function DoSetCursorShape(ASession:TShellSession; AShape:LongWord):Boolean; override;  
 
function ConsoleChar(ASession:TShellSession; AChar:Char):Boolean;  
function ConsoleExtended(ASession:TShellSession; AChar:Char):Boolean;  


Function declarations



constructor TConsoleShell.Create(AConsole:PConsoleDevice);
Description: To be documented
Note None documented


destructor TConsoleShell.Destroy;
Description: To be documented
Note None documented


procedure TConsoleShell.Reset(ASession:TConsoleSession);
Description: To be documented
Note None documented


procedure TConsoleShell.MoveFirst(ASession:TConsoleSession);
Description: Move the cursor to the starting position of the line
Note None documented


procedure TConsoleShell.MoveLast(ASession:TConsoleSession);
Description: Move the cursor to the ending position of the line
Note None documented


procedure TConsoleShell.MoveLeft(ASession:TConsoleSession);
Description: Move the cursor one position to the left in the line
Note None documented


procedure TConsoleShell.MoveRight(ASession:TConsoleSession);
Description: Move the cursor one position to the right in the line
Note None documented


procedure TConsoleShell.EraseLine(ASession:TConsoleSession);
Description: Erase all characters in the line and reset the cursor position
Note None documented


procedure TConsoleShell.OutputLine(ASession:TConsoleSession; const AValue:String);
Description: Output all characters in value and update the cursor position
Note None documented


function TConsoleShell.ExpandLine(ASession:TConsoleSession):Boolean;
Description: Expand the tab key to a command completion if available
Note None documented


procedure TConsoleShell.EraseCharacter(ASession:TConsoleSession);
Description: Erase the character to the left of the cursor position
Note None documented


procedure TConsoleShell.DeleteCharacter(ASession:TConsoleSession);
Description: Delete the character to the right of the cursor position
Note None documented


procedure TConsoleShell.InsertCharacter(ASession:TConsoleSession; ACh:Char);
Description: Insert a character at the cursor position
Note None documented


procedure TConsoleShell.OverwriteCharacter(ASession:TConsoleSession; ACh:Char);
Description: Overwrite the character at the cursor position
Note None documented


procedure TConsoleShell.PrevHistory(ASession:TConsoleSession);
Description: Get the previous command history value
Note None documented


procedure TConsoleShell.NextHistory(ASession:TConsoleSession);
Description: Get the next command history value
Note None documented


procedure TConsoleShell.FirstHistory(ASession:TConsoleSession);
Description: Get the first command history value
Note None documented


procedure TConsoleShell.LastHistory(ASession:TConsoleSession);
Description: Get the last command history value
Note None documented


procedure TConsoleShell.CurrentHistory(ASession:TConsoleSession);
Description: Get the current command history value
Note None documented


function TConsoleShell.CreateWindow:TShellSession;
Description: To be documented
Note None documented


function TConsoleShell.DestroyWindow(ASession:TShellSession):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.DoReset(ASession:TShellSession):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.DoClear(ASession:TShellSession):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.DoInput(ASession:TShellSession; var AInput:String):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.DoOutputEx(ASession:TShellSession; const AOutput:String; AReturn:Boolean):Boolean; 
Description: To be documented
Note None documented


function TConsoleShell.DoGetSize(ASession:TShellSession; var ARows,ACols:LongWord):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.DoSetSize(ASession:TShellSession; ARows,ACols:LongWord):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.DoGetCursor(ASession:TShellSession; var ARow,ACol:LongWord):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.DoSetCursor(ASession:TShellSession; ARow,ACol:LongWord):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.DoGetColors(ASession:TShellSession; var AForecolor,ABackcolor:LongWord):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.DoSetColors(ASession:TShellSession; AForecolor,ABackcolor:LongWord):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.DoGetCoordinates(ASession:TShellSession; var ARow,ACol:LongWord):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.DoSetCoordinates(ASession:TShellSession; ARow,ACol:LongWord):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.DoGetCursorMode(ASession:TShellSession; var AMode:LongWord):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.DoSetCursorMode(ASession:TShellSession; AMode:LongWord):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.DoGetCursorShape(ASession:TShellSession; var AShape:LongWord):Boolean; 
Description: To be documented
Note None documented


function TConsoleShell.DoSetCursorShape(ASession:TShellSession; AShape:LongWord):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.ConsoleChar(ASession:TShellSession; AChar:Char):Boolean;
Description: To be documented
Note None documented


function TConsoleShell.ConsoleExtended(ASession:TShellSession; AChar:Char):Boolean;
Description: To be documented
Note None documented


Return to Unit Reference