Update of /cvsroot/simspark/simspark/contrib/rsgedit
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21147
Modified Files:
Tag: WIN32
constants.h main.cpp main.h
Log Message:
- add a simple splash screen
Index: main.cpp
===================================================================
RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/main.cpp,v
retrieving revision 1.6.2.2
retrieving revision 1.6.2.3
diff -C2 -d -r1.6.2.2 -r1.6.2.3
*** main.cpp 15 Feb 2007 10:58:39 -0000 1.6.2.2
--- main.cpp 18 Feb 2007 13:50:50 -0000 1.6.2.3
***************
*** 27,30 ****
--- 27,31 ----
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+ #include <wx/splash.h>
#ifdef __BORLANDC__
***************
*** 45,48 ****
--- 46,51 ----
#include "property.h"
+ #include <rsgedit/res/xpm_sparklogo.xpm>
+
IMPLEMENT_APP(RsgEditApp)
***************
*** 51,54 ****
--- 54,66 ----
bool RsgEditApp::OnInit()
{
+ wxSplashScreen* splash = new wxSplashScreen
+ (
+ wxBitmap(xpm_sparklogo),
+ wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
+ 0, NULL, -1, wxDefaultPosition, wxDefaultSize,
+ wxSIMPLE_BORDER|wxSTAY_ON_TOP
+ );
+ wxYield();
+
mSpark = shared_ptr<SimSpark>(new SimSpark("../../"));
***************
*** 63,66 ****
--- 75,79 ----
#ifdef __WXMSW__
frame->SetIcon(wxIcon("Spark", wxBITMAP_TYPE_ICO_RESOURCE));
+ ::wxHandleFatalExceptions(true);
#endif
***************
*** 69,72 ****
--- 82,90 ----
SetTopWindow(frame);
+ splash->Destroy();
+
+ #ifdef __WXMSW__
+ frame->Raise();
+ #endif
return true;
}
***************
*** 81,82 ****
--- 99,104 ----
return mProperty;
}
+
+ void RsgEditApp::OnFatalException()
+ {
+ }
Index: constants.h
===================================================================
RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/Attic/constants.h,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** constants.h 18 Feb 2007 09:12:42 -0000 1.1.2.3
--- constants.h 18 Feb 2007 13:50:48 -0000 1.1.2.4
***************
*** 37,41 ****
ID_FILE_OPEN = (wxID_HIGHEST+23),
! ID_FILE_RELOAD = (wxID_HIGHEST+24)
};
--- 37,43 ----
ID_FILE_OPEN = (wxID_HIGHEST+23),
! ID_FILE_RELOAD = (wxID_HIGHEST+24),
!
! ID_HELP_ABOUT = (wxID_HIGHEST+25)
};
Index: main.h
===================================================================
RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/main.h,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -d -r1.2.2.1 -r1.2.2.2
*** main.h 10 Feb 2007 19:01:53 -0000 1.2.2.1
--- main.h 18 Feb 2007 13:50:50 -0000 1.2.2.2
***************
*** 40,43 ****
--- 40,46 ----
protected:
+ void OnFatalException();
+
+ protected:
boost::shared_ptr<SimSpark> mSpark;
boost::shared_ptr<Property> mProperty;
|