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

Function TabBarCalcScrollableWidth

KBotExt/imgui/imgui_widgets.cpp:7652–7655  ·  view source on GitHub ↗

Scrolling happens only in the central section (leading/trailing sections are not scrolling)

Source from the content-addressed store, hash-verified

7650
7651// Scrolling happens only in the central section (leading/trailing sections are not scrolling)
7652static float TabBarCalcScrollableWidth(ImGuiTabBar* tab_bar, ImGuiTabBarSection* sections)
7653{
7654 return tab_bar->BarRect.GetWidth() - sections[0].Width - sections[2].Width - sections[1].Spacing;
7655}
7656
7657// This is called only once a frame before by the first call to ItemTab()
7658// The reason we're not calling it in BeginTabBar() is to leave a chance to the user to call the SetTabItemClosed() functions.

Callers 2

TabBarLayoutMethod · 0.85
TabBarScrollToTabMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected