wxToolBar API changes; now frames manage their toolbar & statusbar properly;

client area position is used in SetSize; changes for BC++ & VC++ 1.5;
wxWindow::GetUpdateRegion added; removed wxUpdateIterator; some missing functions
added to process.cpp; bad navigation key event cast fixed; MDI and toolbar samples
updated; new wxMSW wxRegion constructor (WXHRGN)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-07-27 09:47:57 +00:00
parent e6688c3fd2
commit 81d66cf39f
57 changed files with 1372 additions and 867 deletions

View File

@@ -174,14 +174,7 @@ void wxMDIParentFrame::GetClientSize(int *x, int *y) const
int cwidth = rect.right;
int cheight = rect.bottom;
/*
if (m_frameToolBar)
{
int tw, th;
m_frameToolBar->GetSize(&tw, &th);
cheight -= th;
}
*/
if ( GetStatusBar() )
{
int sw, sh;
@@ -189,6 +182,10 @@ void wxMDIParentFrame::GetClientSize(int *x, int *y) const
cheight -= sh;
}
wxPoint pt(GetClientAreaOrigin());
cheight -= pt.y;
cwidth -= pt.x;
*x = cwidth;
*y = cheight;
}
@@ -276,23 +273,18 @@ void wxMDIParentFrame::OnSize(wxSizeEvent& event)
int y = 0;
int width, height;
GetClientSize(&width, &height);
if ( GetToolBar() )
{
int wt, ht;
GetToolBar()->GetSize(&wt, &ht);
height -= ht;
y += ht;
GetToolBar()->SetSize(0, 0, width, ht);
}
if ( GetClientWindow() )
GetClientWindow()->SetSize(x, y, width, height);
/* Already done in MSWOnSize
// forward WM_SIZE to status bar control
#if USE_NATIVE_STATUSBAR
if (m_frameStatusBar && m_frameStatusBar->IsKindOf(CLASSINFO(wxStatusBar95)))
((wxStatusBar95 *)m_frameStatusBar)->OnSize(event);
#endif
*/
}
void wxMDIParentFrame::OnActivate(wxActivateEvent& event)
@@ -461,6 +453,7 @@ void wxMDIParentFrame::MSWOnSize(int x, int y, WXUINT id)
#endif
PositionStatusBar();
PositionToolBar();
wxSizeEvent event(wxSize(x, y), m_windowId);
event.SetEventObject( this );
@@ -914,6 +907,7 @@ void wxMDIChildFrame::MSWOnSize(int x, int y, WXUINT id)
#endif
PositionStatusBar();
PositionToolBar();
wxWindow::MSWOnSize(x, y, id);
}