Update of /cvsroot/wxlua/wxLua/apps/wxluacan/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10289/apps/wxluacan/src
Modified Files:
cansim.cpp
Log Message:
added wxluacan sample to build system
Index: cansim.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/cansim.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** cansim.cpp 3 Feb 2006 17:06:15 -0000 1.1
--- cansim.cpp 3 Feb 2006 18:40:50 -0000 1.2
***************
*** 24,28 ****
// Include icon header
#if defined(__WXGTK__) || defined(__WXMOTIF__)
! #include "mondrian.xpm"
#endif
--- 24,28 ----
// Include icon header
#if defined(__WXGTK__) || defined(__WXMOTIF__)
! #include "art/wxluasmall.xpm"
#endif
***************
*** 45,49 ****
EVT_CLOSE(MyFrame::OnCloseWindow)
EVT_TIMER(-1, MyFrame::OnTimer)
! EVT_MENU_RANGE(MenuOption_First, MenuOption_Last, MyFrame::OnOption)
EVT_MENU( lua_script, MyFrame::OnRunScript)
EVT_MENU( wxID_UNDO, MyFrame::OnUndo)
--- 45,49 ----
EVT_CLOSE(MyFrame::OnCloseWindow)
EVT_TIMER(-1, MyFrame::OnTimer)
! EVT_MENU_RANGE(MenuOption_First, MenuOption_Last, MyFrame::OnOption)
EVT_MENU( lua_script, MyFrame::OnRunScript)
EVT_MENU( wxID_UNDO, MyFrame::OnUndo)
***************
*** 66,75 ****
SetStatusText( _T("Welcome to a2dCanvas sample!") );
! SetIcon(wxICON(mondrian));
//default 1000,1000 mapping
mainCan = m_canvas = new wxlCan( this, wxID_ANY, wxPoint(0,0), wxSize(10,10) );
! m_interp = wxLuaState(NULL, wxID_ANY);
m_interp.SetEventHandler( &wxGetApp() );
--- 66,75 ----
SetStatusText( _T("Welcome to a2dCanvas sample!") );
! SetIcon(wxICON(wxLuaSmall));
//default 1000,1000 mapping
mainCan = m_canvas = new wxlCan( this, wxID_ANY, wxPoint(0,0), wxSize(10,10) );
! m_interp = wxLuaState(NULL, wxID_ANY);
m_interp.SetEventHandler( &wxGetApp() );
***************
*** 131,140 ****
menuLogical->Append( Origin_MoveLeft, _T("Move &right\tCtrl-L") );
menuLogical->Append( Origin_MoveRight, _T("Move &left\tCtrl-R") );
! menuLogical->AppendSeparator();
m_menuObjects = new wxMenu;
m_menuObjects->Append( Object_AddRect, _T("Add rectangle") );
m_menuObjects->Append( Object_AddCircle, _T("Add circle") );
! m_menuObjects->Append( lua_script, _T("Run Script") );
m_menuObjects->AppendSeparator();
--- 131,140 ----
menuLogical->Append( Origin_MoveLeft, _T("Move &right\tCtrl-L") );
menuLogical->Append( Origin_MoveRight, _T("Move &left\tCtrl-R") );
! menuLogical->AppendSeparator();
m_menuObjects = new wxMenu;
m_menuObjects->Append( Object_AddRect, _T("Add rectangle") );
m_menuObjects->Append( Object_AddCircle, _T("Add circle") );
! m_menuObjects->Append( lua_script, _T("Run Script") );
m_menuObjects->AppendSeparator();
***************
*** 247,251 ****
m_canvas->Refresh();
! }
--- 247,251 ----
m_canvas->Refresh();
! }
***************
*** 261,267 ****
);
! if ( !fullPath.IsEmpty() && ::wxFileExists( fullPath ) )
{
! if ( 0 != m_interp.RunFile( fullPath ) )
{
wxLogWarning( _("Error in Lua Script") );
--- 261,267 ----
);
! if ( !fullPath.IsEmpty() && ::wxFileExists( fullPath ) )
{
! if ( 0 != m_interp.RunFile( fullPath ) )
{
wxLogWarning( _("Error in Lua Script") );
|