MCPcopy Create free account
hub / github.com/AlexandreRouma/SDRPlusPlus / ShowDemoWindow

Method ShowDemoWindow

core/src/imgui/imgui_demo.cpp:259–527  ·  view source on GitHub ↗

Demonstrate most Dear ImGui features (this is big function!) You may execute this function to experiment with the UI and understand what it does. You may then search for keywords in the code when you are interested by a specific feature.

Source from the content-addressed store, hash-verified

257// You may execute this function to experiment with the UI and understand what it does.
258// You may then search for keywords in the code when you are interested by a specific feature.
259void ImGui::ShowDemoWindow(bool* p_open)
260{
261 // Exceptionally add an extra assert here for people confused about initial Dear ImGui setup
262 // Most ImGui functions would normally just crash if the context is missing.
263 IM_ASSERT(ImGui::GetCurrentContext() != NULL && "Missing dear imgui context. Refer to examples app!");
264
265 // Examples Apps (accessible from the "Examples" menu)
266 static bool show_app_main_menu_bar = false;
267 static bool show_app_documents = false;
268
269 static bool show_app_console = false;
270 static bool show_app_log = false;
271 static bool show_app_layout = false;
272 static bool show_app_property_editor = false;
273 static bool show_app_long_text = false;
274 static bool show_app_auto_resize = false;
275 static bool show_app_constrained_resize = false;
276 static bool show_app_simple_overlay = false;
277 static bool show_app_fullscreen = false;
278 static bool show_app_window_titles = false;
279 static bool show_app_custom_rendering = false;
280
281 if (show_app_main_menu_bar) ShowExampleAppMainMenuBar();
282 if (show_app_documents) ShowExampleAppDocuments(&show_app_documents);
283
284 if (show_app_console) ShowExampleAppConsole(&show_app_console);
285 if (show_app_log) ShowExampleAppLog(&show_app_log);
286 if (show_app_layout) ShowExampleAppLayout(&show_app_layout);
287 if (show_app_property_editor) ShowExampleAppPropertyEditor(&show_app_property_editor);
288 if (show_app_long_text) ShowExampleAppLongText(&show_app_long_text);
289 if (show_app_auto_resize) ShowExampleAppAutoResize(&show_app_auto_resize);
290 if (show_app_constrained_resize) ShowExampleAppConstrainedResize(&show_app_constrained_resize);
291 if (show_app_simple_overlay) ShowExampleAppSimpleOverlay(&show_app_simple_overlay);
292 if (show_app_fullscreen) ShowExampleAppFullscreen(&show_app_fullscreen);
293 if (show_app_window_titles) ShowExampleAppWindowTitles(&show_app_window_titles);
294 if (show_app_custom_rendering) ShowExampleAppCustomRendering(&show_app_custom_rendering);
295
296 // Dear ImGui Apps (accessible from the "Tools" menu)
297 static bool show_app_metrics = false;
298 static bool show_app_style_editor = false;
299 static bool show_app_about = false;
300
301 if (show_app_metrics) { ImGui::ShowMetricsWindow(&show_app_metrics); }
302 if (show_app_about) { ImGui::ShowAboutWindow(&show_app_about); }
303 if (show_app_style_editor)
304 {
305 ImGui::Begin("Dear ImGui Style Editor", &show_app_style_editor);
306 ImGui::ShowStyleEditor();
307 ImGui::End();
308 }
309
310 // Demonstrate the various window flags. Typically you would just use the default!
311 static bool no_titlebar = false;
312 static bool no_scrollbar = false;
313 static bool no_menu = false;
314 static bool no_move = false;
315 static bool no_resize = false;
316 static bool no_collapse = false;

Callers

nothing calls this directly

Calls 15

ShowExampleAppDocumentsFunction · 0.85
ShowExampleAppConsoleFunction · 0.85
ShowExampleAppLogFunction · 0.85
ShowExampleAppLayoutFunction · 0.85
ShowExampleAppLongTextFunction · 0.85
ShowExampleAppAutoResizeFunction · 0.85
ShowExampleAppFullscreenFunction · 0.85

Tested by

no test coverage detected