2 # pragma warning (disable: 4005) // for VS8 + WX
5 #include "SimpleGLFrame.hh"
30 const wxPoint & pos, const wxSize & size)
31 :wxFrame((wxFrame *) NULL, -1, title, pos, size)
35 wxMenu *menuFile =
new wxMenu;
36 menuFile->Append(ID_ABOUT, _T(
"&About...") );
37 menuFile->AppendSeparator();
38 menuFile->Append(ID_QUIT, _T(
"E&xit") );
40 wxMenu *menuInteraction =
new wxMenu;
41 menuInteraction->Append(ID_MODE_PLUS, _T(
"&1 mode++...\tCtrl-1") );
42 menuInteraction->Append(ID_MODE_MINUS, _T(
"&2 mode--...\tCtrl-2") );
43 menuInteraction->Append(ID_LABEL_PLUS, _T(
"&3 label++...\tCtrl-3") );
44 menuInteraction->Append(ID_LABEL_MINUS,_T(
"&4 label--...\tCtrl-4") );
45 menuInteraction->Append(ID_FLAG_PLUS, _T(
"&5 flag++...\tCtrl-5") );
46 menuInteraction->Append(ID_FLAG_MINUS, _T(
"&6 flag--...\tCtrl-6") );
48 menuInteraction->AppendSeparator();
50 wxMenuBar *menuBar =
new wxMenuBar;
51 menuBar->Append(menuFile, _T(
"&File") );
52 menuBar->Append(menuInteraction, _T(
"&Interaction") );
62 wxBoxSizer *sizer =
new wxBoxSizer(wxHORIZONTAL);
63 sizer->Add(pCanvas, 1, wxEXPAND | wxALL);
64 #if wxCHECK_VERSION(2, 6, 2)
69 sizer->SetItemMinSize(pCanvas, 500, 400);
70 sizer->SetSizeHints(
this);
73 SetSizerAndFit(sizer);
85 wxString title( _T(
"About") );
87 msg <<
"About - " << FUNCNAME <<
"\n";
88 msg <<
"author: Jan Woetzel (c) 2003-2006\n";
89 msg <<
"build: " << __DATE__ <<
" " << __TIME__ <<
"\n";
90 msg <<
"from " << __FILE__ <<
"\n";
91 msg <<
"GUI using: " << wxVERSION_STRING <<
"\n";
94 wxMessageBox(wxString(msg.str().c_str(), wxConvUTF8), title, wxICON_INFORMATION | wxOK);
98 switch(event.GetId()){
99 case ID_MODE_PLUS: mode++;
break;
100 case ID_MODE_MINUS: mode--;
break;
101 case ID_LABEL_PLUS: label++;
break;
102 case ID_LABEL_MINUS: label--;
break;
103 case ID_FLAG_PLUS: flag++;
break;
104 case ID_FLAG_MINUS: flag--;
break;
109 ss<<
"mode="<<mode<<
" label="<<label<<
" flag="<<flag<<
" ";
110 cout<<ss.str()<<endl;
111 SetStatusText( wxString(ss.str().c_str(), wxConvUTF8) );
void OnAbout(wxCommandEvent &event)
void OnInteraction(wxCommandEvent &event)
Helper frame for SimplaGLApp.
Helper canvas for SimpleGLApp
static int mode
(global) params for simple user interaction with client Display routine
void OnQuit(wxCommandEvent &event)