#include <wxlcallb.h>
Public Member Functions | |
wxLuaEventCallback () | |
virtual | ~wxLuaEventCallback () |
virtual wxString | Connect (const wxLuaState &wxlState, int lua_func_stack_idx, wxWindowID win_id, wxWindowID last_id, wxEventType eventType, wxEvtHandler *evtHandler) |
void | ClearwxLuaState () |
wxLuaState | GetwxLuaState () const |
wxWindowID | GetId () const |
wxWindowID | GetLastId () const |
wxEventType | GetEventType () const |
wxEvtHandler * | GetEvtHandler () const |
int | GetLuaFuncRef () const |
const wxLuaBindEvent * | GetwxLuaBindEvent () const |
wxString | GetInfo () const |
void | OnAllEvents (wxEvent &event) |
virtual void | OnEvent (wxEvent *event) |
Protected Attributes | |
int | m_luafunc_ref |
wxLuaState | m_wxlState |
wxEvtHandler * | m_evtHandler |
wxWindowID | m_id |
wxWindowID | m_last_id |
const wxLuaBindEvent * | m_wxlBindEvent |
Definition at line 35 of file wxlcallb.h.
wxLuaEventCallback::wxLuaEventCallback | ( | ) |
Definition at line 28 of file wxlcallb.cpp.
wxLuaEventCallback::~wxLuaEventCallback | ( | ) | [virtual] |
Definition at line 35 of file wxlcallb.cpp.
References m_luafunc_ref, m_wxlState, wxLuaState::Ok(), wxLuaState::RemoveTrackedEventCallback(), wxlua_lreg_refs_key, and wxLuaState::wxluaR_Unref().
void wxLuaEventCallback::ClearwxLuaState | ( | ) |
Definition at line 85 of file wxlcallb.cpp.
References m_wxlState.
Referenced by wxLuaStateRefData::ClearCallbacks(), and wxLuaWinDestroyCallback::OnDestroy().
wxString wxLuaEventCallback::Connect | ( | const wxLuaState & | wxlState, | |
int | lua_func_stack_idx, | |||
wxWindowID | win_id, | |||
wxWindowID | last_id, | |||
wxEventType | eventType, | |||
wxEvtHandler * | evtHandler | |||
) | [virtual] |
Definition at line 46 of file wxlcallb.cpp.
References wxLuaState::GetBindEvent(), m_evtHandler, m_id, m_last_id, m_luafunc_ref, m_wxlBindEvent, m_wxlState, wxLuaState::Ok(), OnAllEvents(), wxlua_lreg_refs_key, and WXLUAEVENTCALLBACK_NOROUTINE.
wxEventType wxLuaEventCallback::GetEventType | ( | ) | const |
Definition at line 60 of file wxlcallb.h.
Referenced by GetInfo().
wxEvtHandler* wxLuaEventCallback::GetEvtHandler | ( | ) | const |
Definition at line 61 of file wxlcallb.h.
Referenced by wxLuaState::AddTrackedEventCallback(), and wxLuaWinDestroyCallback::OnDestroy().
wxWindowID wxLuaEventCallback::GetId | ( | ) | const |
Definition at line 58 of file wxlcallb.h.
wxString wxLuaEventCallback::GetInfo | ( | ) | const |
Definition at line 90 of file wxlcallb.cpp.
References GetEventType(), wxLuaState::GetwxLuaTypeName(), lua2wx(), m_evtHandler, m_id, m_last_id, m_wxlBindEvent, m_wxlState, wxLuaBindEvent::name, and wxLuaBindEvent::wxluatype.
Referenced by wxLuaDebugData::EnumerateTable(), and wxLuaState::GetTrackedEventCallbackInfo().
wxWindowID wxLuaEventCallback::GetLastId | ( | ) | const |
Definition at line 59 of file wxlcallb.h.
int wxLuaEventCallback::GetLuaFuncRef | ( | ) | const |
Definition at line 62 of file wxlcallb.h.
Referenced by wxLuaWinDestroyCallback::OnDestroy().
const wxLuaBindEvent* wxLuaEventCallback::GetwxLuaBindEvent | ( | ) | const |
Definition at line 64 of file wxlcallb.h.
wxLuaState wxLuaEventCallback::GetwxLuaState | ( | ) | const |
Definition at line 57 of file wxlcallb.h.
Referenced by OnAllEvents().
void wxLuaEventCallback::OnAllEvents | ( | wxEvent & | event | ) |
Definition at line 99 of file wxlcallb.cpp.
References GetwxLuaState(), and OnEvent().
Referenced by Connect().
void wxLuaEventCallback::OnEvent | ( | wxEvent * | event | ) | [virtual] |
Definition at line 122 of file wxlcallb.cpp.
References wxLuaState::GetBindClass(), wxLuaState::lua_CheckStack(), wxLuaState::lua_GetTop(), wxLuaState::lua_PushValue(), wxLuaState::lua_SetFenv(), wxLuaState::lua_SetTop(), wxLuaState::LuaPCall(), m_luafunc_ref, m_wxlBindEvent, m_wxlState, wxLuaBindEvent::name, wxLuaState::Ok(), p_wxluatype_wxEvent, wxLuaState::wxlua_Error(), wxlua_lreg_refs_key, WXLUA_TUNKNOWN, wxLuaState::wxluaR_GetRef(), wxLuaState::wxluaT_PushUserDataType(), wxLuaBindClass::wxluatype, and wxLuaBindEvent::wxluatype.
Referenced by OnAllEvents().
wxEvtHandler* wxLuaEventCallback::m_evtHandler [protected] |
Definition at line 83 of file wxlcallb.h.
wxWindowID wxLuaEventCallback::m_id [protected] |
Definition at line 84 of file wxlcallb.h.
wxWindowID wxLuaEventCallback::m_last_id [protected] |
Definition at line 85 of file wxlcallb.h.
int wxLuaEventCallback::m_luafunc_ref [protected] |
Definition at line 81 of file wxlcallb.h.
Referenced by Connect(), OnEvent(), and ~wxLuaEventCallback().
const wxLuaBindEvent* wxLuaEventCallback::m_wxlBindEvent [protected] |
Definition at line 86 of file wxlcallb.h.
wxLuaState wxLuaEventCallback::m_wxlState [protected] |
Definition at line 82 of file wxlcallb.h.
Referenced by ClearwxLuaState(), Connect(), GetInfo(), OnEvent(), and ~wxLuaEventCallback().