40 #ifndef _uiverticalcontainer_cpp
41 #define _uiverticalcontainer_cpp
43 #include "UI/verticalcontainer.h"
44 #include "UI/verticallayoutstrategy.h"
46 #include "UI/verticalscrollbar.h"
47 #include "UI/spinner.h"
89 Real CurrYPos = ActPadding * 0.5;
90 this->VisibleChildren.clear();
94 while( ChildUpdateIt != this->
ChildWidgets.end() && CurrYPos < YTarget )
98 CurrYPos += ( (*ChildUpdateIt)->GetActualSize().Y + ActPadding );
106 std::vector<Vector2> ChildSizeCache;
107 Real TotalLinearSize = 0;
110 CurrYPos = ActPadding * 0.5;
111 YTarget = NewSelfRect.
Size.
Y;
119 if( CurrYPos + ChildSize.
Y < YTarget ) {
121 if( ChildSize.
X > NewSelfRect.
Size.
X ) {
122 ChildSize.
X = NewSelfRect.
Size.
X;
124 ChildSizeCache.push_back( ChildSize );
126 CurrYPos += ( ChildSize.
Y + ActPadding );
127 TotalLinearSize += ( ChildSize.
Y + ActPadding );
142 TotalLinearSize -= ActPadding;
145 case UI::LA_TopLeft: CurrYPos = ActPadding * 0.5;
146 case UI::LA_Center: CurrYPos = ( NewSelfRect.
Position.
Y + ( NewSelfRect.
Size.
Y * 0.5 ) ) - ( TotalLinearSize * 0.5 );
147 case UI::LA_BottomRight: CurrYPos = ( NewSelfRect.
Position.
Y + NewSelfRect.
Size.
Y ) - ( TotalLinearSize + ActPadding * 0.5);
156 NewChildRect.
Size = ChildSizeCache.at(Y);
161 this->
VisibleChildren.at(Y)->UpdateDimensions(OldChildRect,NewChildRect);
163 CurrYPos += ( NewChildRect.
Size.
Y + ActPadding );
165 ChildSizeCache.clear();