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

Method OnLButtonDown

Source/FrameEditor.cpp:767–789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

765//// Mouse ////////////////////////////////////////////////////////////////////////////////////////
766
767void CFrameEditor::OnLButtonDown(UINT nFlags, CPoint point)
768{
769 m_ButtonPoint = point;
770 m_LastClickPos = TranslateFramePos(point, false); // // //
771
772 if (auto pSel = model_->GetSelection()) {
773 if (model_->IsFrameSelected(m_LastClickPos.m_iFrame) && model_->IsChannelSelected(m_LastClickPos.m_iChannel)) // // //
774 m_bStartDrag = true;
775 else if (nFlags & MK_SHIFT) {
776 model_->ContinueSelection(m_LastClickPos); // // //
777 InvalidateFrameData();
778 }
779 else
780 model_->Deselect();
781 }
782 else if (nFlags & MK_SHIFT) {
783 model_->StartSelection(model_->GetCurrentPos());
784 model_->ContinueSelection(m_LastClickPos);
785 m_bFullFrameSelect = false; // // //
786 }
787
788 CWnd::OnLButtonDown(nFlags, point);
789}
790
791void CFrameEditor::OnLButtonUp(UINT nFlags, CPoint point)
792{

Callers

nothing calls this directly

Calls 7

IsFrameSelectedMethod · 0.80
IsChannelSelectedMethod · 0.80
ContinueSelectionMethod · 0.80
DeselectMethod · 0.80
StartSelectionMethod · 0.80
GetCurrentPosMethod · 0.80
GetSelectionMethod · 0.45

Tested by

no test coverage detected