|
|
Line 61: |
Line 61: |
| | | |
| | | |
− | '''Console shell''' | + | '''Console shell specific classes''' |
| | | |
− | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" |
− | | + | |
− | <code>TConsoleShell = class(TShell)</code>
| + | |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| + | |
− | {| class="wikitable" style="font-size: 14px; background: white;"
| + | |
| |- | | |- |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | + | | [[TConsoleShell|<code>TConsoleShell = class(TShell)</code>]] |
− | |-
| + | |
− | | <code>constructor Create(AConsole:PConsoleDevice);</code> | + | |
− | | style="width: 50%;"|
| + | |
− | |-
| + | |
− | | <code>destructor Destroy; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div>
| + | |
− | |-
| + | |
− | | <code>FConsole:PConsoleDevice;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>FThread:TConsoleShellThread;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>FDefaultSession:TShellSession;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>procedure Reset(ASession:TConsoleSession);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>procedure MoveFirst(ASession:TConsoleSession);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure MoveLast(ASession:TConsoleSession);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure MoveLeft(ASession:TConsoleSession);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure MoveRight(ASession:TConsoleSession);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>procedure EraseLine(ASession:TConsoleSession);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure OutputLine(ASession:TConsoleSession; const AValue:String);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function ExpandLine(ASession:TConsoleSession):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>procedure EraseCharacter(ASession:TConsoleSession);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure DeleteCharacter(ASession:TConsoleSession);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure InsertCharacter(ASession:TConsoleSession; ACh:Char);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure OverwriteCharacter(ASession:TConsoleSession; ACh:Char);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>procedure PrevHistory(ASession:TConsoleSession);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure NextHistory(ASession:TConsoleSession);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure FirstHistory(ASession:TConsoleSession);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure LastHistory(ASession:TConsoleSession);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>procedure CurrentHistory(ASession:TConsoleSession);</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
| + | |
− | |-
| + | |
− | | <code>function CreateWindow:TShellSession;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function DestroyWindow(ASession:TShellSession):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
| + | |
− | |-
| + | |
− | | <code>property Console:PConsoleDevice read FConsole;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>property DefaultSession:TShellSession read FDefaultSession;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function DoClear(ASession:TShellSession):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function DoInput(ASession:TShellSession; var AInput:String):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function DoOutputEx(ASession:TShellSession; const AOutput:String; AReturn:Boolean):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function DoGetSize(ASession:TShellSession; var ARows,ACols:LongWord):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function DoSetSize(ASession:TShellSession; ARows,ACols:LongWord):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function DoGetCursor(ASession:TShellSession; var ARow,ACol:LongWord):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function DoSetCursor(ASession:TShellSession; ARow,ACol:LongWord):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function DoGetColors(ASession:TShellSession; var AForecolor,ABackcolor:LongWord):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function DoSetColors(ASession:TShellSession; AForecolor,ABackcolor:LongWord):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function DoGetCoordinates(ASession:TShellSession; var ARow,ACol:LongWord):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function DoSetCoordinates(ASession:TShellSession; ARow,ACol:LongWord):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function DoGetCursorMode(ASession:TShellSession; var AMode:LongWord):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function DoSetCursorMode(ASession:TShellSession; AMode:LongWord):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function DoGetCursorShape(ASession:TShellSession; var AShape:LongWord):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function DoSetCursorShape(ASession:TShellSession; AShape:LongWord):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>function ConsoleChar(ASession:TShellSession; AChar:Char):Boolean;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function ConsoleExtended(ASession:TShellSession; AChar:Char):Boolean;</code>
| + | |
− | |
| + | |
| |- | | |- |
| |} | | |} |
− | </div></div>
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" |
− | | + | |
− | '''Console session'''
| + | |
− | | + | |
− | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
| + | |
− | | + | |
− | <code>TConsoleSession = class(TShellSession)</code>
| + | |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| + | |
− | {| class="wikitable" style="font-size: 14px; background: white;"
| + | |
| |- | | |- |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | + | | [[TConsoleSession|<code>TConsoleSession = class(TShellSession)</code>]] |
− | |-
| + | |
− | | <code>constructor Create(AShell:TShell; AIdentifier:LongWord);</code> | + | |
− | | style="width: 50%;"|
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
| + | |
− | |-
| + | |
− | | <code>Command:String;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>MaxX:LongWord;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>MaxY:LongWord;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>LastX:LongWord;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>LastY:LongWord;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>FirstX:LongWord;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>FirstY:LongWord;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>CurrentX:LongWord;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>CurrentY:LongWord;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>Mode:LongWord;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>Shape:LongWord;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>Window:TWindowHandle;</code>
| + | |
− | |
| + | |
| |- | | |- |
| |} | | |} |
− | </div></div>
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" |
− | | + | |
− | '''Console shell thread'''
| + | |
− | | + | |
− | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
| + | |
− | | + | |
− | <code>TConsoleShellThread = class(TThread)</code>
| + | |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| + | |
− | {| class="wikitable" style="font-size: 14px; background: white;"
| + | |
| |- | | |- |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | + | | [[TConsoleShellThread|<code>TConsoleShellThread = class(TThread)</code>]] |
− | |-
| + | |
− | | <code>constructor Create(AShell:TConsoleShell);</code> | + | |
− | | style="width: 50%;"|
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div>
| + | |
− | |-
| + | |
− | | <code>FShell:TConsoleShell;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | |colspan="2"|
| + | |
− | |-
| + | |
− | | <code>procedure Execute; override;</code>
| + | |
− | |
| + | |
| |- | | |- |
| |} | | |} |
− | </div></div>
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" |
− | | + | |
− | '''Console shell exit'''
| + | |
− | | + | |
− | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
| + | |
− | | + | |
− | <code>TConsoleShellExit = class(TShellCommand)</code>
| + | |
− | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
| + | |
− | {| class="wikitable" style="font-size: 14px; background: white;" | + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
| + | |
− | |-
| + | |
− | | <code>constructor Create;</code>
| + | |
− | | style="width: 50%;"|
| + | |
− | |-
| + | |
− | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div>
| + | |
− | |-
| + | |
− | | <code>function DoHelp(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
| + | |
− | |
| + | |
− | |-
| + | |
− | | <code>function DoInfo(AShell:TShell; ASession:TShellSession):Boolean; override;</code>
| + | |
− | |
| + | |
| |- | | |- |
− | | <code>function DoCommand(AShell:TShell; ASession:TShellSession; AParameters:TStrings):Boolean; override;</code> | + | | [[TConsoleShellExit|<code>TConsoleShellExit = class(TShellCommand)</code>]] |
− | |
| + | |
| |- | | |- |
| |} | | |} |
− | </div></div>
| |
| <br /> | | <br /> |
| | | |