Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CGuide Class Reference

#include <edge.h>

List of all members.

Public Member Functions

int Attatchment ()
int NumAttatchments ()
void Adjust (int adjust)
BOOL IsEqual (CGuide *guide)
void Attatch (CEdge *Control)
void DeAttatch (CEdge *Control)
 CGuide ()
 CGuide (int Position, int Axis, BOOL Flexible)
virtual ~CGuide ()
 PROPERTY (int, Axis)
 PROPERTY (int, Position)
 PROPERTY (BOOL, Flexible)
CEdgeGetEdge (int i)
BOOL IsHorizontal ()
BOOL IsVertical ()

Protected Attributes

int m_Axis
int m_Position
BOOL m_Flexible

Private Attributes

CEdgeListm_Attatched


Constructor & Destructor Documentation

CGuide::CGuide  ) 
 

Definition at line 128 of file edge.cpp.

References FALSE, m_Attatched, and NULL.

00129 : m_Axis(0), m_Position(0), m_Flexible(FALSE) 00130 { 00131 m_Attatched=NULL; 00132 }

CGuide::CGuide int  Position,
int  Axis,
BOOL  Flexible
 

Definition at line 140 of file edge.cpp.

References m_Attatched, and NULL.

00141 { 00142 m_Attatched=NULL; 00143 SetPosition(Position); 00144 SetAxis(Axis); 00145 SetFlexible(Flexible); 00146 }

CGuide::~CGuide  )  [virtual]
 

Definition at line 134 of file edge.cpp.

References m_Attatched.

00135 { 00136 if(m_Attatched) 00137 delete m_Attatched; 00138 }


Member Function Documentation

void CGuide::Adjust int  adjust  ) 
 

Definition at line 163 of file edge.cpp.

References Adjust().

Referenced by Adjust(), and CResizeControlGeneric::Resize().

00164 { 00165 SetPosition( GetPosition() + adjust ); 00166 }

void CGuide::Attatch CEdge Control  ) 
 

Definition at line 151 of file edge.cpp.

References CDPA::Append(), Attatch(), m_Attatched, and NULL.

Referenced by Attatch(), and CEdge::SetGuide().

00152 { 00153 if(m_Attatched==NULL) 00154 m_Attatched=new CEdgeList(); 00155 m_Attatched->Append(pEdge); 00156 }

int CGuide::Attatchment  ) 
 

Definition at line 187 of file edge.cpp.

References CEdge::Attatchment(), GetEdge(), CEdgeList::GetEdgeCount(), m_Attatched, and NULL.

Referenced by CResizeDlg::FindCommonGuides().

00188 { 00189 if(m_Attatched==NULL) 00190 return 0; 00191 00192 int iRet=0; 00193 int iCount=0; 00194 int iNumEdges= m_Attatched->GetEdgeCount(); 00195 while( --iNumEdges>=0 ) 00196 { 00197 CEdge * pEdge= GetEdge(iNumEdges); 00198 iRet |= pEdge->Attatchment(); 00199 } 00200 return iRet; 00201 }

void CGuide::DeAttatch CEdge Control  ) 
 

Definition at line 210 of file edge.cpp.

References DeAttatch(), GetEdge(), CEdgeList::GetEdgeCount(), m_Attatched, and CDPA::Remove().

Referenced by DeAttatch(), and CEdge::SetGuide().

00211 { 00212 // 00213 // Go throught the list - null our this edge - it's no longer ours. 00214 // 00215 int iCount=m_Attatched->GetEdgeCount(); 00216 while (--iCount>=0) 00217 { 00218 CEdge * p=GetEdge(iCount); 00219 if(p==pEdge) 00220 m_Attatched->Remove(iCount); 00221 } 00222 }

CEdge * CGuide::GetEdge int  i  ) 
 

Definition at line 203 of file edge.cpp.

References CEdgeList::GetEdge(), GetEdge(), m_Attatched, and NULL.

Referenced by Attatchment(), DeAttatch(), GetEdge(), and NumAttatchments().

00204 { 00205 if(m_Attatched==NULL) 00206 return NULL; 00207 return m_Attatched->GetEdge(i); 00208 }

BOOL CGuide::IsEqual CGuide guide  ) 
 

Definition at line 158 of file edge.cpp.

References BOOL.

Referenced by CResizeControlGeneric::Attatchment().

00159 { 00160 return pGuide == this; 00161 }

BOOL CGuide::IsHorizontal  )  [inline]
 

Definition at line 84 of file edge.h.

References BOOL, BOTTOM_AT, m_Axis, and TOP_AT.

Referenced by CEdge::IsHorizontal().

00084 { return m_Axis & ( BOTTOM_AT | TOP_AT ) ; }

BOOL CGuide::IsVertical  )  [inline]
 

Definition at line 85 of file edge.h.

References BOOL, LEFT_AT, m_Axis, and RIGHT_AT.

Referenced by CEdge::IsVertical().

00085 { return m_Axis & ( LEFT_AT | RIGHT_AT ) ; }

int CGuide::NumAttatchments  ) 
 

Definition at line 168 of file edge.cpp.

References CEdge::GetControlCount(), GetEdge(), CEdgeList::GetEdgeCount(), m_Attatched, and NULL.

Referenced by CResizeDlg::FindCommonGuides().

00169 { 00170 if(m_Attatched==NULL) 00171 return 0; 00172 00173 int iRet=0; 00174 int iCount=0; 00175 int iNumEdges= m_Attatched->GetEdgeCount(); 00176 while( --iNumEdges>=0 ) 00177 { 00178 CEdge * pEdge= GetEdge(iNumEdges); 00179 iRet += pEdge->GetControlCount(); 00180 } 00181 return iRet; 00182 }

CGuide::PROPERTY BOOL  ,
Flexible 
 

CGuide::PROPERTY int  ,
Position 
 

CGuide::PROPERTY int  ,
Axis 
 


Member Data Documentation

CEdgeList* CGuide::m_Attatched [private]
 

Definition at line 94 of file edge.h.

Referenced by Attatch(), Attatchment(), CGuide(), DeAttatch(), GetEdge(), NumAttatchments(), and ~CGuide().

int CGuide::m_Axis [protected]
 

Definition at line 89 of file edge.h.

Referenced by IsHorizontal(), and IsVertical().

BOOL CGuide::m_Flexible [protected]
 

Definition at line 91 of file edge.h.

int CGuide::m_Position [protected]
 

Definition at line 90 of file edge.h.


The documentation for this class was generated from the following files:
Generated on Sat May 15 19:46:27 2004 for test by doxygen 1.3.7