class_editorproperty.rst 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/EditorProperty.xml.
  6. .. _class_EditorProperty:
  7. EditorProperty
  8. ==============
  9. **Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. Custom control for editing properties that can be added to the :ref:`EditorInspector<class_EditorInspector>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A custom control for editing properties that can be added to the :ref:`EditorInspector<class_EditorInspector>`. It is added via :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`checkable<class_EditorProperty_property_checkable>` | ``false`` |
  22. +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+
  23. | :ref:`bool<class_bool>` | :ref:`checked<class_EditorProperty_property_checked>` | ``false`` |
  24. +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`deletable<class_EditorProperty_property_deletable>` | ``false`` |
  26. +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+
  27. | :ref:`bool<class_bool>` | :ref:`draw_background<class_EditorProperty_property_draw_background>` | ``true`` |
  28. +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`draw_label<class_EditorProperty_property_draw_label>` | ``true`` |
  30. +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`draw_warning<class_EditorProperty_property_draw_warning>` | ``false`` |
  32. +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+
  33. | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``3`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
  34. +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+
  35. | :ref:`bool<class_bool>` | :ref:`keying<class_EditorProperty_property_keying>` | ``false`` |
  36. +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+
  37. | :ref:`String<class_String>` | :ref:`label<class_EditorProperty_property_label>` | ``""`` |
  38. +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+
  39. | :ref:`float<class_float>` | :ref:`name_split_ratio<class_EditorProperty_property_name_split_ratio>` | ``0.5`` |
  40. +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+
  41. | :ref:`bool<class_bool>` | :ref:`read_only<class_EditorProperty_property_read_only>` | ``false`` |
  42. +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+
  43. | :ref:`bool<class_bool>` | :ref:`selectable<class_EditorProperty_property_selectable>` | ``true`` |
  44. +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+
  45. | :ref:`bool<class_bool>` | :ref:`use_folding<class_EditorProperty_property_use_folding>` | ``false`` |
  46. +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+
  47. .. rst-class:: classref-reftable-group
  48. Methods
  49. -------
  50. .. table::
  51. :widths: auto
  52. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | |void| | :ref:`_set_read_only<class_EditorProperty_private_method__set_read_only>`\ (\ read_only\: :ref:`bool<class_bool>`\ ) |virtual| |
  54. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | |void| | :ref:`_update_property<class_EditorProperty_private_method__update_property>`\ (\ ) |virtual| |
  56. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | |void| | :ref:`add_focusable<class_EditorProperty_method_add_focusable>`\ (\ control\: :ref:`Control<class_Control>`\ ) |
  58. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | |void| | :ref:`deselect<class_EditorProperty_method_deselect>`\ (\ ) |
  60. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | |void| | :ref:`emit_changed<class_EditorProperty_method_emit_changed>`\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`, field\: :ref:`StringName<class_StringName>` = &"", changing\: :ref:`bool<class_bool>` = false\ ) |
  62. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`Object<class_Object>` | :ref:`get_edited_object<class_EditorProperty_method_get_edited_object>`\ (\ ) |
  64. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`StringName<class_StringName>` | :ref:`get_edited_property<class_EditorProperty_method_get_edited_property>`\ (\ ) |const| |
  66. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`bool<class_bool>` | :ref:`is_selected<class_EditorProperty_method_is_selected>`\ (\ ) |const| |
  68. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | |void| | :ref:`select<class_EditorProperty_method_select>`\ (\ focusable\: :ref:`int<class_int>` = -1\ ) |
  70. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | |void| | :ref:`set_bottom_editor<class_EditorProperty_method_set_bottom_editor>`\ (\ editor\: :ref:`Control<class_Control>`\ ) |
  72. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | |void| | :ref:`set_label_reference<class_EditorProperty_method_set_label_reference>`\ (\ control\: :ref:`Control<class_Control>`\ ) |
  74. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | |void| | :ref:`set_object_and_property<class_EditorProperty_method_set_object_and_property>`\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`StringName<class_StringName>`\ ) |
  76. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | |void| | :ref:`update_property<class_EditorProperty_method_update_property>`\ (\ ) |
  78. +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. .. rst-class:: classref-section-separator
  80. ----
  81. .. rst-class:: classref-descriptions-group
  82. Signals
  83. -------
  84. .. _class_EditorProperty_signal_multiple_properties_changed:
  85. .. rst-class:: classref-signal
  86. **multiple_properties_changed**\ (\ properties\: :ref:`PackedStringArray<class_PackedStringArray>`, value\: :ref:`Array<class_Array>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_signal_multiple_properties_changed>`
  87. Emit it if you want multiple properties modified at the same time. Do not use if added via :ref:`EditorInspectorPlugin._parse_property()<class_EditorInspectorPlugin_private_method__parse_property>`.
  88. .. rst-class:: classref-item-separator
  89. ----
  90. .. _class_EditorProperty_signal_object_id_selected:
  91. .. rst-class:: classref-signal
  92. **object_id_selected**\ (\ property\: :ref:`StringName<class_StringName>`, id\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_signal_object_id_selected>`
  93. Used by sub-inspectors. Emit it if what was selected was an Object ID.
  94. .. rst-class:: classref-item-separator
  95. ----
  96. .. _class_EditorProperty_signal_property_can_revert_changed:
  97. .. rst-class:: classref-signal
  98. **property_can_revert_changed**\ (\ property\: :ref:`StringName<class_StringName>`, can_revert\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_signal_property_can_revert_changed>`
  99. Emitted when the revertability (i.e., whether it has a non-default value and thus is displayed with a revert icon) of a property has changed.
  100. .. rst-class:: classref-item-separator
  101. ----
  102. .. _class_EditorProperty_signal_property_changed:
  103. .. rst-class:: classref-signal
  104. **property_changed**\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`, field\: :ref:`StringName<class_StringName>`, changing\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_signal_property_changed>`
  105. Do not emit this manually, use the :ref:`emit_changed()<class_EditorProperty_method_emit_changed>` method instead.
  106. .. rst-class:: classref-item-separator
  107. ----
  108. .. _class_EditorProperty_signal_property_checked:
  109. .. rst-class:: classref-signal
  110. **property_checked**\ (\ property\: :ref:`StringName<class_StringName>`, checked\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_signal_property_checked>`
  111. Emitted when a property was checked. Used internally.
  112. .. rst-class:: classref-item-separator
  113. ----
  114. .. _class_EditorProperty_signal_property_deleted:
  115. .. rst-class:: classref-signal
  116. **property_deleted**\ (\ property\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_signal_property_deleted>`
  117. Emitted when a property was deleted. Used internally.
  118. .. rst-class:: classref-item-separator
  119. ----
  120. .. _class_EditorProperty_signal_property_favorited:
  121. .. rst-class:: classref-signal
  122. **property_favorited**\ (\ property\: :ref:`StringName<class_StringName>`, favorited\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_signal_property_favorited>`
  123. Emit it if you want to mark a property as favorited, making it appear at the top of the inspector.
  124. .. rst-class:: classref-item-separator
  125. ----
  126. .. _class_EditorProperty_signal_property_keyed:
  127. .. rst-class:: classref-signal
  128. **property_keyed**\ (\ property\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_signal_property_keyed>`
  129. Emit it if you want to add this value as an animation key (check for keying being enabled first).
  130. .. rst-class:: classref-item-separator
  131. ----
  132. .. _class_EditorProperty_signal_property_keyed_with_value:
  133. .. rst-class:: classref-signal
  134. **property_keyed_with_value**\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_signal_property_keyed_with_value>`
  135. Emit it if you want to key a property with a single value.
  136. .. rst-class:: classref-item-separator
  137. ----
  138. .. _class_EditorProperty_signal_property_overridden:
  139. .. rst-class:: classref-signal
  140. **property_overridden**\ (\ ) :ref:`๐Ÿ”—<class_EditorProperty_signal_property_overridden>`
  141. Emitted when a setting override for the current project is requested.
  142. .. rst-class:: classref-item-separator
  143. ----
  144. .. _class_EditorProperty_signal_property_pinned:
  145. .. rst-class:: classref-signal
  146. **property_pinned**\ (\ property\: :ref:`StringName<class_StringName>`, pinned\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_signal_property_pinned>`
  147. Emit it if you want to mark (or unmark) the value of a property for being saved regardless of being equal to the default value.
  148. The default value is the one the property will get when the node is just instantiated and can come from an ancestor scene in the inheritance/instantiation chain, a script or a builtin class.
  149. .. rst-class:: classref-item-separator
  150. ----
  151. .. _class_EditorProperty_signal_resource_selected:
  152. .. rst-class:: classref-signal
  153. **resource_selected**\ (\ path\: :ref:`String<class_String>`, resource\: :ref:`Resource<class_Resource>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_signal_resource_selected>`
  154. If you want a sub-resource to be edited, emit this signal with the resource.
  155. .. rst-class:: classref-item-separator
  156. ----
  157. .. _class_EditorProperty_signal_selected:
  158. .. rst-class:: classref-signal
  159. **selected**\ (\ path\: :ref:`String<class_String>`, focusable_idx\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_signal_selected>`
  160. Emitted when selected. Used internally.
  161. .. rst-class:: classref-section-separator
  162. ----
  163. .. rst-class:: classref-descriptions-group
  164. Property Descriptions
  165. ---------------------
  166. .. _class_EditorProperty_property_checkable:
  167. .. rst-class:: classref-property
  168. :ref:`bool<class_bool>` **checkable** = ``false`` :ref:`๐Ÿ”—<class_EditorProperty_property_checkable>`
  169. .. rst-class:: classref-property-setget
  170. - |void| **set_checkable**\ (\ value\: :ref:`bool<class_bool>`\ )
  171. - :ref:`bool<class_bool>` **is_checkable**\ (\ )
  172. Used by the inspector, set to ``true`` when the property is checkable.
  173. .. rst-class:: classref-item-separator
  174. ----
  175. .. _class_EditorProperty_property_checked:
  176. .. rst-class:: classref-property
  177. :ref:`bool<class_bool>` **checked** = ``false`` :ref:`๐Ÿ”—<class_EditorProperty_property_checked>`
  178. .. rst-class:: classref-property-setget
  179. - |void| **set_checked**\ (\ value\: :ref:`bool<class_bool>`\ )
  180. - :ref:`bool<class_bool>` **is_checked**\ (\ )
  181. Used by the inspector, set to ``true`` when the property is checked.
  182. .. rst-class:: classref-item-separator
  183. ----
  184. .. _class_EditorProperty_property_deletable:
  185. .. rst-class:: classref-property
  186. :ref:`bool<class_bool>` **deletable** = ``false`` :ref:`๐Ÿ”—<class_EditorProperty_property_deletable>`
  187. .. rst-class:: classref-property-setget
  188. - |void| **set_deletable**\ (\ value\: :ref:`bool<class_bool>`\ )
  189. - :ref:`bool<class_bool>` **is_deletable**\ (\ )
  190. Used by the inspector, set to ``true`` when the property can be deleted by the user.
  191. .. rst-class:: classref-item-separator
  192. ----
  193. .. _class_EditorProperty_property_draw_background:
  194. .. rst-class:: classref-property
  195. :ref:`bool<class_bool>` **draw_background** = ``true`` :ref:`๐Ÿ”—<class_EditorProperty_property_draw_background>`
  196. .. rst-class:: classref-property-setget
  197. - |void| **set_draw_background**\ (\ value\: :ref:`bool<class_bool>`\ )
  198. - :ref:`bool<class_bool>` **is_draw_background**\ (\ )
  199. Used by the inspector, set to ``true`` when the property background is drawn.
  200. .. rst-class:: classref-item-separator
  201. ----
  202. .. _class_EditorProperty_property_draw_label:
  203. .. rst-class:: classref-property
  204. :ref:`bool<class_bool>` **draw_label** = ``true`` :ref:`๐Ÿ”—<class_EditorProperty_property_draw_label>`
  205. .. rst-class:: classref-property-setget
  206. - |void| **set_draw_label**\ (\ value\: :ref:`bool<class_bool>`\ )
  207. - :ref:`bool<class_bool>` **is_draw_label**\ (\ )
  208. Used by the inspector, set to ``true`` when the property label is drawn.
  209. .. rst-class:: classref-item-separator
  210. ----
  211. .. _class_EditorProperty_property_draw_warning:
  212. .. rst-class:: classref-property
  213. :ref:`bool<class_bool>` **draw_warning** = ``false`` :ref:`๐Ÿ”—<class_EditorProperty_property_draw_warning>`
  214. .. rst-class:: classref-property-setget
  215. - |void| **set_draw_warning**\ (\ value\: :ref:`bool<class_bool>`\ )
  216. - :ref:`bool<class_bool>` **is_draw_warning**\ (\ )
  217. Used by the inspector, set to ``true`` when the property is drawn with the editor theme's warning color. This is used for editable children's properties.
  218. .. rst-class:: classref-item-separator
  219. ----
  220. .. _class_EditorProperty_property_keying:
  221. .. rst-class:: classref-property
  222. :ref:`bool<class_bool>` **keying** = ``false`` :ref:`๐Ÿ”—<class_EditorProperty_property_keying>`
  223. .. rst-class:: classref-property-setget
  224. - |void| **set_keying**\ (\ value\: :ref:`bool<class_bool>`\ )
  225. - :ref:`bool<class_bool>` **is_keying**\ (\ )
  226. Used by the inspector, set to ``true`` when the property can add keys for animation.
  227. .. rst-class:: classref-item-separator
  228. ----
  229. .. _class_EditorProperty_property_label:
  230. .. rst-class:: classref-property
  231. :ref:`String<class_String>` **label** = ``""`` :ref:`๐Ÿ”—<class_EditorProperty_property_label>`
  232. .. rst-class:: classref-property-setget
  233. - |void| **set_label**\ (\ value\: :ref:`String<class_String>`\ )
  234. - :ref:`String<class_String>` **get_label**\ (\ )
  235. Set this property to change the label (if you want to show one).
  236. .. rst-class:: classref-item-separator
  237. ----
  238. .. _class_EditorProperty_property_name_split_ratio:
  239. .. rst-class:: classref-property
  240. :ref:`float<class_float>` **name_split_ratio** = ``0.5`` :ref:`๐Ÿ”—<class_EditorProperty_property_name_split_ratio>`
  241. .. rst-class:: classref-property-setget
  242. - |void| **set_name_split_ratio**\ (\ value\: :ref:`float<class_float>`\ )
  243. - :ref:`float<class_float>` **get_name_split_ratio**\ (\ )
  244. Space distribution ratio between the label and the editing field.
  245. .. rst-class:: classref-item-separator
  246. ----
  247. .. _class_EditorProperty_property_read_only:
  248. .. rst-class:: classref-property
  249. :ref:`bool<class_bool>` **read_only** = ``false`` :ref:`๐Ÿ”—<class_EditorProperty_property_read_only>`
  250. .. rst-class:: classref-property-setget
  251. - |void| **set_read_only**\ (\ value\: :ref:`bool<class_bool>`\ )
  252. - :ref:`bool<class_bool>` **is_read_only**\ (\ )
  253. Used by the inspector, set to ``true`` when the property is read-only.
  254. .. rst-class:: classref-item-separator
  255. ----
  256. .. _class_EditorProperty_property_selectable:
  257. .. rst-class:: classref-property
  258. :ref:`bool<class_bool>` **selectable** = ``true`` :ref:`๐Ÿ”—<class_EditorProperty_property_selectable>`
  259. .. rst-class:: classref-property-setget
  260. - |void| **set_selectable**\ (\ value\: :ref:`bool<class_bool>`\ )
  261. - :ref:`bool<class_bool>` **is_selectable**\ (\ )
  262. Used by the inspector, set to ``true`` when the property is selectable.
  263. .. rst-class:: classref-item-separator
  264. ----
  265. .. _class_EditorProperty_property_use_folding:
  266. .. rst-class:: classref-property
  267. :ref:`bool<class_bool>` **use_folding** = ``false`` :ref:`๐Ÿ”—<class_EditorProperty_property_use_folding>`
  268. .. rst-class:: classref-property-setget
  269. - |void| **set_use_folding**\ (\ value\: :ref:`bool<class_bool>`\ )
  270. - :ref:`bool<class_bool>` **is_using_folding**\ (\ )
  271. Used by the inspector, set to ``true`` when the property is using folding.
  272. .. rst-class:: classref-section-separator
  273. ----
  274. .. rst-class:: classref-descriptions-group
  275. Method Descriptions
  276. -------------------
  277. .. _class_EditorProperty_private_method__set_read_only:
  278. .. rst-class:: classref-method
  279. |void| **_set_read_only**\ (\ read_only\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`๐Ÿ”—<class_EditorProperty_private_method__set_read_only>`
  280. Called when the read-only status of the property is changed. It may be used to change custom controls into a read-only or modifiable state.
  281. .. rst-class:: classref-item-separator
  282. ----
  283. .. _class_EditorProperty_private_method__update_property:
  284. .. rst-class:: classref-method
  285. |void| **_update_property**\ (\ ) |virtual| :ref:`๐Ÿ”—<class_EditorProperty_private_method__update_property>`
  286. When this virtual function is called, you must update your editor.
  287. .. rst-class:: classref-item-separator
  288. ----
  289. .. _class_EditorProperty_method_add_focusable:
  290. .. rst-class:: classref-method
  291. |void| **add_focusable**\ (\ control\: :ref:`Control<class_Control>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_method_add_focusable>`
  292. If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed.
  293. .. rst-class:: classref-item-separator
  294. ----
  295. .. _class_EditorProperty_method_deselect:
  296. .. rst-class:: classref-method
  297. |void| **deselect**\ (\ ) :ref:`๐Ÿ”—<class_EditorProperty_method_deselect>`
  298. Draw property as not selected. Used by the inspector.
  299. .. rst-class:: classref-item-separator
  300. ----
  301. .. _class_EditorProperty_method_emit_changed:
  302. .. rst-class:: classref-method
  303. |void| **emit_changed**\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`, field\: :ref:`StringName<class_StringName>` = &"", changing\: :ref:`bool<class_bool>` = false\ ) :ref:`๐Ÿ”—<class_EditorProperty_method_emit_changed>`
  304. If one or several properties have changed, this must be called. ``field`` is used in case your editor can modify fields separately (as an example, Vector3.x). The ``changing`` argument avoids the editor requesting this property to be refreshed (leave as ``false`` if unsure).
  305. .. rst-class:: classref-item-separator
  306. ----
  307. .. _class_EditorProperty_method_get_edited_object:
  308. .. rst-class:: classref-method
  309. :ref:`Object<class_Object>` **get_edited_object**\ (\ ) :ref:`๐Ÿ”—<class_EditorProperty_method_get_edited_object>`
  310. Returns the edited object.
  311. \ **Note:** This method could return ``null`` if the editor has not yet been associated with a property. However, in :ref:`_update_property()<class_EditorProperty_private_method__update_property>` and :ref:`_set_read_only()<class_EditorProperty_private_method__set_read_only>`, this value is *guaranteed* to be non-``null``.
  312. .. rst-class:: classref-item-separator
  313. ----
  314. .. _class_EditorProperty_method_get_edited_property:
  315. .. rst-class:: classref-method
  316. :ref:`StringName<class_StringName>` **get_edited_property**\ (\ ) |const| :ref:`๐Ÿ”—<class_EditorProperty_method_get_edited_property>`
  317. Returns the edited property. If your editor is for a single property (added via :ref:`EditorInspectorPlugin._parse_property()<class_EditorInspectorPlugin_private_method__parse_property>`), then this will return the property.
  318. \ **Note:** This method could return ``null`` if the editor has not yet been associated with a property. However, in :ref:`_update_property()<class_EditorProperty_private_method__update_property>` and :ref:`_set_read_only()<class_EditorProperty_private_method__set_read_only>`, this value is *guaranteed* to be non-``null``.
  319. .. rst-class:: classref-item-separator
  320. ----
  321. .. _class_EditorProperty_method_is_selected:
  322. .. rst-class:: classref-method
  323. :ref:`bool<class_bool>` **is_selected**\ (\ ) |const| :ref:`๐Ÿ”—<class_EditorProperty_method_is_selected>`
  324. Returns ``true`` if property is drawn as selected. Used by the inspector.
  325. .. rst-class:: classref-item-separator
  326. ----
  327. .. _class_EditorProperty_method_select:
  328. .. rst-class:: classref-method
  329. |void| **select**\ (\ focusable\: :ref:`int<class_int>` = -1\ ) :ref:`๐Ÿ”—<class_EditorProperty_method_select>`
  330. Draw property as selected. Used by the inspector.
  331. .. rst-class:: classref-item-separator
  332. ----
  333. .. _class_EditorProperty_method_set_bottom_editor:
  334. .. rst-class:: classref-method
  335. |void| **set_bottom_editor**\ (\ editor\: :ref:`Control<class_Control>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_method_set_bottom_editor>`
  336. Puts the ``editor`` control below the property label. The control must be previously added using :ref:`Node.add_child()<class_Node_method_add_child>`.
  337. .. rst-class:: classref-item-separator
  338. ----
  339. .. _class_EditorProperty_method_set_label_reference:
  340. .. rst-class:: classref-method
  341. |void| **set_label_reference**\ (\ control\: :ref:`Control<class_Control>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_method_set_label_reference>`
  342. Used by the inspector, set to a control that will be used as a reference to calculate the size of the label.
  343. .. rst-class:: classref-item-separator
  344. ----
  345. .. _class_EditorProperty_method_set_object_and_property:
  346. .. rst-class:: classref-method
  347. |void| **set_object_and_property**\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_EditorProperty_method_set_object_and_property>`
  348. Assigns object and property to edit.
  349. .. rst-class:: classref-item-separator
  350. ----
  351. .. _class_EditorProperty_method_update_property:
  352. .. rst-class:: classref-method
  353. |void| **update_property**\ (\ ) :ref:`๐Ÿ”—<class_EditorProperty_method_update_property>`
  354. Forces a refresh of the property display.
  355. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  356. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  357. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  358. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  359. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  360. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  361. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  362. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  363. .. |void| replace:: :abbr:`void (No return value.)`