terminus.effect

package terminus.effect

Members list

Type members

Classlikes

Attributes

Source
AlternateScreenMode.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type
F
object AnsiCodes

The codes for controlling terminal functionality, commonly known as ANSI escape codes. See:

Attributes

Source
AnsiCodes.scala
Supertypes
class Object
trait Matchable
class Any
Self type
AnsiCodes.type
trait ApplicationMode[+F <: Effect]

Attributes

Source
ApplicationMode.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type
F
trait Color[+F <: Writer] extends WithStack[F]

Attributes

Source
Color.scala
Supertypes
trait WithStack[F]
class Object
trait Matchable
class Any
Known subtypes
Self type
F
trait Cursor extends Writer

Functionality for manipulating the terminal's cursor.

Functionality for manipulating the terminal's cursor.

Attributes

Source
Cursor.scala
Supertypes
trait Writer
trait Effect
class Object
trait Matchable
class Any
Known subtypes
trait Display[+F <: Writer] extends WithStack[F], WithToggle[F]

Terminal effects that can change display properties.

Terminal effects that can change display properties.

Attributes

Source
Display.scala
Supertypes
trait WithToggle[F]
trait WithStack[F]
class Object
trait Matchable
class Any
Known subtypes
Self type
F
trait Effect

Marker trait for Terminus effect traits. All effect traits should have this as a super-trait.

Marker trait for Terminus effect traits. All effect traits should have this as a super-trait.

Attributes

Source
Effect.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Reader
trait Terminal
trait Writer
trait Cursor
trait Erase
trait Scroll
Show all
sealed trait Eof

Attributes

Companion
object
Source
Reader.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Eof
object Eof extends Eof

Attributes

Companion
trait
Source
Reader.scala
Supertypes
trait Sum
trait Mirror
trait Eof
class Object
trait Matchable
class Any
Show all
Self type
Eof.type
trait Erase extends Writer

Functionality for clearing contents on the terminal.

Functionality for clearing contents on the terminal.

Attributes

Source
Erase.scala
Supertypes
trait Writer
trait Effect
class Object
trait Matchable
class Any
Known subtypes
trait RawMode[+F <: Effect]

Attributes

Source
RawMode.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type
F
trait Reader extends Effect

Attributes

Source
Reader.scala
Supertypes
trait Effect
class Object
trait Matchable
class Any
Known subtypes
trait Scroll extends Writer

Functionality for scrolling the terminal.

Functionality for scrolling the terminal.

Attributes

Source
Scroll.scala
Supertypes
trait Writer
trait Effect
class Object
trait Matchable
class Any
final case class Stack(reset: String)

A Stack handles stack for Terminal effects that overwrite each other within nested blocks. The canoncial example is color. There can only be one foreground or background color in use at any one time, but the color revert to that of the surrounding block when a given block exits. This is handles by storing a stack of color codes, and doing the appropriate actions on entering a block (a push) and exiting a block (a pop).

A Stack handles stack for Terminal effects that overwrite each other within nested blocks. The canoncial example is color. There can only be one foreground or background color in use at any one time, but the color revert to that of the surrounding block when a given block exits. This is handles by storing a stack of color codes, and doing the appropriate actions on entering a block (a push) and exiting a block (a pop).

Value parameters

`reset`:

The escape code to emit when there are no elements left on the stack.

Attributes

Source
Stack.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final class Toggle(set: String, reset: String)

A Toggle stores state for Terminal effects that involve turning on some state within a block of code and turning it off when that block exits. A typical example is text styling: we have a block where we want invert styling enabled, and when the block finishes we want inverted styling turned off. A complication arises when we can nest blocks. An inverted block might be nested inside another inverted block. It's only when the outer block exits that the styling should be turned off. A Toggle handles this with a counter. Only when the counter hits zero do we emit the reset escape code.

A Toggle stores state for Terminal effects that involve turning on some state within a block of code and turning it off when that block exits. A typical example is text styling: we have a block where we want invert styling enabled, and when the block finishes we want inverted styling turned off. A complication arises when we can nest blocks. An inverted block might be nested inside another inverted block. It's only when the outer block exits that the styling should be turned off. A Toggle handles this with a counter. Only when the counter hits zero do we emit the reset escape code.

Value parameters

`reset`:

The escape code to emit when exiting a block.

`set`:

The escape code to emit when entering a block.

Attributes

Source
Toggle.scala
Supertypes
class Object
trait Matchable
class Any
trait WithEffect[+F <: Writer]

Attributes

Source
WithEffect.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type
F
trait WithStack[+F <: Writer]

Utility trait for working with Stack.

Utility trait for working with Stack.

Attributes

Source
WithStack.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Color[F]
trait Terminal
trait Display[F]
Show all
Self type
F
trait WithToggle[+F <: Writer]

Utility trait for working with Toggle.

Utility trait for working with Toggle.

Attributes

Source
WithToggle.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type
F
trait Writer extends Effect

Interface for writing to a console.

Interface for writing to a console.

Attributes

Source
Writer.scala
Supertypes
trait Effect
class Object
trait Matchable
class Any
Known subtypes
trait Cursor
trait Terminal
trait Erase
trait Scroll
Show all