]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxHtmlWindow::HistoryCanBack/Forward
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 10 Oct 2000 22:07:16 +0000 (22:07 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 10 Oct 2000 22:07:16 +0000 (22:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index 622efd4e7365ed7e07e5d48ffee0589686b6770f..a76372013828430aa8a1cfc8d1b25a8d5c597438 100644 (file)
@@ -98,6 +98,21 @@ Returns the related frame.
 Moves back to the previous page. (each page displayed using 
 \helpref{LoadPage}{wxhtmlwindowloadpage} is stored in history list.)
 
+\membersection{wxHtmlWindow::HistoryCanBack}\label{wxhtmlwindowhistorycanback}
+
+\func{bool}{HistoryCanBack}{\void}
+
+Returns true if it is possible to go back in the history (i.e. HistoryBack()
+won't fail).
+
+\membersection{wxHtmlWindow::HistoryCanForward}\label{wxhtmlwindowhistorycanforward}
+
+\func{bool}{HistoryCanForward}{\void}
+
+Returns true if it is possible to go forward in the history (i.e. HistoryBack()
+won't fail).
+
+
 \membersection{wxHtmlWindow::HistoryClear}\label{wxhtmlwindowhistoryclear}
 
 \func{void}{HistoryClear}{\void}
index 0fd05a4d01d97e490e1face4d3ab492400d60648..822cc96547d1b812c8502e35cf105b76b40d8302 100644 (file)
@@ -129,6 +129,9 @@ class WXDLLEXPORT wxHtmlWindow : public wxScrolledWindow
         bool HistoryForward();
                 // Goes to previous/next page (in browsing history)
                 // Returns TRUE if successful, FALSE otherwise
+        bool HistoryCanBack();
+        bool HistoryCanForward();
+        
         void HistoryClear();
                 // Resets history
 
index a0fd8ace9ffebbcab364948ed220c5dddc07be72..9316bf7019d87b2e09eec15118eba7a5112f83c0 100644 (file)
@@ -387,6 +387,11 @@ bool wxHtmlWindow::HistoryBack()
     return TRUE;
 }
 
+bool wxHtmlWindow::HistoryCanBack()
+{
+    if (m_HistoryPos < 1) return FALSE;
+    return TRUE ;
+}
 
 
 bool wxHtmlWindow::HistoryForward()
@@ -413,6 +418,12 @@ bool wxHtmlWindow::HistoryForward()
     return TRUE;
 }
 
+bool wxHtmlWindow::HistoryCanForward()
+{
+    if (m_HistoryPos == -1) return FALSE;
+    if (m_HistoryPos >= (int)m_History.GetCount() - 1)return FALSE;
+    return TRUE ;
+}
 
 
 void wxHtmlWindow::HistoryClear()