mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:02:56 +00:00
[MSPAINT] Polymorphism on tools (#4210)
- Introduce polymorphism on tools and mouse actions. - Implement double-clicking on TOOL_SHAPE. - Fix some bugs about mouse handling. CORE-17931
This commit is contained in:
parent
e0a47b7b5f
commit
ee132a05ba
12 changed files with 790 additions and 635 deletions
|
@ -176,7 +176,23 @@ LRESULT CScrollboxWindow::OnVScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOO
|
|||
LRESULT CScrollboxWindow::OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
|
||||
{
|
||||
selectionWindow.ShowWindow(SW_HIDE);
|
||||
pointSP = 0; // resets the point-buffer of the polygon and bezier functions
|
||||
|
||||
switch (toolsModel.GetActiveTool())
|
||||
{
|
||||
case TOOL_BEZIER:
|
||||
case TOOL_SHAPE:
|
||||
if (ToolBase::pointSP != 0)
|
||||
{
|
||||
toolsModel.OnCancelDraw();
|
||||
imageArea.Invalidate();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
toolsModel.resetTool(); // resets the point-buffer of the polygon and bezier functions
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue