Remove Setter/Getter public APIs from Dali::Layer
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / popup / popup-impl.cpp
index 8672c4a..45d56f6 100644 (file)
@@ -82,7 +82,7 @@ BaseHandle CreateToast()
   Toolkit::Popup popup = Toolkit::Popup::New();
 
   // Setup for Toast Popup type.
-  popup.SetSizeModeFactor( DEFAULT_TOAST_WIDTH_OF_STAGE_RATIO );
+  popup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, DEFAULT_TOAST_WIDTH_OF_STAGE_RATIO );
   popup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
   popup.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
   popup.SetProperty( Toolkit::Popup::Property::CONTEXTUAL_MODE, Toolkit::Popup::NON_CONTEXTUAL );
@@ -282,7 +282,7 @@ void Popup::OnInitialize()
   self.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
   self.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
 
-  self.SetSizeModeFactor( DEFAULT_POPUP_PARENT_RELATIVE_SIZE );
+  self.SetProperty( Actor::Property::SIZE_MODE_FACTOR, DEFAULT_POPUP_PARENT_RELATIVE_SIZE );
   self.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
   self.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
 
@@ -325,7 +325,7 @@ void Popup::OnInitialize()
 
   mPopupLayout.SetResizePolicy( ResizePolicy::USE_ASSIGNED_SIZE, Dimension::WIDTH );
   mPopupLayout.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
-  mPopupLayout.SetSize( Stage::GetCurrent().GetSize().x * DEFAULT_RELATIVE_PARENT_WIDTH, 0.0f );
+  mPopupLayout.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x * DEFAULT_RELATIVE_PARENT_WIDTH, 0.0f ) );
 
   mPopupLayout.SetFitHeight( 0 ); // Set row to fit.
   mPopupLayout.SetFitHeight( 1 ); // Set row to fit.
@@ -354,7 +354,7 @@ void Popup::LayoutAnimation()
     case Toolkit::Popup::ZOOM:
     {
       // Zoom animations start fully zoomed out.
-      mPopupContainer.SetScale( Vector3::ZERO );
+      mPopupContainer.SetProperty( Actor::Property::SCALE, Vector3::ZERO );
       break;
     }
 
@@ -435,7 +435,7 @@ void Popup::StartTransitionAnimation( bool transitionIn, bool instantaneous /* f
       }
       else
       {
-        mPopupContainer.SetScale( transitionIn ? Vector3::ONE : Vector3::ZERO );
+        mPopupContainer.SetProperty( Actor::Property::SCALE, transitionIn ? Vector3::ONE : Vector3::ZERO );
       }
       break;
     }
@@ -636,7 +636,7 @@ void Popup::SetTitle( Actor titleActor )
   {
     // Set up padding to give sensible default behaviour
     // (an application developer can later override this if they wish).
-    mTitle.SetPadding( DEFAULT_TITLE_PADDING );
+    mTitle.SetProperty( Actor::Property::PADDING, DEFAULT_TITLE_PADDING );
 
     mPopupLayout.AddChild( mTitle, Toolkit::TableView::CellPosition( 0, 0 ) );
   }
@@ -823,11 +823,11 @@ void Popup::LayoutPopup()
   {
     if( !mContent && !mFooter )
     {
-      mTitle.SetPadding( DEFAULT_TITLE_ONLY_PADDING );
+      mTitle.SetProperty( Actor::Property::PADDING, DEFAULT_TITLE_ONLY_PADDING );
     }
     else
     {
-      mTitle.SetPadding( DEFAULT_TITLE_PADDING );
+      mTitle.SetProperty( Actor::Property::PADDING, DEFAULT_TITLE_PADDING );
     }
   }
 
@@ -898,7 +898,7 @@ void Popup::LayoutTail()
     mTailImage.SetProperty( Dali::Actor::Property::NAME, "tailImage" );
     mTailImage.SetProperty( Actor::Property::PARENT_ORIGIN, parentOrigin );
     mTailImage.SetProperty( Actor::Property::ANCHOR_POINT, anchorPoint );
-    mTailImage.SetPosition( position );
+    mTailImage.SetProperty( Actor::Property::POSITION, position );
 
     if( mPopupBackgroundImage )
     {
@@ -931,7 +931,7 @@ Toolkit::Control Popup::CreateBacking()
 
   // Always the full size of the stage.
   backing.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
-  backing.SetSize( Stage::GetCurrent().GetSize() );
+  backing.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize() );
 
   // Catch events.
   backing.SetProperty( Actor::Property::SENSITIVE, true );
@@ -1029,10 +1029,10 @@ void Popup::UpdateBackgroundPositionAndSize()
   if( mPopupBackgroundImage )
   {
     mPopupBackgroundImage.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS );
-    mPopupBackgroundImage.SetSizeModeFactor( Vector3( mBackgroundBorder.left + mBackgroundBorder.right, mBackgroundBorder.top + mBackgroundBorder.bottom, 0.0f ) );
+    mPopupBackgroundImage.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( mBackgroundBorder.left + mBackgroundBorder.right, mBackgroundBorder.top + mBackgroundBorder.bottom, 0.0f ) );
 
     // Adjust the position of the background so the transparent areas are set appropriately
-    mPopupBackgroundImage.SetPosition( ( mBackgroundBorder.right - mBackgroundBorder.left ) * 0.5f, ( mBackgroundBorder.bottom - mBackgroundBorder.top ) * 0.5f );
+    mPopupBackgroundImage.SetProperty( Actor::Property::POSITION, Vector2( ( mBackgroundBorder.right - mBackgroundBorder.left ) * 0.5f, ( mBackgroundBorder.bottom - mBackgroundBorder.top ) * 0.5f ));
   }
 }
 
@@ -1552,7 +1552,7 @@ bool Popup::OnBackingTouched( Actor actor, const TouchData& touch )
   }
 
   // Block anything behind backing becoming touched.
-  mLayer.SetTouchConsumed( true );
+  mLayer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
   return true;
 }
 
@@ -1565,7 +1565,7 @@ bool Popup::OnBackingWheelEvent( Actor actor, const WheelEvent& event )
   }
 
   // Consume wheel event in dimmed backing actor.
-  mLayer.SetTouchConsumed( true );
+  mLayer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
   return true;
 }
 
@@ -1578,7 +1578,7 @@ bool Popup::OnDialogTouched( Actor actor, const TouchData& touch )
   }
 
   // Consume event (stops backing actor receiving touch events)
-  mLayer.SetTouchConsumed( true );
+  mLayer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
   return true;
 }
 
@@ -1687,7 +1687,7 @@ void Popup::LayoutContext( const Vector2& size )
   }
 
   // Set the final position.
-  mPopupContainer.SetPosition( newPosition );
+  mPopupContainer.SetProperty( Actor::Property::POSITION, newPosition );
 }
 
 void Popup::OnRelayout( const Vector2& size, RelayoutContainer& container )