You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(153) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(48) |
Feb
(46) |
Mar
(12) |
Apr
(4) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(263) |
Mar
(235) |
Apr
(66) |
May
(42) |
Jun
(270) |
Jul
(65) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Markus R. <rol...@us...> - 2007-07-09 19:12:03
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24864 Modified Files: aboutDlg.cpp rsgedit.wxg Log Message: - fixed about dialog title Index: rsgedit.wxg =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/rsgedit.wxg,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** rsgedit.wxg 9 Jul 2007 18:40:53 -0000 1.11 --- rsgedit.wxg 9 Jul 2007 19:11:55 -0000 1.12 *************** *** 1,4 **** <?xml version="1.0"?> ! <!-- generated by wxGlade 0.5 on Mon Jul 09 20:39:54 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"> --- 1,4 ---- <?xml version="1.0"?> ! <!-- generated by wxGlade 0.5 on Mon Jul 09 21:09:18 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"> *************** *** 323,327 **** <object class="aboutDlg" name="dialog_1" base="EditDialog"> <style>wxDEFAULT_DIALOG_STYLE</style> ! <title>dialog_1</title> <object class="wxBoxSizer" name="sizer_9" base="EditBoxSizer"> <orient>wxVERTICAL</orient> --- 323,327 ---- <object class="aboutDlg" name="dialog_1" base="EditDialog"> <style>wxDEFAULT_DIALOG_STYLE</style> ! <title>About</title> <object class="wxBoxSizer" name="sizer_9" base="EditBoxSizer"> <orient>wxVERTICAL</orient> Index: aboutDlg.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/aboutDlg.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** aboutDlg.cpp 23 Jun 2007 13:36:28 -0000 1.3 --- aboutDlg.cpp 9 Jul 2007 19:11:55 -0000 1.4 *************** *** 23,27 **** { // begin wxGlade: aboutDlg::set_properties ! SetTitle(wxT("dialog_1")); mBitmap->SetMinSize(wxSize(500, 200)); // end wxGlade --- 23,27 ---- { // begin wxGlade: aboutDlg::set_properties ! SetTitle(wxT("About")); mBitmap->SetMinSize(wxSize(500, 200)); // end wxGlade |
From: Markus R. <rol...@us...> - 2007-07-09 18:49:12
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15216 Modified Files: mainframe.cpp mainframe.h Log Message: - added method OnUpdateEditCommand to manage edit command UI state Index: mainframe.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** mainframe.h 9 Jul 2007 18:42:09 -0000 1.20 --- mainframe.h 9 Jul 2007 18:49:08 -0000 1.21 *************** *** 165,168 **** --- 165,169 ---- void OnTabContextMenu(wxFlatNotebookEvent& event); + void OnUpdateEditCommand(wxUpdateUIEvent& event); void OnEditCommand(wxCommandEvent& event); void OnEditSavePointReached(wxScintillaEvent& event); Index: mainframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** mainframe.cpp 9 Jul 2007 18:42:09 -0000 1.27 --- mainframe.cpp 9 Jul 2007 18:49:08 -0000 1.28 *************** *** 127,130 **** --- 127,137 ---- EVT_MENU(wxID_SELECTALL, mainframe::OnEditCommand) + EVT_UPDATE_UI(wxID_UNDO, mainframe::OnUpdateEditCommand) + EVT_UPDATE_UI(wxID_REDO, mainframe::OnUpdateEditCommand) + EVT_UPDATE_UI(wxID_CUT, mainframe::OnUpdateEditCommand) + EVT_UPDATE_UI(wxID_COPY, mainframe::OnUpdateEditCommand) + EVT_UPDATE_UI(wxID_PASTE, mainframe::OnUpdateEditCommand) + EVT_UPDATE_UI(wxID_SELECTALL, mainframe::OnUpdateEditCommand) + EVT_SPARK_CONTEXT(ID_SPARK_CONTEXT, mainframe::OnSparkContext) END_EVENT_TABLE() *************** *** 1378,1386 **** { case wxID_UNDO: { ! if (edit->CanUndo()) ! { ! edit->Undo(); ! } break; } --- 1385,1427 ---- { case wxID_UNDO: + edit->Undo(); + break; + + case wxID_REDO: + edit->Redo(); + break; + + case wxID_CUT: + edit->Cut (); + break; + + case wxID_COPY: + edit->Copy (); + break; + + case wxID_PASTE: + edit->Paste(); + break; + + case wxID_SELECTALL: + edit->SetSelection (0, edit->GetLength()); + break; + } + } + + void mainframe::OnUpdateEditCommand(wxUpdateUIEvent& event) + { + wxScintilla* edit = dynamic_cast<wxScintilla*>(mCtrNotebook->GetCurrentPage()); + if (edit == 0) + { + event.Enable(false); + return; + } + + switch (event.GetId()) + { + case wxID_UNDO: { ! event.Enable(edit->CanUndo()); break; } *************** *** 1388,1395 **** case wxID_REDO: { ! if (edit->CanRedo()) ! { ! edit->Redo(); ! } break; --- 1429,1433 ---- case wxID_REDO: { ! event.Enable(edit->CanRedo()); break; *************** *** 1398,1408 **** case wxID_CUT: { ! if ( ! (! edit->GetReadOnly()) && ! (edit->GetSelectionEnd()-edit->GetSelectionStart() > 0) ! ) ! { ! edit->Cut (); ! } break; } --- 1436,1443 ---- case wxID_CUT: { ! event.Enable( ! (! edit->GetReadOnly()) && ! (edit->GetSelectionEnd()-edit->GetSelectionStart() > 0) ! ); break; } *************** *** 1410,1417 **** case wxID_COPY: { ! if (edit->GetSelectionEnd()-edit->GetSelectionStart() > 0) ! { ! edit->Copy (); ! } break; } --- 1445,1452 ---- case wxID_COPY: { ! event.Enable ! ( ! (edit->GetSelectionEnd()-edit->GetSelectionStart() > 0) ! ); break; } *************** *** 1419,1426 **** case wxID_PASTE: { ! if (edit->CanPaste()) ! { ! edit->Paste(); ! } break; } --- 1454,1458 ---- case wxID_PASTE: { ! event.Enable(edit->CanPaste()); break; } *************** *** 1428,1432 **** case wxID_SELECTALL: { ! edit->SetSelection (0, edit->GetLength()); break; } --- 1460,1464 ---- case wxID_SELECTALL: { ! event.Enable(true); break; } |
From: Markus R. <rol...@us...> - 2007-07-09 18:42:18
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12699 Modified Files: mainframe.cpp mainframe.h Log Message: - handle edit, copy, paste etc. fired from the menu() in mainframe::OnEditCommand() and forward to edit component Index: mainframe.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** mainframe.h 8 Jul 2007 14:43:53 -0000 1.19 --- mainframe.h 9 Jul 2007 18:42:09 -0000 1.20 *************** *** 165,168 **** --- 165,169 ---- void OnTabContextMenu(wxFlatNotebookEvent& event); + void OnEditCommand(wxCommandEvent& event); void OnEditSavePointReached(wxScintillaEvent& event); void OnEditSavePointLeft(wxScintillaEvent& event); Index: mainframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** mainframe.cpp 8 Jul 2007 14:43:53 -0000 1.26 --- mainframe.cpp 9 Jul 2007 18:42:09 -0000 1.27 *************** *** 120,123 **** --- 120,130 ---- EVT_SCI_SAVEPOINTLEFT(wxID_ANY, mainframe::OnEditSavePointLeft) + EVT_MENU(wxID_UNDO, mainframe::OnEditCommand) + EVT_MENU(wxID_REDO, mainframe::OnEditCommand) + EVT_MENU(wxID_CUT, mainframe::OnEditCommand) + EVT_MENU(wxID_COPY, mainframe::OnEditCommand) + EVT_MENU(wxID_PASTE, mainframe::OnEditCommand) + EVT_MENU(wxID_SELECTALL, mainframe::OnEditCommand) + EVT_SPARK_CONTEXT(ID_SPARK_CONTEXT, mainframe::OnSparkContext) END_EVENT_TABLE() *************** *** 155,169 **** MainFrame_menubar->Append(wxglade_tmp_menu_1, wxT("&File")); wxMenu* wxglade_tmp_menu_2 = new wxMenu(); ! wxglade_tmp_menu_2->Append(ID_VIEW_LOG, wxT("message &log"), wxT("Show/Hide message log"), wxITEM_CHECK); ! wxglade_tmp_menu_2->Append(ID_VIEW_TREE, wxT("object &tree"), wxT("Show/Hide object tree"), wxITEM_CHECK); ! 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); --- 162,186 ---- MainFrame_menubar->Append(wxglade_tmp_menu_1, wxT("&File")); wxMenu* wxglade_tmp_menu_2 = new wxMenu(); ! wxglade_tmp_menu_2->Append(wxID_UNDO, wxT("&Undo"), wxEmptyString, wxITEM_NORMAL); ! wxglade_tmp_menu_2->Append(wxID_REDO, wxT("&Redo"), wxEmptyString, wxITEM_NORMAL); ! wxglade_tmp_menu_2->AppendSeparator(); ! wxglade_tmp_menu_2->Append(wxID_CUT, wxT("Cu&t"), wxEmptyString, wxITEM_NORMAL); ! wxglade_tmp_menu_2->Append(wxID_COPY, wxT("&Copy"), wxEmptyString, wxITEM_NORMAL); ! wxglade_tmp_menu_2->Append(wxID_PASTE, wxT("&Paste"), wxEmptyString, wxITEM_NORMAL); ! wxglade_tmp_menu_2->AppendSeparator(); ! wxglade_tmp_menu_2->Append(wxID_SELECTALL, wxT("Select &All"), wxEmptyString, wxITEM_NORMAL); ! MainFrame_menubar->Append(wxglade_tmp_menu_2, wxT("&Edit")); wxMenu* wxglade_tmp_menu_3 = new wxMenu(); ! wxglade_tmp_menu_3->Append(ID_VIEW_LOG, wxT("message &log"), wxT("Show/Hide message log"), wxITEM_CHECK); ! wxglade_tmp_menu_3->Append(ID_VIEW_TREE, wxT("object &tree"), wxT("Show/Hide object tree"), wxITEM_CHECK); ! MainFrame_menubar->Append(wxglade_tmp_menu_3, wxT("&View")); wxMenu* wxglade_tmp_menu_4 = new wxMenu(); ! wxglade_tmp_menu_4->Append(ID_SIM_STEP, wxT("St&ep"), wxEmptyString, wxITEM_NORMAL); ! wxglade_tmp_menu_4->Append(ID_SIM_START, wxT("&Start"), wxT("Start simulation"), wxITEM_NORMAL); ! wxglade_tmp_menu_4->Append(ID_SIM_PAUSE, wxT("&Pause"), wxT("Pause Simulation"), wxITEM_NORMAL); ! MainFrame_menubar->Append(wxglade_tmp_menu_4, wxT("&Simulation")); ! wxMenu* wxglade_tmp_menu_5 = new wxMenu(); ! wxglade_tmp_menu_5->Append(ID_HELP_ABOUT, wxT("&About"), wxEmptyString, wxITEM_NORMAL); ! MainFrame_menubar->Append(wxglade_tmp_menu_5, wxT("&Help")); MainFrame_statusbar = CreateStatusBar(1, 0); mCtrPropList = new wxListCtrl(window_1_pane_1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSIMPLE_BORDER); *************** *** 1348,1349 **** --- 1365,1434 ---- event.Skip(); } + + void mainframe::OnEditCommand(wxCommandEvent& event) + { + wxScintilla* edit = dynamic_cast<wxScintilla*>(mCtrNotebook->GetCurrentPage()); + if (edit == 0) + { + event.Skip(); + return; + } + + switch (event.GetId()) + { + case wxID_UNDO: + { + if (edit->CanUndo()) + { + edit->Undo(); + } + break; + } + + case wxID_REDO: + { + if (edit->CanRedo()) + { + edit->Redo(); + } + break; + + } + + case wxID_CUT: + { + if ( + (! edit->GetReadOnly()) && + (edit->GetSelectionEnd()-edit->GetSelectionStart() > 0) + ) + { + edit->Cut (); + } + break; + } + + case wxID_COPY: + { + if (edit->GetSelectionEnd()-edit->GetSelectionStart() > 0) + { + edit->Copy (); + } + break; + } + + case wxID_PASTE: + { + if (edit->CanPaste()) + { + edit->Paste(); + } + break; + } + + case wxID_SELECTALL: + { + edit->SetSelection (0, edit->GetLength()); + break; + } + } + } |
From: Markus R. <rol...@us...> - 2007-07-09 18:41:11
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11971 Modified Files: rsgedit.wxg Log Message: - add an 'edit' menu with the usual suspects Index: rsgedit.wxg =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/rsgedit.wxg,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** rsgedit.wxg 23 Jun 2007 13:36:28 -0000 1.10 --- rsgedit.wxg 9 Jul 2007 18:40:53 -0000 1.11 *************** *** 1,4 **** <?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"> --- 1,4 ---- <?xml version="1.0"?> ! <!-- generated by wxGlade 0.5 on Mon Jul 09 20:39:54 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"> *************** *** 38,41 **** --- 38,77 ---- </item> </menu> + <menu name="" label="&Edit"> + <item> + <label>&Undo</label> + <id>wxID_UNDO</id> + </item> + <item> + <label>&Redo</label> + <id>wxID_REDO</id> + </item> + <item> + <label>---</label> + <id>---</id> + <name>---</name> + </item> + <item> + <label>Cu&t</label> + <id>wxID_CUT</id> + </item> + <item> + <label>&Copy</label> + <id>wxID_COPY</id> + </item> + <item> + <label>&Paste</label> + <id>wxID_PASTE</id> + </item> + <item> + <label>---</label> + <id>---</id> + <name>---</name> + </item> + <item> + <label>Select &All</label> + <id>wxID_SELECTALL</id> + </item> + </menu> <menu name="" label="&View"> <item> |
From: Markus R. <rol...@us...> - 2007-07-08 14:44:42
|
Update of /cvsroot/simspark/simspark/spark/oxygen/physicsserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6862 Modified Files: joint.h Log Message: - made GetParameter() and SetParameter() public Index: joint.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/physicsserver/joint.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** joint.h 15 Mar 2007 07:26:27 -0000 1.3 --- joint.h 8 Jul 2007 14:44:39 -0000 1.4 *************** *** 242,245 **** --- 242,251 ---- float GetMaxMotorForce(EAxisIndex idx) const; + /** sets a joint parameter value */ + virtual void SetParameter(int parameter, float value) = 0; + + /** returns a joint parameter value */ + virtual float GetParameter(int parameter) const = 0; + protected: /** associated the created ODE joint with this node */ *************** *** 249,257 **** boost::shared_ptr<Body> GetBody(const std::string& path); - /** sets a joint parameter value */ - virtual void SetParameter(int parameter, float value) = 0; - - /** returns a joint parameter value */ - virtual float GetParameter(int parameter) const = 0; protected: --- 255,258 ---- |
From: Markus R. <rol...@us...> - 2007-07-08 14:43:58
|
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) { |
From: Markus R. <rol...@us...> - 2007-07-08 14:43:13
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6357 Modified Files: sparkcontext.cpp Log Message: - added 'Save file' and 'Set as StartScript' option to context menu Index: sparkcontext.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkcontext.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sparkcontext.cpp 8 Jul 2007 14:24:27 -0000 1.7 --- sparkcontext.cpp 8 Jul 2007 14:43:09 -0000 1.8 *************** *** 22,25 **** --- 22,26 ---- #include "constants.h" #include <wx/menu.h> + #include <wx/filename.h> #include <zeitgeist/leaf.h> #include <oxygen/sceneserver/scenedict.h> *************** *** 97,105 **** } long style = 0; ! wxMenu* menu(new wxMenu(SparkEdit::GetInstance().GetFile(edit), 9)); menu->Append(ID_TAB_CLOSE, wxT("&Close tab")); menu->Append(ID_TAB_CLOSE_OTHER, wxT("Close other tabs")); return menu; } --- 98,117 ---- } + wxString path(SparkEdit::GetInstance().GetFile(edit)); + wxString fname(wxFileName(path).GetFullName()); + long style = 0; ! wxMenu* menu(new wxMenu(fname, 9)); + menu->Append(ID_FILE_SAVE, wxT("&Save " + fname)); menu->Append(ID_TAB_CLOSE, wxT("&Close tab")); menu->Append(ID_TAB_CLOSE_OTHER, wxT("Close other tabs")); + + if (edit != SparkEdit::GetInstance().GetStartScript()) + { + menu->AppendSeparator(); + menu->Append(ID_TAB_STARTSCRIPT, wxT("Set ") + fname + wxT(" as Startscript")); + } + return menu; } |
From: Markus R. <rol...@us...> - 2007-07-08 14:42:13
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6021 Modified Files: constants.h Log Message: - added ID_TAB_STARTSCRIPT constant Index: constants.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/constants.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** constants.h 8 Jul 2007 14:23:43 -0000 1.11 --- constants.h 8 Jul 2007 14:42:09 -0000 1.12 *************** *** 67,71 **** ID_TAB_CLOSE = (wxID_HIGHEST+50), ! ID_TAB_CLOSE_OTHER = (wxID_HIGHEST+51) }; --- 67,72 ---- ID_TAB_CLOSE = (wxID_HIGHEST+50), ! ID_TAB_CLOSE_OTHER = (wxID_HIGHEST+51), ! ID_TAB_STARTSCRIPT = (wxID_HIGHEST+52) }; |
From: Markus R. <rol...@us...> - 2007-07-08 14:26:15
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31811 Modified Files: mainframe.cpp mainframe.h Log Message: - implemented 'close tab' and 'close other tabs' from wxScintilla contest menus Index: mainframe.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** mainframe.h 8 Jul 2007 13:41:28 -0000 1.17 --- mainframe.h 8 Jul 2007 14:25:12 -0000 1.18 *************** *** 157,162 **** --- 157,166 ---- void OnTreeItemRightClick(wxTreeEvent& event); + void OnTabCloseOther(wxCommandEvent& event); + void OnTabClose(wxCommandEvent& event); + void OnTabClosing(wxFlatNotebookEvent& event); void OnTabChanged(wxFlatNotebookEvent& event); + void OnTabContextMenu(wxFlatNotebookEvent& event); void OnEditSavePointReached(wxScintillaEvent& event); Index: mainframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** mainframe.cpp 8 Jul 2007 13:58:28 -0000 1.24 --- mainframe.cpp 8 Jul 2007 14:25:12 -0000 1.25 *************** *** 111,114 **** --- 111,118 ---- EVT_FLATNOTEBOOK_PAGE_CLOSING(wxID_ANY, mainframe::OnTabClosing) EVT_FLATNOTEBOOK_PAGE_CHANGED(wxID_ANY, mainframe::OnTabChanged) + EVT_FLATNOTEBOOK_CONTEXT_MENU(wxID_ANY, mainframe::OnTabContextMenu) + + EVT_MENU(ID_TAB_CLOSE, mainframe::OnTabClose) + EVT_MENU(ID_TAB_CLOSE_OTHER, mainframe::OnTabCloseOther) EVT_SCI_SAVEPOINTREACHED(wxID_ANY, mainframe::OnEditSavePointReached) *************** *** 1258,1261 **** --- 1262,1316 ---- } + void mainframe::OnTabCloseOther(wxCommandEvent& event) + { + int sel = mCtrNotebook->GetSelection(); + if (sel < 0) + { + return; + } + + int n = mCtrNotebook->GetPageCount(); + for (int i=(n-1);i>=0;--i) + { + if (i == sel) + { + continue; + } + + bool notify = true; + mCtrNotebook->RemovePage(i, notify); + } + } + + void mainframe::OnTabClose(wxCommandEvent& event) + { + int sel = mCtrNotebook->GetSelection(); + if (sel < 0) + { + return; + } + + bool notify = true; + mCtrNotebook->RemovePage(sel, notify); + } + + void mainframe::OnTabContextMenu(wxFlatNotebookEvent& event) + { + wxScintilla* edit = dynamic_cast<wxScintilla*>(mCtrNotebook->GetCurrentPage()); + if (edit == 0) + { + event.Skip(); + return; + } + + wxMenu* context = SparkContext::GetInstance().GetContextMenu(edit); + if (context == 0) + { + return; + } + + PopupMenu(context); + } + void mainframe::OnTabChanged(wxFlatNotebookEvent& event) { |
From: Markus R. <rol...@us...> - 2007-07-08 14:25:55
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31439 Modified Files: sparkcontext.cpp sparkcontext.h Log Message: - added method GetContextMenu that create a context menu given a wxScintilla tab Index: sparkcontext.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkcontext.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sparkcontext.h 23 Jun 2007 14:04:23 -0000 1.5 --- sparkcontext.h 8 Jul 2007 14:24:27 -0000 1.6 *************** *** 31,34 **** --- 31,35 ---- class wxEvtHandler; class wxMenu; + class wxScintilla; class SparkContext *************** *** 50,53 **** --- 51,56 ---- boost::weak_ptr<zeitgeist::Leaf> GetContextNode() const; + wxMenu* GetContextMenu(wxScintilla* edit); + private: SparkContext(); Index: sparkcontext.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkcontext.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sparkcontext.cpp 8 Jul 2007 13:42:47 -0000 1.6 --- sparkcontext.cpp 8 Jul 2007 14:24:27 -0000 1.7 *************** *** 24,27 **** --- 24,28 ---- #include <zeitgeist/leaf.h> #include <oxygen/sceneserver/scenedict.h> + #include <rsgedit/sparkedit.h> using namespace zeitgeist; *************** *** 88,91 **** --- 89,108 ---- } + wxMenu* SparkContext::GetContextMenu(wxScintilla* edit) + { + if (edit == 0) + { + assert(false); + return 0; + } + + long style = 0; + wxMenu* menu(new wxMenu(SparkEdit::GetInstance().GetFile(edit), 9)); + + menu->Append(ID_TAB_CLOSE, wxT("&Close tab")); + menu->Append(ID_TAB_CLOSE_OTHER, wxT("Close other tabs")); + return menu; + } + wxMenu* SparkContext::GetContextMenu(weak_ptr<Leaf> leaf) { |
From: Markus R. <rol...@us...> - 2007-07-08 14:24:49
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31050 Modified Files: constants.h Log Message: - ID_TAB_CLOSE and ID_TAB_CLOSE_OTHER constant Index: constants.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/constants.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** constants.h 8 Jul 2007 13:39:15 -0000 1.10 --- constants.h 8 Jul 2007 14:23:43 -0000 1.11 *************** *** 64,68 **** ID_FILE_SAVE = (wxID_HIGHEST+40), ! ID_CONTEXT_KINEMATIC = (wxID_HIGHEST+41) }; --- 64,71 ---- ID_FILE_SAVE = (wxID_HIGHEST+40), ! ID_CONTEXT_KINEMATIC = (wxID_HIGHEST+41), ! ! ID_TAB_CLOSE = (wxID_HIGHEST+50), ! ID_TAB_CLOSE_OTHER = (wxID_HIGHEST+51) }; |
From: Markus R. <rol...@us...> - 2007-07-08 13:58:32
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21316 Modified Files: mainframe.cpp sparkedit.cpp sparkedit.h Log Message: - convert SparkEdit class to a singleton and fix up callers Index: sparkedit.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkedit.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sparkedit.cpp 23 Jun 2007 14:29:58 -0000 1.3 --- sparkedit.cpp 8 Jul 2007 13:58:28 -0000 1.4 *************** *** 30,36 **** static wxColour COL_KEYWORD(0,0,255); ! SparkEdit::TEditMap SparkEdit::mEditMap; ! wxFlatNotebookImageList SparkEdit::mNotebookImgList; ! wxScintilla* SparkEdit::mStartScript = 0; wxScintilla* SparkEdit::Create(wxWindow* parent) --- 30,47 ---- static wxColour COL_KEYWORD(0,0,255); ! SparkEdit::SparkEdit() ! : mStartScript(0) ! { ! } ! ! SparkEdit::~SparkEdit() ! { ! } ! ! SparkEdit& SparkEdit::GetInstance() ! { ! static SparkEdit theInstance; ! return theInstance; ! } wxScintilla* SparkEdit::Create(wxWindow* parent) *************** *** 391,395 **** return; } ! const EditEntry& entry = (*iter).second; SaveFile(edit, entry); --- 402,406 ---- return; } ! const EditEntry& entry = (*iter).second; SaveFile(edit, entry); Index: mainframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** mainframe.cpp 8 Jul 2007 13:41:28 -0000 1.23 --- mainframe.cpp 8 Jul 2007 13:58:28 -0000 1.24 *************** *** 191,196 **** mCtrNotebook->AddPage(mCanvas, wxT("Canvas")); ! SparkEdit::PrepareImageList(mCtrNotebook); ! mCtrNotebook->SetPageImageIndex(0, SparkEdit::II_SIMSPARK); // create toolbar --- 191,196 ---- mCtrNotebook->AddPage(mCanvas, wxT("Canvas")); ! SparkEdit::GetInstance().PrepareImageList(mCtrNotebook); ! mCtrNotebook->SetPageImageIndex(0, SparkEdit::GetInstance().II_SIMSPARK); // create toolbar *************** *** 248,254 **** { wxString title(wxT("SimSpark")); ! if (SparkEdit::GetStartScript() != 0) { ! title += wxT(" <") + SparkEdit::GetStartScriptFile() + wxT(">"); } --- 248,254 ---- { wxString title(wxT("SimSpark")); ! if (SparkEdit::GetInstance().GetStartScript() != 0) { ! title += wxT(" <") + SparkEdit::GetInstance().GetStartScriptFile() + wxT(">"); } *************** *** 819,823 **** bool select = true; ! wxScintilla* edit = SparkEdit::GetEdit(fname,mCtrNotebook,select); if (edit != 0) { --- 819,823 ---- bool select = true; ! wxScintilla* edit = SparkEdit::GetInstance().GetEdit(fname,mCtrNotebook,select); if (edit != 0) { *************** *** 978,983 **** void mainframe::SaveModified() { ! SparkEdit::SaveModified(); ! SparkEdit::UpdateTitles(mCtrNotebook); } --- 978,983 ---- void mainframe::SaveModified() { ! SparkEdit::GetInstance().SaveModified(); ! SparkEdit::GetInstance().UpdateTitles(mCtrNotebook); } *************** *** 996,1000 **** } ! SparkEdit::SaveFile(edit); } --- 996,1000 ---- } ! SparkEdit::GetInstance().SaveFile(edit); } *************** *** 1027,1043 **** 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); --- 1027,1043 ---- bool select = false; ! wxScintilla* edit = SparkEdit::GetInstance().GetEdit(filename, mCtrNotebook, select); if ( ! (SparkEdit::GetInstance().GetStartScript() != 0) || ! (SparkEdit::GetInstance().GetFileType(edit) != SparkEdit::GetInstance().ET_RB) ) { ! SparkEdit::GetInstance().SelectEdit(mCtrNotebook, edit); return; } SelectCanvasTab(); ! SparkEdit::GetInstance().SetStartScript(mCtrNotebook, edit); UpdateTitle(); OpenSimulation(filename); *************** *** 1048,1052 **** event.Enable( (GetSimState() == S_PAUSED) && ! (SparkEdit::GetStartScript() != 0) ); } --- 1048,1052 ---- event.Enable( (GetSimState() == S_PAUSED) && ! (SparkEdit::GetInstance().GetStartScript() != 0) ); } *************** *** 1054,1058 **** void mainframe::OnFileReload(wxCommandEvent& event) { ! wxString simName = SparkEdit::GetStartScriptFile(); if (simName.IsEmpty()) { --- 1054,1058 ---- void mainframe::OnFileReload(wxCommandEvent& event) { ! wxString simName = SparkEdit::GetInstance().GetStartScriptFile(); if (simName.IsEmpty()) { *************** *** 1224,1228 **** if (edit->GetModify()) { ! int res = wxMessageBox("The file '"+SparkEdit::GetFile(edit)+"' is modified.\n" "Do you want to save your changes?", "rsgedit", --- 1224,1228 ---- if (edit->GetModify()) { ! int res = wxMessageBox("The file '"+SparkEdit::GetInstance().GetFile(edit)+"' is modified.\n" "Do you want to save your changes?", "rsgedit", *************** *** 1241,1245 **** case wxYES: ! SparkEdit::SaveFile(edit); break; --- 1241,1245 ---- case wxYES: ! SparkEdit::GetInstance().SaveFile(edit); break; *************** *** 1251,1255 **** if (edit != 0) { ! SparkEdit::PutEdit(edit); UpdateTitle(); } --- 1251,1255 ---- if (edit != 0) { ! SparkEdit::GetInstance().PutEdit(edit); UpdateTitle(); } *************** *** 1271,1275 **** void mainframe::OnEditSavePointReached(wxScintillaEvent& event) { ! SparkEdit::UpdateTitle(mCtrNotebook,static_cast<wxScintilla*>(event.GetEventObject())); event.Skip(); } --- 1271,1275 ---- void mainframe::OnEditSavePointReached(wxScintillaEvent& event) { ! SparkEdit::GetInstance().UpdateTitle(mCtrNotebook,static_cast<wxScintilla*>(event.GetEventObject())); event.Skip(); } *************** *** 1277,1281 **** void mainframe::OnEditSavePointLeft(wxScintillaEvent& event) { ! SparkEdit::UpdateTitle(mCtrNotebook,static_cast<wxScintilla*>(event.GetEventObject())); event.Skip(); } --- 1277,1281 ---- void mainframe::OnEditSavePointLeft(wxScintillaEvent& event) { ! SparkEdit::GetInstance().UpdateTitle(mCtrNotebook,static_cast<wxScintilla*>(event.GetEventObject())); event.Skip(); } Index: sparkedit.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkedit.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sparkedit.h 23 Jun 2007 14:29:58 -0000 1.3 --- sparkedit.h 8 Jul 2007 13:58:28 -0000 1.4 *************** *** 63,99 **** 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, 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; }; --- 63,105 ---- typedef std::map<wxScintilla*, EditEntry > TEditMap; + private: + SparkEdit(); + public: ! static SparkEdit& GetInstance(); ! ~SparkEdit(); ! ! wxScintilla* GetEdit(const wxString& fname, wxFlatNotebook* notebook, bool select); ! void PutEdit(wxScintilla* edit); ! void UpdateTitles(wxFlatNotebook* notebook); ! void UpdateTitle(wxFlatNotebook* notebook, wxScintilla* edit); ! void UpdateIcons(wxFlatNotebook* notebook); ! void SaveFile(wxScintilla* edit); ! void SaveModified(); ! void SetStartScript(wxFlatNotebook* notebook, wxScintilla* edit); ! wxScintilla* GetStartScript(); ! EEditType GetFileType(wxScintilla* edit); ! wxString GetFile(wxScintilla* edit); ! wxString GetStartScriptFile(); ! void PrepareImageList(wxFlatNotebook* notebook); ! void SelectEdit(wxFlatNotebook* notebook, wxScintilla* edit); protected: ! wxScintilla* Create(wxWindow* parent); ! bool LoadFile(wxScintilla* edit, EditEntry& entry); ! void PrepareEdit(wxScintilla* edit, const EditEntry& entry); ! wxString GetTitle(wxScintilla* edit, const EditEntry& entry); ! void UpdateIcon(wxFlatNotebook* notebook, wxScintilla* edit, const EditEntry& entry); ! int GetImageIndex(const wxScintilla* edit, const EditEntry& entry); ! void SaveFile(wxScintilla* edit, const EditEntry& entry); protected: ! TEditMap mEditMap; ! wxFlatNotebookImageList mNotebookImgList; //! the editor holding the simulation start script ! wxScintilla* mStartScript; }; |
From: Markus R. <rol...@us...> - 2007-07-08 13:45:31
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv16327 Modified Files: rsgedit.vcproj Log Message: - added kinmaticframe files Index: rsgedit.vcproj =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/rsgedit.vcproj,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** rsgedit.vcproj 23 Jun 2007 13:36:28 -0000 1.5 --- rsgedit.vcproj 8 Jul 2007 13:45:28 -0000 1.6 *************** *** 728,731 **** --- 728,739 ---- </File> <File + RelativePath=".\kinematicframe.cpp" + > + </File> + <File + RelativePath=".\kinematicframe.h" + > + </File> + <File RelativePath=".\main.cpp" > |
From: Markus R. <rol...@us...> - 2007-07-08 13:44:20
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15903 Added Files: kinematicframe.cpp kinematicframe.h Log Message: - initial minimal version of a frame that allows direct user control of joints. For all joint nodes below a given parrent node a slider is created that displays the current joint angle and allows the user to manipulate it. --- NEW FILE: kinematicframe.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: kinematicframe.h,v 1.1 2007/07/08 13:44:17 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. */ // -*- C++ -*- generated by wxGlade 0.4.1 on Fri Feb 23 21:06:30 2007 #ifndef KINEMATICFRAME_H #define KINEMATICFRAME_H #include <wx/wx.h> #include <zeitgeist/leaf.h> class kinematicFrame: public wxFrame { public: enum EControlMode { CM_PASSIV, CM_ACTIVE }; struct JointControl { public: int type; int axis; boost::weak_ptr<zeitgeist::Leaf> joint; EControlMode mode; int target; public: JointControl() : type(0), axis(0), mode(CM_PASSIV), target(0) { } }; typedef std::map<wxSlider*, JointControl> TJointControlMap; public: kinematicFrame(wxWindow* parent, int id, const wxString& title, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE); virtual ~kinematicFrame(); /** set the parent node */ void SetParent(boost::weak_ptr<zeitgeist::Leaf> parent); /** update the cached reference to the parent and recreate kinematic controls */ void UpdateCached(); /** update the joint sliders */ void RefreshProperties(); protected: void OnSliderChanged(wxCommandEvent& event); void OnScrollChanged(wxScrollEvent& event); float GetJointVel(float diff); void MoveJoint(JointControl& entry); protected: DECLARE_EVENT_TABLE() zeitgeist::Leaf::CachedPath<zeitgeist::Leaf> mParent; wxScrolledWindow* mCtrScrollWnd; TJointControlMap mJoints; }; // wxGlade: end class #endif // KINEMATICFRAME_H --- NEW FILE: kinematicframe.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: kinematicframe.cpp,v 1.1 2007/07/08 13:44:17 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. */ // -*- C++ -*- generated by wxGlade 0.4.1 on Fri Feb 23 21:06:30 2007 #include "main.h" #include "kinematicframe.h" #include "simspark.h" //! wxWidgets and zeitgeist both use a 'DECLARE_CLASS' macro #undef DECLARE_CLASS #include <salt/gmath.h> #include <oxygen/physicsserver/joint.h> #include <oxygen/physicsserver/universaljoint.h> #include <oxygen/physicsserver/sliderjoint.h> #include <oxygen/physicsserver/hingejoint.h> BEGIN_EVENT_TABLE(kinematicFrame, wxFrame) EVT_SLIDER( wxID_ANY, kinematicFrame::OnSliderChanged) EVT_SCROLL_CHANGED( kinematicFrame::OnScrollChanged) END_EVENT_TABLE() using namespace boost; using namespace zeitgeist; using namespace oxygen; using namespace salt; static const float MIN_JOINT_DIFF = 2; static const float MAX_JOINT_VEL = 50; kinematicFrame::kinematicFrame(wxWindow* parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size, long style): wxFrame(parent, id, title, pos, wxSize(640,-1), wxCAPTION|wxCLOSE_BOX|wxSYSTEM_MENU|wxRESIZE_BORDER|wxFRAME_TOOL_WINDOW|wxFRAME_NO_TASKBAR|wxFRAME_FLOAT_ON_PARENT|wxCLIP_CHILDREN) { SetTitle(wxT("Kinematics")); wxBoxSizer* topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); mCtrScrollWnd = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxNO_BORDER|wxHSCROLL|wxVSCROLL ); topSizer->Add(mCtrScrollWnd, 1, wxGROW, 0); mCtrScrollWnd->SetScrollbars(1, 1, 0, 0); int rows = 0; // dynamic int cols = 2; int vgap = 0; int hgap = 0; wxFlexGridSizer* sizer = new wxFlexGridSizer(rows, cols, vgap, hgap); sizer->AddGrowableCol(1); sizer->SetFlexibleDirection(wxHORIZONTAL); mCtrScrollWnd->SetSizer(sizer); } kinematicFrame::~kinematicFrame() { } void kinematicFrame::UpdateCached() { mJoints.clear(); wxSizer* sizer = mCtrScrollWnd->GetSizer(); if (sizer == 0) { assert(false); return; } shared_ptr<SimSpark> spark = wxGetApp().GetSpark(); if (spark.get() == 0) { return; } mParent.Update(spark->GetCore()); shared_ptr<Node> node = shared_dynamic_cast<Node>(mParent.get()); if (node.get() == 0) { return; } mCtrScrollWnd->Freeze(); bool delete_windows = true; sizer->Clear(delete_windows); Leaf::TLeafList joints; bool recursive = true; node->ListChildrenSupportingClass<Joint>(joints,recursive); for ( Leaf::TLeafList::iterator iter = joints.begin(); iter != joints.end(); ++iter ) { shared_ptr<Joint> joint = shared_static_cast<Joint>(*iter); wxString path = joint->GetFullPath(); wxStaticText* text = new wxStaticText( mCtrScrollWnd, wxID_ANY, path, wxDefaultPosition, wxDefaultSize, 0 ); sizer->Add(text, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5); wxSlider* slider = new wxSlider( mCtrScrollWnd, wxID_ANY, 0, -179, 179, wxDefaultPosition, wxSize(250,-1), wxSL_HORIZONTAL|wxSL_AUTOTICKS|wxSL_LABELS ); sizer->Add(slider, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5); JointControl entry; entry.type = joint->GetType(); entry.axis = 0; entry.joint = joint; mJoints[slider] = entry; } mCtrScrollWnd->Thaw(); mCtrScrollWnd->Layout(); } void kinematicFrame::SetParent(weak_ptr<Leaf> parent) { shared_ptr<SimSpark> spark = wxGetApp().GetSpark(); if (spark.get() == 0) { return; } if (parent.expired()) { mParent = Leaf::CachedPath<zeitgeist::Leaf>(); } else { std::string path = parent.lock()->GetFullPath(); mParent.SetKey(Core::CacheKey(spark->GetCore()->GetRoot(), path)); } UpdateCached(); } void kinematicFrame::RefreshProperties() { for ( TJointControlMap::iterator iter = mJoints.begin(); iter != mJoints.end(); ++iter ) { wxSlider* slider = (*iter).first; JointControl& entry = (*iter).second; if ( (entry.joint.expired()) || (slider == 0) ) { continue; } if (entry.mode == CM_ACTIVE) { MoveJoint(entry); } int value = 0; switch (entry.type) { default: break; case dJointTypeSlider: { shared_ptr<SliderJoint> sliderJoint = shared_static_cast<SliderJoint>(entry.joint.lock()); value = static_cast<int>(sliderJoint->GetPosition()); break; } case dJointTypeUniversal: { shared_ptr<UniversalJoint> universal = shared_static_cast<UniversalJoint>(entry.joint.lock()); value = static_cast<int>(universal->GetAngle(static_cast<Joint::EAxisIndex>(entry.axis))); break; } case dJointTypeHinge: { shared_ptr<HingeJoint> hinge = shared_static_cast<HingeJoint>(entry.joint.lock()); value = static_cast<int>(hinge->GetAngle()); break; } } slider->SetValue(value); } } void kinematicFrame::OnScrollChanged(wxScrollEvent& event) { TJointControlMap::iterator iter = mJoints.find(static_cast<wxSlider*>(event.GetEventObject())); if (iter == mJoints.end()) { assert(false); return; } JointControl& entry = (*iter).second; shared_ptr<Joint> joint(shared_static_cast<Joint>(entry.joint.lock())); joint->SetParameter(dParamVel, 0); } float kinematicFrame::GetJointVel(float diff) { float vel = diff; return gClamp<float>(vel, -MAX_JOINT_VEL, MAX_JOINT_VEL); } void kinematicFrame::MoveJoint(JointControl& entry) { switch (entry.type) { default: break; case dJointTypeHinge: { shared_ptr<HingeJoint> hinge = shared_static_cast<HingeJoint>(entry.joint.lock()); float value_joint = static_cast<int>(hinge->GetAngle()); float diff = (entry.target - value_joint); if (gAbs(diff) < MIN_JOINT_DIFF) { entry.mode = CM_PASSIV; hinge->SetParameter(dParamVel, 0); } else { hinge->SetParameter(dParamVel, GetJointVel(diff)); } break; } case dJointTypeUniversal: { shared_ptr<UniversalJoint> universal = shared_static_cast<UniversalJoint>(entry.joint.lock()); int value_joint = static_cast<int>(universal->GetAngle(static_cast<Joint::EAxisIndex>(entry.axis))); int diff = (entry.target - value_joint); if (abs(diff) < MIN_JOINT_DIFF) { entry.mode = CM_PASSIV; universal->SetParameter(dParamVel, 0); } else { universal->SetParameter(dParamVel, GetJointVel(diff)); } break; } } } void kinematicFrame::OnSliderChanged(wxCommandEvent& event) { TJointControlMap::iterator iter = mJoints.find(static_cast<wxSlider*>(event.GetEventObject())); if (iter == mJoints.end()) { assert(false); return; } wxSlider* slider = (*iter).first; JointControl& entry = (*iter).second; entry.mode = CM_ACTIVE; entry.target = slider->GetValue(); } |
From: Markus R. <rol...@us...> - 2007-07-08 13:42:51
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15130 Modified Files: sparkcontext.cpp Log Message: - add 'Kinematic' entry to context menu Index: sparkcontext.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkcontext.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sparkcontext.cpp 23 Jun 2007 14:04:23 -0000 1.5 --- sparkcontext.cpp 8 Jul 2007 13:42:47 -0000 1.6 *************** *** 113,116 **** --- 113,118 ---- menu->AppendSeparator(); menu->Append(ID_CONTEXT_PROPERTIES, wxT("&Properties")); + menu->Append(ID_CONTEXT_KINEMATIC, wxT("&Kinematic")); + return menu; |
From: Markus R. <rol...@us...> - 2007-07-08 13:42:16
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15103 Modified Files: propertyframe.h Log Message: - minur cleanup Index: propertyframe.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/propertyframe.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** propertyframe.h 15 Mar 2007 07:26:24 -0000 1.3 --- propertyframe.h 8 Jul 2007 13:42:13 -0000 1.4 *************** *** 20,30 **** // -*- C++ -*- generated by wxGlade 0.4 on Sat Jan 21 16:34:57 2006 #include "property.h" #include <wx/wx.h> #include <wx/image.h> - #ifndef PROPERTYFRAME_H - #define PROPERTYFRAME_H - // begin wxGlade: ::dependencies #include <wx/listctrl.h> --- 20,30 ---- // -*- C++ -*- generated by wxGlade 0.4 on Sat Jan 21 16:34:57 2006 + #ifndef PROPERTYFRAME_H + #define PROPERTYFRAME_H + #include "property.h" #include <wx/wx.h> #include <wx/image.h> // begin wxGlade: ::dependencies #include <wx/listctrl.h> *************** *** 35,43 **** #include "propertylist.h" - namespace zeitgeist - { - class Leaf; - } - class propertyframe: public wxFrame { public: --- 35,38 ---- |
From: Markus R. <rol...@us...> - 2007-07-08 13:41:32
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14703 Modified Files: mainframe.cpp mainframe.h Log Message: - added OnContextKinematic handler that creates a kinematic frame with the currently selected node as its parent - updating kinematic frames in mainframe::RefreshProperties Index: mainframe.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mainframe.h 23 Jun 2007 13:36:28 -0000 1.16 --- mainframe.h 8 Jul 2007 13:41:28 -0000 1.17 *************** *** 112,115 **** --- 112,116 ---- void OnContextProperties(wxCommandEvent& event); + void OnContextKinematic(wxCommandEvent& event); void OnContextEditSource(wxCommandEvent& event); void OnContextCopyFileName(wxCommandEvent& event); Index: mainframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** mainframe.cpp 23 Jun 2007 13:36:28 -0000 1.22 --- mainframe.cpp 8 Jul 2007 13:41:28 -0000 1.23 *************** *** 23,26 **** --- 23,27 ---- #include "main.h" #include "propertyframe.h" + #include "kinematicframe.h" #include "agentframe.h" #include "sparkedit.h" *************** *** 91,94 **** --- 92,96 ---- EVT_MENU(ID_CONTEXT_COPY_FILENAME, mainframe::OnContextCopyFileName) EVT_MENU(ID_CONTEXT_COPY_PATH, mainframe::OnContextCopyPath) + EVT_MENU(ID_CONTEXT_KINEMATIC, mainframe::OnContextKinematic) EVT_BUTTON(ID_LOG_CLEAR, mainframe::OnLogClear) *************** *** 704,707 **** --- 706,725 ---- } + void mainframe::OnContextKinematic(wxCommandEvent& event) + { + weak_ptr<Leaf> leaf = SparkContext::GetInstance().GetContextNode(); + if (leaf.expired()) + { + assert(false); + return; + } + + wxString location(leaf.lock()->GetFullPath().c_str(), wxConvUTF8); + + kinematicFrame* frame(new kinematicFrame(this, wxID_ANY, location)); + frame->SetParent(leaf); + frame->SetTitle(location); + frame->Show(); + } void mainframe::OnContextProperties(wxCommandEvent& event) *************** *** 827,836 **** { propertyframe* pf = dynamic_cast<propertyframe*>(node->GetData()); ! if (pf == 0) { continue; } ! pf->RefreshProperties(); } } --- 845,860 ---- { propertyframe* pf = dynamic_cast<propertyframe*>(node->GetData()); ! if (pf != 0) { + pf->RefreshProperties(); continue; } ! kinematicFrame* kf = dynamic_cast<kinematicFrame*>(node->GetData()); ! if (kf != 0) ! { ! kf->RefreshProperties(); ! continue; ! } } } *************** *** 854,863 **** { propertyframe* pf = dynamic_cast<propertyframe*>(node->GetData()); ! if (pf == 0) { continue; } ! pf->UpdateCached(); } } --- 878,893 ---- { propertyframe* pf = dynamic_cast<propertyframe*>(node->GetData()); ! if (pf != 0) { + pf->UpdateCached(); continue; } ! kinematicFrame* kf = dynamic_cast<kinematicFrame*>(node->GetData()); ! if (kf != 0) ! { ! kf->UpdateCached(); ! continue; ! } } } |
From: Markus R. <rol...@us...> - 2007-07-08 13:39:19
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13770 Modified Files: constants.h Log Message: - aded ID_CONTEXT_KINEMATIC constant Index: constants.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/constants.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** constants.h 23 Jun 2007 13:36:28 -0000 1.9 --- constants.h 8 Jul 2007 13:39:15 -0000 1.10 *************** *** 63,67 **** ID_LOG_CHANNEL_ERROR = (wxID_HIGHEST+39), ! ID_FILE_SAVE = (wxID_HIGHEST+40) }; --- 63,68 ---- ID_LOG_CHANNEL_ERROR = (wxID_HIGHEST+39), ! ID_FILE_SAVE = (wxID_HIGHEST+40), ! ID_CONTEXT_KINEMATIC = (wxID_HIGHEST+41) }; |
From: Markus R. <rol...@us...> - 2007-06-23 14:30:01
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv18278 Modified Files: sparkedit.cpp sparkedit.h Log Message: - it's a bug to statically store the index of a tab within the notebook. This index can change after dragging or closing tabs at runtime Index: sparkedit.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkedit.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sparkedit.cpp 23 Jun 2007 13:36:28 -0000 1.2 --- sparkedit.cpp 23 Jun 2007 14:29:58 -0000 1.3 *************** *** 87,95 **** { wxScintilla* edit = (*iter).first; - if (select) { ! notebook->SetSelection(entry.page); ! edit->SetFocus(); } --- 87,93 ---- { wxScintilla* edit = (*iter).first; if (select) { ! SelectEdit(notebook, edit); } *************** *** 117,121 **** } - entry.page = static_cast<int>(notebook->GetPageCount() - 1); mEditMap[edit] = entry; --- 115,118 ---- *************** *** 278,282 **** } ! void SparkEdit::UpdateIcon(wxFlatNotebook* notebook, const wxScintilla* edit, const EditEntry& entry) { if ( --- 275,279 ---- } ! void SparkEdit::UpdateIcon(wxFlatNotebook* notebook, wxScintilla* edit, const EditEntry& entry) { if ( *************** *** 289,294 **** } ! notebook->SetPageImageIndex(entry.page, -1); ! notebook->SetPageImageIndex(entry.page, GetImageIndex(edit, entry)); } --- 286,297 ---- } ! int page = notebook->GetPageIndex(edit); ! if (page < 0) ! { ! assert(false); ! return; ! } ! ! notebook->SetPageImageIndex(page, GetImageIndex(edit, entry)); } *************** *** 302,312 **** for ( ! TEditMap::const_iterator iter = mEditMap.begin(); iter != mEditMap.end(); ++iter ) { ! const EditEntry& entry = (*iter).second; ! const wxScintilla* edit = (*iter).first; UpdateIcon(notebook, edit, entry); } --- 305,315 ---- for ( ! TEditMap::iterator iter = mEditMap.begin(); iter != mEditMap.end(); ++iter ) { ! EditEntry& entry = (*iter).second; ! wxScintilla* edit = (*iter).first; UpdateIcon(notebook, edit, entry); } *************** *** 340,345 **** } const EditEntry& entry = (*iter).second; ! notebook->SetPageText(entry.page, GetTitle(edit, entry)); } --- 343,355 ---- } + int page = notebook->GetPageIndex(edit); + if (page < 0) + { + assert(false); + return; + } + const EditEntry& entry = (*iter).second; ! notebook->SetPageText(page, GetTitle(edit, entry)); } *************** *** 440,452 **** } ! TEditMap::iterator iter = mEditMap.find(edit); ! if (iter == mEditMap.end()) ! { ! assert(false); ! return; ! } ! const EditEntry& entry = (*iter).second; ! notebook->SetSelection(entry.page); edit->SetFocus(); } --- 450,461 ---- } ! int page = notebook->GetPageIndex(edit); ! if (page < 0) ! { ! assert(false); ! return; ! } ! notebook->SetSelection(page); edit->SetFocus(); } Index: sparkedit.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkedit.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sparkedit.h 23 Jun 2007 13:36:28 -0000 1.2 --- sparkedit.h 23 Jun 2007 14:29:58 -0000 1.3 *************** *** 53,61 **** EEditType type; wxString fname; - int page; public: EditEntry() ! : type(ET_RSG), page(-1) { } --- 53,60 ---- EEditType type; wxString fname; public: EditEntry() ! : type(ET_RSG) { } *************** *** 86,90 **** 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); --- 85,89 ---- static wxString GetTitle(wxScintilla* edit, const EditEntry& entry); ! static void UpdateIcon(wxFlatNotebook* notebook, wxScintilla* edit, const EditEntry& entry); static int GetImageIndex(const wxScintilla* edit, const EditEntry& entry); |
From: Markus R. <rol...@us...> - 2007-06-23 14:05:37
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8917 Modified Files: sparkglcanvas.cpp Log Message: - detect right clicks on the currently selected node in the OpenGl Canvas and show the context menu Index: sparkglcanvas.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkglcanvas.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** sparkglcanvas.cpp 23 Jun 2007 13:48:11 -0000 1.12 --- sparkglcanvas.cpp 23 Jun 2007 14:05:33 -0000 1.13 *************** *** 53,56 **** --- 53,57 ---- using namespace boost; + using namespace zeitgeist; using namespace kerosin; using namespace salt; *************** *** 278,281 **** --- 279,304 ---- event.Skip(); + if (SparkContext::GetInstance().HasSelection()) + { + weak_ptr<RenderNode> node = PickNode(); + shared_ptr<Leaf> selection = + SparkContext::GetInstance().GetSelection().lock(); + + if ( + (! node.expired()) && + (node.lock() == selection) + ) + { + wxMenu* menu = + SparkContext::GetInstance().GetContextMenu(selection); + + if (menu != 0) + { + PopupMenu(menu); + return; + } + } + } + Input input(Input::eButton, Input::IC_MOUSE_RIGHT); input.mData.l = 1; |
From: Markus R. <rol...@us...> - 2007-06-23 14:04:26
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8516 Modified Files: sparkcontext.cpp sparkcontext.h Log Message: - added method HasSelection() Index: sparkcontext.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkcontext.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sparkcontext.h 17 May 2007 17:49:23 -0000 1.4 --- sparkcontext.h 23 Jun 2007 14:04:23 -0000 1.5 *************** *** 41,44 **** --- 41,45 ---- boost::weak_ptr<zeitgeist::Leaf> GetSelection() const; void ResetSelection(); + bool HasSelection(); void SetEventHandler(wxEvtHandler* handler, int id); Index: sparkcontext.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkcontext.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sparkcontext.cpp 17 May 2007 17:49:23 -0000 1.4 --- sparkcontext.cpp 23 Jun 2007 14:04:23 -0000 1.5 *************** *** 67,70 **** --- 67,75 ---- } + bool SparkContext::HasSelection() + { + return (! mSelectedNode.expired()); + } + void SparkContext::SetEventHandler(wxEvtHandler* handler, int id) { |
From: Markus R. <rol...@us...> - 2007-06-23 13:48:14
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2288 Modified Files: sparkglcanvas.cpp sparkglcanvas.h Log Message: - refactored node picking into method PickNode() Index: sparkglcanvas.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkglcanvas.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sparkglcanvas.h 15 Apr 2007 11:17:39 -0000 1.8 --- sparkglcanvas.h 23 Jun 2007 13:48:11 -0000 1.9 *************** *** 33,36 **** --- 33,37 ---- class InputSystem; class RenderServer; + class RenderNode; } *************** *** 69,73 **** void Reset(); ! void Pick(wxDC& dc); protected: --- 70,74 ---- void Reset(); ! boost::weak_ptr<kerosin::RenderNode> PickNode(); protected: Index: sparkglcanvas.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/sparkglcanvas.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** sparkglcanvas.cpp 15 Apr 2007 11:17:39 -0000 1.11 --- sparkglcanvas.cpp 23 Jun 2007 13:48:11 -0000 1.12 *************** *** 109,113 **** } ! void SparkGLCanvas::Pick(wxDC& dc) { shared_ptr<SimSpark> spark = wxGetApp().GetSpark(); --- 109,113 ---- } ! weak_ptr<RenderNode> SparkGLCanvas::PickNode() { shared_ptr<SimSpark> spark = wxGetApp().GetSpark(); *************** *** 118,124 **** { assert(false); ! return; } wxPoint ptMouse = wxGetMousePosition(); ScreenToClient(&ptMouse.x, &ptMouse.y); --- 118,126 ---- { assert(false); ! return weak_ptr<RenderNode>(); } + wxClientDC dc(this); + wxPoint ptMouse = wxGetMousePosition(); ScreenToClient(&ptMouse.x, &ptMouse.y); *************** *** 127,147 **** mRenderServer->EnablePicking(true, Vector2f(ptMouse.x, ptMouse.y), pickRange); ! bool swapBuffers = false; ! Render(dc, swapBuffers); mRenderServer->DisablePicking(); weak_ptr<RenderNode> pickedNode = mRenderServer->GetPickedNode(); ! if (pickedNode.expired()) ! { ! spark->GetLog()->Normal() ! << "(SparkGLCanvas) SparkGLCanvas::Pick no node picked\n"; ! } else { spark->GetLog()->Normal() ! << "(SparkGLCanvas) SparkGLCanvas::Pick picked " << pickedNode.lock()->GetFullPath() << std::endl; } ! SparkContext::GetInstance().SetSelection(pickedNode); } --- 129,152 ---- mRenderServer->EnablePicking(true, Vector2f(ptMouse.x, ptMouse.y), pickRange); ! { ! bool swapBuffers = false; ! Render(dc, swapBuffers); ! } mRenderServer->DisablePicking(); weak_ptr<RenderNode> pickedNode = mRenderServer->GetPickedNode(); ! if (! pickedNode.expired()) { spark->GetLog()->Normal() ! << "(SparkGLCanvas) SparkGLCanvas::PickNode picked " << pickedNode.lock()->GetFullPath() << std::endl; } ! { ! bool swapBuffers = true; ! Render(dc, swapBuffers); ! } ! ! return pickedNode; } *************** *** 236,244 **** void SparkGLCanvas::OnLeftDClick(wxMouseEvent& event) { ! wxClientDC dc(this); ! Pick(dc); ! ! bool swapBuffers = true; ! Render(dc, swapBuffers); } --- 241,246 ---- void SparkGLCanvas::OnLeftDClick(wxMouseEvent& event) { ! SparkContext::GetInstance().SetSelection(PickNode()); ! event.Skip(); } |
From: Markus R. <rol...@us...> - 2007-06-23 13:37:02
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit/res In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29374/contrib/rsgedit/res Modified Files: xpm_pause.xpm xpm_play.xpm xpm_step.xpm Added Files: xpm_rsg.xpm xpm_ruby.xpm xpm_save.xpm xpm_spark.xpm Log Message: - merged RSGEDIT_SCINTILLA branch Index: xpm_pause.xpm =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/res/xpm_pause.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xpm_pause.xpm 8 Jan 2006 14:15:27 -0000 1.1 --- xpm_pause.xpm 23 Jun 2007 13:36:28 -0000 1.2 *************** *** 3,7 **** /* columns rows colors chars-per-pixel */ "16 16 2 1", ! " c gray100", ". c black", /* pixels */ --- 3,7 ---- /* columns rows colors chars-per-pixel */ "16 16 2 1", ! " c None", ". c black", /* pixels */ --- NEW FILE: xpm_save.xpm --- /* XPM */ static const char *xpm_save[] = { "16 16 3 1", " c #C0C0C0", ". c #000000", "X c #808000", " ", " .............. ", " .X. . . ", " .X. ... ", " .X. .X. ", " .X. .X. ", " .X. .X. ", " .X. .X. ", " .XX........XX. ", " .XXXXXXXXXXXX. ", " .XX.........X. ", " .XX...... .X. ", " .XX...... .X. ", " .XX...... .X. ", " ............. ", " "}; --- NEW FILE: xpm_spark.xpm --- /* XPM */ static char *xpm_spark[] = { /* columns rows colors chars-per-pixel */ "16 16 102 2", "a c #F7F7F6", "e c #A8B29F", "[ c #FFA33B", "` c #9CA791", "m c #728162", "$ c #3A3C3B", "z c #FAFBFA", "G c #D0D5CB", "# c #FFFFFF", "X c #767876", "N c #7B7C7C", "( c #FFF9F2", "9 c #B2B4B1", "i c #2E312C", "$. c #656962", "| c #EEF0EC", "O c #333532", "c c #F3F4F1", "g c #7F8D71", "= c #AEB7A5", "] c #FFDEB9", "E c #6E7E5E", "k c #9DA892", "% c #D1D6CC", "x c #7C7D7D", "O. c #2A2E28", "& c #EAEDE8", "_ c #EFF1ED", "} c #343633", "Z c #7B8A6C", "j c #70726F", "q c #808E72", "L c #859277", "Q c #CDD3C8", "S c #A3AD99", "K c #88967C", "I c #2B2F29", "P c #929E86", "F c #6C6F6B", "+. c #A8ABA4", "d c #818F74", "R c #B0B9A8", "#. c #292C25", "; c #E9EBE6", "V c #708061", "o. c #EEE9DD", "B c #DDE0D9", "{ c #FFE0BD", "t c #939F88", "3 c #C2C9BB", ". c #313430", "D c #98A38D", "J c #9DA792", "8 c #F6F7F5", "> c #3B3C3B", "4 c #FBFBFA", "r c #829074", "5 c #B1BAA8", "v c #879479", "2 c #BBC2B3", "! c #EAECE8", "A c #718162", "h c #D4D9CF", "u c #7B896D", "' c #AAB3A1", "/ c #FFBC71", ".. c #FFB968", "X. c #FFB96A", "o c #7F8080", "l c #94A088", ": c #F7F8F6", "f c #88957B", "M c #C1C7BA", "y c #A1AC97", "0 c #F0F1EE", ", c #D5DAD0", "n c #7C8A6E", "H c #DFE2DB", " . c #FFF7EE", "6 c #667755", "< c #667756", " c None", "@. c #F8F9F8", "w c #9FA995", "p c #FDFDFD", "T c #ABAEA8", "^ c #FEBA6E", "s c #89967C", ") c #2C2F29", "+ c #B5B6B4", "C c #ECEEEA", "1 c #788769", "W c #A7B19E", "Y c #677856", "* c #F9FAF8", "- c #A0AA96", "@ c #FEFEFE", "%. c #757775", "7 c #859378", "~ c #CFCEBB", "b c #8F9B83", "U c #EDEFEB", /* pixels */ " . X o o X . ", " O + @ # # # # @ + O ", " $ % & # # # * = - ; : > ", " . , < 1 2 3 4 5 6 6 7 # 8 . ", " 9 0 q w e r t y 6 6 u # # 9 ", "i p # # a s 6 6 d f g h # # p i ", "j # # # k 6 6 6 6 l z # # # # j ", "x # c v b n 6 6 6 m M # # # # x ", "N # B 6 V C Z 6 A S D # # # # N ", "F # # G H J K L P r & # # # # F ", "I 4 # @ U Y Y U r 6 G # # # 4 I ", " T # R E W Q # ! ~ ^ / ( # T ", " ) _ p ` ' # # # ] [ [ { _ ) ", " } | p 0 # # # ...X.o.} ", " O.+.@.# # # # @.+.O. ", " #.$.%.%.$.#. " }; --- NEW FILE: xpm_rsg.xpm --- /* XPM */ static char *xpm_rsg[] = { /* columns rows colors chars-per-pixel */ "16 16 10 1", "o c Black", " c None", "@ c #008000", "+ c #FFFF00", ". c #004080", "X c #00FFFF", "$ c #800000", "% c #FF0000", "O c #808000", "# c #00FF00", /* pixels */ " ... ", " ... ", " .X. ", " ... ", " o ", " o OOO ", " oooO+O ", " o OOO ", " o o ", " o o @@@ ", " o ooo@#@ ", " o o @@@ ", " o o ", " $$$ o @@@ ", " $%$ ooo@#@ ", " $$$ @@@ " }; Index: xpm_play.xpm =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/res/xpm_play.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xpm_play.xpm 8 Jan 2006 14:15:27 -0000 1.1 --- xpm_play.xpm 23 Jun 2007 13:36:28 -0000 1.2 *************** *** 3,7 **** /* columns rows colors chars-per-pixel */ "16 16 2 1", ! " c gray100", ". c black", /* pixels */ --- 3,7 ---- /* columns rows colors chars-per-pixel */ "16 16 2 1", ! " c None", ". c black", /* pixels */ --- NEW FILE: xpm_ruby.xpm --- /* XPM */ static char *xpm_ruby[] = { /* columns rows colors chars-per-pixel */ "16 16 13 1", "X c #C02040", " c None", "@ c #C04040", "o c #E02040", "O c #E04040", "& c #FFFBF0", "$ c #E08080", "= c #800000", "% c #C0C0C0", "* c #A02000", "# c #C02000", ". c #A02040", "+ c #C00040", /* pixels */ " ", " ", " . ", " XoO ", " .X+++ ", " @o#### ", " $%X#### ", " &&O#### ", " $$ $#*#* ", " @O$$X++# ", " O+O$O+## ", " =+#o$O### ", " =**+OXX#* ", " ", " ", " " }; Index: xpm_step.xpm =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/res/xpm_step.xpm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xpm_step.xpm 15 Jun 2007 09:44:57 -0000 1.1 --- xpm_step.xpm 23 Jun 2007 13:36:28 -0000 1.2 *************** *** 4,8 **** "16 16 2 1", ". c Black", ! " c #FFFFFF", /* pixels */ " ", --- 4,8 ---- "16 16 2 1", ". c Black", ! " c None", /* pixels */ " ", |
From: Markus R. <rol...@us...> - 2007-06-23 13:37:02
|
Update of /cvsroot/simspark/simspark/spark/kerosin/inputserver In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29374/spark/kerosin/inputserver Modified Files: inputcontrol.cpp inputcontrol.h Log Message: - merged RSGEDIT_SCINTILLA branch Index: inputcontrol.h =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/inputserver/inputcontrol.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** inputcontrol.h 31 Mar 2007 13:18:16 -0000 1.3 --- inputcontrol.h 23 Jun 2007 13:36:28 -0000 1.4 *************** *** 22,25 **** --- 22,26 ---- #include <oxygen/simulationserver/simcontrolnode.h> + #include <oxygen/sceneserver/fpscontroller.h> #include <kerosin/inputserver/inputserver.h> *************** *** 72,78 **** boost::shared_ptr<oxygen::FPSController> GetFPSController(); - /** sets the FPSController to be used */ - void SetFPSController(boost::shared_ptr<oxygen::FPSController> controller); - /** sets the horizontal mouse sensitivity */ void SetHorizontalSensitivity(float s); --- 73,76 ---- *************** *** 114,120 **** bool RegisterInputItem(const std::string& inputItem, const std::string& name); - /** update variables from a script */ - virtual void UpdateCached(); - protected: virtual void OnLink(); --- 112,115 ---- *************** *** 123,130 **** protected: /** the controlled FPSController */ ! boost::shared_ptr<oxygen::FPSController> mFPSController; /** cached reference to the InputServer */ ! boost::shared_ptr<kerosin::InputServer> mInputServer; /** the size of the last time step */ --- 118,125 ---- protected: /** the controlled FPSController */ ! CachedPath<oxygen::FPSController> mFPSController; /** cached reference to the InputServer */ ! CachedPath<kerosin::InputServer> mInputServer; /** the size of the last time step */ Index: inputcontrol.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/kerosin/inputserver/inputcontrol.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** inputcontrol.cpp 17 Jun 2007 13:38:30 -0000 1.5 --- inputcontrol.cpp 23 Jun 2007 13:36:28 -0000 1.6 *************** *** 21,25 **** #include "inputitem.h" #include <oxygen/simulationserver/simulationserver.h> - #include <oxygen/sceneserver/fpscontroller.h> #include <zeitgeist/logserver/logserver.h> #include <zeitgeist/scriptserver/scriptserver.h> --- 21,24 ---- *************** *** 46,76 **** bool InputControl::SetFPSController(const std::string& path) { ! if (path.empty()) ! { ! mFPSController.reset(); ! return true; ! } ! ! shared_ptr<Leaf> leaf = GetCore()->Get(path); ! ! if (leaf.get() == 0) ! { ! GetLog()->Error() ! << "(InputControl) ERROR: invalid path " ! << path << "'\n"; ! return false; ! } ! ! mFPSController = shared_dynamic_cast<FPSController> ! (GetCore()->Get(path)); ! ! if (mFPSController.get() == 0) ! { ! // the path is valid but doesn't point to an FPSController; ! // for convenience search below for a controller ! mFPSController = ! leaf->FindChildSupportingClass<FPSController>(true); ! } ! if (mFPSController.get() == 0) { --- 45,49 ---- bool InputControl::SetFPSController(const std::string& path) { ! RegisterCachedPath(mFPSController, path); if (mFPSController.get() == 0) { *************** *** 86,95 **** shared_ptr<FPSController> InputControl::GetFPSController() { ! return mFPSController; ! } ! ! void InputControl::SetFPSController(shared_ptr<FPSController> controller) ! { ! mFPSController = controller; } --- 59,63 ---- shared_ptr<FPSController> InputControl::GetFPSController() { ! return mFPSController.get(); } *************** *** 111,116 **** scriptServer->CreateVariable("Command.Mouselook", CmdMouseLook); ! mInputServer = shared_dynamic_cast<InputServer> ! (GetCore()->Get("/sys/server/input")); if (mInputServer.get() == 0) --- 79,83 ---- scriptServer->CreateVariable("Command.Mouselook", CmdMouseLook); ! RegisterCachedPath(mInputServer, "/sys/server/input"); if (mInputServer.get() == 0) *************** *** 269,273 **** } ! float InputControl::GetDeltaTime() { --- 236,240 ---- } ! float InputControl::GetDeltaTime() { *************** *** 275,279 **** } ! void InputControl::SetAdvanceTime(bool advance) { --- 242,246 ---- } ! void InputControl::SetAdvanceTime(bool advance) { *************** *** 281,285 **** } ! bool InputControl::GetAdvanceTime() { --- 248,252 ---- } ! bool InputControl::GetAdvanceTime() { *************** *** 287,291 **** } ! bool InputControl::RegisterInputItem(const string& inputItemName, const string& name) { --- 254,258 ---- } ! bool InputControl::RegisterInputItem(const string& inputItemName, const string& name) { *************** *** 325,331 **** } - void - InputControl::UpdateCached() - { - // mFPSController.reset(); - } --- 292,293 ---- |
From: Markus R. <rol...@us...> - 2007-06-23 13:37:02
|
Update of /cvsroot/simspark/simspark/spark/oxygen In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29374/spark/oxygen Modified Files: oxygen.vcproj Log Message: - merged RSGEDIT_SCINTILLA branch Index: oxygen.vcproj =================================================================== RCS file: /cvsroot/simspark/simspark/spark/oxygen/oxygen.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** oxygen.vcproj 17 May 2007 17:49:23 -0000 1.3 --- oxygen.vcproj 23 Jun 2007 13:36:29 -0000 1.4 *************** *** 2,6 **** <VisualStudioProject ProjectType="Visual C++" ! Version="8,00" Name="oxygen" ProjectGUID="{DAB59CC4-E184-40CC-A858-27C432A53AAB}" --- 2,6 ---- <VisualStudioProject ProjectType="Visual C++" ! Version="8.00" Name="oxygen" ProjectGUID="{DAB59CC4-E184-40CC-A858-27C432A53AAB}" *************** *** 268,271 **** --- 268,279 ---- </File> <File + RelativePath=".\geometryserver\meshexporter.h" + > + </File> + <File + RelativePath=".\geometryserver\meshexporter_c.cpp" + > + </File> + <File RelativePath=".\geometryserver\meshimporter.cpp" > |