PM Library classes

class PMRect

? ^ 
Object rectangle.

The PMRect class represents a rectangular area defined by start point and rectangle size. It provides mechanisms for sizes comparison.

You can construct, destruct, copy, and assign objects of this class.

Source:
pm_rectangle.h:26
Author:
Dmitry A.Steklenev
Version:
$Revision: 1.4 $

Contents

^ 
EntityTypeScopeShort Description
sys_rectangletypedef publicSystem dependent type defines a rectangle coordinates.
inclusive_typeenum public Defines inclusive-inclusive type of a system rectangle.
exclusive_typeenum public Defines inclusive-exclusive type of a system rectangle.
PMRectconstructor publicConstructs the empty rectangle object.
PMRectconstructor publicConstructs the rectangle object from coordinates.
PMRectconstructor publicConstructs the rectangle from inclusive-inclusive system rectangle.
PMRectconstructor publicConstructs the rectangle from inclusive-exclusive system rectangle.
xattribute publicThe rectangle's x-coordinate.
yattribute publicThe rectangle's y-coordinate.
cxattribute publicThe rectangle's width.
cyattribute publicThe rectangle's height.
emptymethod publicIf the width or height of this rectangle is zero, TRUE is returned.
intersectsmethod publicIf the rectangle and specified rectangle overlap, TRUE is returned.
containsmethod publicIf the rectangle contains the specified point, TRUE is returned.
shrink_bymethod public Shrinks the rectangle.
expand_bymethod public Expands the rectangle.
mapmethod public Maps a rectangle.
operator ==operator publicCompares this object to another rectangle object for equality.
operator !=operator publicCompares this object to another rectangle object for inequality.
as_sys_valuemethod publicConverts the rectangle value to inclusive-inclusive system rectangle.
as_sys_valuemethod publicConverts the rectangle value to inclusive-exclusive system rectangle.

typedef sys_rectangle

? ^  > 
System dependent type defines a rectangle coordinates.
Source:
pm_rectangle.h:29
Code:
public typedef struct _RECTL sys_rectangle

enum inclusive_type

? ^  < > 
Defines inclusive-inclusive type of a system rectangle.

Locations of window rectangles are described by sys_rectangle structures, which contain the coordinates of two points that define the opposite corners of the rectangle.

There are two types of sytem rectangles: inclusive-inclusive and inclusive-exclusive. In inclusive-exclusive rectangles, the first corner of the rectangle is included within the rectangle area, while the second corner is excluded from the rectangle area. In an inclusive-inclusive rectangle, both the corners are included in the rectangle.

Source:
pm_rectangle.h:46
Code:
public enum inclusive_type { inclusive }

enum exclusive_type

? ^  < > 
Defines inclusive-exclusive type of a system rectangle.

Locations of window rectangles are described by sys_rectangle structures, which contain the coordinates of two points that define the opposite corners of the rectangle.

There are two types of sytem rectangles: inclusive-inclusive and inclusive-exclusive. In inclusive-exclusive rectangles, the first corner of the rectangle is included within the rectangle area, while the second corner is excluded from the rectangle area. In an inclusive-inclusive rectangle, both the corners are included in the rectangle.

Source:
pm_rectangle.h:63
Code:
public enum exclusive_type { exclusive }

constructor PMRect

? ^  < > 
Constructs the empty rectangle object.
Source:
pm_rectangle.h:66
Code:
public PMRect ( )

constructor PMRect

? ^  < > 
Constructs the rectangle object from coordinates.
Source:
pm_rectangle.h:68
Code:
public PMRect ( long x ,
long y ,
long cx ,
long cy )

constructor PMRect

? ^  < > 
Constructs the rectangle from inclusive-inclusive system rectangle.
Source:
pm_rectangle.h:70
Code:
public PMRect ( const sys_rectangle & ,
const inclusive_type & )

constructor PMRect

? ^  < > 
Constructs the rectangle from inclusive-exclusive system rectangle.
Source:
pm_rectangle.h:72
Code:
public PMRect ( const sys_rectangle & ,
const exclusive_type & )

attribute x

? ^  < > 
The rectangle's x-coordinate.
Source:
pm_rectangle.h:74
Code:
public long x

attribute y

? ^  < > 
The rectangle's y-coordinate.
Source:
pm_rectangle.h:75
Code:
public long y

attribute cx

? ^  < > 
The rectangle's width.
Source:
pm_rectangle.h:76
Code:
public long cx

attribute cy

? ^  < > 
The rectangle's height.
Source:
pm_rectangle.h:77
Code:
public long cy

method empty

? ^  < > 
If the width or height of this rectangle is zero, TRUE is returned.
Source:
pm_rectangle.h:80
Code:
public BOOL empty ( ) const

method intersects

? ^  < > 
If the rectangle and specified rectangle overlap, TRUE is returned.
Source:
pm_rectangle.h:83
Code:
public BOOL intersects ( const PMRect & ) const

method contains

? ^  < > 
If the rectangle contains the specified point, TRUE is returned.
Source:
pm_rectangle.h:85
Code:
public BOOL contains ( long x ,
long y ) const

method shrink_by

? ^  < > 
Shrinks the rectangle.

Moves the corners of the rectangle inward toward the center by the specified amount

Source:
pm_rectangle.h:94
Code:
public void shrink_by ( long amount )

method expand_by

? ^  < > 
Expands the rectangle.

Moves the corners of the rectangle outward from the center by the specified amount

Source:
pm_rectangle.h:103
Code:
public void expand_by ( long amount )

method map

? ^  < > 
Maps a rectangle.

Maps a rectangle from one window's coordinate space to another's, such as mapping from screen coordinates to window coordinates.

Source:
pm_rectangle.h:112
Code:
public void map ( HWND hfrom ,
HWND hto )

operator ==

? ^  < > 
Compares this object to another rectangle object for equality.

Source:
pm_rectangle.h:115
Code:
public BOOL operator == ( const PMRect & ) const

operator !=

? ^  < > 
Compares this object to another rectangle object for inequality.
Source:
pm_rectangle.h:117
Code:
public BOOL operator != ( const PMRect & ) const

method as_sys_value

? ^  < > 
Converts the rectangle value to inclusive-inclusive system rectangle.
Source:
pm_rectangle.h:120
Code:
public sys_rectangle as_sys_value ( const inclusive_type & ) const

method as_sys_value

? ^  < > 
Converts the rectangle value to inclusive-exclusive system rectangle.
Source:
pm_rectangle.h:122
Code:
public sys_rectangle as_sys_value ( const exclusive_type & ) const

Created Fri Aug 3 09:13:16 2012.
This documentation was generated automatically by
ccdoc v08r39 2003/02/27 bin_opt_emx_os2-2.30.
Click here to submit a bug report or feature request for ccdoc.
Click here to return to the top of the page.