Further Setter/Getter public API removal from Dali::Actor
[platform/core/uifw/dali-demo.git] / examples / clipping / clipping-example.cpp
index 884bc18..408d5c5 100644 (file)
@@ -83,8 +83,8 @@ private:
 
     // Create a TextLabel for the application title.
     Toolkit::TextLabel label = Toolkit::TextLabel::New( APPLICATION_TITLE );
-    label.SetAnchorPoint( AnchorPoint::TOP_CENTER );
-    label.SetParentOrigin( APPLICATION_TITLE_PARENT_ORIGIN );
+    label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
+    label.SetProperty( Actor::Property::PARENT_ORIGIN, APPLICATION_TITLE_PARENT_ORIGIN );
     label.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
     label.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
     label.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
@@ -92,8 +92,8 @@ private:
 
     // Create an item-view which clips its children.
     mItemView = ItemView::New( mClippingItemFactory );
-    mItemView.SetParentOrigin( ParentOrigin::CENTER );
-    mItemView.SetAnchorPoint( AnchorPoint::CENTER );
+    mItemView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+    mItemView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
     mItemView.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN ); // Enable clipping. No need to create any renderers.
     stage.Add( mItemView );
 
@@ -116,14 +116,14 @@ private:
 
     // Create a border around item-view (as item-view is clipping its children, we should NOT add this as a child of item-view).
     Control border = Control::New();
-    border.SetParentOrigin( ParentOrigin::CENTER );
-    border.SetAnchorPoint( AnchorPoint::CENTER );
+    border.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+    border.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
     border.SetProperty( Control::Property::BACKGROUND,
                         Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::BORDER )
                                        .Add( BorderVisual::Property::COLOR, Color::WHITE )
                                        .Add( BorderVisual::Property::SIZE, 2.0f )
                                        .Add( BorderVisual::Property::ANTI_ALIASING, true ) );
-    border.SetSize( Vector3( itemViewLayoutSize.x + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.y + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.z + ITEM_VIEW_BORDER_SIZE * 2.0f ) );
+    border.SetProperty( Actor::Property::SIZE, Vector3( itemViewLayoutSize.x + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.y + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.z + ITEM_VIEW_BORDER_SIZE * 2.0f ) );
     stage.Add( border );
 
     // Constrain the border's orientation to the orientation of item-view.
@@ -133,8 +133,8 @@ private:
 
     // Create a button to toggle the clipping mode
     PushButton button = Toolkit::PushButton::New();
-    button.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
-    button.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
+    button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
+    button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
     button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
     button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
     button.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D );