MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/Cauldron / ShowExampleAppMainMenuBar

Function ShowExampleAppMainMenuBar

libs/imgui/imgui_demo.cpp:2197–2218  ·  view source on GitHub ↗

Demonstrate creating a fullscreen menu bar and populating it.

Source from the content-addressed store, hash-verified

2195
2196// Demonstrate creating a fullscreen menu bar and populating it.
2197static void ShowExampleAppMainMenuBar()
2198{
2199 if (ImGui::BeginMainMenuBar())
2200 {
2201 if (ImGui::BeginMenu("File"))
2202 {
2203 ShowExampleMenuFile();
2204 ImGui::EndMenu();
2205 }
2206 if (ImGui::BeginMenu("Edit"))
2207 {
2208 if (ImGui::MenuItem("Undo", "CTRL+Z")) {}
2209 if (ImGui::MenuItem("Redo", "CTRL+Y", false, false)) {} // Disabled item
2210 ImGui::Separator();
2211 if (ImGui::MenuItem("Cut", "CTRL+X")) {}
2212 if (ImGui::MenuItem("Copy", "CTRL+C")) {}
2213 if (ImGui::MenuItem("Paste", "CTRL+V")) {}
2214 ImGui::EndMenu();
2215 }
2216 ImGui::EndMainMenuBar();
2217 }
2218}
2219
2220static void ShowExampleMenuFile()
2221{

Callers 1

ShowDemoWindowMethod · 0.85

Calls 1

ShowExampleMenuFileFunction · 0.85

Tested by

no test coverage detected