]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_sttxt.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: XRC resource for wxStaticText
4 // Author: Bob Mitchell
7 // Copyright: (c) 2000 Bob Mitchell and Verant Interactive
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #pragma implementation "xh_sttxt.h"
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
22 #include "wx/xrc/xh_sttxt.h"
23 #include "wx/stattext.h"
25 IMPLEMENT_DYNAMIC_CLASS(wxStaticTextXmlHandler
, wxXmlResourceHandler
)
27 wxStaticTextXmlHandler::wxStaticTextXmlHandler()
28 : wxXmlResourceHandler()
30 XRC_ADD_STYLE(wxST_NO_AUTORESIZE
);
31 XRC_ADD_STYLE(wxALIGN_LEFT
);
32 XRC_ADD_STYLE(wxALIGN_RIGHT
);
33 XRC_ADD_STYLE(wxALIGN_CENTRE
);
37 wxObject
*wxStaticTextXmlHandler::DoCreateResource()
39 XRC_MAKE_INSTANCE(text
, wxStaticText
)
41 text
->Create(m_parentAsWindow
,
43 GetText(wxT("label")),
44 GetPosition(), GetSize(),
53 bool wxStaticTextXmlHandler::CanHandle(wxXmlNode
*node
)
55 return IsOfClass(node
, wxT("wxStaticText"));