📄 xh_html.cpp
字号:
/////////////////////////////////////////////////////////////////////////////// Name: xh_html.cpp// Purpose: XRC resource for wxHtmlWindow// Author: Bob Mitchell// Created: 2000/03/21// RCS-ID: $Id: xh_html.cpp,v 1.1 2004/03/13 04:01:17 hopeseekr Exp $// Copyright: (c) 2000 Bob Mitchell and Verant Interactive// Licence: wxWindows licence///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)#pragma implementation "xh_html.h"#endif// For compilers that support precompilation, includes "wx.h".#include "wx/wxprec.h"#ifdef __BORLANDC__ #pragma hdrstop#endif#include "wx/xrc/xh_html.h"#if wxUSE_HTML#include "wx/html/htmlwin.h"#include "wx/filesys.h"wxHtmlWindowXmlHandler::wxHtmlWindowXmlHandler() : wxXmlResourceHandler() { XRC_ADD_STYLE(wxHW_SCROLLBAR_NEVER); XRC_ADD_STYLE(wxHW_SCROLLBAR_AUTO); AddWindowStyles();}wxObject *wxHtmlWindowXmlHandler::DoCreateResource(){ XRC_MAKE_INSTANCE(control, wxHtmlWindow) control->Create(m_parentAsWindow, GetID(), GetPosition(), GetSize(), GetStyle(wxT("style"), wxHW_SCROLLBAR_AUTO), GetName()); if (HasParam(wxT("borders"))) { control->SetBorders(GetDimension(wxT("borders"))); } if (HasParam(wxT("url"))) { wxString url = GetParamValue(wxT("url")); wxFileSystem& fsys = GetCurFileSystem(); wxFSFile *f = fsys.OpenFile(url); if (f) { control->LoadPage(f->GetLocation()); delete f; } else control->LoadPage(url); } else if (HasParam(wxT("htmlcode"))) { control->SetPage(GetText(wxT("htmlcode"))); } SetupWindow(control); return control;}bool wxHtmlWindowXmlHandler::CanHandle(wxXmlNode *node){ return IsOfClass(node, wxT("wxHtmlWindow"));}#endif // wxUSE_HTML
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -