The OpenD Programming Language

TerminalEmulator

An abstract class that does terminal emulation. You'll have to subclass it to make it work.

The terminal implements a subset of what xterm does and then, optionally, some special features.

Its linear mode (normal) screen buffer is infinitely long and infinitely wide. It is the responsibility of your subclass to do line wrapping, etc., for display. This i think is actually incompatible with xterm but meh.

actually maybe it *should* automatically wrap them. idk. I think GNU screen does both. FIXME decide.

Its cellular mode (alternate) screen buffer can be any size you want.

class TerminalEmulator {
version(invalidator_2)
protected final
int invalidatedMin;
version(invalidator_2)
protected final
int invalidatedMax;
bool dragging;
int lastDragX;
int lastDragY;
Color defaultForeground;
Color defaultBackground;
Color[256] palette;
}

Members

Enums

CursorStyle
enum CursorStyle

Style of the cursor

Functions

attentionReceived
void attentionReceived()

After it demands attention, call this when the attention has been received you may call it immediately to ignore the demand (the default)

demandAttention
void demandAttention()

Signal the UI that some attention should be given, e.g. blink the taskbar or sound the bell. The default is to ignore the demand by instantly acknowledging it - if you override this, do NOT call super().

handleBinaryExtensionData
BinaryDataTerminalRepresentation handleBinaryExtensionData(const(ubyte)[] )

if a binary extension is triggered, the implementing class is responsible for figuring out how it should be made to fit into the screen buffer

scrollLines
bool scrollLines(int howMany, bool scrollUp)

If you subclass this and return true, you can scroll on command without needing to redraw the entire screen; returning true here suppresses the automatic invalidation of scrolled lines (except the new one).

sendKeyToApplication
bool sendKeyToApplication(TerminalKey key, bool shift, bool alt, bool ctrl, bool windows)

Send a non-character key sequence

Structs

TextAttributes
struct TextAttributes

.

Variables

attributesStore
TextAttributes attributesStore;

represents one terminal cell +//// color, etc

Meta