]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_sttxt.cpp
9397992d87eccfb53fadfac8bf44e9f31a8279bc
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 /////////////////////////////////////////////////////////////////////////////
11 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
12 #pragma implementation "xh_sttxt.h"
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
24 #include "wx/xrc/xh_sttxt.h"
25 #include "wx/stattext.h"
27 IMPLEMENT_DYNAMIC_CLASS(wxStaticTextXmlHandler
, wxXmlResourceHandler
)
29 wxStaticTextXmlHandler::wxStaticTextXmlHandler()
30 : wxXmlResourceHandler()
32 XRC_ADD_STYLE(wxST_NO_AUTORESIZE
);
33 XRC_ADD_STYLE(wxALIGN_LEFT
);
34 XRC_ADD_STYLE(wxALIGN_RIGHT
);
35 XRC_ADD_STYLE(wxALIGN_CENTRE
);
39 wxObject
*wxStaticTextXmlHandler::DoCreateResource()
41 XRC_MAKE_INSTANCE(text
, wxStaticText
)
43 text
->Create(m_parentAsWindow
,
45 GetText(wxT("label")),
46 GetPosition(), GetSize(),
55 bool wxStaticTextXmlHandler::CanHandle(wxXmlNode
*node
)
57 return IsOfClass(node
, wxT("wxStaticText"));