#endif // wxUSE_STATUSBAR
}
+wxFrameBase::~wxFrameBase()
+{
+ // this destructor is required for Darwin
+}
+
wxFrame *wxFrameBase::New(wxWindow *parent,
wxWindowID id,
const wxString& title,
wxPoint pt = wxTopLevelWindow::GetClientAreaOrigin();
#if wxUSE_TOOLBAR
- if ( GetToolBar() && GetToolBar()->IsShown() )
+ wxToolBar *toolbar = GetToolBar();
+ if ( toolbar && toolbar->IsShown() )
{
int w, h;
- GetToolBar()->GetSize(& w, & h);
+ toolbar->GetSize(&w, &h);
- if ( GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL )
+ if ( toolbar->GetWindowStyleFlag() & wxTB_VERTICAL )
{
pt.x += w;
}
commandEvent.SetEventObject(this);
wxMenuItem *item = bar->FindItem(id);
- if ( item && item->IsCheckable() )
+ if (item)
{
- item->Toggle();
+ if (!item->IsEnabled())
+ return TRUE;
- // use the new value
- commandEvent.SetInt(item->IsChecked());
+ if (item->IsCheckable())
+ {
+ item->Toggle();
+ // use the new value
+ commandEvent.SetInt(item->IsChecked());
+ }
}
return GetEventHandler()->ProcessEvent(commandEvent);
{
wxStatusBar *statusBar = new wxStatusBar(this, id, style, name);
- // Set the height according to the font and the border size
- wxClientDC dc(statusBar);
- dc.SetFont(statusBar->GetFont());
-
- wxCoord y;
- dc.GetTextExtent( "X", NULL, &y );
-
- int height = (int)( (11*y)/10 + 2*statusBar->GetBorderY());
-
- statusBar->SetSize( -1, -1, -1, height );
-
statusBar->SetFieldsCount(number);
return statusBar;
{
if ( menubar )
{
- m_frameMenuBar = menubar;
menubar->Attach((wxFrame *)this);
+ m_frameMenuBar = menubar;
}
}