added wxHtmlWindow::LoadFile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -14,8 +14,9 @@ file or downloaded via HTTP protocol) in a window. The width
|
||||
of the window is constant - given in the constructor - and virtual height
|
||||
is changed dynamically depending on page size.
|
||||
Once the window is created you can set its content by calling
|
||||
\helpref{SetPage(text)}{wxhtmlwindowsetpage} or
|
||||
\helpref{LoadPage(filename)}{wxhtmlwindowloadpage}.
|
||||
\helpref{SetPage(text)}{wxhtmlwindowsetpage},
|
||||
\helpref{LoadPage(filename)}{wxhtmlwindowloadpage} or
|
||||
\helpref{LoadFile}{wxhtmlwindowloadfile}.
|
||||
|
||||
\wxheading{Note}
|
||||
|
||||
@@ -146,6 +147,20 @@ Clears history.
|
||||
|
||||
Moves to next page in history.
|
||||
|
||||
\membersection{wxHtmlWindow::LoadFile}\label{wxhtmlwindowloadfile}
|
||||
|
||||
\func{virtual bool}{LoadFile}{\param{const wxFileName\& }{filename}}
|
||||
|
||||
Loads HTML page from file and displays it.
|
||||
|
||||
\wxheading{Return value}
|
||||
|
||||
false if an error occurred, true otherwise
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{LoadPage}{wxhtmlwindowloadpage}
|
||||
|
||||
\membersection{wxHtmlWindow::LoadPage}\label{wxhtmlwindowloadpage}
|
||||
|
||||
\func{virtual bool}{LoadPage}{\param{const wxString\& }{location}}
|
||||
@@ -154,7 +169,7 @@ Unlike SetPage this function first loads HTML page from {\it location}
|
||||
and then displays it. See example:
|
||||
|
||||
\begin{verbatim}
|
||||
htmlwin -> SetPage("help/myproject/index.htm");
|
||||
htmlwin->LoadPage("help/myproject/index.htm");
|
||||
\end{verbatim}
|
||||
|
||||
\wxheading{Parameters}
|
||||
@@ -165,6 +180,10 @@ htmlwin -> SetPage("help/myproject/index.htm");
|
||||
|
||||
false if an error occurred, true otherwise
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{LoadFile}{wxhtmlwindowloadfile}
|
||||
|
||||
\membersection{wxHtmlWindow::OnCellClicked}\label{wxhtmlwindowoncellclicked}
|
||||
|
||||
\func{virtual void}{OnCellClicked}{\param{wxHtmlCell }{*cell}, \param{wxCoord }{x}, \param{wxCoord }{y}, \param{const wxMouseEvent\& }{event}}
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include "wx/html/htmlcell.h"
|
||||
#include "wx/filesys.h"
|
||||
#include "wx/html/htmlfilt.h"
|
||||
#include "wx/filename.h"
|
||||
|
||||
class wxHtmlProcessor;
|
||||
class wxHtmlWinModule;
|
||||
@@ -100,6 +101,9 @@ public:
|
||||
// Return value : same as SetPage
|
||||
virtual bool LoadPage(const wxString& location);
|
||||
|
||||
// Loads HTML page from file
|
||||
bool LoadFile(const wxFileName& filename);
|
||||
|
||||
// Returns full location of opened page
|
||||
wxString GetOpenedPage() const {return m_OpenedPage;}
|
||||
// Returns anchor within opened page
|
||||
|
@@ -199,7 +199,7 @@ class BoldProcessor : public wxHtmlProcessor
|
||||
m_Html->SetRelatedFrame(this, _("HTML : %s"));
|
||||
m_Html->SetRelatedStatusBar(0);
|
||||
m_Html->ReadCustomization(wxConfig::Get());
|
||||
m_Html->LoadPage(wxT("test.htm"));
|
||||
m_Html->LoadFile(wxFileName(wxT("test.htm")));
|
||||
m_Html->AddProcessor(m_Processor);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user