ARCed.UI.VS2005DockPaneStrip.CalculateDocumentTab C# (CSharp) Method

CalculateDocumentTab() private method

private CalculateDocumentTab ( Rectangle rectTabStrip, int &x, int index ) : bool
rectTabStrip System.Drawing.Rectangle
x int
index int
return bool
        private bool CalculateDocumentTab(Rectangle rectTabStrip, ref int x, int index)
        {
            bool overflow = false;

            var tab = Tabs[index] as TabVS2005;
            tab.MaxWidth = this.GetMaxTabWidth(index);
            int width = Math.Min(tab.MaxWidth, DocumentTabMaxWidth);
            if (x + width < rectTabStrip.Right || index == this.StartDisplayingTab)
            {
                tab.TabX = x;
                tab.TabWidth = width;
                this.EndDisplayingTab = index;
            }
            else
            {
                tab.TabX = 0;
                tab.TabWidth = 0;
                overflow = true;
            }
            x += width;

            return overflow;
        }