MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / Add

Method Add

DebugView++/LogView.cpp:1315–1354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1313}
1314
1315void CLogView::Add(int beginIndex, int line, const Message& msg)
1316{
1317 if (IsClearMessage(msg))
1318 ClearView();
1319
1320 if (!IsIncluded(msg))
1321 return;
1322
1323 if (IsBeepMessage(msg))
1324 MessageBeep(0xFFFFFFFF); // A simple beep. If the sound card is not available, the sound is generated using the speaker.
1325
1326 m_dirty = true;
1327 m_changed = true;
1328 auto it = m_logLines.begin();
1329 while (it != m_logLines.end() && it->line < beginIndex)
1330 ++it;
1331 m_logLines.erase(m_logLines.begin(), it);
1332
1333 int viewline = m_logLines.size();
1334 m_logLines.push_back(LogLine(line));
1335
1336 if (m_autoScrollDown && MatchFilterType(FilterType::Stop, msg))
1337 {
1338 m_stop = [this, viewline] ()
1339 {
1340 StopScrolling();
1341 ScrollToIndex(viewline, true);
1342 };
1343 return;
1344 }
1345
1346 if (MatchFilterType(FilterType::Track, msg))
1347 {
1348 m_autoScrollDown = false;
1349 m_track = [this, viewline] ()
1350 {
1351 return ScrollToIndex(viewline, true);
1352 };
1353 }
1354}
1355
1356void CLogView::BeginUpdate()
1357{

Callers 11

AddCheckStateImageMethod · 0.45
AddBitmapMethod · 0.45
CollapseMethod · 0.45
SetListMethod · 0.45
AddListItemMethod · 0.45
GetMethod · 0.45
LoadLogFileFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
CreateTestFileFunction · 0.45
AppendToTestFileFunction · 0.45
AddMessageMethod · 0.45

Calls 4

IsIncludedFunction · 0.85
LogLineClass · 0.85
MatchFilterTypeFunction · 0.85
sizeMethod · 0.45

Tested by 4

LoadLogFileFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
CreateTestFileFunction · 0.36
AppendToTestFileFunction · 0.36