Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void __fastcall TSystemColorTableForm::FormCloseQuery(TObject *Sender, bool &CanClose)
- {
- CanClose = true;
- if(m_form)
- {
- c_form *m_frame = (c_form *)m_form;
- c_lua &lua = m_frame->GetLua();
- if(lua.IsFunction("on_close_query"))
- {
- CanClose = lua.callT<bool>("on_close_query",(lua_Integer)Sender);
- }
- }
- }
- void __fastcall TSystemColorTableForm::FormClose(TObject *Sender, TCloseAction &Action)
- {
- //TCloseAction : unsigned char { caNone, caHide, caFree, caMinimize };
- Action = caFree;
- if(m_form)
- {
- c_form *m_frame = (c_form *)m_form;
- c_lua &lua = m_frame->GetLua();
- if(lua.IsFunction("on_close"))
- {
- Action = (TCloseAction)lua.callT<lua_Integer>("on_close",(lua_Integer)Sender);
- }
- }
- }
- FormConstructor
- RUNMODULE("utils/module_form","RestoreDialogFormStorage",m_form.Object())
- RUNMODULE("utils/module_form","RestoreStatusKeeper",m_form.Object())
- function on_close(Sender)
- --TCloseAction : unsigned char { caNone, caHide, caFree, caMinimize };
- --on_close = nil
- RUNMODULE("utils/module_form","StoreStatusKeeper",m_form.Object())
- return 2
- end
- function on_close_query(Sender)
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement