map[Toolkit::ImageVisual::Property::FITTING_MODE] = fittingMode;
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, map );
map[Toolkit::ImageVisual::Property::FITTING_MODE] = fittingMode;
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, map );
- imageView.SetName( filename );
- imageView.SetParentOrigin(ParentOrigin::CENTER);
- imageView.SetAnchorPoint(AnchorPoint::CENTER);
+ imageView.SetProperty( Dali::Actor::Property::NAME, filename );
+ imageView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ imageView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
- mOffStageImageViews.SetAnchorPoint( AnchorPoint::CENTER );
- mOffStageImageViews.SetParentOrigin(ParentOrigin::CENTER);
+ mOffStageImageViews.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ mOffStageImageViews.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
mOffStageImageViews.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
// Build the main content of the widow:
mOffStageImageViews.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
// Build the main content of the widow:
mScrollView.ScrollStartedSignal().Connect( this, &ImageScalingIrregularGridController::OnScrollStarted );
mScrollView.ScrollCompletedSignal().Connect( this, &ImageScalingIrregularGridController::OnScrollCompleted );
mScrollView.ScrollStartedSignal().Connect( this, &ImageScalingIrregularGridController::OnScrollStarted );
mScrollView.ScrollCompletedSignal().Connect( this, &ImageScalingIrregularGridController::OnScrollCompleted );
- mScrollView.SetAnchorPoint(AnchorPoint::CENTER);
- mScrollView.SetParentOrigin(ParentOrigin::CENTER);
+ mScrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+ mScrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- mScrollBarVertical.SetParentOrigin(ParentOrigin::TOP_RIGHT);
- mScrollBarVertical.SetAnchorPoint(AnchorPoint::TOP_RIGHT);
+ mScrollBarVertical.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_RIGHT);
+ mScrollBarVertical.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_RIGHT);
mScrollBarVertical.SetResizePolicy(Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::HEIGHT);
mScrollBarVertical.SetResizePolicy(Dali::ResizePolicy::FIT_TO_CHILDREN, Dali::Dimension::WIDTH);
mScrollView.Add(mScrollBarVertical);
mScrollBarHorizontal = ScrollBar::New(Toolkit::ScrollBar::Horizontal);
mScrollBarVertical.SetResizePolicy(Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::HEIGHT);
mScrollBarVertical.SetResizePolicy(Dali::ResizePolicy::FIT_TO_CHILDREN, Dali::Dimension::WIDTH);
mScrollView.Add(mScrollBarVertical);
mScrollBarHorizontal = ScrollBar::New(Toolkit::ScrollBar::Horizontal);
- mScrollBarHorizontal.SetParentOrigin(ParentOrigin::BOTTOM_LEFT);
- mScrollBarHorizontal.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ mScrollBarHorizontal.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_LEFT);
+ mScrollBarHorizontal.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
mScrollView.Add(mScrollBarHorizontal);
mScrollView.OnRelayoutSignal().Connect( this, &ImageScalingIrregularGridController::OnScrollViewRelayout );
mScrollView.Add(mScrollBarHorizontal);
mScrollView.OnRelayoutSignal().Connect( this, &ImageScalingIrregularGridController::OnScrollViewRelayout );
void OnScrollViewRelayout(Actor actor)
{
// Make the height of the horizontal scroll bar to be the same as the width of scroll view.
void OnScrollViewRelayout(Actor actor)
{
// Make the height of the horizontal scroll bar to be the same as the width of scroll view.
Actor gridActor = Actor::New();
gridActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
Actor gridActor = Actor::New();
gridActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- gridActor.SetParentOrigin( ParentOrigin::CENTER );
- gridActor.SetAnchorPoint( AnchorPoint::CENTER );
+ gridActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ gridActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
// Work out the constants of the grid and cell dimensions and positions:
const float cellWidth = fieldWidth / gridWidth;
// Work out the constants of the grid and cell dimensions and positions:
const float cellWidth = fieldWidth / gridWidth;
const Vector2 imagePosition = imageRegionCorner + Vector2( GRID_CELL_PADDING , GRID_CELL_PADDING ) + imageSize * 0.5f;
ImageView image = CreateImageView( imageSource.configuration.path, imageSize.x, imageSize.y, fittingMode );
const Vector2 imagePosition = imageRegionCorner + Vector2( GRID_CELL_PADDING , GRID_CELL_PADDING ) + imageSize * 0.5f;
ImageView image = CreateImageView( imageSource.configuration.path, imageSize.x, imageSize.y, fittingMode );
- image.SetPosition( Vector3( imagePosition.x, imagePosition.y, 0 ) );
- image.SetSize( imageSize );
+ image.SetProperty( Actor::Property::POSITION, Vector3( imagePosition.x, imagePosition.y, 0 ) );
+ image.SetProperty( Actor::Property::SIZE, imageSize );
image.TouchSignal().Connect( this, &ImageScalingIrregularGridController::OnTouchImage );
image.ResourceReadySignal().Connect( this, &ImageScalingIrregularGridController::ResourceReadySignal );
mFittingModes[image.GetId()] = fittingMode;
image.TouchSignal().Connect( this, &ImageScalingIrregularGridController::OnTouchImage );
image.ResourceReadySignal().Connect( this, &ImageScalingIrregularGridController::ResourceReadySignal );
mFittingModes[image.GetId()] = fittingMode;