예제 #1
0
파일: LineShape.cpp 프로젝트: GWRon/wx.mod
void wxSFLineShape::OnHandle(wxSFShapeHandle& handle)
{
    switch(handle.GetType())
    {
    case wxSFShapeHandle::hndLINECTRL:
        {
            wxXS::RealPointList::compatibility_iterator node = m_lstPoints.Item(handle.GetId());
            if(node)
            {
                wxRealPoint* pt = node->GetData();
                pt->x = handle.GetPosition().x;
                pt->y = handle.GetPosition().y;
            }
        }
        break;

    case wxSFShapeHandle::hndLINEEND:
		{
			m_nUnfinishedPoint = handle.GetPosition();
			if( m_fStandAlone )	m_nTrgPoint = Conv2RealPoint( handle.GetPosition() );
		}
		break;
		
    case wxSFShapeHandle::hndLINESTART:
        {
			m_nUnfinishedPoint = handle.GetPosition();
			if( m_fStandAlone )	m_nSrcPoint = Conv2RealPoint( handle.GetPosition() );
        }
        break;

    default:
        break;
    }
	
	wxSFShapeBase::OnHandle( handle );
}