xuiquerylist.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef __QUERYLIST_H
  2. #define __QUERYLIST_H
  3. #include <api/wnd/wndclass/guiobjwnd.h>
  4. #ifdef WASABI_COMPILE_METADB
  5. #include <api/skin/widgets/db/autoquerylist.h>
  6. #endif
  7. #include <api/script/objcontroller.h>
  8. #ifdef WASABI_COMPILE_METADB
  9. #define QUERYLIST_PARENT AutoQueryList
  10. #else
  11. #define QUERYLIST_PARENT GuiObjectWnd
  12. #endif
  13. // -----------------------------------------------------------------------
  14. class ScriptQueryList : public QUERYLIST_PARENT {
  15. public:
  16. ScriptQueryList();
  17. virtual ~ScriptQueryList();
  18. virtual int setXuiParam(int xuihandle, int xmlattributeid, const wchar_t *xmlattributename, const wchar_t *value);
  19. void setTitle(const char *name);
  20. #ifdef WASABI_COMPILE_METADB
  21. void onResetSubqueries();
  22. virtual int onAction(const wchar_t *action, const wchar_t *param=NULL, int x=-1, int y=-1, intptr_t p1=0, intptr_t p2=0, void *data=NULL, size_t datalen=0, api_window *source=NULL);
  23. #endif
  24. private:
  25. enum {
  26. QUERYLIST_SETTITLE = 0,
  27. };
  28. static XMLParamPair params[];
  29. int myxuihandle;
  30. };
  31. // -----------------------------------------------------------------------
  32. class QueryListScriptController: public ScriptObjectControllerI {
  33. public:
  34. virtual const wchar_t *getClassName() { return L"QueryList"; }
  35. virtual const wchar_t *getAncestorClassName() { return L"GuiObject"; }
  36. virtual ScriptObjectController *getAncestorController() { return WASABI_API_MAKI->maki_getController(guiObjectGuid); }
  37. virtual int getNumFunctions();
  38. virtual const function_descriptor_struct *getExportedFunctions();
  39. virtual GUID getClassGuid() { return queryListGuid; }
  40. virtual ScriptObject *instantiate();
  41. virtual void destroy(ScriptObject *o);
  42. virtual void *encapsulate(ScriptObject *o);
  43. virtual void deencapsulate(void *o);
  44. static scriptVar querylist_onResetQuery(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  45. private:
  46. static function_descriptor_struct exportedFunction[];
  47. };
  48. extern QueryListScriptController *queryListController;
  49. // -----------------------------------------------------------------------
  50. extern char QueryListXuiObjectStr[];
  51. extern char QueryListXuiSvcName[];
  52. class QueryListXuiSvc : public XuiObjectSvc<ScriptQueryList, QueryListXuiObjectStr, QueryListXuiSvcName> {};
  53. #endif