h_tabsheet.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* This file was generated by Maki Compiler, do not edit manually */
  2. #include <precomp.h>
  3. #include <api/api.h>
  4. #include <api/script/objcontroller.h>
  5. #include "h_tabsheet.h"
  6. H_TabSheet::H_TabSheet(ScriptObject *o) : H_GuiObject(o) {
  7. inited = 0;
  8. obj = NULL;
  9. H_hook(o);
  10. }
  11. H_TabSheet::H_TabSheet() {
  12. inited = 0;
  13. obj = NULL;
  14. }
  15. void H_TabSheet::H_hook(ScriptObject *o) {
  16. ASSERT(!inited);
  17. ScriptObjectController *controller = o->vcpu_getController();
  18. obj = controller->cast(o, tabSheetGuid);
  19. if (obj != o && obj != NULL)
  20. o = obj;
  21. else
  22. obj = NULL;
  23. addMonitorObject(o, &tabSheetGuid);
  24. int iter = WASABI_API_APP->app_getInitCount();
  25. if (!loaded || loaded != iter) {
  26. loaded = 1;
  27. }
  28. inited=1;
  29. }
  30. H_TabSheet::~H_TabSheet() {
  31. if (!inited) return;
  32. WASABI_API_MAKI->maki_remDlfRef(this);
  33. }
  34. ScriptObject *H_TabSheet::getHookedObject() {
  35. if (obj != NULL) return obj;
  36. return H_TABSHEET_PARENT::getHookedObject();
  37. }
  38. int H_TabSheet::eventCallback(ScriptObject *object, int dlfid, scriptVar **params, int nparams) {
  39. if (object != getHookedObject()) return 0;
  40. if (H_TABSHEET_PARENT::eventCallback(object, dlfid, params, nparams)) return 1;
  41. return 0;
  42. }
  43. int H_TabSheet::loaded=0;