Provided GetBestVirtualSize and DoGetBestSize implementations for

generic and GTK+ wxScrolledWindow.

wxWindowBase::DoGetBestSize was returning a virtual size if there were child
controls, which was then used to set the scrolled window actual size.
Similarly, wxWindowBase::GetBestVirtualSize was returning
the actual window size; now we return the virtual size
for dimensions that have scrolling (e.g. vertical scrolling
direction), or the minimum/actual size for those that don't
(e.g. the maximum control width if there is no horizontal
scrolling).

This allows the scrolled window to be properly sized, whereas
before it would start off at the virtual size (giving
enormous layouts).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2005-03-17 21:21:45 +00:00
parent 50c06297bd
commit 844adaa47a
8 changed files with 190 additions and 2 deletions

View File

@@ -138,7 +138,7 @@ public:
bool IsSplit() const { return (m_windowTwo != NULL); }
// Sets the sash size
void SetSashSize(int WXUNUSED(width)) { }
void SetSashSize(int width) { m_sashSize = width; }
// Sets the border size
void SetBorderSize(int WXUNUSED(width)) { }
@@ -283,6 +283,7 @@ protected:
int m_oldY;
int m_sashPosition; // Number of pixels from left or top
double m_sashGravity;
int m_sashSize;
wxSize m_lastSize;
int m_requestedSashPosition;
int m_sashPositionCurrent; // while dragging