]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_cmdlinkbn.cpp
wxDataViewCtrl::Expand() only works on items whose parents are already
[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
6// RCS-ID: $Id:$
7// Copyright:
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11// For compilers that support precompilation, includes "wx.h".
12#include "wx/wxprec.h"
13
14#ifdef __BORLANDC__
15 #pragma hdrstop
16#endif
17
18#if wxUSE_XRC && wxUSE_COMMANDLINKBUTTON
19
20#include "wx/xrc/xh_cmdlinkbn.h"
21
22#include "wx/commandlinkbutton.h"
23
24IMPLEMENT_DYNAMIC_CLASS(wxCommandLinkButtonXmlHandler, wxXmlResourceHandler)
25
26wxCommandLinkButtonXmlHandler::wxCommandLinkButtonXmlHandler()
27 : wxXmlResourceHandler()
28{
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);
34 AddWindowStyles();
35}
36
37wxObject *wxCommandLinkButtonXmlHandler::DoCreateResource()
38{
39 XRC_MAKE_INSTANCE(button, wxCommandLinkButton)
40
41 button->Create(m_parentAsWindow,
42 GetID(),
43 GetText(wxS("label")),
44 GetText(wxS("note")),
45 GetPosition(), GetSize(),
46 GetStyle(),
47 wxDefaultValidator,
48 GetName());
49
50 SetupWindow(button);
51
52 return button;
53}
54
55bool wxCommandLinkButtonXmlHandler::CanHandle(wxXmlNode *node)
56{
57 return IsOfClass(node, wxS("wxCommandLinkButton"));
58}
59
60#endif // wxUSE_XRC && wxUSE_COMMANDLINKBUTTON