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

Method OnBookmarksNext

Source/FamiTrackerView.cpp:1522–1543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1520}
1521
1522void CFamiTrackerView::OnBookmarksNext()
1523{
1524 if (FTEnv.GetSoundGenerator()->IsPlaying() && m_bFollowMode)
1525 return;
1526
1527 CMainFrame *pMainFrame = static_cast<CMainFrame*>(GetParentFrame());
1528 CBookmarkCollection &Col = static_cast<CMainFrame *>(GetParentFrame())->GetCurrentSong()->GetBookmarks();
1529
1530 if (CBookmark *pMark = Col.FindNext(GetSelectedFrame(), GetSelectedRow())) {
1531 SelectFrame(pMark->m_iFrame);
1532 SelectRow(pMark->m_iRow);
1533 pMainFrame->SetMessageText(AfxFormattedW(IDS_BOOKMARK_FORMAT, conv::to_wide(pMark->m_sName).data(),
1534 (pMark->m_Highlight.First != -1) ? FormattedW(L"%i", pMark->m_Highlight.First) : CStringW(L"None"),
1535 (pMark->m_Highlight.Second != -1) ? FormattedW(L"%i", pMark->m_Highlight.Second) : CStringW(L"None")));
1536 pMainFrame->UpdateBookmarkList(Col.GetBookmarkIndex(pMark));
1537 SetFocus();
1538 }
1539 else {
1540 MessageBeep(MB_ICONINFORMATION);
1541 pMainFrame->SetMessageText(IDS_BOOKMARK_EMPTY);
1542 }
1543}
1544
1545void CFamiTrackerView::OnBookmarksPrevious()
1546{

Callers

nothing calls this directly

Calls 10

AfxFormattedWFunction · 0.85
to_wideFunction · 0.85
FormattedWFunction · 0.85
FindNextMethod · 0.80
GetBookmarkIndexMethod · 0.80
IsPlayingMethod · 0.45
GetSoundGeneratorMethod · 0.45
GetCurrentSongMethod · 0.45
dataMethod · 0.45
UpdateBookmarkListMethod · 0.45

Tested by

no test coverage detected