40 #ifndef _uihorizontalscrollbar_cpp
41 #define _uihorizontalscrollbar_cpp
43 #include "UI/horizontalscrollbar.h"
44 #include "UI/button.h"
45 #include "UI/screen.h"
46 #include "UI/pagedcontainer.h"
47 #include "UI/uimanager.h"
49 #include "UI/horizontallayoutstrategy.h"
51 #include "stringtool.h"
53 #include "Input/metacode.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.
X = std::min(NewScrollerRect.
Position.
X,this->GetUpperScrollLimit() - OldScrollerRect.
Size.
X);
222 NewScrollerRect.
Position.
X = std::max(NewScrollerRect.
Position.
X,this->GetLowerScrollLimit());
240 Rect NewScrollerRect;
241 NewScrollerRect.
Size = OldScrollerRect.
Size;
244 if( HitPosition.
X == -1.0 || HitPosition.
Y == -1.0 )
247 if( HitPosition.
X < OldScrollerRect.
Position.
X ) {
251 }
else if( HitPosition.
X > OldScrollerRect.
Position.
X + OldScrollerRect.
Size.
X ) {
272 Rect NewScrollerRect;
273 NewScrollerRect.
Size = OldScrollerRect.
Size;
279 NewScrollerRect.
Position.
X = std::min(NewScrollerRect.
Position.
X,this->GetUpperScrollLimit() - OldScrollerRect.
Size.
X);
280 NewScrollerRect.
Position.
X = std::max(NewScrollerRect.
Position.
X,this->GetLowerScrollLimit());
291 Rect NewScrollerRect;
292 NewScrollerRect.
Size = OldScrollerRect.
Size;
298 NewScrollerRect.
Position.
X = std::min(NewScrollerRect.
Position.
X,this->GetUpperScrollLimit() - OldScrollerRect.
Size.
X);
299 NewScrollerRect.
Position.
X = std::max(NewScrollerRect.
Position.
X,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 * Size;
354 NewScrollerRect.
Size.
Y = ScrollBackRect.
Size.
Y;
381 Rect NewScrollerRect;
382 NewScrollerRect.
Size.
X = ScrollBackRect.
Size.
X * ScrollSize;
383 NewScrollerRect.
Size.
Y = ScrollBackRect.
Size.
Y;
400 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() )