wxToolBar* wxFrameBase::CreateToolBar(long style, wxWindowID id, const wxString& name) { // the main toolbar can't be recreated (unless it was explicitly deleted // before) wxCHECK_MSG( !m_frameToolBar, NULL, wxT("recreating toolbar in wxFrame") ); if ( style == -1 ) { // use default style // // NB: we don't specify the default value in the method declaration // because // a) this allows us to have different defaults for different // platforms (even if we don't have them right now) // b) we don't need to include wx/toolbar.h in the header then style = wxBORDER_NONE | wxTB_HORIZONTAL | wxTB_FLAT; } SetToolBar(OnCreateToolBar(style, id, name)); return m_frameToolBar; }
// create main toolbar by calling OnCreateToolBar() wxToolBar* wxDialog::CreateToolBar(long style, wxWindowID winid, const wxString& name) { m_dialogToolBar = OnCreateToolBar(style, winid, name); return m_dialogToolBar; }