class

Tui::TextEditor

Inherits Tui::Widget / Tui::Reactive / Reference / Object

Constructors

new(id : String | Nil = nil)
Source

Instance methods

backspace
Source
copy
Source
current_line_bg
Source
current_line_bg=(current_line_bg : Color)
Source
cursor_bg
Source
cursor_bg=(cursor_bg : Color)
Source
cursor_fg
Source
cursor_fg=(cursor_fg : Color)
Source
delete
Source
delete_selection
Source
goto_line(line : Int32) : Nil
Source
insert_char(char : Char) : Nil

Editing operations

Source
insert_newline
Source
insert_text(text : String) : Nil
Source
line_number_bg
Source
line_number_bg=(line_number_bg : Color)
Source
line_number_fg
Source
line_number_fg=(line_number_fg : Color)
Source
lines
Source
load_file(path : Path) : Bool
Source
modified?
Source
move_down(with_selection : Bool = false) : Nil
Source
move_end(with_selection : Bool = false) : Nil
Source
move_home(with_selection : Bool = false) : Nil
Source
move_left(with_selection : Bool = false) : Nil

Cursor movement

Source
move_right(with_selection : Bool = false) : Nil
Source
move_to_end
Source
move_to_start
Source
move_up(with_selection : Bool = false) : Nil
Source
move_word_left(with_selection : Bool = false) : Nil
Source
move_word_right(with_selection : Bool = false) : Nil
Source
on_change
Source
on_event(event : Event) : Bool

Override to handle events for this widget (target/bubble phase) Called after children have had a chance to handle the event

Source
on_save
Source
page_down
Source
page_up
Source
paste(text : String) : Nil
Source
path
Source
render(buffer : Buffer, clip : Rect) : Nil

Override to render widget content

Source
save
Source
save_as(path : Path) : Bool
Source
select_all
Source
selection_bg
Source
selection_bg=(selection_bg : Color)
Source
selection_fg
Source
selection_fg=(selection_fg : Color)
Source
show_line_numbers
Source
show_line_numbers=(show_line_numbers : Bool)
Source
tab_size
Source
tab_size=(tab_size : Int32)
Source
text
Source
text=(content : String) : Nil
Source
text_bg
Source
text_bg=(text_bg : Color)
Source
text_fg

Style

Source
text_fg=(text_fg : Color)

Style

Source
title
Source
word_wrap
Source
word_wrap=(word_wrap : Bool)
Source

Nested types