ReactOS  0.4.15-dev-4936-gc06ccce
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 ()
 
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  }
BOOL m_bLeftButton
Definition: mouse.cpp:188
#define FALSE
Definition: types.h:117
ToolBase(TOOLTYPE tool)
Definition: toolsmodel.h:42

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
#define SW_HIDE
Definition: winuser.h:762
BOOL m_bLeftButton
Definition: mouse.cpp:188
SelectionModel selectionModel
Definition: main.cpp:20
ImageModel imageModel
Definition: main.cpp:32
void SetSrcRectSizeToZero()
CSelectionWindow selectionWindow
Definition: main.cpp:71

◆ 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  }
BOOL IsMoved() const
Definition: selection.h:19
#define SW_SHOWNOACTIVATE
Definition: winuser.h:768
#define TRUE
Definition: types.h:120
#define SW_HIDE
Definition: winuser.h:762
HDC m_hdc
Definition: toolsmodel.h:37
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
void CalculateContents(HDC hDCImage)
SelectionModel selectionModel
Definition: main.cpp:20
#define FALSE
Definition: types.h:117
void placeSelWin()
Definition: mouse.cpp:20
BOOL IsSrcRectSizeNonzero() const
ImageModel imageModel
Definition: main.cpp:32
GLuint start
Definition: gl.h:1545
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
void Undo(BOOL bClearRedo=FALSE)
Definition: history.cpp:60
void ResetToPrevious(void)
Definition: history.cpp:100
CSelectionWindow selectionWindow
Definition: main.cpp:71

◆ OnCancelDraw()

void RectSelTool::OnCancelDraw ( )
inlinevirtual

Reimplemented from ToolBase.

Definition at line 245 of file mouse.cpp.

246  {
247  if (m_bLeftButton)
252  }
BOOL IsMoved() const
Definition: selection.h:19
#define TRUE
Definition: types.h:120
BOOL m_bLeftButton
Definition: mouse.cpp:188
#define FALSE
Definition: types.h:117
virtual void OnCancelDraw()
Definition: mouse.cpp:85
ImageModel imageModel
Definition: main.cpp:32
void Undo(BOOL bClearRedo=FALSE)
Definition: history.cpp:60
CSelectionWindow selectionWindow
Definition: main.cpp:71

◆ OnFinishDraw()

void RectSelTool::OnFinishDraw ( )
inlinevirtual

Reimplemented from ToolBase.

Definition at line 234 of file mouse.cpp.

235  {
236  if (m_bLeftButton)
237  {
240  }
243  }
BOOL IsMoved() const
Definition: selection.h:19
BOOL m_bLeftButton
Definition: mouse.cpp:188
#define FALSE
Definition: types.h:117
virtual void OnFinishDraw()
Definition: mouse.cpp:90
void ForceRefreshSelectionContents()
Definition: selection.cpp:24
CSelectionWindow selectionWindow
Definition: main.cpp:71

◆ 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 RectSel(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2)
Definition: drawing.cpp:228
#define pt(x, y)
Definition: drawing.c:79
HDC m_hdc
Definition: toolsmodel.h:37
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
SelectionModel selectionModel
Definition: main.cpp:20
ImageModel imageModel
Definition: main.cpp:32
GLuint start
Definition: gl.h:1545
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
void Bound(POINT &pt)
Definition: history.cpp:305
void ResetToPrevious(void)
Definition: history.cpp:100
void SetSrcAndDestRectFromPoints(const POINT &ptFrom, const POINT &ptTo)

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: