// Associate the menu bar with the frame
frame->SetMenuBar(menu_bar);
+#if wxUSE_STATUSBAR
frame->CreateStatusBar();
+#endif // wxUSE_STATUSBAR
frame->Show(TRUE);
wxT("wxWidgets Resource Sample"),
wxPoint(-1, -1), wxSize(300, 250) );
+#if wxUSE_STATUSBAR
// Give it a status line
frame->CreateStatusBar(2);
+#endif // wxUSE_STATUSBAR
wxMenuBar *menu_bar = wxResourceCreateMenuBar(wxT("menu1"));
// Create the main frame window
MyFrame* frame = new MyFrame(NULL, _T("Tree Test"), wxPoint(-1, -1), wxSize(400, 550));
+#if wxUSE_STATUSBAR
// Give it a status line
frame->CreateStatusBar(2);
+#endif // wxUSE_STATUSBAR
// Give it an icon
#ifdef __WINDOWS__
frame->Show(TRUE);
+#if wxUSE_STATUSBAR
frame->SetStatusText(_T("Hello, tree!"));
+#endif // wxUSE_STATUSBAR
// Return the main frame window
return TRUE;
frame->SetMenuBar(menu_bar);
+#if wxUSE_STATUSBAR
frame->CreateStatusBar(3);
+#endif // wxUSE_STATUSBAR
frame->Show(true);
menu_bar->Append(file_menu, _("&File"));
menu_bar->Append(active_menu, _("Active &Layout"));
+#if wxUSE_STATUSBAR
frame->CreateStatusBar(3);
+#endif // wxUSE_STATUSBAR
frame->SetMenuBar(menu_bar);
menu_bar->Append(file_menu, _("&File"));
+#if wxUSE_STATUSBAR
frame->CreateStatusBar(3);
+#endif // wxUSE_STATUSBAR
frame->SetMenuBar(menu_bar);
frame->Show(true);
menu_bar->Append(file_menu, _("&File"));
+#if wxUSE_STATUSBAR
frame->CreateStatusBar(3);
+#endif // wxUSE_STATUSBAR
frame->SetMenuBar(menu_bar);
frame->Show(true);
menu_bar->Append(file_menu, _("&File"));
+#if wxUSE_STATUSBAR
frame->CreateStatusBar(3);
+#endif // wxUSE_STATUSBAR
frame->SetMenuBar(menu_bar);
frame->Show(true);
MyFrame::MyFrame(int type, wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size):
wxFrame(frame, wxID_ANY, title, pos, size, wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL)
{
+#if wxUSE_STATUSBAR
CreateStatusBar(1);
+#endif // wxUSE_STATUSBAR
sizer = NULL;
if (type == 1)
{
// Update misc info
UpdateMMedInfo();
+#if wxUSE_STATUSBAR
SetStatusText(selected_file, 2);
+#endif // wxUSE_STATUSBAR
// Update info text
UpdateInfoText();
void MMBoardFrame::UpdateMMedInfo()
{
- wxString temp_string;
MMBoardTime current, length;
if (m_opened_file) {
length = current;
}
+#if wxUSE_STATUSBAR
// We refresh the status bar
+ wxString temp_string;
temp_string.Printf(wxT("%02d:%02d / %02d:%02d"), current.hours * 60 + current.minutes,
current.seconds, length.hours * 60 + length.minutes, length.seconds);
SetStatusText(temp_string, 1);
+#else
+ wxUnusedVar(length);
+#endif // wxUSE_STATUSBAR
// We set the slider position
m_positionSlider->SetValue(current.hours * 3600 + current.minutes * 60 + current.seconds);
}
else
{
+#if wxUSE_STATUSBAR
wxGetApp().frame->SetStatusText(label);
+#endif // wxUSE_STATUSBAR
}
}
//// Associate the menu bar with the frame
frame->SetMenuBar(menu_bar);
+#if wxUSE_STATUSBAR
frame->CreateStatusBar(1);
+#endif // wxUSE_STATUSBAR
frame->Centre(wxBOTH);
frame->Show(true);
void csEditorToolPalette::OnMouseEnter(int toolIndex)
{
+#if wxUSE_STATUSBAR
wxString msg = wxEmptyString;
if (toolIndex == PALETTE_ARROW)
msg = _T("Pointer");
msg = symbol->GetName();
}
((wxFrame*) wxGetApp().GetTopWindow())->SetStatusText(msg);
+#else
+ wxUnusedVar(toolIndex);
+#endif // wxUSE_STATUSBAR
}
void csEditorToolPalette::SetSize(int x, int y, int width, int height, int sizeFlags)
}
else
{
+#if wxUSE_STATUSBAR
((wxFrame*)wxGetApp().GetTopWindow())->SetStatusText(m_label);
+#endif // wxUSE_STATUSBAR
}
}
wxConfig config(_T("OGL Studio"), _T("wxWidgets"));
m_docManager->FileHistoryLoad(config);
+#if wxUSE_STATUSBAR
frame->CreateStatusBar();
+#endif // wxUSE_STATUSBAR
// The ordering of these is important for layout purposes
CreateDiagramToolBar(frame);
SetMenuBar( menu_bar );
+#if wxUSE_STATUSBAR
CreateStatusBar(2);
int widths[] = { -1, 100 };
SetStatusWidths( 2, widths );
+#endif // wxUSE_STATUSBAR
m_plot = new wxPlotWindow( this, -1, wxPoint(0,0), wxSize(100,100), wxSUNKEN_BORDER | wxPLOT_DEFAULT );
m_plot->SetUnitsPerValue( 0.01 );
// Associate the menu bar with the frame
frame->SetMenuBar(menu_bar);
+#if wxUSE_STATUSBAR
frame->CreateStatusBar();
+#endif // wxUSE_STATUSBAR
- frame->Show(TRUE);
+ frame->Show(true);
SetTopWindow(frame);
void MyCanvas::OnDraw(wxDC& dc)
{
// vars to use ...
+#if wxUSE_STATUSBAR
wxString s ;
+#endif // wxUSE_STATUSBAR
wxPen wP ;
wxBrush wB ;
wxPoint points[6];
dc.DrawPoint (25,15) ;
dc.DrawLine(50, 30, 200, 30);
dc.DrawSpline(50, 200, 50, 100, 200, 10);
+#if wxUSE_STATUSBAR
s = wxT("Green Cross, Cyan Line and spline");
+#endif // wxUSE_STATUSBAR
break ;
case 1:
dc.DrawPolygon(5, points);
dc.DrawLines (6, points, 160);
+#if wxUSE_STATUSBAR
s = wxT("Blue rectangle, red edge, clear rounded rectangle, gold ellipse, gold and clear stars");
+#endif // wxUSE_STATUSBAR
break ;
case 2:
dc.SetFont(wF);
dc.SetTextForeground (wC) ;
dc.DrawText(wxT("This is a Times-style string"), 50, 60);
+#if wxUSE_STATUSBAR
s = wxT("Swiss, Times text; red text, rotated and colored orange");
+#endif // wxUSE_STATUSBAR
break ;
case 3 :
dc.DrawEllipticArc(300, 50,200,100,90.0,145.0) ;
dc.DrawEllipticArc(300,100,200,100,90.0,345.0) ;
+#if wxUSE_STATUSBAR
s = wxT("This is an arc test page");
+#endif // wxUSE_STATUSBAR
break ;
case 4:
dc.SetBrush (wxBrush (_T("SALMON"),wxTRANSPARENT));
dc.DrawCheckMark ( 80,50,75,75);
dc.DrawRectangle ( 80,50,75,75);
+#if wxUSE_STATUSBAR
s = wxT("Two check marks");
+#endif // wxUSE_STATUSBAR
break ;
case 5:
dc.DrawLine(0, 0, 200, 200);
dc.DrawLine(200, 0, 0, 200);
dc.DrawText(wxT("This is an 18pt string in MapMode"), 50, 60);
+#if wxUSE_STATUSBAR
s = wxT("Scaling test page");
+#endif // wxUSE_STATUSBAR
break ;
case 6:
dc.DrawIcon( wxIcon(mondrian_xpm), 10, 10 );
dc.DrawBitmap ( wxBitmap(svgbitmap_xpm), 50,15);
+#if wxUSE_STATUSBAR
s = wxT("Icon and Bitmap ");
+#endif // wxUSE_STATUSBAR
break ;
}
+#if wxUSE_STATUSBAR
m_child->SetStatusText(s);
+#endif // wxUSE_STATUSBAR
}
{
m_frame = (MyFrame *) parent ;
+#if wxUSE_STATUSBAR
CreateStatusBar();
SetStatusText(title);
+#endif // wxUSE_STATUSBAR
int w, h ;
GetClientSize ( &w, &h );
// needs to be all in one step.
SetToolBar(wxXmlResource::Get()->LoadToolBar(this, wxT("main_toolbar")));
+#if wxUSE_STATUSBAR
// Give the frame a optional statusbar. The '1' just means one field.
// A gripsizer will automatically get put on into the corner, if that
// is the normal OS behaviour for frames on that platform. Helptext
// for menu items and toolbar tools will automatically get displayed
// here.
CreateStatusBar( 1 );
+#endif // wxUSE_STATUSBAR
}
//-----------------------------------------------------------------------------
m_ScrollWin->SetBackgroundColour(_T("light steel blue"));
m_Splitter->SplitHorizontally(m_ScrollWin, m_LogCtrl, cfg->Read(_T("previewframe_sash"), 300));
+#if wxUSE_STATUSBAR
CreateStatusBar();
+#endif // wxUSE_STATUSBAR
#ifdef __WXMSW__
SendSizeEvent(); // force resize for WXMSW
// Associate the menu bar with the frame
frame->SetMenuBar(menu_bar);
+#if wxUSE_STATUSBAR
frame->CreateStatusBar();
+#endif // wxUSE_STATUSBAR
- frame->Show(TRUE);
+ frame->Show(true);
SetTopWindow(frame);
void MyCanvas::OnDraw(wxDC& dc)
{
// vars to use ...
+#if wxUSE_STATUSBAR
wxString s ;
+#endif // wxUSE_STATUSBAR
wxPen wP ;
wxBrush wB ;
wxPoint points[6];
dc.DrawPoint (25,15) ;
dc.DrawLine(50, 30, 200, 30);
dc.DrawSpline(50, 200, 50, 100, 200, 10);
+#if wxUSE_STATUSBAR
s = wxT("Green Cross, Cyan Line and spline");
+#endif // wxUSE_STATUSBAR
break ;
case 1:
dc.DrawPolygon(5, points);
dc.DrawLines (6, points, 160);
+#if wxUSE_STATUSBAR
s = wxT("Blue rectangle, red edge, clear rounded rectangle, gold ellipse, gold and clear stars");
+#endif // wxUSE_STATUSBAR
break ;
case 2:
dc.SetFont(wF);
dc.SetTextForeground (wC) ;
dc.DrawText(wxT("This is a Times-style string"), 50, 60);
+#if wxUSE_STATUSBAR
s = wxT("Swiss, Times text; red text, rotated and colored orange");
+#endif // wxUSE_STATUSBAR
break ;
case 3 :
dc.DrawEllipticArc(300, 50,200,100,90.0,145.0) ;
dc.DrawEllipticArc(300,100,200,100,90.0,345.0) ;
+#if wxUSE_STATUSBAR
s = wxT("This is an arc test page");
+#endif // wxUSE_STATUSBAR
break ;
case 4:
dc.SetBrush (wxBrush (_T("SALMON"),wxTRANSPARENT));
dc.DrawCheckMark ( 80,50,75,75);
dc.DrawRectangle ( 80,50,75,75);
+#if wxUSE_STATUSBAR
s = wxT("Two check marks");
+#endif // wxUSE_STATUSBAR
break ;
case 5:
dc.DrawLine(0, 0, 200, 200);
dc.DrawLine(200, 0, 0, 200);
dc.DrawText(wxT("This is an 18pt string in MapMode"), 50, 60);
+#if wxUSE_STATUSBAR
s = wxT("Scaling test page");
+#endif // wxUSE_STATUSBAR
break ;
case 6:
dc.DrawIcon( wxIcon(mondrian_xpm), 10, 10 );
dc.DrawBitmap ( wxBitmap(svgbitmap_xpm), 50,15);
+#if wxUSE_STATUSBAR
s = wxT("Icon and Bitmap ");
+#endif // wxUSE_STATUSBAR
break ;
}
+#if wxUSE_STATUSBAR
m_child->SetStatusText(s);
+#endif // wxUSE_STATUSBAR
}
{
m_frame = (MyFrame *) parent ;
+#if wxUSE_STATUSBAR
CreateStatusBar();
SetStatusText(title);
+#endif // wxUSE_STATUSBAR
int w, h ;
GetClientSize ( &w, &h );
// needs to be all in one step.
SetToolBar(wxXmlResource::Get()->LoadToolBar(this, wxT("main_toolbar")));
+#if wxUSE_STATUSBAR
// Give the frame a optional statusbar. The '1' just means one field.
// A gripsizer will automatically get put on into the corner, if that
// is the normal OS behaviour for frames on that platform. Helptext
// for menu items and toolbar tools will automatically get displayed
// here.
CreateStatusBar( 1 );
+#endif // wxUSE_STATUSBAR
}
//-----------------------------------------------------------------------------
SetIcon(wxIcon(wxconfigtool_xpm));
+#if wxUSE_STATUSBAR
CreateStatusBar(2);
+#endif // wxUSE_STATUSBAR
wxMenuBar* menuBar = CreateMenuBar();
SetMenuBar(menuBar);
wxEmulatorFrame *frame = new wxEmulatorFrame(_T("wxEmulator"),
wxPoint(50, 50), wxSize(450, 340));
+#if wxUSE_STATUSBAR
frame->SetStatusText(m_emulatorInfo.m_emulatorTitle, 0);
wxString sizeStr;
sizeStr.Printf(wxT("Screen: %dx%d"), (int) m_emulatorInfo.m_emulatorScreenSize.x,
(int) m_emulatorInfo.m_emulatorScreenSize.y);
frame->SetStatusText(sizeStr, 1);
+#endif // wxUSE_STATUSBAR
m_containerWindow = new wxEmulatorContainer(frame, wxID_ANY);