ReactOS 0.4.15-dev-8207-gd73a838
TwoPointDrawTool Struct Reference
Inheritance diagram for TwoPointDrawTool:
Collaboration diagram for TwoPointDrawTool:

Public Member Functions

void OnButtonDown (BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override
 
BOOL OnMouseMove (BOOL bLeftButton, LONG &x, LONG &y) override
 
BOOL OnButtonUp (BOOL bLeftButton, LONG &x, LONG &y) override
 
void OnEndDraw (BOOL bCancel) override
 
void OnSpecialTweak (BOOL bMinus) override
 
- Public Member Functions inherited from ToolBase
 ToolBase ()
 
virtual ~ToolBase ()
 
virtual void OnButtonDown (BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick)
 
virtual BOOL OnMouseMove (BOOL bLeftButton, LONG &x, LONG &y)
 
virtual BOOL OnButtonUp (BOOL bLeftButton, LONG &x, LONG &y)
 
virtual void OnDrawOverlayOnImage (HDC hdc)
 
virtual void OnDrawOverlayOnCanvas (HDC hdc)
 
virtual void OnSpecialTweak (BOOL bMinus)
 
virtual void OnEndDraw (BOOL bCancel)
 
void beginEvent ()
 
void endEvent ()
 
void reset ()
 

Public Attributes

BOOL m_bLeftButton = FALSE
 
BOOL m_bDrawing = FALSE
 
- Public Attributes inherited from ToolBase
HDC m_hdc
 
COLORREF m_fg
 
COLORREF m_bg
 

Additional Inherited Members

- Static Public Member Functions inherited from ToolBase
static ToolBasecreateToolObject (TOOLTYPE type)
 

Detailed Description

Definition at line 167 of file mouse.cpp.

Member Function Documentation

◆ OnButtonDown()

void TwoPointDrawTool::OnButtonDown ( BOOL  bLeftButton,
LONG  x,
LONG  y,
BOOL  bDoubleClick 
)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 172 of file mouse.cpp.

173 {
174 m_bLeftButton = bLeftButton;
177 }
void NotifyImageChanged()
Definition: history.cpp:23
#define TRUE
Definition: types.h:120
ImageModel imageModel
Definition: history.cpp:11
BOOL m_bLeftButton
Definition: mouse.cpp:169

◆ OnButtonUp()

BOOL TwoPointDrawTool::OnButtonUp ( BOOL  bLeftButton,
LONG x,
LONG y 
)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 185 of file mouse.cpp.

186 {
187 CRect rcPartial(g_ptStart, g_ptEnd);
188 rcPartial.NormalizeRect();
190 rcPartial.InflateRect((size.cx + 1) / 2, (size.cy + 1) / 2);
191 imageModel.PushImageForUndo(rcPartial);
192
196 return TRUE;
197 }
static POINT g_ptEnd
Definition: mouse.cpp:17
static POINT g_ptStart
Definition: mouse.cpp:17
ToolsModel toolsModel
Definition: toolsmodel.cpp:10
void PushImageForUndo()
Definition: history.cpp:127
SIZE GetToolSize() const
Definition: toolsmodel.cpp:205
#define FALSE
Definition: types.h:117
GLsizeiptr size
Definition: glext.h:5919
HDC m_hdc
Definition: toolsmodel.h:43
virtual void OnDrawOverlayOnImage(HDC hdc)
Definition: toolsmodel.h:53

◆ OnEndDraw()

void TwoPointDrawTool::OnEndDraw ( BOOL  bCancel)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 199 of file mouse.cpp.

200 {
202 ToolBase::OnEndDraw(bCancel);
203 }
virtual void OnEndDraw(BOOL bCancel)
Definition: mouse.cpp:125

◆ OnMouseMove()

BOOL TwoPointDrawTool::OnMouseMove ( BOOL  bLeftButton,
LONG x,
LONG y 
)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 179 of file mouse.cpp.

180 {
182 return TRUE;
183 }

◆ OnSpecialTweak()

void TwoPointDrawTool::OnSpecialTweak ( BOOL  bMinus)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 205 of file mouse.cpp.

206 {
208 }
void MakeLineThickerOrThinner(BOOL bThinner)
Definition: toolsmodel.cpp:82

Member Data Documentation

◆ m_bDrawing

◆ m_bLeftButton


The documentation for this struct was generated from the following file: