1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_cmdlinkbn.cpp
3 // Purpose: XRC resource for command link buttons
4 // Author: Kinaou Herve
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #if wxUSE_XRC && wxUSE_COMMANDLINKBUTTON
20 #include "wx/xrc/xh_cmdlinkbn.h"
22 #include "wx/commandlinkbutton.h"
24 IMPLEMENT_DYNAMIC_CLASS(wxCommandLinkButtonXmlHandler
, wxXmlResourceHandler
)
26 wxCommandLinkButtonXmlHandler::wxCommandLinkButtonXmlHandler()
27 : wxXmlResourceHandler()
29 XRC_ADD_STYLE(wxBU_LEFT
);
30 XRC_ADD_STYLE(wxBU_RIGHT
);
31 XRC_ADD_STYLE(wxBU_TOP
);
32 XRC_ADD_STYLE(wxBU_BOTTOM
);
33 XRC_ADD_STYLE(wxBU_EXACTFIT
);
37 wxObject
*wxCommandLinkButtonXmlHandler::DoCreateResource()
39 XRC_MAKE_INSTANCE(button
, wxCommandLinkButton
)
41 button
->Create(m_parentAsWindow
,
43 GetText(wxS("label")),
45 GetPosition(), GetSize(),
55 bool wxCommandLinkButtonXmlHandler::CanHandle(wxXmlNode
*node
)
57 return IsOfClass(node
, wxS("wxCommandLinkButton"));
60 #endif // wxUSE_XRC && wxUSE_COMMANDLINKBUTTON