ReactOS 0.4.15-dev-5666-gc548b97
RectSelTool Struct Reference
Inheritance diagram for RectSelTool:
Collaboration diagram for RectSelTool:

Public Member Functions

 RectSelTool ()
 
void OnButtonDown (BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick)
 
void OnMouseMove (BOOL bLeftButton, LONG x, LONG y)
 
void OnButtonUp (BOOL bLeftButton, LONG x, LONG y)
 
void OnFinishDraw ()
 
void OnCancelDraw ()
 
- Public Member Functions inherited from ToolBase
 ToolBase (TOOLTYPE tool)
 
virtual ~ToolBase ()
 
virtual void OnButtonDown (BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick)
 
virtual void OnMouseMove (BOOL bLeftButton, LONG x, LONG y)
 
virtual void OnButtonUp (BOOL bLeftButton, LONG x, LONG y)
 
virtual void OnCancelDraw ()
 
virtual void OnFinishDraw ()
 
void beginEvent ()
 
void endEvent ()
 
void reset ()
 

Public Attributes

BOOL m_bLeftButton
 
- 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 pointSP = 0
 
static POINT pointStack [256] = { { 0 } }
 

Detailed Description

Definition at line 186 of file mouse.cpp.

Constructor & Destructor Documentation

◆ RectSelTool()

RectSelTool::RectSelTool ( )
inline

Definition at line 190 of file mouse.cpp.

191 {
192 }
#define FALSE
Definition: types.h:117
BOOL m_bLeftButton
Definition: mouse.cpp:188
@ TOOL_RECTSEL
Definition: toolsmodel.h:14

Member Function Documentation

◆ OnButtonDown()

void RectSelTool::OnButtonDown ( BOOL  bLeftButton,
LONG  x,
LONG  y,
BOOL  bDoubleClick 
)
inlinevirtual

Reimplemented from ToolBase.

Definition at line 194 of file mouse.cpp.

195 {
196 if (bLeftButton)
197 {
199 selectionWindow.ShowWindow(SW_HIDE);
201 }
202 m_bLeftButton = bLeftButton;
203 }
void CopyPrevious(void)
Definition: history.cpp:47
void SetSrcRectSizeToZero()
CSelectionWindow selectionWindow
Definition: main.cpp:71
ImageModel imageModel
Definition: main.cpp:32
SelectionModel selectionModel
Definition: main.cpp:20
#define SW_HIDE
Definition: winuser.h:762

◆ OnButtonUp()

void RectSelTool::OnButtonUp ( BOOL  bLeftButton,
LONG  x,
LONG  y 
)
inlinevirtual

Reimplemented from ToolBase.

Definition at line 217 of file mouse.cpp.

218 {
219 if (bLeftButton)
220 {
222 if (start.x == x && start.y == y)
225 placeSelWin();
229 else
230 selectionWindow.ShowWindow(SW_HIDE);
231 }
232 }
void placeSelWin()
Definition: mouse.cpp:20
BOOL IsMoved() const
Definition: selection.h:19
void ResetToPrevious(void)
Definition: history.cpp:100
void Undo(BOOL bClearRedo=FALSE)
Definition: history.cpp:60
void CalculateContents(HDC hDCImage)
BOOL IsSrcRectSizeNonzero() const
#define TRUE
Definition: types.h:120
GLuint start
Definition: gl.h:1545
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
HDC m_hdc
Definition: toolsmodel.h:37
#define SW_SHOWNOACTIVATE
Definition: winuser.h:768

◆ OnCancelDraw()

void RectSelTool::OnCancelDraw ( )
inlinevirtual

Reimplemented from ToolBase.

Definition at line 245 of file mouse.cpp.

246 {
247 if (m_bLeftButton)
252 }
virtual void OnCancelDraw()
Definition: mouse.cpp:85

◆ OnFinishDraw()

void RectSelTool::OnFinishDraw ( )
inlinevirtual

Reimplemented from ToolBase.

Definition at line 234 of file mouse.cpp.

235 {
236 if (m_bLeftButton)
237 {
240 }
243 }
void ForceRefreshSelectionContents()
Definition: selection.cpp:24
virtual void OnFinishDraw()
Definition: mouse.cpp:90

◆ OnMouseMove()

void RectSelTool::OnMouseMove ( BOOL  bLeftButton,
LONG  x,
LONG  y 
)
inlinevirtual

Reimplemented from ToolBase.

Definition at line 205 of file mouse.cpp.

206 {
207 if (bLeftButton)
208 {
210 POINT pt = { x, y };
213 RectSel(m_hdc, start.x, start.y, pt.x, pt.y);
214 }
215 }
void Bound(POINT &pt)
Definition: history.cpp:305
void SetSrcAndDestRectFromPoints(const POINT &ptFrom, const POINT &ptTo)
#define pt(x, y)
Definition: drawing.c:79
void RectSel(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2)
Definition: drawing.cpp:228

Member Data Documentation

◆ m_bLeftButton

BOOL RectSelTool::m_bLeftButton

Definition at line 188 of file mouse.cpp.

Referenced by OnButtonDown(), OnCancelDraw(), and OnFinishDraw().


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