From 85b38e0bd12e376b5ecebac69de539dea5232332 Mon Sep 17 00:00:00 2001
From: Robert Roebling <robert@roebling.de>
Date: Sat, 12 Feb 2005 15:53:25 +0000
Subject: [PATCH]   Added GetPureVitualSize() returning just m_virtualSize.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/window.tex | 18 +++++++++++++++++-
 include/wx/window.h      | 10 ++++++++--
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex
index 3edf6e0a24..236aa313eb 100644
--- a/docs/latex/wx/window.tex
+++ b/docs/latex/wx/window.tex
@@ -1112,6 +1112,18 @@ method:\par
 }}
 
 
+\membersection{wxWindow::GetPureVirtualSize}\label{wxwindowgetpurevirtualsize}
+
+\constfunc{wxSize}{GetPureVirtualSize}{\void}
+
+This gets the virtual size of the window in pixels as it has been set
+by \helpref{SetVirtualSize}{wxwindowsetvirtualsize}.
+
+\helpref{GetSize}{wxwindowgetsize},\rtfsp
+\helpref{GetClientSize}{wxwindowgetclientsize},\rtfsp
+\helpref{GetVirtualSize}{wxwindowgetvirtualsize}
+
+
 \membersection{wxWindow::GetRect}\label{wxwindowgetrect}
 
 \constfunc{virtual wxRect}{GetRect}{\void}
@@ -1281,7 +1293,11 @@ Returns a pointer to the current validator for the window, or NULL if there is n
 
 \constfunc{wxSize}{GetVirtualSize}{\void}
 
-This gets the virtual size of the window in pixels.
+This gets the virtual size of the window in pixels as it has been set
+by \helpref{SetVirtualSize}{wxwindowsetvirtualsize} or the size of the
+client area, if it is larger. Use 
+\helpref{GetPureVirtualSize}{wxwindowgetpurevirtualsize} if you want
+to get the actual virtual height independent of the client size.
 
 \wxheading{Parameters}
 
diff --git a/include/wx/window.h b/include/wx/window.h
index 8874dded7e..ed8bfdd743 100644
--- a/include/wx/window.h
+++ b/include/wx/window.h
@@ -424,10 +424,16 @@ public:
 
         // Override these methods for windows that have a virtual size
         // independent of their client size.  eg. the virtual area of a
-        // wxScrolledWindow.  Default is to alias VirtualSize to ClientSize.
+        // wxScrolledWindow.  Default is to return m_virtualSize unless
+        // the client size is bigger.
 
     virtual void DoSetVirtualSize( int x, int y );
-    virtual wxSize DoGetVirtualSize() const; // { return m_virtualSize; }
+    virtual wxSize DoGetVirtualSize() const;
+    
+    
+        // Really return just m_virtualSize, nothing else
+    
+    wxSize GetPureVirtualSize() const { return m_virtualSize; }
 
         // Return the largest of ClientSize and BestSize (as determined
         // by a sizer, interior children, or other means)
-- 
2.50.0

