GUI Code

Extension of the GUI library for code editor widgets.


Source: pkg/lua/lib/guicode.go | Import: guicode

Functions


wg_code_editor

wg_code_editor() -> struct<guicode.WidgetCodeEditor>

Note this should be treated as persistent, do not recreate on each render.

Return Values

  • struct<guicode.WidgetCodeEditor>

Constants


LanguageDefinition
  • LANG_NONE
  • LANG_CPP
  • LANG_C
  • LANG_CS
  • LANG_PYTHON
  • LANG_LUA
  • LANG_JSON
  • LANG_SQL
  • LANG_ANGELSCRIPT
  • LANG_GLSL
  • LANG_HLSL

Structs


WidgetCodeEditor

Properties

  • type string<gui.WidgetType>
  • id int<collection.CRATE_CODEEDITOR>
Methods

border

border(self, v bool) -> self

copy

copy()

cut

cut()

delete

delete()

paste

paste()

text

text() -> string

current_line_text

current_line_text() -> string

selected_text

selected_text() -> string

word_under_cursor

word_under_cursor() -> string

cursor_pos

cursor_pos() -> int, int

cursor_screen_pos

cursor_screen_pos() -> int, int

selection_start

selection_start() -> int, int

handle_keyboard_inputs

handle_keyboard_inputs(self, v bool) -> self

has_selection

has_selection() -> bool

is_text_changed

is_text_changed() -> bool

insert_text

insert_text(self, v string) -> self

text

text(self, v string) -> self

show_whitespace

show_whitespace(self, v bool) -> self

tab_size

tab_size(self, v int) -> self

size

size(self, x int, y int) -> self

language_definition

language_definition(self, v int<guicode.LanguageDefinition>) -> self