X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/544fee32eeac1a4f6ca3e0c7c1b13ee24f1d1c1c..166bcebb8e87aefb42de52d22d567a8fa316928d:/contrib/src/xrc/xh_bmpbt.cpp?ds=sidebyside diff --git a/contrib/src/xrc/xh_bmpbt.cpp b/contrib/src/xrc/xh_bmpbt.cpp index b0500ed45e..321b36c0b5 100644 --- a/contrib/src/xrc/xh_bmpbt.cpp +++ b/contrib/src/xrc/xh_bmpbt.cpp @@ -7,7 +7,7 @@ // Copyright: (c) 2000 Brian Gavin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// - + #ifdef __GNUG__ #pragma implementation "xh_bmpbt.h" #endif @@ -22,19 +22,22 @@ #include "wx/xrc/xh_bmpbt.h" #include -wxBitmapButtonXmlHandler::wxBitmapButtonXmlHandler() -: wxXmlResourceHandler() +IMPLEMENT_DYNAMIC_CLASS(wxBitmapButtonXmlHandler, wxXmlResourceHandler) + +wxBitmapButtonXmlHandler::wxBitmapButtonXmlHandler() +: wxXmlResourceHandler() { XRC_ADD_STYLE(wxBU_AUTODRAW); XRC_ADD_STYLE(wxBU_LEFT); XRC_ADD_STYLE(wxBU_RIGHT); XRC_ADD_STYLE(wxBU_TOP); XRC_ADD_STYLE(wxBU_BOTTOM); + XRC_ADD_STYLE(wxBU_EXACTFIT); AddWindowStyles(); } wxObject *wxBitmapButtonXmlHandler::DoCreateResource() -{ +{ XRC_MAKE_INSTANCE(button, wxBitmapButton) button->Create(m_parentAsWindow, @@ -47,14 +50,14 @@ wxObject *wxBitmapButtonXmlHandler::DoCreateResource() if (GetBool(wxT("default"), 0)) button->SetDefault(); SetupWindow(button); - + if (!GetParamValue(wxT("selected")).IsEmpty()) button->SetBitmapSelected(GetBitmap(wxT("selected"))); if (!GetParamValue(wxT("focus")).IsEmpty()) button->SetBitmapFocus(GetBitmap(wxT("focus"))); if (!GetParamValue(wxT("disabled")).IsEmpty()) button->SetBitmapDisabled(GetBitmap(wxT("disabled"))); - + return button; }