1
0

xuitree.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. #ifndef __XUITREE_H
  2. #define __XUITREE_H
  3. #include <map>
  4. #include <api/wnd/wndclass/treewnd.h>
  5. #include <api/script/objcontroller.h>
  6. #include <bfc/depend.h>
  7. class HPNode;
  8. class ScriptTreeItem;
  9. class svc_textFeed;
  10. #define SCRIPTTREE_PARENT TreeWnd
  11. typedef std::map<TreeItem *,ScriptTreeItem *> ScriptTreeMap;
  12. // -----------------------------------------------------------------------
  13. class ScriptTree : public SCRIPTTREE_PARENT, public DependentViewerI {
  14. public:
  15. ScriptTree();
  16. virtual ~ScriptTree();
  17. virtual int onInit();
  18. int setXuiParam(int xuihandle, int xmlattributeid, const wchar_t *xmlattributename, const wchar_t *value);
  19. int onReloadConfig();
  20. virtual int viewer_onEvent(api_dependent *item, const GUID *classguid, int event, intptr_t param, void *ptr, size_t ptrlen);
  21. virtual void onSetVisible(int i);
  22. virtual int onAction(const wchar_t *action, const wchar_t *param, int x, int y, intptr_t p1, intptr_t p2, void *data, size_t datalen, ifc_window *source);
  23. // Find a ScriptTreeItem to wrap a TreeItem
  24. ScriptTreeItem *bindScriptTreeItem(TreeItem *item);
  25. // Someone is deleting a ScriptTreeItem so we should stop tracking it.
  26. int destroyScriptTreeItem(ScriptTreeItem *item);
  27. // Transfer a TreeItem from our tree to a different tree (or global space)
  28. int transferScriptTreeItem(TreeItem *item, ScriptTree *tree);
  29. // Callback methods that send hooks into the Script system
  30. virtual int onLeftButtonDown(int x, int y);
  31. virtual int onLeftButtonUp(int x, int y);
  32. virtual int onRightButtonUp(int x, int y);
  33. virtual int onMouseMove(int x, int y);
  34. virtual int wantAutoContextMenu();
  35. virtual int onLeftButtonDblClk(int x, int y);
  36. virtual int onRightButtonDblClk(int x, int y);
  37. virtual int onMouseWheelUp(int clicked, int lines);
  38. virtual int onMouseWheelDown(int clicked, int lines);
  39. virtual int onContextMenu(int x, int y);
  40. virtual int onChar(wchar_t c);
  41. virtual int onKeyDown(int keycode);
  42. virtual void onItemRecvDrop(TreeItem *item);
  43. virtual void onLabelChange(TreeItem *item);
  44. virtual void onItemSelected(TreeItem *item);
  45. virtual void onItemDeselected(TreeItem *item);
  46. virtual int onKillFocus();
  47. // Valid XML Params for Tree
  48. enum {
  49. SCRIPTTREE_SETITEMS = 0,
  50. SCRIPTTREE_FEED,
  51. SCRIPTTREE_SORTED,
  52. SCRIPTTREE_CHILDTABS,
  53. SCRIPTTREE_EXPANDROOT,
  54. };
  55. protected:
  56. /*static */void CreateXMLParameters(int master_handle);
  57. private:
  58. #ifdef WASABI_COMPILE_CONFIG
  59. void saveToConfig();
  60. void selectFromConfig();
  61. #endif
  62. void expandRoot(int val);
  63. void fillFromParams();
  64. void fillFromHPNode(HPNode *node, TreeItem *parent = NULL);
  65. int selectEntry(const wchar_t *e, int cb=1);
  66. void selectEntries(const wchar_t *multientry, int cb=1);
  67. void openFeed(const wchar_t *feedid);
  68. void closeFeed();
  69. StringW items;
  70. int myxuihandle;
  71. int childtabs;
  72. int expandroot;
  73. svc_textFeed *feed;
  74. StringW last_feed;
  75. static XMLParamPair params[];
  76. // ScriptTreeMap scriptitems;
  77. };
  78. // -----------------------------------------------------------------------------------------------------
  79. class GuiTreeScriptController : public ScriptObjectControllerI {
  80. public:
  81. virtual const wchar_t *getClassName() { return L"GuiTree"; }
  82. virtual const wchar_t *getAncestorClassName() { return L"GuiObject"; }
  83. virtual ScriptObjectController *getAncestorController() { return WASABI_API_MAKI->maki_getController(guiObjectGuid); }
  84. virtual int getNumFunctions();
  85. virtual const function_descriptor_struct *getExportedFunctions();
  86. virtual GUID getClassGuid() { return guitreeGuid; }
  87. virtual ScriptObject *instantiate();
  88. virtual void destroy(ScriptObject *o);
  89. virtual void *encapsulate(ScriptObject *o);
  90. virtual void deencapsulate(void *o);
  91. public:
  92. static scriptVar /*int*/ guitree_getNumRootItems(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  93. static scriptVar /*TreeItem*/ guitree_enumRootItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar /*int*/ which);
  94. static /*Int*/ scriptVar guitree_onLeftButtonDown(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar x, /*Int*/ scriptVar y);
  95. static /*Int*/ scriptVar guitree_onLeftButtonUp(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar x, /*Int*/ scriptVar y);
  96. static /*Int*/ scriptVar guitree_onRightButtonUp(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar x, /*Int*/ scriptVar y);
  97. static /*Int*/ scriptVar guitree_onMouseMove(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar x, /*Int*/ scriptVar y);
  98. static /*Int*/ scriptVar guitree_wantAutoContextMenu(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  99. static /*Int*/ scriptVar guitree_onLeftButtonDblClk(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar x, /*Int*/ scriptVar y);
  100. static /*Int*/ scriptVar guitree_onRightButtonDblClk(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar x, /*Int*/ scriptVar y);
  101. static /*Int*/ scriptVar guitree_onMouseWheelUp(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar clicked, /*Int*/ scriptVar lines);
  102. static /*Int*/ scriptVar guitree_onMouseWheelDown(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar clicked, /*Int*/ scriptVar lines);
  103. static /*Int*/ scriptVar guitree_onContextMenu(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar x, /*Int*/ scriptVar y);
  104. static /*Int*/ scriptVar guitree_onChar(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar c);
  105. static /*Int*/ scriptVar guitree_onKeyDown(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar keycode);
  106. static /*Void*/ scriptVar guitree_onItemRecvDrop(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  107. static /*Void*/ scriptVar guitree_onLabelChange(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  108. static /*Void*/ scriptVar guitree_onItemSelected(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  109. static /*Void*/ scriptVar guitree_onItemDeselected(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  110. static /*Int*/ scriptVar guitree_onKillFocus(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  111. static /*Void*/ scriptVar guitree_jumpToNext(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar c);
  112. static /*Void*/ scriptVar guitree_ensureItemVisible(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  113. static /*Int*/ scriptVar guitree_getContentsWidth(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  114. static /*Int*/ scriptVar guitree_getContentsHeight(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  115. static /*TreeItem*/ scriptVar guitree_addTreeItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item, /*TreeItem*/ scriptVar par, /*Int*/ scriptVar sorted, /*Int*/ scriptVar haschildtab);
  116. static /*Int*/ scriptVar guitree_removeTreeItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  117. static /*Void*/ scriptVar guitree_moveTreeItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item, /*TreeItem*/ scriptVar newparent);
  118. static /*Void*/ scriptVar guitree_deleteAllItems(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  119. static /*Int*/ scriptVar guitree_expandItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  120. static /*Void*/ scriptVar guitree_expandItemDeferred(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  121. static /*Int*/ scriptVar guitree_collapseItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  122. static /*Void*/ scriptVar guitree_collapseItemDeferred(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  123. static /*Void*/ scriptVar guitree_selectItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  124. static /*Void*/ scriptVar guitree_selectItemDeferred(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  125. static /*Void*/ scriptVar guitree_delItemDeferred(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  126. static /*Void*/ scriptVar guitree_hiliteItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  127. static /*Void*/ scriptVar guitree_unhiliteItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  128. static /*TreeItem*/ scriptVar guitree_getCurItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  129. static /*TreeItem*/ scriptVar guitree_hitTest(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar x, /*Int*/ scriptVar y);
  130. static /*Void*/ scriptVar guitree_editItemLabel(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  131. static /*Void*/ scriptVar guitree_cancelEditLabel(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar destroyit);
  132. static /*Void*/ scriptVar guitree_setAutoEdit(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar ae);
  133. static /*Int*/ scriptVar guitree_getAutoEdit(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  134. static /*TreeItem*/ scriptVar guitree_getByLabel(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item, /*String*/ scriptVar name);
  135. static /*Void*/ scriptVar guitree_setSorted(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar dosort);
  136. static /*Int*/ scriptVar guitree_getSorted(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  137. static /*Void*/ scriptVar guitree_sortTreeItems(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  138. static /*TreeItem*/ scriptVar guitree_getSibling(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  139. static /*Void*/ scriptVar guitree_setAutoCollapse(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar doautocollapse);
  140. static /*Int*/ scriptVar guitree_setFontSize(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar newsize);
  141. static /*Int*/ scriptVar guitree_getFontSize(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  142. static /*Int*/ scriptVar guitree_getNumVisibleChildItems(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar c);
  143. static /*Int*/ scriptVar guitree_getNumVisibleItems(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  144. static /*TreeItem*/ scriptVar guitree_enumVisibleItems(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar n);
  145. static /*TreeItem*/ scriptVar guitree_enumVisibleChildItems(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar c, /*Int*/ scriptVar n);
  146. static /*TreeItem*/ scriptVar guitree_enumAllItems(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar n);
  147. static /*Int*/ scriptVar guitree_getItemRectX(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  148. static /*Int*/ scriptVar guitree_getItemRectY(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  149. static /*Int*/ scriptVar guitree_getItemRectW(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  150. static /*Int*/ scriptVar guitree_getItemRectH(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar item);
  151. // static /*TreeItem*/ scriptVar guitree_getItemFromPoint(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*Int*/ scriptVar x, /*Int*/ scriptVar y);
  152. private:
  153. static function_descriptor_struct exportedFunction[];
  154. static StringW staticStr;
  155. };
  156. extern GuiTreeScriptController *guiTreeController;
  157. // -----------------------------------------------------------------------
  158. extern const wchar_t ScriptTreeXuiObjectStr[];
  159. extern char ScriptTreeXuiSvcName[];
  160. class ScriptTreeXuiSvc : public XuiObjectSvc<ScriptTree, ScriptTreeXuiObjectStr, ScriptTreeXuiSvcName> {};
  161. // -----------------------------------------------------------------------
  162. #define SCRIPTTREEITEM_SCRIPTPARENT RootObjectInstance
  163. class ScriptTreeItem : public SCRIPTTREEITEM_SCRIPTPARENT {
  164. public:
  165. ScriptTreeItem(TreeItem *_item = NULL, ScriptTree *_tree = NULL);
  166. virtual ~ScriptTreeItem();
  167. TreeItem *getItem() {return item;}
  168. void setItem(TreeItem *_item) {item = _item;}
  169. ScriptTree *getScriptTree() {return tree;}
  170. void setScriptTree(ScriptTree *_tree) {tree = _tree;}
  171. int destroyScriptTreeItem() {
  172. if (tree) return tree->destroyScriptTreeItem(this); // CAREFUL, WE GET OURSELVES DELETED HERE!!!!!!!!
  173. return 0;
  174. }
  175. // These methods all thunk directly to the TreeItem
  176. public:
  177. int getNumChildren();
  178. void setLabel(const wchar_t *label);
  179. const wchar_t *getLabel();
  180. void ensureVisible();
  181. TreeItem *getNthChild(int nth);
  182. TreeItem *getChild();
  183. TreeItem *getChildSibling(TreeItem *_item);
  184. TreeItem *getSibling();
  185. TreeItem *getParent();
  186. void editLabel();
  187. bool hasSubItems();
  188. void setSorted(int issorted);
  189. void setChildTab(int haschildtab);
  190. bool isSorted();
  191. bool isCollapsed();
  192. bool isExpanded();
  193. void invalidate();
  194. bool isSelected();
  195. bool isHilited();
  196. void setHilited(bool ishilited);
  197. int collapse();
  198. int expand();
  199. // void setCurrent(bool tf);
  200. TreeWnd *getTree();
  201. private:
  202. ScriptTreeItem *bindScriptTreeItem(TreeItem *item) {
  203. if (tree) return tree->bindScriptTreeItem(item);
  204. return NULL;
  205. }
  206. TreeItem *item;
  207. ScriptTree *tree;
  208. };
  209. // -----------------------------------------------------------------------------------------------------
  210. class TreeItemScriptController : public ScriptObjectControllerI {
  211. public:
  212. virtual const wchar_t *getClassName() { return L"TreeItem"; }
  213. virtual const wchar_t *getAncestorClassName() { return L"Object"; }
  214. virtual ScriptObjectController *getAncestorController() { return WASABI_API_MAKI->maki_getController(rootObjectGuid); }
  215. virtual int getNumFunctions();
  216. virtual const function_descriptor_struct *getExportedFunctions();
  217. virtual GUID getClassGuid() { return treeitemGuid; }
  218. virtual ScriptObject *instantiate();
  219. virtual void destroy(ScriptObject *o);
  220. virtual void *encapsulate(ScriptObject *o);
  221. virtual void deencapsulate(void *o);
  222. public:
  223. static /*int*/ scriptVar treeitem_getNumChildren(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  224. static /*void*/ scriptVar treeitem_setLabel(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*String*/ scriptVar label);
  225. static /*String*/ scriptVar treeitem_getLabel(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  226. static /*void*/ scriptVar treeitem_ensureVisible(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  227. static /*TreeItem*/ scriptVar treeitem_getNthChild(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar nth);
  228. static /*TreeItem*/ scriptVar treeitem_getChild(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  229. static /*TreeItem*/ scriptVar treeitem_getChildSibling(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*TreeItem*/ scriptVar _item);
  230. static /*TreeItem*/ scriptVar treeitem_getSibling(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  231. static /*TreeItem*/ scriptVar treeitem_getParent(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  232. static /*void*/ scriptVar treeitem_editLabel(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  233. static /*int*/ scriptVar treeitem_hasSubItems(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  234. static /*void*/ scriptVar treeitem_setSorted(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar issorted);
  235. static /*void*/ scriptVar treeitem_setChildTab(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar haschildtab);
  236. static /*int*/ scriptVar treeitem_isSorted(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  237. static /*int*/ scriptVar treeitem_isCollapsed(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  238. static /*int*/ scriptVar treeitem_isExpanded(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  239. static /*void*/ scriptVar treeitem_invalidate(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  240. static /*int*/ scriptVar treeitem_isSelected(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  241. static /*int*/ scriptVar treeitem_isHilited(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  242. static /*void*/ scriptVar treeitem_setHilited(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar ishilited);
  243. static /*int*/ scriptVar treeitem_collapse(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  244. static /*int*/ scriptVar treeitem_expand(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  245. // static /*void*/ scriptVar treeitem_setCurrent(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar tf);
  246. static /*GuiTree*/ scriptVar treeitem_getTree(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  247. static /*void*/ scriptVar treeitem_onTreeAdd(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  248. static /*void*/ scriptVar treeitem_onTreeRemove(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  249. static /*void*/ scriptVar treeitem_onSelect(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  250. static /*void*/ scriptVar treeitem_onDeselect(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  251. static /*int*/ scriptVar treeitem_onLeftDoubleClick(SCRIPT_FUNCTION_PARAMS, ScriptObject *o) ;
  252. static /*int*/ scriptVar treeitem_onRightDoubleClick(SCRIPT_FUNCTION_PARAMS, ScriptObject *o) ;
  253. static /*int*/ scriptVar treeitem_onChar(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar _key) ;
  254. static /*void*/ scriptVar treeitem_onExpand(SCRIPT_FUNCTION_PARAMS, ScriptObject *o) ;
  255. static /*void*/ scriptVar treeitem_onCollapse(SCRIPT_FUNCTION_PARAMS, ScriptObject *o) ;
  256. static /*int*/ scriptVar treeitem_onBeginLabelEdit(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  257. static /*int*/ scriptVar treeitem_onEndLabelEdit(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*String*/ scriptVar _newlabel);
  258. static /*int*/ scriptVar treeitem_onContextMenu(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar _x, /*int*/ scriptVar _y);
  259. private:
  260. static function_descriptor_struct exportedFunction[];
  261. static StringW staticStr;
  262. friend ScriptTree;
  263. static ScriptTreeMap g_scriptitems; // items not living in trees are tracked here.
  264. };
  265. extern TreeItemScriptController *treeItemController;
  266. #define TISC TreeItemScriptController
  267. #endif