From: Václav Slavík Date: Sun, 14 Oct 2001 22:20:05 +0000 (+0000) Subject: added wxHtmlWindow::AppendToPage X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/39029898248ba8089ce87a1978f1d92af3f6550b added wxHtmlWindow::AppendToPage git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/latex/wx/htwindow.tex b/docs/latex/wx/htwindow.tex index 884d185105..0d4ce6ecb4 100644 --- a/docs/latex/wx/htwindow.tex +++ b/docs/latex/wx/htwindow.tex @@ -53,6 +53,20 @@ filters. These filters are present by default: \item Plain Text filter (this filter is used if no other filter matches) \end{itemize} +\membersection{wxHtmlWindow::AppendToPage}\label{wxhtmlwindowappendtopage} + +\func{bool}{AppendToPage}{\param{const wxString\& }{source}} + +Appends HTML fragment to currently displayed text and refreshes the window. + +\wxheading{Parameters} + +\docparam{source}{HTML code fragment} + +\wxheading{Return value} + +FALSE if an error occurred, TRUE otherwise. + \membersection{wxHtmlWindow::GetInternalRepresentation}\label{wxhtmlwindowgetinternalrepresentation} \constfunc{wxHtmlContainerCell*}{GetInternalRepresentation}{\void} diff --git a/include/wx/html/htmlwin.h b/include/wx/html/htmlwin.h index 3f6aab815c..debdcb626f 100644 --- a/include/wx/html/htmlwin.h +++ b/include/wx/html/htmlwin.h @@ -49,12 +49,12 @@ class WXDLLEXPORT wxHtmlWindow : public wxScrolledWindow friend class wxHtmlWinModule; public: - wxHtmlWindow() : wxScrolledWindow() {}; + wxHtmlWindow() : wxScrolledWindow() {} wxHtmlWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHW_SCROLLBAR_AUTO, - const wxString& name = "htmlWindow"); + const wxString& name = wxT("htmlWindow")); ~wxHtmlWindow(); // Set HTML page and display it. !! source is HTML document itself, @@ -62,6 +62,9 @@ public: // specify document location, use LoadPage() istead // Return value : FALSE if an error occured, TRUE otherwise bool SetPage(const wxString& source); + + // Append to current page + bool AppendToPage(const wxString& source); // Load HTML page from given location. Location can be either // a) /usr/wxGTK2/docs/html/wx.htm diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index c029c706fc..ada2a4d19e 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -197,6 +197,10 @@ bool wxHtmlWindow::SetPage(const wxString& source) return TRUE; } +bool wxHtmlWindow::AppendToPage(const wxString& source) +{ + return SetPage(*(GetParser()->GetSource()) + source); +} bool wxHtmlWindow::LoadPage(const wxString& location) {