GraphNode.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="GraphNode" inherits="Container" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.
  5. </brief_description>
  6. <description>
  7. A GraphNode is a container defined by a title. It can have 1 or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="clear_all_slots">
  15. <return type="void">
  16. </return>
  17. <description>
  18. Disable all input and output slots of the GraphNode.
  19. </description>
  20. </method>
  21. <method name="clear_slot">
  22. <return type="void">
  23. </return>
  24. <argument index="0" name="idx" type="int">
  25. </argument>
  26. <description>
  27. Disable input and output slot whose index is 'idx'.
  28. </description>
  29. </method>
  30. <method name="get_connection_input_color">
  31. <return type="Color">
  32. </return>
  33. <argument index="0" name="idx" type="int">
  34. </argument>
  35. <description>
  36. Return the color of the input connection 'idx'.
  37. </description>
  38. </method>
  39. <method name="get_connection_input_count">
  40. <return type="int">
  41. </return>
  42. <description>
  43. Return the number of enabled input slots (connections) to the GraphNode.
  44. </description>
  45. </method>
  46. <method name="get_connection_input_position">
  47. <return type="Vector2">
  48. </return>
  49. <argument index="0" name="idx" type="int">
  50. </argument>
  51. <description>
  52. Return the position of the input connection 'idx'.
  53. </description>
  54. </method>
  55. <method name="get_connection_input_type">
  56. <return type="int">
  57. </return>
  58. <argument index="0" name="idx" type="int">
  59. </argument>
  60. <description>
  61. Return the type of the input connection 'idx'.
  62. </description>
  63. </method>
  64. <method name="get_connection_output_color">
  65. <return type="Color">
  66. </return>
  67. <argument index="0" name="idx" type="int">
  68. </argument>
  69. <description>
  70. Return the color of the output connection 'idx'.
  71. </description>
  72. </method>
  73. <method name="get_connection_output_count">
  74. <return type="int">
  75. </return>
  76. <description>
  77. Return the number of enabled output slots (connections) of the GraphNode.
  78. </description>
  79. </method>
  80. <method name="get_connection_output_position">
  81. <return type="Vector2">
  82. </return>
  83. <argument index="0" name="idx" type="int">
  84. </argument>
  85. <description>
  86. Return the position of the output connection 'idx'.
  87. </description>
  88. </method>
  89. <method name="get_connection_output_type">
  90. <return type="int">
  91. </return>
  92. <argument index="0" name="idx" type="int">
  93. </argument>
  94. <description>
  95. Return the type of the output connection 'idx'.
  96. </description>
  97. </method>
  98. <method name="get_offset" qualifiers="const">
  99. <return type="Vector2">
  100. </return>
  101. <description>
  102. Return the offset of the GraphNode.
  103. </description>
  104. </method>
  105. <method name="get_overlay" qualifiers="const">
  106. <return type="int" enum="GraphNode.Overlay">
  107. </return>
  108. <description>
  109. </description>
  110. </method>
  111. <method name="get_slot_color_left" qualifiers="const">
  112. <return type="Color">
  113. </return>
  114. <argument index="0" name="idx" type="int">
  115. </argument>
  116. <description>
  117. Return the color set to 'idx' left (input) slot.
  118. </description>
  119. </method>
  120. <method name="get_slot_color_right" qualifiers="const">
  121. <return type="Color">
  122. </return>
  123. <argument index="0" name="idx" type="int">
  124. </argument>
  125. <description>
  126. Return the color set to 'idx' right (output) slot.
  127. </description>
  128. </method>
  129. <method name="get_slot_type_left" qualifiers="const">
  130. <return type="int">
  131. </return>
  132. <argument index="0" name="idx" type="int">
  133. </argument>
  134. <description>
  135. Return the (integer) type of left (input) 'idx' slot.
  136. </description>
  137. </method>
  138. <method name="get_slot_type_right" qualifiers="const">
  139. <return type="int">
  140. </return>
  141. <argument index="0" name="idx" type="int">
  142. </argument>
  143. <description>
  144. Return the (integer) type of right (output) 'idx' slot.
  145. </description>
  146. </method>
  147. <method name="get_title" qualifiers="const">
  148. <return type="String">
  149. </return>
  150. <description>
  151. Return the title of the GraphNode.
  152. </description>
  153. </method>
  154. <method name="is_close_button_visible" qualifiers="const">
  155. <return type="bool">
  156. </return>
  157. <description>
  158. Returns true if the close button is shown. False otherwise.
  159. </description>
  160. </method>
  161. <method name="is_comment" qualifiers="const">
  162. <return type="bool">
  163. </return>
  164. <description>
  165. </description>
  166. </method>
  167. <method name="is_resizable" qualifiers="const">
  168. <return type="bool">
  169. </return>
  170. <description>
  171. </description>
  172. </method>
  173. <method name="is_selected">
  174. <return type="bool">
  175. </return>
  176. <description>
  177. </description>
  178. </method>
  179. <method name="is_slot_enabled_left" qualifiers="const">
  180. <return type="bool">
  181. </return>
  182. <argument index="0" name="idx" type="int">
  183. </argument>
  184. <description>
  185. Return true if left (input) slot 'idx' is enabled. False otherwise.
  186. </description>
  187. </method>
  188. <method name="is_slot_enabled_right" qualifiers="const">
  189. <return type="bool">
  190. </return>
  191. <argument index="0" name="idx" type="int">
  192. </argument>
  193. <description>
  194. Return true if right (output) slot 'idx' is enabled. False otherwise.
  195. </description>
  196. </method>
  197. <method name="set_comment">
  198. <return type="void">
  199. </return>
  200. <argument index="0" name="comment" type="bool">
  201. </argument>
  202. <description>
  203. </description>
  204. </method>
  205. <method name="set_offset">
  206. <return type="void">
  207. </return>
  208. <argument index="0" name="offset" type="Vector2">
  209. </argument>
  210. <description>
  211. Set the offset of the GraphNode.
  212. </description>
  213. </method>
  214. <method name="set_overlay">
  215. <return type="void">
  216. </return>
  217. <argument index="0" name="overlay" type="int" enum="GraphNode.Overlay">
  218. </argument>
  219. <description>
  220. </description>
  221. </method>
  222. <method name="set_resizable">
  223. <return type="void">
  224. </return>
  225. <argument index="0" name="resizable" type="bool">
  226. </argument>
  227. <description>
  228. </description>
  229. </method>
  230. <method name="set_selected">
  231. <return type="void">
  232. </return>
  233. <argument index="0" name="selected" type="bool">
  234. </argument>
  235. <description>
  236. </description>
  237. </method>
  238. <method name="set_show_close_button">
  239. <return type="void">
  240. </return>
  241. <argument index="0" name="show" type="bool">
  242. </argument>
  243. <description>
  244. Show the close button on the GraphNode if 'show' is true (disabled by default). If enabled, a connection on the signal close_request is needed for the close button to work.
  245. </description>
  246. </method>
  247. <method name="set_slot">
  248. <return type="void">
  249. </return>
  250. <argument index="0" name="idx" type="int">
  251. </argument>
  252. <argument index="1" name="enable_left" type="bool">
  253. </argument>
  254. <argument index="2" name="type_left" type="int">
  255. </argument>
  256. <argument index="3" name="color_left" type="Color">
  257. </argument>
  258. <argument index="4" name="enable_right" type="bool">
  259. </argument>
  260. <argument index="5" name="type_right" type="int">
  261. </argument>
  262. <argument index="6" name="color_right" type="Color">
  263. </argument>
  264. <argument index="7" name="custom_left" type="Texture" default="null">
  265. </argument>
  266. <argument index="8" name="custom_right" type="Texture" default="null">
  267. </argument>
  268. <description>
  269. </description>
  270. </method>
  271. <method name="set_title">
  272. <return type="void">
  273. </return>
  274. <argument index="0" name="title" type="String">
  275. </argument>
  276. <description>
  277. Set the title of the GraphNode.
  278. </description>
  279. </method>
  280. </methods>
  281. <members>
  282. <member name="resizable" type="bool" setter="set_resizable" getter="is_resizable">
  283. </member>
  284. <member name="show_close" type="bool" setter="set_show_close_button" getter="is_close_button_visible">
  285. </member>
  286. <member name="title" type="String" setter="set_title" getter="get_title">
  287. </member>
  288. </members>
  289. <signals>
  290. <signal name="close_request">
  291. <description>
  292. Signal sent on closing the GraphNode.
  293. </description>
  294. </signal>
  295. <signal name="dragged">
  296. <argument index="0" name="from" type="Vector2">
  297. </argument>
  298. <argument index="1" name="to" type="Vector2">
  299. </argument>
  300. <description>
  301. Signal sent when the GraphNode is dragged.
  302. </description>
  303. </signal>
  304. <signal name="offset_changed">
  305. <description>
  306. Signal sent when the GraphNode is moved.
  307. </description>
  308. </signal>
  309. <signal name="raise_request">
  310. <description>
  311. Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode.
  312. </description>
  313. </signal>
  314. <signal name="resize_request">
  315. <argument index="0" name="new_minsize" type="Vector2">
  316. </argument>
  317. <description>
  318. </description>
  319. </signal>
  320. </signals>
  321. <constants>
  322. <constant name="OVERLAY_DISABLED" value="0">
  323. </constant>
  324. <constant name="OVERLAY_BREAKPOINT" value="1">
  325. </constant>
  326. <constant name="OVERLAY_POSITION" value="2">
  327. </constant>
  328. </constants>
  329. <theme_items>
  330. <theme_item name="breakpoint" type="StyleBox">
  331. </theme_item>
  332. <theme_item name="close" type="Texture">
  333. </theme_item>
  334. <theme_item name="close_offset" type="int">
  335. </theme_item>
  336. <theme_item name="comment" type="StyleBox">
  337. </theme_item>
  338. <theme_item name="commentfocus" type="StyleBox">
  339. </theme_item>
  340. <theme_item name="defaultfocus" type="StyleBox">
  341. </theme_item>
  342. <theme_item name="defaultframe" type="StyleBox">
  343. </theme_item>
  344. <theme_item name="frame" type="StyleBox">
  345. </theme_item>
  346. <theme_item name="port" type="Texture">
  347. </theme_item>
  348. <theme_item name="port_offset" type="int">
  349. </theme_item>
  350. <theme_item name="position" type="StyleBox">
  351. </theme_item>
  352. <theme_item name="resizer" type="Texture">
  353. </theme_item>
  354. <theme_item name="selectedframe" type="StyleBox">
  355. </theme_item>
  356. <theme_item name="separation" type="int">
  357. </theme_item>
  358. <theme_item name="title_color" type="Color">
  359. </theme_item>
  360. <theme_item name="title_font" type="Font">
  361. </theme_item>
  362. <theme_item name="title_offset" type="int">
  363. </theme_item>
  364. </theme_items>
  365. </class>