コード例 #1
0
ファイル: PlatWX.cpp プロジェクト: chromylei/third_party
// Returns rectangle of monitor pt is on
PRectangle Window::GetMonitorRect(Point pt) {
    wxRect rect;
    if (! wid) return PRectangle();
#if wxUSE_DISPLAY
    // Get the display the point is found on
    int n = wxDisplay::GetFromPoint(wxPoint(pt.x, pt.y));
    wxDisplay dpy(n == wxNOT_FOUND ? 0 : n);
    rect = dpy.GetGeometry();
#else
    wxUnusedVar(pt);
#endif
    return PRectangleFromwxRect(rect);
}
コード例 #2
0
PRectangle Window::GetPosition() {
    if (! id) return PRectangle();
    wxRect rc(GETWIN(id)->GetPosition(), GETWIN(id)->GetSize());
    return PRectangleFromwxRect(rc);
}