MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / GetTableRect

Method GetTableRect

KBotExt/imgui/imgui.cpp:13669–13687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13667 struct Funcs
13668 {
13669 static ImRect GetTableRect(ImGuiTable* table, int rect_type, int n)
13670 {
13671 ImGuiTableInstanceData* table_instance = TableGetInstanceData(table, table->InstanceCurrent); // Always using last submitted instance
13672 if (rect_type == TRT_OuterRect) { return table->OuterRect; }
13673 else if (rect_type == TRT_InnerRect) { return table->InnerRect; }
13674 else if (rect_type == TRT_WorkRect) { return table->WorkRect; }
13675 else if (rect_type == TRT_HostClipRect) { return table->HostClipRect; }
13676 else if (rect_type == TRT_InnerClipRect) { return table->InnerClipRect; }
13677 else if (rect_type == TRT_BackgroundClipRect) { return table->BgClipRect; }
13678 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); }
13679 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); }
13680 else if (rect_type == TRT_ColumnsClipRect) { ImGuiTableColumn* c = &table->Columns[n]; return c->ClipRect; }
13681 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->LastFirstRowHeight); } // Note: y1/y2 not always accurate
13682 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->LastFirstRowHeight); }
13683 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); }
13684 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); }
13685 IM_ASSERT(0);
13686 return ImRect();
13687 }
13688
13689 static ImRect GetWindowRect(ImGuiWindow* window, int rect_type)
13690 {

Callers

nothing calls this directly

Calls 2

TableGetInstanceDataFunction · 0.85
ImRectFunction · 0.70

Tested by

no test coverage detected