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

CEdge Class Reference

#include <edge.h>

List of all members.

Public Member Functions

int Attatchment ()
void Attatch (CResizeControl *pC)
 CEdge ()
 CEdge (int Position, int Axis, BOOL Flexible, int Offset)
 CEdge (CGuide *pGuide, int Offset)
virtual ~CEdge ()
 PROPERTY (int, OffsetFromGuide)
int GetAxis ()
int GetPosition ()
BOOL GetFlexible ()
void SetPosition (int p)
CGuideGetGuide ()
void SetGuide (CGuide *pGuide)
void SetOffset (int i)
BOOL IsHorizontal ()
BOOL IsVertical ()
int GetControlCount ()
CResizeControlGetControl (int i)

Protected Attributes

CGuidem_Guide
int m_OffsetFromGuide
CControlListm_Attatched


Constructor & Destructor Documentation

CEdge::CEdge  ) 
 

Definition at line 15 of file edge.cpp.

References m_Guide, NULL, and SetGuide().

00016 : m_Guide( new CGuide() ), m_Attatched(NULL) 00017 { 00018 SetGuide(m_Guide); 00019 }

CEdge::CEdge int  Position,
int  Axis,
BOOL  Flexible,
int  Offset
 

Definition at line 26 of file edge.cpp.

References BOOL, m_Guide, NULL, Offset, and SetGuide().

00027 : m_Guide( new CGuide(Position, Axis, Flexible) ), m_Attatched(NULL) 00028 { 00029 SetOffsetFromGuide(Offset); 00030 SetGuide(m_Guide); 00031 }

CEdge::CEdge CGuide pGuide,
int  Offset
 

Definition at line 33 of file edge.cpp.

References m_Guide, NULL, Offset, and SetGuide().

00034 : m_Guide(pGuide), m_Attatched(NULL) 00035 { 00036 SetOffsetFromGuide(Offset); 00037 SetGuide(m_Guide); 00038 }

CEdge::~CEdge  )  [virtual]
 

Definition at line 21 of file edge.cpp.

00022 { 00023 00024 }


Member Function Documentation

void CEdge::Attatch CResizeControl pC  ) 
 

Definition at line 60 of file edge.cpp.

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

Referenced by Attatch(), and CResizeControlGeneric::SetControlAssociations().

00061 { 00062 if(m_Attatched==NULL) 00063 m_Attatched=new CControlList(); 00064 m_Attatched->Append(pC); 00065 }

int CEdge::Attatchment  ) 
 

Definition at line 67 of file edge.cpp.

References CResizeControl::Attatchment(), GetControl(), GetControlCount(), and GetGuide().

Referenced by CGuide::Attatchment(), and CResizeDlg::FindCommonGuides().

00068 { 00069 CResizeControl * pControl; 00070 int iRet=0; 00071 int iNumControls=GetControlCount(); 00072 while( --iNumControls >= 0) 00073 { 00074 pControl = GetControl(iNumControls); 00075 iRet |= pControl->Attatchment( GetGuide() ); 00076 } 00077 return iRet; 00078 }

int CEdge::GetAxis  )  [inline]
 

Definition at line 118 of file edge.h.

References m_Guide.

Referenced by CParentInfo::AddEdge(), and CParentInfo::FindCloseEdge().

00118 { return m_Guide->GetAxis(); }

CResizeControl* CEdge::GetControl int  i  )  [inline]
 

Definition at line 129 of file edge.h.

References CControlList::GetControl(), GetControl(), and m_Attatched.

Referenced by Attatchment(), and GetControl().

00129 { return m_Attatched->GetControl(i); }

int CEdge::GetControlCount  )  [inline]
 

Definition at line 128 of file edge.h.

References CControlList::GetControlCount(), and m_Attatched.

Referenced by Attatchment(), CResizeDlg::FindCommonGuides(), and CGuide::NumAttatchments().

00128 { if(m_Attatched)return m_Attatched->GetControlCount(); return 0; }

BOOL CEdge::GetFlexible  )  [inline]
 

Definition at line 120 of file edge.h.

References BOOL, and m_Guide.

Referenced by CResizeControlGeneric::Resize().

00120 { return m_Guide->GetFlexible(); }

CGuide* CEdge::GetGuide  )  [inline]
 

Definition at line 123 of file edge.h.

References m_Guide.

Referenced by CParentInfo::AddEdge(), CResizeControlGeneric::Attatchment(), Attatchment(), CResizeDlg::FindCommonGuides(), and CResizeControlGeneric::Resize().

00123 { return m_Guide; }

int CEdge::GetPosition  )  [inline]
 

Definition at line 119 of file edge.h.

References m_Guide, and m_OffsetFromGuide.

Referenced by CParentInfo::AddEdge(), CParentInfo::Annotate(), CResizeDlg::DeterminCols(), CResizeControlGeneric::DeterminRightAttatchments(), CResizeDlg::DeterminRows(), CParentInfo::FindCloseEdge(), CResizeDlg::FindCommonGuides(), CResizeControlGeneric::Resize(), and CResizeDlg::Sort().

00119 { return m_Guide->GetPosition() + m_OffsetFromGuide; }

BOOL CEdge::IsHorizontal  )  [inline]
 

Definition at line 126 of file edge.h.

References BOOL, CGuide::IsHorizontal(), and m_Guide.

Referenced by CEdgeCache::AddEdge(), CParentInfo::Annotate(), and CParentInfo::GetHorizontalEdges().

00126 { return m_Guide->IsHorizontal(); }

BOOL CEdge::IsVertical  )  [inline]
 

Definition at line 127 of file edge.h.

References BOOL, CGuide::IsVertical(), and m_Guide.

Referenced by CParentInfo::GetVerticalEdges().

00127 { return m_Guide->IsVertical(); }

CEdge::PROPERTY int  ,
OffsetFromGuide 
 

void CEdge::SetGuide CGuide pGuide  ) 
 

Definition at line 44 of file edge.cpp.

References CGuide::Attatch(), CGuide::DeAttatch(), L, m_Guide, SetGuide(), and TRACE.

Referenced by CEdge(), and SetGuide().

00045 { 00046 // 00047 // We still have the same number of controls attatched to this edge 00048 // remove these controls from the guide. 00049 // 00050 if( pGuide != m_Guide ) 00051 { 00052 TRACE(L"Changing the guide - need to re-attatch?\n"); 00053 m_Guide->DeAttatch(this); 00054 } 00055 00056 m_Guide=pGuide; 00057 pGuide->Attatch( this ); 00058 }

void CEdge::SetOffset int  i  )  [inline]
 

Definition at line 125 of file edge.h.

References m_OffsetFromGuide, and SetOffset().

Referenced by SetOffset().

00125 { m_OffsetFromGuide = i ; }

void CEdge::SetPosition int  p  )  [inline]
 

Definition at line 121 of file edge.h.

References m_Guide, and SetPosition().

Referenced by CParentInfo::Resize(), and SetPosition().

00121 { m_Guide->SetPosition(p); }


Member Data Documentation

CControlList* CEdge::m_Attatched [protected]
 

Definition at line 134 of file edge.h.

Referenced by Attatch(), GetControl(), and GetControlCount().

CGuide* CEdge::m_Guide [protected]
 

Definition at line 132 of file edge.h.

Referenced by CEdge(), GetAxis(), GetFlexible(), GetGuide(), GetPosition(), IsHorizontal(), IsVertical(), SetGuide(), and SetPosition().

int CEdge::m_OffsetFromGuide [protected]
 

Definition at line 133 of file edge.h.

Referenced by GetPosition(), and SetOffset().


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