1
0

spopup.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //PORTABLE
  2. #ifndef _SPOPUP_H
  3. #define _SPOPUP_H
  4. #include <api/wnd/popup.h>
  5. #include <api/script/objects/rootobject.h>
  6. // {F4787AF4-B2BB-4ef7-9CFB-E74BA9BEA88D}
  7. static const GUID popupGuid =
  8. { 0xf4787af4, 0xb2bb, 0x4ef7, { 0x9c, 0xfb, 0xe7, 0x4b, 0xa9, 0xbe, 0xa8, 0x8d } };
  9. #define SPOPUP_PARENT PopupMenu
  10. class PopupScriptController: public ScriptObjectControllerI {
  11. public:
  12. virtual const wchar_t *getClassName();
  13. virtual const wchar_t *getAncestorClassName();
  14. virtual ScriptObjectController *getAncestorController() { return rootScriptObjectController; }
  15. virtual int getNumFunctions();
  16. virtual const function_descriptor_struct *getExportedFunctions();
  17. virtual GUID getClassGuid();
  18. virtual ScriptObject *instantiate();
  19. virtual void destroy(ScriptObject *o);
  20. virtual void *encapsulate(ScriptObject *o);
  21. virtual void deencapsulate(void *o);
  22. private:
  23. static function_descriptor_struct exportedFunction[];
  24. };
  25. extern PopupScriptController *popupController;
  26. #ifndef WANT_NEW_POPUPMENU
  27. class SPopup : public SPOPUP_PARENT, public RootObjectInstance {
  28. #else
  29. class SPopup : public SPOPUP_PARENT {
  30. #endif
  31. public:
  32. SPopup();
  33. virtual ~SPopup();
  34. private:
  35. public:
  36. static scriptVar script_vcpu_addSubMenu(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar popup, scriptVar str);
  37. static scriptVar script_vcpu_addCommand(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar str, scriptVar cmd, scriptVar checked, scriptVar disabled);
  38. static scriptVar script_vcpu_addSeparator(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  39. static scriptVar script_vcpu_popAtXY(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar x, scriptVar y);
  40. static scriptVar script_vcpu_popAtMouse(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  41. static scriptVar script_vcpu_getNumCommands(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  42. static scriptVar script_vcpu_disableCommand(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar cmd, scriptVar disable);
  43. static scriptVar script_vcpu_checkCommand(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar cmd, scriptVar check);
  44. };
  45. #endif