mControlPoint1 = CreateControlPoint( parent,
CIRCLE1_IMAGE,
CONTROL_POINT1_ORIGIN );
- mControlPoint1Id = mControlPoint1.GetId();
+ mControlPoint1Id = mControlPoint1.GetProperty< int >( Actor::Property::ID );
mControlPoint2 = CreateControlPoint( parent,
CIRCLE2_IMAGE,
CONTROL_POINT2_ORIGIN );
- mControlPoint2Id = mControlPoint2.GetId();
+ mControlPoint2Id = mControlPoint2.GetProperty< int >( Actor::Property::ID );
Property::Map lineVertexFormat;
lineVertexFormat["aPosition"] = Property::VECTOR2;
mItemView.AddLayout( *mLayout );
- mItemView.SetKeyboardFocusable( true );
+ mItemView.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
mFiles.clear();
FileList files;
*/
void OnQuitOrBack()
{
- if ( mItemView.OnStage() )
+ if ( mItemView.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
mApp.Quit();
}
mDetailText.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
mDetailText.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.textFoldedPosition.x, mContactCardLayoutInfo.textFoldedPosition.y ));
mDetailText.SetProperty( Actor::Property::SIZE, Vector2( mContactCardLayoutInfo.unfoldedSize.width - mContactCardLayoutInfo.textFoldedPosition.x * 2.0f, 0.0f ) );
- mDetailText.SetProperty( DevelActor::Property::OPACITY, 0.0f );
+ mDetailText.SetProperty( Actor::Property::OPACITY, 0.0f );
// Attach tap detection to the overall clip control
mTapDetector = TapGestureDetector::New();
mCurrentImage.SetProperty( Toolkit::ImageView::Property::IMAGE, mDissolveEffect );
mAnimation.AnimateTo( Property( mCurrentImage, "uPercentage" ), 1.0f, AlphaFunction::LINEAR );
- mNextImage.SetProperty( DevelActor::Property::OPACITY,0.0f);
+ mNextImage.SetProperty( Actor::Property::OPACITY,0.0f);
mAnimation.AnimateTo( Property( mNextImage, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunction::LINEAR );
if(mUseHighPrecision)
DALI_LOG_INFO(gDragAndDropFilter, Debug::General, "---OnStart---\n");
DALI_LOG_INFO(gDragAndDropFilter, Debug::General, "---control name is %s---\n", control.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str());
- control.SetProperty( DevelActor::Property::OPACITY,0.1f);
+ control.SetProperty( Actor::Property::OPACITY,0.1f);
Vector2 screenPos = detector.GetCurrentScreenPosition();
control.ScreenToLocal(mDragLocalPos.x, mDragLocalPos.y,screenPos.x, screenPos.y );
Rect<float> targetRect(screenPos.x, screenPos.y, 0.0f, 0.0f);
Animation dropAnimation = Animation::New(0.5f);
dropAnimation.AnimateBetween(Property(mTextLabel[mDragRealIndex], Actor::Property::POSITION), k0, AlphaFunction::EASE_OUT);
- dropAnimation.AnimateBetween(Property(mTextLabel[mDragRealIndex], DevelActor::Property::OPACITY), k1, AlphaFunction::EASE_OUT);
+ dropAnimation.AnimateBetween(Property(mTextLabel[mDragRealIndex], Actor::Property::OPACITY), k1, AlphaFunction::EASE_OUT);
dropAnimation.Play();
}
DALI_LOG_INFO(gDragAndDropFilter, Debug::General, "---OnEnd---\n");
DALI_LOG_INFO(gDragAndDropFilter, Debug::General, "---control name is %s---\n", control.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str());
- control.SetProperty( DevelActor::Property::OPACITY,1.0f);
+ control.SetProperty( Actor::Property::OPACITY,1.0f);
}
private:
contentTable.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
contentTable.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
contentTable.SetCellPadding(Size(MARGIN_SIZE, MARGIN_SIZE * 0.5f));
- contentTable.SetKeyboardFocusable(true);
+ contentTable.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
for( unsigned int i = 0; i < contentTable.GetRows(); ++i )
{
mContainer.SetRelativeHeight( 1, 0.3f);
mContainer.SetRelativeHeight( 2, 0.2f);
mContainer.SetRelativeHeight( 3, 0.3f);
- mContainer.SetKeyboardFocusable(true);
+ mContainer.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
contentTable.Add( mContainer );
// Make name label for each controls
for(int i = 0; i<6; i++)
{
Control control = Control::DownCast( mContainer.GetChildAt( TableView::CellPosition( (i/3)*2+1, i%3 ) ) );
- control.SetKeyboardFocusable(true);
+ control.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
control.SetProperty( Dali::Actor::Property::NAME,ITEMNAME[i]);
control.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
control.KeyEventSignal().Connect( this, &FocusIntegrationExample::OnControlKeyEvent );
// Add the ID of the created ImageView to mFrameCallback.
// Again, can call methods in mFrameCallback directly as we have not set it on the stage yet.
- mFrameCallback.AddId( imageView.GetId() );
+ mFrameCallback.AddId( imageView.GetProperty< int >( Actor::Property::ID ) );
mStage.Add( imageView );
text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
text.SetProperty( Actor::Property::POSITION, position );
- text.SetProperty( DevelActor::Property::OPACITY, 0.0f );
+ text.SetProperty( Actor::Property::OPACITY, 0.0f );
text.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, Text::HorizontalAlignment::CENTER );
text.SetProperty( TextLabel::Property::MULTI_LINE, true );
parent.Add( text );
mScrollParent.Add( page );
}
- mScrollParent.SetProperty( DevelActor::Property::OPACITY, 1.0f );
+ mScrollParent.SetProperty( Actor::Property::OPACITY, 1.0f );
mScrollParent.SetProperty( Actor::Property::SCALE, Vector3::ONE );
// Fade in.
mGrabCorner.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT );
mGrabCorner.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_RIGHT );
mGrabCorner.SetProperty( Actor::Property::POSITION, Vector2( -BORDER_WIDTH, -BORDER_WIDTH ));
- mGrabCorner.SetProperty( DevelActor::Property::OPACITY, 0.6f );
+ mGrabCorner.SetProperty( Actor::Property::OPACITY, 0.6f );
Layer grabCornerLayer = Layer::New();
grabCornerLayer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT );
imagePrevious.RotateBy( Radian(3.14159265358979323846f), Vector3( 0, 1.0f, 0 ) );
imagePrevious.SetProperty( Actor::Property::POSITION_Y, playWidth * 0.5f );
imagePrevious.SetProperty( Actor::Property::POSITION_X, playWidth + playWidth * 0.5f );
- imagePrevious.SetProperty( DevelActor::Property::OPACITY, 0.6f );
+ imagePrevious.SetProperty( Actor::Property::OPACITY, 0.6f );
controlsLayer.Add( imagePrevious );
imagePrevious.SetProperty( Dali::Actor::Property::NAME, PREVIOUS_BUTTON_ID );
imagePrevious.TouchSignal().Connect( this, &ImageScalingAndFilteringController::OnControlTouched );
imageNext.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT );
imageNext.SetProperty( Actor::Property::POSITION_Y, playWidth * 0.5f );
imageNext.SetProperty( Actor::Property::POSITION_X, stage.GetSize().x - playWidth * 0.5f );
- imageNext.SetProperty( DevelActor::Property::OPACITY, 0.6f );
+ imageNext.SetProperty( Actor::Property::OPACITY, 0.6f );
controlsLayer.Add( imageNext );
imageNext.SetProperty( Dali::Actor::Property::NAME, NEXT_BUTTON_ID );
imageNext.TouchSignal().Connect( this, &ImageScalingAndFilteringController::OnControlTouched );
image.SetProperty( Actor::Property::SIZE, imageSize );
image.TouchSignal().Connect( this, &ImageScalingIrregularGridController::OnTouchImage );
image.ResourceReadySignal().Connect( this, &ImageScalingIrregularGridController::ResourceReadySignal );
- mFittingModes[image.GetId()] = fittingMode;
- mResourceUrls[image.GetId()] = imageSource.configuration.path;
- mSizes[image.GetId()] = imageSize;
+ mFittingModes[image.GetProperty< int >( Actor::Property::ID )] = fittingMode;
+ mResourceUrls[image.GetProperty< int >( Actor::Property::ID )] = imageSource.configuration.path;
+ mSizes[image.GetProperty< int >( Actor::Property::ID )] = imageSize;
if ( count < INITIAL_IMAGES_TO_LOAD )
{
gridActor.Add( image );
animation.Play();
// Change the scaling mode:
- const unsigned id = actor.GetId();
+ const unsigned id = actor.GetProperty< int >( Actor::Property::ID );
Dali::FittingMode::Type newMode = NextMode( mFittingModes[id] );
- const Vector2 imageSize = mSizes[actor.GetId()];
+ const Vector2 imageSize = mSizes[actor.GetProperty< int >( Actor::Property::ID )];
ImageView imageView = ImageView::DownCast( actor );
if( imageView)
if( gridImageView )
{
// Cycle the scaling mode options:
- unsigned int id = gridImageView.GetId();
+ unsigned int id = gridImageView.GetProperty< int >( Actor::Property::ID );
const Vector2 imageSize = mSizes[ id ];
Dali::FittingMode::Type newMode = NextMode( mFittingModes[ id ] );
{
unsigned int buttonIndex = GetButtonIndex( button );
- if( mImageViews[buttonIndex].OnStage() )
+ if( mImageViews[buttonIndex].GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
++mImageViewImageIndexStatus[buttonIndex];
{
unsigned int buttonIndex = GetButtonIndex( button );
- if( mImageViews[buttonIndex].OnStage() )
+ if( mImageViews[buttonIndex].GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
mImageViewRoundedCornerStatus[ buttonIndex ] = !mImageViewRoundedCornerStatus[ buttonIndex ];
// Activate the spiral layout
SetLayout( mCurrentLayout );
- mItemView.SetKeyboardFocusable( true );
+ mItemView.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
KeyboardFocusManager::Get().PreFocusChangeSignal().Connect( this, &ItemViewExample::OnKeyboardPreFocusChange );
// Set the title and icon to the current layout
actor.Add(borderActor);
- actor.SetKeyboardFocusable( true );
+ actor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
Vector3 spiralItemSize;
static_cast<ItemLayout&>(*mSpiralLayout).GetItemSize( 0u, Vector3( Stage::GetCurrent().GetSize() ), spiralItemSize );
Control control = Control::New();
control.SetBackgroundColor( Vector4( Random::Range( 0.0f, 1.0f ), Random::Range( 0.0f, 1.0f ), Random::Range( 0.0f, 1.0f ), 1.0f ) );
control.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- control.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false ); // Ensures the position always uses top-left for its calculations.
+ control.SetProperty( Actor::Property::POSITION_USES_ANCHOR_POINT, false ); // Ensures the position always uses top-left for its calculations.
control.SetProperty( Actor::Property::ANCHOR_POINT, anchorPoint ); // This anchor-point is used for the rotation and the scale.
// Add to the table-view
void RedComponentNotification( PropertyNotification& /* source */ )
{
Animation animation = Animation::New( OPACITY_ANIMATION_DURATION );
- animation.AnimateTo( Property( mTextLabel, DevelActor::Property::OPACITY ), 0.0f );
+ animation.AnimateTo( Property( mTextLabel, Actor::Property::OPACITY ), 0.0f );
animation.Play();
}
{
control.TouchSignal().Connect(this, &MyTester::OnControlTouch);
- control.SetKeyboardFocusable(true);
+ control.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
control.KeyEventSignal().Connect(this, &MyTester::OnControlKeyEvent);
control.KeyInputFocusGainedSignal().Connect(this, &MyTester::OnFocusSet);
control.KeyInputFocusLostSignal().Connect(this, &MyTester::OnFocusUnSet);
mImageView1.SetProperty( Dali::Actor::Property::NAME,"mImageView1");
mImageView1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
mImageView1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER);
- mImageView1.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false);
+ mImageView1.SetProperty(Actor::Property::POSITION_USES_ANCHOR_POINT, false);
mImageView1.SetProperty( Actor::Property::POSITION, Vector2(0, 100));
mImageView1.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f));
stage.Add(mImageView1);
mImageView2.SetProperty( Dali::Actor::Property::NAME,"mImageView2");
mImageView2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
mImageView2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER);
- mImageView2.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false);
+ mImageView2.SetProperty(Actor::Property::POSITION_USES_ANCHOR_POINT, false);
mImageView2.SetProperty( Actor::Property::POSITION, Vector2(400, 100));
mImageView2.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f));
stage.Add(mImageView2);
mImageView3.SetProperty( Dali::Actor::Property::NAME,"mImageView3");
mImageView3.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
mImageView3.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER);
- mImageView3.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false);
+ mImageView3.SetProperty(Actor::Property::POSITION_USES_ANCHOR_POINT, false);
mImageView3.SetProperty( Actor::Property::POSITION, Vector2(0, 400));
mImageView3.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f));
stage.Add(mImageView3);
mImageView4.SetProperty( Dali::Actor::Property::NAME,"mImageView4");
mImageView4.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
mImageView4.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER);
- mImageView4.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false);
+ mImageView4.SetProperty(Actor::Property::POSITION_USES_ANCHOR_POINT, false);
mImageView4.SetProperty( Actor::Property::POSITION, Vector2(400, 400));
mImageView4.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f));
stage.Add(mImageView4);
mImageView5.SetProperty( Dali::Actor::Property::NAME,"mImageView5");
mImageView4.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
mImageView5.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER);
- mImageView5.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false);
+ mImageView5.SetProperty(Actor::Property::POSITION_USES_ANCHOR_POINT, false);
mImageView5.SetProperty( Actor::Property::POSITION, Vector2(800, 100));
mImageView5.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f));
stage.Add(mImageView5);
void MyControl::OnInitialize()
{
Dali::Actor self = Self();
- self.SetKeyboardFocusable( true );
+ self.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
}
void MyControl::SetProperty( BaseObject* object, Property::Index index, const Property::Value& value )
grabHandle.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_RIGHT );
grabHandle.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT );
grabHandle.SetProperty( Actor::Property::POSITION, Vector2( -BORDER_WIDTH, -BORDER_WIDTH ));
- grabHandle.SetProperty( DevelActor::Property::OPACITY, 0.6f );
+ grabHandle.SetProperty( Actor::Property::OPACITY, 0.6f );
Layer grabCornerLayer = Layer::New();
grabCornerLayer.SetProperty( Dali::Actor::Property::NAME,"GrabCornerLayer");
// Use a white button with 50% transparency as a clear color button
if ( Color::WHITE == AVAILABLE_COLORS[ index ] && styleButtonIndex != StyleType::TEXT_COLOR )
{
- mColorButtons[index].SetProperty( DevelActor::Property::OPACITY,0.5f);
+ mColorButtons[index].SetProperty( Actor::Property::OPACITY,0.5f);
mColorButtons[index].SetProperty( Toolkit::Button::Property::LABEL,
Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT )
*/
void ReturnToPreviousScreen()
{
- if ( mItemView.OnStage() )
+ if ( mItemView.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
// Quit the application if it is in the main menu
mApplication.Quit();
mLabels[0].SetProperty( Dali::Actor::Property::NAME,"Label1");
mLabels[1].SetProperty( Dali::Actor::Property::NAME,"Label2");
- mLabels[0].SetProperty( DevelActor::Property::SIBLING_ORDER, 1 );
- mLabels[1].SetProperty( DevelActor::Property::SIBLING_ORDER, 2 );
+ mLabels[0].SetProperty( Dali::DevelActor::Property::SIBLING_ORDER, 1 );
+ mLabels[1].SetProperty( Dali::DevelActor::Property::SIBLING_ORDER, 2 );
mLabels[0].SetProperty( Control::Property::BACKGROUND, Color::RED );
mLabels[1].SetProperty( Control::Property::BACKGROUND, Color::YELLOW );
{
mCheckState = checkState;
DevelControl::EnableVisual( *this, Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, true );
- if( Self().OnStage() )
+ if( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
if( checkState )
{
bool OnButtonClicked( Button button )
{
- if( mPauseButton.GetId() == button.GetId())
+ if( mPauseButton.GetProperty< int >( Actor::Property::ID ) == button.GetProperty< int >( Actor::Property::ID ))
{
if( mIsPlay )
{
mVideoView.Pause();
}
}
- else if( mPlayButton.GetId() == button.GetId())
+ else if( mPlayButton.GetProperty< int >( Actor::Property::ID ) == button.GetProperty< int >( Actor::Property::ID ))
{
mPauseButton.SetProperty( Actor::Property::VISIBLE, true );
mPauseButton.SetProperty( Button::Property::DISABLED, false );
mIsPlay = true;
mVideoView.Play();
}
- else if( mChangeButton.GetId() == button.GetId())
+ else if( mChangeButton.GetProperty< int >( Actor::Property::ID ) == button.GetProperty< int >( Actor::Property::ID ))
{
bool underlay = false;
underlay = mVideoView.GetProperty( Toolkit::VideoView::Property::UNDERLAY ).Get< bool >();
mVideoView.SetProperty( Toolkit::VideoView::Property::UNDERLAY, true );
}
}
- else if( mBackwardButton.GetId() == button.GetId())
+ else if( mBackwardButton.GetProperty< int >( Actor::Property::ID ) == button.GetProperty< int >( Actor::Property::ID ))
{
mVideoView.Backward( SEEK_POS );
}
- else if( mForwardButton.GetId() == button.GetId())
+ else if( mForwardButton.GetProperty< int >( Actor::Property::ID ) == button.GetProperty< int >( Actor::Property::ID ))
{
mVideoView.Forward( SEEK_POS );
}
focusableTile.SetProperty( Actor::Property::NAME, name );
// Set the tile to be keyboard focusable
- focusableTile.SetKeyboardFocusable( true );
+ focusableTile.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
// Register a property with the ImageView. This allows us to inject the scroll-view position into the shader.
Property::Value value = Vector3( 0.0f, 0.0f, 0.0f );
borderImage.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
borderImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
borderImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- borderImage.SetProperty( DevelActor::Property::OPACITY, 0.8f );
+ borderImage.SetProperty( Actor::Property::OPACITY, 0.8f );
focusableTile.Add( borderImage );
TextLabel label = TextLabel::New();