Update of /cvsroot/simspark/simspark/contrib/rsgedit
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6468
Modified Files:
mainframe.cpp mainframe.h
Log Message:
- added OnTabStartScript method
Index: mainframe.h
===================================================================
RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** mainframe.h 8 Jul 2007 14:25:12 -0000 1.18
--- mainframe.h 8 Jul 2007 14:43:53 -0000 1.19
***************
*** 157,160 ****
--- 157,161 ----
void OnTreeItemRightClick(wxTreeEvent& event);
+ void OnTabStartScript(wxCommandEvent& event);
void OnTabCloseOther(wxCommandEvent& event);
void OnTabClose(wxCommandEvent& event);
Index: mainframe.cpp
===================================================================
RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** mainframe.cpp 8 Jul 2007 14:25:12 -0000 1.25
--- mainframe.cpp 8 Jul 2007 14:43:53 -0000 1.26
***************
*** 115,118 ****
--- 115,119 ----
EVT_MENU(ID_TAB_CLOSE, mainframe::OnTabClose)
EVT_MENU(ID_TAB_CLOSE_OTHER, mainframe::OnTabCloseOther)
+ EVT_MENU(ID_TAB_STARTSCRIPT, mainframe::OnTabStartScript)
EVT_SCI_SAVEPOINTREACHED(wxID_ANY, mainframe::OnEditSavePointReached)
***************
*** 1262,1265 ****
--- 1263,1278 ----
}
+ void mainframe::OnTabStartScript(wxCommandEvent& event)
+ {
+ wxScintilla* edit = dynamic_cast<wxScintilla*>(mCtrNotebook->GetCurrentPage());
+ if (edit == 0)
+ {
+ event.Skip();
+ return;
+ }
+
+ SparkEdit::GetInstance().SetStartScript(mCtrNotebook, edit);
+ }
+
void mainframe::OnTabCloseOther(wxCommandEvent& event)
{
|