From: John L. <jr...@us...> - 2005-11-29 05:45:18
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21610/wxLua/apps/wxlua/src Modified Files: Makefile lconsole.cpp lconsole.h wxlua.h Log Message: Makefile - lib order is important cleanup in lconsole, wxlua app all static int s_wxXXX lua tags now s_wxluatag_wxXXX to make them easier to find functions to get the structs with the bindings are prepended with wxLuaXXX DECLARE/IMPLEMENT_CLASS replaced with either XXX_ABSTRACT/DYNAMIC_CLASS window ids for the stacktree now ID_WXLUA_XXX Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile 25 Nov 2005 02:43:01 -0000 1.7 --- Makefile 29 Nov 2005 05:45:09 -0000 1.8 *************** *** 26,30 **** WXCXXFLAGS = $(shell $(WXCONFIG) --cxxflags) WXLDLIBS = $(shell $(WXCONFIG) --libs) ! WXCXX = $(shell $(WXCONFIG) --cxx) WXLIB_DIR = $(WXPREFIX)/lib # ---------------------------------------------------------------------------- --- 26,30 ---- WXCXXFLAGS = $(shell $(WXCONFIG) --cxxflags) WXLDLIBS = $(shell $(WXCONFIG) --libs) ! WXCXX = $(shell $(WXCONFIG) --cxx) WXLIB_DIR = $(WXPREFIX)/lib # ---------------------------------------------------------------------------- *************** *** 36,40 **** PROGRAM = wxLua ! LUA_LIBS = $(WXLUA_DIR)/lib/liblua.a $(WXLUA_DIR)/lib/liblualib.a WXLUA_LIB = $(WXBASENAME)_wxlua-$(WXRELEASE) WXLUADEBUG_LIB = $(WXBASENAME)_wxluadebug-$(WXRELEASE) --- 36,40 ---- PROGRAM = wxLua ! LUA_LIBS = $(WXLUA_DIR)/lib/liblua.a $(WXLUA_DIR)/lib/liblualib.a WXLUA_LIB = $(WXBASENAME)_wxlua-$(WXRELEASE) WXLUADEBUG_LIB = $(WXBASENAME)_wxluadebug-$(WXRELEASE) *************** *** 52,56 **** # This will build a shared wxLua app, dynamicly linked to .so libs # -l$(WXFL_LIB) ! APPEXTRALIBS=-L$(WXLIB_DIR) -L$(WXLUA_LIBDIR) -l$(WXLUA_LIB) -l$(WXLUADEBUG_LIB) -l$(WXLUASOCKET_LIB) -l$(WXSTC_LIB) -l$(WXXRC_LIB) $(LUA_LIBS) -l$(WXLUABIND_LIB) OBJECTS=wxlua.o --- 52,56 ---- # This will build a shared wxLua app, dynamicly linked to .so libs # -l$(WXFL_LIB) ! APPEXTRALIBS=-L$(WXLIB_DIR) -L$(WXLUA_LIBDIR) -l$(WXSTC_LIB) -l$(WXXRC_LIB) -l$(WXLUABIND_LIB) -l$(WXLUA_LIB) -l$(WXLUADEBUG_LIB) -l$(WXLUASOCKET_LIB) $(LUA_LIBS) OBJECTS=wxlua.o *************** *** 60,72 **** $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< ! all: lua wxLuaLib wxLuaDebugLib wxLuaSocketLib wxLuaBindings $(PROGRAM) ! $(PROGRAM): $(OBJECTS) $(LUA_LIBS) wxLuaLib wxLuaDebugLib wxLuaSocketLib wxLuaBindings ! $(CXX) -o $@ $(OBJECTS) $(LDLIBS) $(APPEXTRALIBS) lua: @(cd $(WXLUA_DIR)/modules/lua && make) ! bindings: @(cd $(WXLUA_DIR)/bindings/wxwidgets && make) --- 60,72 ---- $(CXX) -c $(CXXFLAGS) $(APPEXTRADEFS) -o $@ $< ! all: lua wxLuaLib wxLuaDebugLib wxLuaSocketLib wxLuaBindings $(PROGRAM) ! $(PROGRAM): $(OBJECTS) $(LUA_LIBS) wxLuaLib wxLuaDebugLib wxLuaSocketLib wxLuaBindings ! $(CXX) -o $@ $(OBJECTS) $(LDLIBS) $(APPEXTRALIBS) lua: @(cd $(WXLUA_DIR)/modules/lua && make) ! bindings: @(cd $(WXLUA_DIR)/bindings/wxwidgets && make) Index: lconsole.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/lconsole.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** lconsole.h 7 Jun 2005 04:17:29 -0000 1.1 --- lconsole.h 29 Nov 2005 05:45:09 -0000 1.2 *************** *** 17,24 **** #include "wxlua/include/wxlua.h" ! class wxDebugPanel : public wxPanel { public: ! wxDebugPanel(wxWindow *parent, lua_State *pState); void FillListbox(); --- 17,28 ---- #include "wxlua/include/wxlua.h" ! // ---------------------------------------------------------------------------- ! // wxLuaDebugPanel ! // ---------------------------------------------------------------------------- ! ! class wxLuaDebugPanel : public wxPanel { public: ! wxLuaDebugPanel(wxWindow *parent, lua_State *pState); void FillListbox(); *************** *** 28,38 **** wxListBox *m_listBox; - DECLARE_EVENT_TABLE() - void OnSizeWindow(wxSizeEvent& event); void OnEraseBackground(wxEraseEvent& event); }; ! // define our console class class wxLuaConsole : public wxFrame { --- 32,45 ---- wxListBox *m_listBox; void OnSizeWindow(wxSizeEvent& event); void OnEraseBackground(wxEraseEvent& event); + + DECLARE_EVENT_TABLE() }; ! // ---------------------------------------------------------------------------- ! // wxLuaConsole - define our console class ! // ---------------------------------------------------------------------------- ! class wxLuaConsole : public wxFrame { *************** *** 42,47 **** private: - DECLARE_EVENT_TABLE() - void OnCloseWindow(wxCloseEvent& event); void OnEraseBackground(wxEraseEvent& event); --- 49,52 ---- *************** *** 51,57 **** wxTextCtrl *m_textCtrl; wxLuaStandaloneApp *m_pApp; ! wxDebugPanel *m_panel; bool m_fError; }; ! #endif --- 56,64 ---- wxTextCtrl *m_textCtrl; wxLuaStandaloneApp *m_pApp; ! wxLuaDebugPanel *m_panel; bool m_fError; + + DECLARE_EVENT_TABLE() }; ! #endif // WX_LUA_CONSOLE_H Index: wxlua.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxlua.h 26 Nov 2005 08:46:57 -0000 1.5 --- wxlua.h 29 Nov 2005 05:45:09 -0000 1.6 *************** *** 29,52 **** #include "wx/app.h" class LuaHandler; ! class wxLuaEvent; class wxLuaStandaloneApp : public wxApp { - private: - wxLuaStackFrame *m_pStackFrame; - LuaHandler *m_luaHandler; - wxLuaInterpreter *m_luaInterpreter; - lua_State *m_luaState; - #ifdef __WXMSW__ - wxLuaConsole *m_pConsole; - #endif - bool m_fMemoryBitmapAdded; - #if wxCHECK_VERSION(2, 3, 0) - LuaDebugTarget *m_pDebugTarget; - #endif - - DECLARE_EVENT_TABLE(); - public: // Override the base class virtual functions --- 29,41 ---- #include "wx/app.h" + class WXDLLIMPEXP_WXLUA wxLuaEvent; class LuaHandler; ! ! // ---------------------------------------------------------------------------- ! // wxLuaStandaloneApp ! // ---------------------------------------------------------------------------- class wxLuaStandaloneApp : public wxApp { public: // Override the base class virtual functions *************** *** 55,59 **** void DisplayError(const wxString &strError) const; ! // set the lua console #ifdef __WXMSW__ void SetLuaConsole(wxLuaConsole *pConsole) { m_pConsole = pConsole; } --- 44,48 ---- void DisplayError(const wxString &strError) const; ! // set the lua console #ifdef __WXMSW__ void SetLuaConsole(wxLuaConsole *pConsole) { m_pConsole = pConsole; } *************** *** 65,69 **** static int LUACALL PanicFunction(lua_State * /*L*/); ! // register all the classes, methods, etc. in the generated list void RegisterClasses(lua_State *L); --- 54,58 ---- static int LUACALL PanicFunction(lua_State * /*L*/); ! // register all the classes, methods, etc. in the generated list void RegisterClasses(lua_State *L); *************** *** 76,79 **** --- 65,82 ---- void OnDebugTableEnum(wxLuaDebugEvent &event); void OnDebugStackEntryEnum(wxLuaDebugEvent &event); + + wxLuaStackFrame *m_pStackFrame; + LuaHandler *m_luaHandler; + wxLuaInterpreter *m_luaInterpreter; + lua_State *m_luaState; + #ifdef __WXMSW__ + wxLuaConsole *m_pConsole; + #endif + bool m_fMemoryBitmapAdded; + #if wxCHECK_VERSION(2, 3, 0) + LuaDebugTarget *m_pDebugTarget; + #endif + + DECLARE_EVENT_TABLE(); }; Index: lconsole.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/lconsole.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** lconsole.cpp 7 Jun 2005 04:17:29 -0000 1.1 --- lconsole.cpp 29 Nov 2005 05:45:09 -0000 1.2 *************** *** 14,18 **** #include "wx/wxprec.h" ! #ifdef __BORLANDC__ #pragma hdrstop --- 14,18 ---- #include "wx/wxprec.h" ! #ifdef __BORLANDC__ #pragma hdrstop *************** *** 33,44 **** #include "lconsole.h" ! BEGIN_EVENT_TABLE(wxDebugPanel, wxPanel) ! EVT_ERASE_BACKGROUND(wxDebugPanel::OnEraseBackground) ! EVT_SIZE(wxDebugPanel::OnSizeWindow) END_EVENT_TABLE() ! wxDebugPanel::wxDebugPanel(wxWindow *parent, lua_State *pState) : ! wxPanel(parent, -1, wxPoint(0, 0), wxSize(50, 1500)), ! m_pState(pState) { m_listBox = new wxListBox( this, --- 33,48 ---- #include "lconsole.h" ! // ---------------------------------------------------------------------------- ! // wxLuaDebugPanel ! // ---------------------------------------------------------------------------- ! ! BEGIN_EVENT_TABLE(wxLuaDebugPanel, wxPanel) ! EVT_ERASE_BACKGROUND(wxLuaDebugPanel::OnEraseBackground) ! EVT_SIZE(wxLuaDebugPanel::OnSizeWindow) END_EVENT_TABLE() ! wxLuaDebugPanel::wxLuaDebugPanel(wxWindow *parent, lua_State *pState) ! : wxPanel(parent, wxID_ANY, wxPoint(0, 0), wxSize(50, 1500)), ! m_pState(pState) { m_listBox = new wxListBox( this, *************** *** 50,64 **** } ! void wxDebugPanel::OnSizeWindow(wxSizeEvent& event) { wxSize size = event.GetSize(); m_listBox->SetSize(0, 0, size.x, size.y); } ! ! void wxDebugPanel::FillListbox() { ! int nIndex = 0; lua_Debug luaDebug; ! wxString buffer; m_listBox->Clear(); --- 54,68 ---- } ! void wxLuaDebugPanel::OnSizeWindow(wxSizeEvent& event) { wxSize size = event.GetSize(); m_listBox->SetSize(0, 0, size.x, size.y); } ! ! void wxLuaDebugPanel::FillListbox() { ! int nIndex = 0; lua_Debug luaDebug; ! wxString buffer; m_listBox->Clear(); *************** *** 73,77 **** { if (luaDebug.name != NULL) ! buffer.Printf(wxT("function %s"), luaDebug.name); else --- 77,81 ---- { if (luaDebug.name != NULL) ! buffer.Printf(wxT("function %s"), luaDebug.name); else *************** *** 81,89 **** { if (luaDebug.name != NULL) ! buffer.Printf(wxT("function %s line %u"), luaDebug.name, lineNumber); else ! buffer.Printf(wxT("{global} line %u"), lineNumber); } --- 85,93 ---- { if (luaDebug.name != NULL) ! buffer.Printf(wxT("function %s line %u"), luaDebug.name, lineNumber); else ! buffer.Printf(wxT("{global} line %u"), lineNumber); } *************** *** 97,104 **** } ! void wxDebugPanel::OnEraseBackground(wxEraseEvent& WXUNUSED(event)) { } BEGIN_EVENT_TABLE(wxLuaConsole, wxFrame) EVT_CLOSE(wxLuaConsole::OnCloseWindow) --- 101,112 ---- } ! void wxLuaDebugPanel::OnEraseBackground(wxEraseEvent& WXUNUSED(event)) { } + // ---------------------------------------------------------------------------- + // wxLuaConsole + // ---------------------------------------------------------------------------- + BEGIN_EVENT_TABLE(wxLuaConsole, wxFrame) EVT_CLOSE(wxLuaConsole::OnCloseWindow) *************** *** 106,134 **** END_EVENT_TABLE() ! wxLuaConsole::wxLuaConsole(wxLuaStandaloneApp *pApp, lua_State *pState) : ! m_pApp(pApp), ! m_fError(false), ! wxFrame(0, -1, wxT("wxLua Console"), wxPoint(0, 0), wxSize(250, 340)) { pApp->SetLuaConsole(this); ! SetIcon(wxICON(LUA)); ! m_splitter = new wxSplitterWindow(this, ! -1, ! wxPoint(0, 0), ! wxSize(0, 0), wxSP_3DSASH); ! m_textCtrl = new wxTextCtrl( m_splitter, ! -1, ! wxT(""), ! wxPoint(0, 0), ! wxSize(0, 0), wxTE_MULTILINE | wxTE_READONLY ! #ifdef __WXMSW__ | wxTE_RICH ! #endif ! ); ! m_panel = new wxDebugPanel( m_splitter, pState); m_splitter->SplitHorizontally( m_textCtrl, m_panel, 150); m_splitter->SetMinimumPaneSize(50); --- 114,141 ---- END_EVENT_TABLE() ! wxLuaConsole::wxLuaConsole(wxLuaStandaloneApp *pApp, lua_State *pState) ! : wxFrame(0, -1, wxT("wxLua Console"), wxPoint(0, 0), wxSize(250, 340)), ! m_pApp(pApp), m_fError(false), { pApp->SetLuaConsole(this); ! SetIcon(wxICON(LUA)); ! m_splitter = new wxSplitterWindow(this, ! -1, ! wxPoint(0, 0), ! wxSize(0, 0), wxSP_3DSASH); ! m_textCtrl = new wxTextCtrl( m_splitter, ! -1, ! wxT(""), ! wxPoint(0, 0), ! wxSize(0, 0), wxTE_MULTILINE | wxTE_READONLY ! #ifdef __WXMSW__ | wxTE_RICH ! #endif ! ); ! m_panel = new wxLuaDebugPanel( m_splitter, pState); m_splitter->SplitHorizontally( m_textCtrl, m_panel, 150); m_splitter->SetMinimumPaneSize(50); *************** *** 141,145 **** void wxLuaConsole::OnCloseWindow(wxCloseEvent&) { ! m_pApp->SetLuaConsole(NULL); Destroy(); if (m_fError) --- 148,152 ---- void wxLuaConsole::OnCloseWindow(wxCloseEvent&) { ! m_pApp->SetLuaConsole(NULL); Destroy(); if (m_fError) |