@@ -8,64 +8,60 @@ CUIDialogWndEx::CUIDialogWndEx()
88
99CUIDialogWndEx::~CUIDialogWndEx ()
1010{
11- delete_data (m_callbacks);
11+ delete_data (m_callbacks);
1212}
1313
14- void CUIDialogWndEx::Register (CUIWindow* pChild)
14+ void CUIDialogWndEx::Register (CUIWindow* pChild)
1515{
16- pChild->SetMessageTarget (this );
16+ pChild->SetMessageTarget (this );
1717}
1818
1919void CUIDialogWndEx::Register (CUIWindow* pChild, LPCSTR name)
2020{
21- pChild->SetWindowName (name);
22- pChild->SetMessageTarget (this );
21+ pChild->SetWindowName (name);
22+ pChild->SetMessageTarget (this );
2323}
2424
2525void CUIDialogWndEx::SendMessage (CUIWindow* pWnd, s16 msg, void * pData)
2626{
27- event_comparer ec (pWnd,msg);
27+ event_comparer ec (pWnd,msg);
2828
29- CALLBACK_IT it = std::find_if (m_callbacks.begin (),m_callbacks.end (),ec);
30- if (it==m_callbacks.end ())
31- return inherited::SendMessage (pWnd, msg, pData);
29+ CALLBACK_IT it = std::find_if (m_callbacks.begin (),m_callbacks.end (),ec);
30+ if (it==m_callbacks.end ())
31+ return inherited::SendMessage (pWnd, msg, pData);
3232
33- ((*it)->m_callback )();
33+ ((*it)->m_callback )();
3434
35- // if ( (*it)->m_cpp_callback )
36- // (*it)->m_cpp_callback(pData);
35+ // if ( (*it)->m_cpp_callback )
36+ // (*it)->m_cpp_callback(pData);
3737}
3838
3939bool CUIDialogWndEx::Load (LPCSTR xml_name)
4040{
41- return true ;
41+ return true ;
4242}
4343
44- SCallbackInfo* CUIDialogWndEx::NewCallback ()
44+ SCallbackInfo* CUIDialogWndEx::NewCallback ()
4545{
46- m_callbacks.push_back ( xr_new<SCallbackInfo>() );
47- return m_callbacks.back ();
46+ m_callbacks.push_back ( xr_new<SCallbackInfo>() );
47+ return m_callbacks.back ();
4848}
4949
50- void CUIDialogWndEx::AddCallback (LPCSTR control_id, s16 evt, const luabind::functor<void > &functor, const luabind::object &object)
51- { AddCallback (control_id, evt, functor, object); }
52-
53- void CUIDialogWndEx::AddCallback (LPCSTR control_id, s16 evt,
54- const luabind::object &functor, const luabind::object &object)
50+ void CUIDialogWndEx::AddCallback (LPCSTR control_id, s16 evt, const luabind::functor<void > &functor, const luabind::object &object)
5551{
56- SCallbackInfo* c = NewCallback ();
57- c->m_callback .set (functor,object);
58- c->m_control_name = control_id;
59- c->m_event = evt;
52+ SCallbackInfo* c = NewCallback ();
53+ c->m_callback .set (functor,object);
54+ c->m_control_name = control_id;
55+ c->m_event = evt;
6056}
6157
6258
6359
6460bool CUIDialogWndEx::OnKeyboardAction (int dik, EUIMessages keyboard_action)
6561{
66- return inherited::OnKeyboardAction (dik,keyboard_action);
62+ return inherited::OnKeyboardAction (dik,keyboard_action);
6763}
6864void CUIDialogWndEx::Update ()
6965{
70- inherited::Update ();
66+ inherited::Update ();
7167}
0 commit comments