class_graphnode.rst 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138
  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/4.0/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/GraphNode.xml.
  6. .. _class_GraphNode:
  7. GraphNode
  8. =========
  9. **Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A container with connection ports, representing a node in a :ref:`GraphEdit<class_GraphEdit>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **GraphNode** allows to create nodes for a :ref:`GraphEdit<class_GraphEdit>` graph with customizable content based on its child controls. **GraphNode** is derived from :ref:`Container<class_Container>` and it is responsible for placing its children on screen. This works similar to :ref:`VBoxContainer<class_VBoxContainer>`. Children, in turn, provide **GraphNode** with so-called slots, each of which can have a connection port on either side.
  15. Each **GraphNode** slot is defined by its index and can provide the node with up to two ports: one on the left, and one on the right. By convention the left port is also referred to as the **input port** and the right port is referred to as the **output port**. Each port can be enabled and configured individually, using different type and color. The type is an arbitrary value that you can define using your own considerations. The parent :ref:`GraphEdit<class_GraphEdit>` will receive this information on each connect and disconnect request.
  16. Slots can be configured in the Inspector dock once you add at least one child :ref:`Control<class_Control>`. The properties are grouped by each slot's index in the "Slot" section.
  17. \ **Note:** While GraphNode is set up using slots and slot indices, connections are made between the ports which are enabled. Because of that, :ref:`GraphEdit<class_GraphEdit>` uses the port's index and not the slot's index. You can use :ref:`get_connection_input_slot<class_GraphNode_method_get_connection_input_slot>` and :ref:`get_connection_output_slot<class_GraphNode_method_get_connection_output_slot>` to get the slot index from the port index.
  18. .. rst-class:: classref-reftable-group
  19. Properties
  20. ----------
  21. .. table::
  22. :widths: auto
  23. +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+
  24. | :ref:`bool<class_bool>` | :ref:`comment<class_GraphNode_property_comment>` | ``false`` |
  25. +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+
  26. | :ref:`bool<class_bool>` | :ref:`draggable<class_GraphNode_property_draggable>` | ``true`` |
  27. +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+
  28. | :ref:`String<class_String>` | :ref:`language<class_GraphNode_property_language>` | ``""`` |
  29. +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+
  30. | :ref:`MouseFilter<enum_Control_MouseFilter>` | mouse_filter | ``0`` (overrides :ref:`Control<class_Control_property_mouse_filter>`) |
  31. +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+
  32. | :ref:`Overlay<enum_GraphNode_Overlay>` | :ref:`overlay<class_GraphNode_property_overlay>` | ``0`` |
  33. +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+
  34. | :ref:`Vector2<class_Vector2>` | :ref:`position_offset<class_GraphNode_property_position_offset>` | ``Vector2(0, 0)`` |
  35. +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+
  36. | :ref:`bool<class_bool>` | :ref:`resizable<class_GraphNode_property_resizable>` | ``false`` |
  37. +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+
  38. | :ref:`bool<class_bool>` | :ref:`selectable<class_GraphNode_property_selectable>` | ``true`` |
  39. +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+
  40. | :ref:`bool<class_bool>` | :ref:`selected<class_GraphNode_property_selected>` | ``false`` |
  41. +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+
  42. | :ref:`bool<class_bool>` | :ref:`show_close<class_GraphNode_property_show_close>` | ``false`` |
  43. +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+
  44. | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`text_direction<class_GraphNode_property_text_direction>` | ``0`` |
  45. +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+
  46. | :ref:`String<class_String>` | :ref:`title<class_GraphNode_property_title>` | ``""`` |
  47. +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+
  48. .. rst-class:: classref-reftable-group
  49. Methods
  50. -------
  51. .. table::
  52. :widths: auto
  53. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | void | :ref:`clear_all_slots<class_GraphNode_method_clear_all_slots>` **(** **)** |
  55. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | void | :ref:`clear_slot<class_GraphNode_method_clear_slot>` **(** :ref:`int<class_int>` slot_index **)** |
  57. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`Color<class_Color>` | :ref:`get_connection_input_color<class_GraphNode_method_get_connection_input_color>` **(** :ref:`int<class_int>` port **)** |
  59. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`int<class_int>` | :ref:`get_connection_input_count<class_GraphNode_method_get_connection_input_count>` **(** **)** |
  61. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`int<class_int>` | :ref:`get_connection_input_height<class_GraphNode_method_get_connection_input_height>` **(** :ref:`int<class_int>` port **)** |
  63. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`Vector2<class_Vector2>` | :ref:`get_connection_input_position<class_GraphNode_method_get_connection_input_position>` **(** :ref:`int<class_int>` port **)** |
  65. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`int<class_int>` | :ref:`get_connection_input_slot<class_GraphNode_method_get_connection_input_slot>` **(** :ref:`int<class_int>` port **)** |
  67. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`int<class_int>` | :ref:`get_connection_input_type<class_GraphNode_method_get_connection_input_type>` **(** :ref:`int<class_int>` port **)** |
  69. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`Color<class_Color>` | :ref:`get_connection_output_color<class_GraphNode_method_get_connection_output_color>` **(** :ref:`int<class_int>` port **)** |
  71. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`int<class_int>` | :ref:`get_connection_output_count<class_GraphNode_method_get_connection_output_count>` **(** **)** |
  73. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`int<class_int>` | :ref:`get_connection_output_height<class_GraphNode_method_get_connection_output_height>` **(** :ref:`int<class_int>` port **)** |
  75. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`Vector2<class_Vector2>` | :ref:`get_connection_output_position<class_GraphNode_method_get_connection_output_position>` **(** :ref:`int<class_int>` port **)** |
  77. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`int<class_int>` | :ref:`get_connection_output_slot<class_GraphNode_method_get_connection_output_slot>` **(** :ref:`int<class_int>` port **)** |
  79. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`int<class_int>` | :ref:`get_connection_output_type<class_GraphNode_method_get_connection_output_type>` **(** :ref:`int<class_int>` port **)** |
  81. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`Color<class_Color>` | :ref:`get_slot_color_left<class_GraphNode_method_get_slot_color_left>` **(** :ref:`int<class_int>` slot_index **)** |const| |
  83. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`Color<class_Color>` | :ref:`get_slot_color_right<class_GraphNode_method_get_slot_color_right>` **(** :ref:`int<class_int>` slot_index **)** |const| |
  85. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`int<class_int>` | :ref:`get_slot_type_left<class_GraphNode_method_get_slot_type_left>` **(** :ref:`int<class_int>` slot_index **)** |const| |
  87. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`int<class_int>` | :ref:`get_slot_type_right<class_GraphNode_method_get_slot_type_right>` **(** :ref:`int<class_int>` slot_index **)** |const| |
  89. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`bool<class_bool>` | :ref:`is_slot_draw_stylebox<class_GraphNode_method_is_slot_draw_stylebox>` **(** :ref:`int<class_int>` slot_index **)** |const| |
  91. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`bool<class_bool>` | :ref:`is_slot_enabled_left<class_GraphNode_method_is_slot_enabled_left>` **(** :ref:`int<class_int>` slot_index **)** |const| |
  93. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`bool<class_bool>` | :ref:`is_slot_enabled_right<class_GraphNode_method_is_slot_enabled_right>` **(** :ref:`int<class_int>` slot_index **)** |const| |
  95. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | void | :ref:`set_slot<class_GraphNode_method_set_slot>` **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable_left_port, :ref:`int<class_int>` type_left, :ref:`Color<class_Color>` color_left, :ref:`bool<class_bool>` enable_right_port, :ref:`int<class_int>` type_right, :ref:`Color<class_Color>` color_right, :ref:`Texture2D<class_Texture2D>` custom_icon_left=null, :ref:`Texture2D<class_Texture2D>` custom_icon_right=null, :ref:`bool<class_bool>` draw_stylebox=true **)** |
  97. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | void | :ref:`set_slot_color_left<class_GraphNode_method_set_slot_color_left>` **(** :ref:`int<class_int>` slot_index, :ref:`Color<class_Color>` color **)** |
  99. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | void | :ref:`set_slot_color_right<class_GraphNode_method_set_slot_color_right>` **(** :ref:`int<class_int>` slot_index, :ref:`Color<class_Color>` color **)** |
  101. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | void | :ref:`set_slot_draw_stylebox<class_GraphNode_method_set_slot_draw_stylebox>` **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable **)** |
  103. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | void | :ref:`set_slot_enabled_left<class_GraphNode_method_set_slot_enabled_left>` **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable **)** |
  105. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | void | :ref:`set_slot_enabled_right<class_GraphNode_method_set_slot_enabled_right>` **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable **)** |
  107. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | void | :ref:`set_slot_type_left<class_GraphNode_method_set_slot_type_left>` **(** :ref:`int<class_int>` slot_index, :ref:`int<class_int>` type **)** |
  109. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | void | :ref:`set_slot_type_right<class_GraphNode_method_set_slot_type_right>` **(** :ref:`int<class_int>` slot_index, :ref:`int<class_int>` type **)** |
  111. +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. .. rst-class:: classref-reftable-group
  113. Theme Properties
  114. ----------------
  115. .. table::
  116. :widths: auto
  117. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  118. | :ref:`Color<class_Color>` | :ref:`close_color<class_GraphNode_theme_color_close_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
  119. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  120. | :ref:`Color<class_Color>` | :ref:`resizer_color<class_GraphNode_theme_color_resizer_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
  121. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  122. | :ref:`Color<class_Color>` | :ref:`title_color<class_GraphNode_theme_color_title_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
  123. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  124. | :ref:`int<class_int>` | :ref:`close_h_offset<class_GraphNode_theme_constant_close_h_offset>` | ``12`` |
  125. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  126. | :ref:`int<class_int>` | :ref:`close_offset<class_GraphNode_theme_constant_close_offset>` | ``22`` |
  127. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  128. | :ref:`int<class_int>` | :ref:`port_offset<class_GraphNode_theme_constant_port_offset>` | ``0`` |
  129. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  130. | :ref:`int<class_int>` | :ref:`separation<class_GraphNode_theme_constant_separation>` | ``2`` |
  131. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  132. | :ref:`int<class_int>` | :ref:`title_h_offset<class_GraphNode_theme_constant_title_h_offset>` | ``0`` |
  133. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  134. | :ref:`int<class_int>` | :ref:`title_offset<class_GraphNode_theme_constant_title_offset>` | ``26`` |
  135. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  136. | :ref:`Font<class_Font>` | :ref:`title_font<class_GraphNode_theme_font_title_font>` | |
  137. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  138. | :ref:`Texture2D<class_Texture2D>` | :ref:`close<class_GraphNode_theme_icon_close>` | |
  139. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  140. | :ref:`Texture2D<class_Texture2D>` | :ref:`port<class_GraphNode_theme_icon_port>` | |
  141. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  142. | :ref:`Texture2D<class_Texture2D>` | :ref:`resizer<class_GraphNode_theme_icon_resizer>` | |
  143. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  144. | :ref:`StyleBox<class_StyleBox>` | :ref:`breakpoint<class_GraphNode_theme_style_breakpoint>` | |
  145. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  146. | :ref:`StyleBox<class_StyleBox>` | :ref:`comment<class_GraphNode_theme_style_comment>` | |
  147. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  148. | :ref:`StyleBox<class_StyleBox>` | :ref:`comment_focus<class_GraphNode_theme_style_comment_focus>` | |
  149. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  150. | :ref:`StyleBox<class_StyleBox>` | :ref:`frame<class_GraphNode_theme_style_frame>` | |
  151. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  152. | :ref:`StyleBox<class_StyleBox>` | :ref:`position<class_GraphNode_theme_style_position>` | |
  153. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  154. | :ref:`StyleBox<class_StyleBox>` | :ref:`selected_frame<class_GraphNode_theme_style_selected_frame>` | |
  155. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  156. | :ref:`StyleBox<class_StyleBox>` | :ref:`slot<class_GraphNode_theme_style_slot>` | |
  157. +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+
  158. .. rst-class:: classref-section-separator
  159. ----
  160. .. rst-class:: classref-descriptions-group
  161. Signals
  162. -------
  163. .. _class_GraphNode_signal_close_request:
  164. .. rst-class:: classref-signal
  165. **close_request** **(** **)**
  166. Emitted when the GraphNode is requested to be closed. Happens on clicking the close button (see :ref:`show_close<class_GraphNode_property_show_close>`).
  167. .. rst-class:: classref-item-separator
  168. ----
  169. .. _class_GraphNode_signal_dragged:
  170. .. rst-class:: classref-signal
  171. **dragged** **(** :ref:`Vector2<class_Vector2>` from, :ref:`Vector2<class_Vector2>` to **)**
  172. Emitted when the GraphNode is dragged.
  173. .. rst-class:: classref-item-separator
  174. ----
  175. .. _class_GraphNode_signal_node_deselected:
  176. .. rst-class:: classref-signal
  177. **node_deselected** **(** **)**
  178. Emitted when the GraphNode is deselected.
  179. .. rst-class:: classref-item-separator
  180. ----
  181. .. _class_GraphNode_signal_node_selected:
  182. .. rst-class:: classref-signal
  183. **node_selected** **(** **)**
  184. Emitted when the GraphNode is selected.
  185. .. rst-class:: classref-item-separator
  186. ----
  187. .. _class_GraphNode_signal_position_offset_changed:
  188. .. rst-class:: classref-signal
  189. **position_offset_changed** **(** **)**
  190. Emitted when the GraphNode is moved.
  191. .. rst-class:: classref-item-separator
  192. ----
  193. .. _class_GraphNode_signal_raise_request:
  194. .. rst-class:: classref-signal
  195. **raise_request** **(** **)**
  196. Emitted when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode.
  197. .. rst-class:: classref-item-separator
  198. ----
  199. .. _class_GraphNode_signal_resize_request:
  200. .. rst-class:: classref-signal
  201. **resize_request** **(** :ref:`Vector2<class_Vector2>` new_minsize **)**
  202. Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see :ref:`resizable<class_GraphNode_property_resizable>`).
  203. .. rst-class:: classref-item-separator
  204. ----
  205. .. _class_GraphNode_signal_slot_updated:
  206. .. rst-class:: classref-signal
  207. **slot_updated** **(** :ref:`int<class_int>` idx **)**
  208. Emitted when any GraphNode's slot is updated.
  209. .. rst-class:: classref-section-separator
  210. ----
  211. .. rst-class:: classref-descriptions-group
  212. Enumerations
  213. ------------
  214. .. _enum_GraphNode_Overlay:
  215. .. rst-class:: classref-enumeration
  216. enum **Overlay**:
  217. .. _class_GraphNode_constant_OVERLAY_DISABLED:
  218. .. rst-class:: classref-enumeration-constant
  219. :ref:`Overlay<enum_GraphNode_Overlay>` **OVERLAY_DISABLED** = ``0``
  220. No overlay is shown.
  221. .. _class_GraphNode_constant_OVERLAY_BREAKPOINT:
  222. .. rst-class:: classref-enumeration-constant
  223. :ref:`Overlay<enum_GraphNode_Overlay>` **OVERLAY_BREAKPOINT** = ``1``
  224. Show overlay set in the :ref:`breakpoint<class_GraphNode_theme_style_breakpoint>` theme property.
  225. .. _class_GraphNode_constant_OVERLAY_POSITION:
  226. .. rst-class:: classref-enumeration-constant
  227. :ref:`Overlay<enum_GraphNode_Overlay>` **OVERLAY_POSITION** = ``2``
  228. Show overlay set in the :ref:`position<class_GraphNode_theme_style_position>` theme property.
  229. .. rst-class:: classref-section-separator
  230. ----
  231. .. rst-class:: classref-descriptions-group
  232. Property Descriptions
  233. ---------------------
  234. .. _class_GraphNode_property_comment:
  235. .. rst-class:: classref-property
  236. :ref:`bool<class_bool>` **comment** = ``false``
  237. .. rst-class:: classref-property-setget
  238. - void **set_comment** **(** :ref:`bool<class_bool>` value **)**
  239. - :ref:`bool<class_bool>` **is_comment** **(** **)**
  240. If ``true``, the GraphNode is a comment node.
  241. .. rst-class:: classref-item-separator
  242. ----
  243. .. _class_GraphNode_property_draggable:
  244. .. rst-class:: classref-property
  245. :ref:`bool<class_bool>` **draggable** = ``true``
  246. .. rst-class:: classref-property-setget
  247. - void **set_draggable** **(** :ref:`bool<class_bool>` value **)**
  248. - :ref:`bool<class_bool>` **is_draggable** **(** **)**
  249. If ``true``, the user can drag the GraphNode.
  250. .. rst-class:: classref-item-separator
  251. ----
  252. .. _class_GraphNode_property_language:
  253. .. rst-class:: classref-property
  254. :ref:`String<class_String>` **language** = ``""``
  255. .. rst-class:: classref-property-setget
  256. - void **set_language** **(** :ref:`String<class_String>` value **)**
  257. - :ref:`String<class_String>` **get_language** **(** **)**
  258. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  259. .. rst-class:: classref-item-separator
  260. ----
  261. .. _class_GraphNode_property_overlay:
  262. .. rst-class:: classref-property
  263. :ref:`Overlay<enum_GraphNode_Overlay>` **overlay** = ``0``
  264. .. rst-class:: classref-property-setget
  265. - void **set_overlay** **(** :ref:`Overlay<enum_GraphNode_Overlay>` value **)**
  266. - :ref:`Overlay<enum_GraphNode_Overlay>` **get_overlay** **(** **)**
  267. Sets the overlay shown above the GraphNode. See :ref:`Overlay<enum_GraphNode_Overlay>`.
  268. .. rst-class:: classref-item-separator
  269. ----
  270. .. _class_GraphNode_property_position_offset:
  271. .. rst-class:: classref-property
  272. :ref:`Vector2<class_Vector2>` **position_offset** = ``Vector2(0, 0)``
  273. .. rst-class:: classref-property-setget
  274. - void **set_position_offset** **(** :ref:`Vector2<class_Vector2>` value **)**
  275. - :ref:`Vector2<class_Vector2>` **get_position_offset** **(** **)**
  276. The offset of the GraphNode, relative to the scroll offset of the :ref:`GraphEdit<class_GraphEdit>`.
  277. \ **Note:** You cannot use position offset directly, as :ref:`GraphEdit<class_GraphEdit>` is a :ref:`Container<class_Container>`.
  278. .. rst-class:: classref-item-separator
  279. ----
  280. .. _class_GraphNode_property_resizable:
  281. .. rst-class:: classref-property
  282. :ref:`bool<class_bool>` **resizable** = ``false``
  283. .. rst-class:: classref-property-setget
  284. - void **set_resizable** **(** :ref:`bool<class_bool>` value **)**
  285. - :ref:`bool<class_bool>` **is_resizable** **(** **)**
  286. If ``true``, the user can resize the GraphNode.
  287. \ **Note:** Dragging the handle will only emit the :ref:`resize_request<class_GraphNode_signal_resize_request>` signal, the GraphNode needs to be resized manually.
  288. .. rst-class:: classref-item-separator
  289. ----
  290. .. _class_GraphNode_property_selectable:
  291. .. rst-class:: classref-property
  292. :ref:`bool<class_bool>` **selectable** = ``true``
  293. .. rst-class:: classref-property-setget
  294. - void **set_selectable** **(** :ref:`bool<class_bool>` value **)**
  295. - :ref:`bool<class_bool>` **is_selectable** **(** **)**
  296. If ``true``, the user can select the GraphNode.
  297. .. rst-class:: classref-item-separator
  298. ----
  299. .. _class_GraphNode_property_selected:
  300. .. rst-class:: classref-property
  301. :ref:`bool<class_bool>` **selected** = ``false``
  302. .. rst-class:: classref-property-setget
  303. - void **set_selected** **(** :ref:`bool<class_bool>` value **)**
  304. - :ref:`bool<class_bool>` **is_selected** **(** **)**
  305. If ``true``, the GraphNode is selected.
  306. .. rst-class:: classref-item-separator
  307. ----
  308. .. _class_GraphNode_property_show_close:
  309. .. rst-class:: classref-property
  310. :ref:`bool<class_bool>` **show_close** = ``false``
  311. .. rst-class:: classref-property-setget
  312. - void **set_show_close_button** **(** :ref:`bool<class_bool>` value **)**
  313. - :ref:`bool<class_bool>` **is_close_button_visible** **(** **)**
  314. If ``true``, the close button will be visible.
  315. \ **Note:** Pressing it will only emit the :ref:`close_request<class_GraphNode_signal_close_request>` signal, the GraphNode needs to be removed manually.
  316. .. rst-class:: classref-item-separator
  317. ----
  318. .. _class_GraphNode_property_text_direction:
  319. .. rst-class:: classref-property
  320. :ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0``
  321. .. rst-class:: classref-property-setget
  322. - void **set_text_direction** **(** :ref:`TextDirection<enum_Control_TextDirection>` value **)**
  323. - :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction** **(** **)**
  324. Base text writing direction.
  325. .. rst-class:: classref-item-separator
  326. ----
  327. .. _class_GraphNode_property_title:
  328. .. rst-class:: classref-property
  329. :ref:`String<class_String>` **title** = ``""``
  330. .. rst-class:: classref-property-setget
  331. - void **set_title** **(** :ref:`String<class_String>` value **)**
  332. - :ref:`String<class_String>` **get_title** **(** **)**
  333. The text displayed in the GraphNode's title bar.
  334. .. rst-class:: classref-section-separator
  335. ----
  336. .. rst-class:: classref-descriptions-group
  337. Method Descriptions
  338. -------------------
  339. .. _class_GraphNode_method_clear_all_slots:
  340. .. rst-class:: classref-method
  341. void **clear_all_slots** **(** **)**
  342. Disables all input and output slots of the GraphNode.
  343. .. rst-class:: classref-item-separator
  344. ----
  345. .. _class_GraphNode_method_clear_slot:
  346. .. rst-class:: classref-method
  347. void **clear_slot** **(** :ref:`int<class_int>` slot_index **)**
  348. Disables input and output slot whose index is ``slot_index``.
  349. .. rst-class:: classref-item-separator
  350. ----
  351. .. _class_GraphNode_method_get_connection_input_color:
  352. .. rst-class:: classref-method
  353. :ref:`Color<class_Color>` **get_connection_input_color** **(** :ref:`int<class_int>` port **)**
  354. Returns the :ref:`Color<class_Color>` of the input connection ``port``.
  355. .. rst-class:: classref-item-separator
  356. ----
  357. .. _class_GraphNode_method_get_connection_input_count:
  358. .. rst-class:: classref-method
  359. :ref:`int<class_int>` **get_connection_input_count** **(** **)**
  360. Returns the number of enabled input slots (connections) to the GraphNode.
  361. .. rst-class:: classref-item-separator
  362. ----
  363. .. _class_GraphNode_method_get_connection_input_height:
  364. .. rst-class:: classref-method
  365. :ref:`int<class_int>` **get_connection_input_height** **(** :ref:`int<class_int>` port **)**
  366. Returns the height of the input connection ``port``.
  367. .. rst-class:: classref-item-separator
  368. ----
  369. .. _class_GraphNode_method_get_connection_input_position:
  370. .. rst-class:: classref-method
  371. :ref:`Vector2<class_Vector2>` **get_connection_input_position** **(** :ref:`int<class_int>` port **)**
  372. Returns the position of the input connection ``port``.
  373. .. rst-class:: classref-item-separator
  374. ----
  375. .. _class_GraphNode_method_get_connection_input_slot:
  376. .. rst-class:: classref-method
  377. :ref:`int<class_int>` **get_connection_input_slot** **(** :ref:`int<class_int>` port **)**
  378. Returns the corresponding slot index of the input connection ``port``.
  379. .. rst-class:: classref-item-separator
  380. ----
  381. .. _class_GraphNode_method_get_connection_input_type:
  382. .. rst-class:: classref-method
  383. :ref:`int<class_int>` **get_connection_input_type** **(** :ref:`int<class_int>` port **)**
  384. Returns the type of the input connection ``port``.
  385. .. rst-class:: classref-item-separator
  386. ----
  387. .. _class_GraphNode_method_get_connection_output_color:
  388. .. rst-class:: classref-method
  389. :ref:`Color<class_Color>` **get_connection_output_color** **(** :ref:`int<class_int>` port **)**
  390. Returns the :ref:`Color<class_Color>` of the output connection ``port``.
  391. .. rst-class:: classref-item-separator
  392. ----
  393. .. _class_GraphNode_method_get_connection_output_count:
  394. .. rst-class:: classref-method
  395. :ref:`int<class_int>` **get_connection_output_count** **(** **)**
  396. Returns the number of enabled output slots (connections) of the GraphNode.
  397. .. rst-class:: classref-item-separator
  398. ----
  399. .. _class_GraphNode_method_get_connection_output_height:
  400. .. rst-class:: classref-method
  401. :ref:`int<class_int>` **get_connection_output_height** **(** :ref:`int<class_int>` port **)**
  402. Returns the height of the output connection ``port``.
  403. .. rst-class:: classref-item-separator
  404. ----
  405. .. _class_GraphNode_method_get_connection_output_position:
  406. .. rst-class:: classref-method
  407. :ref:`Vector2<class_Vector2>` **get_connection_output_position** **(** :ref:`int<class_int>` port **)**
  408. Returns the position of the output connection ``port``.
  409. .. rst-class:: classref-item-separator
  410. ----
  411. .. _class_GraphNode_method_get_connection_output_slot:
  412. .. rst-class:: classref-method
  413. :ref:`int<class_int>` **get_connection_output_slot** **(** :ref:`int<class_int>` port **)**
  414. Returns the corresponding slot index of the output connection ``port``.
  415. .. rst-class:: classref-item-separator
  416. ----
  417. .. _class_GraphNode_method_get_connection_output_type:
  418. .. rst-class:: classref-method
  419. :ref:`int<class_int>` **get_connection_output_type** **(** :ref:`int<class_int>` port **)**
  420. Returns the type of the output connection ``port``.
  421. .. rst-class:: classref-item-separator
  422. ----
  423. .. _class_GraphNode_method_get_slot_color_left:
  424. .. rst-class:: classref-method
  425. :ref:`Color<class_Color>` **get_slot_color_left** **(** :ref:`int<class_int>` slot_index **)** |const|
  426. Returns the left (input) :ref:`Color<class_Color>` of the slot ``slot_index``.
  427. .. rst-class:: classref-item-separator
  428. ----
  429. .. _class_GraphNode_method_get_slot_color_right:
  430. .. rst-class:: classref-method
  431. :ref:`Color<class_Color>` **get_slot_color_right** **(** :ref:`int<class_int>` slot_index **)** |const|
  432. Returns the right (output) :ref:`Color<class_Color>` of the slot ``slot_index``.
  433. .. rst-class:: classref-item-separator
  434. ----
  435. .. _class_GraphNode_method_get_slot_type_left:
  436. .. rst-class:: classref-method
  437. :ref:`int<class_int>` **get_slot_type_left** **(** :ref:`int<class_int>` slot_index **)** |const|
  438. Returns the left (input) type of the slot ``slot_index``.
  439. .. rst-class:: classref-item-separator
  440. ----
  441. .. _class_GraphNode_method_get_slot_type_right:
  442. .. rst-class:: classref-method
  443. :ref:`int<class_int>` **get_slot_type_right** **(** :ref:`int<class_int>` slot_index **)** |const|
  444. Returns the right (output) type of the slot ``slot_index``.
  445. .. rst-class:: classref-item-separator
  446. ----
  447. .. _class_GraphNode_method_is_slot_draw_stylebox:
  448. .. rst-class:: classref-method
  449. :ref:`bool<class_bool>` **is_slot_draw_stylebox** **(** :ref:`int<class_int>` slot_index **)** |const|
  450. Returns true if the background :ref:`StyleBox<class_StyleBox>` of the slot ``slot_index`` is drawn.
  451. .. rst-class:: classref-item-separator
  452. ----
  453. .. _class_GraphNode_method_is_slot_enabled_left:
  454. .. rst-class:: classref-method
  455. :ref:`bool<class_bool>` **is_slot_enabled_left** **(** :ref:`int<class_int>` slot_index **)** |const|
  456. Returns ``true`` if left (input) side of the slot ``slot_index`` is enabled.
  457. .. rst-class:: classref-item-separator
  458. ----
  459. .. _class_GraphNode_method_is_slot_enabled_right:
  460. .. rst-class:: classref-method
  461. :ref:`bool<class_bool>` **is_slot_enabled_right** **(** :ref:`int<class_int>` slot_index **)** |const|
  462. Returns ``true`` if right (output) side of the slot ``slot_index`` is enabled.
  463. .. rst-class:: classref-item-separator
  464. ----
  465. .. _class_GraphNode_method_set_slot:
  466. .. rst-class:: classref-method
  467. void **set_slot** **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable_left_port, :ref:`int<class_int>` type_left, :ref:`Color<class_Color>` color_left, :ref:`bool<class_bool>` enable_right_port, :ref:`int<class_int>` type_right, :ref:`Color<class_Color>` color_right, :ref:`Texture2D<class_Texture2D>` custom_icon_left=null, :ref:`Texture2D<class_Texture2D>` custom_icon_right=null, :ref:`bool<class_bool>` draw_stylebox=true **)**
  468. Sets properties of the slot with the ``slot_index`` index.
  469. If ``enable_left_port``/``enable_right_port`` is ``true``, a port will appear and the slot will be able to be connected from this side.
  470. With ``type_left``/``type_right`` an arbitrary type can be assigned to each port. Two ports can be connected if they share the same type, or if the connection between their types is allowed in the parent :ref:`GraphEdit<class_GraphEdit>` (see :ref:`GraphEdit.add_valid_connection_type<class_GraphEdit_method_add_valid_connection_type>`). Keep in mind that the :ref:`GraphEdit<class_GraphEdit>` has the final say in accepting the connection. Type compatibility simply allows the :ref:`GraphEdit.connection_request<class_GraphEdit_signal_connection_request>` signal to be emitted.
  471. Ports can be further customized using ``color_left``/``color_right`` and ``custom_icon_left``/``custom_icon_right``. The color parameter adds a tint to the icon. The custom icon can be used to override the default port dot.
  472. Additionally, ``draw_stylebox`` can be used to enable or disable drawing of the background stylebox for each slot. See :ref:`slot<class_GraphNode_theme_style_slot>`.
  473. Individual properties can also be set using one of the ``set_slot_*`` methods.
  474. \ **Note:** This method only sets properties of the slot. To create the slot itself, add a :ref:`Control<class_Control>`-derived child to the GraphNode.
  475. .. rst-class:: classref-item-separator
  476. ----
  477. .. _class_GraphNode_method_set_slot_color_left:
  478. .. rst-class:: classref-method
  479. void **set_slot_color_left** **(** :ref:`int<class_int>` slot_index, :ref:`Color<class_Color>` color **)**
  480. Sets the :ref:`Color<class_Color>` of the left (input) side of the slot ``slot_index`` to ``color``.
  481. .. rst-class:: classref-item-separator
  482. ----
  483. .. _class_GraphNode_method_set_slot_color_right:
  484. .. rst-class:: classref-method
  485. void **set_slot_color_right** **(** :ref:`int<class_int>` slot_index, :ref:`Color<class_Color>` color **)**
  486. Sets the :ref:`Color<class_Color>` of the right (output) side of the slot ``slot_index`` to ``color``.
  487. .. rst-class:: classref-item-separator
  488. ----
  489. .. _class_GraphNode_method_set_slot_draw_stylebox:
  490. .. rst-class:: classref-method
  491. void **set_slot_draw_stylebox** **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable **)**
  492. Toggles the background :ref:`StyleBox<class_StyleBox>` of the slot ``slot_index``.
  493. .. rst-class:: classref-item-separator
  494. ----
  495. .. _class_GraphNode_method_set_slot_enabled_left:
  496. .. rst-class:: classref-method
  497. void **set_slot_enabled_left** **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable **)**
  498. Toggles the left (input) side of the slot ``slot_index``. If ``enable`` is ``true``, a port will appear on the left side and the slot will be able to be connected from this side.
  499. .. rst-class:: classref-item-separator
  500. ----
  501. .. _class_GraphNode_method_set_slot_enabled_right:
  502. .. rst-class:: classref-method
  503. void **set_slot_enabled_right** **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable **)**
  504. Toggles the right (output) side of the slot ``slot_index``. If ``enable`` is ``true``, a port will appear on the right side and the slot will be able to be connected from this side.
  505. .. rst-class:: classref-item-separator
  506. ----
  507. .. _class_GraphNode_method_set_slot_type_left:
  508. .. rst-class:: classref-method
  509. void **set_slot_type_left** **(** :ref:`int<class_int>` slot_index, :ref:`int<class_int>` type **)**
  510. Sets the left (input) type of the slot ``slot_index`` to ``type``. If the value is negative, all connections will be disallowed to be created via user inputs.
  511. .. rst-class:: classref-item-separator
  512. ----
  513. .. _class_GraphNode_method_set_slot_type_right:
  514. .. rst-class:: classref-method
  515. void **set_slot_type_right** **(** :ref:`int<class_int>` slot_index, :ref:`int<class_int>` type **)**
  516. Sets the right (output) type of the slot ``slot_index`` to ``type``. If the value is negative, all connections will be disallowed to be created via user inputs.
  517. .. rst-class:: classref-section-separator
  518. ----
  519. .. rst-class:: classref-descriptions-group
  520. Theme Property Descriptions
  521. ---------------------------
  522. .. _class_GraphNode_theme_color_close_color:
  523. .. rst-class:: classref-themeproperty
  524. :ref:`Color<class_Color>` **close_color** = ``Color(0.875, 0.875, 0.875, 1)``
  525. The color modulation applied to the close button icon.
  526. .. rst-class:: classref-item-separator
  527. ----
  528. .. _class_GraphNode_theme_color_resizer_color:
  529. .. rst-class:: classref-themeproperty
  530. :ref:`Color<class_Color>` **resizer_color** = ``Color(0.875, 0.875, 0.875, 1)``
  531. The color modulation applied to the resizer icon.
  532. .. rst-class:: classref-item-separator
  533. ----
  534. .. _class_GraphNode_theme_color_title_color:
  535. .. rst-class:: classref-themeproperty
  536. :ref:`Color<class_Color>` **title_color** = ``Color(0.875, 0.875, 0.875, 1)``
  537. Color of the title text.
  538. .. rst-class:: classref-item-separator
  539. ----
  540. .. _class_GraphNode_theme_constant_close_h_offset:
  541. .. rst-class:: classref-themeproperty
  542. :ref:`int<class_int>` **close_h_offset** = ``12``
  543. .. container:: contribute
  544. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  545. .. rst-class:: classref-item-separator
  546. ----
  547. .. _class_GraphNode_theme_constant_close_offset:
  548. .. rst-class:: classref-themeproperty
  549. :ref:`int<class_int>` **close_offset** = ``22``
  550. The vertical offset of the close button.
  551. .. rst-class:: classref-item-separator
  552. ----
  553. .. _class_GraphNode_theme_constant_port_offset:
  554. .. rst-class:: classref-themeproperty
  555. :ref:`int<class_int>` **port_offset** = ``0``
  556. Horizontal offset for the ports.
  557. .. rst-class:: classref-item-separator
  558. ----
  559. .. _class_GraphNode_theme_constant_separation:
  560. .. rst-class:: classref-themeproperty
  561. :ref:`int<class_int>` **separation** = ``2``
  562. The vertical distance between ports.
  563. .. rst-class:: classref-item-separator
  564. ----
  565. .. _class_GraphNode_theme_constant_title_h_offset:
  566. .. rst-class:: classref-themeproperty
  567. :ref:`int<class_int>` **title_h_offset** = ``0``
  568. Horizontal offset of the title text.
  569. .. rst-class:: classref-item-separator
  570. ----
  571. .. _class_GraphNode_theme_constant_title_offset:
  572. .. rst-class:: classref-themeproperty
  573. :ref:`int<class_int>` **title_offset** = ``26``
  574. Vertical offset of the title text.
  575. .. rst-class:: classref-item-separator
  576. ----
  577. .. _class_GraphNode_theme_font_title_font:
  578. .. rst-class:: classref-themeproperty
  579. :ref:`Font<class_Font>` **title_font**
  580. Font used for the title text.
  581. .. rst-class:: classref-item-separator
  582. ----
  583. .. _class_GraphNode_theme_icon_close:
  584. .. rst-class:: classref-themeproperty
  585. :ref:`Texture2D<class_Texture2D>` **close**
  586. The icon for the close button, visible when :ref:`show_close<class_GraphNode_property_show_close>` is enabled.
  587. .. rst-class:: classref-item-separator
  588. ----
  589. .. _class_GraphNode_theme_icon_port:
  590. .. rst-class:: classref-themeproperty
  591. :ref:`Texture2D<class_Texture2D>` **port**
  592. The icon used for representing ports.
  593. .. rst-class:: classref-item-separator
  594. ----
  595. .. _class_GraphNode_theme_icon_resizer:
  596. .. rst-class:: classref-themeproperty
  597. :ref:`Texture2D<class_Texture2D>` **resizer**
  598. The icon used for resizer, visible when :ref:`resizable<class_GraphNode_property_resizable>` is enabled.
  599. .. rst-class:: classref-item-separator
  600. ----
  601. .. _class_GraphNode_theme_style_breakpoint:
  602. .. rst-class:: classref-themeproperty
  603. :ref:`StyleBox<class_StyleBox>` **breakpoint**
  604. The background used when :ref:`overlay<class_GraphNode_property_overlay>` is set to :ref:`OVERLAY_BREAKPOINT<class_GraphNode_constant_OVERLAY_BREAKPOINT>`.
  605. .. rst-class:: classref-item-separator
  606. ----
  607. .. _class_GraphNode_theme_style_comment:
  608. .. rst-class:: classref-themeproperty
  609. :ref:`StyleBox<class_StyleBox>` **comment**
  610. The :ref:`StyleBox<class_StyleBox>` used when :ref:`comment<class_GraphNode_property_comment>` is enabled.
  611. .. rst-class:: classref-item-separator
  612. ----
  613. .. _class_GraphNode_theme_style_comment_focus:
  614. .. rst-class:: classref-themeproperty
  615. :ref:`StyleBox<class_StyleBox>` **comment_focus**
  616. The :ref:`StyleBox<class_StyleBox>` used when :ref:`comment<class_GraphNode_property_comment>` is enabled and the **GraphNode** is focused.
  617. .. rst-class:: classref-item-separator
  618. ----
  619. .. _class_GraphNode_theme_style_frame:
  620. .. rst-class:: classref-themeproperty
  621. :ref:`StyleBox<class_StyleBox>` **frame**
  622. The default background for **GraphNode**.
  623. .. rst-class:: classref-item-separator
  624. ----
  625. .. _class_GraphNode_theme_style_position:
  626. .. rst-class:: classref-themeproperty
  627. :ref:`StyleBox<class_StyleBox>` **position**
  628. The background used when :ref:`overlay<class_GraphNode_property_overlay>` is set to :ref:`OVERLAY_POSITION<class_GraphNode_constant_OVERLAY_POSITION>`.
  629. .. rst-class:: classref-item-separator
  630. ----
  631. .. _class_GraphNode_theme_style_selected_frame:
  632. .. rst-class:: classref-themeproperty
  633. :ref:`StyleBox<class_StyleBox>` **selected_frame**
  634. The background used when the **GraphNode** is selected.
  635. .. rst-class:: classref-item-separator
  636. ----
  637. .. _class_GraphNode_theme_style_slot:
  638. .. rst-class:: classref-themeproperty
  639. :ref:`StyleBox<class_StyleBox>` **slot**
  640. The :ref:`StyleBox<class_StyleBox>` used for each slot of the **GraphNode**.
  641. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  642. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  643. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  644. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  645. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  646. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`