LibreOffice Module embedserv (master) 1
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
winwrap::Tracker Class Reference

#include <syswinwrapper.hxx>

Public Types

enum  StyleFlags {
  solidLine = 1 ,
  dottedLine = 2 ,
  hatchedBorder = 4 ,
  resizeInside = 8 ,
  resizeOutside = 16 ,
  hatchInside = 32
}
 
enum  TrackerHit {
  hitNothing = -1 ,
  hitTopLeft = 0 ,
  hitTopRight = 1 ,
  hitBottomRight = 2 ,
  hitBottomLeft = 3 ,
  hitTop = 4 ,
  hitRight = 5 ,
  hitBottom = 6 ,
  hitLeft = 7 ,
  hitMiddle = 8
}
 

Public Member Functions

 Tracker ()
 
 Tracker (LPCRECT lpSrcRect, UINT nStyle)
 
void Draw (HDC hDC) const
 
void GetTrueRect (LPRECT lpTrueRect) const
 
BOOL SetCursor (HWND hWnd, UINT nHitTest) const
 
BOOL Track (HWND hWnd, POINT point, BOOL bAllowInvert=FALSE, HWND hWndClipTo=nullptr)
 
int HitTest (POINT point) const
 
int NormalizeHit (int nHandle) const
 
virtual void DrawTrackerRect (LPRECT lpRect, HWND hWndClipTo, HDC hDC, HWND hWnd)
 
virtual void AdjustRect (int nHandle, LPRECT lpRect)
 
virtual void OnChangedRect (const RECT &rectOld)
 
virtual UINT GetHandleMask () const
 
virtual ~Tracker ()
 

Public Attributes

UINT m_nStyle
 
RECT m_rect
 
SIZE m_sizeMin
 
int m_nHandleSize
 

Protected Member Functions

int HitTestHandles (POINT point) const
 
void GetHandleRect (int nHandle, RECT *pHandleRect) const
 
void GetModifyPointers (int nHandle, int **ppx, int **ppy, int *px, int *py)
 
virtual int GetHandleSize (LPRECT lpRect=nullptr) const
 
BOOL TrackHandle (int nHandle, HWND hWnd, POINT point, HWND hWndClipTo)
 
void Construct ()
 

Protected Attributes

BOOL m_bAllowInvert
 
RECT m_rectLast
 
SIZE m_sizeLast
 
BOOL m_bErase
 
BOOL m_bFinalErase
 

Detailed Description

Definition at line 65 of file syswinwrapper.hxx.

Member Enumeration Documentation

◆ StyleFlags

Enumerator
solidLine 
dottedLine 
hatchedBorder 
resizeInside 
resizeOutside 
hatchInside 

Definition at line 72 of file syswinwrapper.hxx.

◆ TrackerHit

Enumerator
hitNothing 
hitTopLeft 
hitTopRight 
hitBottomRight 
hitBottomLeft 
hitTop 
hitRight 
hitBottom 
hitLeft 
hitMiddle 

Definition at line 79 of file syswinwrapper.hxx.

Constructor & Destructor Documentation

◆ Tracker() [1/2]

Tracker::Tracker ( )

Definition at line 221 of file tracker.cxx.

◆ Tracker() [2/2]

Tracker::Tracker ( LPCRECT  lpSrcRect,
UINT  nStyle 
)

Definition at line 226 of file tracker.cxx.

References Construct(), m_nStyle, and m_rect.

◆ ~Tracker()

Tracker::~Tracker ( )
virtual

Definition at line 290 of file tracker.cxx.

Member Function Documentation

◆ AdjustRect()

void Tracker::AdjustRect ( int  nHandle,
LPRECT  lpRect 
)
virtual

Definition at line 504 of file tracker.cxx.

References abs(), afxRectInfo, GetModifyPointers(), hitMiddle, m_bAllowInvert, m_rect, m_sizeMin, nHandle, and px.

Referenced by TrackHandle().

◆ Construct()

void Tracker::Construct ( )
protected

◆ Draw()

void Tracker::Draw ( HDC  hDC) const

◆ DrawTrackerRect()

void Tracker::DrawTrackerRect ( LPRECT  lpRect,
HWND  hWndClipTo,
HDC  hDC,
HWND  hWnd 
)
virtual

◆ GetHandleMask()

UINT Tracker::GetHandleMask ( ) const
virtual

Definition at line 724 of file tracker.cxx.

References abs(), m_nHandleSize, m_rect, and size.

Referenced by Draw(), and HitTestHandles().

◆ GetHandleRect()

void Tracker::GetHandleRect ( int  nHandle,
RECT *  pHandleRect 
) const
protected

◆ GetHandleSize()

int Tracker::GetHandleSize ( LPRECT  lpRect = nullptr) const
protectedvirtual

Definition at line 707 of file tracker.cxx.

References abs(), m_nHandleSize, m_nStyle, m_rect, resizeOutside, and size.

Referenced by DrawTrackerRect(), GetHandleRect(), and GetTrueRect().

◆ GetModifyPointers()

void Tracker::GetModifyPointers ( int  nHandle,
int **  ppx,
int **  ppy,
int px,
int py 
)
protected

Definition at line 801 of file tracker.cxx.

References afxHandleInfo, hitMiddle, hitTopLeft, m_rect, nHandle, and px.

Referenced by AdjustRect(), and TrackHandle().

◆ GetTrueRect()

void Tracker::GetTrueRect ( LPRECT  lpTrueRect) const

◆ HitTest()

int Tracker::HitTest ( POINT  point) const

◆ HitTestHandles()

int Tracker::HitTestHandles ( POINT  point) const
protected

◆ NormalizeHit()

int Tracker::NormalizeHit ( int  nHandle) const

Definition at line 750 of file tracker.cxx.

References afxHandleInfo, hitMiddle, hitNothing, m_rect, and nHandle.

Referenced by GetHandleRect(), and SetCursor().

◆ OnChangedRect()

void Tracker::OnChangedRect ( const RECT &  rectOld)
virtual

Definition at line 499 of file tracker.cxx.

Referenced by TrackHandle().

◆ SetCursor()

BOOL Tracker::SetCursor ( HWND  hWnd,
UINT  nHitTest 
) const

◆ Track()

BOOL Tracker::Track ( HWND  hWnd,
POINT  point,
BOOL  bAllowInvert = FALSE,
HWND  hWndClipTo = nullptr 
)

Definition at line 346 of file tracker.cxx.

References FALSE, HitTestHandles(), m_bAllowInvert, nHandle, point(), SetCursor(), and TrackHandle().

Referenced by winwrap::HatchWndProc().

◆ TrackHandle()

BOOL Tracker::TrackHandle ( int  nHandle,
HWND  hWnd,
POINT  point,
HWND  hWndClipTo 
)
protected

Member Data Documentation

◆ m_bAllowInvert

BOOL winwrap::Tracker::m_bAllowInvert
protected

Definition at line 117 of file syswinwrapper.hxx.

Referenced by AdjustRect(), and Track().

◆ m_bErase

BOOL winwrap::Tracker::m_bErase
protected

Definition at line 120 of file syswinwrapper.hxx.

Referenced by Construct(), DrawTrackerRect(), and TrackHandle().

◆ m_bFinalErase

BOOL winwrap::Tracker::m_bFinalErase
protected

Definition at line 121 of file syswinwrapper.hxx.

Referenced by Construct(), DrawTrackerRect(), and TrackHandle().

◆ m_nHandleSize

int winwrap::Tracker::m_nHandleSize

Definition at line 92 of file syswinwrapper.hxx.

Referenced by Construct(), GetHandleMask(), and GetHandleSize().

◆ m_nStyle

UINT winwrap::Tracker::m_nStyle

◆ m_rect

RECT winwrap::Tracker::m_rect

◆ m_rectLast

RECT winwrap::Tracker::m_rectLast
protected

Definition at line 118 of file syswinwrapper.hxx.

Referenced by Construct(), and DrawTrackerRect().

◆ m_sizeLast

SIZE winwrap::Tracker::m_sizeLast
protected

Definition at line 119 of file syswinwrapper.hxx.

Referenced by Construct(), and DrawTrackerRect().

◆ m_sizeMin

SIZE winwrap::Tracker::m_sizeMin

Definition at line 91 of file syswinwrapper.hxx.

Referenced by AdjustRect(), and Construct().


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