| | |
| | | m_hWnd = NULL; |
| | | m_crFrame = GetSysColor(COLOR_WINDOWFRAME); |
| | | m_crBkgnd = RGB(255, 255, 255); |
| | | m_listener.onConnectPin = nullptr; |
| | | m_listener.onCheckConnectPin = nullptr; |
| | | m_listener.onDisconnectPin = nullptr; |
| | | m_listener.onDeleteEqItem = nullptr; |
| | | m_listener.onEqItemPosChanged = nullptr; |
| | | m_listener.onDblckEqItem = nullptr; |
| | | m_listener.onRclickEqItem = nullptr; |
| | | m_listener = {nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; |
| | | m_crItemBackground[0] = RGB(218, 218, 218); |
| | | m_crItemBackground[1] = RGB(193, 208, 227); |
| | | m_crItemFrame[0] = RGB(128, 128, 128); |
| | |
| | | m_listener.onEqItemPosChanged = listener.onEqItemPosChanged; |
| | | m_listener.onDblckEqItem = listener.onDblckEqItem; |
| | | m_listener.onRclickEqItem = listener.onRclickEqItem; |
| | | m_listener.onSelectEqItem = listener.onSelectEqItem; |
| | | } |
| | | |
| | | BOOL CEqsGraphWnd::SetCurSel(int nSel) |
| | |
| | | PIN *pLastPin = m_pCurPin; |
| | | PIN *pLastSelLineOutPin = m_pSelLineOutPin; |
| | | BOOL bChanged = FALSE; |
| | | BOOL bSelectChanged = FALSE; |
| | | EQITEM* pHitItem = NULL; |
| | | PIN *pHitPin = NULL; |
| | | PIN *pPin2 = NULL; |
| | |
| | | } |
| | | |
| | | if (nRet == HT_ITEM) { |
| | | m_pCurItem = pHitItem; |
| | | m_pCurItem->bHighlight = TRUE; |
| | | if (m_pCurItem != pHitItem) { |
| | | m_pCurItem = pHitItem; |
| | | m_pCurItem->bHighlight = TRUE; |
| | | bSelectChanged = TRUE; |
| | | } |
| | | } |
| | | else if (nRet == HT_PIN) { |
| | | m_pCurPin = pHitPin; |
| | |
| | | |
| | | ReleaseCapture(); |
| | | ExitLoop: |
| | | m_nMagneticLinHoz = 0; |
| | | m_nMagneticLinVer = 0; |
| | | AfxUnlockTempMaps(FALSE); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | if (bSelectChanged) { |
| | | if (m_listener.onSelectEqItem != nullptr) { |
| | | m_listener.onSelectEqItem(m_pCurItem); |
| | | } |
| | | } |
| | | |
| | | |
| | | return ::DefWindowProc(m_hWnd, WM_LBUTTONDOWN, wParam, lParam); |
| | | } |
| | | |