MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / DisplayDocContents

Method DisplayDocContents

3rdparty/imgui/src/imgui_demo.cpp:10504–10535  ·  view source on GitHub ↗

Display placeholder contents for the Document

Source from the content-addressed store, hash-verified

10502
10503 // Display placeholder contents for the Document
10504 void DisplayDocContents(MyDocument* doc)
10505 {
10506 ImGui::PushID(doc);
10507 ImGui::Text("Document \"%s\"", doc->Name);
10508 ImGui::PushStyleColor(ImGuiCol_Text, doc->Color);
10509 ImGui::TextWrapped("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
10510 ImGui::PopStyleColor();
10511
10512 ImGui::SetNextItemShortcut(ImGuiMod_Ctrl | ImGuiKey_R, ImGuiInputFlags_Tooltip);
10513 if (ImGui::Button("Rename.."))
10514 {
10515 RenamingDoc = doc;
10516 RenamingStarted = true;
10517 }
10518 ImGui::SameLine();
10519
10520 ImGui::SetNextItemShortcut(ImGuiMod_Ctrl | ImGuiKey_M, ImGuiInputFlags_Tooltip);
10521 if (ImGui::Button("Modify"))
10522 doc->Dirty = true;
10523
10524 ImGui::SameLine();
10525 ImGui::SetNextItemShortcut(ImGuiMod_Ctrl | ImGuiKey_S, ImGuiInputFlags_Tooltip);
10526 if (ImGui::Button("Save"))
10527 doc->DoSave();
10528
10529 ImGui::SameLine();
10530 ImGui::SetNextItemShortcut(ImGuiMod_Ctrl | ImGuiKey_W, ImGuiInputFlags_Tooltip);
10531 if (ImGui::Button("Close"))
10532 CloseQueue.push_back(doc);
10533 ImGui::ColorEdit3("color", &doc->Color.x); // Useful to test drag and drop and hold-dragged-to-open-tab behavior.
10534 ImGui::PopID();
10535 }
10536
10537 // Display context menu for the Document
10538 void DisplayDocContextMenu(MyDocument* doc)

Callers 1

ShowExampleAppDocumentsFunction · 0.80

Calls 2

DoSaveMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected