Browse Source

docs: Add TreeItem method descriptions

(cherry picked from commit 2f5164d78c8c4e2f28de14741716b5d7e24f3b71)
James Westman 4 years ago
parent
commit
7ce1789597
1 changed files with 11 additions and 1 deletions
  1. 11 1
      doc/classes/TreeItem.xml

+ 11 - 1
doc/classes/TreeItem.xml

@@ -190,6 +190,7 @@
 			<argument index="0" name="column" type="int">
 			<argument index="0" name="column" type="int">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns the metadata value that was set for the given column using [method set_metadata].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_next">
 		<method name="get_next">
@@ -239,6 +240,7 @@
 			<argument index="0" name="column" type="int">
 			<argument index="0" name="column" type="int">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns the value of a [constant CELL_MODE_RANGE] column.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_range_config">
 		<method name="get_range_config">
@@ -247,6 +249,7 @@
 			<argument index="0" name="column" type="int">
 			<argument index="0" name="column" type="int">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns a dictionary containing the range parameters for a given column. The keys are "min", "max", "step", and "expr".
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_suffix" qualifiers="const">
 		<method name="get_suffix" qualifiers="const">
@@ -255,6 +258,7 @@
 			<argument index="0" name="column" type="int">
 			<argument index="0" name="column" type="int">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Gets the suffix string shown after the column value.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_text" qualifiers="const">
 		<method name="get_text" qualifiers="const">
@@ -541,6 +545,7 @@
 			<argument index="1" name="meta" type="Variant">
 			<argument index="1" name="meta" type="Variant">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets the metadata value for the given column, which can be retrieved later using [method get_metadata]. This can be used, for example, to store a reference to the original data.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_range">
 		<method name="set_range">
@@ -551,6 +556,7 @@
 			<argument index="1" name="value" type="float">
 			<argument index="1" name="value" type="float">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets the value of a [constant CELL_MODE_RANGE] column.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_range_config">
 		<method name="set_range_config">
@@ -567,6 +573,8 @@
 			<argument index="4" name="expr" type="bool" default="false">
 			<argument index="4" name="expr" type="bool" default="false">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets the range of accepted values for a column. The column must be in the [constant CELL_MODE_RANGE] mode.
+				If [code]expr[/code] is [code]true[/code], the edit mode slider will use an exponential scale as with [member Range.exp_edit].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_selectable">
 		<method name="set_selectable">
@@ -588,6 +596,7 @@
 			<argument index="1" name="text" type="String">
 			<argument index="1" name="text" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets a string to be shown after a column's value (for example, a unit abbreviation).
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_text">
 		<method name="set_text">
@@ -598,6 +607,7 @@
 			<argument index="1" name="text" type="String">
 			<argument index="1" name="text" type="String">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets the given column's text value.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_text_align">
 		<method name="set_text_align">
@@ -639,7 +649,7 @@
 			Cell contains a string.
 			Cell contains a string.
 		</constant>
 		</constant>
 		<constant name="CELL_MODE_CHECK" value="1" enum="TreeCellMode">
 		<constant name="CELL_MODE_CHECK" value="1" enum="TreeCellMode">
-			Cell can be checked.
+			Cell contains a checkbox.
 		</constant>
 		</constant>
 		<constant name="CELL_MODE_RANGE" value="2" enum="TreeCellMode">
 		<constant name="CELL_MODE_RANGE" value="2" enum="TreeCellMode">
 			Cell contains a range.
 			Cell contains a range.