<?xml version="1.0" encoding="UTF-8" ?>
<class name="TLRichTextEdit" inherits="Control" category="Core" version="3.2">
	<brief_description>
		Rich text display and input control.
		Rich text can contain custom text, fonts, images and formatting.
	</brief_description>
	<description>
	</description>
	<tutorials>
	</tutorials>
	<methods>
		<method name="add_attribute">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<argument index="1" name="attribute" type="int">
			</argument>
			<argument index="2" name="value" type="Variant">
			</argument>
			<description>
				Sets [code]attribute[/code] attribute to [code]value[/code] for the selection.
			</description>
		</method>
		<method name="clear">
			<return type="void">
			</return>
			<description>
				Clears the attributes and sets text to an empty string.
			</description>
		</method>
		<method name="debug_draw">
			<return type="void">
			</return>
			<argument index="0" name="rid" type="RID">
			</argument>
			<argument index="1" name="position" type="Vector2">
			</argument>
			<argument index="2" name="hit_position" type="Vector2">
			</argument>
			<argument index="3" name="draw_brk_ops" type="bool">
			</argument>
			<argument index="4" name="draw_jst_ops" type="bool">
			</argument>
			<description>
				[code]DEBUG:[/code] Draws text with additional debug information.
			</description>
		</method>
		<method name="debug_draw_as_hex">
			<return type="void">
			</return>
			<argument index="0" name="rid" type="RID">
			</argument>
			<argument index="1" name="position" type="Vector2">
			</argument>
			<argument index="2" name="hit_position" type="Vector2">
			</argument>
			<argument index="3" name="draw_brk_ops" type="bool">
			</argument>
			<argument index="4" name="draw_jst_ops" type="bool">
			</argument>
			<description>
				[code]DEBUG:[/code] Draws text using "hexbox" fallback font.
			</description>
		</method>
		<method name="debug_draw_logical_as_hex">
			<return type="void">
			</return>
			<argument index="0" name="rid" type="RID">
			</argument>
			<argument index="1" name="position" type="Vector2">
			</argument>
			<argument index="2" name="hit_position" type="Vector2">
			</argument>
			<argument index="3" name="draw_brk_ops" type="bool">
			</argument>
			<argument index="4" name="draw_jst_ops" type="bool">
			</argument>
			<description>
				[code]DEBUG:[/code] Draws logical character codes of the text with additional debug information.
			</description>
		</method>
		<method name="get_caret_position">
			<return type="Vector2">
			</return>
			<description>
				Returns position of the caret, in (paragraph, offset) format.
			</description>
		</method>
		<method name="get_cluster_debug_info_hit_test">
			<return type="String">
			</return>
			<argument index="0" name="position" type="Vector2">
			</argument>
			<description>
				[code]DEBUG:[/code] Returns cluster hit test info.
			</description>
		</method>
		<method name="get_cluster_glyphs_hit_test">
			<return type="Array">
			</return>
			<argument index="0" name="position" type="Vector2">
			</argument>
			<description>
				Returns glyph hit test info.
			</description>
		</method>
		<method name="get_cluster_rect_hit_test">
			<return type="Rect2">
			</return>
			<argument index="0" name="position" type="Vector2">
			</argument>
			<description>
				Returns replacement object hit test info.
			</description>
		</method>
		<method name="get_paragraph" qualifiers="const">
			<return type="TLShapedParagraph">
			</return>
			<argument index="0" name="index" type="int">
			</argument>
			<description>
				Returns paragraph of text.
			</description>
		</method>
		<method name="get_paragraphs">
			<return type="int">
			</return>
			<description>
				Returns number of paragraph in the text.
			</description>
		</method>
		<method name="get_selection" qualifiers="const">
			<return type="TLRichTextEditSelection">
			</return>
			<description>
				Returns current selection and caret position.
			</description>
		</method>
		<method name="insert_paragraph">
			<return type="int">
			</return>
			<argument index="0" name="para" type="TLShapedParagraph">
			</argument>
			<argument index="1" name="index" type="int">
			</argument>
			<description>
				Inserts paragraph of text at the [index] position.
			</description>
		</method>
		<method name="remove_attribute">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<argument index="1" name="attribute" type="int">
			</argument>
			<description>
				Returns [code]attribute[/code] attribute value in the selection.
			</description>
		</method>
		<method name="remove_attributes">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<description>
				Removes all attributes in the selection.
			</description>
		</method>
		<method name="remove_paragraph">
			<return type="void">
			</return>
			<argument index="0" name="index" type="int">
			</argument>
			<description>
				Removes paragraph of the text.
			</description>
		</method>
		<method name="replace_sstring">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<argument index="1" name="text" type="TLShapedString">
			</argument>
			<description>
				Replaces selection with the shaped string.
			</description>
		</method>
		<method name="replace_text">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<argument index="1" name="text" type="String">
			</argument>
			<description>
				Replaces selection with the plain string.
			</description>
		</method>
		<method name="replace_utf16">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<argument index="1" name="text" type="PoolByteArray">
			</argument>
			<description>
				Replaces selection with the contents of the raw UTF-16 encoded string.
			</description>
		</method>
		<method name="replace_utf32">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<argument index="1" name="text" type="PoolByteArray">
			</argument>
			<description>
				Replaces selection with the contents of the raw UTF-32 encoded string.
			</description>
		</method>
		<method name="replace_utf8">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<argument index="1" name="text" type="PoolByteArray">
			</argument>
			<description>
				Replaces selection with the contents of the raw UTF-8 encoded string.
			</description>
		</method>
		<method name="set_paragraph">
			<return type="void">
			</return>
			<argument index="0" name="para" type="TLShapedParagraph">
			</argument>
			<argument index="1" name="index" type="int">
			</argument>
			<description>
				Sets content of the specific paragraph.
			</description>
		</method>
		<method name="set_paragraph_back_color">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<argument index="1" name="bcolor" type="Color">
			</argument>
			<description>
				Sets background color of the paragraph.
			</description>
		</method>
		<method name="set_paragraph_brk_flags">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<argument index="1" name="flags" type="int">
			</argument>
			<description>
				Sets line breaking flags of the paragraph.
			</description>
		</method>
		<method name="set_paragraph_halign">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<argument index="1" name="halign" type="int">
			</argument>
			<description>
				Sets horizontal alignment of the paragraph.
			</description>
		</method>
		<method name="set_paragraph_indent">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<argument index="1" name="indent" type="float">
			</argument>
			<description>
				Sets indentation of the paragraph.
			</description>
		</method>
		<method name="set_paragraph_jst_flags">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<argument index="1" name="flags" type="int">
			</argument>
			<description>
				Sets justification flags of the paragraph.
			</description>
		</method>
		<method name="set_paragraph_line_spacing">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<argument index="1" name="line_spacing" type="float">
			</argument>
			<description>
				Sets line spacing of the paragraph.
			</description>
		</method>
		<method name="set_paragraph_width">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<argument index="1" name="width" type="float">
			</argument>
			<description>
				Sets max width of the paragraph.
			</description>
		</method>
		<method name="set_selection">
			<return type="void">
			</return>
			<argument index="0" name="selection" type="TLRichTextEditSelection">
			</argument>
			<description>
				Sets current selection.
			</description>
		</method>
	</methods>
	<members>
		<member name="back_color" type="Color" setter="set_back_color" getter="get_back_color" default="Color( 1, 1, 1, 0 )">
			Background color of the control.
		</member>
		<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
		<member name="paragraph_spacing" type="float" setter="set_paragraph_spacing" getter="get_paragraph_spacing" default="3.0">
			Spacing between the paragraphs in pixels.
		</member>
		<member name="readonly" type="bool" setter="set_readonly" getter="get_readonly" default="false">
			If [code]true[/code], existing text cannot be modified and new text cannot be added.
		</member>
		<member name="selectable" type="bool" setter="set_selectable" getter="get_selectable" default="true">
			If [code]true[/code], the control allows text selection.
		</member>
		<member name="paragraphs/{index}" type="TLShapedParagraph">
			Paragraphs of the text.
		</member>
	</members>
	<signals>
		<signal name="cursor_changed">
			<description>
				Emitted when caret moves or selection changes.
			</description>
		</signal>
		<signal name="paragraph_changed">
			<description>
				Emitted when paragraph text or attributes changes.
			</description>
		</signal>
	</signals>
	<constants>
	</constants>
</class>
