| 1 |
#include "myxh_cmdlinkbtn.h" |
| 2 |
#include <wx/commandlinkbutton.h> |
| 3 |
|
| 4 |
MyWxCommandLinkButtonXmlHandler::MyWxCommandLinkButtonXmlHandler() |
| 5 |
: wxXmlResourceHandler() |
| 6 |
{ |
| 7 |
XRC_ADD_STYLE(wxBU_LEFT); |
| 8 |
XRC_ADD_STYLE(wxBU_RIGHT); |
| 9 |
XRC_ADD_STYLE(wxBU_TOP); |
| 10 |
XRC_ADD_STYLE(wxBU_BOTTOM); |
| 11 |
XRC_ADD_STYLE(wxBU_EXACTFIT); |
| 12 |
AddWindowStyles(); |
| 13 |
} |
| 14 |
|
| 15 |
wxObject* MyWxCommandLinkButtonXmlHandler::DoCreateResource() |
| 16 |
{ |
| 17 |
XRC_MAKE_INSTANCE(button, wxCommandLinkButton) |
| 18 |
|
| 19 |
button->Create(m_parentAsWindow, GetID(), GetText(wxS("label")), GetText(wxS("note")), GetPosition(), GetSize(), |
| 20 |
GetStyle(), wxDefaultValidator, GetName()); |
| 21 |
wxBitmap bmp = GetBitmap(); |
| 22 |
if(bmp.IsOk()) { button->SetBitmap(GetBitmap(), wxLEFT); } |
| 23 |
SetupWindow(button); |
| 24 |
return button; |
| 25 |
} |
| 26 |
|
| 27 |
bool MyWxCommandLinkButtonXmlHandler::CanHandle(wxXmlNode* node) { return IsOfClass(node, wxS("wxCommandLinkButton")); } |