W3cubDocs

/Pony

ANSITerm

[Source]

Handles ANSI escape codes from stdin.

actor tag ANSITerm

Constructors

create

[Source]

Create a new ANSI term.

new tag create(
  notify: ANSINotify iso,
  source: DisposableActor tag,
  timers: Timers tag = reference)
: ANSITerm tag^

Parameters

Returns

Public Behaviours

apply

[Source]

Receives input from stdin.

be apply(
  data: Array[U8 val] iso)

Parameters

prompt

[Source]

Pass a prompt along to the notifier.

be prompt(
  value: String val)

Parameters

size

[Source]

be size()

dispose

[Source]

Stop accepting input, inform the notifier we have closed, and dispose of our source.

be dispose()

Private Behaviours

_timeout

[Source]

Our timer since receiving an ESC has expired. Send the buffered data as if it was not an escape sequence.

be _timeout()

Private Functions

_size

[Source]

Pass the window size to the notifier.

fun ref _size()
: None val

Returns

_mod

[Source]

Set the modifier bools.

fun ref _mod()
: (Bool val , Bool val , Bool val)

Returns

_keypad

[Source]

An extended key.

fun ref _keypad()
: None val

Returns

_up

[Source]

Up arrow.

fun ref _up()
: None val

Returns

_down

[Source]

Down arrow.

fun ref _down()
: None val

Returns

_left

[Source]

Left arrow.

fun ref _left()
: None val

Returns

_right

[Source]

Right arrow.

fun ref _right()
: None val

Returns

_delete

[Source]

Delete key.

fun ref _delete()
: None val

Returns

_insert

[Source]

Insert key.

fun ref _insert()
: None val

Returns

_home

[Source]

Home key.

fun ref _home()
: None val

Returns

_end

[Source]

End key.

fun ref _end()
: None val

Returns

_page_up

[Source]

Page up key.

fun ref _page_up()
: None val

Returns

_page_down

[Source]

Page down key.

fun ref _page_down()
: None val

Returns

_fn_key

[Source]

Function key.

fun ref _fn_key(
  i: U8 val)
: None val

Parameters

  • i: U8 val

Returns

_esc_flush

[Source]

Pass a partial or unrecognised escape sequence to the notifier.

fun ref _esc_flush()
: None val

Returns

_esc_clear

[Source]

Clear the escape state.

fun ref _esc_clear()
: None val

Returns

© 2016-2018, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/term-ANSITerm