40 #ifndef _uiverticalscrollbar_cpp
41 #define _uiverticalscrollbar_cpp
43 #include "UI/verticalscrollbar.h"
44 #include "UI/button.h"
45 #include "UI/screen.h"
46 #include "UI/pagedcontainer.h"
47 #include "UI/uimanager.h"
49 #include "UI/verticallayoutstrategy.h"
51 #include "Input/metacode.h"
52 #include "stringtool.h"
103 if( UI::SB_NoButtons == ScrollStyle )
116 if(UI::SB_Separate == ScrollStyle)
140 else if(UI::SB_TogetherDownRight == ScrollStyle)
164 else if(UI::SB_TogetherUpLeft == ScrollStyle)
191 if( this->
ActDims != TempDims ) {
215 Rect NewScrollerRect;
216 NewScrollerRect.
Size = OldScrollerRect.
Size;
221 NewScrollerRect.
Position.
Y = std::min(NewScrollerRect.
Position.
Y,this->GetUpperScrollLimit() - OldScrollerRect.
Size.
Y);
222 NewScrollerRect.
Position.
Y = std::max(NewScrollerRect.
Position.
Y,this->GetLowerScrollLimit());
240 Rect NewScrollerRect;
241 NewScrollerRect.
Size = OldScrollerRect.
Size;
244 if( HitPosition.
X == -1.0 || HitPosition.
Y == -1.0 )
247 if( HitPosition.
Y < OldScrollerRect.
Position.
Y ) {
251 }
else if( HitPosition.
Y > OldScrollerRect.
Position.
Y + OldScrollerRect.
Size.
Y ) {
272 Rect NewScrollerRect;
273 NewScrollerRect.
Size = OldScrollerRect.
Size;
279 NewScrollerRect.
Position.
Y = std::min(NewScrollerRect.
Position.
Y,this->GetUpperScrollLimit() - OldScrollerRect.
Size.
Y);
280 NewScrollerRect.
Position.
Y = std::max(NewScrollerRect.
Position.
Y,this->GetLowerScrollLimit());
291 Rect NewScrollerRect;
292 NewScrollerRect.
Size = OldScrollerRect.
Size;
298 NewScrollerRect.
Position.
Y = std::min(NewScrollerRect.
Position.
Y,this->GetUpperScrollLimit() - OldScrollerRect.
Size.
Y);
299 NewScrollerRect.
Position.
Y = std::max(NewScrollerRect.
Position.
Y,this->GetLowerScrollLimit());
321 if(Value > 1 || Value < 0)
326 Rect NewScrollerRect;
328 NewScrollerRect.
Size.
X = OldScrollerRect.
Size.
X;
329 NewScrollerRect.
Size.
Y = OldScrollerRect.
Size.
Y;
340 return (RelPos / RelLimit);
345 if(Size > 1 || Size < 0)
350 Rect NewScrollerRect;
353 NewScrollerRect.
Size.
X = ScrollBackRect.
Size.
X;
354 NewScrollerRect.
Size.
Y = ScrollBackRect.
Size.
Y * Size;
381 Rect NewScrollerRect;
382 NewScrollerRect.
Size.
X = ScrollBackRect.
Size.
X;
383 NewScrollerRect.
Size.
Y = ScrollBackRect.
Size.
Y * ScrollSize;
403 return ( Ret > 0 ? Ret : 1 );
495 NameValuePairMap::const_iterator ParamIt;
496 ParamIt = Params.find(
"ScrollbarStyle");
497 if( ParamIt != Params.end() )
507 NameValuePairMap::const_iterator ParamIt;
508 ParamIt = Params.find(
"ScrollbarStyle");
509 if( ParamIt != Params.end() )