// size, this worked like this in wxWidgets 2.8 and before and generally
// often makes sense for child windows (for top level ones it definitely
// does not as the user should be able to resize the window)
- if ( !wxTopLevelWindows.Find(this) ) // can't use IsTopLevel() from ctor
+ //
+ // note that we can't use IsTopLevel() from ctor
+ if ( !wxTopLevelWindows.Find((wxWindow *)this) )
SetMinSize(size);
SetName(name);
return min;
}
+wxSize wxWindowBase::DoGetBorderSize() const
+{
+ // there is one case in which we can implement it for all ports easily:
+ // do it as some classes used by both wxUniv and native ports (e.g.
+ // wxGenericStaticText) do override DoGetBestClientSize() and so this
+ // method must work for them and that ensures that it does, at least in
+ // the default case)
+ if ( GetBorder() == wxBORDER_NONE )
+ return wxSize(0, 0);
+
+ wxFAIL_MSG( "must be overridden if called" );
+
+ return wxDefaultSize;
+}
+
wxSize wxWindowBase::GetBestSize() const
{
if ( !m_windowSizer && m_bestSizeCache.IsFullySpecified() )