added wxWindow::ClientToWindowSize and WindowToClientSize helpers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -713,6 +713,22 @@ wxPoint wxWindowBase::GetClientAreaOrigin() const
|
||||
return wxPoint(0,0);
|
||||
}
|
||||
|
||||
wxSize wxWindowBase::ClientToWindowSize(const wxSize& size) const
|
||||
{
|
||||
const wxSize diff(GetSize() - GetClientSize());
|
||||
|
||||
return wxSize(size.x == -1 ? -1 : size.x + diff.x,
|
||||
size.y == -1 ? -1 : size.y + diff.y);
|
||||
}
|
||||
|
||||
wxSize wxWindowBase::WindowToClientSize(const wxSize& size) const
|
||||
{
|
||||
const wxSize diff(GetSize() - GetClientSize());
|
||||
|
||||
return wxSize(size.x == -1 ? -1 : size.x - diff.x,
|
||||
size.y == -1 ? -1 : size.y - diff.y);
|
||||
}
|
||||
|
||||
void wxWindowBase::SetWindowVariant( wxWindowVariant variant )
|
||||
{
|
||||
if ( m_windowVariant != variant )
|
||||
|
Reference in New Issue
Block a user