浏览代码

Merge pull request #88875 from aaronfranke/doc-textedit-gutter-type

Explain gutter types in the TextEdit documentation
Rémi Verschelde 1 年之前
父节点
当前提交
0df286fde0
共有 1 个文件被更改,包括 10 次插入10 次删除
  1. 10 10
      doc/classes/TextEdit.xml

+ 10 - 10
doc/classes/TextEdit.xml

@@ -255,7 +255,7 @@
 			<return type="int" enum="TextEdit.GutterType" />
 			<return type="int" enum="TextEdit.GutterType" />
 			<param index="0" name="gutter" type="int" />
 			<param index="0" name="gutter" type="int" />
 			<description>
 			<description>
-				Returns the type of the gutter at the given index.
+				Returns the type of the gutter at the given index. Gutters can contain icons, text, or custom visuals. See [enum TextEdit.GutterType] for options.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_gutter_width" qualifiers="const">
 		<method name="get_gutter_width" qualifiers="const">
@@ -329,7 +329,7 @@
 			<param index="0" name="line" type="int" />
 			<param index="0" name="line" type="int" />
 			<param index="1" name="gutter" type="int" />
 			<param index="1" name="gutter" type="int" />
 			<description>
 			<description>
-				Returns the icon currently in [param gutter] at [param line].
+				Returns the icon currently in [param gutter] at [param line]. This only works when the gutter type is [constant GUTTER_TYPE_ICON] (see [method set_gutter_type]).
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_line_gutter_item_color" qualifiers="const">
 		<method name="get_line_gutter_item_color" qualifiers="const">
@@ -353,7 +353,7 @@
 			<param index="0" name="line" type="int" />
 			<param index="0" name="line" type="int" />
 			<param index="1" name="gutter" type="int" />
 			<param index="1" name="gutter" type="int" />
 			<description>
 			<description>
-				Returns the text currently in [param gutter] at [param line].
+				Returns the text currently in [param gutter] at [param line]. This only works when the gutter type is [constant GUTTER_TYPE_STRING] (see [method set_gutter_type]).
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_line_height" qualifiers="const">
 		<method name="get_line_height" qualifiers="const">
@@ -897,7 +897,7 @@
 			<param index="0" name="column" type="int" />
 			<param index="0" name="column" type="int" />
 			<param index="1" name="draw_callback" type="Callable" />
 			<param index="1" name="draw_callback" type="Callable" />
 			<description>
 			<description>
-				Set a custom draw method for the gutter. The callback method must take the following args: [code]line: int, gutter: int, Area: Rect2[/code].
+				Set a custom draw method for the gutter. The callback method must take the following args: [code]line: int, gutter: int, Area: Rect2[/code]. This only works when the gutter type is [constant GUTTER_TYPE_CUSTOM] (see [method set_gutter_type]).
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_gutter_draw">
 		<method name="set_gutter_draw">
@@ -929,7 +929,7 @@
 			<param index="0" name="gutter" type="int" />
 			<param index="0" name="gutter" type="int" />
 			<param index="1" name="type" type="int" enum="TextEdit.GutterType" />
 			<param index="1" name="type" type="int" enum="TextEdit.GutterType" />
 			<description>
 			<description>
-				Sets the type of gutter.
+				Sets the type of gutter. Gutters can contain icons, text, or custom visuals. See [enum TextEdit.GutterType] for options.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_gutter_width">
 		<method name="set_gutter_width">
@@ -995,7 +995,7 @@
 			<param index="1" name="gutter" type="int" />
 			<param index="1" name="gutter" type="int" />
 			<param index="2" name="icon" type="Texture2D" />
 			<param index="2" name="icon" type="Texture2D" />
 			<description>
 			<description>
-				Sets the icon for [param gutter] on [param line] to [param icon].
+				Sets the icon for [param gutter] on [param line] to [param icon]. This only works when the gutter type is [constant GUTTER_TYPE_ICON] (see [method set_gutter_type]).
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_line_gutter_item_color">
 		<method name="set_line_gutter_item_color">
@@ -1022,7 +1022,7 @@
 			<param index="1" name="gutter" type="int" />
 			<param index="1" name="gutter" type="int" />
 			<param index="2" name="text" type="String" />
 			<param index="2" name="text" type="String" />
 			<description>
 			<description>
-				Sets the text for [param gutter] on [param line] to [param text].
+				Sets the text for [param gutter] on [param line] to [param text]. This only works when the gutter type is [constant GUTTER_TYPE_STRING] (see [method set_gutter_type]).
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_overtype_mode_enabled">
 		<method name="set_overtype_mode_enabled">
@@ -1403,13 +1403,13 @@
 			Line wrapping occurs at the control boundary, beyond what would normally be visible.
 			Line wrapping occurs at the control boundary, beyond what would normally be visible.
 		</constant>
 		</constant>
 		<constant name="GUTTER_TYPE_STRING" value="0" enum="GutterType">
 		<constant name="GUTTER_TYPE_STRING" value="0" enum="GutterType">
-			Draw a string.
+			When a gutter is set to string using [method set_gutter_type], it is used to contain text set via the [method set_line_gutter_text] method.
 		</constant>
 		</constant>
 		<constant name="GUTTER_TYPE_ICON" value="1" enum="GutterType">
 		<constant name="GUTTER_TYPE_ICON" value="1" enum="GutterType">
-			Draw an icon.
+			When a gutter is set to icon using [method set_gutter_type], it is used to contain an icon set via the [method set_line_gutter_icon] method.
 		</constant>
 		</constant>
 		<constant name="GUTTER_TYPE_CUSTOM" value="2" enum="GutterType">
 		<constant name="GUTTER_TYPE_CUSTOM" value="2" enum="GutterType">
-			Custom draw.
+			When a gutter is set to custom using [method set_gutter_type], it is used to contain custom visuals controlled by a callback method set via the [method set_gutter_custom_draw] method.
 		</constant>
 		</constant>
 	</constants>
 	</constants>
 	<theme_items>
 	<theme_items>