]> git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_cmdlinkbn.cpp
Don't document wxSortedArrayString as deriving from wxArrayString.
[wxWidgets.git] / src / xrc / xh_cmdlinkbn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_cmdlinkbn.cpp
3 // Purpose: XRC resource for command link buttons
4 // Author: Kinaou Herve
5 // Created: 2010/10/20
6 // Copyright:
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
12
13 #ifdef __BORLANDC__
14 #pragma hdrstop
15 #endif
16
17 #if wxUSE_XRC && wxUSE_COMMANDLINKBUTTON
18
19 #include "wx/xrc/xh_cmdlinkbn.h"
20
21 #include "wx/commandlinkbutton.h"
22
23 IMPLEMENT_DYNAMIC_CLASS(wxCommandLinkButtonXmlHandler, wxXmlResourceHandler)
24
25 wxCommandLinkButtonXmlHandler::wxCommandLinkButtonXmlHandler()
26 : wxXmlResourceHandler()
27 {
28 XRC_ADD_STYLE(wxBU_LEFT);
29 XRC_ADD_STYLE(wxBU_RIGHT);
30 XRC_ADD_STYLE(wxBU_TOP);
31 XRC_ADD_STYLE(wxBU_BOTTOM);
32 XRC_ADD_STYLE(wxBU_EXACTFIT);
33 AddWindowStyles();
34 }
35
36 wxObject *wxCommandLinkButtonXmlHandler::DoCreateResource()
37 {
38 XRC_MAKE_INSTANCE(button, wxCommandLinkButton)
39
40 button->Create(m_parentAsWindow,
41 GetID(),
42 GetText(wxS("label")),
43 GetText(wxS("note")),
44 GetPosition(), GetSize(),
45 GetStyle(),
46 wxDefaultValidator,
47 GetName());
48
49 SetupWindow(button);
50
51 return button;
52 }
53
54 bool wxCommandLinkButtonXmlHandler::CanHandle(wxXmlNode *node)
55 {
56 return IsOfClass(node, wxS("wxCommandLinkButton"));
57 }
58
59 #endif // wxUSE_XRC && wxUSE_COMMANDLINKBUTTON