XFrame/old/src/XNode.cpp
//adjust content rect,adjust child node or brother node
adjust content rect,adjust child node or brother node
adjust content rect adjust child node or brother node
int XNode::AdjustRect(int dx)
		{
			RECT rect = this->m_AreaRect;
			if(m_spStatus & SP_VERT)
			{
				if(m_spStatus & SP_LEFT)
				{
					rect.right = rect.right + dx;
					if(rect.right < rect.left + GetMinWidth()) rect.right = rect.left + GetMinWidth();
				}
				else
				{
					rect.left = rect.left + dx;
					if(rect.left > rect.right - GetMinWidth())rect.left = rect.right - GetMinWidth();
				}
			}else
			{
				if(m_spStatus & SP_LEFT)
				{
					rect.bottom = rect.bottom + dx;
					if(rect.bottom < rect.top + GetMinWidth()) rect.bottom = rect.top + GetMinWidth();
				}
				else
				{
					rect.top = rect.top + dx;
					if(rect.top > rect.bottom - GetMinWidth())rect.top = rect.bottom - GetMinWidth();
				}
			}
			this->m_spRate = 0;
			if(this->GetBrotherNode())this->GetBrotherNode()->m_spRate =0;
			m_AreaRect = rect;
			this->CalcContentRect();
			if(this->m_pLeftNode)this->m_pLeftNode->AdjustRect();
			if(this->m_pRightNode)this->m_pRightNode->AdjustRect();
			return 1;
		}
int XNode :: AdjustRect ( int dx ) { RECT rect = this -> m_AreaRect ; if ( m_spStatus & SP_VERT ) { if ( m_spStatus & SP_LEFT ) { rect . right = rect . right + dx ; if ( rect . right < rect . left + GetMinWidth ( ) ) rect . right = rect . left + GetMinWidth ( ) ; } else { rect . left = rect . left + dx ; if ( rect . left > rect . right - GetMinWidth ( ) ) rect . left = rect . right - GetMinWidth ( ) ; } } else { if ( m_spStatus & SP_LEFT ) { rect . bottom = rect . bottom + dx ; if ( rect . bottom < rect . top + GetMinWidth ( ) ) rect . bottom = rect . top + GetMinWidth ( ) ; } else { rect . top = rect . top + dx ; if ( rect . top > rect . bottom - GetMinWidth ( ) ) rect . top = rect . bottom - GetMinWidth ( ) ; } } this -> m_spRate = 0 ; if ( this -> GetBrotherNode ( ) ) this -> GetBrotherNode ( ) -> m_spRate = 0 ; m_AreaRect = rect ; this -> CalcContentRect ( ) ; if ( this -> m_pLeftNode ) this -> m_pLeftNode -> AdjustRect ( ) ; if ( this -> m_pRightNode ) this -> m_pRightNode -> AdjustRect ( ) ; return 1 ; }
adjust content rect,adjust child node or brother node
adjust content rect adjust child node or brother node
//if(this->m_pLayers)this->m_pLayers->AdjustRect();