TApxCharSetMapping.GetNextDrawCommand

TApxCharSetMapping

function GetNextDrawCommand(
  var aFont : TApxKeyString; var aText : string) : Boolean;

Retrieves the next draw command from the current script.

The emulator, when it needs to display text on the terminal window, will separate out the text to be drawn into strings from different character sets. For each individual string, it will call the GenerateDrawScript method of its internal character set mapping object to generate a series of drawing commands that can be used to draw the text on the screen. Each command will be of the form "switch to font X, write string Y." The emulator then reads the commands one at a time using the GetNextDrawCommand method, and draws the text in the required font.

The GetNextDrawCommand method returns True if there is another command, and sets aFont to the font name required and aText to the string that needs to be drawn in that font. It returns False if there are no more commands in the current script. The emulator will continue to call GetNextDrawCommand and draw the specified text in the given font until the method returns False and the script is exhausted.

See also: GenerateDrawScript