1
0

rootobj.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef __ROOTOBJ_H
  2. #define __ROOTOBJ_H
  3. #include <bfc/dispatch.h>
  4. #include <api/script/objects/rootobjcbi.h>
  5. #include <api/script/scriptobji.h>
  6. class ScriptObject;
  7. class ScriptObjectI;
  8. class RootObject;
  9. // RootObjectInstance::this == RootObjectInstance::getScriptObject()->vcpu_getInterface(rootObjectInstanceGuid);
  10. // {F6D49468-4036-41a1-9683-C372416AD31B}
  11. static const GUID rootObjectInstanceGuid =
  12. { 0xf6d49468, 0x4036, 0x41a1, { 0x96, 0x83, 0xc3, 0x72, 0x41, 0x6a, 0xd3, 0x1b } };
  13. // Instantiate this class to create an object from which you can trap notify events, or inherit from
  14. // it if you want to implement your own descendant of script class 'Object' (see GuiObjectWnd)
  15. class RootObjectInstance : public RootObjectCallbackI
  16. {
  17. public:
  18. RootObjectInstance();
  19. virtual ~RootObjectInstance();
  20. virtual RootObject *getRootObject();
  21. virtual ScriptObject *getScriptObject();
  22. virtual void rootobjectcb_onNotify(const wchar_t *a, const wchar_t *b, int c, int d) {};
  23. virtual const wchar_t *getClassName();
  24. virtual void notify(const wchar_t *s, const wchar_t *t, int u, int v);
  25. private:
  26. void rootobject_init();
  27. ScriptObjectI my_script_object;
  28. RootObject * my_root_object;
  29. };
  30. #endif