if( rSize.x == -1 && GetParent() )
rSize.x = GetParent()->GetSize().x;
- SetCanAddEventHandler(TRUE);
AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
rPos.x, rPos.y, rSize.x, rSize.y);
if( !tool->GetButtonWidget() )
{
- DoChangeBackgroundColour((WXWidget) button,
- m_backgroundColour, TRUE);
+ wxDoChangeBackgroundColour((WXWidget) button,
+ m_backgroundColour, TRUE);
tool->SetWidget(button);
}
wxColour col;
col.SetPixel(backgroundPixel);
- if( bmp.GetMask() )
+ if( bmp.Ok() && bmp.GetMask() )
{
bmp = wxCreateMaskedBitmap(bmp, col);
tool->SetNormalBitmap(bmp);
}
- if( insensBmp.GetMask() )
+ if( insensBmp.Ok() && insensBmp.GetMask() )
{
insensBmp = wxCreateMaskedBitmap(insensBmp, col);
tool->SetDisabledBitmap(insensBmp);
wxColour col;
col.SetPixel(backgroundPixel);
- pixmap = (Pixmap) bmp.GetPixmap();
+ pixmap = (Pixmap) bmp.GetDrawable();
{
wxBitmap tmp = tool->GetDisabledBitmap();
insensPixmap = tmp.Ok() ?
- (Pixmap)tmp.GetPixmap() :
+ (Pixmap)tmp.GetDrawable() :
tool->GetInsensPixmap();
}