2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
8 # This software is governed by the CeCILL-B license under French law and
9 # abiding by the rules of distribution of free software. You can use,
10 # modify and/ or redistribute the software under the terms of the CeCILL-B
11 # license as circulated by CEA, CNRS and INRIA at the following URL
12 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
13 # or in the file LICENSE.txt.
15 # As a counterpart to the access to the source code and rights to copy,
16 # modify and redistribute granted by the license, users are provided only
17 # with a limited warranty and the software's author, the holder of the
18 # economic rights, and the successive licensors have only limited
21 # The fact that you are presently reading this means that you have had
22 # knowledge of the CeCILL-B license and that you accept its terms.
23 # ------------------------------------------------------------------------
26 #ifdef _USE_WXWIDGETS_
28 //==========================================================================
30 //==========================================================================
32 #include "bbtkwxGUIEditorGraphicBBS.h"
34 #include <wx/cmdline.h>
36 #include <wx/sysopt.h>
38 class wxBBEditorApp : public wxApp
42 int OnExit() { return true; }
45 IMPLEMENT_APP(wxBBEditorApp);
49 // ----------------------------------------------------------------------------
50 // The `main program' equivalent, creating the windows and returning the
52 bool wxBBEditorApp::OnInit( )
55 /* assume this is OSX */
56 wxSystemOptions::SetOption("mac.listctrl.always_use_generic", 1);
61 //See http://www.wxwindows.org/faqgtk.htm#locale
62 setlocale(LC_NUMERIC, "C");
65 bbtk::wxGUIEditorGraphicBBS *iegbbs;
66 iegbbs = new bbtk::wxGUIEditorGraphicBBS(NULL);
76 // How to have a Console and wxWidgets
77 // http://www.wxwidgets.org/wiki/index.php/MSVC_Setup_Guide
78 // In Visual C++ 6 (7 should be similar), to create an application that is both a console application
79 // (cout's to the console are visible) and has a wxWidgets GUI,
80 // you need to use the linker option "/subsystem:console" and the following code:
81 int main(int argc, char* argv[])
83 return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL);
86 #endif // defined(_WIN32)
90 //==========================================================================
92 //==========================================================================
94 int main(int argc, char* argv[])
96 std::cout << "bbStudio was not compiled with wxWidgets : ciao !" <<std::endl;
101 #endif //#ifdef _USE_WXWIDGETS_