MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / DemoWindowMenuBar

Function DemoWindowMenuBar

Source/3rdParty/imgui/imgui_demo.cpp:660–728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

658//-----------------------------------------------------------------------------
659
660static void DemoWindowMenuBar(ImGuiDemoWindowData* demo_data)
661{
662 if (ImGui::BeginMenuBar())
663 {
664 if (ImGui::BeginMenu("Menu"))
665 {
666 IMGUI_DEMO_MARKER("Menu/File");
667 ShowExampleMenuFile();
668 ImGui::EndMenu();
669 }
670 if (ImGui::BeginMenu("Examples"))
671 {
672 IMGUI_DEMO_MARKER("Menu/Examples");
673 ImGui::MenuItem("Main menu bar", NULL, &demo_data->ShowMainMenuBar);
674
675 ImGui::SeparatorText("Mini apps");
676 ImGui::MenuItem("Assets Browser", NULL, &demo_data->ShowAppAssetsBrowser);
677 ImGui::MenuItem("Console", NULL, &demo_data->ShowAppConsole);
678 ImGui::MenuItem("Custom rendering", NULL, &demo_data->ShowAppCustomRendering);
679 ImGui::MenuItem("Documents", NULL, &demo_data->ShowAppDocuments);
680 ImGui::MenuItem("Log", NULL, &demo_data->ShowAppLog);
681 ImGui::MenuItem("Property editor", NULL, &demo_data->ShowAppPropertyEditor);
682 ImGui::MenuItem("Simple layout", NULL, &demo_data->ShowAppLayout);
683 ImGui::MenuItem("Simple overlay", NULL, &demo_data->ShowAppSimpleOverlay);
684
685 ImGui::SeparatorText("Concepts");
686 ImGui::MenuItem("Auto-resizing window", NULL, &demo_data->ShowAppAutoResize);
687 ImGui::MenuItem("Constrained-resizing window", NULL, &demo_data->ShowAppConstrainedResize);
688 ImGui::MenuItem("Fullscreen window", NULL, &demo_data->ShowAppFullscreen);
689 ImGui::MenuItem("Long text display", NULL, &demo_data->ShowAppLongText);
690 ImGui::MenuItem("Manipulating window titles", NULL, &demo_data->ShowAppWindowTitles);
691
692 ImGui::EndMenu();
693 }
694 //if (ImGui::MenuItem("MenuItem")) {} // You can also use MenuItem() inside a menu bar!
695 if (ImGui::BeginMenu("Tools"))
696 {
697 IMGUI_DEMO_MARKER("Menu/Tools");
698 ImGuiIO& io = ImGui::GetIO();
699#ifndef IMGUI_DISABLE_DEBUG_TOOLS
700 const bool has_debug_tools = true;
701#else
702 const bool has_debug_tools = false;
703#endif
704 ImGui::MenuItem("Metrics/Debugger", NULL, &demo_data->ShowMetrics, has_debug_tools);
705 if (ImGui::BeginMenu("Debug Options"))
706 {
707 ImGui::BeginDisabled(!has_debug_tools);
708 ImGui::Checkbox("Highlight ID Conflicts", &io.ConfigDebugHighlightIdConflicts);
709 ImGui::EndDisabled();
710 ImGui::Checkbox("Assert on error recovery", &io.ConfigErrorRecoveryEnableAssert);
711 ImGui::TextDisabled("(see Demo->Configuration for details & more)");
712 ImGui::EndMenu();
713 }
714 ImGui::MenuItem("Debug Log", NULL, &demo_data->ShowDebugLog, has_debug_tools);
715 ImGui::MenuItem("ID Stack Tool", NULL, &demo_data->ShowIDStackTool, has_debug_tools);
716 bool is_debugger_present = io.ConfigDebugIsDebuggerPresent;
717 if (ImGui::MenuItem("Item Picker", NULL, false, has_debug_tools))// && is_debugger_present))

Callers 1

ShowDemoWindowMethod · 0.85

Calls 6

BeginMenuFunction · 0.85
ShowExampleMenuFileFunction · 0.85
MenuItemFunction · 0.85
SeparatorTextFunction · 0.85
CheckboxFunction · 0.85
TextDisabledFunction · 0.85

Tested by

no test coverage detected