]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_cmdlinkbn.cpp
wxMSW: return correct value from wxMessageDialog::GetReturnCode().
[wxWidgets.git] / src / xrc / xh_cmdlinkbn.cpp
CommitLineData
53cdd2c1
VZ
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
53cdd2c1
VZ
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
23IMPLEMENT_DYNAMIC_CLASS(wxCommandLinkButtonXmlHandler, wxXmlResourceHandler)
24
25wxCommandLinkButtonXmlHandler::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
36wxObject *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
54bool wxCommandLinkButtonXmlHandler::CanHandle(wxXmlNode *node)
55{
56 return IsOfClass(node, wxS("wxCommandLinkButton"));
57}
58
59#endif // wxUSE_XRC && wxUSE_COMMANDLINKBUTTON