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

Method DisplayDocContextMenu

src/imgui/imgui_demo.cpp:10215–10229  ·  view source on GitHub ↗

Display context menu for the Document

Source from the content-addressed store, hash-verified

10213
10214 // Display context menu for the Document
10215 void DisplayDocContextMenu(MyDocument* doc)
10216 {
10217 if (!ImGui::BeginPopupContextItem())
10218 return;
10219
10220 char buf[256];
10221 sprintf(buf, "Save %s", doc->Name);
10222 if (ImGui::MenuItem(buf, "Ctrl+S", false, doc->Open))
10223 doc->DoSave();
10224 if (ImGui::MenuItem("Rename...", "Ctrl+R", false, doc->Open))
10225 RenamingDoc = doc;
10226 if (ImGui::MenuItem("Close", "Ctrl+W", false, doc->Open))
10227 CloseQueue.push_back(doc);
10228 ImGui::EndPopup();
10229 }
10230
10231 // [Optional] Notify the system of Tabs/Windows closure that happened outside the regular tab interface.
10232 // If a tab has been closed programmatically (aka closed from another source such as the Checkbox() in the demo,

Callers 1

ShowExampleAppDocumentsFunction · 0.80

Calls 2

DoSaveMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected