From: Markus R. <rol...@us...> - 2007-06-23 13:37:02
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29374/contrib/rsgedit Modified Files: aboutDlg.cpp agentframe.cpp constants.h mainframe.cpp mainframe.h propertyframe.cpp rsgedit.vcproj rsgedit.wxg Added Files: sparkedit.cpp sparkedit.h Log Message: - merged RSGEDIT_SCINTILLA branch Index: constants.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/constants.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** constants.h 15 Jun 2007 10:42:40 -0000 1.8 --- constants.h 23 Jun 2007 13:36:28 -0000 1.9 *************** *** 61,65 **** ID_LOG_CHANNEL_NORMAL = (wxID_HIGHEST+37), ID_LOG_CHANNEL_WARNING = (wxID_HIGHEST+38), ! ID_LOG_CHANNEL_ERROR = (wxID_HIGHEST+39) }; --- 61,67 ---- ID_LOG_CHANNEL_NORMAL = (wxID_HIGHEST+37), ID_LOG_CHANNEL_WARNING = (wxID_HIGHEST+38), ! ID_LOG_CHANNEL_ERROR = (wxID_HIGHEST+39), ! ! ID_FILE_SAVE = (wxID_HIGHEST+40) }; Index: mainframe.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mainframe.h 15 Jun 2007 10:42:40 -0000 1.15 --- mainframe.h 23 Jun 2007 13:36:28 -0000 1.16 *************** *** 23,28 **** --- 23,33 ---- #endif + #ifndef MAINFRAME_H + #define MAINFRAME_H + #include <wx/wx.h> #include <wx/image.h> + #include <wx/wxflatnotebook/wxflatnotebook.h> + #include <wx/wxscintilla.h> #include "constants.h" #include "sparktree.h" *************** *** 30,36 **** #include <oxygen/sceneserver/scenedict.h> - #ifndef MAINFRAME_H - #define MAINFRAME_H - class SparkGLCanvas; class SparkContextEvent; --- 35,38 ---- *************** *** 99,102 **** --- 101,107 ---- void OnUpdateFileOpen(wxUpdateUIEvent& event); + void OnFileSave(wxCommandEvent& event); + void OnUpdateFileSave(wxUpdateUIEvent& event); + void OnFileReload(wxCommandEvent& event); void OnUpdateFileReload(wxUpdateUIEvent& event); *************** *** 143,146 **** --- 148,153 ---- void UpdateLogChannelState(); void InitTreeNodeProperties(); + void SelectCanvasTab(); + void SaveModified(); void OnTreeItemExpanding(wxTreeEvent& event); *************** *** 149,152 **** --- 156,165 ---- void OnTreeItemRightClick(wxTreeEvent& event); + void OnTabClosing(wxFlatNotebookEvent& event); + void OnTabChanged(wxFlatNotebookEvent& event); + + void OnEditSavePointReached(wxScintillaEvent& event); + void OnEditSavePointLeft(wxScintillaEvent& event); + void OnSparkContext(SparkContextEvent& event); *************** *** 179,183 **** wxSplitterWindow* window_1; wxPanel* mLeftPane; ! SparkGLCanvas* mCanvas; wxPanel* mTopPane; wxTextCtrl* mCtrLog; --- 192,196 ---- wxSplitterWindow* window_1; wxPanel* mLeftPane; ! wxFlatNotebook* mCtrNotebook; wxPanel* mTopPane; wxTextCtrl* mCtrLog; *************** *** 212,219 **** int mLastVertSashPosition; ! /** the filename of the current simulation (i.e. the corresponding ! startup .rb script) ! */ ! wxString mSimFName; DECLARE_EVENT_TABLE() --- 225,229 ---- int mLastVertSashPosition; ! SparkGLCanvas* mCanvas; DECLARE_EVENT_TABLE() --- NEW FILE: sparkedit.h --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2003 Koblenz University $Id: sparkedit.h,v 1.2 2007/06/23 13:36:28 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef SPARKEDIT_H__ #define SPARKEDIT_H__ #include <wx/string.h> #include <wx/wxscintilla.h> #include <wx/wxflatnotebook/wxflatnotebook.h> #include <map> class SparkEdit { public: enum EEditType { ET_NONE, ET_RSG, ET_RB, ET_C, ET_TEXT }; enum EImgIndex { II_NONE = -1, II_SIMSPARK = 0, II_STARTSCRIPT, II_RUBY, II_RSG }; struct EditEntry { public: EEditType type; wxString fname; int page; public: EditEntry() : type(ET_RSG), page(-1) { } }; typedef std::map<wxScintilla*, EditEntry > TEditMap; public: static wxScintilla* GetEdit(const wxString& fname, wxFlatNotebook* notebook, bool select); static void PutEdit(wxScintilla* edit); static void UpdateTitles(wxFlatNotebook* notebook); static void UpdateTitle(wxFlatNotebook* notebook, wxScintilla* edit); static void UpdateIcons(wxFlatNotebook* notebook); static void SaveFile(wxScintilla* edit); static void SaveModified(); static void SetStartScript(wxFlatNotebook* notebook, wxScintilla* edit); static wxScintilla* GetStartScript(); static EEditType GetFileType(wxScintilla* edit); static wxString GetFile(wxScintilla* edit); static wxString GetStartScriptFile(); static void PrepareImageList(wxFlatNotebook* notebook); static void SelectEdit(wxFlatNotebook* notebook, wxScintilla* edit); protected: static wxScintilla* Create(wxWindow* parent); static bool LoadFile(wxScintilla* edit, EditEntry& entry); static void PrepareEdit(wxScintilla* edit, const EditEntry& entry); static wxString GetTitle(wxScintilla* edit, const EditEntry& entry); static void UpdateIcon(wxFlatNotebook* notebook, const wxScintilla* edit, const EditEntry& entry); static int GetImageIndex(const wxScintilla* edit, const EditEntry& entry); static void SaveFile(wxScintilla* edit, const EditEntry& entry); protected: static TEditMap mEditMap; static wxFlatNotebookImageList mNotebookImgList; //! the editor holding the simulation start script static wxScintilla* mStartScript; }; #endif // SPARKEDIT_H__ Index: propertyframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/propertyframe.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** propertyframe.cpp 17 May 2007 17:49:23 -0000 1.4 --- propertyframe.cpp 23 Jun 2007 13:36:28 -0000 1.5 *************** *** 36,40 **** { // begin wxGlade: propertyframe::propertyframe ! mCtrPropList = new wxListCtrl(this, -1, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER); set_properties(); --- 36,40 ---- { // begin wxGlade: propertyframe::propertyframe ! mCtrPropList = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER); set_properties(); *************** *** 58,62 **** wxBoxSizer* sizer_3 = new wxBoxSizer(wxVERTICAL); sizer_3->Add(mCtrPropList, 1, wxEXPAND, 0); - SetAutoLayout(true); SetSizer(sizer_3); Layout(); --- 58,61 ---- Index: rsgedit.wxg =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/rsgedit.wxg,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** rsgedit.wxg 15 Jun 2007 10:42:40 -0000 1.9 --- rsgedit.wxg 23 Jun 2007 13:36:28 -0000 1.10 *************** *** 1,6 **** <?xml version="1.0"?> ! <!-- generated by wxGlade 0.4.1 on Fri Jun 15 12:41:21 2007 --> ! <application path="." name="" class="" option="1" language="C++" top_window="MainFrame" encoding="UTF-8" use_gettext="0" overwrite="0" use_new_namespace="1" for_version="2.6"> <object class="mainframe" name="MainFrame" base="EditFrame"> <style>wxICONIZE|wxCAPTION|wxMINIMIZE|wxCLOSE_BOX|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxSYSTEM_MENU|wxRESIZE_BORDER|wxCLIP_CHILDREN</style> --- 1,6 ---- <?xml version="1.0"?> ! <!-- generated by wxGlade 0.5 on Thu Jun 21 21:17:25 2007 --> ! <application path="." name="" class="" option="1" language="C++" top_window="MainFrame" encoding="UTF-8" use_gettext="0" overwrite="0" use_new_namespace="1" for_version="2.6" is_template="0"> <object class="mainframe" name="MainFrame" base="EditFrame"> <style>wxICONIZE|wxCAPTION|wxMINIMIZE|wxCLOSE_BOX|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxSYSTEM_MENU|wxRESIZE_BORDER|wxCLIP_CHILDREN</style> *************** *** 8,28 **** <menubar>1</menubar> <statusbar>1</statusbar> ! <size>1024, 770</size> <object class="wxMenuBar" name="MainFrame_menubar" base="EditMenuBar"> <menus> <menu name="" label="&File"> <item> ! <label>&Open</label> <id>ID_FILE_OPEN</id> </item> <item> ! <label>Start &Agent</label> ! <id>ID_AGENT_OPEN</id> </item> <item> ! <label>&Reload</label> <id>ID_FILE_RELOAD</id> </item> <item> <label>&Exit</label> <id>wxID_EXIT</id> --- 8,37 ---- <menubar>1</menubar> <statusbar>1</statusbar> ! <size>1076, 786</size> <object class="wxMenuBar" name="MainFrame_menubar" base="EditMenuBar"> <menus> <menu name="" label="&File"> <item> ! <label>&Open\tctrl+o</label> <id>ID_FILE_OPEN</id> </item> <item> ! <label>&Save\tctrl+s</label> ! <id>ID_FILE_SAVE</id> </item> <item> ! <label>&Reload\tctrl+r</label> <id>ID_FILE_RELOAD</id> </item> <item> + <label>---</label> + <id>---</id> + <name>---</name> + </item> + <item> + <label>Start &Agent</label> + <id>ID_AGENT_OPEN</id> + </item> + <item> <label>&Exit</label> <id>wxID_EXIT</id> *************** *** 150,154 **** <border>0</border> <option>1</option> ! <object class="SparkGLCanvas" name="mCanvas" base="CustomWidget"> <arguments> <argument>$parent</argument> --- 159,163 ---- <border>0</border> <option>1</option> ! <object class="wxFlatNotebook" name="mCtrNotebook" base="CustomWidget"> <arguments> <argument>$parent</argument> *************** *** 177,181 **** <orient>wxVERTICAL</orient> <object class="sizeritem"> ! <flag>wxALL|wxEXPAND|wxADJUST_MINSIZE</flag> <border>5</border> <option>0</option> --- 186,190 ---- <orient>wxVERTICAL</orient> <object class="sizeritem"> ! <flag>wxALL|wxEXPAND</flag> <border>5</border> <option>0</option> *************** *** 186,190 **** </object> <object class="sizeritem"> ! <flag>wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxADJUST_MINSIZE</flag> <border>5</border> <option>0</option> --- 195,199 ---- </object> <object class="sizeritem"> ! <flag>wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND</flag> <border>5</border> <option>0</option> *************** *** 204,208 **** </object> <object class="sizeritem"> ! <flag>wxALL|wxADJUST_MINSIZE</flag> <border>5</border> <option>0</option> --- 213,217 ---- </object> <object class="sizeritem"> ! <flag>wxALL</flag> <border>5</border> <option>0</option> *************** *** 213,217 **** </object> <object class="sizeritem"> ! <flag>wxLEFT|wxRIGHT|wxBOTTOM|wxADJUST_MINSIZE</flag> <border>5</border> <option>0</option> --- 222,226 ---- </object> <object class="sizeritem"> ! <flag>wxLEFT|wxRIGHT|wxBOTTOM</flag> <border>5</border> <option>0</option> *************** *** 222,226 **** </object> <object class="sizeritem"> ! <flag>wxLEFT|wxRIGHT|wxBOTTOM|wxADJUST_MINSIZE</flag> <border>5</border> <option>0</option> --- 231,235 ---- </object> <object class="sizeritem"> ! <flag>wxLEFT|wxRIGHT|wxBOTTOM</flag> <border>5</border> <option>0</option> *************** *** 231,235 **** </object> <object class="sizeritem"> ! <flag>wxLEFT|wxRIGHT|wxBOTTOM|wxADJUST_MINSIZE</flag> <border>5</border> <option>0</option> --- 240,244 ---- </object> <object class="sizeritem"> ! <flag>wxLEFT|wxRIGHT|wxBOTTOM</flag> <border>5</border> <option>0</option> *************** *** 240,244 **** </object> <object class="sizeritem"> ! <flag>wxLEFT|wxRIGHT|wxBOTTOM|wxADJUST_MINSIZE</flag> <border>5</border> <option>0</option> --- 249,253 ---- </object> <object class="sizeritem"> ! <flag>wxLEFT|wxRIGHT|wxBOTTOM</flag> <border>5</border> <option>0</option> *************** *** 282,286 **** <orient>wxVERTICAL</orient> <object class="sizeritem"> ! <flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxADJUST_MINSIZE</flag> <border>5</border> <option>0</option> --- 291,295 ---- <orient>wxVERTICAL</orient> <object class="sizeritem"> ! <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag> <border>5</border> <option>0</option> *************** *** 291,295 **** </object> <object class="sizeritem"> ! <flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxADJUST_MINSIZE</flag> <border>5</border> <option>0</option> --- 300,304 ---- </object> <object class="sizeritem"> ! <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag> <border>5</border> <option>0</option> *************** *** 300,304 **** </object> <object class="sizeritem"> ! <flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxADJUST_MINSIZE</flag> <border>5</border> <option>0</option> --- 309,313 ---- </object> <object class="sizeritem"> ! <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag> <border>5</border> <option>0</option> *************** *** 317,321 **** <orient>wxVERTICAL</orient> <object class="sizeritem"> ! <flag>wxEXPAND|wxADJUST_MINSIZE</flag> <border>0</border> <option>1</option> --- 326,330 ---- <orient>wxVERTICAL</orient> <object class="sizeritem"> ! <flag>wxEXPAND</flag> <border>0</border> <option>1</option> Index: agentframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/agentframe.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** agentframe.cpp 15 Mar 2007 07:26:24 -0000 1.2 --- agentframe.cpp 23 Jun 2007 13:36:28 -0000 1.3 *************** *** 49,53 **** // begin wxGlade: agentframe::agentframe ! mCtrLog = new wxTextCtrl(this, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY); set_properties(); --- 49,53 ---- // begin wxGlade: agentframe::agentframe ! mCtrLog = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY); set_properties(); *************** *** 81,86 **** // begin wxGlade: agentframe::do_layout wxBoxSizer* sizer_10 = new wxBoxSizer(wxVERTICAL); ! sizer_10->Add(mCtrLog, 1, wxEXPAND|wxADJUST_MINSIZE, 0); ! SetAutoLayout(true); SetSizer(sizer_10); Layout(); --- 81,85 ---- // begin wxGlade: agentframe::do_layout wxBoxSizer* sizer_10 = new wxBoxSizer(wxVERTICAL); ! sizer_10->Add(mCtrLog, 1, wxEXPAND, 0); SetSizer(sizer_10); Layout(); Index: mainframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** mainframe.cpp 15 Jun 2007 10:42:40 -0000 1.21 --- mainframe.cpp 23 Jun 2007 13:36:28 -0000 1.22 *************** *** 24,27 **** --- 24,28 ---- #include "propertyframe.h" #include "agentframe.h" + #include "sparkedit.h" #include <wx/filename.h> *************** *** 34,37 **** --- 35,39 ---- #include <rsgedit/res/xpm_pause.xpm> #include <rsgedit/res/xpm_open.xpm> + #include <rsgedit/res/xpm_save.xpm> #include <rsgedit/res/xpm_reload.xpm> #include <rsgedit/res/xpm_agent.xpm> *************** *** 75,78 **** --- 77,83 ---- EVT_UPDATE_UI(ID_FILE_OPEN, mainframe::OnUpdateFileOpen) + EVT_MENU(ID_FILE_SAVE, mainframe::OnFileSave) + EVT_UPDATE_UI(ID_FILE_SAVE, mainframe::OnUpdateFileSave) + EVT_MENU(ID_AGENT_OPEN, mainframe::OnAgentOpen) *************** *** 102,105 **** --- 107,116 ---- EVT_TREE_ITEM_RIGHT_CLICK(1, mainframe::OnTreeItemRightClick) + EVT_FLATNOTEBOOK_PAGE_CLOSING(wxID_ANY, mainframe::OnTabClosing) + EVT_FLATNOTEBOOK_PAGE_CHANGED(wxID_ANY, mainframe::OnTabChanged) + + EVT_SCI_SAVEPOINTREACHED(wxID_ANY, mainframe::OnEditSavePointReached) + EVT_SCI_SAVEPOINTLEFT(wxID_ANY, mainframe::OnEditSavePointLeft) + EVT_SPARK_CONTEXT(ID_SPARK_CONTEXT, mainframe::OnSparkContext) END_EVENT_TABLE() *************** *** 117,136 **** // begin wxGlade: mainframe::mainframe ! mCtrVertSplitter = new wxSplitterWindow(this, -1, wxDefaultPosition, wxDefaultSize, wxSP_NOBORDER); ! mRightPane = new wxPanel(mCtrVertSplitter, -1, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL); ! mCtrHorSplitter = new wxSplitterWindow(mRightPane, -1, wxDefaultPosition, wxDefaultSize, wxSP_NOBORDER); ! mBottomPane = new wxPanel(mCtrHorSplitter, -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL); ! mTopPane = new wxPanel(mCtrHorSplitter, -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL); ! mLeftPane = new wxPanel(mCtrVertSplitter, -1, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL); ! window_1 = new wxSplitterWindow(mLeftPane, -1, wxDefaultPosition, wxDefaultSize, wxSP_3DBORDER|wxSP_BORDER); ! window_1_pane_2 = new wxPanel(window_1, -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL); ! window_1_pane_1 = new wxPanel(window_1, -1, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL); MainFrame_menubar = new wxMenuBar(); SetMenuBar(MainFrame_menubar); wxMenu* wxglade_tmp_menu_1 = new wxMenu(); ! wxglade_tmp_menu_1->Append(ID_FILE_OPEN, wxT("&Open"), wxT(""), wxITEM_NORMAL); ! wxglade_tmp_menu_1->Append(ID_AGENT_OPEN, wxT("Start &Agent"), wxT(""), wxITEM_NORMAL); ! wxglade_tmp_menu_1->Append(ID_FILE_RELOAD, wxT("&Reload"), wxT(""), wxITEM_NORMAL); ! wxglade_tmp_menu_1->Append(wxID_EXIT, wxT("&Exit"), wxT(""), wxITEM_NORMAL); MainFrame_menubar->Append(wxglade_tmp_menu_1, wxT("&File")); wxMenu* wxglade_tmp_menu_2 = new wxMenu(); --- 128,149 ---- // begin wxGlade: mainframe::mainframe ! mCtrVertSplitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_NOBORDER); ! mRightPane = new wxPanel(mCtrVertSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL); ! mCtrHorSplitter = new wxSplitterWindow(mRightPane, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_NOBORDER); ! mBottomPane = new wxPanel(mCtrHorSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL); ! mTopPane = new wxPanel(mCtrHorSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL); ! mLeftPane = new wxPanel(mCtrVertSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxTAB_TRAVERSAL); ! window_1 = new wxSplitterWindow(mLeftPane, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DBORDER|wxSP_BORDER); ! window_1_pane_2 = new wxPanel(window_1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL); ! window_1_pane_1 = new wxPanel(window_1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER|wxTAB_TRAVERSAL); MainFrame_menubar = new wxMenuBar(); SetMenuBar(MainFrame_menubar); wxMenu* wxglade_tmp_menu_1 = new wxMenu(); ! wxglade_tmp_menu_1->Append(ID_FILE_OPEN, wxT("&Open\tctrl+o"), wxEmptyString, wxITEM_NORMAL); ! wxglade_tmp_menu_1->Append(ID_FILE_SAVE, wxT("&Save\tctrl+s"), wxEmptyString, wxITEM_NORMAL); ! wxglade_tmp_menu_1->Append(ID_FILE_RELOAD, wxT("&Reload\tctrl+r"), wxEmptyString, wxITEM_NORMAL); ! wxglade_tmp_menu_1->AppendSeparator(); ! wxglade_tmp_menu_1->Append(ID_AGENT_OPEN, wxT("Start &Agent"), wxEmptyString, wxITEM_NORMAL); ! wxglade_tmp_menu_1->Append(wxID_EXIT, wxT("&Exit"), wxEmptyString, wxITEM_NORMAL); MainFrame_menubar->Append(wxglade_tmp_menu_1, wxT("&File")); wxMenu* wxglade_tmp_menu_2 = new wxMenu(); *************** *** 139,158 **** MainFrame_menubar->Append(wxglade_tmp_menu_2, wxT("&View")); wxMenu* wxglade_tmp_menu_3 = new wxMenu(); ! wxglade_tmp_menu_3->Append(ID_SIM_STEP, wxT("St&ep"), wxT(""), wxITEM_NORMAL); wxglade_tmp_menu_3->Append(ID_SIM_START, wxT("&Start"), wxT("Start simulation"), wxITEM_NORMAL); wxglade_tmp_menu_3->Append(ID_SIM_PAUSE, wxT("&Pause"), wxT("Pause Simulation"), wxITEM_NORMAL); MainFrame_menubar->Append(wxglade_tmp_menu_3, wxT("&Simulation")); wxMenu* wxglade_tmp_menu_4 = new wxMenu(); ! wxglade_tmp_menu_4->Append(ID_HELP_ABOUT, wxT("&About"), wxT(""), wxITEM_NORMAL); MainFrame_menubar->Append(wxglade_tmp_menu_4, wxT("&Help")); MainFrame_statusbar = CreateStatusBar(1, 0); ! mCtrPropList = new wxListCtrl(window_1_pane_1, -1, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSIMPLE_BORDER); mCtrTree = new wxTreeCtrl(window_1_pane_2, 1, wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS|wxTR_NO_LINES|wxTR_LINES_AT_ROOT|wxTR_DEFAULT_STYLE|wxSIMPLE_BORDER); ! mCanvas = new SparkGLCanvas(mTopPane, -1); ! mCtrLog = new wxTextCtrl(mBottomPane, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL|wxNO_BORDER); button_2 = new wxButton(mBottomPane, ID_LOG_CLEAR, wxT("Clear")); button_3 = new wxButton(mBottomPane, ID_LOG_COPY, wxT("Copy")); ! static_line_1 = new wxStaticLine(mBottomPane, -1); ! label_2 = new wxStaticText(mBottomPane, -1, wxT("Log Channels")); mCtrLogChannelDebug = new wxCheckBox(mBottomPane, ID_LOG_CHANNEL_DEBUG, wxT("Debug")); mCtrLogChannelNormal = new wxCheckBox(mBottomPane, ID_LOG_CHANNEL_NORMAL, wxT("Normal")); --- 152,171 ---- MainFrame_menubar->Append(wxglade_tmp_menu_2, wxT("&View")); wxMenu* wxglade_tmp_menu_3 = new wxMenu(); ! wxglade_tmp_menu_3->Append(ID_SIM_STEP, wxT("St&ep"), wxEmptyString, wxITEM_NORMAL); wxglade_tmp_menu_3->Append(ID_SIM_START, wxT("&Start"), wxT("Start simulation"), wxITEM_NORMAL); wxglade_tmp_menu_3->Append(ID_SIM_PAUSE, wxT("&Pause"), wxT("Pause Simulation"), wxITEM_NORMAL); MainFrame_menubar->Append(wxglade_tmp_menu_3, wxT("&Simulation")); wxMenu* wxglade_tmp_menu_4 = new wxMenu(); ! wxglade_tmp_menu_4->Append(ID_HELP_ABOUT, wxT("&About"), wxEmptyString, wxITEM_NORMAL); MainFrame_menubar->Append(wxglade_tmp_menu_4, wxT("&Help")); MainFrame_statusbar = CreateStatusBar(1, 0); ! mCtrPropList = new wxListCtrl(window_1_pane_1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSIMPLE_BORDER); mCtrTree = new wxTreeCtrl(window_1_pane_2, 1, wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS|wxTR_NO_LINES|wxTR_LINES_AT_ROOT|wxTR_DEFAULT_STYLE|wxSIMPLE_BORDER); ! mCtrNotebook = new wxFlatNotebook(mTopPane, wxID_ANY); ! mCtrLog = new wxTextCtrl(mBottomPane, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL|wxNO_BORDER); button_2 = new wxButton(mBottomPane, ID_LOG_CLEAR, wxT("Clear")); button_3 = new wxButton(mBottomPane, ID_LOG_COPY, wxT("Copy")); ! static_line_1 = new wxStaticLine(mBottomPane, wxID_ANY); ! label_2 = new wxStaticText(mBottomPane, wxID_ANY, wxT("Log Channels")); mCtrLogChannelDebug = new wxCheckBox(mBottomPane, ID_LOG_CHANNEL_DEBUG, wxT("Debug")); mCtrLogChannelNormal = new wxCheckBox(mBottomPane, ID_LOG_CHANNEL_NORMAL, wxT("Normal")); *************** *** 164,167 **** --- 177,195 ---- // end wxGlade + mCtrNotebook->SetWindowStyleFlag + (mCtrNotebook->GetWindowStyleFlag() + | wxFNB_DROPDOWN_TABS_LIST + | wxFNB_X_ON_TAB + | wxFNB_MOUSE_MIDDLE_CLOSES_TABS + | wxFNB_VC8 + ); + + mCanvas = new SparkGLCanvas(mCtrNotebook, wxID_ANY); + mCanvas->SetLabel("simulation window"); + mCtrNotebook->AddPage(mCanvas, wxT("Canvas")); + + SparkEdit::PrepareImageList(mCtrNotebook); + mCtrNotebook->SetPageImageIndex(0, SparkEdit::II_SIMSPARK); + // create toolbar mToolBar = CreateToolBar( wxTB_FLAT|wxTB_HORIZONTAL, wxID_ANY ); *************** *** 169,172 **** --- 197,201 ---- mToolBar->AddTool(ID_FILE_OPEN, wxT("Open"), wxBitmap(xpm_open)); mToolBar->AddTool(ID_FILE_RELOAD, wxT("Reload"), wxBitmap(xpm_reload)); + mToolBar->AddTool(ID_FILE_SAVE, wxT("Save"), wxBitmap(xpm_save)); mToolBar->AddSeparator(); mToolBar->AddTool(ID_AGENT_OPEN, wxT("Start Agent"), wxBitmap(xpm_agent)); *************** *** 217,223 **** { wxString title(wxT("SimSpark")); ! if (! mSimFName.empty()) { ! title += wxT(" <") + mSimFName + wxT(">"); } --- 246,252 ---- { wxString title(wxT("SimSpark")); ! if (SparkEdit::GetStartScript() != 0) { ! title += wxT(" <") + SparkEdit::GetStartScriptFile() + wxT(">"); } *************** *** 248,252 **** // begin wxGlade: mainframe::set_properties SetTitle(wxT("RsgEdit")); ! SetSize(wxSize(1024, 770)); int MainFrame_statusbar_widths[] = { 0 }; MainFrame_statusbar->SetStatusWidths(1, MainFrame_statusbar_widths); --- 277,281 ---- // begin wxGlade: mainframe::set_properties SetTitle(wxT("RsgEdit")); ! SetSize(wxSize(1076, 786)); int MainFrame_statusbar_widths[] = { 0 }; MainFrame_statusbar->SetStatusWidths(1, MainFrame_statusbar_widths); *************** *** 272,318 **** wxBoxSizer* sizer_4 = new wxBoxSizer(wxVERTICAL); sizer_4->Add(mCtrPropList, 1, wxEXPAND, 0); - window_1_pane_1->SetAutoLayout(true); window_1_pane_1->SetSizer(sizer_4); - sizer_4->Fit(window_1_pane_1); - sizer_4->SetSizeHints(window_1_pane_1); sizer_8->Add(mCtrTree, 1, wxEXPAND, 0); - window_1_pane_2->SetAutoLayout(true); window_1_pane_2->SetSizer(sizer_8); - sizer_8->Fit(window_1_pane_2); - sizer_8->SetSizeHints(window_1_pane_2); window_1->SplitHorizontally(window_1_pane_1, window_1_pane_2); sizer_7->Add(window_1, 1, wxEXPAND, 0); - mLeftPane->SetAutoLayout(true); mLeftPane->SetSizer(sizer_7); ! sizer_7->Fit(mLeftPane); ! sizer_7->SetSizeHints(mLeftPane); ! sizer_5->Add(mCanvas, 1, wxEXPAND, 0); ! mTopPane->SetAutoLayout(true); mTopPane->SetSizer(sizer_5); - sizer_5->Fit(mTopPane); - sizer_5->SetSizeHints(mTopPane); sizer_6->Add(mCtrLog, 1, wxEXPAND, 0); ! sizer_11->Add(button_2, 0, wxALL|wxEXPAND|wxADJUST_MINSIZE, 5); ! sizer_11->Add(button_3, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxADJUST_MINSIZE, 5); sizer_11->Add(static_line_1, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5); ! sizer_11->Add(label_2, 0, wxALL|wxADJUST_MINSIZE, 5); ! sizer_11->Add(mCtrLogChannelDebug, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxADJUST_MINSIZE, 5); ! sizer_11->Add(mCtrLogChannelNormal, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxADJUST_MINSIZE, 5); ! sizer_11->Add(mCtrLogChannelWarning, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxADJUST_MINSIZE, 5); ! sizer_11->Add(mCtrLogChannelError, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxADJUST_MINSIZE, 5); sizer_6->Add(sizer_11, 0, 0, 0); - mBottomPane->SetAutoLayout(true); mBottomPane->SetSizer(sizer_6); - sizer_6->Fit(mBottomPane); - sizer_6->SetSizeHints(mBottomPane); mCtrHorSplitter->SplitHorizontally(mTopPane, mBottomPane); sizer_2->Add(mCtrHorSplitter, 1, wxEXPAND, 0); - mRightPane->SetAutoLayout(true); mRightPane->SetSizer(sizer_2); - sizer_2->Fit(mRightPane); - sizer_2->SetSizeHints(mRightPane); mCtrVertSplitter->SplitVertically(mLeftPane, mRightPane); sizer_1->Add(mCtrVertSplitter, 1, wxEXPAND, 0); - SetAutoLayout(true); SetSizer(sizer_1); Layout(); --- 301,328 ---- wxBoxSizer* sizer_4 = new wxBoxSizer(wxVERTICAL); sizer_4->Add(mCtrPropList, 1, wxEXPAND, 0); window_1_pane_1->SetSizer(sizer_4); sizer_8->Add(mCtrTree, 1, wxEXPAND, 0); window_1_pane_2->SetSizer(sizer_8); window_1->SplitHorizontally(window_1_pane_1, window_1_pane_2); sizer_7->Add(window_1, 1, wxEXPAND, 0); mLeftPane->SetSizer(sizer_7); ! sizer_5->Add(mCtrNotebook, 1, wxEXPAND, 0); mTopPane->SetSizer(sizer_5); sizer_6->Add(mCtrLog, 1, wxEXPAND, 0); ! sizer_11->Add(button_2, 0, wxALL|wxEXPAND, 5); ! sizer_11->Add(button_3, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 5); sizer_11->Add(static_line_1, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5); ! sizer_11->Add(label_2, 0, wxALL, 5); ! sizer_11->Add(mCtrLogChannelDebug, 0, wxLEFT|wxRIGHT|wxBOTTOM, 5); ! sizer_11->Add(mCtrLogChannelNormal, 0, wxLEFT|wxRIGHT|wxBOTTOM, 5); ! sizer_11->Add(mCtrLogChannelWarning, 0, wxLEFT|wxRIGHT|wxBOTTOM, 5); ! sizer_11->Add(mCtrLogChannelError, 0, wxLEFT|wxRIGHT|wxBOTTOM, 5); sizer_6->Add(sizer_11, 0, 0, 0); mBottomPane->SetSizer(sizer_6); mCtrHorSplitter->SplitHorizontally(mTopPane, mBottomPane); sizer_2->Add(mCtrHorSplitter, 1, wxEXPAND, 0); mRightPane->SetSizer(sizer_2); mCtrVertSplitter->SplitVertically(mLeftPane, mRightPane); sizer_1->Add(mCtrVertSplitter, 1, wxEXPAND, 0); SetSizer(sizer_1); Layout(); *************** *** 356,359 **** --- 366,386 ---- } + int n = mCtrNotebook->GetPageCount(); + + for (int i=(n-1);i>=0;--i) + { + wxWindow* page = mCtrNotebook->GetPage(i); + if (page == mCanvas) + { + continue; + } + + if (! mCtrNotebook->RemovePage(i)) + { + event.Veto(); + return; + } + } + // close agentframes wxWindowList& children = GetChildren(); *************** *** 754,757 **** --- 781,785 ---- void mainframe::EditFile(const wxString& fname, int line) { + #if 0 wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromMimeType("text/plain"); if (ft == 0) *************** *** 770,773 **** --- 798,816 ---- wxExecute(cmd); + #endif + + bool select = true; + wxScintilla* edit = SparkEdit::GetEdit(fname,mCtrNotebook,select); + if (edit != 0) + { + edit->GotoLine(line); + } + + if (edit == 0) + { + return; + } + + edit->GotoLine(line); } *************** *** 898,915 **** DoneSimulation(sim); - - mSimFName = fname; - UpdateTitle(); PrintSimState(); return true; } void mainframe::OnFileOpen(wxCommandEvent& event) { ! wxString message(wxT("Choose a ruby script to run")); wxString default_path(wxT("./rsg")); wxString default_filename(wxT("")); wxString default_extension(wxT("")); ! wxString wildcard(wxT("ruby scripts (*.rb)|*.rb")); wxString filename = wxFileSelector(message, default_path, default_filename, default_extension, wildcard); --- 941,992 ---- DoneSimulation(sim); PrintSimState(); + return true; } + void mainframe::SaveModified() + { + SparkEdit::SaveModified(); + SparkEdit::UpdateTitles(mCtrNotebook); + } + + void mainframe::OnUpdateFileSave(wxUpdateUIEvent& event) + { + wxScintilla* edit = dynamic_cast<wxScintilla*>(mCtrNotebook->GetCurrentPage()); + event.Enable(edit != 0); + } + + void mainframe::OnFileSave(wxCommandEvent& event) + { + wxScintilla* edit = dynamic_cast<wxScintilla*>(mCtrNotebook->GetCurrentPage()); + if (edit == 0) + { + return; + } + + SparkEdit::SaveFile(edit); + } + + void mainframe::SelectCanvasTab() + { + int idx = mCtrNotebook->GetPageIndex(mCanvas); + if (idx < 0) + { + assert(false); + return; + } + + mCtrNotebook->SetSelection(idx); + mCanvas->SetFocus(); + } + void mainframe::OnFileOpen(wxCommandEvent& event) { ! wxString message(wxT("Choose a file to open")); wxString default_path(wxT("./rsg")); wxString default_filename(wxT("")); wxString default_extension(wxT("")); ! wxString wildcard(wxT("simspark files (*.rsg, *.rb)|*.rb;*.rsg")); wxString filename = wxFileSelector(message, default_path, default_filename, default_extension, wildcard); *************** *** 919,922 **** --- 996,1014 ---- } + bool select = false; + wxScintilla* edit = SparkEdit::GetEdit(filename, mCtrNotebook, select); + + if ( + (SparkEdit::GetStartScript() != 0) || + (SparkEdit::GetFileType(edit) != SparkEdit::ET_RB) + ) + { + SparkEdit::SelectEdit(mCtrNotebook, edit); + return; + } + + SelectCanvasTab(); + SparkEdit::SetStartScript(mCtrNotebook, edit); + UpdateTitle(); OpenSimulation(filename); } *************** *** 926,930 **** event.Enable( (GetSimState() == S_PAUSED) && ! (! mSimFName.empty()) ); } --- 1018,1022 ---- event.Enable( (GetSimState() == S_PAUSED) && ! (SparkEdit::GetStartScript() != 0) ); } *************** *** 932,936 **** void mainframe::OnFileReload(wxCommandEvent& event) { ! OpenSimulation(mSimFName); } --- 1024,1036 ---- void mainframe::OnFileReload(wxCommandEvent& event) { ! wxString simName = SparkEdit::GetStartScriptFile(); ! if (simName.IsEmpty()) ! { ! return; ! } ! ! SaveModified(); ! SelectCanvasTab(); ! OpenSimulation(simName); } *************** *** 1075,1076 **** --- 1175,1251 ---- spark->SetLogPriority(mask); } + + void mainframe::OnTabClosing(wxFlatNotebookEvent& event) + { + wxWindow* page = mCtrNotebook->GetPage(event.GetSelection()); + if (page == mCanvas) + { + event.Veto(); + return; + } + + wxScintilla* edit = dynamic_cast<wxScintilla*>(page); + if (edit == 0) + { + event.Skip(); + return; + } + + if (edit->GetModify()) + { + int res = wxMessageBox("The file '"+SparkEdit::GetFile(edit)+"' is modified.\n" + "Do you want to save your changes?", + "rsgedit", + wxYES_NO|wxCANCEL|wxICON_QUESTION + ); + + switch (res) + { + default: + assert(false); + // fall through + + case wxCANCEL: + event.Veto(); + return; + + case wxYES: + SparkEdit::SaveFile(edit); + break; + + case wxNO: + break; + } + } + + if (edit != 0) + { + SparkEdit::PutEdit(edit); + UpdateTitle(); + } + + event.Skip(); + } + + void mainframe::OnTabChanged(wxFlatNotebookEvent& event) + { + wxWindow* page = mCtrNotebook->GetPage(event.GetSelection()); + if (page == mCanvas) + { + mCanvas->SetFocus(); + } + + event.Skip(); + } + + void mainframe::OnEditSavePointReached(wxScintillaEvent& event) + { + SparkEdit::UpdateTitle(mCtrNotebook,static_cast<wxScintilla*>(event.GetEventObject())); + event.Skip(); + } + + void mainframe::OnEditSavePointLeft(wxScintillaEvent& event) + { + SparkEdit::UpdateTitle(mCtrNotebook,static_cast<wxScintilla*>(event.GetEventObject())); + event.Skip(); + } Index: aboutDlg.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/aboutDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** aboutDlg.cpp 15 Mar 2007 07:26:24 -0000 1.2 --- aboutDlg.cpp 23 Jun 2007 13:36:28 -0000 1.3 *************** *** 8,13 **** { // begin wxGlade: aboutDlg::aboutDlg ! mBitmap = new wxStaticBitmap(this, -1, wxNullBitmap); ! label_1 = new wxStaticText(this, -1, wxT("SimSpark Copyright (C) RoboCup Soccer Server 3D Maintenance Group")); button_1 = new wxButton(this, wxID_OK, wxT("&Ok")); --- 8,13 ---- { // begin wxGlade: aboutDlg::aboutDlg ! mBitmap = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap); ! label_1 = new wxStaticText(this, wxID_ANY, wxT("SimSpark Copyright (C) RoboCup Soccer Server 3D Maintenance Group")); button_1 = new wxButton(this, wxID_OK, wxT("&Ok")); *************** *** 33,43 **** // begin wxGlade: aboutDlg::do_layout wxBoxSizer* sizer_9 = new wxBoxSizer(wxVERTICAL); ! sizer_9->Add(mBitmap, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxADJUST_MINSIZE, 5); ! sizer_9->Add(label_1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxADJUST_MINSIZE, 5); ! sizer_9->Add(button_1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxADJUST_MINSIZE, 5); ! SetAutoLayout(true); SetSizer(sizer_9); sizer_9->Fit(this); - sizer_9->SetSizeHints(this); Layout(); // end wxGlade --- 33,41 ---- // begin wxGlade: aboutDlg::do_layout wxBoxSizer* sizer_9 = new wxBoxSizer(wxVERTICAL); ! sizer_9->Add(mBitmap, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); ! sizer_9->Add(label_1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); ! sizer_9->Add(button_1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); SetSizer(sizer_9); sizer_9->Fit(this); Layout(); // end wxGlade Index: rsgedit.vcproj =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/rsgedit.vcproj,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** rsgedit.vcproj 15 Apr 2007 11:17:53 -0000 1.4 --- rsgedit.vcproj 23 Jun 2007 13:36:28 -0000 1.5 *************** *** 2,6 **** <VisualStudioProject ProjectType="Visual C++" ! Version="8,00" Name="rsgedit" ProjectGUID="{38B680B0-B535-40F0-B5DB-FC307C40C7D6}" --- 2,6 ---- <VisualStudioProject ProjectType="Visual C++" ! Version="8.00" Name="rsgedit" ProjectGUID="{38B680B0-B535-40F0-B5DB-FC307C40C7D6}" *************** *** 41,46 **** Name="VCCLCompilerTool" Optimization="0" ! AdditionalIncludeDirectories="..\..\spark\win32;..\..\spark;..\..\spark\utility;..\" ! PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H" MinimalRebuild="true" BasicRuntimeChecks="3" --- 41,46 ---- Name="VCCLCompilerTool" Optimization="0" ! AdditionalIncludeDirectories="..\..\spark\win32;..\..\spark;..\..\spark\utility;..\;wxscintilla\include;wxscintilla\src\scintilla\include;wxscintilla\src\scintilla\src;wxflatnotebook\include;wxflatnotebook\isrc" ! PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H;SCI_LEXER" MinimalRebuild="true" BasicRuntimeChecks="3" *************** *** 120,124 **** Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\spark\win32;..\..\spark;..\..\spark\utility;..\" ! PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H" RuntimeLibrary="2" UsePrecompiledHeader="0" --- 120,124 ---- Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\spark\win32;..\..\spark;..\..\spark\utility;..\" ! PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H;SCI_LEXER" RuntimeLibrary="2" UsePrecompiledHeader="0" *************** *** 175,178 **** --- 175,698 ---- </References> <Files> + <Filter + Name="wxscintilla" + > + <File + RelativePath=".\wxscintilla\src\PlatWX.cpp" + > + </File> + <File + RelativePath=".\wxscintilla\src\PlatWX.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\ScintillaWX.cpp" + > + </File> + <File + RelativePath=".\wxscintilla\src\ScintillaWX.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\wxscintilla.cpp" + > + </File> + <File + RelativePath=".\wxscintilla\include\wx\wxscintilla.h" + > + </File> + <Filter + Name="scintilla" + > + <File + RelativePath=".\wxscintilla\src\scintilla\include\Accessor.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\AutoComplete.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\AutoComplete.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\CallTip.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\CallTip.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\CellBuffer.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\CellBuffer.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\CharClassify.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\CharClassify.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ContractionState.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ContractionState.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Document.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Document.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\DocumentAccessor.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\DocumentAccessor.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Editor.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Editor.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ExternalLexer.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ExternalLexer.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Indicator.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Indicator.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\KeyMap.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\KeyMap.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\KeyWords.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\KeyWords.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexAda.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexAPDL.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexAsm.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexAsn1.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexAU3.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexAVE.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexBaan.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexBash.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexBasic.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexBullant.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexCaml.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexCLW.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexConf.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexCPP.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexCrontab.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexCsound.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexCSS.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexEiffel.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexErlang.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexEScript.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexFlagship.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexForth.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexFortran.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexGui4Cli.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexHaskell.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexHTML.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexInno.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexKix.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexLisp.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexLout.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexLua.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexMatlab.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexMetapost.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexMMIXAL.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexMPT.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexMSSQL.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexNsis.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexOpal.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexOthers.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexPascal.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexPB.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexPerl.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexPOV.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexPS.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexPython.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexRebol.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexRuby.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexScriptol.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexSmalltalk.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexSpecman.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexSpice.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexSQL.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexTADS3.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexTCL.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexTeX.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexVB.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexVerilog.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexVHDL.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LexYAML.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LineMarker.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\LineMarker.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\Platform.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\PropSet.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\PropSet.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\RESearch.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\RESearch.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\SciLexer.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\Scintilla.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ScintillaBase.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ScintillaBase.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\ScintillaWidget.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\SString.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Style.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\Style.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\StyleContext.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\StyleContext.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\SVector.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\UniConversion.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\UniConversion.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ViewStyle.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\ViewStyle.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\WindowAccessor.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\include\WindowAccessor.h" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\XPM.cxx" + > + </File> + <File + RelativePath=".\wxscintilla\src\scintilla\src\XPM.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="wxflatnotebook" + > + <File + RelativePath=".\wxflatnotebook\src\wxflatnotebook\fnb_resources.cpp" + > + </File> + <File + RelativePath=".\wxflatnotebook\include\wx\wxflatnotebook\fnb_resources.h" + > + </File> + <File + RelativePath=".\wxflatnotebook\src\wxflatnotebook\popup_dlg.cpp" + > + </File> + <File + RelativePath=".\wxflatnotebook\include\wx\wxflatnotebook\popup_dlg.h" + > + </File> + <File + RelativePath=".\wxflatnotebook\src\wxflatnotebook\renderer.cpp" + > + </File> + <File + RelativePath=".\wxflatnotebook\include\wx\wxflatnotebook\renderer.h" + > + </File> + <File + RelativePath=".\wxflatnotebook\include\wx\wxflatnotebook\singleton.h" + > + </File> + <File + RelativePath=".\wxflatnotebook\include\wx\wxflatnotebook\smart_ptr.h" + > + </File> + <File + RelativePath=".\wxflatnotebook\src\wxflatnotebook\wxFlatNotebook.cpp" + > + </File> + <File + RelativePath=".\wxflatnotebook\include\wx\wxflatnotebook\wxflatnotebook.h" + > + </File> + <File + RelativePath=".\wxflatnotebook\include\wx\wxflatnotebook\wxfnbdroptarget.h" + > + </File> + </Filter> <File RelativePath=".\aboutDlg.cpp" *************** *** 280,283 **** --- 800,811 ---- </File> <File + RelativePath=".\sparkedit.cpp" + > + </File> + <File + RelativePath=".\sparkedit.h" + > + </File> + <File RelativePath=".\sparkglcanvas.cpp" > --- NEW FILE: sparkedit.cpp --- /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- this file is part of rcssserver3D Fri May 9 2003 Copyright (C) 2003 Koblenz University $Id: sparkedit.cpp,v 1.2 2007/06/23 13:36:28 rollmark Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "sparkedit.h" #include <wx/colour.h> #include <wx/filename.h> #include <rsgedit/res/xpm_play.xpm> #include <rsgedit/res/xpm_spark.xpm> #include <rsgedit/res/xpm_ruby.xpm> #include <rsgedit/res/xpm_rsg.xpm> static wxColour COL_COMMENT(0,128,0); static wxColour COL_KEYWORD(0,0,255); SparkEdit::TEditMap SparkEdit::mEditMap; wxFlatNotebookImageList Sp... [truncated message content] |