Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
HandScrollTool Class Reference

Scroll tool. More...

#include <HandScrollTool.h>

Inherits Tool.

Public Member Functions

 HandScrollTool (void)
 Constructor.
 
 ~HandScrollTool (void)
 Destructor.
 
virtual void mouseDown (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc)
 Start scrolling.
 
virtual void mouseMoved (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc)
 Scroll.
 
virtual void mouseUp (TTrackingMode m, CPoint viewPt, WbView *pView, CWorldBuilderDoc *pDoc)
 End scroll.
 
virtual void activate ()
 Become the current tool.
 
virtual Bool followsTerrain (void)
 Become not the current tool.
 
- Public Member Functions inherited from Tool
 Tool (Int toolID, Int cursorID)
 Tool class.
 
virtual ~Tool (void)
 Destructor.
 
Int getToolID (void)
 
virtual void setCursor (void)
 
virtual void deactivate ()
 
virtual WorldHeightMapEditgetHeightMap (void)
 

Protected Types

enum  { HYSTERESIS = 3 }
 

Protected Attributes

CPoint m_prevPt2d
 
CPoint m_downPt2d
 
Bool m_scrolling
 
UINT m_mouseDownTime
 
- Protected Attributes inherited from Tool
Int m_toolID
 
Int m_cursorID
 
HCURSOR m_cursor
 
Int m_prevXIndex
 
Int m_prevYIndex
 

Additional Inherited Members

- Static Public Member Functions inherited from Tool
static Real calcRoundBlendFactor (CPoint center, Int x, Int y, Int brushWidth, Int featherWidth)
 Calculate the round blend factor.
 
static Real calcSquareBlendFactor (CPoint center, Int x, Int y, Int brushWidth, Int featherWidth)
 Calculate the square blend factor.
 
static void getCenterIndex (Coord3D *docLocP, Int brushWidth, CPoint *center, CWorldBuilderDoc *pDoc)
 Gets the cell index for the center of the brush.
 
static void getAllIndexesIn (const Coord3D *bl, const Coord3D *br, const Coord3D *tl, const Coord3D *tr, Int widthOutside, CWorldBuilderDoc *pDoc, VecHeightMapIndexes *allIndices)
 

Detailed Description

Scroll tool.

Definition at line 33 of file HandScrollTool.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
HYSTERESIS 

Definition at line 40 of file HandScrollTool.h.

Constructor & Destructor Documentation

◆ HandScrollTool()

HandScrollTool::HandScrollTool ( void )

Constructor.

Definition at line 41 of file HandScrollTool.cpp.

◆ ~HandScrollTool()

HandScrollTool::~HandScrollTool ( void )

Destructor.

Definition at line 53 of file HandScrollTool.cpp.

Member Function Documentation

◆ activate()

void HandScrollTool::activate ( )
virtual

Become the current tool.

Shows the terrain materials options panel.

Reimplemented from Tool.

Definition at line 47 of file HandScrollTool.cpp.

◆ followsTerrain()

virtual Bool HandScrollTool::followsTerrain ( void )
inlinevirtual

Become not the current tool.

Reimplemented from Tool.

Definition at line 54 of file HandScrollTool.h.

◆ mouseDown()

void HandScrollTool::mouseDown ( TTrackingMode m,
CPoint viewPt,
WbView * pView,
CWorldBuilderDoc * pDoc )
virtual

Start scrolling.

Reimplemented from Tool.

Definition at line 57 of file HandScrollTool.cpp.

◆ mouseMoved()

void HandScrollTool::mouseMoved ( TTrackingMode m,
CPoint viewPt,
WbView * pView,
CWorldBuilderDoc * pDoc )
virtual

Scroll.

Left button move code.

Reimplemented from Tool.

Definition at line 70 of file HandScrollTool.cpp.

◆ mouseUp()

void HandScrollTool::mouseUp ( TTrackingMode m,
CPoint viewPt,
WbView * pView,
CWorldBuilderDoc * pDoc )
virtual

End scroll.

Reimplemented from Tool.

Definition at line 120 of file HandScrollTool.cpp.

Member Data Documentation

◆ m_downPt2d

CPoint HandScrollTool::m_downPt2d
protected

Definition at line 42 of file HandScrollTool.h.

◆ m_mouseDownTime

UINT HandScrollTool::m_mouseDownTime
protected

Definition at line 44 of file HandScrollTool.h.

◆ m_prevPt2d

CPoint HandScrollTool::m_prevPt2d
protected

Definition at line 41 of file HandScrollTool.h.

◆ m_scrolling

Bool HandScrollTool::m_scrolling
protected

Definition at line 43 of file HandScrollTool.h.


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