newntui/discovermdi/src/disgraphnode.cpp
//------------------------------------------------------------------------------------
// This function returns TRUE and sets the bounding rectangle for the expand/collapse
// control (node connection with parents). Returns FALSE if this node has no children.
//------------------------------------------------------------------------------------
This function returns TRUE and sets the bounding rectangle for the expand/collapse
control (node connection with parents). Returns FALSE if this node has no children.
This function returns TRUE and sets the bounding rectangle for the expand / collapse control ( node connection with parents ) . Returns FALSE if this node has no children .
BOOL CDisGraphNode::GetTargetConnectorRect(CRect &rect) {
CPoint topLeft;
	if(m_HasParents!=FALSE) {
        switch(m_ParentGraph->pHDigraph()->pHTailor()->hlevelOrientation()) {
	        case TS_LEFT_TO_RIGHT :  topLeft.x=left()-300;
			                         topLeft.y=top()-m_HeaderHeight/2+150;
					                 break;
	        case TS_RIGHT_TO_LEFT :  topLeft.x=right();
			                         topLeft.y=top()-m_HeaderHeight/2+150;
					                 break;
	        case TS_TOP_TO_BOTTOM  :  topLeft.x=left()+width()/2-150;
			                         topLeft.y=top()+300;
					                 break;
	        case TS_BOTTOM_TO_TOP :  topLeft.x=left()+width()/2-150;
			                         topLeft.y=bottom();
					                 break;
		}
		rect.left=topLeft.x;
		rect.top=topLeft.y;
		rect.right=rect.left+300;
		rect.bottom=rect.top-300;
		return TRUE;
	}
	rect.left=rect.right=rect.top=rect.bottom=0;
	return FALSE;
}
BOOL CDisGraphNode :: GetTargetConnectorRect ( CRect & rect ) { CPoint topLeft ; if ( m_HasParents != FALSE ) { switch ( m_ParentGraph -> pHDigraph ( ) -> pHTailor ( ) -> hlevelOrientation ( ) ) { case TS_LEFT_TO_RIGHT : topLeft . x = left ( ) - 300 ; topLeft . y = top ( ) - m_HeaderHeight / 2 + 150 ; break ; case TS_RIGHT_TO_LEFT : topLeft . x = right ( ) ; topLeft . y = top ( ) - m_HeaderHeight / 2 + 150 ; break ; case TS_TOP_TO_BOTTOM : topLeft . x = left ( ) + width ( ) / 2 - 150 ; topLeft . y = top ( ) + 300 ; break ; case TS_BOTTOM_TO_TOP : topLeft . x = left ( ) + width ( ) / 2 - 150 ; topLeft . y = bottom ( ) ; break ; } rect . left = topLeft . x ; rect . top = topLeft . y ; rect . right = rect . left + 300 ; rect . bottom = rect . top - 300 ; return TRUE ; } rect . left = rect . right = rect . top = rect . bottom = 0 ; return FALSE ; }
This function returns TRUE and sets the bounding rectangle for the expand/collapse
control (node connection with parents).
This function returns TRUE and sets the bounding rectangle for the expand / collapse control ( node connection with parents ) .