1. DoSetSize() simplified, DoGetBestSize() introduced

2. code cleanup here and there
3. attempts to make static boxes behave better (i.e. stay below other controls)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-07-02 22:02:05 +00:00
parent 44719c473b
commit 4438caf41a
30 changed files with 599 additions and 894 deletions

View File

@@ -241,28 +241,11 @@ void wxFrame::DoGetPosition(int *x, int *y) const
void wxFrame::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
int currentX, currentY;
int x1 = x;
int y1 = y;
int w1 = width;
int h1 = height;
wxWindow::DoSetSize(x, y, width, height, sizeFlags);
GetPosition(&currentX, &currentY);
if (x == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
x1 = currentX;
if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
y1 = currentY;
int ww,hh ;
GetSize(&ww,&hh) ;
if (width == -1) w1 = ww ;
if (height==-1) h1 = hh ;
MoveWindow(GetHwnd(), x1, y1, w1, h1, (BOOL)TRUE);
wxSizeEvent event(wxSize(width, height), m_windowId);
event.SetEventObject( this );
GetEventHandler()->ProcessEvent(event);
wxSizeEvent event(wxSize(width, height), m_windowId);
event.SetEventObject( this );
GetEventHandler()->ProcessEvent(event);
}
bool wxFrame::Show(bool show)