mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 17:28:58 +00:00
classref: Sync with current master branch (f87858a8f)
This commit is contained in:
@@ -16,76 +16,107 @@ SyntaxHighlighter
|
||||
|
||||
Base Syntax highlighter resource for :ref:`TextEdit<class_TextEdit>`.
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Base syntax highlighter resource all syntax highlighters extend from, provides syntax highlighting data to :ref:`TextEdit<class_TextEdit>`.
|
||||
|
||||
The associated :ref:`TextEdit<class_TextEdit>` node will call into the ``SyntaxHighlighter`` on a as needed basis.
|
||||
The associated :ref:`TextEdit<class_TextEdit>` node will call into the **SyntaxHighlighter** on a as needed basis.
|
||||
|
||||
\ **Note:** Each Syntax highlighter instance should not be shared across multiple :ref:`TextEdit<class_TextEdit>` nodes.
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_clear_highlighting_cache<class_SyntaxHighlighter_method__clear_highlighting_cache>` **(** **)** |virtual| |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Dictionary<class_Dictionary>` | :ref:`_get_line_syntax_highlighting<class_SyntaxHighlighter_method__get_line_syntax_highlighting>` **(** :ref:`int<class_int>` line **)** |virtual| |const| |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_update_cache<class_SyntaxHighlighter_method__update_cache>` **(** **)** |virtual| |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_highlighting_cache<class_SyntaxHighlighter_method_clear_highlighting_cache>` **(** **)** |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Dictionary<class_Dictionary>` | :ref:`get_line_syntax_highlighting<class_SyntaxHighlighter_method_get_line_syntax_highlighting>` **(** :ref:`int<class_int>` line **)** |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`TextEdit<class_TextEdit>` | :ref:`get_text_edit<class_SyntaxHighlighter_method_get_text_edit>` **(** **)** |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`update_cache<class_SyntaxHighlighter_method_update_cache>` **(** **)** |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_clear_highlighting_cache<class_SyntaxHighlighter_method__clear_highlighting_cache>` **(** **)** |virtual| |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Dictionary<class_Dictionary>` | :ref:`_get_line_syntax_highlighting<class_SyntaxHighlighter_method__get_line_syntax_highlighting>` **(** :ref:`int<class_int>` line **)** |virtual| |const| |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`_update_cache<class_SyntaxHighlighter_method__update_cache>` **(** **)** |virtual| |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_highlighting_cache<class_SyntaxHighlighter_method_clear_highlighting_cache>` **(** **)** |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Dictionary<class_Dictionary>` | :ref:`get_line_syntax_highlighting<class_SyntaxHighlighter_method_get_line_syntax_highlighting>` **(** :ref:`int<class_int>` line **)** |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`TextEdit<class_TextEdit>` | :ref:`get_text_edit<class_SyntaxHighlighter_method_get_text_edit>` **(** **)** |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`update_cache<class_SyntaxHighlighter_method_update_cache>` **(** **)** |
|
||||
+-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
.. _class_SyntaxHighlighter_method__clear_highlighting_cache:
|
||||
|
||||
- void **_clear_highlighting_cache** **(** **)** |virtual|
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **_clear_highlighting_cache** **(** **)** |virtual|
|
||||
|
||||
Virtual method which can be overridden to clear any local caches.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_SyntaxHighlighter_method__get_line_syntax_highlighting:
|
||||
|
||||
- :ref:`Dictionary<class_Dictionary>` **_get_line_syntax_highlighting** **(** :ref:`int<class_int>` line **)** |virtual| |const|
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Dictionary<class_Dictionary>` **_get_line_syntax_highlighting** **(** :ref:`int<class_int>` line **)** |virtual| |const|
|
||||
|
||||
Virtual method which can be overridden to return syntax highlighting data.
|
||||
|
||||
See :ref:`get_line_syntax_highlighting<class_SyntaxHighlighter_method_get_line_syntax_highlighting>` for more details.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_SyntaxHighlighter_method__update_cache:
|
||||
|
||||
- void **_update_cache** **(** **)** |virtual|
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **_update_cache** **(** **)** |virtual|
|
||||
|
||||
Virtual method which can be overridden to update any local caches.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_SyntaxHighlighter_method_clear_highlighting_cache:
|
||||
|
||||
- void **clear_highlighting_cache** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **clear_highlighting_cache** **(** **)**
|
||||
|
||||
Clears all cached syntax highlighting data.
|
||||
|
||||
Then calls overridable method :ref:`_clear_highlighting_cache<class_SyntaxHighlighter_method__clear_highlighting_cache>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_SyntaxHighlighter_method_get_line_syntax_highlighting:
|
||||
|
||||
- :ref:`Dictionary<class_Dictionary>` **get_line_syntax_highlighting** **(** :ref:`int<class_int>` line **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Dictionary<class_Dictionary>` **get_line_syntax_highlighting** **(** :ref:`int<class_int>` line **)**
|
||||
|
||||
Returns syntax highlighting data for a single line. If the line is not cached, calls :ref:`_get_line_syntax_highlighting<class_SyntaxHighlighter_method__get_line_syntax_highlighting>` to calculate the data.
|
||||
|
||||
@@ -106,21 +137,29 @@ The return :ref:`Dictionary<class_Dictionary>` is column number to :ref:`Diction
|
||||
|
||||
This will color columns 0-4 red, and columns 5-eol in green.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_SyntaxHighlighter_method_get_text_edit:
|
||||
|
||||
- :ref:`TextEdit<class_TextEdit>` **get_text_edit** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`TextEdit<class_TextEdit>` **get_text_edit** **(** **)**
|
||||
|
||||
Returns the associated :ref:`TextEdit<class_TextEdit>` node.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_SyntaxHighlighter_method_update_cache:
|
||||
|
||||
- void **update_cache** **(** **)**
|
||||
.. rst-class:: classref-method
|
||||
|
||||
Clears then updates the ``SyntaxHighlighter`` caches. Override :ref:`_update_cache<class_SyntaxHighlighter_method__update_cache>` for a callback.
|
||||
void **update_cache** **(** **)**
|
||||
|
||||
Clears then updates the **SyntaxHighlighter** caches. Override :ref:`_update_cache<class_SyntaxHighlighter_method__update_cache>` for a callback.
|
||||
|
||||
\ **Note:** This is called automatically when the associated :ref:`TextEdit<class_TextEdit>` node, updates its own cache.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user