Further Setter/Getter public API removal from Dali::Actor
[platform/core/uifw/dali-demo.git] / examples / size-negotiation / size-negotiation-example.cpp
index 98228d9..dab5447 100644 (file)
@@ -183,7 +183,7 @@ public:
     popup.SetProperty( Dali::Actor::Property::NAME, "popup" );
     popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
     popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
-    popup.SetSize( POPUP_WIDTH_DP, 0.0f );
+    popup.SetProperty( Actor::Property::SIZE, Vector2( POPUP_WIDTH_DP, 0.0f ) );
     popup.SetProperty( Toolkit::Popup::Property::TAIL_VISIBILITY, false );
 
     popup.OutsideTouchedSignal().Connect( this, &SizeNegotiationController::OnPopupOutsideTouched );
@@ -198,7 +198,7 @@ public:
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::TableView table = Toolkit::TableView::New( 0, 0 );
       table.SetProperty( Dali::Actor::Property::NAME, "TABLEVIEW_BUTTON_1CELL_ID" );
@@ -216,7 +216,7 @@ public:
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
       table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
@@ -245,7 +245,7 @@ public:
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 3 );
       table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
@@ -309,7 +309,7 @@ public:
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
       table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
@@ -360,7 +360,7 @@ public:
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
       table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
@@ -418,7 +418,7 @@ public:
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
       table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
@@ -428,7 +428,7 @@ public:
       {
         Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 100.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
@@ -461,7 +461,7 @@ public:
       {
         Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 100.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
@@ -484,7 +484,7 @@ public:
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
       table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
@@ -509,7 +509,7 @@ public:
       {
         Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 200.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
@@ -548,7 +548,7 @@ public:
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 1.0f, 1.0f ) );
       mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
@@ -561,7 +561,7 @@ public:
       {
         Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 100.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
@@ -578,7 +578,7 @@ public:
       {
         Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 200.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
@@ -595,7 +595,7 @@ public:
       {
         Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 300.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 300.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
@@ -618,7 +618,7 @@ public:
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 1.0f, 1.0f ) );
       mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
@@ -631,7 +631,7 @@ public:
         Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
         backing.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
-        backing.SetSize( 0.0f, 100.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
@@ -648,7 +648,7 @@ public:
       {
         Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 200.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
@@ -671,7 +671,7 @@ public:
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 1.0f, 1.0f ) );
       mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
@@ -699,7 +699,7 @@ public:
       {
         Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 200.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
@@ -721,7 +721,7 @@ public:
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::ImageView image = Toolkit::ImageView::New( IMAGE );
       image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
@@ -734,11 +734,11 @@ public:
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::ImageView image = Toolkit::ImageView::New( IMAGE );
       image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      image.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
+      image.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
 
       mPopup.Add( image );
 
@@ -748,11 +748,11 @@ public:
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::ImageView image = Toolkit::ImageView::New( IMAGE );
       image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      image.SetSizeScalePolicy( SizeScalePolicy::FILL_WITH_ASPECT_RATIO );
+      image.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FILL_WITH_ASPECT_RATIO );
 
       mPopup.Add( image );