MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / drawContent

Method drawContent

src/gui2/summaryview.cc:331–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331void SummaryView::drawContent()
332{
333 auto disk = Datastore::getDisk();
334 auto diskLayout = Datastore::getDiskLayout();
335 if (!disk || !diskLayout)
336 return;
337
338 auto [minPhysicalCylinder,
339 maxPhysicalCylinder,
340 minPhysicalHead,
341 maxPhysicalHead] = diskLayout->getPhysicalBounds();
342
343 if (disk)
344 {
345 ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, {1, 1});
346 DEFER(ImGui::PopStyleVar());
347
348 auto backgroundColour = ImGui::GetColorU32(ImGuiCol_WindowBg);
349 ImGui::PushStyleColor(ImGuiCol_TableBorderLight, backgroundColour);
350 ImGui::PushStyleColor(ImGuiCol_TableBorderStrong, backgroundColour);
351 DEFER(ImGui::PopStyleColor(2));
352
353 ImGuiExt::TextFormattedCenteredHorizontal(
354 "fluxengine.view.summary.physical"_lang);
355
356 drawPhysicalMap(minPhysicalCylinder,
357 maxPhysicalCylinder,
358 minPhysicalHead,
359 maxPhysicalHead,
360 *disk);
361
362 ImGuiExt::TextFormattedCenteredHorizontal(
363 "fluxengine.view.summary.logical"_lang);
364
365 drawLogicalMap(minPhysicalCylinder,
366 maxPhysicalCylinder,
367 minPhysicalHead,
368 maxPhysicalHead,
369 *disk,
370 *diskLayout);
371
372 ImGui::Dummy(ImVec2(0, ImGui::GetFontSize()));
373
374 std::string message = currentStatusMessage;
375 if (!message.empty())
376 {
377 switch (currentOperationState)
378 {
379 case OperationState::Running:
380 message += (std::
381 string) "fluxengine.view.status.runningSuffix"_lang;
382 break;
383
384 case OperationState::Succeeded:
385 message += (std::
386 string) "fluxengine.view.status.succeededSuffix"_lang;
387 break;
388

Callers

nothing calls this directly

Calls 5

drawPhysicalMapFunction · 0.85
drawLogicalMapFunction · 0.85
ImVec2Class · 0.85
getPhysicalBoundsMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected