1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- /* This file was generated by Maki Compiler, do not edit manually */
- #include <precomp.h>
- #include <api/script/objcontroller.h>
- #include "h_edit.h"
- H_Edit::H_Edit(ScriptObject *o) : H_GuiObject(o) {
- inited = 0;
- obj = NULL;
- H_hook(o);
- }
- H_Edit::H_Edit() {
- inited = 0;
- obj = NULL;
- }
- void H_Edit::H_hook(ScriptObject *o) {
- ASSERT(!inited);
- ScriptObjectController *controller = o->vcpu_getController();
- obj = controller->cast(o, editGuid);
- if (obj != o && obj != NULL)
- o = obj;
- else
- obj = NULL;
- addMonitorObject(o, &editGuid);
- int iter = WASABI_API_APP->app_getInitCount();
- if (!loaded || loaded != iter) {
- onenter_id= WASABI_API_MAKI->maki_addDlfRef(o->vcpu_getController(), L"onEnter", this);
- onabort_id= WASABI_API_MAKI->maki_addDlfRef(o->vcpu_getController(), L"onAbort", this);
- onidleeditupdate_id= WASABI_API_MAKI->maki_addDlfRef(o->vcpu_getController(), L"onIdleEditUpdate", this);
- oneditupdate_id= WASABI_API_MAKI->maki_addDlfRef(o->vcpu_getController(), L"onEditUpdate", this);
- loaded = 1;
- }
- inited=1;
- }
- H_Edit::~H_Edit() {
- if (!inited) return;
- WASABI_API_MAKI->maki_remDlfRef(this);
- }
- ScriptObject *H_Edit::getHookedObject() {
- if (obj != NULL) return obj;
- return H_EDIT_PARENT::getHookedObject();
- }
- int H_Edit::eventCallback(ScriptObject *object, int dlfid, scriptVar **params, int nparams) {
- if (object != getHookedObject()) return 0;
- if (H_EDIT_PARENT::eventCallback(object, dlfid, params, nparams)) return 1;
- if (dlfid == onenter_id) { hook_onEnter(); return 1; }
- if (dlfid == onabort_id) { hook_onAbort(); return 1; }
- if (dlfid == onidleeditupdate_id) { hook_onIdleEditUpdate(); return 1; }
- if (dlfid == oneditupdate_id) { hook_onEditUpdate(); return 1; }
- return 0;
- }
- int H_Edit::onenter_id=0;
- int H_Edit::onabort_id=0;
- int H_Edit::onidleeditupdate_id=0;
- int H_Edit::oneditupdate_id=0;
- int H_Edit::loaded=0;
|