Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

SNAPINFO Struct Reference

#include <MDISnapper.h>


Detailed Description

holds the data for calculating a modified window rect.

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


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
MAXDELTA 

Definition at line 23 of file MDISnapper.h.


Member Function Documentation

void SNAPINFO::Init RECT const &    oldRect,
RECT const &    newRect,
DWORD    snapwidth
 

Initialize, specifying a pre-move and post-move rect.

Definition at line 35 of file MDISnapper.cpp.

void SNAPINFO::Init RECT const &    r,
DWORD    snapWidth,
bool    moveOnly = false
 

Initialize, specifying only one rectangle.

Definition at line 58 of file MDISnapper.cpp.

void SNAPINFO::SnapHLine long    y
 

snap to a horizontal line

Definition at line 111 of file MDISnapper.cpp.

void SNAPINFO::SnapVLine long    x
 

snap to a vertical line

Definition at line 74 of file MDISnapper.cpp.

RECT & SNAPINFO::EndSnap  
 

ends snapping sequence and returns final coords

Definition at line 150 of file MDISnapper.cpp.


Field Documentation

DWORD SNAPINFO::snapWidth
 

distance over which snapping works

Definition at line 25 of file MDISnapper.h.

RECT SNAPINFO::rold
 

original rect

Definition at line 27 of file MDISnapper.h.

RECT SNAPINFO::rnew
 

post-move rect (if specified)

Definition at line 28 of file MDISnapper.h.

RECT SNAPINFO::rdelta
 

Definition at line 29 of file MDISnapper.h.

RECT SNAPINFO::rout
 

accumulates the final rect

Definition at line 31 of file MDISnapper.h.


The documentation for this struct was generated from the following files:
Generated on Sat Jan 18 21:22:17 2003 for ***PROJECTNAME*** by doxygen1.3-rc2