ReactOS 0.4.15-dev-6675-gcbc63d8
RectSelTool Struct Reference
Inheritance diagram for RectSelTool:
Collaboration diagram for RectSelTool:

Public Member Functions

 RectSelTool ()
 
void OnDrawOverlayOnImage (HDC hdc) override
 
void OnDrawOverlayOnCanvas (HDC hdc) override
 
void OnButtonDown (BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override
 
BOOL OnMouseMove (BOOL bLeftButton, LONG &x, LONG &y) override
 
BOOL OnButtonUp (BOOL bLeftButton, LONG &x, LONG &y) override
 
void OnFinishDraw () override
 
void OnCancelDraw () override
 
void OnSpecialTweak (BOOL bMinus) override
 
- Public Member Functions inherited from ToolBase
 ToolBase (TOOLTYPE tool)
 
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 OnCancelDraw ()
 
virtual void OnFinishDraw ()
 
virtual void OnDrawOverlayOnImage (HDC hdc)
 
virtual void OnDrawOverlayOnCanvas (HDC hdc)
 
virtual void OnSpecialTweak (BOOL bMinus)
 
void beginEvent ()
 
void endEvent ()
 
void reset ()
 

Public Attributes

BOOL m_bLeftButton = FALSE
 
- 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 s_pointSP = 0
 
static POINT s_pointStack [256] = { { 0 } }
 
- Protected Member Functions inherited from ToolBase
void OnDrawSelectionOnCanvas (HDC hdc)
 

Detailed Description

Definition at line 197 of file mouse.cpp.

Constructor & Destructor Documentation

◆ RectSelTool()

RectSelTool::RectSelTool ( )
inline

Definition at line 201 of file mouse.cpp.

202 {
203 }
@ TOOL_RECTSEL
Definition: toolsmodel.h:13

Member Function Documentation

◆ OnButtonDown()

void RectSelTool::OnButtonDown ( BOOL  bLeftButton,
LONG  x,
LONG  y,
BOOL  bDoubleClick 
)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 223 of file mouse.cpp.

224 {
226 if (bLeftButton)
227 {
229 }
230 m_bLeftButton = bLeftButton;
231 }
SelectionModel selectionModel
BOOL m_bLeftButton
Definition: mouse.cpp:199

◆ OnButtonUp()

BOOL RectSelTool::OnButtonUp ( BOOL  bLeftButton,
LONG x,
LONG y 
)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 245 of file mouse.cpp.

246 {
247 POINT pt = { x, y };
248 if (bLeftButton)
249 {
254 }
255 else
256 {
257 canvasWindow.ClientToScreen(&pt);
259 }
260 return TRUE;
261 }
CCanvasWindow canvasWindow
Definition: canvas.cpp:10
VOID TrackPopupMenu(POINT ptScreen, INT iSubMenu)
Definition: winproc.cpp:1093
BOOL IsRectEmpty() const
Definition: atltypes.h:351
void NotifyImageChanged()
Definition: history.cpp:15
void Clamp(POINT &pt) const
Definition: history.cpp:256
void SetRectFromPoints(const POINT &ptFrom, const POINT &ptTo)
#define TRUE
Definition: types.h:120
#define pt(x, y)
Definition: drawing.c:79
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
ImageModel imageModel
Definition: history.cpp:11
CMainWindow mainWindow
Definition: main.cpp:22
POINT g_ptStart
Definition: main.cpp:13

◆ OnCancelDraw()

void RectSelTool::OnCancelDraw ( )
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 269 of file mouse.cpp.

270 {
273 }
virtual void OnCancelDraw()
Definition: mouse.cpp:65

◆ OnDrawOverlayOnCanvas()

void RectSelTool::OnDrawOverlayOnCanvas ( HDC  hdc)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 218 of file mouse.cpp.

219 {
221 }
HDC hdc
Definition: main.c:9
void OnDrawSelectionOnCanvas(HDC hdc)
Definition: mouse.cpp:89

◆ OnDrawOverlayOnImage()

void RectSelTool::OnDrawOverlayOnImage ( HDC  hdc)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 205 of file mouse.cpp.

206 {
209
211 {
213 if (!::IsRectEmpty(&rc))
214 RectSel(hdc, rc.left, rc.top, rc.right, rc.bottom);
215 }
216 }
BOOL m_drawing
Definition: canvas.h:41
COLORREF GetBgColor() const
BOOL IsLanded() const
void DrawSelection(HDC hDCImage, COLORREF crBg=0, BOOL bBgTransparent=FALSE)
BOOL IsBackgroundTransparent() const
Definition: toolsmodel.cpp:136
void RectSel(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2)
Definition: drawing.cpp:241
ToolsModel toolsModel
Definition: toolsmodel.cpp:10
PaletteModel paletteModel
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)

◆ OnFinishDraw()

void RectSelTool::OnFinishDraw ( )
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 263 of file mouse.cpp.

264 {
267 }
virtual void OnFinishDraw()
Definition: mouse.cpp:71

◆ OnMouseMove()

BOOL RectSelTool::OnMouseMove ( BOOL  bLeftButton,
LONG x,
LONG y 
)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 233 of file mouse.cpp.

234 {
235 if (bLeftButton)
236 {
237 POINT pt = { x, y };
241 }
242 return TRUE;
243 }

◆ OnSpecialTweak()

void RectSelTool::OnSpecialTweak ( BOOL  bMinus)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 275 of file mouse.cpp.

276 {
278 }
void StretchSelection(BOOL bShrink)

Member Data Documentation

◆ m_bLeftButton

BOOL RectSelTool::m_bLeftButton = FALSE

Definition at line 199 of file mouse.cpp.

Referenced by OnButtonDown().


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