#include <MDISnapper.h>
Since it only works on coordinate rects, it can be used without any actual Windows. To use it:
Definition at line 21 of file MDISnapper.h.
Public Types | |
| enum | { MAXDELTA = (1<<30) } |
Public Methods | |
| void | Init (RECT const &oldRect, RECT const &newRect, DWORD snapwidth) |
| Initialize, specifying a pre-move and post-move
rect. | |
| void | Init (RECT const &r, DWORD snapWidth, bool moveOnly=false) |
| Initialize, specifying only one rectangle. | |
| void | SnapHLine (long y) |
| snap to a horizontal line | |
| void | SnapVLine (long x) |
| snap to a vertical line | |
| RECT & | EndSnap () |
| ends snapping sequence and returns final coords
| |
Data Fields | |
| DWORD | snapWidth |
| distance over which snapping works | |
| RECT | rold |
| original rect | |
| RECT | rnew |
| post-move rect (if specified) | |
| RECT | rdelta |
| RECT | rout |
| accumulates the final rect | |
|
|
Definition at line 23 of file MDISnapper.h. |
| ||||||||||||||||
|
Initialize, specifying a pre-move and post-move rect.
Definition at line 35 of file MDISnapper.cpp. |
| ||||||||||||||||
|
Initialize, specifying only one rectangle.
Definition at line 58 of file MDISnapper.cpp. |
|
|
snap to a horizontal line
Definition at line 111 of file MDISnapper.cpp. |
|
|
snap to a vertical line
Definition at line 74 of file MDISnapper.cpp. |
|
|
ends snapping sequence and returns final coords
Definition at line 150 of file MDISnapper.cpp. |
|
|
distance over which snapping works
Definition at line 25 of file MDISnapper.h. |
|
|
original rect
Definition at line 27 of file MDISnapper.h. |
|
|
post-move rect (if specified)
Definition at line 28 of file MDISnapper.h. |
|
|
Definition at line 29 of file MDISnapper.h. |
|
|
accumulates the final rect
Definition at line 31 of file MDISnapper.h. |
1.3-rc2