MCPcopy Create free account
hub / github.com/clementgallet/libTAS / TabBarCalcScrollableWidth

Function TabBarCalcScrollableWidth

src/external/imgui/imgui_widgets.cpp:7934–7937  ·  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

7932
7933// Scrolling happens only in the central section (leading/trailing sections are not scrolling)
7934static float TabBarCalcScrollableWidth(ImGuiTabBar* tab_bar, ImGuiTabBarSection* sections)
7935{
7936 return tab_bar->BarRect.GetWidth() - sections[0].Width - sections[2].Width - sections[1].Spacing;
7937}
7938
7939// This is called only once a frame before by the first call to ItemTab()
7940// 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