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
// ----------------------------------------------------------------------------
{
// the list owns the pointers
m_xMargin = m_yMargin = 0;
-
m_maxRows = m_maxCols = 0;
+ m_toolPacking = m_toolSeparation = 0;
+ m_defaultWidth = 16;
+ m_defaultHeight = 15;
}
wxToolBarToolBase *wxToolBarBase::DoAddTool(int id,
wxString wxToolBarBase::GetToolShortHelp(int id) const
{
wxToolBarToolBase *tool = FindById(id);
- wxCHECK_MSG( tool, _T(""), _T("no such tool") );
+ wxCHECK_MSG( tool, wxEmptyString, _T("no such tool") );
return tool->GetShortHelp();
}
wxString wxToolBarBase::GetToolLongHelp(int id) const
{
wxToolBarToolBase *tool = FindById(id);
- wxCHECK_MSG( tool, _T(""), _T("no such tool") );
+ wxCHECK_MSG( tool, wxEmptyString, _T("no such tool") );
return tool->GetLongHelp();
}
{
out = in.Copy();
- // assuming the pixels along the edges are of the background color
- wxColour bgCol(in.GetRed(0, 0), in.GetGreen(0, 0), in.GetBlue(0, 0));
+ unsigned char r, g, b;
+ if ( in.HasMask() )
+ {
+ in.GetOrFindMaskColour(&r, &g, &b);
+ }
+ else // assuming the pixels along the edges are of the background color
+ {
+ r = in.GetRed(0, 0);
+ g = in.GetGreen(0, 0);
+ b = in.GetBlue(0, 0);
+ }
+
+ wxColour bgCol(r, g, b);
wxColour darkCol = wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW) ;
wxColour lightCol = wxSystemSettings::GetColour(wxSYS_COLOUR_3DHIGHLIGHT) ;