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

Class Funcs

KBotExt/imgui/imgui.cpp:13667–13702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13665 cfg->ShowTablesRectsType = TRT_WorkRect;
13666
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 {
13691 if (rect_type == WRT_OuterRect) { return window->Rect(); }
13692 else if (rect_type == WRT_OuterRectClipped) { return window->OuterRectClipped; }
13693 else if (rect_type == WRT_InnerRect) { return window->InnerRect; }
13694 else if (rect_type == WRT_InnerClipRect) { return window->InnerClipRect; }
13695 else if (rect_type == WRT_WorkRect) { return window->WorkRect; }
13696 else if (rect_type == WRT_Content) { ImVec2 min = window->InnerRect.Min - window->Scroll + window->WindowPadding; return ImRect(min, min + window->ContentSize); }
13697 else if (rect_type == WRT_ContentIdeal) { ImVec2 min = window->InnerRect.Min - window->Scroll + window->WindowPadding; return ImRect(min, min + window->ContentSizeIdeal); }
13698 else if (rect_type == WRT_ContentRegionRect) { return window->ContentRegionRect; }
13699 IM_ASSERT(0);
13700 return ImRect();
13701 }
13702 };
13703
13704 // Tools
13705 if (TreeNode("Tools"))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected