[MSPAINT] Make sizeboxes window-less (#5166)

Reduce window controls and integrate to the canvas window.
- The sizeboxes are absorbed by canvasWindow.
- class CSizeboxWindow is deleted.
- Add enum CANVAS_HITTEST.
- Add getSizeBoxRect, getSizeBoxHitTest, and drawSizeBoxes helper functions in sizebox.cpp.
CORE-18867
This commit is contained in:
Katayama Hirofumi MZ 2023-03-19 10:42:10 +09:00 committed by GitHub
parent 728694f60f
commit 6b6a045766
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 420 additions and 288 deletions

View file

@ -19,9 +19,13 @@ POINT ToolBase::pointStack[256] = { { 0 } };
void
placeSelWin()
{
selectionWindow.MoveWindow(Zoomed(selectionModel.GetDestRectLeft()), Zoomed(selectionModel.GetDestRectTop()),
Zoomed(selectionModel.GetDestRectWidth()) + 2 * GRIP_SIZE,
Zoomed(selectionModel.GetDestRectHeight()) + 2 * GRIP_SIZE, TRUE);
CRect rc;
rc.left = Zoomed(selectionModel.GetDestRectLeft());
rc.top = Zoomed(selectionModel.GetDestRectTop());
rc.right = rc.left + Zoomed(selectionModel.GetDestRectWidth());
rc.bottom = rc.top + Zoomed(selectionModel.GetDestRectHeight());
::InflateRect(&rc, GRIP_SIZE, GRIP_SIZE);
selectionWindow.MoveWindow(rc.left, rc.top, rc.Width(), rc.Height(), TRUE);
selectionWindow.BringWindowToTop();
imageArea.InvalidateRect(NULL, FALSE);
}
@ -712,11 +716,6 @@ struct ShapeTool : ToolBase
imageModel.ResetToPrevious();
--pointSP;
draw(m_bLeftButton, -1, -1, TRUE);
pointSP = 0;
}
else
{
imageModel.Undo(TRUE);
}
ToolBase::OnFinishDraw();
}