MCPcopy Create free account
hub / github.com/VictorGordan/opengl-tutorials / Begin

Method Begin

ImGUI GLFW Tutorial/imgui/imgui.cpp:2283–2299  ·  view source on GitHub ↗

Use case A: Begin() called from constructor with items_height<0, then called again from Step() in StepNo 1 Use case B: Begin() called from constructor with items_height>0 FIXME-LEGACY: Ideally we should remove the Begin/End functions but they are part of the legacy API we still support. This is why some of the code in Step() calling Begin() and reassign some fields, spaghetti style.

Source from the content-addressed store, hash-verified

2281// Use case B: Begin() called from constructor with items_height>0
2282// FIXME-LEGACY: Ideally we should remove the Begin/End functions but they are part of the legacy API we still support. This is why some of the code in Step() calling Begin() and reassign some fields, spaghetti style.
2283void ImGuiListClipper::Begin(int items_count, float items_height)
2284{
2285 ImGuiContext& g = *GImGui;
2286 ImGuiWindow* window = g.CurrentWindow;
2287
2288 if (ImGuiTable* table = g.CurrentTable)
2289 if (table->IsInsideRow)
2290 ImGui::TableEndRow(table);
2291
2292 StartPosY = window->DC.CursorPos.y;
2293 ItemsHeight = items_height;
2294 ItemsCount = items_count;
2295 ItemsFrozen = 0;
2296 StepNo = 0;
2297 DisplayStart = -1;
2298 DisplayEnd = 0;
2299}
2300
2301void ImGuiListClipper::End()
2302{

Callers 6

DebugNodeDrawListMethod · 0.45
ListBoxMethod · 0.45
ShowDemoWindowTablesFunction · 0.45
ShowDemoWindowColumnsFunction · 0.45
DrawFunction · 0.45
ShowExampleAppLongTextFunction · 0.45

Calls 15

CreateNewWindowFunction · 0.70
ImLengthSqrFunction · 0.70
ImVec2Function · 0.70
ImVec4Class · 0.70
ImStrdupcpyFunction · 0.70
CalcWindowContentSizesFunction · 0.70
SetCurrentWindowFunction · 0.70
ImMaxFunction · 0.70
CalcWindowAutoFitSizeFunction · 0.70
ClampWindowRectFunction · 0.70

Tested by

no test coverage detected