c_tabsheet.cpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* This file was generated by Maki Compiler, do not edit manually */
  2. #include <precomp.h>
  3. #include <api/api.h>
  4. #include "c_tabsheet.h"
  5. #include <api/script/objcontroller.h>
  6. C_TabSheet::C_TabSheet(ScriptObject *object) : C_GuiObject(object) {
  7. inited = 0;
  8. obj = NULL;
  9. C_hook(object);
  10. }
  11. C_TabSheet::C_TabSheet() {
  12. inited = 0;
  13. obj = NULL;
  14. }
  15. void C_TabSheet::C_hook(ScriptObject *object) {
  16. ASSERT(!inited);
  17. ScriptObjectController *controller = object->vcpu_getController();
  18. obj = controller->cast(object, tabSheetGuid);
  19. if (obj != object && obj != NULL)
  20. controller = obj->vcpu_getController();
  21. else
  22. obj = NULL;
  23. int iter = WASABI_API_APP->app_getInitCount();
  24. if (!loaded || loaded != iter) {
  25. loaded = iter;
  26. getcurpage_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"getCurPage", this);
  27. setcurpage_id = WASABI_API_MAKI->maki_addDlfRef(controller, L"setCurPage", this);
  28. }
  29. inited = 1;
  30. }
  31. C_TabSheet::~C_TabSheet() {
  32. }
  33. ScriptObject *C_TabSheet::getScriptObject() {
  34. if (obj != NULL) return obj;
  35. return C_TABSHEET_PARENT::getScriptObject();
  36. }
  37. int C_TabSheet::getCurPage() {
  38. ASSERT(inited);
  39. return GET_SCRIPT_INT(WASABI_API_MAKI->maki_callFunction(getScriptObject(), getcurpage_id, NULL));
  40. }
  41. void C_TabSheet::setCurPage(int a) {
  42. ASSERT(inited);
  43. scriptVar a = MAKE_SCRIPT_INT(a);
  44. scriptVar *params[1] = {&a};
  45. WASABI_API_MAKI->maki_callFunction(getScriptObject(), setcurpage_id, params);
  46. }
  47. int C_TabSheet::loaded=0;
  48. int C_TabSheet::getcurpage_id=0;
  49. int C_TabSheet::setcurpage_id=0;