]>
git.saurik.com Git - wxWidgets.git/blob - contrib/src/xrc/xh_html.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: XML resource for wxHtmlWindow
4 // Author: Bob Mitchell
7 // Copyright: (c) 2000 Bob Mitchell and Verant Interactive
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #pragma implementation "xh_html.h"
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
22 #include "wx/xrc/xh_html.h"
26 #include "wx/html/htmlwin.h"
29 wxHtmlWindowXmlHandler::wxHtmlWindowXmlHandler()
30 : wxXmlResourceHandler()
32 ADD_STYLE( wxHW_SCROLLBAR_NEVER
);
33 ADD_STYLE( wxHW_SCROLLBAR_AUTO
);
37 wxObject
*wxHtmlWindowXmlHandler::DoCreateResource()
39 wxHtmlWindow
*control
= new wxHtmlWindow(m_parentAsWindow
,
41 GetPosition(), GetSize(),
42 GetStyle( wxT("style" ), wxHW_SCROLLBAR_AUTO
),
46 if( HasParam( wxT("borders") ))
48 control
->SetBorders( GetDimension( wxT("borders" )));
51 if( HasParam( wxT("url") ))
53 control
->LoadPage( GetParamValue( wxT("url" )));
55 else if( HasParam( wxT("htmlcode") ))
57 control
->SetPage( GetText(wxT("htmlcode")) );
67 bool wxHtmlWindowXmlHandler::CanHandle(wxXmlNode
*node
)
69 return IsOfClass(node
, wxT("wxHtmlWindow"));