class
Tessell::Kit::TextEditing
- Tessell::Kit::TextEditing
- Reference
- Object
Defined in:
tessell/kit/text_editing.crConstructors
Instance Method Summary
- #anchor : Int32 | Nil
- #backspace : Bool
- #boundaries : Array(Int32)
- #collapse_selection : Nil
- #commit_preedit : Bool
- #copy(clipboard : Clipboard) : Bool
- #cursor : Int32
- #cut(clipboard : Clipboard) : Bool
- #delete : Bool
-
#insert(value : String) : Bool
返回 text 是否变化。包含 \t 的插入按 tabs 语义守住(issue #32): Reject 整体拒绝;Insert 把每个 \t 展开为 tab_width 个空格——文本 里永不出现 \t 字形,宽度与光标不依赖字体制表位。
- #move_end(extending : Bool = false) : Nil
- #move_home(extending : Bool = false) : Nil
- #move_left(extending : Bool = false) : Nil
- #move_right(extending : Bool = false) : Nil
- #paste(clipboard : Clipboard) : Bool
- #preedit : String
- #preedit? : Bool
- #select_all : Nil
- #selected_text : String
- #selection? : Bool
- #selection_end : Int32
- #selection_start : Int32
- #set_cursor(position : Int32, extending : Bool = false) : Nil
- #set_preedit(value : String) : Nil
- #set_text(value : String) : Nil
- #tab_width : Int32
- #tab_width=(tab_width : Int32)
-
#tabs : TabBehavior
Tab 行为选项(issue #32);tab_width 仅 Insert 生效。
-
#tabs=(tabs : TabBehavior)
Tab 行为选项(issue #32);tab_width 仅 Insert 生效。
- #text : String
Constructor Detail
Instance Method Detail
def insert(value : String) : Bool
#
返回 text 是否变化。包含 \t 的插入按 tabs 语义守住(issue #32): Reject 整体拒绝;Insert 把每个 \t 展开为 tab_width 个空格——文本 里永不出现 \t 字形,宽度与光标不依赖字体制表位。