Implement wxWindow::DoGetBorderSize() in wxUniv.
As some wxUniv classes implement DoGetBestClientSize(), the new code in wxWindow::DoGetBestSize() implementation calls DoGetBorderSize() which asserts because it's not implemented, making it impossible to even start the minimal sample -- fix this. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -243,6 +243,9 @@ protected:
|
|||||||
virtual wxSize DoGetBestClientSize() const;
|
virtual wxSize DoGetBestClientSize() const;
|
||||||
virtual wxSize DoGetBestSize() const;
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
|
// override the base class method to return the size of the window borders
|
||||||
|
virtual wxSize DoGetBorderSize() const;
|
||||||
|
|
||||||
// adjust the size of the window to take into account its borders
|
// adjust the size of the window to take into account its borders
|
||||||
wxSize AdjustSize(const wxSize& size) const;
|
wxSize AdjustSize(const wxSize& size) const;
|
||||||
|
|
||||||
|
@@ -1661,8 +1661,8 @@ protected:
|
|||||||
// of the left and the right border in the x component of the returned size
|
// of the left and the right border in the x component of the returned size
|
||||||
// and the sum of the heights of the top and bottom borders in the y one
|
// and the sum of the heights of the top and bottom borders in the y one
|
||||||
//
|
//
|
||||||
// NB: this is new/temporary API only implemented by wxMSW so far and
|
// NB: this is new/temporary API only implemented by wxMSW and wxUniv so
|
||||||
// subject to change, don't use
|
// far and subject to change, don't use
|
||||||
virtual wxSize DoGetBorderSize() const
|
virtual wxSize DoGetBorderSize() const
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( "must be overridden if called" );
|
wxFAIL_MSG( "must be overridden if called" );
|
||||||
|
@@ -728,6 +728,11 @@ wxSize wxWindow::DoGetBestClientSize() const
|
|||||||
return wxWindowNative::DoGetBestSize();
|
return wxWindowNative::DoGetBestSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxSize wxWindow::DoGetBorderSize() const
|
||||||
|
{
|
||||||
|
return AdjustSize(wxSize(0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
wxSize wxWindow::AdjustSize(const wxSize& size) const
|
wxSize wxWindow::AdjustSize(const wxSize& size) const
|
||||||
{
|
{
|
||||||
wxSize sz = size;
|
wxSize sz = size;
|
||||||
|
Reference in New Issue
Block a user