123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #include <precomp.h>
- #include "xuiobjdirwnd.h"
- const wchar_t ScriptObjDirWndXuiObjectStr[] = L"ObjDirView"; // This is the xml tag
- char ScriptObjDirWndXuiSvcName[] = "ObjDirView xui object";
- XMLParamPair ScriptObjDirWnd::params[] = {
- {DEFAULTDISPLAY, L"DEFAULTDISPLAY"},
- {SCRIPTOBJDIRWND_DIR, L"DIR"},
- {DISPLAYTARGET, L"DISPLAYTARGET"},
- {FORCEVIRTUAL, L"FORCEVIRTUAL"},
- {SCRIPTOBJDIRWND_ACTION_TARGET, L"TARGET"},
- };
- ScriptObjDirWnd::ScriptObjDirWnd()
- {
- myxuihandle = newXuiHandle();
- CreateXMLParameters(myxuihandle);
- }
- void ScriptObjDirWnd::CreateXMLParameters(int master_handle)
- {
- //SCRIPTOBJDIRWND_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);
- }
- ScriptObjDirWnd::~ScriptObjDirWnd() { }
- int ScriptObjDirWnd::setXuiParam(int xuihandle, int xmlattributeid, const wchar_t *xmlattributename, const wchar_t *value) {
- if (xuihandle != myxuihandle)
- return SCRIPTOBJDIRWND_PARENT::setXuiParam(xuihandle, xmlattributeid, xmlattributename, value);
- switch (xmlattributeid) {
- case SCRIPTOBJDIRWND_DIR:
- setTargetDirName(value);
- break;
- case SCRIPTOBJDIRWND_ACTION_TARGET:
- setActionTarget(value);
- break;
- case DISPLAYTARGET:
- setDisplayTarget(value);
- break;
- case DEFAULTDISPLAY:
- setDefaultDisplay(value);
- break;
- case FORCEVIRTUAL:
- setVirtual(WTOI(value));
- break;
- default:
- return 0;
- }
- return 1;
- }
|