6 #include "ExampleOpenGLCanvasBase.hh"
9 #include <Gui/ConsoleRedirectIO.hh>
14 IMPLEMENT_APP(ExampleOpenGLCanvasApp)
18 bool ExampleOpenGLCanvasApp::OnInit()
23 cout<<
"Hallo cout"<<endl;
24 cout<<
"Hallo cerr"<<endl;
26 MyFrame *frame =
new MyFrame( wxT(
"ExampleOpenGLCanvasBase"), wxPoint(0,0), wxSize(640,480) );
36 BEGIN_EVENT_TABLE(MyFrame, wxFrame)
37 EVT_MENU(ID_QUIT, MyFrame::OnQuit)
38 EVT_MENU(ID_ABOUT, MyFrame::OnAbout)
43 MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
44 : wxFrame((wxFrame *)NULL, -1, title, pos, size)
48 wxMenu *menuFile =
new wxMenu;
49 menuFile->Append( ID_ABOUT, wxT(
"&About...") );
50 menuFile->AppendSeparator();
51 menuFile->Append( ID_QUIT, wxT(
"E&xit") );
52 wxMenuBar *menuBar =
new wxMenuBar;
53 menuBar->Append(menuFile, wxT(
"&File"));
65 void MyFrame::OnQuit(wxCommandEvent& ){
70 void MyFrame::OnAbout(wxCommandEvent& )
72 wxString title(wxT(
"About"));
74 msg<<wxT(
"About - ")<<
AsciiToWx(FUNCNAME)<<wxT(
"\n");
75 msg<<wxT(
"author: Jan Woetzel (c) 2003-2005\n");
77 msg<<wxT(
"from ")<<
AsciiToWx(__FILE__)<<wxT(
"\n");
78 msg<<wxT(
"GUI using: ")<<wxVERSION_STRING<<wxT(
"\n");
81 wxMessageBox(msg, title, wxICON_INFORMATION | wxOK );
void BIASGui_EXPORT ConsoleRedirectIO(std::string name=std::string(""))
Extra Console for WIN32 WinMain gui applications.
wxString AsciiToWx(const char *thestring)
Converts a C string to a wxString.
base class for OpenGL canvases you could derive from to get base functionality (JW) ...