c_guitree.cpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. /* This file was generated by Maki Compiler, do not edit manually */
  2. #include <precomp.h>
  3. #include "c_guitree.h"
  4. #include <api/script/objcontroller.h>
  5. C_GuiTree::C_GuiTree(ScriptObject *object) : C_GuiObject(object) {
  6. inited = 0;
  7. obj = NULL;
  8. C_hook(object);
  9. }
  10. C_GuiTree::C_GuiTree() {
  11. inited = 0;
  12. obj = NULL;
  13. }
  14. void C_GuiTree::C_hook(ScriptObject *object) {
  15. ASSERT(!inited);
  16. ScriptObjectController *controller = object->vcpu_getController();
  17. obj = controller->cast(object, guiTreeGuid);
  18. if (obj != object && obj != NULL)
  19. controller = obj->vcpu_getController();
  20. else
  21. obj = NULL;
  22. int iter = WASABI_API_APP->app_getInitCount();
  23. if (!loaded || loaded != iter) {
  24. loaded = iter;
  25. onwantautocontextmenu_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"onWantAutoContextMenu", this);
  26. onmousewheelup_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"onMouseWheelUp", this);
  27. onmousewheeldown_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"onMouseWheelDown", this);
  28. oncontextmenu_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"onContextMenu", this);
  29. onchar_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"onChar", this);
  30. onitemrecvdrop_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"onItemRecvDrop", this);
  31. onlabelchange_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"onLabelChange", this);
  32. onitemselected_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"onItemSelected", this);
  33. onitemdeselected_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"onItemDeselected", this);
  34. getnumrootitems_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getNumRootItems", this);
  35. enumrootitem_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"enumRootItem", this);
  36. jumptonext_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"jumpToNext", this);
  37. ensureitemvisible_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"ensureItemVisible", this);
  38. getcontentswidth_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getContentsWidth", this);
  39. getcontentsheight_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getContentsHeight", this);
  40. addtreeitem_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"addTreeItem", this);
  41. removetreeitem_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"removeTreeItem", this);
  42. movetreeitem_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"moveTreeItem", this);
  43. deleteallitems_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"deleteAllItems", this);
  44. expanditem_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"expandItem", this);
  45. expanditemdeferred_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"expandItemDeferred", this);
  46. collapseitem_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"collapseItem", this);
  47. collapseitemdeferred_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"collapseItemDeferred", this);
  48. selectitem_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"selectItem", this);
  49. selectitemdeferred_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"selectItemDeferred", this);
  50. delitemdeferred_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"delItemDeferred", this);
  51. hiliteitem_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"hiliteItem", this);
  52. unhiliteitem_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"unhiliteItem", this);
  53. getcuritem_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getCurItem", this);
  54. hittest_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"hitTest", this);
  55. edititemlabel_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"editItemLabel", this);
  56. canceleditlabel_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"cancelEditLabel", this);
  57. setautoedit_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"setAutoEdit", this);
  58. getautoedit_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getAutoEdit", this);
  59. getbylabel_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getByLabel", this);
  60. setsorted_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"setSorted", this);
  61. getsorted_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getSorted", this);
  62. sorttreeitems_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"sortTreeItems", this);
  63. getsibling_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getSibling", this);
  64. setautocollapse_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"setAutoCollapse", this);
  65. setfontsize_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"setFontSize", this);
  66. getfontsize_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getFontSize", this);
  67. getnumvisiblechilditems_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getNumVisibleChildItems", this);
  68. getnumvisibleitems_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getNumVisibleItems", this);
  69. enumvisibleitems_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"enumVisibleItems", this);
  70. enumvisiblechilditems_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"enumVisibleChildItems", this);
  71. enumallitems_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"enumAllItems", this);
  72. getitemrectx_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getItemRectX", this);
  73. getitemrecty_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getItemRectY", this);
  74. getitemrectw_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getItemRectW", this);
  75. getitemrecth_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getItemRectH", this);
  76. }
  77. inited = 1;
  78. }
  79. C_GuiTree::~C_GuiTree() {
  80. }
  81. ScriptObject *C_GuiTree::getScriptObject() {
  82. if (obj != NULL) return obj;
  83. return C_GUITREE_PARENT::getScriptObject();
  84. }
  85. int C_GuiTree::onWantAutoContextMenu() {
  86. ASSERT(inited);
  87. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), onwantautocontextmenu_id, NULL));
  88. }
  89. int C_GuiTree::onMouseWheelUp(int clicked, int lines) {
  90. ASSERT(inited);
  91. scriptVar a = MAKE_SCRIPT_INT(clicked);
  92. scriptVar b = MAKE_SCRIPT_INT(lines);
  93. scriptVar *params[2] = {&a, &b};
  94. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), onmousewheelup_id, params));
  95. }
  96. int C_GuiTree::onMouseWheelDown(int clicked, int lines) {
  97. ASSERT(inited);
  98. scriptVar a = MAKE_SCRIPT_INT(clicked);
  99. scriptVar b = MAKE_SCRIPT_INT(lines);
  100. scriptVar *params[2] = {&a, &b};
  101. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), onmousewheeldown_id, params));
  102. }
  103. int C_GuiTree::onContextMenu(int x, int y) {
  104. ASSERT(inited);
  105. scriptVar a = MAKE_SCRIPT_INT(x);
  106. scriptVar b = MAKE_SCRIPT_INT(y);
  107. scriptVar *params[2] = {&a, &b};
  108. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), oncontextmenu_id, params));
  109. }
  110. int C_GuiTree::onChar(int c) {
  111. ASSERT(inited);
  112. scriptVar a = MAKE_SCRIPT_INT(c);
  113. scriptVar *params[1] = {&a};
  114. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), onchar_id, params));
  115. }
  116. void C_GuiTree::onItemRecvDrop(ScriptObject *item) {
  117. ASSERT(inited);
  118. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  119. scriptVar *params[1] = {&a};
  120. WASABI_API_MAKI->maki_callFunction(getScriptObject(), onitemrecvdrop_id, params);
  121. }
  122. void C_GuiTree::onLabelChange(ScriptObject *item) {
  123. ASSERT(inited);
  124. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  125. scriptVar *params[1] = {&a};
  126. WASABI_API_MAKI->maki_callFunction(getScriptObject(), onlabelchange_id, params);
  127. }
  128. void C_GuiTree::onItemSelected(ScriptObject *item) {
  129. ASSERT(inited);
  130. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  131. scriptVar *params[1] = {&a};
  132. WASABI_API_MAKI->maki_callFunction(getScriptObject(), onitemselected_id, params);
  133. }
  134. void C_GuiTree::onItemDeselected(ScriptObject *item) {
  135. ASSERT(inited);
  136. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  137. scriptVar *params[1] = {&a};
  138. WASABI_API_MAKI->maki_callFunction(getScriptObject(), onitemdeselected_id, params);
  139. }
  140. int C_GuiTree::getNumRootItems() {
  141. ASSERT(inited);
  142. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getnumrootitems_id, NULL));
  143. }
  144. ScriptObject *C_GuiTree::enumRootItem(int which) {
  145. ASSERT(inited);
  146. scriptVar a = MAKE_SCRIPT_INT(which);
  147. scriptVar *params[1] = {&a};
  148. return GET_SCRIPT_OBJECT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), enumrootitem_id, params));
  149. }
  150. void C_GuiTree::jumpToNext(int c) {
  151. ASSERT(inited);
  152. scriptVar a = MAKE_SCRIPT_INT(c);
  153. scriptVar *params[1] = {&a};
  154. WASABI_API_MAKI->maki_callFunction(getScriptObject(), jumptonext_id, params);
  155. }
  156. void C_GuiTree::ensureItemVisible(ScriptObject *item) {
  157. ASSERT(inited);
  158. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  159. scriptVar *params[1] = {&a};
  160. WASABI_API_MAKI->maki_callFunction(getScriptObject(), ensureitemvisible_id, params);
  161. }
  162. int C_GuiTree::getContentsWidth() {
  163. ASSERT(inited);
  164. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getcontentswidth_id, NULL));
  165. }
  166. int C_GuiTree::getContentsHeight() {
  167. ASSERT(inited);
  168. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getcontentsheight_id, NULL));
  169. }
  170. ScriptObject *C_GuiTree::addTreeItem(ScriptObject *item, ScriptObject *par, int sorted, int haschildtab) {
  171. ASSERT(inited);
  172. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  173. scriptVar b = MAKE_SCRIPT_OBJECT(par);
  174. scriptVar c = MAKE_SCRIPT_INT(sorted);
  175. scriptVar d = MAKE_SCRIPT_INT(haschildtab);
  176. scriptVar *params[4] = {&a, &b, &c, &d};
  177. return GET_SCRIPT_OBJECT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), addtreeitem_id, params));
  178. }
  179. int C_GuiTree::removeTreeItem(ScriptObject *item) {
  180. ASSERT(inited);
  181. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  182. scriptVar *params[1] = {&a};
  183. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), removetreeitem_id, params));
  184. }
  185. void C_GuiTree::moveTreeItem(ScriptObject *item, ScriptObject *newparent) {
  186. ASSERT(inited);
  187. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  188. scriptVar b = MAKE_SCRIPT_OBJECT(newparent);
  189. scriptVar *params[2] = {&a, &b};
  190. WASABI_API_MAKI->maki_callFunction(getScriptObject(), movetreeitem_id, params);
  191. }
  192. void C_GuiTree::deleteAllItems() {
  193. ASSERT(inited);
  194. WASABI_API_MAKI->maki_callFunction(getScriptObject(), deleteallitems_id, NULL);
  195. }
  196. int C_GuiTree::expandItem(ScriptObject *item) {
  197. ASSERT(inited);
  198. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  199. scriptVar *params[1] = {&a};
  200. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), expanditem_id, params));
  201. }
  202. void C_GuiTree::expandItemDeferred(ScriptObject *item) {
  203. ASSERT(inited);
  204. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  205. scriptVar *params[1] = {&a};
  206. WASABI_API_MAKI->maki_callFunction(getScriptObject(), expanditemdeferred_id, params);
  207. }
  208. int C_GuiTree::collapseItem(ScriptObject *item) {
  209. ASSERT(inited);
  210. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  211. scriptVar *params[1] = {&a};
  212. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), collapseitem_id, params));
  213. }
  214. void C_GuiTree::collapseItemDeferred(ScriptObject *item) {
  215. ASSERT(inited);
  216. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  217. scriptVar *params[1] = {&a};
  218. WASABI_API_MAKI->maki_callFunction(getScriptObject(), collapseitemdeferred_id, params);
  219. }
  220. void C_GuiTree::selectItem(ScriptObject *item) {
  221. ASSERT(inited);
  222. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  223. scriptVar *params[1] = {&a};
  224. WASABI_API_MAKI->maki_callFunction(getScriptObject(), selectitem_id, params);
  225. }
  226. void C_GuiTree::selectItemDeferred(ScriptObject *item) {
  227. ASSERT(inited);
  228. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  229. scriptVar *params[1] = {&a};
  230. WASABI_API_MAKI->maki_callFunction(getScriptObject(), selectitemdeferred_id, params);
  231. }
  232. void C_GuiTree::delItemDeferred(ScriptObject *item) {
  233. ASSERT(inited);
  234. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  235. scriptVar *params[1] = {&a};
  236. WASABI_API_MAKI->maki_callFunction(getScriptObject(), delitemdeferred_id, params);
  237. }
  238. void C_GuiTree::hiliteItem(ScriptObject *item) {
  239. ASSERT(inited);
  240. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  241. scriptVar *params[1] = {&a};
  242. WASABI_API_MAKI->maki_callFunction(getScriptObject(), hiliteitem_id, params);
  243. }
  244. void C_GuiTree::unhiliteItem(ScriptObject *item) {
  245. ASSERT(inited);
  246. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  247. scriptVar *params[1] = {&a};
  248. WASABI_API_MAKI->maki_callFunction(getScriptObject(), unhiliteitem_id, params);
  249. }
  250. ScriptObject *C_GuiTree::getCurItem() {
  251. ASSERT(inited);
  252. return GET_SCRIPT_OBJECT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getcuritem_id, NULL));
  253. }
  254. ScriptObject *C_GuiTree::hitTest(int x, int y) {
  255. ASSERT(inited);
  256. scriptVar a = MAKE_SCRIPT_INT(x);
  257. scriptVar b = MAKE_SCRIPT_INT(y);
  258. scriptVar *params[2] = {&a, &b};
  259. return GET_SCRIPT_OBJECT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), hittest_id, params));
  260. }
  261. void C_GuiTree::editItemLabel(ScriptObject *item) {
  262. ASSERT(inited);
  263. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  264. scriptVar *params[1] = {&a};
  265. WASABI_API_MAKI->maki_callFunction(getScriptObject(), edititemlabel_id, params);
  266. }
  267. void C_GuiTree::cancelEditLabel(int destroyit) {
  268. ASSERT(inited);
  269. scriptVar a = MAKE_SCRIPT_INT(destroyit);
  270. scriptVar *params[1] = {&a};
  271. WASABI_API_MAKI->maki_callFunction(getScriptObject(), canceleditlabel_id, params);
  272. }
  273. void C_GuiTree::setAutoEdit(int ae) {
  274. ASSERT(inited);
  275. scriptVar a = MAKE_SCRIPT_INT(ae);
  276. scriptVar *params[1] = {&a};
  277. WASABI_API_MAKI->maki_callFunction(getScriptObject(), setautoedit_id, params);
  278. }
  279. int C_GuiTree::getAutoEdit() {
  280. ASSERT(inited);
  281. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getautoedit_id, NULL));
  282. }
  283. ScriptObject *C_GuiTree::getByLabel(ScriptObject *item, const wchar_t *name)
  284. {
  285. ASSERT(inited);
  286. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  287. scriptVar b = MAKE_SCRIPT_STRING(name);
  288. scriptVar *params[2] = {&a, &b};
  289. return GET_SCRIPT_OBJECT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getbylabel_id, params));
  290. }
  291. void C_GuiTree::setSorted(int dosort) {
  292. ASSERT(inited);
  293. scriptVar a = MAKE_SCRIPT_INT(dosort);
  294. scriptVar *params[1] = {&a};
  295. WASABI_API_MAKI->maki_callFunction(getScriptObject(), setsorted_id, params);
  296. }
  297. int C_GuiTree::getSorted() {
  298. ASSERT(inited);
  299. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getsorted_id, NULL));
  300. }
  301. void C_GuiTree::sortTreeItems() {
  302. ASSERT(inited);
  303. WASABI_API_MAKI->maki_callFunction(getScriptObject(), sorttreeitems_id, NULL);
  304. }
  305. ScriptObject *C_GuiTree::getSibling(ScriptObject *item) {
  306. ASSERT(inited);
  307. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  308. scriptVar *params[1] = {&a};
  309. return GET_SCRIPT_OBJECT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getsibling_id, params));
  310. }
  311. void C_GuiTree::setAutoCollapse(int doautocollapse) {
  312. ASSERT(inited);
  313. scriptVar a = MAKE_SCRIPT_INT(doautocollapse);
  314. scriptVar *params[1] = {&a};
  315. WASABI_API_MAKI->maki_callFunction(getScriptObject(), setautocollapse_id, params);
  316. }
  317. int C_GuiTree::setFontSize(int newsize) {
  318. ASSERT(inited);
  319. scriptVar a = MAKE_SCRIPT_INT(newsize);
  320. scriptVar *params[1] = {&a};
  321. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), setfontsize_id, params));
  322. }
  323. int C_GuiTree::getFontSize() {
  324. ASSERT(inited);
  325. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getfontsize_id, NULL));
  326. }
  327. int C_GuiTree::getNumVisibleChildItems(ScriptObject *c) {
  328. ASSERT(inited);
  329. scriptVar a = MAKE_SCRIPT_OBJECT(c);
  330. scriptVar *params[1] = {&a};
  331. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getnumvisiblechilditems_id, params));
  332. }
  333. int C_GuiTree::getNumVisibleItems() {
  334. ASSERT(inited);
  335. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getnumvisibleitems_id, NULL));
  336. }
  337. ScriptObject *C_GuiTree::enumVisibleItems(int n) {
  338. ASSERT(inited);
  339. scriptVar a = MAKE_SCRIPT_INT(n);
  340. scriptVar *params[1] = {&a};
  341. return GET_SCRIPT_OBJECT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), enumvisibleitems_id, params));
  342. }
  343. ScriptObject *C_GuiTree::enumVisibleChildItems(ScriptObject *c, int n) {
  344. ASSERT(inited);
  345. scriptVar a = MAKE_SCRIPT_OBJECT(c);
  346. scriptVar b = MAKE_SCRIPT_INT(n);
  347. scriptVar *params[2] = {&a, &b};
  348. return GET_SCRIPT_OBJECT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), enumvisiblechilditems_id, params));
  349. }
  350. ScriptObject *C_GuiTree::enumAllItems(int n) {
  351. ASSERT(inited);
  352. scriptVar a = MAKE_SCRIPT_INT(n);
  353. scriptVar *params[1] = {&a};
  354. return GET_SCRIPT_OBJECT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), enumallitems_id, params));
  355. }
  356. int C_GuiTree::getItemRectX(ScriptObject *item) {
  357. ASSERT(inited);
  358. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  359. scriptVar *params[1] = {&a};
  360. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getitemrectx_id, params));
  361. }
  362. int C_GuiTree::getItemRectY(ScriptObject *item) {
  363. ASSERT(inited);
  364. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  365. scriptVar *params[1] = {&a};
  366. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getitemrecty_id, params));
  367. }
  368. int C_GuiTree::getItemRectW(ScriptObject *item) {
  369. ASSERT(inited);
  370. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  371. scriptVar *params[1] = {&a};
  372. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getitemrectw_id, params));
  373. }
  374. int C_GuiTree::getItemRectH(ScriptObject *item) {
  375. ASSERT(inited);
  376. scriptVar a = MAKE_SCRIPT_OBJECT(item);
  377. scriptVar *params[1] = {&a};
  378. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getitemrecth_id, params));
  379. }
  380. int C_GuiTree::loaded=0;
  381. int C_GuiTree::onwantautocontextmenu_id=0;
  382. int C_GuiTree::onmousewheelup_id=0;
  383. int C_GuiTree::onmousewheeldown_id=0;
  384. int C_GuiTree::oncontextmenu_id=0;
  385. int C_GuiTree::onchar_id=0;
  386. int C_GuiTree::onitemrecvdrop_id=0;
  387. int C_GuiTree::onlabelchange_id=0;
  388. int C_GuiTree::onitemselected_id=0;
  389. int C_GuiTree::onitemdeselected_id=0;
  390. int C_GuiTree::getnumrootitems_id=0;
  391. int C_GuiTree::enumrootitem_id=0;
  392. int C_GuiTree::jumptonext_id=0;
  393. int C_GuiTree::ensureitemvisible_id=0;
  394. int C_GuiTree::getcontentswidth_id=0;
  395. int C_GuiTree::getcontentsheight_id=0;
  396. int C_GuiTree::addtreeitem_id=0;
  397. int C_GuiTree::removetreeitem_id=0;
  398. int C_GuiTree::movetreeitem_id=0;
  399. int C_GuiTree::deleteallitems_id=0;
  400. int C_GuiTree::expanditem_id=0;
  401. int C_GuiTree::expanditemdeferred_id=0;
  402. int C_GuiTree::collapseitem_id=0;
  403. int C_GuiTree::collapseitemdeferred_id=0;
  404. int C_GuiTree::selectitem_id=0;
  405. int C_GuiTree::selectitemdeferred_id=0;
  406. int C_GuiTree::delitemdeferred_id=0;
  407. int C_GuiTree::hiliteitem_id=0;
  408. int C_GuiTree::unhiliteitem_id=0;
  409. int C_GuiTree::getcuritem_id=0;
  410. int C_GuiTree::hittest_id=0;
  411. int C_GuiTree::edititemlabel_id=0;
  412. int C_GuiTree::canceleditlabel_id=0;
  413. int C_GuiTree::setautoedit_id=0;
  414. int C_GuiTree::getautoedit_id=0;
  415. int C_GuiTree::getbylabel_id=0;
  416. int C_GuiTree::setsorted_id=0;
  417. int C_GuiTree::getsorted_id=0;
  418. int C_GuiTree::sorttreeitems_id=0;
  419. int C_GuiTree::getsibling_id=0;
  420. int C_GuiTree::setautocollapse_id=0;
  421. int C_GuiTree::setfontsize_id=0;
  422. int C_GuiTree::getfontsize_id=0;
  423. int C_GuiTree::getnumvisiblechilditems_id=0;
  424. int C_GuiTree::getnumvisibleitems_id=0;
  425. int C_GuiTree::enumvisibleitems_id=0;
  426. int C_GuiTree::enumvisiblechilditems_id=0;
  427. int C_GuiTree::enumallitems_id=0;
  428. int C_GuiTree::getitemrectx_id=0;
  429. int C_GuiTree::getitemrecty_id=0;
  430. int C_GuiTree::getitemrectw_id=0;
  431. int C_GuiTree::getitemrecth_id=0;