ReactOS  0.4.15-dev-5618-g8866b9d
FreeSelTool Struct Reference
Inheritance diagram for FreeSelTool:
Collaboration diagram for FreeSelTool:

Public Member Functions

 FreeSelTool ()
 
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 110 of file mouse.cpp.

Constructor & Destructor Documentation

◆ FreeSelTool()

FreeSelTool::FreeSelTool ( )
inline

Definition at line 114 of file mouse.cpp.

115  {
116  }
BOOL m_bLeftButton
Definition: mouse.cpp:112
#define FALSE
Definition: types.h:117
ToolBase(TOOLTYPE tool)
Definition: toolsmodel.h:42

Member Function Documentation

◆ OnButtonDown()

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

Reimplemented from ToolBase.

Definition at line 118 of file mouse.cpp.

119  {
120  if (bLeftButton)
121  {
123  selectionWindow.ShowWindow(SW_HIDE);
126  }
127  m_bLeftButton = bLeftButton;
128  }
void CopyPrevious(void)
Definition: history.cpp:47
#define SW_HIDE
Definition: winuser.h:762
void PushToPtStack(LONG x, LONG y)
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
BOOL m_bLeftButton
Definition: mouse.cpp:112
SelectionModel selectionModel
Definition: main.cpp:20
ImageModel imageModel
Definition: main.cpp:32
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
CSelectionWindow selectionWindow
Definition: main.cpp:71

◆ OnButtonUp()

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

Reimplemented from ToolBase.

Definition at line 142 of file mouse.cpp.

143  {
144  if (bLeftButton)
145  {
147  if (selectionModel.PtStackSize() > 2)
148  {
150  placeSelWin();
153  }
154  else
155  {
159  selectionWindow.ShowWindow(SW_HIDE);
160  }
161  }
162  }
int PtStackSize() const
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
SelectionModel selectionModel
Definition: main.cpp:20
#define FALSE
Definition: types.h:117
ImageModel imageModel
Definition: main.cpp:32
void CalculateBoundingBoxAndContents(HDC hDCImage)
void Undo(BOOL bClearRedo=FALSE)
Definition: history.cpp:60
void ResetToPrevious(void)
Definition: history.cpp:100
void placeSelWin()
Definition: mouse.cpp:20
CSelectionWindow selectionWindow
Definition: main.cpp:71

◆ OnCancelDraw()

void FreeSelTool::OnCancelDraw ( )
inlinevirtual

Reimplemented from ToolBase.

Definition at line 175 of file mouse.cpp.

176  {
177  if (m_bLeftButton)
182  }
BOOL IsMoved() const
Definition: selection.h:19
#define TRUE
Definition: types.h:120
BOOL m_bLeftButton
Definition: mouse.cpp:112
#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 FreeSelTool::OnFinishDraw ( )
inlinevirtual

Reimplemented from ToolBase.

Definition at line 164 of file mouse.cpp.

165  {
166  if (m_bLeftButton)
167  {
170  }
173  }
BOOL IsMoved() const
Definition: selection.h:19
BOOL m_bLeftButton
Definition: mouse.cpp:112
#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 FreeSelTool::OnMouseMove ( BOOL  bLeftButton,
LONG  x,
LONG  y 
)
inlinevirtual

Reimplemented from ToolBase.

Definition at line 130 of file mouse.cpp.

131  {
132  if (bLeftButton)
133  {
134  POINT pt = { x, y };
139  }
140  }
void DrawFramePoly(HDC hDCImage)
#define pt(x, y)
Definition: drawing.c:79
HDC m_hdc
Definition: toolsmodel.h:37
void PushToPtStack(LONG x, LONG y)
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
SelectionModel selectionModel
Definition: main.cpp:20
ImageModel imageModel
Definition: main.cpp:32
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

Member Data Documentation

◆ m_bLeftButton

BOOL FreeSelTool::m_bLeftButton

Definition at line 112 of file mouse.cpp.

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


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