]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxHtmlWindow::AppendToPage
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 14 Oct 2001 22:20:05 +0000 (22:20 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 14 Oct 2001 22:20:05 +0000 (22:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/htwindow.tex
include/wx/html/htmlwin.h
src/html/htmlwin.cpp

index 884d1851053064c3a2de93a1ca461618cf822450..0d4ce6ecb4b43ef82ded9eac63c731cc6e0d3df0 100644 (file)
@@ -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}
index 3f6aab815c4de02f8f5ae0feb497ccd1d5a2c728..debdcb626f9f571ddd355a0980fa0e11a04706a7 100644 (file)
@@ -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
index c029c706fc9fa94469069fd7aae0ab334bd42192..ada2a4d19e587ff54bf62ac82017900994c7849e 100644 (file)
@@ -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)
 {