1 /** 2 Multiline text editing control. 3 4 Copyright: 5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. 6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) 7 Copyright (c) 2017-2018 Godot-D contributors 8 9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License) 10 11 12 */ 13 module godot.textedit; 14 import std.meta : AliasSeq, staticIndexOf; 15 import std.traits : Unqual; 16 import godot.d.traits; 17 import godot.core; 18 import godot.c; 19 import godot.d.bind; 20 import godot.d.reference; 21 import godot.globalenums; 22 import godot.object; 23 import godot.classdb; 24 import godot.control; 25 import godot.canvasitem; 26 import godot.node; 27 import godot.inputevent; 28 import godot.popupmenu; 29 /** 30 Multiline text editing control. 31 32 TextEdit is meant for editing large, multiline text. It also has facilities for editing code, such as syntax highlighting support and multiple levels of undo/redo. 33 */ 34 @GodotBaseClass struct TextEdit 35 { 36 package(godot) enum string _GODOT_internal_name = "TextEdit"; 37 public: 38 @nogc nothrow: 39 union { /** */ godot_object _godot_object; /** */ Control _GODOT_base; } 40 alias _GODOT_base this; 41 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 42 package(godot) __gshared bool _classBindingInitialized = false; 43 package(godot) static struct GDNativeClassBinding 44 { 45 __gshared: 46 @GodotName("_click_selection_held") GodotMethod!(void) _clickSelectionHeld; 47 @GodotName("_cursor_changed_emit") GodotMethod!(void) _cursorChangedEmit; 48 @GodotName("_gui_input") GodotMethod!(void, InputEvent) _guiInput; 49 @GodotName("_push_current_op") GodotMethod!(void) _pushCurrentOp; 50 @GodotName("_scroll_moved") GodotMethod!(void, double) _scrollMoved; 51 @GodotName("_text_changed_emit") GodotMethod!(void) _textChangedEmit; 52 @GodotName("_toggle_draw_caret") GodotMethod!(void) _toggleDrawCaret; 53 @GodotName("_update_wrap_at") GodotMethod!(void) _updateWrapAt; 54 @GodotName("_v_scroll_input") GodotMethod!(void) _vScrollInput; 55 @GodotName("add_color_region") GodotMethod!(void, String, String, Color, bool) addColorRegion; 56 @GodotName("add_keyword_color") GodotMethod!(void, String, Color) addKeywordColor; 57 @GodotName("can_fold") GodotMethod!(bool, long) canFold; 58 @GodotName("center_viewport_to_cursor") GodotMethod!(void) centerViewportToCursor; 59 @GodotName("clear_colors") GodotMethod!(void) clearColors; 60 @GodotName("clear_undo_history") GodotMethod!(void) clearUndoHistory; 61 @GodotName("copy") GodotMethod!(void) copy; 62 @GodotName("cursor_get_blink_enabled") GodotMethod!(bool) cursorGetBlinkEnabled; 63 @GodotName("cursor_get_blink_speed") GodotMethod!(double) cursorGetBlinkSpeed; 64 @GodotName("cursor_get_column") GodotMethod!(long) cursorGetColumn; 65 @GodotName("cursor_get_line") GodotMethod!(long) cursorGetLine; 66 @GodotName("cursor_is_block_mode") GodotMethod!(bool) cursorIsBlockMode; 67 @GodotName("cursor_set_blink_enabled") GodotMethod!(void, bool) cursorSetBlinkEnabled; 68 @GodotName("cursor_set_blink_speed") GodotMethod!(void, double) cursorSetBlinkSpeed; 69 @GodotName("cursor_set_block_mode") GodotMethod!(void, bool) cursorSetBlockMode; 70 @GodotName("cursor_set_column") GodotMethod!(void, long, bool) cursorSetColumn; 71 @GodotName("cursor_set_line") GodotMethod!(void, long, bool, bool, long) cursorSetLine; 72 @GodotName("cut") GodotMethod!(void) cut; 73 @GodotName("deselect") GodotMethod!(void) deselect; 74 @GodotName("draw_minimap") GodotMethod!(void, bool) drawMinimap; 75 @GodotName("fold_all_lines") GodotMethod!(void) foldAllLines; 76 @GodotName("fold_line") GodotMethod!(void, long) foldLine; 77 @GodotName("get_breakpoints") GodotMethod!(Array) getBreakpoints; 78 @GodotName("get_h_scroll") GodotMethod!(long) getHScroll; 79 @GodotName("get_keyword_color") GodotMethod!(Color, String) getKeywordColor; 80 @GodotName("get_line") GodotMethod!(String, long) getLine; 81 @GodotName("get_line_count") GodotMethod!(long) getLineCount; 82 @GodotName("get_menu") GodotMethod!(PopupMenu) getMenu; 83 @GodotName("get_minimap_width") GodotMethod!(long) getMinimapWidth; 84 @GodotName("get_selection_from_column") GodotMethod!(long) getSelectionFromColumn; 85 @GodotName("get_selection_from_line") GodotMethod!(long) getSelectionFromLine; 86 @GodotName("get_selection_text") GodotMethod!(String) getSelectionText; 87 @GodotName("get_selection_to_column") GodotMethod!(long) getSelectionToColumn; 88 @GodotName("get_selection_to_line") GodotMethod!(long) getSelectionToLine; 89 @GodotName("get_text") GodotMethod!(String) getText; 90 @GodotName("get_v_scroll") GodotMethod!(double) getVScroll; 91 @GodotName("get_v_scroll_speed") GodotMethod!(double) getVScrollSpeed; 92 @GodotName("get_word_under_cursor") GodotMethod!(String) getWordUnderCursor; 93 @GodotName("has_keyword_color") GodotMethod!(bool, String) hasKeywordColor; 94 @GodotName("insert_text_at_cursor") GodotMethod!(void, String) insertTextAtCursor; 95 @GodotName("is_breakpoint_gutter_enabled") GodotMethod!(bool) isBreakpointGutterEnabled; 96 @GodotName("is_context_menu_enabled") GodotMethod!(bool) isContextMenuEnabled; 97 @GodotName("is_drawing_fold_gutter") GodotMethod!(bool) isDrawingFoldGutter; 98 @GodotName("is_drawing_minimap") GodotMethod!(bool) isDrawingMinimap; 99 @GodotName("is_drawing_spaces") GodotMethod!(bool) isDrawingSpaces; 100 @GodotName("is_drawing_tabs") GodotMethod!(bool) isDrawingTabs; 101 @GodotName("is_folded") GodotMethod!(bool, long) isFolded; 102 @GodotName("is_hiding_enabled") GodotMethod!(bool) isHidingEnabled; 103 @GodotName("is_highlight_all_occurrences_enabled") GodotMethod!(bool) isHighlightAllOccurrencesEnabled; 104 @GodotName("is_highlight_current_line_enabled") GodotMethod!(bool) isHighlightCurrentLineEnabled; 105 @GodotName("is_line_hidden") GodotMethod!(bool, long) isLineHidden; 106 @GodotName("is_line_set_as_bookmark") GodotMethod!(bool, long) isLineSetAsBookmark; 107 @GodotName("is_line_set_as_breakpoint") GodotMethod!(bool, long) isLineSetAsBreakpoint; 108 @GodotName("is_line_set_as_safe") GodotMethod!(bool, long) isLineSetAsSafe; 109 @GodotName("is_overriding_selected_font_color") GodotMethod!(bool) isOverridingSelectedFontColor; 110 @GodotName("is_readonly") GodotMethod!(bool) isReadonly; 111 @GodotName("is_right_click_moving_caret") GodotMethod!(bool) isRightClickMovingCaret; 112 @GodotName("is_selecting_enabled") GodotMethod!(bool) isSelectingEnabled; 113 @GodotName("is_selection_active") GodotMethod!(bool) isSelectionActive; 114 @GodotName("is_shortcut_keys_enabled") GodotMethod!(bool) isShortcutKeysEnabled; 115 @GodotName("is_show_line_numbers_enabled") GodotMethod!(bool) isShowLineNumbersEnabled; 116 @GodotName("is_smooth_scroll_enabled") GodotMethod!(bool) isSmoothScrollEnabled; 117 @GodotName("is_syntax_coloring_enabled") GodotMethod!(bool) isSyntaxColoringEnabled; 118 @GodotName("is_virtual_keyboard_enabled") GodotMethod!(bool) isVirtualKeyboardEnabled; 119 @GodotName("is_wrap_enabled") GodotMethod!(bool) isWrapEnabled; 120 @GodotName("menu_option") GodotMethod!(void, long) menuOption; 121 @GodotName("paste") GodotMethod!(void) paste; 122 @GodotName("redo") GodotMethod!(void) redo; 123 @GodotName("remove_breakpoints") GodotMethod!(void) removeBreakpoints; 124 @GodotName("search") GodotMethod!(PoolIntArray, String, long, long, long) search; 125 @GodotName("select") GodotMethod!(void, long, long, long, long) select; 126 @GodotName("select_all") GodotMethod!(void) selectAll; 127 @GodotName("set_breakpoint_gutter_enabled") GodotMethod!(void, bool) setBreakpointGutterEnabled; 128 @GodotName("set_context_menu_enabled") GodotMethod!(void, bool) setContextMenuEnabled; 129 @GodotName("set_draw_fold_gutter") GodotMethod!(void, bool) setDrawFoldGutter; 130 @GodotName("set_draw_spaces") GodotMethod!(void, bool) setDrawSpaces; 131 @GodotName("set_draw_tabs") GodotMethod!(void, bool) setDrawTabs; 132 @GodotName("set_h_scroll") GodotMethod!(void, long) setHScroll; 133 @GodotName("set_hiding_enabled") GodotMethod!(void, bool) setHidingEnabled; 134 @GodotName("set_highlight_all_occurrences") GodotMethod!(void, bool) setHighlightAllOccurrences; 135 @GodotName("set_highlight_current_line") GodotMethod!(void, bool) setHighlightCurrentLine; 136 @GodotName("set_line") GodotMethod!(void, long, String) setLine; 137 @GodotName("set_line_as_bookmark") GodotMethod!(void, long, bool) setLineAsBookmark; 138 @GodotName("set_line_as_breakpoint") GodotMethod!(void, long, bool) setLineAsBreakpoint; 139 @GodotName("set_line_as_hidden") GodotMethod!(void, long, bool) setLineAsHidden; 140 @GodotName("set_line_as_safe") GodotMethod!(void, long, bool) setLineAsSafe; 141 @GodotName("set_minimap_width") GodotMethod!(void, long) setMinimapWidth; 142 @GodotName("set_override_selected_font_color") GodotMethod!(void, bool) setOverrideSelectedFontColor; 143 @GodotName("set_readonly") GodotMethod!(void, bool) setReadonly; 144 @GodotName("set_right_click_moves_caret") GodotMethod!(void, bool) setRightClickMovesCaret; 145 @GodotName("set_selecting_enabled") GodotMethod!(void, bool) setSelectingEnabled; 146 @GodotName("set_shortcut_keys_enabled") GodotMethod!(void, bool) setShortcutKeysEnabled; 147 @GodotName("set_show_line_numbers") GodotMethod!(void, bool) setShowLineNumbers; 148 @GodotName("set_smooth_scroll_enable") GodotMethod!(void, bool) setSmoothScrollEnable; 149 @GodotName("set_syntax_coloring") GodotMethod!(void, bool) setSyntaxColoring; 150 @GodotName("set_text") GodotMethod!(void, String) setText; 151 @GodotName("set_v_scroll") GodotMethod!(void, double) setVScroll; 152 @GodotName("set_v_scroll_speed") GodotMethod!(void, double) setVScrollSpeed; 153 @GodotName("set_virtual_keyboard_enabled") GodotMethod!(void, bool) setVirtualKeyboardEnabled; 154 @GodotName("set_wrap_enabled") GodotMethod!(void, bool) setWrapEnabled; 155 @GodotName("toggle_fold_line") GodotMethod!(void, long) toggleFoldLine; 156 @GodotName("undo") GodotMethod!(void) undo; 157 @GodotName("unfold_line") GodotMethod!(void, long) unfoldLine; 158 @GodotName("unhide_all_lines") GodotMethod!(void) unhideAllLines; 159 } 160 /// 161 pragma(inline, true) bool opEquals(in TextEdit other) const 162 { return _godot_object.ptr is other._godot_object.ptr; } 163 /// 164 pragma(inline, true) typeof(null) opAssign(typeof(null) n) 165 { _godot_object.ptr = n; return null; } 166 /// 167 pragma(inline, true) bool opEquals(typeof(null) n) const 168 { return _godot_object.ptr is n; } 169 /// 170 size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; } 171 mixin baseCasts; 172 /// Construct a new instance of TextEdit. 173 /// Note: use `memnew!TextEdit` instead. 174 static TextEdit _new() 175 { 176 static godot_class_constructor constructor; 177 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("TextEdit"); 178 if(constructor is null) return typeof(this).init; 179 return cast(TextEdit)(constructor()); 180 } 181 @disable new(size_t s); 182 /// 183 enum SearchFlags : int 184 { 185 /** 186 Match case when searching. 187 */ 188 searchMatchCase = 1, 189 /** 190 Match whole words when searching. 191 */ 192 searchWholeWords = 2, 193 /** 194 Search from end to beginning. 195 */ 196 searchBackwards = 4, 197 } 198 /// 199 enum SearchResult : int 200 { 201 /** 202 Used to access the result column from $(D search). 203 */ 204 searchResultColumn = 0, 205 /** 206 Used to access the result line from $(D search). 207 */ 208 searchResultLine = 1, 209 } 210 /// 211 enum MenuItems : int 212 { 213 /** 214 Cuts (copies and clears) the selected text. 215 */ 216 menuCut = 0, 217 /** 218 Copies the selected text. 219 */ 220 menuCopy = 1, 221 /** 222 Pastes the clipboard text over the selected text (or at the cursor's position). 223 */ 224 menuPaste = 2, 225 /** 226 Erases the whole $(D TextEdit) text. 227 */ 228 menuClear = 3, 229 /** 230 Selects the whole $(D TextEdit) text. 231 */ 232 menuSelectAll = 4, 233 /** 234 Undoes the previous action. 235 */ 236 menuUndo = 5, 237 /** 238 Redoes the previous action. 239 */ 240 menuRedo = 6, 241 /** 242 Represents the size of the $(D menuitems) enum. 243 */ 244 menuMax = 7, 245 } 246 /// 247 enum Constants : int 248 { 249 menuCut = 0, 250 searchResultColumn = 0, 251 menuCopy = 1, 252 searchResultLine = 1, 253 searchMatchCase = 1, 254 searchWholeWords = 2, 255 menuPaste = 2, 256 menuClear = 3, 257 searchBackwards = 4, 258 menuSelectAll = 4, 259 menuUndo = 5, 260 menuRedo = 6, 261 menuMax = 7, 262 } 263 /** 264 265 */ 266 void _clickSelectionHeld() 267 { 268 Array _GODOT_args = Array.make(); 269 String _GODOT_method_name = String("_click_selection_held"); 270 this.callv(_GODOT_method_name, _GODOT_args); 271 } 272 /** 273 274 */ 275 void _cursorChangedEmit() 276 { 277 Array _GODOT_args = Array.make(); 278 String _GODOT_method_name = String("_cursor_changed_emit"); 279 this.callv(_GODOT_method_name, _GODOT_args); 280 } 281 /** 282 283 */ 284 void _guiInput(InputEvent arg0) 285 { 286 Array _GODOT_args = Array.make(); 287 _GODOT_args.append(arg0); 288 String _GODOT_method_name = String("_gui_input"); 289 this.callv(_GODOT_method_name, _GODOT_args); 290 } 291 /** 292 293 */ 294 void _pushCurrentOp() 295 { 296 Array _GODOT_args = Array.make(); 297 String _GODOT_method_name = String("_push_current_op"); 298 this.callv(_GODOT_method_name, _GODOT_args); 299 } 300 /** 301 302 */ 303 void _scrollMoved(in double arg0) 304 { 305 Array _GODOT_args = Array.make(); 306 _GODOT_args.append(arg0); 307 String _GODOT_method_name = String("_scroll_moved"); 308 this.callv(_GODOT_method_name, _GODOT_args); 309 } 310 /** 311 312 */ 313 void _textChangedEmit() 314 { 315 Array _GODOT_args = Array.make(); 316 String _GODOT_method_name = String("_text_changed_emit"); 317 this.callv(_GODOT_method_name, _GODOT_args); 318 } 319 /** 320 321 */ 322 void _toggleDrawCaret() 323 { 324 Array _GODOT_args = Array.make(); 325 String _GODOT_method_name = String("_toggle_draw_caret"); 326 this.callv(_GODOT_method_name, _GODOT_args); 327 } 328 /** 329 330 */ 331 void _updateWrapAt() 332 { 333 Array _GODOT_args = Array.make(); 334 String _GODOT_method_name = String("_update_wrap_at"); 335 this.callv(_GODOT_method_name, _GODOT_args); 336 } 337 /** 338 339 */ 340 void _vScrollInput() 341 { 342 Array _GODOT_args = Array.make(); 343 String _GODOT_method_name = String("_v_scroll_input"); 344 this.callv(_GODOT_method_name, _GODOT_args); 345 } 346 /** 347 Adds color region (given the delimiters) and its colors. 348 */ 349 void addColorRegion(in String begin_key, in String end_key, in Color color, in bool line_only = false) 350 { 351 checkClassBinding!(typeof(this))(); 352 ptrcall!(void)(GDNativeClassBinding.addColorRegion, _godot_object, begin_key, end_key, color, line_only); 353 } 354 /** 355 Adds a `keyword` and its $(D Color). 356 */ 357 void addKeywordColor(in String keyword, in Color color) 358 { 359 checkClassBinding!(typeof(this))(); 360 ptrcall!(void)(GDNativeClassBinding.addKeywordColor, _godot_object, keyword, color); 361 } 362 /** 363 Returns if the given line is foldable, that is, it has indented lines right below it. 364 */ 365 bool canFold(in long line) const 366 { 367 checkClassBinding!(typeof(this))(); 368 return ptrcall!(bool)(GDNativeClassBinding.canFold, _godot_object, line); 369 } 370 /** 371 Centers the viewport on the line the editing cursor is at. This also resets the $(D scrollHorizontal) value to `0`. 372 */ 373 void centerViewportToCursor() 374 { 375 checkClassBinding!(typeof(this))(); 376 ptrcall!(void)(GDNativeClassBinding.centerViewportToCursor, _godot_object); 377 } 378 /** 379 Clears all custom syntax coloring information previously added with $(D addColorRegion) or $(D addKeywordColor). 380 */ 381 void clearColors() 382 { 383 checkClassBinding!(typeof(this))(); 384 ptrcall!(void)(GDNativeClassBinding.clearColors, _godot_object); 385 } 386 /** 387 Clears the undo history. 388 */ 389 void clearUndoHistory() 390 { 391 checkClassBinding!(typeof(this))(); 392 ptrcall!(void)(GDNativeClassBinding.clearUndoHistory, _godot_object); 393 } 394 /** 395 Copy's the current text selection. 396 */ 397 void copy() 398 { 399 checkClassBinding!(typeof(this))(); 400 ptrcall!(void)(GDNativeClassBinding.copy, _godot_object); 401 } 402 /** 403 404 */ 405 bool cursorGetBlinkEnabled() const 406 { 407 checkClassBinding!(typeof(this))(); 408 return ptrcall!(bool)(GDNativeClassBinding.cursorGetBlinkEnabled, _godot_object); 409 } 410 /** 411 412 */ 413 double cursorGetBlinkSpeed() const 414 { 415 checkClassBinding!(typeof(this))(); 416 return ptrcall!(double)(GDNativeClassBinding.cursorGetBlinkSpeed, _godot_object); 417 } 418 /** 419 Returns the column the editing cursor is at. 420 */ 421 long cursorGetColumn() const 422 { 423 checkClassBinding!(typeof(this))(); 424 return ptrcall!(long)(GDNativeClassBinding.cursorGetColumn, _godot_object); 425 } 426 /** 427 Returns the line the editing cursor is at. 428 */ 429 long cursorGetLine() const 430 { 431 checkClassBinding!(typeof(this))(); 432 return ptrcall!(long)(GDNativeClassBinding.cursorGetLine, _godot_object); 433 } 434 /** 435 436 */ 437 bool cursorIsBlockMode() const 438 { 439 checkClassBinding!(typeof(this))(); 440 return ptrcall!(bool)(GDNativeClassBinding.cursorIsBlockMode, _godot_object); 441 } 442 /** 443 444 */ 445 void cursorSetBlinkEnabled(in bool enable) 446 { 447 checkClassBinding!(typeof(this))(); 448 ptrcall!(void)(GDNativeClassBinding.cursorSetBlinkEnabled, _godot_object, enable); 449 } 450 /** 451 452 */ 453 void cursorSetBlinkSpeed(in double blink_speed) 454 { 455 checkClassBinding!(typeof(this))(); 456 ptrcall!(void)(GDNativeClassBinding.cursorSetBlinkSpeed, _godot_object, blink_speed); 457 } 458 /** 459 460 */ 461 void cursorSetBlockMode(in bool enable) 462 { 463 checkClassBinding!(typeof(this))(); 464 ptrcall!(void)(GDNativeClassBinding.cursorSetBlockMode, _godot_object, enable); 465 } 466 /** 467 Moves the cursor at the specified `column` index. 468 If `adjust_viewport` is set to `true`, the viewport will center at the cursor position after the move occurs. 469 */ 470 void cursorSetColumn(in long column, in bool adjust_viewport = true) 471 { 472 checkClassBinding!(typeof(this))(); 473 ptrcall!(void)(GDNativeClassBinding.cursorSetColumn, _godot_object, column, adjust_viewport); 474 } 475 /** 476 Moves the cursor at the specified `line` index. 477 If `adjust_viewport` is set to `true`, the viewport will center at the cursor position after the move occurs. 478 If `can_be_hidden` is set to `true`, the specified `line` can be hidden using $(D setLineAsHidden). 479 */ 480 void cursorSetLine(in long line, in bool adjust_viewport = true, in bool can_be_hidden = true, in long wrap_index = 0) 481 { 482 checkClassBinding!(typeof(this))(); 483 ptrcall!(void)(GDNativeClassBinding.cursorSetLine, _godot_object, line, adjust_viewport, can_be_hidden, wrap_index); 484 } 485 /** 486 Cut's the current selection. 487 */ 488 void cut() 489 { 490 checkClassBinding!(typeof(this))(); 491 ptrcall!(void)(GDNativeClassBinding.cut, _godot_object); 492 } 493 /** 494 Deselects the current selection. 495 */ 496 void deselect() 497 { 498 checkClassBinding!(typeof(this))(); 499 ptrcall!(void)(GDNativeClassBinding.deselect, _godot_object); 500 } 501 /** 502 503 */ 504 void drawMinimap(in bool draw) 505 { 506 checkClassBinding!(typeof(this))(); 507 ptrcall!(void)(GDNativeClassBinding.drawMinimap, _godot_object, draw); 508 } 509 /** 510 Folds all lines that are possible to be folded (see $(D canFold)). 511 */ 512 void foldAllLines() 513 { 514 checkClassBinding!(typeof(this))(); 515 ptrcall!(void)(GDNativeClassBinding.foldAllLines, _godot_object); 516 } 517 /** 518 Folds the given line, if possible (see $(D canFold)). 519 */ 520 void foldLine(in long line) 521 { 522 checkClassBinding!(typeof(this))(); 523 ptrcall!(void)(GDNativeClassBinding.foldLine, _godot_object, line); 524 } 525 /** 526 Returns an array containing the line number of each breakpoint. 527 */ 528 Array getBreakpoints() const 529 { 530 checkClassBinding!(typeof(this))(); 531 return ptrcall!(Array)(GDNativeClassBinding.getBreakpoints, _godot_object); 532 } 533 /** 534 535 */ 536 long getHScroll() const 537 { 538 checkClassBinding!(typeof(this))(); 539 return ptrcall!(long)(GDNativeClassBinding.getHScroll, _godot_object); 540 } 541 /** 542 Returns the $(D Color) of the specified `keyword`. 543 */ 544 Color getKeywordColor(in String keyword) const 545 { 546 checkClassBinding!(typeof(this))(); 547 return ptrcall!(Color)(GDNativeClassBinding.getKeywordColor, _godot_object, keyword); 548 } 549 /** 550 Returns the text of a specific line. 551 */ 552 String getLine(in long line) const 553 { 554 checkClassBinding!(typeof(this))(); 555 return ptrcall!(String)(GDNativeClassBinding.getLine, _godot_object, line); 556 } 557 /** 558 Returns the amount of total lines in the text. 559 */ 560 long getLineCount() const 561 { 562 checkClassBinding!(typeof(this))(); 563 return ptrcall!(long)(GDNativeClassBinding.getLineCount, _godot_object); 564 } 565 /** 566 Returns the $(D PopupMenu) of this $(D TextEdit). By default, this menu is displayed when right-clicking on the $(D TextEdit). 567 */ 568 PopupMenu getMenu() const 569 { 570 checkClassBinding!(typeof(this))(); 571 return ptrcall!(PopupMenu)(GDNativeClassBinding.getMenu, _godot_object); 572 } 573 /** 574 575 */ 576 long getMinimapWidth() const 577 { 578 checkClassBinding!(typeof(this))(); 579 return ptrcall!(long)(GDNativeClassBinding.getMinimapWidth, _godot_object); 580 } 581 /** 582 Returns the selection begin column. 583 */ 584 long getSelectionFromColumn() const 585 { 586 checkClassBinding!(typeof(this))(); 587 return ptrcall!(long)(GDNativeClassBinding.getSelectionFromColumn, _godot_object); 588 } 589 /** 590 Returns the selection begin line. 591 */ 592 long getSelectionFromLine() const 593 { 594 checkClassBinding!(typeof(this))(); 595 return ptrcall!(long)(GDNativeClassBinding.getSelectionFromLine, _godot_object); 596 } 597 /** 598 Returns the text inside the selection. 599 */ 600 String getSelectionText() const 601 { 602 checkClassBinding!(typeof(this))(); 603 return ptrcall!(String)(GDNativeClassBinding.getSelectionText, _godot_object); 604 } 605 /** 606 Returns the selection end column. 607 */ 608 long getSelectionToColumn() const 609 { 610 checkClassBinding!(typeof(this))(); 611 return ptrcall!(long)(GDNativeClassBinding.getSelectionToColumn, _godot_object); 612 } 613 /** 614 Returns the selection end line. 615 */ 616 long getSelectionToLine() const 617 { 618 checkClassBinding!(typeof(this))(); 619 return ptrcall!(long)(GDNativeClassBinding.getSelectionToLine, _godot_object); 620 } 621 /** 622 623 */ 624 String getText() 625 { 626 checkClassBinding!(typeof(this))(); 627 return ptrcall!(String)(GDNativeClassBinding.getText, _godot_object); 628 } 629 /** 630 631 */ 632 double getVScroll() const 633 { 634 checkClassBinding!(typeof(this))(); 635 return ptrcall!(double)(GDNativeClassBinding.getVScroll, _godot_object); 636 } 637 /** 638 639 */ 640 double getVScrollSpeed() const 641 { 642 checkClassBinding!(typeof(this))(); 643 return ptrcall!(double)(GDNativeClassBinding.getVScrollSpeed, _godot_object); 644 } 645 /** 646 Returns a $(D String) text with the word under the caret (text cursor) location. 647 */ 648 String getWordUnderCursor() const 649 { 650 checkClassBinding!(typeof(this))(); 651 return ptrcall!(String)(GDNativeClassBinding.getWordUnderCursor, _godot_object); 652 } 653 /** 654 Returns whether the specified `keyword` has a color set to it or not. 655 */ 656 bool hasKeywordColor(in String keyword) const 657 { 658 checkClassBinding!(typeof(this))(); 659 return ptrcall!(bool)(GDNativeClassBinding.hasKeywordColor, _godot_object, keyword); 660 } 661 /** 662 Insert the specified text at the cursor position. 663 */ 664 void insertTextAtCursor(in String text) 665 { 666 checkClassBinding!(typeof(this))(); 667 ptrcall!(void)(GDNativeClassBinding.insertTextAtCursor, _godot_object, text); 668 } 669 /** 670 671 */ 672 bool isBreakpointGutterEnabled() const 673 { 674 checkClassBinding!(typeof(this))(); 675 return ptrcall!(bool)(GDNativeClassBinding.isBreakpointGutterEnabled, _godot_object); 676 } 677 /** 678 679 */ 680 bool isContextMenuEnabled() 681 { 682 checkClassBinding!(typeof(this))(); 683 return ptrcall!(bool)(GDNativeClassBinding.isContextMenuEnabled, _godot_object); 684 } 685 /** 686 687 */ 688 bool isDrawingFoldGutter() const 689 { 690 checkClassBinding!(typeof(this))(); 691 return ptrcall!(bool)(GDNativeClassBinding.isDrawingFoldGutter, _godot_object); 692 } 693 /** 694 695 */ 696 bool isDrawingMinimap() const 697 { 698 checkClassBinding!(typeof(this))(); 699 return ptrcall!(bool)(GDNativeClassBinding.isDrawingMinimap, _godot_object); 700 } 701 /** 702 703 */ 704 bool isDrawingSpaces() const 705 { 706 checkClassBinding!(typeof(this))(); 707 return ptrcall!(bool)(GDNativeClassBinding.isDrawingSpaces, _godot_object); 708 } 709 /** 710 711 */ 712 bool isDrawingTabs() const 713 { 714 checkClassBinding!(typeof(this))(); 715 return ptrcall!(bool)(GDNativeClassBinding.isDrawingTabs, _godot_object); 716 } 717 /** 718 Returns whether the line at the specified index is folded or not. 719 */ 720 bool isFolded(in long line) const 721 { 722 checkClassBinding!(typeof(this))(); 723 return ptrcall!(bool)(GDNativeClassBinding.isFolded, _godot_object, line); 724 } 725 /** 726 727 */ 728 bool isHidingEnabled() const 729 { 730 checkClassBinding!(typeof(this))(); 731 return ptrcall!(bool)(GDNativeClassBinding.isHidingEnabled, _godot_object); 732 } 733 /** 734 735 */ 736 bool isHighlightAllOccurrencesEnabled() const 737 { 738 checkClassBinding!(typeof(this))(); 739 return ptrcall!(bool)(GDNativeClassBinding.isHighlightAllOccurrencesEnabled, _godot_object); 740 } 741 /** 742 743 */ 744 bool isHighlightCurrentLineEnabled() const 745 { 746 checkClassBinding!(typeof(this))(); 747 return ptrcall!(bool)(GDNativeClassBinding.isHighlightCurrentLineEnabled, _godot_object); 748 } 749 /** 750 Returns whether the line at the specified index is hidden or not. 751 */ 752 bool isLineHidden(in long line) const 753 { 754 checkClassBinding!(typeof(this))(); 755 return ptrcall!(bool)(GDNativeClassBinding.isLineHidden, _godot_object, line); 756 } 757 /** 758 Returns `true` when the specified `line` is bookmarked. 759 */ 760 bool isLineSetAsBookmark(in long line) const 761 { 762 checkClassBinding!(typeof(this))(); 763 return ptrcall!(bool)(GDNativeClassBinding.isLineSetAsBookmark, _godot_object, line); 764 } 765 /** 766 Returns `true` when the specified `line` has a breakpoint. 767 */ 768 bool isLineSetAsBreakpoint(in long line) const 769 { 770 checkClassBinding!(typeof(this))(); 771 return ptrcall!(bool)(GDNativeClassBinding.isLineSetAsBreakpoint, _godot_object, line); 772 } 773 /** 774 Returns `true` when the specified `line` is marked as safe. 775 */ 776 bool isLineSetAsSafe(in long line) const 777 { 778 checkClassBinding!(typeof(this))(); 779 return ptrcall!(bool)(GDNativeClassBinding.isLineSetAsSafe, _godot_object, line); 780 } 781 /** 782 783 */ 784 bool isOverridingSelectedFontColor() const 785 { 786 checkClassBinding!(typeof(this))(); 787 return ptrcall!(bool)(GDNativeClassBinding.isOverridingSelectedFontColor, _godot_object); 788 } 789 /** 790 791 */ 792 bool isReadonly() const 793 { 794 checkClassBinding!(typeof(this))(); 795 return ptrcall!(bool)(GDNativeClassBinding.isReadonly, _godot_object); 796 } 797 /** 798 799 */ 800 bool isRightClickMovingCaret() const 801 { 802 checkClassBinding!(typeof(this))(); 803 return ptrcall!(bool)(GDNativeClassBinding.isRightClickMovingCaret, _godot_object); 804 } 805 /** 806 807 */ 808 bool isSelectingEnabled() const 809 { 810 checkClassBinding!(typeof(this))(); 811 return ptrcall!(bool)(GDNativeClassBinding.isSelectingEnabled, _godot_object); 812 } 813 /** 814 Returns `true` if the selection is active. 815 */ 816 bool isSelectionActive() const 817 { 818 checkClassBinding!(typeof(this))(); 819 return ptrcall!(bool)(GDNativeClassBinding.isSelectionActive, _godot_object); 820 } 821 /** 822 823 */ 824 bool isShortcutKeysEnabled() const 825 { 826 checkClassBinding!(typeof(this))(); 827 return ptrcall!(bool)(GDNativeClassBinding.isShortcutKeysEnabled, _godot_object); 828 } 829 /** 830 831 */ 832 bool isShowLineNumbersEnabled() const 833 { 834 checkClassBinding!(typeof(this))(); 835 return ptrcall!(bool)(GDNativeClassBinding.isShowLineNumbersEnabled, _godot_object); 836 } 837 /** 838 839 */ 840 bool isSmoothScrollEnabled() const 841 { 842 checkClassBinding!(typeof(this))(); 843 return ptrcall!(bool)(GDNativeClassBinding.isSmoothScrollEnabled, _godot_object); 844 } 845 /** 846 847 */ 848 bool isSyntaxColoringEnabled() const 849 { 850 checkClassBinding!(typeof(this))(); 851 return ptrcall!(bool)(GDNativeClassBinding.isSyntaxColoringEnabled, _godot_object); 852 } 853 /** 854 855 */ 856 bool isVirtualKeyboardEnabled() const 857 { 858 checkClassBinding!(typeof(this))(); 859 return ptrcall!(bool)(GDNativeClassBinding.isVirtualKeyboardEnabled, _godot_object); 860 } 861 /** 862 863 */ 864 bool isWrapEnabled() const 865 { 866 checkClassBinding!(typeof(this))(); 867 return ptrcall!(bool)(GDNativeClassBinding.isWrapEnabled, _godot_object); 868 } 869 /** 870 Triggers a right-click menu action by the specified index. See $(D menuitems) for a list of available indexes. 871 */ 872 void menuOption(in long option) 873 { 874 checkClassBinding!(typeof(this))(); 875 ptrcall!(void)(GDNativeClassBinding.menuOption, _godot_object, option); 876 } 877 /** 878 Paste the current selection. 879 */ 880 void paste() 881 { 882 checkClassBinding!(typeof(this))(); 883 ptrcall!(void)(GDNativeClassBinding.paste, _godot_object); 884 } 885 /** 886 Perform redo operation. 887 */ 888 void redo() 889 { 890 checkClassBinding!(typeof(this))(); 891 ptrcall!(void)(GDNativeClassBinding.redo, _godot_object); 892 } 893 /** 894 Removes all the breakpoints. This will not fire the $(D breakpointToggled) signal. 895 */ 896 void removeBreakpoints() 897 { 898 checkClassBinding!(typeof(this))(); 899 ptrcall!(void)(GDNativeClassBinding.removeBreakpoints, _godot_object); 900 } 901 /** 902 Perform a search inside the text. Search flags can be specified in the $(D searchflags) enum. 903 Returns an empty `PoolIntArray` if no result was found. Otherwise, the result line and column can be accessed at indices specified in the $(D searchresult) enum, e.g: 904 905 906 var result = search(key, flags, line, column) 907 if result.size() > 0: 908 # Result found. 909 var res_line = result$(D TextEdit.SEARCH_RESULT_LINE) 910 var res_column = result$(D TextEdit.SEARCH_RESULT_COLUMN) 911 912 913 */ 914 PoolIntArray search(in String key, in long flags, in long from_line, in long from_column) const 915 { 916 checkClassBinding!(typeof(this))(); 917 return ptrcall!(PoolIntArray)(GDNativeClassBinding.search, _godot_object, key, flags, from_line, from_column); 918 } 919 /** 920 Perform selection, from line/column to line/column. 921 If $(D selectingEnabled) is `false`, no selection will occur. 922 */ 923 void select(in long from_line, in long from_column, in long to_line, in long to_column) 924 { 925 checkClassBinding!(typeof(this))(); 926 ptrcall!(void)(GDNativeClassBinding.select, _godot_object, from_line, from_column, to_line, to_column); 927 } 928 /** 929 Select all the text. 930 If $(D selectingEnabled) is `false`, no selection will occur. 931 */ 932 void selectAll() 933 { 934 checkClassBinding!(typeof(this))(); 935 ptrcall!(void)(GDNativeClassBinding.selectAll, _godot_object); 936 } 937 /** 938 939 */ 940 void setBreakpointGutterEnabled(in bool enable) 941 { 942 checkClassBinding!(typeof(this))(); 943 ptrcall!(void)(GDNativeClassBinding.setBreakpointGutterEnabled, _godot_object, enable); 944 } 945 /** 946 947 */ 948 void setContextMenuEnabled(in bool enable) 949 { 950 checkClassBinding!(typeof(this))(); 951 ptrcall!(void)(GDNativeClassBinding.setContextMenuEnabled, _godot_object, enable); 952 } 953 /** 954 955 */ 956 void setDrawFoldGutter(in bool arg0) 957 { 958 checkClassBinding!(typeof(this))(); 959 ptrcall!(void)(GDNativeClassBinding.setDrawFoldGutter, _godot_object, arg0); 960 } 961 /** 962 963 */ 964 void setDrawSpaces(in bool arg0) 965 { 966 checkClassBinding!(typeof(this))(); 967 ptrcall!(void)(GDNativeClassBinding.setDrawSpaces, _godot_object, arg0); 968 } 969 /** 970 971 */ 972 void setDrawTabs(in bool arg0) 973 { 974 checkClassBinding!(typeof(this))(); 975 ptrcall!(void)(GDNativeClassBinding.setDrawTabs, _godot_object, arg0); 976 } 977 /** 978 979 */ 980 void setHScroll(in long value) 981 { 982 checkClassBinding!(typeof(this))(); 983 ptrcall!(void)(GDNativeClassBinding.setHScroll, _godot_object, value); 984 } 985 /** 986 987 */ 988 void setHidingEnabled(in bool enable) 989 { 990 checkClassBinding!(typeof(this))(); 991 ptrcall!(void)(GDNativeClassBinding.setHidingEnabled, _godot_object, enable); 992 } 993 /** 994 995 */ 996 void setHighlightAllOccurrences(in bool enable) 997 { 998 checkClassBinding!(typeof(this))(); 999 ptrcall!(void)(GDNativeClassBinding.setHighlightAllOccurrences, _godot_object, enable); 1000 } 1001 /** 1002 1003 */ 1004 void setHighlightCurrentLine(in bool enabled) 1005 { 1006 checkClassBinding!(typeof(this))(); 1007 ptrcall!(void)(GDNativeClassBinding.setHighlightCurrentLine, _godot_object, enabled); 1008 } 1009 /** 1010 Sets the text for a specific line. 1011 */ 1012 void setLine(in long line, in String new_text) 1013 { 1014 checkClassBinding!(typeof(this))(); 1015 ptrcall!(void)(GDNativeClassBinding.setLine, _godot_object, line, new_text); 1016 } 1017 /** 1018 Bookmarks the `line` if `bookmark` is true. Deletes the bookmark if `bookmark` is false. 1019 Bookmarks are shown in the $(D breakpointGutter). 1020 */ 1021 void setLineAsBookmark(in long line, in bool bookmark) 1022 { 1023 checkClassBinding!(typeof(this))(); 1024 ptrcall!(void)(GDNativeClassBinding.setLineAsBookmark, _godot_object, line, bookmark); 1025 } 1026 /** 1027 Adds or removes the breakpoint in `line`. Breakpoints are shown in the $(D breakpointGutter). 1028 */ 1029 void setLineAsBreakpoint(in long line, in bool breakpoint) 1030 { 1031 checkClassBinding!(typeof(this))(); 1032 ptrcall!(void)(GDNativeClassBinding.setLineAsBreakpoint, _godot_object, line, breakpoint); 1033 } 1034 /** 1035 If `true`, hides the line of the specified index. 1036 */ 1037 void setLineAsHidden(in long line, in bool enable) 1038 { 1039 checkClassBinding!(typeof(this))(); 1040 ptrcall!(void)(GDNativeClassBinding.setLineAsHidden, _godot_object, line, enable); 1041 } 1042 /** 1043 If `true`, marks the `line` as safe. 1044 This will show the line number with the color provided in the `safe_line_number_color` theme property. 1045 */ 1046 void setLineAsSafe(in long line, in bool safe) 1047 { 1048 checkClassBinding!(typeof(this))(); 1049 ptrcall!(void)(GDNativeClassBinding.setLineAsSafe, _godot_object, line, safe); 1050 } 1051 /** 1052 1053 */ 1054 void setMinimapWidth(in long width) 1055 { 1056 checkClassBinding!(typeof(this))(); 1057 ptrcall!(void)(GDNativeClassBinding.setMinimapWidth, _godot_object, width); 1058 } 1059 /** 1060 1061 */ 1062 void setOverrideSelectedFontColor(in bool _override) 1063 { 1064 checkClassBinding!(typeof(this))(); 1065 ptrcall!(void)(GDNativeClassBinding.setOverrideSelectedFontColor, _godot_object, _override); 1066 } 1067 /** 1068 1069 */ 1070 void setReadonly(in bool enable) 1071 { 1072 checkClassBinding!(typeof(this))(); 1073 ptrcall!(void)(GDNativeClassBinding.setReadonly, _godot_object, enable); 1074 } 1075 /** 1076 1077 */ 1078 void setRightClickMovesCaret(in bool enable) 1079 { 1080 checkClassBinding!(typeof(this))(); 1081 ptrcall!(void)(GDNativeClassBinding.setRightClickMovesCaret, _godot_object, enable); 1082 } 1083 /** 1084 1085 */ 1086 void setSelectingEnabled(in bool enable) 1087 { 1088 checkClassBinding!(typeof(this))(); 1089 ptrcall!(void)(GDNativeClassBinding.setSelectingEnabled, _godot_object, enable); 1090 } 1091 /** 1092 1093 */ 1094 void setShortcutKeysEnabled(in bool enable) 1095 { 1096 checkClassBinding!(typeof(this))(); 1097 ptrcall!(void)(GDNativeClassBinding.setShortcutKeysEnabled, _godot_object, enable); 1098 } 1099 /** 1100 1101 */ 1102 void setShowLineNumbers(in bool enable) 1103 { 1104 checkClassBinding!(typeof(this))(); 1105 ptrcall!(void)(GDNativeClassBinding.setShowLineNumbers, _godot_object, enable); 1106 } 1107 /** 1108 1109 */ 1110 void setSmoothScrollEnable(in bool enable) 1111 { 1112 checkClassBinding!(typeof(this))(); 1113 ptrcall!(void)(GDNativeClassBinding.setSmoothScrollEnable, _godot_object, enable); 1114 } 1115 /** 1116 1117 */ 1118 void setSyntaxColoring(in bool enable) 1119 { 1120 checkClassBinding!(typeof(this))(); 1121 ptrcall!(void)(GDNativeClassBinding.setSyntaxColoring, _godot_object, enable); 1122 } 1123 /** 1124 1125 */ 1126 void setText(in String text) 1127 { 1128 checkClassBinding!(typeof(this))(); 1129 ptrcall!(void)(GDNativeClassBinding.setText, _godot_object, text); 1130 } 1131 /** 1132 1133 */ 1134 void setVScroll(in double value) 1135 { 1136 checkClassBinding!(typeof(this))(); 1137 ptrcall!(void)(GDNativeClassBinding.setVScroll, _godot_object, value); 1138 } 1139 /** 1140 1141 */ 1142 void setVScrollSpeed(in double speed) 1143 { 1144 checkClassBinding!(typeof(this))(); 1145 ptrcall!(void)(GDNativeClassBinding.setVScrollSpeed, _godot_object, speed); 1146 } 1147 /** 1148 1149 */ 1150 void setVirtualKeyboardEnabled(in bool enable) 1151 { 1152 checkClassBinding!(typeof(this))(); 1153 ptrcall!(void)(GDNativeClassBinding.setVirtualKeyboardEnabled, _godot_object, enable); 1154 } 1155 /** 1156 1157 */ 1158 void setWrapEnabled(in bool enable) 1159 { 1160 checkClassBinding!(typeof(this))(); 1161 ptrcall!(void)(GDNativeClassBinding.setWrapEnabled, _godot_object, enable); 1162 } 1163 /** 1164 Toggle the folding of the code block at the given line. 1165 */ 1166 void toggleFoldLine(in long line) 1167 { 1168 checkClassBinding!(typeof(this))(); 1169 ptrcall!(void)(GDNativeClassBinding.toggleFoldLine, _godot_object, line); 1170 } 1171 /** 1172 Perform undo operation. 1173 */ 1174 void undo() 1175 { 1176 checkClassBinding!(typeof(this))(); 1177 ptrcall!(void)(GDNativeClassBinding.undo, _godot_object); 1178 } 1179 /** 1180 Unfolds the given line, if folded. 1181 */ 1182 void unfoldLine(in long line) 1183 { 1184 checkClassBinding!(typeof(this))(); 1185 ptrcall!(void)(GDNativeClassBinding.unfoldLine, _godot_object, line); 1186 } 1187 /** 1188 Unhide all lines that were previously set to hidden by $(D setLineAsHidden). 1189 */ 1190 void unhideAllLines() 1191 { 1192 checkClassBinding!(typeof(this))(); 1193 ptrcall!(void)(GDNativeClassBinding.unhideAllLines, _godot_object); 1194 } 1195 /** 1196 If `true`, the breakpoint gutter is visible. 1197 */ 1198 @property bool breakpointGutter() 1199 { 1200 return isBreakpointGutterEnabled(); 1201 } 1202 /// ditto 1203 @property void breakpointGutter(bool v) 1204 { 1205 setBreakpointGutterEnabled(v); 1206 } 1207 /** 1208 If `true`, the caret (visual cursor) blinks. 1209 */ 1210 @property bool caretBlink() 1211 { 1212 return cursorGetBlinkEnabled(); 1213 } 1214 /// ditto 1215 @property void caretBlink(bool v) 1216 { 1217 cursorSetBlinkEnabled(v); 1218 } 1219 /** 1220 Duration (in seconds) of a caret's blinking cycle. 1221 */ 1222 @property double caretBlinkSpeed() 1223 { 1224 return cursorGetBlinkSpeed(); 1225 } 1226 /// ditto 1227 @property void caretBlinkSpeed(double v) 1228 { 1229 cursorSetBlinkSpeed(v); 1230 } 1231 /** 1232 If `true`, the caret displays as a rectangle. 1233 If `false`, the caret displays as a bar. 1234 */ 1235 @property bool caretBlockMode() 1236 { 1237 return cursorIsBlockMode(); 1238 } 1239 /// ditto 1240 @property void caretBlockMode(bool v) 1241 { 1242 cursorSetBlockMode(v); 1243 } 1244 /** 1245 If `true`, a right-click moves the cursor at the mouse position before displaying the context menu. 1246 If `false`, the context menu disregards mouse location. 1247 */ 1248 @property bool caretMovingByRightClick() 1249 { 1250 return isRightClickMovingCaret(); 1251 } 1252 /// ditto 1253 @property void caretMovingByRightClick(bool v) 1254 { 1255 setRightClickMovesCaret(v); 1256 } 1257 /** 1258 If `true`, a right-click displays the context menu. 1259 */ 1260 @property bool contextMenuEnabled() 1261 { 1262 return isContextMenuEnabled(); 1263 } 1264 /// ditto 1265 @property void contextMenuEnabled(bool v) 1266 { 1267 setContextMenuEnabled(v); 1268 } 1269 /** 1270 If `true`, the "space" character will have a visible representation. 1271 */ 1272 @property bool drawSpaces() 1273 { 1274 return isDrawingSpaces(); 1275 } 1276 /// ditto 1277 @property void drawSpaces(bool v) 1278 { 1279 setDrawSpaces(v); 1280 } 1281 /** 1282 If `true`, the "tab" character will have a visible representation. 1283 */ 1284 @property bool drawTabs() 1285 { 1286 return isDrawingTabs(); 1287 } 1288 /// ditto 1289 @property void drawTabs(bool v) 1290 { 1291 setDrawTabs(v); 1292 } 1293 /** 1294 If `true`, the fold gutter is visible. This enables folding groups of indented lines. 1295 */ 1296 @property bool foldGutter() 1297 { 1298 return isDrawingFoldGutter(); 1299 } 1300 /// ditto 1301 @property void foldGutter(bool v) 1302 { 1303 setDrawFoldGutter(v); 1304 } 1305 /** 1306 If `true`, all lines that have been set to hidden by $(D setLineAsHidden), will not be visible. 1307 */ 1308 @property bool hidingEnabled() 1309 { 1310 return isHidingEnabled(); 1311 } 1312 /// ditto 1313 @property void hidingEnabled(bool v) 1314 { 1315 setHidingEnabled(v); 1316 } 1317 /** 1318 If `true`, all occurrences of the selected text will be highlighted. 1319 */ 1320 @property bool highlightAllOccurrences() 1321 { 1322 return isHighlightAllOccurrencesEnabled(); 1323 } 1324 /// ditto 1325 @property void highlightAllOccurrences(bool v) 1326 { 1327 setHighlightAllOccurrences(v); 1328 } 1329 /** 1330 If `true`, the line containing the cursor is highlighted. 1331 */ 1332 @property bool highlightCurrentLine() 1333 { 1334 return isHighlightCurrentLineEnabled(); 1335 } 1336 /// ditto 1337 @property void highlightCurrentLine(bool v) 1338 { 1339 setHighlightCurrentLine(v); 1340 } 1341 /** 1342 If `true`, a minimap is shown, providing an outline of your source code. 1343 */ 1344 @property bool minimapDraw() 1345 { 1346 return isDrawingMinimap(); 1347 } 1348 /// ditto 1349 @property void minimapDraw(bool v) 1350 { 1351 drawMinimap(v); 1352 } 1353 /** 1354 The width, in pixels, of the minimap. 1355 */ 1356 @property long minimapWidth() 1357 { 1358 return getMinimapWidth(); 1359 } 1360 /// ditto 1361 @property void minimapWidth(long v) 1362 { 1363 setMinimapWidth(v); 1364 } 1365 /** 1366 If `true`, custom `font_color_selected` will be used for selected text. 1367 */ 1368 @property bool overrideSelectedFontColor() 1369 { 1370 return isOverridingSelectedFontColor(); 1371 } 1372 /// ditto 1373 @property void overrideSelectedFontColor(bool v) 1374 { 1375 setOverrideSelectedFontColor(v); 1376 } 1377 /** 1378 If `true`, read-only mode is enabled. Existing text cannot be modified and new text cannot be added. 1379 */ 1380 @property bool readonly() 1381 { 1382 return isReadonly(); 1383 } 1384 /// ditto 1385 @property void readonly(bool v) 1386 { 1387 setReadonly(v); 1388 } 1389 /** 1390 The current horizontal scroll value. 1391 */ 1392 @property long scrollHorizontal() 1393 { 1394 return getHScroll(); 1395 } 1396 /// ditto 1397 @property void scrollHorizontal(long v) 1398 { 1399 setHScroll(v); 1400 } 1401 /** 1402 The current vertical scroll value. 1403 */ 1404 @property double scrollVertical() 1405 { 1406 return getVScroll(); 1407 } 1408 /// ditto 1409 @property void scrollVertical(double v) 1410 { 1411 setVScroll(v); 1412 } 1413 /** 1414 If `true`, text can be selected. 1415 If `false`, text can not be selected by the user or by the $(D select) or $(D selectAll) methods. 1416 */ 1417 @property bool selectingEnabled() 1418 { 1419 return isSelectingEnabled(); 1420 } 1421 /// ditto 1422 @property void selectingEnabled(bool v) 1423 { 1424 setSelectingEnabled(v); 1425 } 1426 /** 1427 If `true`, shortcut keys for context menu items are enabled, even if the context menu is disabled. 1428 */ 1429 @property bool shortcutKeysEnabled() 1430 { 1431 return isShortcutKeysEnabled(); 1432 } 1433 /// ditto 1434 @property void shortcutKeysEnabled(bool v) 1435 { 1436 setShortcutKeysEnabled(v); 1437 } 1438 /** 1439 If `true`, line numbers are displayed to the left of the text. 1440 */ 1441 @property bool showLineNumbers() 1442 { 1443 return isShowLineNumbersEnabled(); 1444 } 1445 /// ditto 1446 @property void showLineNumbers(bool v) 1447 { 1448 setShowLineNumbers(v); 1449 } 1450 /** 1451 If `true`, sets the `step` of the scrollbars to `0.25` which results in smoother scrolling. 1452 */ 1453 @property bool smoothScrolling() 1454 { 1455 return isSmoothScrollEnabled(); 1456 } 1457 /// ditto 1458 @property void smoothScrolling(bool v) 1459 { 1460 setSmoothScrollEnable(v); 1461 } 1462 /** 1463 If `true`, any custom color properties that have been set for this $(D TextEdit) will be visible. 1464 */ 1465 @property bool syntaxHighlighting() 1466 { 1467 return isSyntaxColoringEnabled(); 1468 } 1469 /// ditto 1470 @property void syntaxHighlighting(bool v) 1471 { 1472 setSyntaxColoring(v); 1473 } 1474 /** 1475 String value of the $(D TextEdit). 1476 */ 1477 @property String text() 1478 { 1479 return getText(); 1480 } 1481 /// ditto 1482 @property void text(String v) 1483 { 1484 setText(v); 1485 } 1486 /** 1487 Vertical scroll sensitivity. 1488 */ 1489 @property double vScrollSpeed() 1490 { 1491 return getVScrollSpeed(); 1492 } 1493 /// ditto 1494 @property void vScrollSpeed(double v) 1495 { 1496 setVScrollSpeed(v); 1497 } 1498 /** 1499 If `true`, the native virtual keyboard is shown when focused on platforms that support it. 1500 */ 1501 @property bool virtualKeyboardEnabled() 1502 { 1503 return isVirtualKeyboardEnabled(); 1504 } 1505 /// ditto 1506 @property void virtualKeyboardEnabled(bool v) 1507 { 1508 setVirtualKeyboardEnabled(v); 1509 } 1510 /** 1511 If `true`, enables text wrapping when it goes beyond the edge of what is visible. 1512 */ 1513 @property bool wrapEnabled() 1514 { 1515 return isWrapEnabled(); 1516 } 1517 /// ditto 1518 @property void wrapEnabled(bool v) 1519 { 1520 setWrapEnabled(v); 1521 } 1522 }