class TextUi::TextEditor
- TextUi::TextEditor
- TextUi::Widget
- Reference
- Object
Defined in:
textui/text_editor.crConstructors
Instance Method Summary
-
#border_color : Format
Colors
-
#border_color=(border_color : Format)
Colors
- #create_cursor(x = 0, y = 0) : TextCursor
- #cursor
- #cursor_changed : Signal_cursor_changed
- #cursors : Array(TextCursor)
- #destroy_cursor(cursor) : Nil
- #document : TextDocument
- #filename : String
- #filename(*args, **options)
- #filename(*args, **options, &)
- #filename=(filename : String)
- #invalidate
- #key_typed : Signal_key_typed
- #open(filename : String)
- #render
- #render_cursors
- #save
- #save(*args, **options)
- #save(*args, **options, &)
- #show_line_numbers=(value : Bool) : Nil
- #show_line_numbers? : Bool
- #syntax_highlighter=(arg)
-
#tab_width : Int32
Tab key will be replaced by this number of spaces, a number <= 0 means to not recognize tab key.
-
#tab_width=(tab_width : Int32)
Tab key will be replaced by this number of spaces, a number <= 0 means to not recognize tab key.
- #text
- #text=(text) : Nil
- #undo_stack_merge_interval=(arg)
-
#widget_too_small?
Return true if the widget is too small to be rendered.
- #word_wrap=(value : Bool) : Nil
- #word_wrap? : Bool
Instance methods inherited from class TextUi::Widget
absolute_height
absolute_height,
absolute_width
absolute_width,
absolute_x
absolute_x,
absolute_y
absolute_y,
children : Array(TextUi::Widget)
children,
children?(widget : Widget) : Bool
children?,
children_focused?
children_focused?,
clear_line(y : Int32, format = @default_format)
clear_line,
contains?(x, y)
contains?,
default_format : Format
default_format,
default_format=(default_format : Format)
default_format=,
destroy
destroy,
each_char_pos(x, y, text : String, &)
each_char_pos,
find(x, y, dbg = 0) : Widget | Nil
find,
focus
focus,
focusable=(focusable : Bool)
focusable=,
focusable? : Bool
focusable?,
focused=(focused : Bool)
focused=,
focused? : Bool
focused?,
height : Int32
height,
height=(height : Int32)
height=,
invalidate
invalidate,
move(x : Int32, y : Int32)
move,
parent : TextUi::Widget
parent,
print_char(x : Int32, y : Int32, chr : Char, format : Format = @default_format)
print_char,
print_line(x : Int32, y : Int32, text : String, format : Array(Format) | Format = @default_format, offset = 0, count = text.size, width = 0, ellipsis = true) : Nil
print_line,
print_lines(x, y, text : String, format : Format = @default_format, width = 0)
print_lines,
render
render,
render_cursor
render_cursor,
render_pending=(render_pending : Bool)
render_pending=,
render_pending? : Bool
render_pending?,
resize(width : Int32, height : Int32)
resize,
set_cursor(x, y)
set_cursor,
ui
ui,
visible=(visible : Bool)
visible=,
visible? : Bool
visible?,
widget_too_small?
widget_too_small?,
width : Int32
width,
width=(width : Int32)
width=,
x : Int32
x,
x=(x : Int32)
x=,
y : Int32
y,
y=(y : Int32)
y=
Constructor methods inherited from class TextUi::Widget
new(parent : Widget, x : Int32 = 0, y : Int32 = 0, width : Int32 = 1, height : Int32 = 1)
new
Class methods inherited from class TextUi::Widget
text_dimensions(text : String, max_width = -1, max_height = -1)
text_dimensions
Constructor Detail
Instance Method Detail
def tab_width : Int32
#
Tab key will be replaced by this number of spaces, a number <= 0 means to not recognize tab key.
def tab_width=(tab_width : Int32)
#
Tab key will be replaced by this number of spaces, a number <= 0 means to not recognize tab key.
def widget_too_small?
#
Description copied from class TextUi::Widget
Return true if the widget is too small to be rendered. If a widget is too small it wont be rendered or receive any input events.