From: Markus R. <rol...@us...> - 2007-02-15 10:57:38
|
Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv485 Modified Files: Tag: WIN32 mainframe.cpp mainframe.h propertyframe.cpp propertyframe.h rsgedit.wxg Log Message: - regenerate ui code with more recent wxglad version - fix ui update bug (play/pause icon state) Index: mainframe.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.h,v retrieving revision 1.7.2.1 retrieving revision 1.7.2.2 diff -C2 -d -r1.7.2.1 -r1.7.2.2 *** mainframe.h 10 Feb 2007 19:01:54 -0000 1.7.2.1 --- mainframe.h 15 Feb 2007 10:57:27 -0000 1.7.2.2 *************** *** 52,55 **** --- 52,56 ---- mainframe(wxWindow* parent, int id, const wxString& title, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE); + virtual ~mainframe(); private: *************** *** 106,112 **** wxStatusBar* MainFrame_statusbar; wxListCtrl* mCtrPropList; ! wxPanel* mLeftTopPane; wxTreeCtrl* mCtrTree; ! wxPanel* mLeftBottomPane; wxSplitterWindow* window_1; wxPanel* mLeftPane; --- 107,113 ---- wxStatusBar* MainFrame_statusbar; wxListCtrl* mCtrPropList; ! wxPanel* window_1_pane_1; wxTreeCtrl* mCtrTree; ! wxPanel* window_1_pane_2; wxSplitterWindow* window_1; wxPanel* mLeftPane; Index: propertyframe.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/propertyframe.h,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** propertyframe.h 22 Jan 2006 17:25:23 -0000 1.2 --- propertyframe.h 15 Feb 2007 10:57:28 -0000 1.2.2.1 *************** *** 58,62 **** protected: // begin wxGlade: propertyframe::attributes ! wxListCtrl* mCtrList; // end wxGlade --- 58,62 ---- protected: // begin wxGlade: propertyframe::attributes ! wxListCtrl* mCtrPropList; // end wxGlade Index: rsgedit.wxg =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/rsgedit.wxg,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** rsgedit.wxg 22 Jan 2006 12:19:28 -0000 1.4 --- rsgedit.wxg 15 Feb 2007 10:57:28 -0000 1.4.2.1 *************** *** 1,6 **** <?xml version="1.0"?> ! <!-- generated by wxGlade 0.4 on Sun Jan 22 13:15:36 2006 --> ! <application path="/home/markus/cvs/simspark/contrib/rsgedit/" 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.4.1 on Thu Feb 15 10:38:44 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> *************** *** 66,82 **** <orient>wxVERTICAL</orient> <object class="sizeritem"> - <flag>wxEXPAND|wxADJUST_MINSIZE</flag> - <border>0</border> - <option>0</option> - <object class="wxTextCtrl" name="mCtrLocation" base="EditTextCtrl"> - </object> - </object> - <object class="sizeritem"> <flag>wxEXPAND</flag> <border>0</border> <option>1</option> ! <object class="wxTreeCtrl" name="mCtrTree" base="EditTreeCtrl"> ! <style>wxTR_HAS_BUTTONS|wxTR_NO_LINES|wxTR_DEFAULT_STYLE|wxSUNKEN_BORDER</style> ! <id>1</id> </object> </object> --- 66,106 ---- <orient>wxVERTICAL</orient> <object class="sizeritem"> <flag>wxEXPAND</flag> <border>0</border> <option>1</option> ! <object class="wxSplitterWindow" name="window_1" base="EditSplitterWindow"> ! <style>wxSP_3D|wxSP_BORDER</style> ! <orientation>wxSPLIT_HORIZONTAL</orientation> ! <window_2>window_1_pane_2</window_2> ! <window_1>window_1_pane_1</window_1> ! <object class="wxPanel" name="window_1_pane_1" base="EditPanel"> ! <style>wxTAB_TRAVERSAL</style> ! <object class="wxBoxSizer" name="sizer_4" base="EditBoxSizer"> ! <orient>wxVERTICAL</orient> ! <object class="sizeritem"> ! <flag>wxEXPAND</flag> ! <border>0</border> ! <option>1</option> ! <object class="wxListCtrl" name="mCtrPropList" base="EditListCtrl"> ! <style>wxLC_REPORT|wxSUNKEN_BORDER</style> ! </object> ! </object> ! </object> ! </object> ! <object class="wxPanel" name="window_1_pane_2" base="EditPanel"> ! <style>wxTAB_TRAVERSAL</style> ! <object class="wxBoxSizer" name="sizer_8" base="EditBoxSizer"> ! <orient>wxVERTICAL</orient> ! <object class="sizeritem"> ! <flag>wxEXPAND</flag> ! <border>0</border> ! <option>1</option> ! <object class="wxTreeCtrl" name="mCtrTree" base="EditTreeCtrl"> ! <style>wxTR_HAS_BUTTONS|wxTR_NO_LINES|wxTR_LINES_AT_ROOT|wxTR_DEFAULT_STYLE|wxSUNKEN_BORDER</style> ! <id>1</id> ! </object> ! </object> ! </object> ! </object> </object> </object> *************** *** 145,149 **** <border>0</border> <option>1</option> ! <object class="wxListCtrl" name="mCtrList" base="EditListCtrl"> <style>wxLC_REPORT|wxSUNKEN_BORDER</style> </object> --- 169,173 ---- <border>0</border> <option>1</option> ! <object class="wxListCtrl" name="mCtrPropList" base="EditListCtrl"> <style>wxLC_REPORT|wxSUNKEN_BORDER</style> </object> Index: propertyframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/propertyframe.cpp,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** propertyframe.cpp 22 Jan 2006 17:25:23 -0000 1.2 --- propertyframe.cpp 15 Feb 2007 10:57:27 -0000 1.2.2.1 *************** *** 35,39 **** { // begin wxGlade: propertyframe::propertyframe ! mCtrList = new wxListCtrl(this, -1, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER); set_properties(); --- 35,39 ---- { // begin wxGlade: propertyframe::propertyframe ! mCtrPropList = new wxListCtrl(this, -1, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER); set_properties(); *************** *** 56,60 **** // begin wxGlade: propertyframe::do_layout wxBoxSizer* sizer_3 = new wxBoxSizer(wxVERTICAL); ! sizer_3->Add(mCtrList, 1, wxEXPAND, 0); SetAutoLayout(true); SetSizer(sizer_3); --- 56,60 ---- // begin wxGlade: propertyframe::do_layout wxBoxSizer* sizer_3 = new wxBoxSizer(wxVERTICAL); ! sizer_3->Add(mCtrPropList, 1, wxEXPAND, 0); SetAutoLayout(true); SetSizer(sizer_3); *************** *** 66,70 **** { mLeaf = leaf; ! mPropList.Init(mLeaf,mCtrList); RefreshProperties(); } --- 66,70 ---- { mLeaf = leaf; ! mPropList.Init(mLeaf,mCtrPropList); RefreshProperties(); } Index: mainframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v retrieving revision 1.8.2.1 retrieving revision 1.8.2.2 diff -C2 -d -r1.8.2.1 -r1.8.2.2 *** mainframe.cpp 10 Feb 2007 19:01:53 -0000 1.8.2.1 --- mainframe.cpp 15 Feb 2007 10:57:26 -0000 1.8.2.2 *************** *** 78,81 **** --- 78,83 ---- mTimer(this,1) { + mToolBar = 0; + // begin wxGlade: mainframe::mainframe mCtrVertSplitter = new wxSplitterWindow(this, -1, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_BORDER); *************** *** 86,91 **** mLeftPane = new wxPanel(mCtrVertSplitter, -1); window_1 = new wxSplitterWindow(mLeftPane, -1, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_BORDER); ! mLeftBottomPane = new wxPanel(window_1, -1); ! mLeftTopPane = new wxPanel(window_1, -1); MainFrame_menubar = new wxMenuBar(); SetMenuBar(MainFrame_menubar); --- 88,93 ---- mLeftPane = new wxPanel(mCtrVertSplitter, -1); window_1 = new wxSplitterWindow(mLeftPane, -1, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_BORDER); ! window_1_pane_2 = new wxPanel(window_1, -1); ! window_1_pane_1 = new wxPanel(window_1, -1); MainFrame_menubar = new wxMenuBar(); SetMenuBar(MainFrame_menubar); *************** *** 102,109 **** MainFrame_menubar->Append(wxglade_tmp_menu_3, wxT("&Simulation")); MainFrame_statusbar = CreateStatusBar(1, 0); ! mCtrPropList = new wxListCtrl(mLeftTopPane, -1, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER); ! mCtrTree = new wxTreeCtrl(mLeftBottomPane, 1, wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS|wxTR_NO_LINES|wxTR_DEFAULT_STYLE|wxSUNKEN_BORDER); mCanvas = new SparkGLCanvas(mTopPane, -1); ! mCtrLog = new wxTextCtrl(mBottomPane, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL); set_properties(); --- 104,111 ---- MainFrame_menubar->Append(wxglade_tmp_menu_3, wxT("&Simulation")); MainFrame_statusbar = CreateStatusBar(1, 0); ! mCtrPropList = new wxListCtrl(window_1_pane_1, -1, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER); ! mCtrTree = new wxTreeCtrl(window_1_pane_2, 1, wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS|wxTR_NO_LINES|wxTR_LINES_AT_ROOT|wxTR_DEFAULT_STYLE|wxSUNKEN_BORDER); mCanvas = new SparkGLCanvas(mTopPane, -1); ! mCtrLog = new wxTextCtrl(mBottomPane, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL|wxTE_LINEWRAP); set_properties(); *************** *** 112,117 **** // create toolbar ! mToolBar = new wxToolBar(this,-1); ! SetToolBar(mToolBar); mToolBar->AddTool(ID_SIM_START, wxT("Start"), wxBitmap(xpm_play)); --- 114,118 ---- // create toolbar ! mToolBar = CreateToolBar( wxTB_FLAT|wxTB_HORIZONTAL, wxID_ANY ); mToolBar->AddTool(ID_SIM_START, wxT("Start"), wxBitmap(xpm_play)); *************** *** 119,122 **** --- 120,124 ---- mToolBar->Realize(); + SetToolBar(mToolBar); // *************** *** 139,142 **** --- 141,148 ---- } + mainframe::~mainframe() + { + } + void mainframe::SplitHor() { *************** *** 144,148 **** mCtrHorSplitter->SetSashPosition(mLastHorSashPosition); - mCtrHorSplitter->SetSashGravity(1.0); } --- 150,153 ---- *************** *** 181,197 **** wxBoxSizer* sizer_5 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* sizer_7 = new wxBoxSizer(wxVERTICAL); ! wxBoxSizer* sizer_8 = new wxBoxSizer(wxHORIZONTAL); ! wxBoxSizer* sizer_4 = new wxBoxSizer(wxHORIZONTAL); sizer_4->Add(mCtrPropList, 1, wxEXPAND, 0); ! mLeftTopPane->SetAutoLayout(true); ! mLeftTopPane->SetSizer(sizer_4); ! sizer_4->Fit(mLeftTopPane); ! sizer_4->SetSizeHints(mLeftTopPane); sizer_8->Add(mCtrTree, 1, wxEXPAND, 0); ! mLeftBottomPane->SetAutoLayout(true); ! mLeftBottomPane->SetSizer(sizer_8); ! sizer_8->Fit(mLeftBottomPane); ! sizer_8->SetSizeHints(mLeftBottomPane); ! window_1->SplitHorizontally(mLeftTopPane, mLeftBottomPane); sizer_7->Add(window_1, 1, wxEXPAND, 0); mLeftPane->SetAutoLayout(true); --- 186,202 ---- wxBoxSizer* sizer_5 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* sizer_7 = new wxBoxSizer(wxVERTICAL); ! wxBoxSizer* sizer_8 = new wxBoxSizer(wxVERTICAL); ! 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); *************** *** 247,251 **** event.Skip(); - Destroy(); } --- 252,255 ---- *************** *** 361,364 **** --- 365,371 ---- wxLongLong tLast = wxGetLocalTimeMillis(); + // force update of ui state + UpdateWindowUI(wxUPDATE_UI_RECURSE); + while (! sim->WantsToQuit()) { *************** *** 384,387 **** --- 391,397 ---- spark->SetSimState(SimSpark::S_PAUSED); spark->GetLog()->Normal() << "(RsgEdit) simulation paused\n"; + + // force update of ui state + UpdateWindowUI(wxUPDATE_UI_RECURSE); } |