class_graphnode.rst 68 KB

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