projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'devel/master' into devel/new_mesh
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
controls
/
slider
/
slider-impl.cpp
diff --git
a/dali-toolkit/internal/controls/slider/slider-impl.cpp
b/dali-toolkit/internal/controls/slider/slider-impl.cpp
index
94d4bbe
..
38ceffe
100755
(executable)
--- a/
dali-toolkit/internal/controls/slider/slider-impl.cpp
+++ b/
dali-toolkit/internal/controls/slider/slider-impl.cpp
@@
-24,7
+24,7
@@
#include <limits>
#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/object/type-registry.h>
#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
#include <dali/public-api/images/resource-image.h>
// INTERNAL INCLUDES
@@
-209,7
+209,7
@@
void Slider::OnInitialize()
self.SetSize( DEFAULT_HIT_REGION.x, DEFAULT_HIT_REGION.y );
}
self.SetSize( DEFAULT_HIT_REGION.x, DEFAULT_HIT_REGION.y );
}
-void Slider::On
Control
SizeSet( const Vector3& size )
+void Slider::OnSizeSet( const Vector3& size )
{
// Factor in handle overshoot into size of backing
SetHitRegion( Vector2( size.x, GetHitRegion().y ) );
{
// Factor in handle overshoot into size of backing
SetHitRegion( Vector2( size.x, GetHitRegion().y ) );
@@
-355,14
+355,7
@@
void Slider::DisplayValue( float value, bool raiseSignals )
void Slider::SetMarks( const MarkList& marks )
{
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 Slider::MarkList& Slider::GetMarks() const
@@
-577,7
+570,6
@@
void Slider::CreateHandleValueDisplay()
mHandleValueTextLabel.SetAnchorPoint( AnchorPoint::CENTER );
mHandleValueTextLabel.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
mHandleValueTextLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
mHandleValueTextLabel.SetAnchorPoint( AnchorPoint::CENTER );
mHandleValueTextLabel.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
mHandleValueTextLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
- mHandleValueTextLabel.SetDrawMode( DrawMode::OVERLAY );
mHandle.Add( mHandleValueTextLabel );
}
}
mHandle.Add( mHandleValueTextLabel );
}
}
@@
-732,9
+724,9
@@
float Slider::MarkFilter( float value )
const float MARK_TOLERANCE = GetMarkTolerance();
float mark;
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 );
propertyValue.Get( mark );
mark = MapValuePercentage( mark );
@@
-754,9
+746,9
@@
float Slider::SnapToMark( float value )
float closestDist = std::numeric_limits<float>::max();
float 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 );
propertyValue.Get( mark );
mark = MapValuePercentage( mark );
@@
-777,7
+769,7
@@
bool Slider::MarkReached( float value, int& outIndex )
// Binary search
int head = 0,
// Binary search
int head = 0,
- tail = mMarks.
s
ize() - 1;
+ tail = mMarks.
S
ize() - 1;
int current;
float mark;
int current;
float mark;