summaryrefslogtreecommitdiff
path: root/editor/plugins/text_editor.cpp
AgeCommit message (Collapse)Author
2022-08-22Replace Array return types with TypedArraykobewi
2022-07-31Extract EditorResourceConversionPlugin into its own source files and clean ↵Yuri Sizov
up editor includes
2022-07-29Remove Signal connect bindsJuan Linietsky
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
2022-07-18Rename Control PRESET_WIDE to PRESET_FULL_RECTFireForge
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-03Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio
These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
2022-03-12Allow negative indexes in ItemList and PopupMenukobewi
2022-02-08Revert "Add missing SNAME macro optimization to all theme methods call"Rémi Verschelde
This reverts commit a988fad9a092053434545c32afae91ccbdfbe792. As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used everywhere but only in critical code paths. For theme methods specifically, it was by design that only getters use `SNAME` and not setters.
2022-02-06Add missing SNAME macro optimization to all theme methods calljmb462
2022-01-19Convert TextEdit callbacks to CallablePaulb23
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-09Replace String comparisons with "", String() to is_empty()Nathan Franke
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
2021-12-06Fix bad popups offset in editor with single window offjmb462
Co-authored-by: Gil Arasa Verge <gilarasaverge@gmail.com> Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2021-11-22Added `reset_size` method to `Control` and `Window` classesYuri Roubinsky
2021-11-12Use "enum class" for input enumsAaron Franke
2021-11-07Improve save handling for built-in scriptskobewi
2021-11-04Add is_built_in() method to Resourcekobewi
2021-10-11Move add_syntax_highlighter bind to ScriptEditorBasePaulb23
2021-09-15Added status bar and toggle scripts panel button to EditorHelp/VScriptsYuri Roubinsky
2021-08-17Improve Undo/Redo menu itemsHaoyu Qiu
* Make Undo/Redo menu items disabled when clicking it does nothing. * Context menu of `TextEdit` * Context menu of `LineEdit` * Editor's Scene menu * Script editor's Edit menu and context menu (for Script and Text) * Make editor undo/redo log messages translatable. * Mark `UndoRedo`'s `has_{un,re}do()` methods as `const`. * Expose `TextEdit`'s `has_{un,re}do()` to scripts since `{un,re}do()` are already available.
2021-08-16Reorganise text editor settingsPaulb23
2021-08-12Cleanup and bind remaing methods in TextEditPaulb23
2021-08-12Protect internal CodeEdit --> TextEdit APIPaulb23
2021-08-12Cleanup TextEdit selection methodsPaulb23
2021-08-12Cleanup and rename caret operationsPaulb23
2021-07-18Optimize StringName usagereduz
* Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
2021-06-29Script editor: Rename 'Clone Down' to 'Duplicate Selection'Rémi Verschelde
Fixes #36670.
2021-06-20Move indent management to CodeEditPaulb23
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-16Merge pull request #49238 from Paulb23/code_edit_code_foldingRémi Verschelde
Move code folding into CodeEdit and hide line hiding API
2021-06-09Merge pull request #49265 from KoBeWi/keepfreplace_2_keepers_of_replaceRémi Verschelde
Move FindReplaceBar out of CodeTextEditor
2021-06-08Move FindReplaceBar out of CodeTextEditorkobewi
2021-06-08Fix TextEditor redo shortcut typoPaulb23
2021-06-01Move code folding into CodeEdit and hide line hiding APIPaulb23
2021-05-22Add custom background line colour to TextEdit and remove marked linesPaulb23
2021-05-15Add get_base_editor to ScriptEditorBasesent44
2021-03-23Rename ButtonList enum and members to MouseButtonAaron Franke
2021-02-18Removed hardcoded shortcuts from /scene and converted to input actionsEric M
This removes hardcoded actions from things like LineEdit and TextEdit. Previously, things like copy, paste, etc were all hardcoded to Ctrl+C, Ctrl+V, etc. They could not be changed. This allows the possibility of them being changed, by making them use the action map. This has the added benefit of greatly simplifying the input handling logic in those controls. The logic which was previously in a huge and hard to follow switch statement has been extracted to individual methods.
2021-01-24Change themes *_color_* to *_*_colorMarcel Admiraal
Changed: font_color_accel -> font_accelerator_color font_color_bg -> font_unselected_color font_color_disabled -> font_disabled_color font_color_fg -> font_selected_color font_color_hover -> font_hover_color font_color_hover_pressed -> font_hover_pressed_color font_color_pressed -> font_pressed_color font_color_readonly -> font_readonly_color font_color_selected -> font_selected_color font_color_shadow -> font_shadow_color font_color_uneditable -> font_uneditable_color icon_color_disabled -> icon_disabled_color icon_color_hover -> icon_hover_color icon_color_hover_pressed -> icon_hover_pressed_color icon_color_normal -> icon_normal_color icon_color_pressed -> icon_pressed_color Also includes: font_outline_modulate -> font_outline_color tab_fg -> tab_selected tab_bg -> tab_unselected
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-28Rename empty() to is_empty()Marcel Admiraal
2020-12-23Rename Control margin to offsetMarcel Admiraal
2020-11-23Implement new shortcuts system.Eric M
unhandled_key_input changed to unhandled_button_input. Controls can set a 'shortcut_context' which they can then use to determine if their shortcuts should be triggered or not, based on if the viewport's focused GUI control is a child of their 'shortcut context'.
2020-09-10Add main_gutter (breakpoints, bookmarks, execution lines) to code_editPaulb23
2020-09-10Add and convert editor to use CodeEditPaulb23
2020-07-26Make unsaved scripts in the script editor more user-friendlyAndrii Doroshenko (Xrayez)
Unsaved scripts were previously displayed with blank tabs, which are mostly a result of deleted or improperly moved scripts. This patch makes sure that those kind of scripts are displayed as "[unsaved]" now, and ensures that scripts are removed from the list while deleting scripts from the filesystem dock preventing the unsaved tabs to appear in the first place (a user is already prompted with "no undo" warning while deleting any file). A user is always prompted to save those "[unsaved]" scripts if they attempt to close them without saving in any case except as described above.
2020-07-17Optimized ScriptEditor initialization when many scripts are loadedPouleyKetchoupp
This change avoids the editor to freeze for several seconds when a project with lots of scripts is loaded in the editor. It focuses on a few heavy operations previously executed on all previously loaded scripts: - Initialize script resource (script validation/parsing) only on focus - ScriptTextEditor: code editor and edit menu are added to the scene only on focus - Add to recent scripts only when opening new scripts (load/save scene metadata)
2020-07-11Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighterPaulb23
- Extacted all syntax highlighting code from text edit - Removed enable syntax highlighting from text edit - Added line_edited_from signal to text_edit - Renamed get/set_syntax_highlighting to get/set_syntax_highlighter - Added EditorSyntaxHighligher
2020-07-11Expose Syntax highlighter for editor pluginsPaulb23
2020-07-11Convert syntax highlighters into a resourcePaulb23