ReactOS 0.4.15-dev-5884-gab5aff5
ToolBase Struct Reference

#include <toolsmodel.h>

Inheritance diagram for ToolBase:
Collaboration diagram for ToolBase:

Public Member Functions

 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 ()
 

Static Public Member Functions

static ToolBasecreateToolObject (TOOLTYPE type)
 

Public Attributes

TOOLTYPE m_tool
 
HDC m_hdc
 
COLORREF m_fg
 
COLORREF m_bg
 

Static Public Attributes

static INT pointSP = 0
 
static POINT pointStack [256] = { { 0 } }
 

Detailed Description

Definition at line 34 of file toolsmodel.h.

Constructor & Destructor Documentation

◆ ToolBase()

ToolBase::ToolBase ( TOOLTYPE  tool)
inline

Definition at line 42 of file toolsmodel.h.

42 : m_tool(tool), m_hdc(NULL)
43 {
44 }
#define NULL
Definition: types.h:112
HDC m_hdc
Definition: toolsmodel.h:37
TOOLTYPE m_tool
Definition: toolsmodel.h:36

◆ ~ToolBase()

virtual ToolBase::~ToolBase ( )
inlinevirtual

Definition at line 46 of file toolsmodel.h.

47 {
48 }

Member Function Documentation

◆ beginEvent()

void ToolBase::beginEvent ( )

Definition at line 99 of file mouse.cpp.

100{
104}
HDC GetDC()
Definition: history.cpp:239
COLORREF GetBgColor() const
COLORREF GetFgColor() const
ImageModel imageModel
Definition: main.cpp:24
PaletteModel paletteModel
Definition: main.cpp:20
COLORREF m_fg
Definition: toolsmodel.h:38
COLORREF m_bg
Definition: toolsmodel.h:38

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

◆ createToolObject()

ToolBase * ToolBase::createToolObject ( TOOLTYPE  type)
static

Definition at line 763 of file mouse.cpp.

764{
765 switch (type)
766 {
767 case TOOL_FREESEL: return new FreeSelTool();
768 case TOOL_RECTSEL: return new RectSelTool();
769 case TOOL_RUBBER: return new RubberTool();
770 case TOOL_FILL: return new FillTool();
771 case TOOL_COLOR: return new ColorTool();
772 case TOOL_ZOOM: return new ZoomTool();
773 case TOOL_PEN: return new PenTool();
774 case TOOL_BRUSH: return new BrushTool();
775 case TOOL_AIRBRUSH: return new AirBrushTool();
776 case TOOL_TEXT: return new TextTool();
777 case TOOL_LINE: return new LineTool();
778 case TOOL_BEZIER: return new BezierTool();
779 case TOOL_RECT: return new RectTool();
780 case TOOL_SHAPE: return new ShapeTool();
781 case TOOL_ELLIPSE: return new EllipseTool();
782 case TOOL_RRECT: return new RRectTool();
783 }
785 return NULL;
786}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define UNREACHABLE
@ TOOL_AIRBRUSH
Definition: toolsmodel.h:21
@ TOOL_COLOR
Definition: toolsmodel.h:17
@ TOOL_SHAPE
Definition: toolsmodel.h:26
@ TOOL_RUBBER
Definition: toolsmodel.h:15
@ TOOL_BRUSH
Definition: toolsmodel.h:20
@ TOOL_RECT
Definition: toolsmodel.h:25
@ TOOL_BEZIER
Definition: toolsmodel.h:24
@ TOOL_FILL
Definition: toolsmodel.h:16
@ TOOL_TEXT
Definition: toolsmodel.h:22
@ TOOL_PEN
Definition: toolsmodel.h:19
@ TOOL_LINE
Definition: toolsmodel.h:23
@ TOOL_FREESEL
Definition: toolsmodel.h:13
@ TOOL_ZOOM
Definition: toolsmodel.h:18
@ TOOL_ELLIPSE
Definition: toolsmodel.h:27
@ TOOL_RRECT
Definition: toolsmodel.h:28
@ TOOL_RECTSEL
Definition: toolsmodel.h:14

Referenced by ToolsModel::GetOrCreateTool().

◆ endEvent()

void ToolBase::endEvent ( )

◆ OnButtonDown()

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

Reimplemented in FreeSelTool, RectSelTool, GenericDrawTool, FillTool, ZoomTool, TextTool, BezierTool, and ShapeTool.

Definition at line 50 of file toolsmodel.h.

51 {
52 }

Referenced by ToolsModel::OnButtonDown().

◆ OnButtonUp()

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

Reimplemented in FreeSelTool, RectSelTool, GenericDrawTool, ColorTool, TextTool, BezierTool, and ShapeTool.

Definition at line 58 of file toolsmodel.h.

59 {
60 }

Referenced by ToolsModel::OnButtonUp().

◆ OnCancelDraw()

◆ OnFinishDraw()

◆ OnMouseMove()

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

Reimplemented in FreeSelTool, RectSelTool, GenericDrawTool, ColorTool, TextTool, BezierTool, and ShapeTool.

Definition at line 54 of file toolsmodel.h.

55 {
56 }

Referenced by ToolsModel::OnMouseMove().

◆ reset()

void ToolBase::reset ( )

Definition at line 80 of file mouse.cpp.

81{
82 pointSP = 0;
83 start.x = start.y = last.x = last.y = -1;
85 if (selectionWindow.IsWindow())
86 selectionWindow.ShowWindow(SW_HIDE);
87}
GLuint start
Definition: gl.h:1545
CSelectionWindow selectionWindow
Definition: main.cpp:54
SelectionModel selectionModel
Definition: main.cpp:18
POINT last
Definition: font.c:46
static INT pointSP
Definition: toolsmodel.h:39
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define SW_HIDE
Definition: winuser.h:762

Referenced by OnCancelDraw(), OnFinishDraw(), and ToolsModel::resetTool().

Member Data Documentation

◆ m_bg

◆ m_fg

◆ m_hdc

◆ m_tool

TOOLTYPE ToolBase::m_tool

Definition at line 36 of file toolsmodel.h.

◆ pointSP

◆ pointStack


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