]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_sttxt.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_sttxt.cpp
3 // Purpose: XRC resource for wxStaticText
4 // Author: Bob Mitchell
7 // Copyright: (c) 2000 Bob Mitchell and Verant Interactive
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #if wxUSE_XRC && wxUSE_STATTEXT
20 #include "wx/xrc/xh_sttxt.h"
23 #include "wx/stattext.h"
26 IMPLEMENT_DYNAMIC_CLASS(wxStaticTextXmlHandler
, wxXmlResourceHandler
)
28 wxStaticTextXmlHandler::wxStaticTextXmlHandler()
29 : wxXmlResourceHandler()
31 XRC_ADD_STYLE(wxST_NO_AUTORESIZE
);
32 XRC_ADD_STYLE(wxALIGN_LEFT
);
33 XRC_ADD_STYLE(wxALIGN_RIGHT
);
34 XRC_ADD_STYLE(wxALIGN_CENTRE
);
38 wxObject
*wxStaticTextXmlHandler::DoCreateResource()
40 XRC_MAKE_INSTANCE(text
, wxStaticText
)
42 text
->Create(m_parentAsWindow
,
44 GetText(wxT("label")),
45 GetPosition(), GetSize(),
51 long wrap
= GetLong(wxT("wrap"), -1);
58 bool wxStaticTextXmlHandler::CanHandle(wxXmlNode
*node
)
60 return IsOfClass(node
, wxT("wxStaticText"));
63 #endif // wxUSE_XRC && wxUSE_STATTEXT