diff options
Diffstat (limited to 'doc/classes/RichTextLabel.xml')
-rw-r--r-- | doc/classes/RichTextLabel.xml | 70 |
1 files changed, 31 insertions, 39 deletions
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 62a692d4a7..3c9e9b1bfc 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -60,6 +60,7 @@ <argument index="0" name="character" type="int" /> <description> Returns the line number of the character position provided. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_character_paragraph"> @@ -67,24 +68,28 @@ <argument index="0" name="character" type="int" /> <description> Returns the paragraph number of the character position provided. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_content_height" qualifiers="const"> <return type="int" /> <description> Returns the height of the content. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_content_width" qualifiers="const"> <return type="int" /> <description> Returns the width of the content. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_line_count" qualifiers="const"> <return type="int" /> <description> Returns the total number of lines in the text. Wrapped text is counted as multiple lines. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_line_offset"> @@ -92,6 +97,7 @@ <argument index="0" name="line" type="int" /> <description> Returns the vertical offset of the line found at the provided index. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_menu" qualifiers="const"> @@ -112,6 +118,7 @@ <argument index="0" name="paragraph" type="int" /> <description> Returns the vertical offset of the paragraph found at the provided index. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_parsed_text" qualifiers="const"> @@ -155,12 +162,14 @@ <return type="int" /> <description> Returns the number of visible lines. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="get_visible_paragraph_count" qualifiers="const"> <return type="int" /> <description> Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. + [b]Note:[/b] If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. </description> </method> <method name="install_effect"> @@ -176,6 +185,12 @@ Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided). </description> </method> + <method name="is_ready" qualifiers="const"> + <return type="bool" /> + <description> + If [member threaded] is enabled, returns [code]true[/code] if the background thread has finished text processing, otherwise always return [code]true[/code]. + </description> + </method> <method name="newline"> <return type="void" /> <description> @@ -261,18 +276,10 @@ Adds a [code][font][/code] tag to the tag stack. Overrides default fonts for its duration. </description> </method> - <method name="push_font_features"> - <return type="void" /> - <argument index="0" name="opentype_features" type="Dictionary" /> - <description> - Adds a [code][ot_feature][/code] tag to the tag stack. Overrides default OpenType font feature for its duration. - </description> - </method> <method name="push_font_size"> <return type="void" /> <argument index="0" name="font_size" type="int" /> <description> - Adds a [code][font_size][/code] tag to the tag stack. Overrides default font size for its duration. </description> </method> <method name="push_hint"> @@ -439,8 +446,8 @@ </method> </methods> <members> - <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="RichTextLabel.AutowrapMode" default="3"> - If set to something other than [constant AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. To see how each mode behaves, see [enum AutowrapMode]. + <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="TextServer.AutowrapMode" default="3"> + If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. To see how each mode behaves, see [enum TextServer.AutowrapMode]. </member> <member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode" default="false"> If [code]true[/code], the label uses BBCode formatting. @@ -476,6 +483,10 @@ The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0. [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count]. </member> + <member name="progress_bar_delay" type="int" setter="set_progress_bar_delay" getter="get_progress_bar_delay" default="1000"> + The delay after which the loading progress bar is displayed, in milliseconds. Set to [code]-1[/code] to disable progress bar entirely. + [b]Note:[/b] Progress bar is displayed only if [member threaded] is enabled. + </member> <member name="scroll_active" type="bool" setter="set_scroll_active" getter="is_scroll_active" default="true"> If [code]true[/code], the scrollbar is visible. Setting this to [code]false[/code] does not block scrolling completely. See [method scroll_to_line]. </member> @@ -504,15 +515,23 @@ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0"> Base text writing direction. </member> + <member name="threaded" type="bool" setter="set_threaded" getter="is_threaded" default="false"> + If [code]true[/code], text processing is done in a background thread. + </member> <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1"> The restricted number of characters to display in the label. If [code]-1[/code], all characters will be displayed. [b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count]. </member> - <member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="RichTextLabel.VisibleCharactersBehavior" default="0"> - Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum VisibleCharactersBehavior] for more info. + <member name="visible_characters_behavior" type="int" setter="set_visible_characters_behavior" getter="get_visible_characters_behavior" enum="TextServer.VisibleCharactersBehavior" default="0"> + Sets the clipping behavior when [member visible_characters] or [member percent_visible] is set. See [enum TextServer.VisibleCharactersBehavior] for more info. </member> </members> <signals> + <signal name="finished"> + <description> + Triggered when the document is fully loaded. + </description> + </signal> <signal name="meta_clicked"> <argument index="0" name="meta" type="Variant" /> <description> @@ -533,18 +552,6 @@ </signal> </signals> <constants> - <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode"> - Autowrap is disabled. - </constant> - <constant name="AUTOWRAP_ARBITRARY" value="1" enum="AutowrapMode"> - Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available. - </constant> - <constant name="AUTOWRAP_WORD" value="2" enum="AutowrapMode"> - Wraps the text inside the node's bounding rectangle by soft-breaking between words. - </constant> - <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode"> - Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line. - </constant> <constant name="LIST_NUMBERS" value="0" enum="ListType"> Each list item has a number marker. </constant> @@ -611,21 +618,6 @@ </constant> <constant name="ITEM_CUSTOMFX" value="26" enum="ItemType"> </constant> - <constant name="VC_CHARS_BEFORE_SHAPING" value="0" enum="VisibleCharactersBehavior"> - Trims text before the shaping. e.g, increasing [member visible_characters] value is visually identical to typing the text. - </constant> - <constant name="VC_CHARS_AFTER_SHAPING" value="1" enum="VisibleCharactersBehavior"> - Displays glyphs that are mapped to the first [member visible_characters] characters from the beginning of the text. - </constant> - <constant name="VC_GLYPHS_AUTO" value="2" enum="VisibleCharactersBehavior"> - Displays [member percent_visible] glyphs, starting from the left or from the right, depending on [member Control.layout_direction] value. - </constant> - <constant name="VC_GLYPHS_LTR" value="3" enum="VisibleCharactersBehavior"> - Displays [member percent_visible] glyphs, starting from the left. - </constant> - <constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior"> - Displays [member percent_visible] glyphs, starting from the right. - </constant> </constants> <theme_items> <theme_item name="default_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> |