MCPcopy Create free account
hub / github.com/cinder/Cinder / DisplayDocContents

Method DisplayDocContents

src/imgui/imgui_demo.cpp:10181–10212  ·  view source on GitHub ↗

Display placeholder contents for the Document

Source from the content-addressed store, hash-verified

10179
10180 // Display placeholder contents for the Document
10181 void DisplayDocContents(MyDocument* doc)
10182 {
10183 ImGui::PushID(doc);
10184 ImGui::Text("Document \"%s\"", doc->Name);
10185 ImGui::PushStyleColor(ImGuiCol_Text, doc->Color);
10186 ImGui::TextWrapped("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
10187 ImGui::PopStyleColor();
10188
10189 ImGui::SetNextItemShortcut(ImGuiMod_Ctrl | ImGuiKey_R, ImGuiInputFlags_Tooltip);
10190 if (ImGui::Button("Rename.."))
10191 {
10192 RenamingDoc = doc;
10193 RenamingStarted = true;
10194 }
10195 ImGui::SameLine();
10196
10197 ImGui::SetNextItemShortcut(ImGuiMod_Ctrl | ImGuiKey_M, ImGuiInputFlags_Tooltip);
10198 if (ImGui::Button("Modify"))
10199 doc->Dirty = true;
10200
10201 ImGui::SameLine();
10202 ImGui::SetNextItemShortcut(ImGuiMod_Ctrl | ImGuiKey_S, ImGuiInputFlags_Tooltip);
10203 if (ImGui::Button("Save"))
10204 doc->DoSave();
10205
10206 ImGui::SameLine();
10207 ImGui::SetNextItemShortcut(ImGuiMod_Ctrl | ImGuiKey_W, ImGuiInputFlags_Tooltip);
10208 if (ImGui::Button("Close"))
10209 CloseQueue.push_back(doc);
10210 ImGui::ColorEdit3("color", &doc->Color.x); // Useful to test drag and drop and hold-dragged-to-open-tab behavior.
10211 ImGui::PopID();
10212 }
10213
10214 // Display context menu for the Document
10215 void DisplayDocContextMenu(MyDocument* doc)

Callers 1

ShowExampleAppDocumentsFunction · 0.80

Calls 3

ColorEdit3Function · 0.85
DoSaveMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected