MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / OnMouseMove

Method OnMouseMove

Source/FrameEditor.cpp:825–857  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

823}
824
825void CFrameEditor::OnMouseMove(UINT nFlags, CPoint point)
826{
827 if (nFlags & MK_LBUTTON) {
828 bool mouseMoved = std::abs(m_ButtonPoint.x - point.x) > m_iDragThresholdX ||
829 std::abs(m_ButtonPoint.y - point.y) > m_iDragThresholdY;
830
831 if (!IsSelecting()) {
832 if (mouseMoved) {
833 m_bFullFrameSelect = m_LastClickPos.m_iChannel < 0; // // //
834 model_->StartSelection(m_LastClickPos);
835 EnableInput(); // // //
836 }
837 }
838
839 if (m_bStartDrag) {
840 if (mouseMoved)
841 InitiateDrag();
842 }
843 else if (IsSelecting()) {
844 CFrameCursorPos pos = TranslateFramePos(point, false); // // //
845 AutoScroll(point);
846 if (m_bFullFrameSelect) // // //
847 model_->ContinueFrameSelection(pos.m_iFrame);
848 else
849 model_->ContinueSelection({pos.m_iFrame, std::max(0, pos.m_iChannel)});
850 InvalidateFrameData();
851 }
852 }
853
854 // Highlight
855 UpdateHighlightLine((point.y - DPI::SY(TOP_OFFSET)) / DPI::SY(ROW_HEIGHT)); // // //
856 CWnd::OnMouseMove(nFlags, point);
857}
858
859void CFrameEditor::OnNcMouseMove(UINT nHitTest, CPoint point)
860{

Callers

nothing calls this directly

Calls 3

StartSelectionMethod · 0.80
ContinueSelectionMethod · 0.80

Tested by

no test coverage detected