ReactOS 0.4.16-dev-401-g45b008d
ToolBase Struct Reference

#include <toolsmodel.h>

Inheritance diagram for ToolBase:

Public Member Functions

 ToolBase ()
 
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 OnDrawOverlayOnImage (HDC hdc)
 
virtual void OnDrawOverlayOnCanvas (HDC hdc)
 
virtual void OnSpecialTweak (BOOL bMinus)
 
virtual void OnEndDraw (BOOL bCancel)
 
void beginEvent ()
 
void endEvent ()
 
void reset ()
 

Static Public Member Functions

static ToolBasecreateToolObject (TOOLTYPE type)
 

Public Attributes

HDC m_hdc
 
COLORREF m_fg
 
COLORREF m_bg
 

Detailed Description

Definition at line 41 of file toolsmodel.h.

Constructor & Destructor Documentation

◆ ToolBase()

ToolBase::ToolBase ( )
inline

Definition at line 46 of file toolsmodel.h.

46: m_hdc(NULL) { }
#define NULL
Definition: types.h:112
HDC m_hdc
Definition: toolsmodel.h:43

◆ ~ToolBase()

virtual ToolBase::~ToolBase ( )
inlinevirtual

Definition at line 47 of file toolsmodel.h.

47{ }

Member Function Documentation

◆ beginEvent()

void ToolBase::beginEvent ( )

Definition at line 131 of file mouse.cpp.

132{
136}
HDC GetDC()
Definition: history.cpp:271
COLORREF GetBgColor() const
COLORREF GetFgColor() const
ImageModel imageModel
Definition: history.cpp:11
PaletteModel paletteModel
COLORREF m_fg
Definition: toolsmodel.h:44
COLORREF m_bg
Definition: toolsmodel.h:44

Referenced by ToolsModel::OnButtonDown(), ToolsModel::OnButtonUp(), ToolsModel::OnEndDraw(), and ToolsModel::OnMouseMove().

◆ createToolObject()

ToolBase * ToolBase::createToolObject ( TOOLTYPE  type)
static

Definition at line 1127 of file mouse.cpp.

1128{
1129 switch (type)
1130 {
1131 case TOOL_FREESEL: return new FreeSelTool();
1132 case TOOL_RECTSEL: return new RectSelTool();
1133 case TOOL_RUBBER: return new RubberTool();
1134 case TOOL_FILL: return new FillTool();
1135 case TOOL_COLOR: return new ColorTool();
1136 case TOOL_ZOOM: return new ZoomTool();
1137 case TOOL_PEN: return new PenTool();
1138 case TOOL_BRUSH: return new BrushTool();
1139 case TOOL_AIRBRUSH: return new AirBrushTool();
1140 case TOOL_TEXT: return new TextTool();
1141 case TOOL_LINE: return new LineTool();
1142 case TOOL_BEZIER: return new BezierTool();
1143 case TOOL_RECT: return new RectTool();
1144 case TOOL_SHAPE: return new ShapeTool();
1145 case TOOL_ELLIPSE: return new EllipseTool();
1146 case TOOL_RRECT: return new RRectTool();
1147 }
1149 return NULL;
1150}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define UNREACHABLE
@ TOOL_AIRBRUSH
Definition: toolsmodel.h:20
@ TOOL_COLOR
Definition: toolsmodel.h:16
@ TOOL_SHAPE
Definition: toolsmodel.h:25
@ TOOL_RUBBER
Definition: toolsmodel.h:14
@ TOOL_BRUSH
Definition: toolsmodel.h:19
@ TOOL_RECT
Definition: toolsmodel.h:24
@ TOOL_BEZIER
Definition: toolsmodel.h:23
@ TOOL_FILL
Definition: toolsmodel.h:15
@ TOOL_TEXT
Definition: toolsmodel.h:21
@ TOOL_PEN
Definition: toolsmodel.h:18
@ TOOL_LINE
Definition: toolsmodel.h:22
@ TOOL_FREESEL
Definition: toolsmodel.h:12
@ TOOL_ZOOM
Definition: toolsmodel.h:17
@ TOOL_ELLIPSE
Definition: toolsmodel.h:26
@ TOOL_RRECT
Definition: toolsmodel.h:27
@ TOOL_RECTSEL
Definition: toolsmodel.h:13

Referenced by ToolsModel::GetOrCreateTool().

◆ endEvent()

void ToolBase::endEvent ( )

◆ OnButtonDown()

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

◆ OnButtonUp()

virtual BOOL ToolBase::OnButtonUp ( BOOL  bLeftButton,
LONG x,
LONG y 
)
inlinevirtual

Reimplemented in TwoPointDrawTool, SmoothDrawTool, SelectionBaseTool, ColorTool, ZoomTool, TextTool, BezierTool, and ShapeTool.

Definition at line 51 of file toolsmodel.h.

51{ return TRUE; }
#define TRUE
Definition: types.h:120

Referenced by ToolsModel::OnButtonUp().

◆ OnDrawOverlayOnCanvas()

virtual void ToolBase::OnDrawOverlayOnCanvas ( HDC  hdc)
inlinevirtual

Reimplemented in SelectionBaseTool, and ZoomTool.

Definition at line 54 of file toolsmodel.h.

54{ }

Referenced by ToolsModel::OnDrawOverlayOnCanvas().

◆ OnDrawOverlayOnImage()

virtual void ToolBase::OnDrawOverlayOnImage ( HDC  hdc)
inlinevirtual

◆ OnEndDraw()

◆ OnMouseMove()

virtual BOOL ToolBase::OnMouseMove ( BOOL  bLeftButton,
LONG x,
LONG y 
)
inlinevirtual

Reimplemented in TwoPointDrawTool, SmoothDrawTool, SelectionBaseTool, ColorTool, TextTool, BezierTool, and ShapeTool.

Definition at line 50 of file toolsmodel.h.

50{ return TRUE; }

Referenced by ToolsModel::OnMouseMove().

◆ OnSpecialTweak()

virtual void ToolBase::OnSpecialTweak ( BOOL  bMinus)
inlinevirtual

Reimplemented in TwoPointDrawTool, SelectionBaseTool, RubberTool, PenTool, BrushTool, AirBrushTool, BezierTool, and ShapeTool.

Definition at line 56 of file toolsmodel.h.

56{ }

Referenced by ToolsModel::SpecialTweak().

◆ reset()

void ToolBase::reset ( )

Definition at line 106 of file mouse.cpp.

107{
109 {
110 s_dynamicPoints.Free();
113 }
114
115 s_cPoints = 0;
116 g_ptEnd = g_ptStart = { -1, -1 };
117
119 {
122 }
123}
static POINT g_ptEnd
Definition: mouse.cpp:17
static SIZE_T s_maxPoints
Definition: mouse.cpp:15
static LPPOINT s_pPoints
Definition: mouse.cpp:16
static POINT s_staticPoints[512]
Definition: mouse.cpp:14
static CHeapPtr< POINT, CLocalAllocator > s_dynamicPoints
Definition: mouse.cpp:13
static POINT g_ptStart
Definition: mouse.cpp:17
static SIZE_T s_cPoints
Definition: mouse.cpp:12
SelectionModel selectionModel
#define _countof(array)
Definition: sndvol32.h:70

Referenced by OnEndDraw(), and ToolsModel::resetTool().

Member Data Documentation

◆ m_bg

◆ m_fg

◆ m_hdc


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