- // There are times (and windows) where 'Best' size and 'Min' size
- // are vastly out of sync. This should be remedied somehow, but in
- // the meantime, this method will return the larger of BestSize
- // (the window's smallest legible size), and any user specified
- // MinSize hint.
- wxSize GetAdjustedBestSize() const
- {
- wxSize s( DoGetBestSize() );
- return wxSize( wxMax( s.x, GetMinWidth() ), wxMax( s.y, GetMinHeight() ) );
- }
+ void SetScrollHelper( wxScrollHelper *sh ) { m_scrollHelper = sh; }
+ wxScrollHelper *GetScrollHelper() { return m_scrollHelper; }
+
+ // reset the cached best size value so it will be recalculated the
+ // next time it is needed.
+ void InvalidateBestSize();
+ void CacheBestSize(const wxSize& size) const
+ { wxConstCast(this, wxWindowBase)->m_bestSizeCache = size; }
+
+
+ // This function will merge the window's best size into the window's
+ // minimum size, giving priority to the min size components, and
+ // returns the results.
+ wxSize GetEffectiveMinSize() const;
+ wxDEPRECATED( wxSize GetBestFittingSize() const ); // replaced by GetEffectiveMinSize
+ wxDEPRECATED( wxSize GetAdjustedMinSize() const ); // replaced by GetEffectiveMinSize
+
+ // A 'Smart' SetSize that will fill in default size values with 'best'
+ // size. Sets the minsize to what was passed in.
+ void SetInitialSize(const wxSize& size=wxDefaultSize);
+ wxDEPRECATED( void SetBestFittingSize(const wxSize& size=wxDefaultSize) ); // replaced by SetInitialSize
+