MCPcopy Create free account
hub / github.com/cinder/Cinder / GetTableRect

Method GetTableRect

src/imgui/imgui.cpp:16218–16236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16216 struct Funcs
16217 {
16218 static ImRect GetTableRect(ImGuiTable* table, int rect_type, int n)
16219 {
16220 ImGuiTableInstanceData* table_instance = TableGetInstanceData(table, table->InstanceCurrent); // Always using last submitted instance
16221 if (rect_type == TRT_OuterRect) { return table->OuterRect; }
16222 else if (rect_type == TRT_InnerRect) { return table->InnerRect; }
16223 else if (rect_type == TRT_WorkRect) { return table->WorkRect; }
16224 else if (rect_type == TRT_HostClipRect) { return table->HostClipRect; }
16225 else if (rect_type == TRT_InnerClipRect) { return table->InnerClipRect; }
16226 else if (rect_type == TRT_BackgroundClipRect) { return table->BgClipRect; }
16227 else if (rect_type == TRT_ColumnsRect) { ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->MinX, table->InnerClipRect.Min.y, c->MaxX, table->InnerClipRect.Min.y + table_instance->LastOuterHeight); }
16228 else if (rect_type == TRT_ColumnsWorkRect) { ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->WorkRect.Min.y, c->WorkMaxX, table->WorkRect.Max.y); }
16229 else if (rect_type == TRT_ColumnsClipRect) { ImGuiTableColumn* c = &table->Columns[n]; return c->ClipRect; }
16230 else if (rect_type == TRT_ColumnsContentHeadersUsed){ ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y, c->ContentMaxXHeadersUsed, table->InnerClipRect.Min.y + table_instance->LastTopHeadersRowHeight); } // Note: y1/y2 not always accurate
16231 else if (rect_type == TRT_ColumnsContentHeadersIdeal){ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y, c->ContentMaxXHeadersIdeal, table->InnerClipRect.Min.y + table_instance->LastTopHeadersRowHeight); }
16232 else if (rect_type == TRT_ColumnsContentFrozen) { ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y, c->ContentMaxXFrozen, table->InnerClipRect.Min.y + table_instance->LastFrozenHeight); }
16233 else if (rect_type == TRT_ColumnsContentUnfrozen) { ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y + table_instance->LastFrozenHeight, c->ContentMaxXUnfrozen, table->InnerClipRect.Max.y); }
16234 IM_ASSERT(0);
16235 return ImRect();
16236 }
16237
16238 static ImRect GetWindowRect(ImGuiWindow* window, int rect_type)
16239 {

Callers

nothing calls this directly

Calls 2

TableGetInstanceDataFunction · 0.85
ImRectFunction · 0.50

Tested by

no test coverage detected