mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[MSPAINT] Simplify mouse.cpp with deleting ctors
Refactoring. CORE-19094
This commit is contained in:
parent
96e48dcd01
commit
c20b4ca29e
1 changed files with 0 additions and 72 deletions
|
@ -128,10 +128,6 @@ struct FreeSelTool : ToolBase
|
||||||
{
|
{
|
||||||
BOOL m_bLeftButton = FALSE;
|
BOOL m_bLeftButton = FALSE;
|
||||||
|
|
||||||
FreeSelTool()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnDrawOverlayOnImage(HDC hdc) override
|
void OnDrawOverlayOnImage(HDC hdc) override
|
||||||
{
|
{
|
||||||
if (!selectionModel.IsLanded())
|
if (!selectionModel.IsLanded())
|
||||||
|
@ -218,10 +214,6 @@ struct RectSelTool : ToolBase
|
||||||
{
|
{
|
||||||
BOOL m_bLeftButton = FALSE;
|
BOOL m_bLeftButton = FALSE;
|
||||||
|
|
||||||
RectSelTool()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnDrawOverlayOnImage(HDC hdc) override
|
void OnDrawOverlayOnImage(HDC hdc) override
|
||||||
{
|
{
|
||||||
if (!selectionModel.IsLanded())
|
if (!selectionModel.IsLanded())
|
||||||
|
@ -300,10 +292,6 @@ struct TwoPointDrawTool : ToolBase
|
||||||
BOOL m_bLeftButton = FALSE;
|
BOOL m_bLeftButton = FALSE;
|
||||||
BOOL m_bDrawing = FALSE;
|
BOOL m_bDrawing = FALSE;
|
||||||
|
|
||||||
TwoPointDrawTool(TOOLTYPE type)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override
|
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override
|
||||||
{
|
{
|
||||||
m_bLeftButton = bLeftButton;
|
m_bLeftButton = bLeftButton;
|
||||||
|
@ -440,10 +428,6 @@ struct SmoothDrawTool : ToolBase
|
||||||
BOOL m_bShiftDown = FALSE;
|
BOOL m_bShiftDown = FALSE;
|
||||||
BOOL m_bLeftButton = FALSE;
|
BOOL m_bLeftButton = FALSE;
|
||||||
|
|
||||||
SmoothDrawTool(TOOLTYPE type)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void OnDraw(HDC hdc, BOOL bLeftButton, POINT pt0, POINT pt1) = 0;
|
virtual void OnDraw(HDC hdc, BOOL bLeftButton, POINT pt0, POINT pt1) = 0;
|
||||||
|
|
||||||
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override
|
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override
|
||||||
|
@ -512,10 +496,6 @@ struct SmoothDrawTool : ToolBase
|
||||||
// TOOL_RUBBER
|
// TOOL_RUBBER
|
||||||
struct RubberTool : SmoothDrawTool
|
struct RubberTool : SmoothDrawTool
|
||||||
{
|
{
|
||||||
RubberTool() : SmoothDrawTool(TOOL_RUBBER)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnDraw(HDC hdc, BOOL bLeftButton, POINT pt0, POINT pt1) override
|
void OnDraw(HDC hdc, BOOL bLeftButton, POINT pt0, POINT pt1) override
|
||||||
{
|
{
|
||||||
if (bLeftButton)
|
if (bLeftButton)
|
||||||
|
@ -533,10 +513,6 @@ struct RubberTool : SmoothDrawTool
|
||||||
// TOOL_FILL
|
// TOOL_FILL
|
||||||
struct FillTool : ToolBase
|
struct FillTool : ToolBase
|
||||||
{
|
{
|
||||||
FillTool()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override
|
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override
|
||||||
{
|
{
|
||||||
imageModel.PushImageForUndo();
|
imageModel.PushImageForUndo();
|
||||||
|
@ -547,10 +523,6 @@ struct FillTool : ToolBase
|
||||||
// TOOL_COLOR
|
// TOOL_COLOR
|
||||||
struct ColorTool : ToolBase
|
struct ColorTool : ToolBase
|
||||||
{
|
{
|
||||||
ColorTool()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void fetchColor(BOOL bLeftButton, LONG x, LONG y)
|
void fetchColor(BOOL bLeftButton, LONG x, LONG y)
|
||||||
{
|
{
|
||||||
COLORREF rgbColor;
|
COLORREF rgbColor;
|
||||||
|
@ -585,10 +557,6 @@ struct ZoomTool : ToolBase
|
||||||
{
|
{
|
||||||
BOOL m_bZoomed = FALSE;
|
BOOL m_bZoomed = FALSE;
|
||||||
|
|
||||||
ZoomTool()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL getNewZoomRect(CRect& rcView, INT newZoom);
|
BOOL getNewZoomRect(CRect& rcView, INT newZoom);
|
||||||
|
|
||||||
void OnDrawOverlayOnCanvas(HDC hdc) override
|
void OnDrawOverlayOnCanvas(HDC hdc) override
|
||||||
|
@ -647,10 +615,6 @@ BOOL ZoomTool::getNewZoomRect(CRect& rcView, INT newZoom)
|
||||||
// TOOL_PEN
|
// TOOL_PEN
|
||||||
struct PenTool : SmoothDrawTool
|
struct PenTool : SmoothDrawTool
|
||||||
{
|
{
|
||||||
PenTool() : SmoothDrawTool(TOOL_PEN)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnDraw(HDC hdc, BOOL bLeftButton, POINT pt0, POINT pt1) override
|
void OnDraw(HDC hdc, BOOL bLeftButton, POINT pt0, POINT pt1) override
|
||||||
{
|
{
|
||||||
COLORREF rgb = bLeftButton ? m_fg : m_bg;
|
COLORREF rgb = bLeftButton ? m_fg : m_bg;
|
||||||
|
@ -666,10 +630,6 @@ struct PenTool : SmoothDrawTool
|
||||||
// TOOL_BRUSH
|
// TOOL_BRUSH
|
||||||
struct BrushTool : SmoothDrawTool
|
struct BrushTool : SmoothDrawTool
|
||||||
{
|
{
|
||||||
BrushTool() : SmoothDrawTool(TOOL_BRUSH)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnDraw(HDC hdc, BOOL bLeftButton, POINT pt0, POINT pt1) override
|
void OnDraw(HDC hdc, BOOL bLeftButton, POINT pt0, POINT pt1) override
|
||||||
{
|
{
|
||||||
COLORREF rgb = bLeftButton ? m_fg : m_bg;
|
COLORREF rgb = bLeftButton ? m_fg : m_bg;
|
||||||
|
@ -688,10 +648,6 @@ struct AirBrushTool : SmoothDrawTool
|
||||||
{
|
{
|
||||||
DWORD m_dwTick = 0;
|
DWORD m_dwTick = 0;
|
||||||
|
|
||||||
AirBrushTool() : SmoothDrawTool(TOOL_AIRBRUSH)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override
|
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override
|
||||||
{
|
{
|
||||||
m_dwTick = GetTickCount();
|
m_dwTick = GetTickCount();
|
||||||
|
@ -719,10 +675,6 @@ struct AirBrushTool : SmoothDrawTool
|
||||||
// TOOL_TEXT
|
// TOOL_TEXT
|
||||||
struct TextTool : ToolBase
|
struct TextTool : ToolBase
|
||||||
{
|
{
|
||||||
TextTool()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnDrawOverlayOnImage(HDC hdc) override
|
void OnDrawOverlayOnImage(HDC hdc) override
|
||||||
{
|
{
|
||||||
if (canvasWindow.m_drawing)
|
if (canvasWindow.m_drawing)
|
||||||
|
@ -852,10 +804,6 @@ struct TextTool : ToolBase
|
||||||
// TOOL_LINE
|
// TOOL_LINE
|
||||||
struct LineTool : TwoPointDrawTool
|
struct LineTool : TwoPointDrawTool
|
||||||
{
|
{
|
||||||
LineTool() : TwoPointDrawTool(TOOL_LINE)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnDrawOverlayOnImage(HDC hdc) override
|
void OnDrawOverlayOnImage(HDC hdc) override
|
||||||
{
|
{
|
||||||
if (!m_bDrawing)
|
if (!m_bDrawing)
|
||||||
|
@ -872,10 +820,6 @@ struct BezierTool : ToolBase
|
||||||
{
|
{
|
||||||
BOOL m_bLeftButton = FALSE;
|
BOOL m_bLeftButton = FALSE;
|
||||||
|
|
||||||
BezierTool()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnDrawOverlayOnImage(HDC hdc)
|
void OnDrawOverlayOnImage(HDC hdc)
|
||||||
{
|
{
|
||||||
COLORREF rgb = (m_bLeftButton ? m_fg : m_bg);
|
COLORREF rgb = (m_bLeftButton ? m_fg : m_bg);
|
||||||
|
@ -951,10 +895,6 @@ struct BezierTool : ToolBase
|
||||||
// TOOL_RECT
|
// TOOL_RECT
|
||||||
struct RectTool : TwoPointDrawTool
|
struct RectTool : TwoPointDrawTool
|
||||||
{
|
{
|
||||||
RectTool() : TwoPointDrawTool(TOOL_RECT)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnDrawOverlayOnImage(HDC hdc) override
|
void OnDrawOverlayOnImage(HDC hdc) override
|
||||||
{
|
{
|
||||||
if (!m_bDrawing)
|
if (!m_bDrawing)
|
||||||
|
@ -974,10 +914,6 @@ struct ShapeTool : ToolBase
|
||||||
BOOL m_bLeftButton = FALSE;
|
BOOL m_bLeftButton = FALSE;
|
||||||
BOOL m_bClosed = FALSE;
|
BOOL m_bClosed = FALSE;
|
||||||
|
|
||||||
ShapeTool()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnDrawOverlayOnImage(HDC hdc)
|
void OnDrawOverlayOnImage(HDC hdc)
|
||||||
{
|
{
|
||||||
if (s_pointSP <= 0)
|
if (s_pointSP <= 0)
|
||||||
|
@ -1070,10 +1006,6 @@ struct ShapeTool : ToolBase
|
||||||
// TOOL_ELLIPSE
|
// TOOL_ELLIPSE
|
||||||
struct EllipseTool : TwoPointDrawTool
|
struct EllipseTool : TwoPointDrawTool
|
||||||
{
|
{
|
||||||
EllipseTool() : TwoPointDrawTool(TOOL_ELLIPSE)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnDrawOverlayOnImage(HDC hdc) override
|
void OnDrawOverlayOnImage(HDC hdc) override
|
||||||
{
|
{
|
||||||
if (!m_bDrawing)
|
if (!m_bDrawing)
|
||||||
|
@ -1090,10 +1022,6 @@ struct EllipseTool : TwoPointDrawTool
|
||||||
// TOOL_RRECT
|
// TOOL_RRECT
|
||||||
struct RRectTool : TwoPointDrawTool
|
struct RRectTool : TwoPointDrawTool
|
||||||
{
|
{
|
||||||
RRectTool() : TwoPointDrawTool(TOOL_RRECT)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnDrawOverlayOnImage(HDC hdc) override
|
void OnDrawOverlayOnImage(HDC hdc) override
|
||||||
{
|
{
|
||||||
if (!m_bDrawing)
|
if (!m_bDrawing)
|
||||||
|
|
Loading…
Reference in a new issue