ReactOS 0.4.15-dev-6712-g46b4b55
FreeSelTool Struct Reference
Inheritance diagram for FreeSelTool:
Collaboration diagram for FreeSelTool:

Public Member Functions

 FreeSelTool ()
 
void OnDrawOverlayOnImage (HDC hdc) override
 
void OnDrawOverlayOnCanvas (HDC hdc) override
 
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 OnFinishDraw () override
 
void OnCancelDraw () override
 
void OnSpecialTweak (BOOL bMinus) override
 
- Public Member Functions inherited from ToolBase
 ToolBase (TOOLTYPE tool)
 
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 OnCancelDraw ()
 
virtual void OnFinishDraw ()
 
virtual void OnDrawOverlayOnImage (HDC hdc)
 
virtual void OnDrawOverlayOnCanvas (HDC hdc)
 
virtual void OnSpecialTweak (BOOL bMinus)
 
void beginEvent ()
 
void endEvent ()
 
void reset ()
 

Public Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from ToolBase
static ToolBasecreateToolObject (TOOLTYPE type)
 
- Static Public Attributes inherited from ToolBase
static INT s_pointSP = 0
 
static POINT s_pointStack [256] = { { 0 } }
 
- Protected Member Functions inherited from ToolBase
void OnDrawSelectionOnCanvas (HDC hdc)
 

Detailed Description

Definition at line 104 of file mouse.cpp.

Constructor & Destructor Documentation

◆ FreeSelTool()

FreeSelTool::FreeSelTool ( )
inline

Definition at line 108 of file mouse.cpp.

109 {
110 }
@ TOOL_FREESEL
Definition: toolsmodel.h:12

Member Function Documentation

◆ OnButtonDown()

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

Reimplemented from ToolBase.

Definition at line 128 of file mouse.cpp.

129 {
131 if (bLeftButton)
132 {
135 POINT pt = { x, y };
137 }
138 m_bLeftButton = bLeftButton;
139 }
void PushToPtStack(POINT pt)
#define pt(x, y)
Definition: drawing.c:79
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
SelectionModel selectionModel
BOOL m_bLeftButton
Definition: mouse.cpp:106

◆ OnButtonUp()

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

Reimplemented from ToolBase.

Definition at line 153 of file mouse.cpp.

154 {
155 if (bLeftButton)
156 {
157 if (selectionModel.PtStackSize() > 2)
158 {
161 }
162 else
163 {
166 }
168 }
169 else
170 {
171 POINT pt = { x, y };
172 canvasWindow.ClientToScreen(&pt);
174 }
175 return TRUE;
176 }
CCanvasWindow canvasWindow
Definition: canvas.cpp:10
VOID TrackPopupMenu(POINT ptScreen, INT iSubMenu)
Definition: winproc.cpp:1093
void NotifyImageChanged()
Definition: history.cpp:15
void BuildMaskFromPtStack()
int PtStackSize() const
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
ImageModel imageModel
Definition: history.cpp:11
CMainWindow mainWindow
Definition: main.cpp:22

◆ OnCancelDraw()

void FreeSelTool::OnCancelDraw ( )
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 184 of file mouse.cpp.

185 {
188 }
virtual void OnCancelDraw()
Definition: mouse.cpp:65

◆ OnDrawOverlayOnCanvas()

void FreeSelTool::OnDrawOverlayOnCanvas ( HDC  hdc)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 123 of file mouse.cpp.

124 {
126 }
HDC hdc
Definition: main.c:9
void OnDrawSelectionOnCanvas(HDC hdc)
Definition: mouse.cpp:89

◆ OnDrawOverlayOnImage()

void FreeSelTool::OnDrawOverlayOnImage ( HDC  hdc)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 112 of file mouse.cpp.

113 {
116
118 {
120 }
121 }
BOOL m_drawing
Definition: canvas.h:41
COLORREF GetBgColor() const
void DrawFramePoly(HDC hDCImage)
BOOL IsLanded() const
void DrawSelection(HDC hDCImage, COLORREF crBg=0, BOOL bBgTransparent=FALSE)
BOOL IsBackgroundTransparent() const
Definition: toolsmodel.cpp:207
ToolsModel toolsModel
Definition: toolsmodel.cpp:10
PaletteModel paletteModel

◆ OnFinishDraw()

void FreeSelTool::OnFinishDraw ( )
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 178 of file mouse.cpp.

179 {
182 }
virtual void OnFinishDraw()
Definition: mouse.cpp:71

◆ OnMouseMove()

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

Reimplemented from ToolBase.

Definition at line 141 of file mouse.cpp.

142 {
143 if (bLeftButton)
144 {
145 POINT pt = { x, y };
149 }
150 return TRUE;
151 }
void Clamp(POINT &pt) const
Definition: history.cpp:256

◆ OnSpecialTweak()

void FreeSelTool::OnSpecialTweak ( BOOL  bMinus)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 190 of file mouse.cpp.

191 {
193 }
void StretchSelection(BOOL bShrink)

Member Data Documentation

◆ m_bLeftButton

BOOL FreeSelTool::m_bLeftButton = FALSE

Definition at line 106 of file mouse.cpp.

Referenced by OnButtonDown().


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