]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_richtext.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_richtext.cpp
3 // Purpose: XRC resource for wxRichTextCtrl
4 // Author: Julian Smart
6 // Copyright: (c) 2006 Julian Smart
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
17 #if wxUSE_XRC && wxUSE_RICHTEXT
19 #include "wx/xrc/xh_richtext.h"
20 #include "wx/richtext/richtextctrl.h"
22 IMPLEMENT_DYNAMIC_CLASS(wxRichTextCtrlXmlHandler
, wxXmlResourceHandler
)
24 wxRichTextCtrlXmlHandler::wxRichTextCtrlXmlHandler() : wxXmlResourceHandler()
26 XRC_ADD_STYLE(wxTE_PROCESS_ENTER
);
27 XRC_ADD_STYLE(wxTE_PROCESS_TAB
);
28 XRC_ADD_STYLE(wxTE_MULTILINE
);
29 XRC_ADD_STYLE(wxTE_READONLY
);
30 XRC_ADD_STYLE(wxTE_AUTO_URL
);
35 wxObject
*wxRichTextCtrlXmlHandler::DoCreateResource()
37 XRC_MAKE_INSTANCE(text
, wxRichTextCtrl
)
39 text
->Create(m_parentAsWindow
,
41 GetText(wxT("value")),
42 GetPosition(), GetSize(),
49 if (HasParam(wxT("maxlength")))
50 text
->SetMaxLength(GetLong(wxT("maxlength")));
55 bool wxRichTextCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
57 return IsOfClass(node
, wxT("wxRichTextCtrl"));
60 #endif // wxUSE_XRC && wxUSE_RICHTEXT