]> git.saurik.com Git - wxWidgets.git/blob - contrib/src/xml/xh_bttn.cpp
standardized projects
[wxWidgets.git] / contrib / src / xml / xh_bttn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: xh_bttn.cpp
3 // Purpose: XML resource for buttons
4 // Author: Vaclav Slavik
5 // Created: 2000/03/05
6 // RCS-ID: $Id$
7 // Copyright: (c) 2000 Vaclav Slavik
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifdef __GNUG__
12 #pragma implementation "xh_bttn.h"
13 #endif
14
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
17
18 #ifdef __BORLANDC__
19 #pragma hdrstop
20 #endif
21
22 #include "wx/xml/xh_bttn.h"
23 #include "wx/button.h"
24
25
26 wxObject *wxButtonXmlHandler::DoCreateResource()
27 {
28 wxButton *button = new wxButton(m_ParentAsWindow,
29 GetID(),
30 GetText(_T("label")),
31 GetPosition(), GetSize(),
32 GetStyle());
33 button->SetName(GetName());
34 if (GetBool(_T("default"), 0) == 1) button->SetDefault();
35 SetupWindow(button);
36
37 return button;
38 }
39
40
41
42 bool wxButtonXmlHandler::CanHandle(wxXmlNode *node)
43 {
44 return node->GetName() == _T("button");
45 }
46
47