class TermBuf::CursorIO

Overview

An IO bound to a Cursor.

Unbuffered by default, so what is written has reached the buffer by the time the call returns and the next paint shows it. An application streaming enough text for the command traffic to matter can set sync = false, which gathers writes until a newline or a #flush.

Included Modules

Defined in:

termbuf/cursor.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(cursor : Cursor) #

[View source]

Instance Method Detail

def cursor : Cursor #

Where this writes.


[View source]
def unbuffered_close : Nil #
Description copied from module IO::Buffered

Closes the wrapped IO.

TODO Add return type restriction Nil


[View source]
def unbuffered_flush : Nil #
Description copied from module IO::Buffered

Flushes the wrapped IO.

TODO Add return type restriction Nil


[View source]
def unbuffered_read(slice : Bytes) : Int32 #

Always raises. A cursor is somewhere to put text, not somewhere to get it.


[View source]
def unbuffered_rewind : Nil #

Always raises, for the same reason as #unbuffered_read.


[View source]
def unbuffered_write(slice : Bytes) : Nil #
Description copied from module IO::Buffered

Writes slice entirely into the wrapped IO.

TODO Add return type restriction Nil


[View source]