class

Bubbles::Cursor::Model

Inherits Reference < Object

Model is the Bubble Tea model for this cursor element.

Constructors

new

Creates a new model with default settings.

Source

Instance methods

blinked=(blinked : Bool)

blinked? is the state of the cursor blink. When true, the cursor is hidden.

Source
blinked?

blinked? is the state of the cursor blink. When true, the cursor is hidden.

Source
blur

Blur blurs the cursor.

Source
char

char is the character under the cursor

Source
char=(char : String)

char is the character under the cursor

Source
dup

Creates a deep copy of the model.

Source
focus

Focus focuses the cursor to allow it to blink if desired.

Source
focus=(focus : Bool)

focus indicates whether the containing input is focused

Source
focus?

focus indicates whether the containing input is focused

Source
id

The ID of this Model as it relates to other cursors

Source
id=(id : Int32)

The ID of this Model as it relates to other cursors

Source
mode

Mode returns the model's cursor mode. For available cursor modes, see type Mode.

Source
mode=(mode : Mode) : Tea::Cmd | Nil

mode determines the behavior of the cursor

Source
set_char(char : String)

SetChar sets the character under the cursor.

Source
set_mode(mode : Mode) : Tea::Cmd | Nil

SetMode sets the model's cursor mode. This method returns a command.

For available cursor modes, see type CursorMode.

Source
style

Style styles the cursor block.

Source
style=(style : Lipgloss::Style)

Style styles the cursor block.

Source
text_style

TextStyle is the style used for the cursor when it is blinking (hidden), i.e. displaying normal text.

Source
text_style=(text_style : Lipgloss::Style)

TextStyle is the style used for the cursor when it is blinking (hidden), i.e. displaying normal text.

Source
update(msg : Tea::Msg) : Tuple(Model, Tea::Cmd | Nil)

Update updates the cursor.

Source
view

View displays the cursor.

Source