40 #ifndef _uispinner_cpp
41 #define _uispinner_cpp
43 #include "UI/spinner.h"
44 #include "UI/button.h"
45 #include "UI/screen.h"
46 #include "UI/uimanager.h"
48 #include "Input/inputmanager.h"
49 #include "Input/mouse.h"
50 #include "stringtool.h"
487 // PageProvider Methods
489 Real Spinner::GetMaxXPages() const
490 { return this->MaxXPages; }
492 Real Spinner::GetMaxYPages() const
493 { return this->MaxYPages; }
495 Real Spinner::GetCurrentXPage() const
497 Real PageValue = static_cast<Real>( this->Target->GetSpinnerValue() );
498 if( this->PageOrder == UI::OP_Horizontal_Vertical ) {
499 return MathTool::Ceil( PageValue / this->MaxXPages );
500 }else if( this->PageOrder == UI::OP_Vertical_Horizontal ) {
501 return MathTool::Fmod( PageValue, this->MaxYPages );
506 Real Spinner::GetCurrentYPage() const
508 Real PageValue = static_cast<Real>( this->Target->GetSpinnerValue() );
509 if( this->PageOrder == UI::OP_Horizontal_Vertical ) {
510 return MathTool::Ceil( PageValue / this->MaxXPages );
511 }else if( this->PageOrder == UI::OP_Vertical_Horizontal ) {
512 return MathTool::Fmod( PageValue, this->MaxYPages );
517 void Spinner::SetOrdering(const UI::OrderingPriority Order)
518 { this->PageOrder = Order; }
520 UI::OrderingPriority Spinner::GetOrdering() const
521 { return this->PageOrder; }
526 void Spinner::ProtoSerializePageData(XML::Node& SelfRoot) const
529 void Spinner::ProtoDeSerializePageData(const XML::Node& SelfRoot)
535 void Spinner::_SetContainer(PagedContainer* ToUpdate)
536 { this->Container = ToUpdate; }
538 void Spinner::_NotifyContainerUpdated()
539 { this->Target->SetValueLimits(1,this->MaxXPages * this->MaxYPages); }//*/