Dialog

io.worxbend.tui.widgets.Dialog
final case class Dialog(title: String, message: Text, buttons: Seq[String] = ..., selectedButton: Int = ..., style: Style = ..., highlightStyle: Style = ..., borderType: BorderType = ...) extends Widget

A modal-style dialog drawn over existing content: clears a centered box, borders it, renders the message and a row of buttons with one highlighted.

The widget owns no state and manages no stack of its own — it paints over whatever was drawn into the buffer before it, so rendering it last in the view is what makes it modal-looking. The DSL's Screen stack (TuiApp.pushScreen) builds on exactly that.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Widget
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def boxIn(area: Rect): Rect

The centered box actually painted in area; empty when there is no room for its chrome.

The centered box actually painted in area; empty when there is no room for its chrome.

Attributes

def buttonAt(position: Position, area: Rect): Option[Int]

The button visibly painted under position, never the currently selected button by default.

The button visibly painted under position, never the currently selected button by default.

Attributes

def render(area: Rect, buffer: Buffer): Unit

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product