return true;
}
-wxToolBarToolBase::~wxToolBarToolBase()
+#if WXWIN_COMPATIBILITY_2_2
+
+const wxBitmap& wxToolBarToolBase::GetBitmap1() const
+{
+ return GetNormalBitmap();
+}
+
+const wxBitmap& wxToolBarToolBase::GetBitmap2() const
+{
+ return GetDisabledBitmap();
+}
+
+void wxToolBarToolBase::SetBitmap1(const wxBitmap& bmp)
{
+ SetNormalBitmap(bmp);
}
+void wxToolBarToolBase::SetBitmap2(const wxBitmap& bmp)
+{
+ SetDisabledBitmap(bmp);
+}
+
+#endif // WXWIN_COMPATIBILITY_2_2
+
// ----------------------------------------------------------------------------
// wxToolBarBase adding/deleting items
// ----------------------------------------------------------------------------
wxToolBarBase::~wxToolBarBase()
{
WX_CLEAR_LIST(wxToolBarToolsList, m_tools);
+
+ // notify the frame that it doesn't have a tool bar any longer to avoid
+ // dangling pointers
+ wxFrameBase *frame = wxDynamicCast(GetParent(), wxFrameBase);
+ if ( frame && frame->GetToolBar() == this )
+ {
+ frame->SetToolBar(NULL);
+ }
}
// ----------------------------------------------------------------------------