bbEditor.cxx
Go to the documentation of this file.00001 #ifdef _USE_WXWIDGETS_
00002
00003
00004
00005
00006
00007 #include "bbtkwxGUIEditorGraphicBBS.h"
00008
00009 #include <wx/cmdline.h>
00010 #include <wx/app.h>
00011 #include <wx/sysopt.h>
00012
00013 class wxBBEditorApp : public wxApp
00014 {
00015 public:
00016 bool OnInit( );
00017 int OnExit() { return true; }
00018 };
00019
00020 IMPLEMENT_APP(wxBBEditorApp);
00021
00022
00023
00024
00025
00026
00027 bool wxBBEditorApp::OnInit( )
00028 {
00029 #ifdef MACOSX
00030
00031 wxSystemOptions::SetOption("mac.listctrl.always_use_generic", 1);
00032 #endif
00033
00034 wxApp::OnInit();
00035 #ifdef __WXGTK__
00036
00037 setlocale(LC_NUMERIC, "C");
00038 #endif
00039
00040 bbtk::wxGUIEditorGraphicBBS *iegbbs;
00041 printf("EED wxBBEditorApp::OnInit 0\n");
00042 iegbbs = new bbtk::wxGUIEditorGraphicBBS(NULL);
00043 printf("EED wxBBEditorApp::OnInit 1\n");
00044 SetTopWindow(iegbbs);
00045 iegbbs->Show(true);
00046 printf("EED wxBBEditorApp::OnInit 2\n");
00047
00048 return true;
00049 }
00050
00051
00052 #if defined(_WIN32)
00053
00054
00055
00056
00057
00058
00059 int main(int argc, char* argv[])
00060 {
00061 return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL);
00062 }
00063
00064 #endif // defined(_WIN32)
00065
00066
00067 #else
00068
00069
00070
00071 #include <iostream>
00072 int main(int argc, char* argv[])
00073 {
00074 std::cout << "bbStudio was not compiled with wxWidgets : ciao !" <<std::endl;
00075 return 0;
00076 }
00077
00078
00079 #endif //#ifdef _USE_WXWIDGETS_
00080
00081
00082