123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734 |
- #include <precomp.h>
- #include "xuilist.h"
- #include <api/service/svc_enum.h>
- #include <bfc/parse/paramparser.h>
- #include <api/script/scriptguid.h>
- #include <api/skin/feeds/TextFeedEnum.h>
- // The temporary memory buffer to hold our string returns.
- StringW GuiListScriptController::staticStr;
- // -----------------------------------------------------------------------
- const wchar_t ScriptListXuiObjectStr[] = L"List"; // This is the xml tag
- char ScriptListXuiSvcName[] = "List xui object";
- XMLParamPair ScriptList::params[] = {
- {SCRIPTLIST_SETITEMS, L"ITEMS"},
- {SCRIPTLIST_SETMULTISELECT, L"MULTISELECT"},
- {SCRIPTLIST_SETAUTODESELECT, L"AUTODESELECT"},
- {SCRIPTLIST_SELECT, L"SELECT"},
- {SCRIPTLIST_FEED, L"FEED"},
- {SCRIPTLIST_HOVERSELECT, L"HOVERSELECT"},
- {SCRIPTLIST_SORT, L"SORT"},
- {SCRIPTLIST_SELECTONUPDOWN, L"SELECTONUPDOWN"},
- {SCRIPTLIST_NUMCOLUMNS, L"NUMCOLUMNS"},
- {SCRIPTLIST_COLUMNWIDTHS, L"COLUMNWIDTHS"},
- {SCRIPTLIST_COLUMNLABELS, L"COLUMNLABELS"},
- };
- // -----------------------------------------------------------------------
- ScriptList::ScriptList()
- {
- getScriptObject()->vcpu_setInterface(guilistGuid, (void *)static_cast<ScriptList *>(this));
- getScriptObject()->vcpu_setClassName(L"GuiList"); // this is the script class name
- getScriptObject()->vcpu_setController(guiListController);
- myxuihandle = newXuiHandle();
- CreateXMLParameters(myxuihandle);
- setPreventMultipleSelection(1);
- setVirtual(0);
- feed = NULL;
- multiselect = 0;
- xmlnumcolumns = -1;
- last_numcolumns = 0x80000000; // go ahead and try and be equal to that.
- getGuiObject()->guiobject_getScriptObject()->vcpu_setInterface(listGuid, (void *)this);
- }
- void ScriptList::CreateXMLParameters(int master_handle)
- {
- SCRIPTLIST_PARENT::CreateXMLParameters(master_handle);
- int numParams = sizeof(params) / sizeof(params[0]);
- hintNumberOfParams(myxuihandle, numParams);
- for (int i = 0;i < numParams;i++)
- addParam(myxuihandle, params[i], XUI_ATTRIBUTE_IMPLIED);
- }
- // -----------------------------------------------------------------------
- ScriptList::~ScriptList()
- {
- closeFeed();
- }
- // -----------------------------------------------------------------------
- int ScriptList::setXuiParam(int xuihandle, int xmlattributeid, const wchar_t *xmlattributename, const wchar_t *value)
- {
- if (xuihandle != myxuihandle)
- return SCRIPTLIST_PARENT::setXuiParam(xuihandle, xmlattributeid, xmlattributename, value);
- switch (xmlattributeid)
- {
- case SCRIPTLIST_SETITEMS:
- items = value;
- fillFromParams();
- #ifdef WASABI_COMPILE_CONFIG
- if (getGuiObject()->guiobject_hasCfgAttrib())
- selectFromConfig();
- #endif
- break;
- case SCRIPTLIST_SETMULTISELECT:
- multiselect = WTOI(value);
- break;
- case SCRIPTLIST_SETAUTODESELECT:
- setWantAutoDeselect(WTOI(value));
- break;
- case SCRIPTLIST_SELECT:
- {
- int i = selectEntry(value);
- if (i != -1)
- ensureItemVisible(i);
- else
- selectFirstEntry();
- break;
- }
- case SCRIPTLIST_FEED:
- {
- closeFeed();
- openFeed(value);
- break;
- }
- case SCRIPTLIST_HOVERSELECT:
- {
- setHoverSelect(WTOI(value));
- break;
- }
- case SCRIPTLIST_SORT:
- {
- setAutoSort(WTOB(value));
- break;
- }
- case SCRIPTLIST_SELECTONUPDOWN:
- {
- setSelectOnUpDown(WTOI(value));
- break;
- }
- case SCRIPTLIST_NUMCOLUMNS:
- {
- xmlnumcolumns = WTOI(value);
- setNumColumns();
- break;
- }
- case SCRIPTLIST_COLUMNWIDTHS:
- {
- columnwidths = value;
- setColumnWidths();
- break;
- }
- case SCRIPTLIST_COLUMNLABELS:
- {
- columnlabels = value;
- setColumnLabels();
- break;
- }
- default:
- return 0;
- }
- return 1;
- }
- // -----------------------------------------------------------------------
- int ScriptList::onInit()
- {
- SCRIPTLIST_PARENT::onInit();
- last_numcolumns = 0x80000000;
- setNumColumns(); // Sets widths and labels if necessary
- setPreventMultipleSelection(!multiselect);
- // fillFromParams(); // done by setNumColumns();
- return 1;
- }
- /*
- Moved to script-oriented section
- // -----------------------------------------------------------------------
- void ScriptList::onDoubleClick(int itemnum) {
- #ifdef WASABI_COMPILE_CONFIG
- saveToConfig();
- #endif
- }
- */
- /*
- Moved to script-oriented section
- // -----------------------------------------------------------------------
- void ScriptList::onItemSelection(int itemnum, int selected) {
- SCRIPTLIST_PARENT::onItemSelection(itemnum, selected);
- #ifdef WASABI_COMPILE_CONFIG
- saveToConfig();
- #endif
- }
- */
- // -----------------------------------------------------------------------
- int ScriptList::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)
- {
- SCRIPTLIST_PARENT::onAction(action, param, x, y, p1, p2, data, datalen, source);
- if (!_wcsicmp(action, L"select_all"))
- {
- selectAll(0);
- #ifdef WASABI_COMPILE_CONFIG
- saveToConfig();
- #endif
- }
- if (!_wcsicmp(action, L"deselect_all"))
- {
- deselectAll(0);
- #ifdef WASABI_COMPILE_CONFIG
- saveToConfig();
- #endif
- }
- if (!_wcsicmp(action, L"get_selection"))
- {
- if (source != NULL)
- {
- StringW res(L"");
- for (int i = 0;i < getNumItems();i++)
- {
- if (getItemSelected(i))
- {
- if (!res.isempty()) res += L";";
- res += getSubitemText(i, 0);
- }
- }
- sendAction(source, L"set_selection", res);
- }
- }
- return 1;
- }
- void ScriptList::onSetVisible(int i)
- {
- SCRIPTLIST_PARENT::onSetVisible(i);
- }
- #ifdef WASABI_COMPILE_CONFIG
- // -----------------------------------------------------------------------
- int ScriptList::onReloadConfig()
- {
- SCRIPTLIST_PARENT::onReloadConfig();
- selectFromConfig();
- return 1;
- }
- // -----------------------------------------------------------------------
- void ScriptList::saveToConfig()
- {
- StringW res(L"");
- for (int i = 0;i < getNumItems();i++)
- {
- if (getItemSelected(i))
- {
- if (!res.isempty()) res += L";";
- res += getSubitemText(i, 0);
- }
- }
- getGuiObject()->guiobject_setCfgString(res);
- }
- // -----------------------------------------------------------------------
- void ScriptList::selectFromConfig()
- {
- deselectAll(0);
- const wchar_t *p = getGuiObject()->guiobject_getCfgString();
- if (p != NULL)
- {
- ParamParser pp(p);
- for (int i = 0;i < pp.getNumItems();i++)
- selectEntry(pp.enumItem(i), 0);
- }
- }
- #endif
- // -----------------------------------------------------------------------
- int ScriptList::selectEntry(const wchar_t *e, int cb)
- {
- for (int i = 0;i < getNumItems();i++)
- {
- const wchar_t *si = getSubitemText(i, 0);
- if (WCSCASEEQLSAFE(si, e))
- {
- setSelected(i, 1, cb);
- return i;
- }
- }
- return -1;
- }
- // -----------------------------------------------------------------------
- void ScriptList::fillFromParams()
- {
- deleteAllItems();
- if (!items.isempty())
- {
- ParamParser pp(items);
- if (xmlnumcolumns == -1)
- {
- // OLD WAY
- for (int i = 0;i < pp.getNumItems();i++)
- addItem(pp.enumItem(i), (LPARAM)NULL);
- }
- else
- {
- // NEW WAY
- int i, n = pp.getNumItems();
- for (i = 0; i < n; i++)
- {
- StringW row = pp.enumItem(i);
- ParamParser rp(row, L",");
- addItem(rp.enumItem(0), (LPARAM)NULL);
- int j, m = rp.getNumItems();
- for (j = 1; j < m; j++)
- {
- setSubItem(i, j, rp.enumItem(j));
- }
- }
- }
- }
- }
- // -----------------------------------------------------------------------
- void ScriptList::selectEntries(const wchar_t *entries, int cb)
- {
- ParamParser pp(entries);
- for (int i = 0;i < pp.getNumItems();i++)
- selectEntry(pp.enumItem(i), cb);
- }
- // -----------------------------------------------------------------------
- void ScriptList::setColumnWidths()
- {
- // don't bother if there's no value.
- if (columnwidths.len())
- {
- ParamParser pp(columnwidths);
- int i, n = MIN(pp.getNumItems(), getNumColumns()); // whichever is less.
- for (i = 0; i < n; i++)
- {
- ListColumn *column = getColumn(i);
- if (column)
- {
- column->setWidth(WTOI(pp.enumItem(i)));
- }
- }
- }
- }
- // -----------------------------------------------------------------------
- void ScriptList::setColumnLabels()
- {
- // don't bother if there's no value.
- if (columnlabels.len())
- {
- ParamParser pp(columnlabels);
- int i, n = MIN(pp.getNumItems(), getNumColumns()); // whichever is less.
- for (i = 0; i < n; i++)
- {
- ListColumn *column = getColumn(i);
- if (column)
- {
- column->setLabel(pp.enumItem(i));
- }
- }
- }
- }
- // -----------------------------------------------------------------------
- void ScriptList::setNumColumns()
- {
- if (last_numcolumns == xmlnumcolumns) return ;
- if (xmlnumcolumns == -1)
- {
- // the old way.
- insertColumn(new ListColumn(L"", TRUE));
- }
- else
- {
- // delete all columns.
- int i, n = getNumColumns();
- for (i = 0; i < n; i++)
- {
- this->delColumnByPos(0);
- }
- // create new ones.
- ParamParser cw(columnwidths);
- int nw = cw.getNumItems();
- ParamParser cl(columnlabels);
- int nl = cl.getNumItems();
- for (i = 0; i < xmlnumcolumns; i++)
- {
- const wchar_t *collabel = L"";
- int colwidth = -1; // magic value for "be dynamic"
- if (i < nl)
- {
- collabel = cl.enumItem(i);
- }
- if (i < nw)
- {
- colwidth = WTOI(cw.enumItem(i));
- }
- ListColumn *pCol = new ListColumn(collabel, (colwidth < 0));
- if (colwidth >= 0)
- {
- pCol->setWidth(colwidth);
- }
- insertColumn(pCol);
- }
- fillFromParams();
- }
- last_numcolumns = xmlnumcolumns;
- }
- // -----------------------------------------------------------------------
- void ScriptList::openFeed(const wchar_t *feedid)
- {
- if (!_wcsicmp(feedid, last_feed)) return ;
- feed = TextFeedEnum(feedid).getFirst();
- if (feed != NULL)
- {
- viewer_addViewItem(feed->getDependencyPtr());
- }
- last_feed = feedid;
- }
- // -----------------------------------------------------------------------
- void ScriptList::closeFeed()
- {
- if (feed)
- {
- viewer_delViewItem(feed->getDependencyPtr());
- SvcEnum::release(feed);
- }
- feed = NULL;
- last_feed = L"";
- }
- // -----------------------------------------------------------------------
- int ScriptList::viewer_onEvent(api_dependent *item, const GUID *classguid, int event, intptr_t param, void *ptr, size_t ptrlen)
- {
- if (feed && feed->getDependencyPtr() == item)
- {
- if (event == svc_textFeed::Event_TEXTCHANGE)
- {
- setXuiParam(myxuihandle, SCRIPTLIST_SETITEMS, L"items", (const wchar_t *)ptr);
- return 1;
- }
- }
- return 0;
- }
- // -----------------------------------------------------------------------
- // Callback methods that send hooks into the Script system
- void ScriptList::onSelectAll()
- {
- SCRIPTLIST_PARENT::onSelectAll();
- GuiListScriptController::guilist_onSelectAll(SCRIPT_CALL, getScriptObject());
- }
- void ScriptList::onDelete()
- {
- SCRIPTLIST_PARENT::onDelete();
- GuiListScriptController::guilist_onDelete(SCRIPT_CALL, getScriptObject());
- }
- void ScriptList::onDoubleClick(int itemnum)
- {
- SCRIPTLIST_PARENT::onDoubleClick(itemnum);
- GuiListScriptController::guilist_onDoubleClick(SCRIPT_CALL, getScriptObject(), MAKE_SCRIPT_INT(itemnum));
- #ifdef WASABI_COMPILE_CONFIG
- saveToConfig();
- #endif
- }
- void ScriptList::onLeftClick(int itemnum)
- {
- SCRIPTLIST_PARENT::onLeftClick(itemnum);
- GuiListScriptController::guilist_onLeftClick(SCRIPT_CALL, getScriptObject(), MAKE_SCRIPT_INT(itemnum));
- }
- int ScriptList::onIconLeftClick(int itemnum, int x , int y)
- {
- SCRIPTLIST_PARENT::onIconLeftClick(itemnum, x, y);
- scriptVar v = GuiListScriptController::guilist_onIconLeftClick(SCRIPT_CALL, getScriptObject(), MAKE_SCRIPT_INT(itemnum), MAKE_SCRIPT_INT(x), MAKE_SCRIPT_INT(y));
- if ((v.type != SCRIPT_VOID) && (v.type != SCRIPT_OBJECT) && (v.type != SCRIPT_STRING))
- {
- return GET_SCRIPT_INT(v);
- }
- return 0;
- }
- void ScriptList::onSecondLeftClick(int itemnum)
- {
- SCRIPTLIST_PARENT::onSecondLeftClick(itemnum);
- GuiListScriptController::guilist_onSecondLeftClick(SCRIPT_CALL, getScriptObject(), MAKE_SCRIPT_INT(itemnum));
- }
- int ScriptList::onRightClick(int itemnum)
- {
- SCRIPTLIST_PARENT::onRightClick(itemnum);
- scriptVar v = GuiListScriptController::guilist_onRightClick(SCRIPT_CALL, getScriptObject(), MAKE_SCRIPT_INT(itemnum));
- if ((v.type != SCRIPT_VOID) && (v.type != SCRIPT_OBJECT) && (v.type != SCRIPT_STRING))
- {
- return GET_SCRIPT_BOOLEAN(v);
- }
- return 0;
- }
- int ScriptList::onColumnDblClick(int col, int x, int y)
- {
- SCRIPTLIST_PARENT::onColumnDblClick(col, x, y);
- scriptVar v = GuiListScriptController::guilist_onColumnDblClick(SCRIPT_CALL, getScriptObject(), MAKE_SCRIPT_INT(col), MAKE_SCRIPT_INT(y), MAKE_SCRIPT_INT(x));
- if ((v.type != SCRIPT_VOID) && (v.type != SCRIPT_OBJECT) && (v.type != SCRIPT_STRING))
- {
- return GET_SCRIPT_BOOLEAN(v);
- }
- return 0;
- }
- int ScriptList::onColumnLabelClick(int col, int x, int y)
- {
- SCRIPTLIST_PARENT::onColumnLabelClick(col, x, y);
- scriptVar v = GuiListScriptController::guilist_onColumnLabelClick(SCRIPT_CALL, getScriptObject(), MAKE_SCRIPT_INT(col), MAKE_SCRIPT_INT(y), MAKE_SCRIPT_INT(x));
- if ((v.type != SCRIPT_VOID) && (v.type != SCRIPT_OBJECT) && (v.type != SCRIPT_STRING))
- {
- return GET_SCRIPT_BOOLEAN(v);
- }
- return 1; // don't ask me, that's what ListWnd does.
- }
- void ScriptList::onItemSelection(int itemnum, int selected)
- {
- SCRIPTLIST_PARENT::onItemSelection(itemnum, selected);
- GuiListScriptController::guilist_onItemSelection(SCRIPT_CALL, getScriptObject(), MAKE_SCRIPT_INT(itemnum), MAKE_SCRIPT_INT(selected));
- #ifdef WASABI_COMPILE_CONFIG
- saveToConfig();
- #endif
- }
- // -----------------------------------------------------------------------
- // Script Object
- GuiListScriptController _guiListController;
- GuiListScriptController *guiListController = &_guiListController;
- // -- Functions table -------------------------------------
- function_descriptor_struct GuiListScriptController::exportedFunction[] = {
- {L"getNumItems", 0, (void*)GuiListScriptController::guilist_getNumItems },
- {L"getWantAutoDeselect", 0, (void*)guilist_getWantAutoDeselect },
- {L"setWantAutoDeselect", 1, (void*)guilist_setWantAutoDeselect },
- {L"onSetVisible", 1, (void*)guilist_onSetVisible },
- {L"setAutoSort", 1, (void*)guilist_setAutoSort },
- {L"next", 0, (void*)guilist_next },
- {L"selectCurrent", 0, (void*)guilist_selectCurrent },
- {L"selectFirstEntry", 0, (void*)guilist_selectFirstEntry },
- {L"previous", 0, (void*)guilist_previous },
- {L"pagedown", 0, (void*)guilist_pagedown },
- {L"pageup", 0, (void*)guilist_pageup },
- {L"home", 0, (void*)guilist_home },
- {L"end", 0, (void*)guilist_end },
- {L"reset", 0, (void*)guilist_reset },
- {L"addColumn", 3, (void*)guilist_addColumn },
- {L"getNumColumns", 0, (void*)guilist_getNumColumns },
- {L"getColumnWidth", 1, (void*)guilist_getColumnWidth },
- {L"setColumnWidth", 2, (void*)guilist_setColumnWidth },
- {L"getColumnLabel", 1, (void*)guilist_getColumnLabel },
- {L"setColumnLabel", 2, (void*)guilist_setColumnLabel },
- {L"getColumnNumeric", 1, (void*)guilist_getColumnNumeric },
- {L"setColumnDynamic", 2, (void*)guilist_setColumnDynamic },
- {L"isColumnDynamic", 1, (void*)guilist_isColumnDynamic },
- {L"setMinimumSize", 1, (void*)guilist_setMinimumSize },
- {L"addItem", 1, (void*)guilist_addItem },
- {L"insertItem", 2, (void*)guilist_insertItem },
- {L"getLastAddedItemPos", 0, (void*)guilist_getLastAddedItemPos },
- {L"setSubItem", 3, (void*)guilist_setSubItem },
- {L"deleteAllItems", 0, (void*)guilist_deleteAllItems },
- {L"deleteByPos", 1, (void*)guilist_deleteByPos },
- {L"getItemLabel", 2, (void*)guilist_getItemLabel },
- {L"setItemLabel", 2, (void*)guilist_setItemLabel },
- {L"setItemIcon", 2, (void*)guilist_setItemIcon },
- {L"getItemIcon", 1, (void*)guilist_getItemIcon },
- {L"setShowIcons", 1, (void*)guilist_setShowIcons },
- {L"getShowIcons", 0, (void*)guilist_getShowIcons },
- {L"setIconWidth", 1, (void*)guilist_setIconWidth },
- {L"getIconWidth", 0, (void*)guilist_getIconWidth },
- {L"setIconHeight", 1, (void*)guilist_setIconHeight },
- {L"getIconHeight", 0, (void*)guilist_getIconHeight },
- {L"onIconLeftclick", 3, (void*)guilist_onIconLeftClick },
- {L"getItemSelected", 1, (void*)guilist_getItemSelected },
- {L"isItemFocused", 1, (void*)guilist_isItemFocused },
- {L"getItemFocused", 0, (void*)guilist_getItemFocused },
- {L"setItemFocused", 1, (void*)guilist_setItemFocused },
- {L"ensureItemVisible", 1, (void*)guilist_ensureItemVisible },
- {L"invalidateColumns", 0, (void*)guilist_invalidateColumns },
- {L"scrollAbsolute", 1, (void*)guilist_scrollAbsolute },
- {L"scrollRelative", 1, (void*)guilist_scrollRelative },
- {L"scrollLeft", 1, (void*)guilist_scrollLeft },
- {L"scrollRight", 1, (void*)guilist_scrollRight },
- {L"scrollUp", 1, (void*)guilist_scrollUp },
- {L"scrollDown", 1, (void*)guilist_scrollDown },
- {L"getSubitemText", 2, (void*)guilist_getSubitemText },
- {L"getFirstItemSelected", 0, (void*)guilist_getFirstItemSelected },
- {L"getNextItemSelected", 1, (void*)guilist_getNextItemSelected },
- {L"selectAll", 0, (void*)guilist_selectAll },
- {L"deselectAll", 0, (void*)guilist_deselectAll },
- {L"invertSelection", 0, (void*)guilist_invertSelection },
- {L"invalidateItem", 1, (void*)guilist_invalidateItem },
- {L"getFirstItemVisible", 0, (void*)guilist_getFirstItemVisible },
- {L"getLastItemVisible", 0, (void*)guilist_getLastItemVisible },
- {L"setFontSize", 1, (void*)guilist_setFontSize },
- {L"getFontSize", 0, (void*)guilist_getFontSize },
- {L"jumpToNext", 1, (void*)guilist_jumpToNext },
- {L"scrollToItem", 1, (void*)guilist_scrollToItem },
- {L"resort", 0, (void*)guilist_resort },
- {L"getSortDirection", 0, (void*)guilist_getSortDirection },
- {L"getSortColumn", 0, (void*)guilist_getSortColumn },
- {L"setSortColumn", 1, (void*)guilist_setSortColumn },
- {L"setSortDirection", 1, (void*)guilist_setSortDirection },
- {L"getItemCount", 0, (void*)guilist_getItemCount },
- {L"setSelectionStart", 1, (void*)guilist_setSelectionStart },
- {L"setSelectionEnd", 1, (void*)guilist_setSelectionEnd },
- {L"setSelected", 2, (void*)guilist_setSelected },
- {L"toggleSelection", 2, (void*)guilist_toggleSelection },
- {L"getHeaderHeight", 0, (void*)guilist_getHeaderHeight },
- {L"getPreventMultipleSelection", 0, (void*)guilist_getPreventMultipleSelection },
- {L"setPreventMultipleSelection", 1, (void*)guilist_setPreventMultipleSelection },
- {L"moveItem", 2, (void*)guilist_moveItem },
- {L"onSelectAll", 0, (void*)guilist_onSelectAll },
- {L"onDelete", 0, (void*)guilist_onDelete },
- {L"onDoubleClick", 1, (void*)guilist_onDoubleClick },
- {L"onLeftClick", 1, (void*)guilist_onLeftClick },
- {L"onSecondLeftClick", 1, (void*)guilist_onSecondLeftClick },
- {L"onRightClick", 1, (void*)guilist_onRightClick },
- {L"onColumnDblClick", 3, (void*)guilist_onColumnDblClick },
- {L"onColumnLabelClick", 3, (void*)guilist_onColumnLabelClick },
- {L"onItemSelection", 2, (void*)guilist_onItemSelection },
- };
- ScriptObject *GuiListScriptController::instantiate()
- {
- ScriptList *sp = new ScriptList;
- ASSERT(sp != NULL);
- return sp->getScriptObject();
- }
- void GuiListScriptController::destroy(ScriptObject *o)
- {
- ScriptList *sp = static_cast<ScriptList *>(o->vcpu_getInterface(guilistGuid));
- ASSERT(sp != NULL);
- delete sp;
- }
- void *GuiListScriptController::encapsulate(ScriptObject *o)
- {
- return NULL; // no encapsulation for guilists yet
- }
- void GuiListScriptController::deencapsulate(void *o)
- {}
- int GuiListScriptController::getNumFunctions()
- {
- return sizeof(exportedFunction) / sizeof(function_descriptor_struct);
- }
- const function_descriptor_struct *GuiListScriptController::getExportedFunctions()
- {
- return exportedFunction;
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getNumItems(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int a = 0;
- if (sp) a = sp->getNumItems();
- return MAKE_SCRIPT_INT(a);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getWantAutoDeselect(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int a = 0;
- if (sp)
- {
- sp->wantAutoDeselect();
- }
- return MAKE_SCRIPT_INT(a);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setWantAutoDeselect(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar want)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _want = GET_SCRIPT_INT(want);
- sp->setWantAutoDeselect(_want);
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_onSetVisible(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar show)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _show = GET_SCRIPT_INT(show);
- sp->onSetVisible(_show);
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setAutoSort(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar dosort)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _dosort = GET_SCRIPT_INT(dosort);
- sp->setAutoSort(!!_dosort);
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_next(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- sp->next();
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_selectCurrent(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- sp->selectCurrent();
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_selectFirstEntry(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- sp->selectFirstEntry();
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_previous(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- sp->previous();
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_pagedown(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- sp->pagedown();
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_pageup(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- sp->pageup();
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_home(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- sp->home();
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_end(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- sp->end();
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_reset(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- sp->reset();
- }
- RETURN_SCRIPT_VOID;
- }
- /*int*/ scriptVar GuiListScriptController::guilist_addColumn(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*String*/ scriptVar name, /*int*/ scriptVar width, /*int*/ scriptVar numeric)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- StringW _name = GET_SCRIPT_STRING(name);
- int _width = GET_SCRIPT_INT(width);
- int _numeric = GET_SCRIPT_INT(numeric);
- retval = sp->addColumn(_name, _width, _numeric);
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getNumColumns(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getNumColumns();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getColumnWidth(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar column)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- int _column = GET_SCRIPT_INT(column);
- retval = sp->getColumnWidth(_column);
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setColumnWidth(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar column, /*int*/ scriptVar newwidth)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _column = GET_SCRIPT_INT(column);
- int _newwidth = GET_SCRIPT_INT(newwidth);
- ListColumn *c = sp->getColumn(_column);
- if (c)
- {
- c->setWidth(_newwidth);
- }
- }
- RETURN_SCRIPT_VOID;
- }
- /*String*/ scriptVar GuiListScriptController::guilist_getColumnLabel(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar column)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- const wchar_t * retval = L"";
- if (sp)
- {
- int _column = GET_SCRIPT_INT(column);
- ListColumn *c = sp->getColumn(_column);
- if (c)
- {
- retval = c->getLabel();
- }
- }
- return MAKE_SCRIPT_STRING(retval);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setColumnLabel(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar column, /*String*/ scriptVar newlabel)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _column = GET_SCRIPT_INT(column);
- StringW _newlabel = GET_SCRIPT_STRING(newlabel);
- ListColumn *c = sp->getColumn(_column);
- if (c)
- {
- c->setLabel(_newlabel);
- }
- }
- RETURN_SCRIPT_VOID;
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getColumnNumeric(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar column)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- int _column = GET_SCRIPT_INT(column);
- ListColumn *c = sp->getColumn(_column);
- if (c)
- {
- retval = c->getNumeric();
- }
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setColumnDynamic(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar column, /*int*/ scriptVar isdynamic)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _column = GET_SCRIPT_INT(column);
- int _isdynamic = GET_SCRIPT_INT(isdynamic);
- ListColumn *c = sp->getColumn(_column);
- if (c)
- {
- c->setDynamic(_isdynamic);
- }
- }
- RETURN_SCRIPT_VOID;
- }
- /*int*/ scriptVar GuiListScriptController::guilist_isColumnDynamic(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar column)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- int _column = GET_SCRIPT_INT(column);
- ListColumn *c = sp->getColumn(_column);
- if (c)
- {
- retval = c->isDynamic();
- }
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setMinimumSize(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar size)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _size = GET_SCRIPT_INT(size);
- sp->setMinimumSize(_size);
- }
- RETURN_SCRIPT_VOID;
- }
- /*int*/ scriptVar GuiListScriptController::guilist_addItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*String*/ scriptVar label)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- StringW _label = GET_SCRIPT_STRING(label);
- retval = sp->addItem(_label, 0);
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_insertItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos, /*String*/ scriptVar label)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- StringW _label = GET_SCRIPT_STRING(label);
- retval = sp->insertItem(_pos, _label, 0);
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getLastAddedItemPos(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getLastAddedItemPos();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setSubItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos, /*int*/ scriptVar subpos, /*String*/ scriptVar txt)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- int _subpos = GET_SCRIPT_INT(subpos);
- StringW _txt = GET_SCRIPT_STRING(txt);
- sp->setSubItem(_pos, _subpos, _txt);
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_deleteAllItems(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- sp->deleteAllItems();
- }
- RETURN_SCRIPT_VOID;
- }
- /*int*/ scriptVar GuiListScriptController::guilist_deleteByPos(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- retval = sp->deleteByPos(_pos);
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*String*/ scriptVar GuiListScriptController::guilist_getItemLabel(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos, /*int*/ scriptVar subpos)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- wchar_t retval[255] = { 0 };
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- int _subpos = GET_SCRIPT_INT(subpos);
- sp->getItemLabel(_pos, _subpos, retval, 254);
- retval[254]=0;
- }
- staticStr = retval;
- return MAKE_SCRIPT_STRING(staticStr);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setItemLabel(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos, /*String*/ scriptVar text)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- StringW _text = GET_SCRIPT_STRING(text);
- sp->setItemLabel(_pos, _text);
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setItemIcon(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos, /*String*/ scriptVar bitmapId)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- StringW _bitmapId = GET_SCRIPT_STRING(bitmapId);
- sp->setItemIcon(_pos, _bitmapId);
- }
- RETURN_SCRIPT_VOID;
- }
- /*string*/ scriptVar GuiListScriptController::guilist_getItemIcon(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- SkinBitmap * bmp = sp->getItemIcon(_pos);
- staticStr = bmp->getBitmapName();
- }
- return MAKE_SCRIPT_STRING(staticStr);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setShowIcons(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar onoff)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _onoff = GET_SCRIPT_INT(onoff);
- sp->setShowIcons(_onoff);
- }
- RETURN_SCRIPT_VOID;
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getShowIcons(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getShowIcons();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setIconWidth(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar val)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _val = GET_SCRIPT_INT(val);
- sp->setIconWidth(_val);
- }
- RETURN_SCRIPT_VOID;
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getIconWidth(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getIconWidth();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setIconHeight(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar val)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _val = GET_SCRIPT_INT(val);
- sp->setIconHeight(_val);
- }
- RETURN_SCRIPT_VOID;
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getIconHeight(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getIconHeight();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getItemSelected(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- retval = sp->getItemSelected(_pos);
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_isItemFocused(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- retval = sp->getItemFocused(_pos);
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getItemFocused(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getItemFocused();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setItemFocused(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- sp->setItemFocused(_pos);
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_ensureItemVisible(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- sp->ensureItemVisible(_pos);
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_invalidateColumns(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- sp->invalidateColumns();
- }
- RETURN_SCRIPT_VOID;
- }
- /*int*/ scriptVar GuiListScriptController::guilist_scrollAbsolute(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar x)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- int _x = GET_SCRIPT_INT(x);
- retval = sp->scrollAbsolute(_x);
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_scrollRelative(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar x)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- int _x = GET_SCRIPT_INT(x);
- retval = sp->scrollRelative(_x);
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_scrollLeft(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar lines)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- //int _lines = GET_SCRIPT_INT(lines);
- sp->scrollLeft();
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_scrollRight(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar lines)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- //int _lines = GET_SCRIPT_INT(lines);
- sp->scrollRight();
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_scrollUp(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar lines)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- //int _lines = GET_SCRIPT_INT(lines);
- sp->scrollUp();
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_scrollDown(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar lines)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- //int _lines = GET_SCRIPT_INT(lines);
- sp->scrollDown();
- }
- RETURN_SCRIPT_VOID;
- }
- /*String*/ scriptVar GuiListScriptController::guilist_getSubitemText(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos, /*int*/ scriptVar subpos)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- const wchar_t *retval = 0;
-
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- int _subpos = GET_SCRIPT_INT(subpos);
- retval = sp->getSubitemText(_pos, _subpos);
- }
- return MAKE_SCRIPT_STRING(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getFirstItemSelected(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getFirstItemSelected();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getNextItemSelected(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar lastpos)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- int _lastpos = GET_SCRIPT_INT(lastpos);
- retval = sp->getNextItemSelected(_lastpos);
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_selectAll(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->selectAll();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_deselectAll(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->deselectAll();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_invertSelection(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->invertSelection();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_invalidateItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- retval = sp->invalidateItem(_pos);
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getFirstItemVisible(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getFirstItemVisible();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getLastItemVisible(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getLastItemVisible();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_setFontSize(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar size)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- int _size = GET_SCRIPT_INT(size);
- retval = sp->setFontSize(_size);
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getFontSize(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getFontSize();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_jumpToNext(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*char*/ scriptVar c)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- char _c = GET_SCRIPT_INT(c);
- sp->jumpToNext(_c);
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_scrollToItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- sp->scrollToItem(_pos);
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_resort(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- sp->resort();
- }
- RETURN_SCRIPT_VOID;
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getSortDirection(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getSortDirection();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getSortColumn(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getSortColumn();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setSortColumn(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar col)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _col = GET_SCRIPT_INT(col);
- sp->setSortColumn(_col);
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setSortDirection(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar dir)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _dir = GET_SCRIPT_INT(dir);
- sp->setSortDirection(_dir);
- }
- RETURN_SCRIPT_VOID;
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getItemCount(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getItemCount();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setSelectionStart(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- sp->setSelectionStart(_pos);
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setSelectionEnd(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- sp->setSelectionEnd(_pos);
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_setSelected(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos, /*int*/ scriptVar selected)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- int _selected = GET_SCRIPT_INT(selected);
- sp->setSelected(_pos, _selected);
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_toggleSelection(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar pos, /*int*/ scriptVar setfocus)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _pos = GET_SCRIPT_INT(pos);
- int _setfocus = GET_SCRIPT_INT(setfocus);
- sp->toggleSelection(_pos, _setfocus);
- }
- RETURN_SCRIPT_VOID;
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getHeaderHeight(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getHeaderHeight();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_getPreventMultipleSelection(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- retval = sp->getPreventMultipleSelection();
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_setPreventMultipleSelection(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar val)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- int retval = 0;
- if (sp)
- {
- int _val = GET_SCRIPT_INT(val);
- retval = sp->setPreventMultipleSelection(_val);
- }
- return MAKE_SCRIPT_INT(retval);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_moveItem(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar from, /*int*/ scriptVar to)
- {
- SCRIPT_FUNCTION_INIT
- ScriptList *sp = static_cast<ScriptList*>(o->vcpu_getInterface(guilistGuid));
- if (sp)
- {
- int _from = GET_SCRIPT_INT(from);
- int _to = GET_SCRIPT_INT(to);
- sp->moveItem(_from, _to);
- }
- RETURN_SCRIPT_VOID;
- }
- /*void*/ scriptVar GuiListScriptController::guilist_onSelectAll(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- PROCESS_HOOKS0(o, guiListController);
- SCRIPT_FUNCTION_CHECKABORTEVENT;
- SCRIPT_EXEC_EVENT0(o);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_onDelete(SCRIPT_FUNCTION_PARAMS, ScriptObject *o)
- {
- SCRIPT_FUNCTION_INIT
- PROCESS_HOOKS0(o, guiListController);
- SCRIPT_FUNCTION_CHECKABORTEVENT;
- SCRIPT_EXEC_EVENT0(o);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_onDoubleClick(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar itemnum)
- {
- SCRIPT_FUNCTION_INIT
- PROCESS_HOOKS1(o, guiListController, itemnum);
- SCRIPT_FUNCTION_CHECKABORTEVENT;
- SCRIPT_EXEC_EVENT1(o, itemnum);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_onLeftClick(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar itemnum)
- {
- SCRIPT_FUNCTION_INIT
- PROCESS_HOOKS1(o, guiListController, itemnum);
- SCRIPT_FUNCTION_CHECKABORTEVENT;
- SCRIPT_EXEC_EVENT1(o, itemnum);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_onIconLeftClick(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar itemnum, /*int*/ scriptVar x, /*int*/ scriptVar y)
- {
- SCRIPT_FUNCTION_INIT
- PROCESS_HOOKS3(o, guiListController, itemnum, x, y);
- SCRIPT_FUNCTION_CHECKABORTEVENT;
- SCRIPT_EXEC_EVENT3(o, itemnum, x, y);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_onSecondLeftClick(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar itemnum)
- {
- SCRIPT_FUNCTION_INIT
- PROCESS_HOOKS1(o, guiListController, itemnum);
- SCRIPT_FUNCTION_CHECKABORTEVENT;
- SCRIPT_EXEC_EVENT1(o, itemnum);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_onRightClick(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar itemnum)
- {
- SCRIPT_FUNCTION_INIT
- PROCESS_HOOKS1(o, guiListController, itemnum);
- SCRIPT_FUNCTION_CHECKABORTEVENT;
- SCRIPT_EXEC_EVENT1(o, itemnum);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_onColumnDblClick(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar col, /*int*/ scriptVar x, /*int*/ scriptVar y)
- {
- SCRIPT_FUNCTION_INIT
- PROCESS_HOOKS3(o, guiListController, col, x, y);
- SCRIPT_FUNCTION_CHECKABORTEVENT;
- SCRIPT_EXEC_EVENT3(o, col, x, y);
- }
- /*int*/ scriptVar GuiListScriptController::guilist_onColumnLabelClick(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar col, /*int*/ scriptVar x, /*int*/ scriptVar y)
- {
- SCRIPT_FUNCTION_INIT
- PROCESS_HOOKS3(o, guiListController, col, x, y);
- SCRIPT_FUNCTION_CHECKABORTEVENT;
- SCRIPT_EXEC_EVENT3(o, col, x, y);
- }
- /*void*/ scriptVar GuiListScriptController::guilist_onItemSelection(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, /*int*/ scriptVar itemnum, /*int*/ scriptVar selected)
- {
- SCRIPT_FUNCTION_INIT
- PROCESS_HOOKS2(o, guiListController, itemnum, selected);
- SCRIPT_FUNCTION_CHECKABORTEVENT;
- SCRIPT_EXEC_EVENT2(o, itemnum, selected);
- }
|