1
0

svcwnd.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #ifndef _SVCWND_H
  2. #define _SVCWND_H
  3. #include "script.h"
  4. #include "../../common/script/scriptobj.h"
  5. #include "guiobj.h"
  6. #include "../../bfc/svc_enum.h"
  7. class SMap;
  8. class SRegion;
  9. class Container;
  10. class Layout;
  11. // {8776F715-503A-41f9-BD63-FB148AD05765}
  12. static const GUID svcWndGuid =
  13. { 0x8776f715, 0x503a, 0x41f9, { 0xbd, 0x63, 0xfb, 0x14, 0x8a, 0xd0, 0x57, 0x65 } };
  14. #define SVCWND_PARENT GuiObjectWnd
  15. class SvcWndScriptController : public GuiObjectScriptController {
  16. public:
  17. virtual const wchar_t *getClassName();
  18. virtual const wchar_t *getAncestorClassName();
  19. virtual ScriptObjectController *getAncestorController() { return guiController; }
  20. virtual int getNumFunctions();
  21. virtual const function_descriptor_struct *getExportedFunctions();
  22. virtual GUID getClassGuid();
  23. virtual ScriptObject *instantiate();
  24. virtual void destroy(ScriptObject *o);
  25. virtual void *encapsulate(ScriptObject *o);
  26. virtual void deencapsulate(void *o);
  27. private:
  28. static function_descriptor_struct exportedFunction[];
  29. };
  30. extern SvcWndScriptController *svcWndController;
  31. class SvcWnd : public SVCWND_PARENT {
  32. public:
  33. SvcWnd();
  34. virtual ~SvcWnd();
  35. virtual int onLeftButtonDblClk(int x, int y);
  36. virtual int onResize();
  37. virtual void onSetVisible(int v);
  38. virtual int onInit();
  39. virtual int getPreferences(int what);
  40. virtual int handleRatio();
  41. void setGUID(GUID g);
  42. GUID getGUID(void);
  43. virtual int childNotify(ifc_window *child, int msg, intptr_t param1, intptr_t param2);
  44. virtual int setXuiParam(int _xuihandle, int xmlattributeid, const wchar_t *xmlattributename, const wchar_t *value);
  45. virtual int onUnknownXuiParam(const wchar_t *param, const wchar_t *value);
  46. // VCPU
  47. static scriptVar script_vcpu_getGUID(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  48. static scriptVar script_vcpu_getWac(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  49. PtrList<StringW> params;
  50. // End VCPU
  51. protected:
  52. enum {
  53. SVCWND_GUID=0,
  54. SVCWND_DBLCLKACTION,
  55. };
  56. private:
  57. GUID myGUID;
  58. ifc_window *svcwnd;
  59. svc_windowCreate *svc;
  60. int forwarded;
  61. StringW dblClickAction;
  62. int xuihandle;
  63. };
  64. extern char svcWndXuiObjectStr[];
  65. extern char svcWndXuiSvcName[];
  66. class SvcWndXuiSvc : public XuiObjectSvc<SvcWnd, svcWndXuiObjectStr, svcWndXuiSvcName> {};
  67. #endif