LitDev Extension API

LD3DView LDArray LDBits LDBlueTooth LDCall
LDChart LDClient LDClipboard LDColours LDCommPort
LDController LDControls LDCursors LDDataBase LDDateTime
LDDebug LDDialogs LDDictionary LDEffect LDEmail
LDEncryption LDEvents LDFastArray LDFastShapes LDFigures
LDFile LDFocus LDftp LDGraph LDGraphicsWindow
LDHID LDImage LDInline LDIOWarrior LDList
LDLogic LDMath LDMathX LDMatrix LDMusic
LDNetwork LDPhysics LDProcess LDQueue LDRegex
LDResources LDScrollBars LDSearch LDServer LDSettings
LDShapes LDShell LDSort LDSound LDSpeech
LDStatistics LDStopwatch LDText LDTextWindow LDTimer
LDTranslate LDUnits LDUtilities LDVector LDWaveForm
LDWebCam LDWindows LDxml LDZip

LDTextWindow
TextWindow utilities.
Includes low level keyboard events.


Capture Encoding Hide
KeyDown KeyUp LastKey
Print Read ReadNumber
SendKey SetColour SetColours
Show

Capture(fileName,border)
Save the TextWindow as an image file (png, jpg, bmp, gif, tiff or ico).

The window must be visible and a short delay may be required after updating the window before calling.

fileName The file to save the image to (*.png, *.jpg, *.bmp, *.gif, *.tiff or *.ico).
If this is set to "", then the image is created internally as an ImageList.

border Include the window border ("True" or "False").
returns The ImageList image if fileName is "", otherwise if output to a file, then "" is returned.

Encoding
Set extended encoding for the TextWindow.
Allowed values are:
"ASCII" (default), "Unicode", "UTF7", "UTF8"


Hide()
Hide the TextWindow.
Replacement for standard method that may fail (do not mix these methods).


KeyDown
Low level event when a key is pressed down.
This event is independent of any window focus, i.e. not just for TextWindow or GraphicsWindow.


KeyUp
Low level event when a key is released.
This event is independent of any window focus, i.e. not just for TextWindow or GraphicsWindow.


LastKey
Last key pressed or released.

Print(border)
Print the TextWindow contents.

The window must be visible and a short delay may be required after updating the window before calling.

border Include the window border ("True" or "False").
returns None.

Read(delay)
Read from a TextWindow with a maximum delay.
This sends a Return (ENTER) to the TextWindow after the delay.
If the user presses Return before the delay is completed, then no further action is taken.

delay A maximum delay in ms before the Read is terminated.
returns The text that was read from the TextWindow.

ReadNumber(delay)
Read a number from a TextWindow with a maximum delay.
This sends a Return (ENTER) to the TextWindow after the delay.
If the user presses Return before the delay is completed, then no further action is taken.

delay A maximum delay in ms before the Read is terminated.
returns The number that was read from the TextWindow.

SendKey(window,key)
Send a key to a window. This is the same a typing the key into a window.
window The window title e.g. TextWindow.Title or GraphicsWindow.Title.
key The key to send e.g. "Return"

SetColour(index,colour)
Replace one of the standard TextWindow colours.
There are 16 available colours, by default they are indexed 0 to 15:
Black (0), DarkBlue (1), DarkGreen (2), DarkCyan (3), DarkRed (4), DarkMagenta (5), DarkYellow (6), Gray (7),
DarkGray (8), Blue (9), Green (10), Cyan (11), Red (12), Magenta (13), Yellow (14), White (15).
Note that you can still use TextWindow.BackgroundColor and TextWindow.ForegroundColor to use the new colours (with the original colour names), alternatively the colours can be selected using LDTextWindow.SetColours from the indices.
The colours must be set using either method before they are applied.

index The stanadard colour index colour to replace.
colour Any colour to replace a standard colour with.

SetColours(fgIndex,bgIndex)
Set the current foreground and background colour indices.
fgIndex The foreground colour index (0 to 15).
bgIndex The background colour index (0 to 15).

Show()
Show the TextWindow and give it focus.
Replacement for standard method that may fail (do not mix these methods).