Dialog unit mods; wxProp tidying

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-10-09 12:01:58 +00:00
parent c39d4bcf2b
commit fd71308fc8
57 changed files with 2060 additions and 1850 deletions

View File

@@ -64,3 +64,27 @@ void wxWindow::UpdateWindowUI()
}
}
}
// Dialog units translations. Implemented in wincmn.cpp.
wxPoint wxWindow::ConvertPixelsToDialog(const wxPoint& pt)
{
int charWidth = GetCharWidth();
int charHeight = GetCharHeight();
wxPoint pt2;
pt2.x = (int) ((pt.x * 4) / charWidth) ;
pt2.y = (int) ((pt.y * 8) / charHeight) ;
return pt2;
}
wxPoint wxWindow::ConvertDialogToPixels(const wxPoint& pt)
{
int charWidth = GetCharWidth();
int charHeight = GetCharHeight();
wxPoint pt2;
pt2.x = (int) ((pt.x * charWidth) / 4) ;
pt2.y = (int) ((pt.y * charHeight) / 8) ;
return pt2;
}