moved AdjustToClientAreaOrigin to wxWindowBase, needed worldwide for wxUniv
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user