ADTF Display Toolbox
Loading...
Searching...
No Matches
cRect

Rectangle class. More...

#include <rect.h>

Inheritance diagram for cRect:
[legend]

Public Member Functions

 cRect ()
 default constructor
 
 cRect (const IRect *pRect)
 constructor from IRect
 
 cRect (tInt l, tInt t, tInt r, tInt b)
 constructor with parameter
 
tVoid Release ()
 
tVoid Set (tInt l, tInt t, tInt r, tInt b)
 sets the rect
 
tInt GetWidth () const
 returns the width of the rectangle
 
tInt GetHeight () const
 returns the height of the rectangle
 
const cPoint * GetTopLeft () const
 returns the top left point of the rectangle
 
const cPoint * GetBottomRight () const
 returns the bottom right point of the rectangle
 
tInt GetLeft () const
 
tVoid SetLeft (tInt nLeft)
 
tInt GetTop () const
 
tVoid SetTop (tInt nTop)
 
tInt GetRight () const
 
tVoid SetRight (tInt nRight)
 
tInt GetBottom () const
 
tVoid SetBottom (tInt nBottom)
 
 operator IRect * ()
 instance of IRect
 
- Public Member Functions inherited from IRect
virtual ~IRect ()
 virtual destructor to ensure proper cleanup.
 

Public Attributes

tInt m_nLeft
 left border of the rect
 
tInt m_nTop
 top border of the rect
 
tInt m_nRight
 right border of the rect
 
tInt m_nBottom
 bottom border of the rect
 

Detailed Description

Rectangle class.

Definition at line 29 of file rect.h.

Constructor & Destructor Documentation

◆ cRect() [1/3]

cRect ( )
inline

default constructor

Definition at line 47 of file rect.h.

◆ cRect() [2/3]

cRect ( const IRect * pRect)
inline

constructor from IRect

Parameters
[in]pRectRectangle

Definition at line 63 of file rect.h.

◆ cRect() [3/3]

cRect ( tInt l,
tInt t,
tInt r,
tInt b )
inline

constructor with parameter

Parameters
[in]lleft border
[in]ttop border
[in]rright border
[in]bbottom border

Definition at line 76 of file rect.h.

Member Function Documentation

◆ GetBottom()

tInt GetBottom ( ) const
inlinevirtual

gets the bottom border of the rectangle

Returns
tInt value of the bottom border

Implements IRect.

Definition at line 227 of file rect.h.

◆ GetBottomRight()

const cPoint * GetBottomRight ( ) const
inlinevirtual

returns the bottom right point of the rectangle

Returns
bottom right point

Implements IRect.

Definition at line 151 of file rect.h.

◆ GetHeight()

tInt GetHeight ( ) const
inlinevirtual

returns the height of the rectangle

Returns
height

Implements IRect.

Definition at line 131 of file rect.h.

◆ GetLeft()

tInt GetLeft ( ) const
inlinevirtual

Gets the left border of the rectangle

Returns
tInt value of the left border

Implements IRect.

Definition at line 161 of file rect.h.

◆ GetRight()

tInt GetRight ( ) const
inlinevirtual

Gets the right border of the rectangle

Returns
tInt value of the right border

Implements IRect.

Definition at line 205 of file rect.h.

◆ GetTop()

tInt GetTop ( ) const
inlinevirtual

Gets the top border of the rectangle

Returns
tInt value of the top border

Implements IRect.

Definition at line 183 of file rect.h.

◆ GetTopLeft()

const cPoint * GetTopLeft ( ) const
inlinevirtual

returns the top left point of the rectangle

Returns
top left point

Implements IRect.

Definition at line 141 of file rect.h.

◆ GetWidth()

tInt GetWidth ( ) const
inlinevirtual

returns the width of the rectangle

Returns
width

Implements IRect.

Definition at line 121 of file rect.h.

◆ operator IRect *()

operator IRect * ( )
inlineexplicit

instance of IRect

Returns
object

Definition at line 249 of file rect.h.

◆ Release()

tVoid Release ( )
inlinevirtual

Releases this rectangle

Returns
void

Implements IRect.

Definition at line 91 of file rect.h.

◆ Set()

tVoid Set ( tInt l,
tInt t,
tInt r,
tInt b )
inline

sets the rect

Parameters
[in]lleft border
[in]ttop border
[in]rright border
[in]bbottom border
Returns
void

Definition at line 105 of file rect.h.

◆ SetBottom()

tVoid SetBottom ( tInt nBottom)
inlinevirtual

Sets the bottom border of the rectangle with the given value

Parameters
nBottom[in] bottom border value
Returns
void

Implements IRect.

Definition at line 238 of file rect.h.

◆ SetLeft()

tVoid SetLeft ( tInt nLeft)
inlinevirtual

Sets the left border of the rectangle with the given value

Parameters
nLeft[in] left border value
Returns
void

Implements IRect.

Definition at line 172 of file rect.h.

◆ SetRight()

tVoid SetRight ( tInt nRight)
inlinevirtual

Sets the right border of the rectangle with the given value

Parameters
nRight[in] right border value
Returns
void

Implements IRect.

Definition at line 216 of file rect.h.

◆ SetTop()

tVoid SetTop ( tInt nTop)
inlinevirtual

Sets the top border of the rectangle with the given value

Parameters
nTop[in] top border value
Returns
void

Implements IRect.

Definition at line 194 of file rect.h.

Member Data Documentation

◆ m_nBottom

tInt m_nBottom

bottom border of the rect

Definition at line 41 of file rect.h.

◆ m_nLeft

tInt m_nLeft

left border of the rect

Definition at line 38 of file rect.h.

◆ m_nRight

tInt m_nRight

right border of the rect

Definition at line 40 of file rect.h.

◆ m_nTop

tInt m_nTop

top border of the rect

Definition at line 39 of file rect.h.