Deprecate useless wxWindow::GetDefaultBorderForControl()
This function was added back ina047aff270(Added wxBORDER_THEME, wxWindow::GetDefaultBorderForControl(), wxWindow::CanApplyThemeBorder(), 2007-08-07) but seems to have been made completely unnecessary bydc797d8e1b(More border rationalisation. GetDefaultBorder is now mostly defined in base class files., 2007-11-13) soon afterwards and never did anything other than returning wxBORDER_THEME, with no explanation as to when it might be useful to override it not to do it. It also doesn't seem to be really used anywhere outside wxWidgets and has never been documented, so make it non-virtual and deprecate it to avoid confusion and simplify things.
This commit is contained in:
parent
f50fb719e8
commit
a89577e8a4
5 changed files with 11 additions and 18 deletions
|
|
@ -126,6 +126,10 @@ Changes in behaviour which may result in build errors
|
||||||
- wxTEST_DIALOG() macro now must be followed by semicolon, whereas previously
|
- wxTEST_DIALOG() macro now must be followed by semicolon, whereas previously
|
||||||
it was only supposed to, but it wasn't mandatory to use one after it.
|
it was only supposed to, but it wasn't mandatory to use one after it.
|
||||||
|
|
||||||
|
- wxWindow::GetDefaultBorderForControl() is not virtual any longer and will
|
||||||
|
be completely removed in the future. If you overrode this function, don't
|
||||||
|
do it any longer. If you call it, replace it with wxBORDER_THEME constant.
|
||||||
|
|
||||||
|
|
||||||
3.3.0: (released 2022-??-??)
|
3.3.0: (released 2022-??-??)
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
|
||||||
|
|
@ -616,11 +616,6 @@ protected:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// this allows you to implement standard control borders without
|
|
||||||
// repeating the code in different classes that are not derived from
|
|
||||||
// wxControl
|
|
||||||
virtual wxBorder GetDefaultBorderForControl() const override;
|
|
||||||
|
|
||||||
// choose the default border for this window
|
// choose the default border for this window
|
||||||
virtual wxBorder GetDefaultBorder() const override;
|
virtual wxBorder GetDefaultBorder() const override;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1838,10 +1838,13 @@ protected:
|
||||||
// specified) border for the window class
|
// specified) border for the window class
|
||||||
virtual wxBorder GetDefaultBorder() const;
|
virtual wxBorder GetDefaultBorder() const;
|
||||||
|
|
||||||
// this allows you to implement standard control borders without
|
// Don't override this function any longer (it used to be virtual but isn't
|
||||||
// repeating the code in different classes that are not derived from
|
// any more) as it's not called by wxWidgets any more and don't call it
|
||||||
// wxControl
|
// yourself, just use wxBORDER_THEME instead.
|
||||||
virtual wxBorder GetDefaultBorderForControl() const { return wxBORDER_THEME; }
|
#if WXWIN_COMPATIBILITY_3_2
|
||||||
|
wxDEPRECATED_MSG("Just use wxBORDER_THEME instead")
|
||||||
|
wxBorder GetDefaultBorderForControl() const { return wxBORDER_THEME; }
|
||||||
|
#endif // WXWIN_COMPATIBILITY_3_2
|
||||||
|
|
||||||
// Get the default size for the new window if no explicit size given. TLWs
|
// Get the default size for the new window if no explicit size given. TLWs
|
||||||
// have their own default size so this is just for non top-level windows.
|
// have their own default size so this is just for non top-level windows.
|
||||||
|
|
|
||||||
|
|
@ -3256,10 +3256,6 @@ wxBorder wxWindowBase::GetBorder(long flags) const
|
||||||
{
|
{
|
||||||
border = GetDefaultBorder();
|
border = GetDefaultBorder();
|
||||||
}
|
}
|
||||||
else if ( border == wxBORDER_THEME )
|
|
||||||
{
|
|
||||||
border = GetDefaultBorderForControl();
|
|
||||||
}
|
|
||||||
|
|
||||||
return border;
|
return border;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1547,11 +1547,6 @@ void wxWindowMSW::MSWUpdateStyle(long flagsOld, long exflagsOld)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBorder wxWindowMSW::GetDefaultBorderForControl() const
|
|
||||||
{
|
|
||||||
return wxBORDER_THEME;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxBorder wxWindowMSW::GetDefaultBorder() const
|
wxBorder wxWindowMSW::GetDefaultBorder() const
|
||||||
{
|
{
|
||||||
return wxWindowBase::GetDefaultBorder();
|
return wxWindowBase::GetDefaultBorder();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue