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

Function ShowExampleAppPropertyEditor

core/src/imgui/imgui_demo.cpp:6911–6939  ·  view source on GitHub ↗

Demonstrate create a simple property editor.

Source from the content-addressed store, hash-verified

6909
6910// Demonstrate create a simple property editor.
6911static void ShowExampleAppPropertyEditor(bool* p_open)
6912{
6913 ImGui::SetNextWindowSize(ImVec2(430, 450), ImGuiCond_FirstUseEver);
6914 if (!ImGui::Begin("Example: Property editor", p_open))
6915 {
6916 ImGui::End();
6917 return;
6918 }
6919
6920 HelpMarker(
6921 "This example shows how you may implement a property editor using two columns.\n"
6922 "All objects/fields data are dummies here.\n"
6923 "Remember that in many simple cases, you can use ImGui::SameLine(xxx) to position\n"
6924 "your cursor horizontally instead of using the Columns() API.");
6925
6926 ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2, 2));
6927 if (ImGui::BeginTable("split", 2, ImGuiTableFlags_BordersOuter | ImGuiTableFlags_Resizable))
6928 {
6929 // Iterate placeholder objects (all the same data)
6930 for (int obj_i = 0; obj_i < 4; obj_i++)
6931 {
6932 ShowPlaceholderObject("Object", obj_i);
6933 //ImGui::Separator();
6934 }
6935 ImGui::EndTable();
6936 }
6937 ImGui::PopStyleVar();
6938 ImGui::End();
6939}
6940
6941//-----------------------------------------------------------------------------
6942// [SECTION] Example App: Long Text / ShowExampleAppLongText()

Callers 1

ShowDemoWindowMethod · 0.85

Calls 5

ImVec2Function · 0.85
BeginFunction · 0.85
EndFunction · 0.85
HelpMarkerFunction · 0.85
ShowPlaceholderObjectFunction · 0.85

Tested by

no test coverage detected