Update of /cvsroot/simspark/simspark/contrib/rsgedit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2377 Modified Files: Tag: WIN32 main.cpp mainframe.cpp mainframe.h rsgedit.vcproj rsgedit.wxg Added Files: Tag: WIN32 aboutDlg.cpp aboutDlg.h Log Message: - added a simple About Dialog --- NEW FILE: aboutDlg.h --- // -*- C++ -*- generated by wxGlade 0.4.1 on Sun Feb 18 14:55:33 2007 #include <wx/wx.h> #include <wx/image.h> #ifndef ABOUTDLG_H #define ABOUTDLG_H // begin wxGlade: ::dependencies // end wxGlade class aboutDlg: public wxDialog { public: // begin wxGlade: aboutDlg::ids // end wxGlade aboutDlg(wxWindow* parent, int id, const wxString& title, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE); private: // begin wxGlade: aboutDlg::methods void set_properties(); void do_layout(); // end wxGlade protected: // begin wxGlade: aboutDlg::attributes wxStaticBitmap* mBitmap; wxStaticText* label_1; wxButton* button_1; // end wxGlade }; // wxGlade: end class #endif // ABOUTDLG_H Index: mainframe.h =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.h,v retrieving revision 1.7.2.5 retrieving revision 1.7.2.6 diff -C2 -d -r1.7.2.5 -r1.7.2.6 *** mainframe.h 18 Feb 2007 08:53:31 -0000 1.7.2.5 --- mainframe.h 18 Feb 2007 14:25:15 -0000 1.7.2.6 *************** *** 96,99 **** --- 96,101 ---- void OnUpdateFileReload(wxUpdateUIEvent& event); + void OnHelpAbout(wxCommandEvent& event); + void OnExit(wxCommandEvent& event); void OnClose( wxCloseEvent& event ); Index: rsgedit.wxg =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/rsgedit.wxg,v retrieving revision 1.4.2.3 retrieving revision 1.4.2.4 diff -C2 -d -r1.4.2.3 -r1.4.2.4 *** rsgedit.wxg 16 Feb 2007 17:08:35 -0000 1.4.2.3 --- rsgedit.wxg 18 Feb 2007 14:25:17 -0000 1.4.2.4 *************** *** 1,4 **** <?xml version="1.0"?> ! <!-- generated by wxGlade 0.4.1 on Fri Feb 16 18:07:47 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"> --- 1,4 ---- <?xml version="1.0"?> ! <!-- generated by wxGlade 0.4.1 on Sun Feb 18 15:24:05 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"> *************** *** 51,54 **** --- 51,60 ---- </item> </menu> + <menu name="" itemid="ID_HELP" label="&Help"> + <item> + <label>&About</label> + <id>ID_HELP_ABOUT</id> + </item> + </menu> </menus> </object> *************** *** 183,185 **** --- 189,225 ---- </object> </object> + <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> + <object class="sizeritem"> + <flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxADJUST_MINSIZE</flag> + <border>5</border> + <option>0</option> + <object class="wxStaticBitmap" name="mBitmap" base="EditStaticBitmap"> + <attribute>1</attribute> + <size>500, 200</size> + </object> + </object> + <object class="sizeritem"> + <flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxADJUST_MINSIZE</flag> + <border>5</border> + <option>0</option> + <object class="wxStaticText" name="label_1" base="EditStaticText"> + <attribute>1</attribute> + <label>SimSpark Copyright (C) RoboCup Soccer Server 3D Maintenance Group</label> + </object> + </object> + <object class="sizeritem"> + <flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxADJUST_MINSIZE</flag> + <border>5</border> + <option>0</option> + <object class="wxButton" name="button_1" base="EditButton"> + <label>&Ok</label> + <id>wxID_OK</id> + </object> + </object> + </object> + </object> </application> Index: main.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/main.cpp,v retrieving revision 1.6.2.3 retrieving revision 1.6.2.4 diff -C2 -d -r1.6.2.3 -r1.6.2.4 *** main.cpp 18 Feb 2007 13:50:50 -0000 1.6.2.3 --- main.cpp 18 Feb 2007 14:25:10 -0000 1.6.2.4 *************** *** 57,61 **** ( wxBitmap(xpm_sparklogo), ! wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT, 0, NULL, -1, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxSTAY_ON_TOP --- 57,61 ---- ( wxBitmap(xpm_sparklogo), ! wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_NO_TIMEOUT, 0, NULL, -1, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER|wxSTAY_ON_TOP Index: mainframe.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v retrieving revision 1.8.2.6 retrieving revision 1.8.2.7 diff -C2 -d -r1.8.2.6 -r1.8.2.7 *** mainframe.cpp 18 Feb 2007 08:53:31 -0000 1.8.2.6 --- mainframe.cpp 18 Feb 2007 14:25:14 -0000 1.8.2.7 *************** *** 31,34 **** --- 31,36 ---- #include <rsgedit/res/xpm_reload.xpm> + #include "aboutdlg.h" + //! wxWidgets and zeitgeist both use a 'DECLARE_CLASS' macro #undef DECLARE_CLASS *************** *** 63,66 **** --- 65,70 ---- EVT_UPDATE_UI(ID_FILE_RELOAD, mainframe::OnUpdateFileReload) + EVT_MENU(ID_HELP_ABOUT, mainframe::OnHelpAbout) + EVT_TIMER(1, mainframe::OnLogTimer) *************** *** 116,119 **** --- 120,126 ---- 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|wxSUNKEN_BORDER); *************** *** 657,658 **** --- 664,671 ---- OpenSimulation(mSimFName); } + + void mainframe::OnHelpAbout(wxCommandEvent& event) + { + aboutDlg dlg(this, wxID_ANY, "About SimSpark"); + dlg.ShowModal(); + } --- NEW FILE: aboutDlg.cpp --- // -*- C++ -*- generated by wxGlade 0.4.1 on Sun Feb 18 14:55:33 2007 #include "aboutDlg.h" #include <rsgedit/res/xpm_sparklogo.xpm> aboutDlg::aboutDlg(wxWindow* parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size, long style): wxDialog(parent, id, title, pos, size, wxDEFAULT_DIALOG_STYLE) { // 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")); set_properties(); do_layout(); // end wxGlade mBitmap->SetBitmap(wxBitmap(xpm_sparklogo)); Layout(); } void aboutDlg::set_properties() { // begin wxGlade: aboutDlg::set_properties SetTitle(wxT("dialog_1")); mBitmap->SetMinSize(wxSize(500, 200)); // end wxGlade } void aboutDlg::do_layout() { // 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 } Index: rsgedit.vcproj =================================================================== RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/Attic/rsgedit.vcproj,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** rsgedit.vcproj 15 Feb 2007 10:58:39 -0000 1.1.2.5 --- rsgedit.vcproj 18 Feb 2007 14:25:16 -0000 1.1.2.6 *************** *** 176,179 **** --- 176,187 ---- <Files> <File + RelativePath=".\aboutDlg.cpp" + > + </File> + <File + RelativePath=".\aboutDlg.h" + > + </File> + <File RelativePath=".\icon1.ico" > |