#include <limits>
#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/object/type-registry.h>
-#include <dali/public-api/object/type-registry-helper.h>
+#include <dali/devel-api/object/type-registry-helper.h>
#include <dali/public-api/images/resource-image.h>
// INTERNAL INCLUDES
self.SetSize( DEFAULT_HIT_REGION.x, DEFAULT_HIT_REGION.y );
}
-void Slider::OnControlSizeSet( const Vector3& size )
+void Slider::OnSizeSet( const Vector3& size )
{
// Factor in handle overshoot into size of backing
SetHitRegion( Vector2( size.x, GetHitRegion().y ) );
void Slider::SetMarks( const MarkList& marks )
{
- float value;
- for( MarkList::const_iterator it = marks.begin(), itEnd = marks.end(); it != itEnd; ++it )
- {
- const Property::Value& propertyValue = *it;
- propertyValue.Get( value );
-
- mMarks.push_back( value );
- }
+ mMarks = marks;
}
const Slider::MarkList& Slider::GetMarks() const
const float MARK_TOLERANCE = GetMarkTolerance();
float mark;
- for( MarkList::iterator it = mMarks.begin(), itEnd = mMarks.end(); it != itEnd; ++it )
+ for( MarkList::SizeType i = 0; i < mMarks.Count(); ++i)
{
- const Property::Value& propertyValue = *it;
+ const Property::Value& propertyValue = mMarks[i];
propertyValue.Get( mark );
mark = MapValuePercentage( mark );
float closestDist = std::numeric_limits<float>::max();
float mark;
- for( MarkList::iterator it = mMarks.begin(), itEnd = mMarks.end(); it != itEnd; ++it )
+ for( MarkList::SizeType i = 0; i < mMarks.Count(); ++i)
{
- const Property::Value& propertyValue = *it;
+ const Property::Value& propertyValue = mMarks[i];
propertyValue.Get( mark );
mark = MapValuePercentage( mark );
// Binary search
int head = 0,
- tail = mMarks.size() - 1;
+ tail = mMarks.Size() - 1;
int current;
float mark;