added wxTLW for MSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-09-24 00:34:14 +00:00
parent c2fd78b10f
commit 82c9f85ce5
20 changed files with 592 additions and 509 deletions

View File

@@ -45,6 +45,8 @@ END_EVENT_TABLE()
// implementation
// ============================================================================
IMPLEMENT_DYNAMIC_CLASS(wxTopLevelWindow, wxWindow)
// ----------------------------------------------------------------------------
// construction/destruction
// ----------------------------------------------------------------------------
@@ -64,31 +66,32 @@ bool wxTopLevelWindowBase::Destroy()
}
// ----------------------------------------------------------------------------
// wxTopLevelWindow size management: we exclude the areas taken by menu/status/toolbars
// from the client area, so the client area is what's really available for the
// frame contents
// wxTopLevelWindow size management: we exclude the areas taken by
// menu/status/toolbars from the client area, so the client area is what's
// really available for the frame contents
// ----------------------------------------------------------------------------
void wxTopLevelWindowBase::DoScreenToClient(int *x, int *y) const
{
wxWindow::DoScreenToClient(x, y);
// We may be faking the client origin.
// So a window that's really at (0, 30) may appear
// (to wxWin apps) to be at (0, 0).
// translate the wxWindow client coords to our client coords
wxPoint pt(GetClientAreaOrigin());
*x -= pt.x;
*y -= pt.y;
if ( x )
*x -= pt.x;
if ( y )
*y -= pt.y;
}
void wxTopLevelWindowBase::DoClientToScreen(int *x, int *y) const
{
// We may be faking the client origin.
// So a window that's really at (0, 30) may appear
// (to wxWin apps) to be at (0, 0).
wxPoint pt1(GetClientAreaOrigin());
*x += pt1.x;
*y += pt1.y;
// our client area origin (0, 0) may be really something like (0, 30) for
// wxWindow if we have a toolbar, account for it before translating
wxPoint pt(GetClientAreaOrigin());
if ( x )
*x += pt.x;
if ( y )
*y += pt.y;
wxWindow::DoClientToScreen(x, y);
}