]>
Commit | Line | Data |
---|---|---|
78d14f80 VS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: xh_sttxt.cpp | |
b5d6954b | 3 | // Purpose: XRC resource for wxStaticText |
78d14f80 VS |
4 | // Author: Bob Mitchell |
5 | // Created: 2000/03/21 | |
6 | // RCS-ID: $Id$ | |
7 | // Copyright: (c) 2000 Bob Mitchell and Verant Interactive | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
f80ea77b | 10 | |
78d14f80 VS |
11 | #ifdef __GNUG__ |
12 | #pragma implementation "xh_sttxt.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/xrc/xh_sttxt.h" | |
23 | #include "wx/stattext.h" | |
24 | ||
854e189f VS |
25 | IMPLEMENT_DYNAMIC_CLASS(wxStaticTextXmlHandler, wxXmlResourceHandler) |
26 | ||
f80ea77b WS |
27 | wxStaticTextXmlHandler::wxStaticTextXmlHandler() |
28 | : wxXmlResourceHandler() | |
78d14f80 | 29 | { |
544fee32 VS |
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); | |
78d14f80 VS |
34 | AddWindowStyles(); |
35 | } | |
36 | ||
37 | wxObject *wxStaticTextXmlHandler::DoCreateResource() | |
f80ea77b | 38 | { |
544fee32 | 39 | XRC_MAKE_INSTANCE(text, wxStaticText) |
f2588180 VS |
40 | |
41 | text->Create(m_parentAsWindow, | |
42 | GetID(), | |
43 | GetText(wxT("label")), | |
44 | GetPosition(), GetSize(), | |
45 | GetStyle(), | |
46 | GetName()); | |
47 | ||
78d14f80 | 48 | SetupWindow(text); |
f80ea77b | 49 | |
78d14f80 VS |
50 | return text; |
51 | } | |
52 | ||
78d14f80 VS |
53 | bool wxStaticTextXmlHandler::CanHandle(wxXmlNode *node) |
54 | { | |
55 | return IsOfClass(node, wxT("wxStaticText")); | |
56 | } |