VtScreen

Undocumented in source.

Constructors

this
this()
Undocumented in source.
this
this(Tty tt, string term)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

beep
void beep()
Undocumented in source. Be warned that the author may not have intended to support it.
clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
colors
int colors()
Undocumented in source. Be warned that the author may not have intended to support it.
enableAlternateScreen
void enableAlternateScreen(bool enabled)
Undocumented in source. Be warned that the author may not have intended to support it.
enableMouse
void enableMouse(MouseEnable en)
Undocumented in source. Be warned that the author may not have intended to support it.
enablePaste
void enablePaste(bool b)
Undocumented in source. Be warned that the author may not have intended to support it.
events
EventQ events()
Undocumented in source. Be warned that the author may not have intended to support it.
fill
void fill(string s, Style style)
Undocumented in source. Be warned that the author may not have intended to support it.
fill
void fill(string s)
Undocumented in source. Be warned that the author may not have intended to support it.
getClipboard
void getClipboard()
Undocumented in source. Be warned that the author may not have intended to support it.
opIndex
Cell opIndex(size_t x, size_t y)
Undocumented in source. Be warned that the author may not have intended to support it.
opIndexAssign
void opIndexAssign(Cell c, size_t x, size_t y)
Undocumented in source. Be warned that the author may not have intended to support it.
resize
void resize()
Undocumented in source. Be warned that the author may not have intended to support it.
setClipboard
void setClipboard(const(ubyte[]) b)
Undocumented in source. Be warned that the author may not have intended to support it.
setSize
void setSize(Coord size)
Undocumented in source. Be warned that the author may not have intended to support it.
setTitle
void setTitle(string title)
Undocumented in source. Be warned that the author may not have intended to support it.
show
void show()
Undocumented in source. Be warned that the author may not have intended to support it.
showCursor
void showCursor(Coord pos, Cursor cur)
Undocumented in source. Be warned that the author may not have intended to support it.
showCursor
void showCursor(Cursor cur)
Undocumented in source. Be warned that the author may not have intended to support it.
size
Coord size()
Undocumented in source. Be warned that the author may not have intended to support it.
start
void start()
Undocumented in source. Be warned that the author may not have intended to support it.
stop
void stop()
Undocumented in source. Be warned that the author may not have intended to support it.
sync
void sync()
Undocumented in source. Be warned that the author may not have intended to support it.
waitForEvent
bool waitForEvent(Duration timeout, Duration resched)
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(string s)
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(wstring s)
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(dstring s)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

position
Coord position [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
position
const(Coord) position [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
style
Style style [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
style
const(Style) style [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

Vt
struct Vt
Undocumented in source.

Inherited Members

From Screen

clear
void clear()

Clears the screen. This doesn't take effect until the show function is called.

opIndex
Cell opIndex(size_t x, size_t y)

Retrieve the contents for a given address. This is taken from the backing draw buffer, and won't necessarily reflect what is displayed to the user until show is called.

opIndex
Cell opIndex(Coord pos)

Convenience for indexing

opIndexAssign
void opIndexAssign(Cell , size_t x, size_t y)

Set the content for for a given location. This won't necessarily take effect until the show function is called.

opIndexAssign
void opIndexAssign(Cell c, Coord pos)

Convenience for indexing.

opDollar
size_t opDollar()

Support $ operation in indices.

showCursor
void showCursor(Cursor )

Show the cursor at its current location.

showCursor
void showCursor(Coord pos, Cursor cur)

Move the cursor to the given location, and show it using the appropriate style.

size
Coord size()

Obtain the terminal window size. The x, y represent the number of columns and rows. The highest valid address will be coord.x-1, coord.y-1.

waitForEvent
bool waitForEvent(Duration timeout, Duration resched)

Wait for at least one event to be posted, for up to the given time.

waitForEvent
bool waitForEvent(Duration timeout)

Wait for at least one event to be posted. This simpler version can be used when the caller is in a simple poll/handle loop (typical for some simple applications.)

events
EventQ events()

Obtain the list of events. The returned value is both an input range of Event, (for receiving events), and an output range of Event.

enablePaste
void enablePaste(bool b)

Enable bracketed paste mode mode. Bracketed paste mode will pasted content in a single event, and is therefore distinguishable from individually typed characters.

enableMouse
void enableMouse(MouseEnable en)

Enable mouse mode. This can cause terminals/emulators to behave differently -- for example affecting the ability to scroll or use copy/paste.

enableMouse
void enableMouse()

Enable typical mouse features. This enables tracking, but leaves drag events disabled. Enabling mouse drag will impair use of copy-paste at the OS level, which many users tend to find frustrating.

disableMouse
void disableMouse()

Disable all mouse handling/capture.

enableAlternateScreen
void enableAlternateScreen(bool on)

Enable or disable the alternate screen. This must be called before start(). Note that this is best effort -- not every terminal actually supports this. This is on by default. It can be disabled by setting DCELL_ALTSCREEN=disable in the environment.

setTitle
void setTitle(string )

Set the title of the window. This only works for emulators running in a windowing environment, and is not universally supported. Setting an empty string as the title may let the emulator set a specific default, but it may also leave it empty - it depends on the specific terminal implementation.

colors
int colors()

If the terminal supports color, this returns the the number of colors.

show
void show()

Show content on the screen, doing so efficiently.

sync
void sync()

Update the screen, writing every cell. This should be done to repair screen damage, for example.

beep
void beep()

Emit a beep or bell. This is done immediately.

setSize
void setSize(Coord )

Attempt to resize the terminal. YMMV.

fill
void fill(string s, Style style)

Fill the entire screen with the given content and style. Content is not drawn until the show() or sync() functions are called.

fill
void fill(string s)

Fill the entire screen with the given content, but preserve the style.

resize
void resize()

Applications should call this in response to receiving a resize event. (This can't be done automatically to avoid thread safety issues.)

start
void start()

Start sets up the terminal. This changes terminal settings to put the input stream into raw mode, etc.

stop
void stop()

Stop is called to stop processing on the screen. The terminal settings will be restored, and the screen may be cleared.

style
Style style [@property getter]

The style property is used when writing content to the screen using the simpler write() API.

style
const(Style) style [@property setter]
Undocumented in source.
position
Coord position [@property getter]

The position property is used when writing content to the screen when using the simpler write() API. The position will advance as content is written.

position
const(Coord) position [@property setter]
Undocumented in source.
write
void write(string )

Write content to the screen. The content will be displayed using the position and the style currently set. It will wrap at the edge of the display if it is too long.

write
void write(wstring )
Undocumented in source.
write
void write(dstring )
Undocumented in source.
setClipboard
void setClipboard(const(ubyte[]) )

Post arbitrary data to the system clipboard. It's up to the recipient to decode the data meaningfully. Terminals may prevent this for security reasons.

getClipboard
void getClipboard()

Request the clipboard contents. It may be ignored.

Meta