(ctx *LayoutContext)
| 696 | } |
| 697 | |
| 698 | func (tw *TabWidget) CreateLayoutItem(ctx *LayoutContext) LayoutItem { |
| 699 | pages := make([]LayoutItem, tw.pages.Len()) |
| 700 | |
| 701 | bounds := tw.pageBounds() |
| 702 | |
| 703 | li := &tabWidgetLayoutItem{ |
| 704 | pagePos: bounds.Location(), |
| 705 | currentIndex: tw.CurrentIndex(), |
| 706 | nonClientSizePixels: tw.nonClientSizePixels, |
| 707 | } |
| 708 | |
| 709 | for i := tw.pages.Len() - 1; i >= 0; i-- { |
| 710 | var page LayoutItem |
| 711 | if p := tw.pages.At(i); p.Layout() != nil { |
| 712 | page = CreateLayoutItemsForContainerWithContext(p, ctx) |
| 713 | } else { |
| 714 | page = NewGreedyLayoutItem() |
| 715 | } |
| 716 | |
| 717 | lib := page.AsLayoutItemBase() |
| 718 | lib.ctx = ctx |
| 719 | lib.parent = li |
| 720 | pages[i] = page |
| 721 | } |
| 722 | |
| 723 | li.children = pages |
| 724 | |
| 725 | return li |
| 726 | } |
| 727 | |
| 728 | type tabWidgetLayoutItem struct { |
| 729 | ContainerLayoutItemBase |
nothing calls this directly
no test coverage detected