Changed SetToolBar() to behave a bit smarter. Untested.

Removed some unused variables.
  More tests in scroll sample.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-10-09 09:06:35 +00:00
parent ca43a38c0f
commit 307f16e829
9 changed files with 64 additions and 25 deletions

View File

@@ -942,6 +942,26 @@ wxToolBar* wxFrame::OnCreateToolBar( long style, wxWindowID id, const wxString&
return new wxToolBar( this, id, wxDefaultPosition, wxDefaultSize, style, name );
}
void wxFrame::SetToolBar(wxToolBar *toolbar)
{
m_frameToolBar = toolbar;
if (m_frameToolBar)
{
/* insert into toolbar area if not already there */
if (m_frameToolBar->m_widget->parent != m_mainWidget)
{
gtk_widget_ref( m_frameToolBar->m_widget );
gtk_widget_unparent( m_frameToolBar->m_widget );
m_insertInClientArea = TRUE;
wxInsertChildInFrame( this, m_frameToolBar );
m_insertInClientArea = FALSE;
gtk_widget_unref( m_frameToolBar->m_widget );
}
}
}
wxToolBar *wxFrame::GetToolBar() const
{
return m_frameToolBar;