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

Public Member Functions

 BezierTool ()
 
void draw (BOOL bLeftButton)
 
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 OnCancelDraw ()
 
void OnFinishDraw ()
 
- 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 536 of file mouse.cpp.

Constructor & Destructor Documentation

◆ BezierTool()

BezierTool::BezierTool ( )
inline

Definition at line 540 of file mouse.cpp.

541  {
542  }
#define FALSE
Definition: types.h:117
ToolBase(TOOLTYPE tool)
Definition: toolsmodel.h:42
BOOL m_bLeftButton
Definition: mouse.cpp:538

Member Function Documentation

◆ draw()

void BezierTool::draw ( BOOL  bLeftButton)
inline

Definition at line 544 of file mouse.cpp.

545  {
546  COLORREF rgb = (bLeftButton ? m_fg : m_bg);
547  switch (pointSP)
548  {
549  case 1:
552  break;
553  case 2:
555  break;
556  case 3:
558  break;
559  }
560  m_bLeftButton = bLeftButton;
561  }
static POINT pointStack[256]
Definition: toolsmodel.h:40
ToolsModel toolsModel
Definition: main.cpp:18
HDC m_hdc
Definition: toolsmodel.h:37
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
void Bezier(HDC hdc, POINT p1, POINT p2, POINT p3, POINT p4, COLORREF color, int thickness)
Definition: drawing.cpp:95
struct Line Line
Definition: wdfdevice.h:4081
static INT pointSP
Definition: toolsmodel.h:39
int GetLineWidth() const
Definition: toolsmodel.cpp:43
COLORREF m_bg
Definition: toolsmodel.h:38
DWORD COLORREF
Definition: windef.h:300
COLORREF m_fg
Definition: toolsmodel.h:38
_In_ ULONG _In_ ULONG rgb
Definition: winddi.h:3520
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
BOOL m_bLeftButton
Definition: mouse.cpp:538

Referenced by OnButtonUp(), OnFinishDraw(), and OnMouseMove().

◆ OnButtonDown()

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

Reimplemented from ToolBase.

Definition at line 563 of file mouse.cpp.

564  {
565  pointStack[pointSP].x = x;
566  pointStack[pointSP].y = y;
567 
568  if (pointSP == 0)
569  {
571  pointSP++;
572  }
573  }
static POINT pointStack[256]
Definition: toolsmodel.h:40
void CopyPrevious(void)
Definition: history.cpp:47
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static INT pointSP
Definition: toolsmodel.h:39
ImageModel imageModel
Definition: main.cpp:32
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ OnButtonUp()

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

Reimplemented from ToolBase.

Definition at line 583 of file mouse.cpp.

584  {
586  draw(bLeftButton);
587  pointSP++;
588  if (pointSP == 4)
589  pointSP = 0;
590  }
static INT pointSP
Definition: toolsmodel.h:39
ImageModel imageModel
Definition: main.cpp:32
void draw(BOOL bLeftButton)
Definition: mouse.cpp:544
void ResetToPrevious(void)
Definition: history.cpp:100

Referenced by OnCancelDraw().

◆ OnCancelDraw()

void BezierTool::OnCancelDraw ( )
inlinevirtual

Reimplemented from ToolBase.

Definition at line 592 of file mouse.cpp.

593  {
594  OnButtonUp(FALSE, 0, 0);
597  }
#define TRUE
Definition: types.h:120
#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
void OnButtonUp(BOOL bLeftButton, LONG x, LONG y)
Definition: mouse.cpp:583

◆ OnFinishDraw()

void BezierTool::OnFinishDraw ( )
inlinevirtual

Reimplemented from ToolBase.

Definition at line 599 of file mouse.cpp.

600  {
601  if (pointSP)
602  {
604  --pointSP;
606  }
608  }
static INT pointSP
Definition: toolsmodel.h:39
virtual void OnFinishDraw()
Definition: mouse.cpp:90
ImageModel imageModel
Definition: main.cpp:32
void draw(BOOL bLeftButton)
Definition: mouse.cpp:544
BOOL m_bLeftButton
Definition: mouse.cpp:538
void ResetToPrevious(void)
Definition: history.cpp:100

◆ OnMouseMove()

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

Reimplemented from ToolBase.

Definition at line 575 of file mouse.cpp.

576  {
578  pointStack[pointSP].x = x;
579  pointStack[pointSP].y = y;
580  draw(bLeftButton);
581  }
static POINT pointStack[256]
Definition: toolsmodel.h:40
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static INT pointSP
Definition: toolsmodel.h:39
ImageModel imageModel
Definition: main.cpp:32
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
void draw(BOOL bLeftButton)
Definition: mouse.cpp:544
void ResetToPrevious(void)
Definition: history.cpp:100

Member Data Documentation

◆ m_bLeftButton

BOOL BezierTool::m_bLeftButton

Definition at line 538 of file mouse.cpp.

Referenced by draw(), and OnFinishDraw().


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