X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e2f9212c00094f3032511bc7d42efc7c1b91134b..8cbc39e803460d493c2783c4474123a3b1817c03:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index df455c9cfa..92480ea046 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -1355,6 +1355,23 @@ void wxWindowBase::GetClientSizeConstraint(int *w, int *h) const GetClientSize(w, h); } +void wxWindowBase::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags) +{ + // don't do it for the dialogs/frames - they float independently of their + // parent + if ( !IsTopLevel() ) + { + wxWindow *parent = GetParent(); + if ( !(sizeFlags & wxSIZE_NO_ADJUSTMENTS) && parent ) + { + wxPoint pt(parent->GetClientAreaOrigin()); + x += pt.x; + y += pt.y; + } + } +} + + void wxWindowBase::GetPositionConstraint(int *x, int *y) const { wxLayoutConstraints *constr = GetConstraints(); @@ -1562,7 +1579,7 @@ void wxWindowBase::OnMiddleClick( wxMouseEvent& event ) wxMessageBox(wxString::Format( _T( - " wxWindows Library (%s port)\nVersion %u.%u.%u, compiled at %s %s\n Copyright (c) 1995-2000 wxWindows team" + " wxWindows Library (%s port)\nVersion %u.%u.%u, compiled at %s %s\n Copyright (c) 1995-2001 wxWindows team" ), port.c_str(), wxMAJOR_VERSION,