guru.h 900 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //PORTABLE
  2. #ifndef _GURU_H
  3. #define _GURU_H
  4. #include <api/wnd/basewnd.h>
  5. #ifdef WASABI_COMPILE_WND
  6. #define GURU_PARENT BaseWnd
  7. #else
  8. class _Guru {};
  9. #define GURU_PARENT _Guru
  10. #endif
  11. class SystemObject;
  12. #define GURU_TIMERID 2482
  13. class Guru : public GURU_PARENT {
  14. public:
  15. #ifdef WASABI_COMPILE_WND
  16. Guru();
  17. virtual ~Guru();
  18. #endif
  19. static void spawn(SystemObject *_script, int code, const wchar_t *pub = NULL, int intinfo = 0);
  20. #ifdef WASABI_COMPILE_WND
  21. virtual int onPaint(Canvas *canvas);
  22. virtual int onLeftButtonUp(int x, int y);
  23. virtual int onInit();
  24. void setCode(int c);
  25. void setPublicTxt(const wchar_t *t);
  26. void setIntInfo(int info);
  27. #endif
  28. #ifdef WASABI_COMPILE_WND
  29. protected:
  30. virtual void timerCallback(int id);
  31. private:
  32. int code;
  33. const wchar_t *txt;
  34. int fcount;
  35. int intinfo;
  36. static int mustquit;
  37. static int last_iterator;
  38. static SystemObject * script;
  39. #endif
  40. };
  41. #endif