Commit 2e182925204bf3ef9f2a36cbfbf998e79fbafaf5
1 parent
a16ab000
Further Setter/Getter public API removal from Dali::Actor
Change-Id: If168017bda9472f348e4a6d2a44a3f2e83c5261c
Showing
98 changed files
with
416 additions
and
434 deletions
builder/dali-builder.cpp
| ... | ... | @@ -217,7 +217,7 @@ private: |
| 217 | 217 | layer = Layer::New(); |
| 218 | 218 | layer.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); |
| 219 | 219 | layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); |
| 220 | - layer.SetSize( stage.GetRootLayer().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) ); | |
| 220 | + layer.SetProperty( Actor::Property::SIZE, stage.GetRootLayer().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) ); | |
| 221 | 221 | stage.GetRootLayer().Add(layer); |
| 222 | 222 | |
| 223 | 223 | // render tasks may have been setup last load so remove them | ... | ... |
examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp
| ... | ... | @@ -60,21 +60,21 @@ private: |
| 60 | 60 | |
| 61 | 61 | mImageView = Toolkit::ImageView::New(); |
| 62 | 62 | |
| 63 | - mImageView.SetSize(200, 200); | |
| 63 | + mImageView.SetProperty( Actor::Property::SIZE, Vector2(200, 200) ); | |
| 64 | 64 | mImageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 65 | 65 | stage.Add(mImageView); |
| 66 | 66 | |
| 67 | 67 | mImageLabel = Toolkit::TextLabel::New(); |
| 68 | 68 | mImageLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); |
| 69 | 69 | mImageLabel.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::BOTTOM_CENTER ); |
| 70 | - mImageLabel.SetPosition( Vector3( 0.0f, -50.0f, 0.0f ) ); | |
| 70 | + mImageLabel.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -50.0f, 0.0f ) ); | |
| 71 | 71 | mImageLabel.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::BLACK ); |
| 72 | 72 | stage.Add(mImageLabel); |
| 73 | 73 | |
| 74 | 74 | mMaskLabel = Toolkit::TextLabel::New(); |
| 75 | 75 | mMaskLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); |
| 76 | 76 | mMaskLabel.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::BOTTOM_CENTER ); |
| 77 | - mMaskLabel.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) ); | |
| 77 | + mMaskLabel.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) ); | |
| 78 | 78 | mMaskLabel.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::BLACK ); |
| 79 | 79 | stage.Add(mMaskLabel); |
| 80 | 80 | ... | ... |
examples/animated-gradient-call-active/animated-gradient-call-active.cpp
| ... | ... | @@ -149,7 +149,7 @@ public: |
| 149 | 149 | mBackground = Control::New(); |
| 150 | 150 | mBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 151 | 151 | mBackground.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 152 | - mBackground.SetSize( STAGE_SIZE ); | |
| 152 | + mBackground.SetProperty( Actor::Property::SIZE, STAGE_SIZE ); | |
| 153 | 153 | |
| 154 | 154 | mStage.Add( mBackground ); |
| 155 | 155 | |
| ... | ... | @@ -192,21 +192,21 @@ private: |
| 192 | 192 | mButtonIconDecall.SetImage( ICON_DECALL_IMAGE ); |
| 193 | 193 | mButtonIconDecall.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 194 | 194 | mButtonIconDecall.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 195 | - mButtonIconDecall.SetSize( ICON_DECALL_SIZE * SCALED_WIDTH ); | |
| 196 | - mButtonIconDecall.SetPosition( ICON_DECALL_POSITION * SCALED_WIDTH ); | |
| 195 | + mButtonIconDecall.SetProperty( Actor::Property::SIZE, ICON_DECALL_SIZE * SCALED_WIDTH ); | |
| 196 | + mButtonIconDecall.SetProperty( Actor::Property::POSITION, ICON_DECALL_POSITION * SCALED_WIDTH ); | |
| 197 | 197 | |
| 198 | 198 | mButtonIconBattery = ImageView::New(); |
| 199 | 199 | mButtonIconBattery.SetImage( ICON_BATTERY_IMAGE ); |
| 200 | 200 | mButtonIconBattery.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 201 | 201 | mButtonIconBattery.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 202 | - mButtonIconBattery.SetSize( ICON_BATTERY_SIZE * SCALED_WIDTH ); | |
| 203 | - mButtonIconBattery.SetPosition( ICON_BATTERY_POSITION * SCALED_WIDTH ); | |
| 202 | + mButtonIconBattery.SetProperty( Actor::Property::SIZE, ICON_BATTERY_SIZE * SCALED_WIDTH ); | |
| 203 | + mButtonIconBattery.SetProperty( Actor::Property::POSITION, ICON_BATTERY_POSITION * SCALED_WIDTH ); | |
| 204 | 204 | |
| 205 | 205 | mCallStartButton = PushButton::New(); |
| 206 | 206 | mCallStartButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 207 | 207 | mCallStartButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 208 | - mCallStartButton.SetSize( BUTTON_CALL_START_SIZE * SCALED_WIDTH ); | |
| 209 | - mCallStartButton.SetPosition( BUTTON_CALL_START_POSITION * SCALED_WIDTH ); | |
| 208 | + mCallStartButton.SetProperty( Actor::Property::SIZE, BUTTON_CALL_START_SIZE * SCALED_WIDTH ); | |
| 209 | + mCallStartButton.SetProperty( Actor::Property::POSITION, BUTTON_CALL_START_POSITION * SCALED_WIDTH ); | |
| 210 | 210 | mCallStartButton.ClickedSignal().Connect( this, &CallController::OnButtonClicked ); |
| 211 | 211 | mCallStartButton.SetProperty( Button::Property::SELECTED_BACKGROUND_VISUAL, ICON_CALL_IMAGE ); |
| 212 | 212 | mCallStartButton.SetProperty( Button::Property::UNSELECTED_BACKGROUND_VISUAL, ICON_CALL_IMAGE ); |
| ... | ... | @@ -220,8 +220,8 @@ private: |
| 220 | 220 | mLabelIncoming = TextLabel::New( LABEL_INCOMING_STR ); |
| 221 | 221 | mLabelIncoming.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 222 | 222 | mLabelIncoming.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 223 | - mLabelIncoming.SetSize( LABEL_INCOMING_SIZE * SCALED_STAGE_SIZE ); | |
| 224 | - mLabelIncoming.SetPosition( LABEL_INCOMING_POSITION * SCALED_STAGE_SIZE_3 ); | |
| 223 | + mLabelIncoming.SetProperty( Actor::Property::SIZE, LABEL_INCOMING_SIZE * SCALED_STAGE_SIZE ); | |
| 224 | + mLabelIncoming.SetProperty( Actor::Property::POSITION, LABEL_INCOMING_POSITION * SCALED_STAGE_SIZE_3 ); | |
| 225 | 225 | mLabelIncoming.SetProperty( Actor::Property::VISIBLE, true ); |
| 226 | 226 | mLabelIncoming.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_INCOMING_FONT_COLOR ); |
| 227 | 227 | mLabelIncoming.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_INCOMING_FONT_SIZE * FONT_SCALE ); |
| ... | ... | @@ -231,8 +231,8 @@ private: |
| 231 | 231 | mLabelName = TextLabel::New( LABEL_NAME_STR ); |
| 232 | 232 | mLabelName.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 233 | 233 | mLabelName.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 234 | - mLabelName.SetSize( LABEL_NAME_SIZE * SCALED_STAGE_SIZE ); | |
| 235 | - mLabelName.SetPosition( LABEL_NAME_POSITION * SCALED_STAGE_SIZE_3 ); | |
| 234 | + mLabelName.SetProperty( Actor::Property::SIZE, LABEL_NAME_SIZE * SCALED_STAGE_SIZE ); | |
| 235 | + mLabelName.SetProperty( Actor::Property::POSITION, LABEL_NAME_POSITION * SCALED_STAGE_SIZE_3 ); | |
| 236 | 236 | mLabelName.SetProperty( Actor::Property::VISIBLE, true ); |
| 237 | 237 | mLabelName.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_NAME_FONT_COLOR ); |
| 238 | 238 | mLabelName.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_NAME_FONT_SIZE * FONT_SCALE ); |
| ... | ... | @@ -242,8 +242,8 @@ private: |
| 242 | 242 | mLabelNumber = TextLabel::New( LABEL_NUMBER_STR ); |
| 243 | 243 | mLabelNumber.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 244 | 244 | mLabelNumber.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 245 | - mLabelNumber.SetSize( LABEL_NUMBER_SIZE * SCALED_STAGE_SIZE ); | |
| 246 | - mLabelNumber.SetPosition( LABEL_NUMBER_POSITION * SCALED_STAGE_SIZE_3 ); | |
| 245 | + mLabelNumber.SetProperty( Actor::Property::SIZE, LABEL_NUMBER_SIZE * SCALED_STAGE_SIZE ); | |
| 246 | + mLabelNumber.SetProperty( Actor::Property::POSITION, LABEL_NUMBER_POSITION * SCALED_STAGE_SIZE_3 ); | |
| 247 | 247 | mLabelNumber.SetProperty( Actor::Property::VISIBLE, true ); |
| 248 | 248 | mLabelNumber.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_NUMBER_FONT_COLOR ); |
| 249 | 249 | mLabelNumber.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_NUMBER_FONT_SIZE * FONT_SCALE ); |
| ... | ... | @@ -253,8 +253,8 @@ private: |
| 253 | 253 | mLabelDecline = TextLabel::New( LABEL_DECLINE_STR ); |
| 254 | 254 | mLabelDecline.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); |
| 255 | 255 | mLabelDecline.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); |
| 256 | - mLabelDecline.SetSize( LABEL_DECLINE_SIZE * SCALED_STAGE_SIZE ); | |
| 257 | - mLabelDecline.SetPosition( LABEL_DECLINE_POSITION * SCALED_WIDTH ); | |
| 256 | + mLabelDecline.SetProperty( Actor::Property::SIZE, LABEL_DECLINE_SIZE * SCALED_STAGE_SIZE ); | |
| 257 | + mLabelDecline.SetProperty( Actor::Property::POSITION, LABEL_DECLINE_POSITION * SCALED_WIDTH ); | |
| 258 | 258 | mLabelDecline.SetProperty( Actor::Property::VISIBLE, true ); |
| 259 | 259 | mLabelDecline.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_DECLINE_FONT_COLOR ); |
| 260 | 260 | mLabelDecline.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_DECLINE_FONT_SIZE * FONT_SCALE ); |
| ... | ... | @@ -273,21 +273,21 @@ private: |
| 273 | 273 | mButtonClip = Control::New(); |
| 274 | 274 | mButtonClip.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); |
| 275 | 275 | mButtonClip.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::BOTTOM_CENTER ); |
| 276 | - mButtonClip.SetSize( BUTTON_DECALL_SIZE * SCALED_WIDTH ); | |
| 277 | - mButtonClip.SetPosition( BUTTON_DECALL_CLIP_POSITION * SCALED_WIDTH ); | |
| 276 | + mButtonClip.SetProperty( Actor::Property::SIZE, BUTTON_DECALL_SIZE * SCALED_WIDTH ); | |
| 277 | + mButtonClip.SetProperty( Actor::Property::POSITION, BUTTON_DECALL_CLIP_POSITION * SCALED_WIDTH ); | |
| 278 | 278 | |
| 279 | 279 | mButtonIcon = ImageView::New(); |
| 280 | 280 | mButtonIcon.SetImage( BUTTON_DECALL_ICON_IMAGE ); |
| 281 | 281 | mButtonIcon.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 282 | 282 | mButtonIcon.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 283 | - mButtonIcon.SetSize( BUTTON_DECALL_ICON_SIZE * SCALED_WIDTH ); | |
| 284 | - mButtonIcon.SetPosition( BUTTON_DECALL_ICON_POSITION * SCALED_WIDTH ); | |
| 283 | + mButtonIcon.SetProperty( Actor::Property::SIZE, BUTTON_DECALL_ICON_SIZE * SCALED_WIDTH ); | |
| 284 | + mButtonIcon.SetProperty( Actor::Property::POSITION, BUTTON_DECALL_ICON_POSITION * SCALED_WIDTH ); | |
| 285 | 285 | |
| 286 | 286 | mCallEndButton = PushButton::New(); |
| 287 | 287 | mCallEndButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 288 | 288 | mCallEndButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 289 | - mCallEndButton.SetSize( BUTTON_DECALL_SIZE * SCALED_WIDTH ); | |
| 290 | - mCallEndButton.SetPosition( BUTTON_DECALL_POSITION * SCALED_WIDTH ); | |
| 289 | + mCallEndButton.SetProperty( Actor::Property::SIZE, BUTTON_DECALL_SIZE * SCALED_WIDTH ); | |
| 290 | + mCallEndButton.SetProperty( Actor::Property::POSITION, BUTTON_DECALL_POSITION * SCALED_WIDTH ); | |
| 291 | 291 | mCallEndButton.ClickedSignal().Connect( this, &CallController::OnButtonClicked ); |
| 292 | 292 | mCallEndButton.SetProperty( Button::Property::SELECTED_BACKGROUND_VISUAL, "" ); |
| 293 | 293 | mCallEndButton.SetProperty( Button::Property::UNSELECTED_BACKGROUND_VISUAL, "" ); |
| ... | ... | @@ -300,8 +300,8 @@ private: |
| 300 | 300 | mLabelTime = TextLabel::New( LABEL_TIME_STR ); |
| 301 | 301 | mLabelTime.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 302 | 302 | mLabelTime.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 303 | - mLabelTime.SetSize( LABEL_TIME_SIZE * SCALED_STAGE_SIZE ); | |
| 304 | - mLabelTime.SetPosition( LABEL_TIME_POSITION * SCALED_STAGE_SIZE_3 ); | |
| 303 | + mLabelTime.SetProperty( Actor::Property::SIZE, LABEL_TIME_SIZE * SCALED_STAGE_SIZE ); | |
| 304 | + mLabelTime.SetProperty( Actor::Property::POSITION, LABEL_TIME_POSITION * SCALED_STAGE_SIZE_3 ); | |
| 305 | 305 | mLabelTime.SetProperty( Actor::Property::VISIBLE, false ); |
| 306 | 306 | mLabelTime.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_TIME_FONT_COLOR ); |
| 307 | 307 | mLabelTime.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_TIME_FONT_SIZE * FONT_SCALE ); | ... | ... |
examples/animated-gradient-card-active/animated-gradient-card-active.cpp
| ... | ... | @@ -153,8 +153,8 @@ public: |
| 153 | 153 | |
| 154 | 154 | mCard[k].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 155 | 155 | mCard[k].SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 156 | - mCard[k].SetSize( mSize.x, mSize.y ); | |
| 157 | - mCard[k].SetPosition( mPosition[k].x, mPosition[k].y ); | |
| 156 | + mCard[k].SetProperty( Actor::Property::SIZE, Vector2( mSize.x, mSize.y ) ); | |
| 157 | + mCard[k].SetProperty( Actor::Property::POSITION, Vector2( mPosition[k].x, mPosition[k].y )); | |
| 158 | 158 | |
| 159 | 159 | stage.Add( mCard[k] ); |
| 160 | 160 | } |
| ... | ... | @@ -297,7 +297,7 @@ public: |
| 297 | 297 | mBackground = Control::New(); |
| 298 | 298 | mBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 299 | 299 | mBackground.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 300 | - mBackground.SetSize( STAGE_SIZE ); | |
| 300 | + mBackground.SetProperty( Actor::Property::SIZE, STAGE_SIZE ); | |
| 301 | 301 | |
| 302 | 302 | mStage.Add( mBackground ); |
| 303 | 303 | |
| ... | ... | @@ -594,14 +594,14 @@ private: |
| 594 | 594 | mAddButton.SetImage( BUTTON_ADD_IMAGE ); |
| 595 | 595 | mAddButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); |
| 596 | 596 | mAddButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); |
| 597 | - mAddButton.SetSize( BUTTON_ADD_SIZE * SCALED_WIDTH ); | |
| 598 | - mAddButton.SetPosition( BUTTON_ADD_POSITION * SCALED_WIDTH ); | |
| 597 | + mAddButton.SetProperty( Actor::Property::SIZE, BUTTON_ADD_SIZE * SCALED_WIDTH ); | |
| 598 | + mAddButton.SetProperty( Actor::Property::POSITION, BUTTON_ADD_POSITION * SCALED_WIDTH ); | |
| 599 | 599 | |
| 600 | 600 | mLabel1 = TextLabel::New( LABEL_TICKET_STR ); |
| 601 | 601 | mLabel1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 602 | 602 | mLabel1.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 603 | - mLabel1.SetSize( LABEL_TICKET_SIZE * SCALED_WIDTH ); | |
| 604 | - mLabel1.SetPosition( LABEL_TICKET_POSITION * SCALED_WIDTH ); | |
| 603 | + mLabel1.SetProperty( Actor::Property::SIZE, LABEL_TICKET_SIZE * SCALED_WIDTH ); | |
| 604 | + mLabel1.SetProperty( Actor::Property::POSITION, LABEL_TICKET_POSITION * SCALED_WIDTH ); | |
| 605 | 605 | mLabel1.SetProperty( Actor::Property::VISIBLE, true ); |
| 606 | 606 | mLabel1.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_TICKET_FONT_COLOR ); |
| 607 | 607 | mLabel1.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_TICKET_FONT_SIZE * FONT_SCALE ); |
| ... | ... | @@ -611,8 +611,8 @@ private: |
| 611 | 611 | mLabel2 = TextLabel::New( LABEL_HOLD_STR ); |
| 612 | 612 | mLabel2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 613 | 613 | mLabel2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 614 | - mLabel2.SetSize( LABEL_HOLD_SIZE * SCALED_WIDTH ); | |
| 615 | - mLabel2.SetPosition( LABEL_HOLD_POSITION * SCALED_WIDTH ); | |
| 614 | + mLabel2.SetProperty( Actor::Property::SIZE, LABEL_HOLD_SIZE * SCALED_WIDTH ); | |
| 615 | + mLabel2.SetProperty( Actor::Property::POSITION, LABEL_HOLD_POSITION * SCALED_WIDTH ); | |
| 616 | 616 | mLabel2.SetProperty( Actor::Property::VISIBLE, false ); |
| 617 | 617 | mLabel2.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_HOLD_FONT_COLOR ); |
| 618 | 618 | mLabel2.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_HOLD_FONT_SIZE * FONT_SCALE ); |
| ... | ... | @@ -622,8 +622,8 @@ private: |
| 622 | 622 | mLabel3 = TextLabel::New( LABEL_TERMINAL_STR ); |
| 623 | 623 | mLabel3.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 624 | 624 | mLabel3.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 625 | - mLabel3.SetSize( LABEL_TERMINAL_SIZE * SCALED_WIDTH ); | |
| 626 | - mLabel3.SetPosition( LABEL_TERMINAL_POSITION * SCALED_WIDTH ); | |
| 625 | + mLabel3.SetProperty( Actor::Property::SIZE, LABEL_TERMINAL_SIZE * SCALED_WIDTH ); | |
| 626 | + mLabel3.SetProperty( Actor::Property::POSITION, LABEL_TERMINAL_POSITION * SCALED_WIDTH ); | |
| 627 | 627 | mLabel3.SetProperty( Actor::Property::VISIBLE, false ); |
| 628 | 628 | mLabel3.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_TERMINAL_FONT_COLOR ); |
| 629 | 629 | mLabel3.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_TERMINAL_FONT_SIZE * FONT_SCALE ); | ... | ... |
examples/animated-images/animated-images-example.cpp
| ... | ... | @@ -145,7 +145,7 @@ private: |
| 145 | 145 | radioButtonLayout.SetCellAlignment( TableView::CellPosition( 0, 1 ), |
| 146 | 146 | HorizontalAlignment::CENTER, |
| 147 | 147 | VerticalAlignment::CENTER ); |
| 148 | - radioButtonLayout.SetY( -10.0f ); | |
| 148 | + radioButtonLayout.SetProperty( Actor::Property::POSITION_Y, -10.0f ); | |
| 149 | 149 | |
| 150 | 150 | Stage::GetCurrent().Add( radioButtonLayout ); |
| 151 | 151 | } |
| ... | ... | @@ -185,7 +185,7 @@ private: |
| 185 | 185 | control.SetProperty( Toolkit::ImageView::Property::IMAGE, SetupViewProperties( mImageType, index ) ); |
| 186 | 186 | control.SetProperty( Actor::Property::ANCHOR_POINT, IMAGE_LAYOUT_INFO[ index ].anchorPoint ); |
| 187 | 187 | control.SetProperty( Actor::Property::PARENT_ORIGIN, IMAGE_LAYOUT_INFO[ index ].parentOrigin ); |
| 188 | - control.SetY( IMAGE_LAYOUT_INFO[ index ].yPosition ); | |
| 188 | + control.SetProperty( Actor::Property::POSITION_Y, IMAGE_LAYOUT_INFO[ index ].yPosition ); | |
| 189 | 189 | |
| 190 | 190 | // We do not want the animated image playing when it's added to the stage. |
| 191 | 191 | PauseAnimatedImage( control ); | ... | ... |
examples/animated-shapes/animated-shapes-example.cpp
| ... | ... | @@ -211,8 +211,8 @@ public: |
| 211 | 211 | renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON ); |
| 212 | 212 | |
| 213 | 213 | Actor actor = Actor::New(); |
| 214 | - actor.SetSize( 400.0f, 400.0f ); | |
| 215 | - actor.SetPosition( center ); | |
| 214 | + actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) ); | |
| 215 | + actor.SetProperty( Actor::Property::POSITION, center ); | |
| 216 | 216 | actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 217 | 217 | actor.SetProperty( Actor::Property::COLOR,Vector4(1.0f,1.0f,0.0f,1.0f) ); |
| 218 | 218 | actor.AddRenderer( renderer ); |
| ... | ... | @@ -303,8 +303,8 @@ public: |
| 303 | 303 | renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON ); |
| 304 | 304 | |
| 305 | 305 | Actor actor = Actor::New(); |
| 306 | - actor.SetSize( 400.0f, 400.0f ); | |
| 307 | - actor.SetPosition( center ); | |
| 306 | + actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) ); | |
| 307 | + actor.SetProperty( Actor::Property::POSITION, center ); | |
| 308 | 308 | actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 309 | 309 | actor.AddRenderer( renderer ); |
| 310 | 310 | |
| ... | ... | @@ -404,8 +404,8 @@ public: |
| 404 | 404 | renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON ); |
| 405 | 405 | |
| 406 | 406 | Actor actor = Actor::New(); |
| 407 | - actor.SetSize( 400.0f, 400.0f ); | |
| 408 | - actor.SetPosition( center ); | |
| 407 | + actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) ); | |
| 408 | + actor.SetProperty( Actor::Property::POSITION, center ); | |
| 409 | 409 | actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 410 | 410 | actor.SetProperty( Actor::Property::COLOR,Vector4(1.0f,0.0f,0.0f,1.0f) ); |
| 411 | 411 | actor.AddRenderer( renderer ); | ... | ... |
examples/arc-visual/arc-visual-example.cpp
| ... | ... | @@ -73,7 +73,7 @@ private: |
| 73 | 73 | |
| 74 | 74 | mControl = Control::New(); |
| 75 | 75 | mControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 76 | - mControl.SetSize( 200.0f, 200.0f ); | |
| 76 | + mControl.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) ); | |
| 77 | 77 | mControl.SetProperty( Control::Property::BACKGROUND, BACKGROUND ); |
| 78 | 78 | |
| 79 | 79 | stage.Add( mControl ); | ... | ... |
examples/benchmark/benchmark.cpp
| ... | ... | @@ -280,7 +280,7 @@ public: |
| 280 | 280 | for( size_t i(0); i<actorCount; ++i ) |
| 281 | 281 | { |
| 282 | 282 | mImageView[i] = ImageView::New(ImagePath(i)); |
| 283 | - mImageView[i].SetSize(Vector3(0.0f,0.0f,0.0f)); | |
| 283 | + mImageView[i].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) ); | |
| 284 | 284 | mImageView[i].SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 285 | 285 | stage.Add(mImageView[i]); |
| 286 | 286 | } |
| ... | ... | @@ -307,7 +307,7 @@ public: |
| 307 | 307 | { |
| 308 | 308 | mActor[i] = Actor::New(); |
| 309 | 309 | mActor[i].AddRenderer( renderers[i % numImages] ); |
| 310 | - mActor[i].SetSize(0.0f,0.0f,0.0f); | |
| 310 | + mActor[i].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) ); | |
| 311 | 311 | stage.Add(mActor[i]); |
| 312 | 312 | } |
| 313 | 313 | } |
| ... | ... | @@ -360,16 +360,16 @@ public: |
| 360 | 360 | } |
| 361 | 361 | if( gUseMesh ) |
| 362 | 362 | { |
| 363 | - mActor[count].SetPosition( initialPosition ); | |
| 364 | - mActor[count].SetSize( Vector3(0.0f,0.0f,0.0f) ); | |
| 363 | + mActor[count].SetProperty( Actor::Property::POSITION, initialPosition ); | |
| 364 | + mActor[count].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) ); | |
| 365 | 365 | mActor[count].SetProperty( Actor::Property::ORIENTATION, Quaternion( Radian(0.0f),Vector3::XAXIS) ); |
| 366 | 366 | mShow.AnimateTo( Property( mActor[count], Actor::Property::POSITION), Vector3(xpos+mSize.x*0.5f, ypos+mSize.y*0.5f, 0.0f), AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration )); |
| 367 | 367 | mShow.AnimateTo( Property( mActor[count], Actor::Property::SIZE), mSize, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration )); |
| 368 | 368 | } |
| 369 | 369 | else |
| 370 | 370 | { |
| 371 | - mImageView[count].SetPosition( initialPosition ); | |
| 372 | - mImageView[count].SetSize( Vector3(0.0f,0.0f,0.0f) ); | |
| 371 | + mImageView[count].SetProperty( Actor::Property::POSITION, initialPosition ); | |
| 372 | + mImageView[count].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) ); | |
| 373 | 373 | mImageView[count].SetProperty( Actor::Property::ORIENTATION, Quaternion( Radian(0.0f),Vector3::XAXIS) ); |
| 374 | 374 | mShow.AnimateTo( Property( mImageView[count], Actor::Property::POSITION), Vector3(xpos+mSize.x*0.5f, ypos+mSize.y*0.5f, 0.0f), AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration )); |
| 375 | 375 | mShow.AnimateTo( Property( mImageView[count], Actor::Property::SIZE), mSize, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration )); | ... | ... |
examples/bezier-curve/bezier-curve-example.cpp
| ... | ... | @@ -318,7 +318,7 @@ public: |
| 318 | 318 | Actor CreateControlPoint( Actor parent, const char* url, Vector3 position) |
| 319 | 319 | { |
| 320 | 320 | Actor actor = ImageView::New( url ); |
| 321 | - actor.SetScale( mControlPointScale); | |
| 321 | + actor.SetProperty( Actor::Property::SCALE, mControlPointScale); | |
| 322 | 322 | actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 323 | 323 | // Curve and line drawing works off current value (i.e. last update frame's value). Need to animate to ensure |
| 324 | 324 | // initial position is baked to both frames before initially drawing the curve. |
| ... | ... | @@ -520,7 +520,7 @@ public: |
| 520 | 520 | { |
| 521 | 521 | Vector3 position( event.GetScreenPosition( 0 ) ); |
| 522 | 522 | |
| 523 | - mDragActor.SetPosition( position - Vector3( mRelativeDragPoint ) ); | |
| 523 | + mDragActor.SetProperty( Actor::Property::POSITION, position - Vector3( mRelativeDragPoint ) ); | |
| 524 | 524 | |
| 525 | 525 | if( event.GetState( 0 ) == PointState::UP ) // Stop dragging |
| 526 | 526 | { | ... | ... |
examples/blocks/blocks-example.cpp
| ... | ... | @@ -284,8 +284,8 @@ private: |
| 284 | 284 | // Ball setup |
| 285 | 285 | mBallStartPosition = stageSize * Vector3( BALL_START_POSITION ); |
| 286 | 286 | mBall = CreateImage(BALL_IMAGE); |
| 287 | - mBall.SetPosition( mBallStartPosition ); | |
| 288 | - mBall.SetSize( BALL_SIZE * stageSize.width ); | |
| 287 | + mBall.SetProperty( Actor::Property::POSITION, mBallStartPosition ); | |
| 288 | + mBall.SetProperty( Actor::Property::SIZE, BALL_SIZE * stageSize.width ); | |
| 289 | 289 | mContentLayer.Add(mBall); |
| 290 | 290 | mBallVelocity = Vector3::ZERO; |
| 291 | 291 | |
| ... | ... | @@ -298,22 +298,22 @@ private: |
| 298 | 298 | mPaddle.Add( mPaddleImage ); |
| 299 | 299 | mPaddleHandle.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 300 | 300 | mPaddleHandle.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 301 | - mPaddleHandle.SetPosition( 0.0f, stageSize.width * 0.0125f ); | |
| 301 | + mPaddleHandle.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, stageSize.width * 0.0125f )); | |
| 302 | 302 | mPaddleImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 303 | 303 | mPaddleImage.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 304 | 304 | mPaddle.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 305 | 305 | mPaddle.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 306 | 306 | mPaddleFullSize = PADDLE_SIZE * stageSize.width; |
| 307 | - mPaddle.SetSize( mPaddleFullSize + mPaddleHitMargin ); | |
| 308 | - mPaddleHandle.SetSize( PADDLE_HANDLE_SIZE * stageSize.width ); | |
| 309 | - mPaddleImage.SetSize( mPaddleFullSize ); | |
| 307 | + mPaddle.SetProperty( Actor::Property::SIZE, mPaddleFullSize + mPaddleHitMargin ); | |
| 308 | + mPaddleHandle.SetProperty( Actor::Property::SIZE, PADDLE_HANDLE_SIZE * stageSize.width ); | |
| 309 | + mPaddleImage.SetProperty( Actor::Property::SIZE, mPaddleFullSize ); | |
| 310 | 310 | |
| 311 | 311 | mWobbleProperty = mPaddle.RegisterProperty(WOBBLE_PROPERTY_NAME, 0.0f); |
| 312 | 312 | Constraint wobbleConstraint = Constraint::New<Quaternion>( mPaddle, Actor::Property::ORIENTATION, WobbleConstraint(Degree( 10.0f ))); |
| 313 | 313 | wobbleConstraint.AddSource( LocalSource(mWobbleProperty) ); |
| 314 | 314 | wobbleConstraint.Apply(); |
| 315 | 315 | |
| 316 | - mPaddle.SetPosition( stageSize * Vector3( PADDLE_START_POSITION ) ); | |
| 316 | + mPaddle.SetProperty( Actor::Property::POSITION, stageSize * Vector3( PADDLE_START_POSITION ) ); | |
| 317 | 317 | mContentLayer.Add(mPaddle); |
| 318 | 318 | mPaddle.TouchSignal().Connect(this, &ExampleController::OnTouchPaddle); |
| 319 | 319 | mContentLayer.TouchSignal().Connect(this, &ExampleController::OnTouchLayer); |
| ... | ... | @@ -358,10 +358,10 @@ private: |
| 358 | 358 | { |
| 359 | 359 | mLives = TOTAL_LIVES; |
| 360 | 360 | mLevel = 0; |
| 361 | - mBall.SetPosition( mBallStartPosition ); | |
| 361 | + mBall.SetProperty( Actor::Property::POSITION, mBallStartPosition ); | |
| 362 | 362 | mBallVelocity = Vector3::ZERO; |
| 363 | - mPaddle.SetSize( mPaddleFullSize + mPaddleHitMargin ); | |
| 364 | - mPaddleImage.SetSize( mPaddleFullSize ); | |
| 363 | + mPaddle.SetProperty( Actor::Property::SIZE, mPaddleFullSize + mPaddleHitMargin ); | |
| 364 | + mPaddleImage.SetProperty( Actor::Property::SIZE, mPaddleFullSize ); | |
| 365 | 365 | |
| 366 | 366 | LoadLevel(mLevel); |
| 367 | 367 | } |
| ... | ... | @@ -561,7 +561,7 @@ private: |
| 561 | 561 | brick.SetProperty( ImageView::Property::IMAGE, mBrickImageMap ); |
| 562 | 562 | brick.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); |
| 563 | 563 | brick.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); |
| 564 | - brick.SetPosition( Vector3( position ) ); | |
| 564 | + brick.SetProperty( Actor::Property::POSITION, position ); | |
| 565 | 565 | |
| 566 | 566 | // Add a constraint on the brick between it and the ball generating a collision-property |
| 567 | 567 | Property::Index property = brick.RegisterProperty(COLLISION_PROPERTY_NAME, Vector3::ZERO); |
| ... | ... | @@ -651,7 +651,7 @@ private: |
| 651 | 651 | if(mDragActor) |
| 652 | 652 | { |
| 653 | 653 | Vector3 position( event.GetScreenPosition( 0 ) ); |
| 654 | - mPaddle.SetPosition( position - mRelativeDragPoint ); | |
| 654 | + mPaddle.SetProperty( Actor::Property::POSITION, position - mRelativeDragPoint ); | |
| 655 | 655 | |
| 656 | 656 | if( event.GetState( 0 ) == PointState::UP ) // Stop dragging |
| 657 | 657 | { |
| ... | ... | @@ -729,7 +729,7 @@ private: |
| 729 | 729 | void OnPaddleShrunk( Animation &source ) |
| 730 | 730 | { |
| 731 | 731 | // Reposition Ball in start position, and make ball appear. |
| 732 | - mBall.SetPosition( mBallStartPosition ); | |
| 732 | + mBall.SetProperty( Actor::Property::POSITION, mBallStartPosition ); | |
| 733 | 733 | mBall.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 1.0f, 1.0f, 0.1f) ); |
| 734 | 734 | Animation appear = Animation::New(0.5f); |
| 735 | 735 | appear.AnimateTo( Property(mBall, Actor::Property::COLOR), Vector4(1.0f, 1.0f, 1.0f, 1.0f) ); | ... | ... |
examples/bloom-view/bloom-view-example.cpp
| ... | ... | @@ -78,47 +78,47 @@ public: |
| 78 | 78 | |
| 79 | 79 | mRootActor = Actor::New(); |
| 80 | 80 | mRootActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 81 | - mRootActor.SetSize( stageSize ); | |
| 81 | + mRootActor.SetProperty( Actor::Property::SIZE, stageSize ); | |
| 82 | 82 | stage.Add( mRootActor ); |
| 83 | 83 | |
| 84 | 84 | // Create the object that will perform the blooming work |
| 85 | 85 | mBloomView = Dali::Toolkit::BloomView::New(); |
| 86 | 86 | mBloomView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 87 | - mBloomView.SetSize( viewSize ); | |
| 87 | + mBloomView.SetProperty( Actor::Property::SIZE, viewSize ); | |
| 88 | 88 | mRootActor.Add( mBloomView ); |
| 89 | 89 | mBloomView.Activate(); |
| 90 | 90 | |
| 91 | 91 | Layer backgroundLayer = Layer::New(); |
| 92 | - backgroundLayer.SetSize( viewSize ); | |
| 92 | + backgroundLayer.SetProperty( Actor::Property::SIZE, viewSize ); | |
| 93 | 93 | backgroundLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 94 | 94 | mBloomView.Add( backgroundLayer ); |
| 95 | 95 | |
| 96 | 96 | // Create the background image |
| 97 | 97 | ImageView backgroundImage = ImageView::New( BACKGROUND_IMAGE_PATH ); |
| 98 | 98 | backgroundImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 99 | - backgroundImage.SetSize( viewSize ); | |
| 99 | + backgroundImage.SetProperty( Actor::Property::SIZE, viewSize ); | |
| 100 | 100 | backgroundLayer.Add( backgroundImage ); |
| 101 | 101 | |
| 102 | 102 | Layer foregroundLayer = Layer::New(); |
| 103 | - foregroundLayer.SetSize( viewSize ); | |
| 103 | + foregroundLayer.SetProperty( Actor::Property::SIZE, viewSize ); | |
| 104 | 104 | foregroundLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 105 | 105 | mBloomView.Add( foregroundLayer ); |
| 106 | 106 | |
| 107 | 107 | // Create visible actors |
| 108 | 108 | mObjectRootActor = Actor::New(); |
| 109 | 109 | mObjectRootActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 110 | - mObjectRootActor.SetSize( viewSize ); | |
| 110 | + mObjectRootActor.SetProperty( Actor::Property::SIZE, viewSize ); | |
| 111 | 111 | foregroundLayer.Add( mObjectRootActor ); |
| 112 | 112 | |
| 113 | 113 | ImageView imageView = ImageView::New( UI_DIFFUSE_IMAGE ); |
| 114 | 114 | imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 115 | - imageView.SetSize( viewSize ); | |
| 115 | + imageView.SetProperty( Actor::Property::SIZE, viewSize ); | |
| 116 | 116 | mObjectRootActor.Add( imageView ); |
| 117 | 117 | |
| 118 | 118 | imageView = ImageView::New( UI_DIFFUSE_IMAGE ); |
| 119 | 119 | imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 120 | - imageView.SetSize( stageSize * 0.5f ); | |
| 121 | - imageView.SetPosition( 0.0f, 0.0f, 100.0f ); | |
| 120 | + imageView.SetProperty( Actor::Property::SIZE, stageSize * 0.5f ); | |
| 121 | + imageView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 100.0f ) ); | |
| 122 | 122 | mObjectRootActor.Add( imageView ); |
| 123 | 123 | |
| 124 | 124 | AnimateBloomView(); | ... | ... |
examples/bubble-effect/bubble-effect-example.cpp
| ... | ... | @@ -136,7 +136,7 @@ private: |
| 136 | 136 | // Get the root actor of all bubbles, and add it to stage. |
| 137 | 137 | Actor bubbleRoot = mBubbleEmitter.GetRootActor(); |
| 138 | 138 | bubbleRoot.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); |
| 139 | - bubbleRoot.SetZ(0.1f); // Make sure the bubbles displayed on top og the background. | |
| 139 | + bubbleRoot.SetProperty( Actor::Property::POSITION_Z, 0.1f); // Make sure the bubbles displayed on top og the background. | |
| 140 | 140 | content.Add( bubbleRoot ); |
| 141 | 141 | |
| 142 | 142 | // Set the application background | ... | ... |
examples/builder/examples.cpp
| ... | ... | @@ -454,7 +454,7 @@ public: |
| 454 | 454 | mBuilderLayer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_CENTER); |
| 455 | 455 | Dali::Vector3 size = Stage::GetCurrent().GetRootLayer().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ); |
| 456 | 456 | size.y -= DemoHelper::DEFAULT_VIEW_STYLE.mToolBarHeight; |
| 457 | - mBuilderLayer.SetSize( size ); | |
| 457 | + mBuilderLayer.SetProperty( Actor::Property::SIZE, size ); | |
| 458 | 458 | |
| 459 | 459 | mNavigationView.Push( mBuilderLayer ); |
| 460 | 460 | } | ... | ... |
examples/buttons/buttons-example.cpp
| ... | ... | @@ -114,7 +114,7 @@ class ButtonsController: public ConnectionTracker |
| 114 | 114 | contentTable.SetFitHeight( i ); |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | - contentTable.SetPosition( 0.0f, TOP_MARGIN ); | |
| 117 | + contentTable.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, TOP_MARGIN )); | |
| 118 | 118 | |
| 119 | 119 | mContentLayer.Add( contentTable ); |
| 120 | 120 | |
| ... | ... | @@ -158,12 +158,12 @@ class ButtonsController: public ConnectionTracker |
| 158 | 158 | // Radio 1 |
| 159 | 159 | { |
| 160 | 160 | Toolkit::ImageView image = Toolkit::ImageView::New( SMALL_IMAGE_1 ); |
| 161 | - image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); | |
| 161 | + image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) ); | |
| 162 | 162 | |
| 163 | 163 | mRadioButtonImage1 = Dali::Toolkit::RadioButton::New( "1" ); |
| 164 | 164 | mRadioButtonImage1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 165 | 165 | mRadioButtonImage1.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 166 | - mRadioButtonImage1.SetPosition( 0, DP(radioY) ); | |
| 166 | + mRadioButtonImage1.SetProperty( Actor::Property::POSITION, Vector2( 0, DP(radioY) )); | |
| 167 | 167 | mRadioButtonImage1.SetProperty( Toolkit::Button::Property::SELECTED, true ); |
| 168 | 168 | |
| 169 | 169 | imageSelectTableView.AddChild( mRadioButtonImage1, Toolkit::TableView::CellPosition( 0, 0 ) ); |
| ... | ... | @@ -175,12 +175,12 @@ class ButtonsController: public ConnectionTracker |
| 175 | 175 | radioY += RADIO_LABEL_THUMBNAIL_SIZE + RADIO_IMAGE_SPACING; |
| 176 | 176 | |
| 177 | 177 | Toolkit::ImageView image = Toolkit::ImageView::New( SMALL_IMAGE_2 ); |
| 178 | - image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); | |
| 178 | + image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) ); | |
| 179 | 179 | |
| 180 | 180 | mRadioButtonImage2 = Dali::Toolkit::RadioButton::New( "2" ); |
| 181 | 181 | mRadioButtonImage2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 182 | 182 | mRadioButtonImage2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 183 | - mRadioButtonImage2.SetPosition( 0, DP(radioY) ); | |
| 183 | + mRadioButtonImage2.SetProperty( Actor::Property::POSITION, Vector2( 0, DP(radioY) )); | |
| 184 | 184 | |
| 185 | 185 | imageSelectTableView.AddChild( mRadioButtonImage2, Toolkit::TableView::CellPosition( 1, 0 ) ); |
| 186 | 186 | imageSelectTableView.AddChild( image, Toolkit::TableView::CellPosition( 1, 1 ) ); |
| ... | ... | @@ -191,12 +191,12 @@ class ButtonsController: public ConnectionTracker |
| 191 | 191 | radioY += RADIO_LABEL_THUMBNAIL_SIZE + RADIO_IMAGE_SPACING; |
| 192 | 192 | |
| 193 | 193 | Toolkit::ImageView image = Toolkit::ImageView::New( SMALL_IMAGE_3 ); |
| 194 | - image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); | |
| 194 | + image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) ); | |
| 195 | 195 | |
| 196 | 196 | mRadioButtonImage3 = Dali::Toolkit::RadioButton::New( "3" ); |
| 197 | 197 | mRadioButtonImage3.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 198 | 198 | mRadioButtonImage3.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 199 | - mRadioButtonImage3.SetPosition( 0, DP(radioY) ); | |
| 199 | + mRadioButtonImage3.SetProperty( Actor::Property::POSITION, Vector2( 0, DP(radioY) )); | |
| 200 | 200 | |
| 201 | 201 | imageSelectTableView.AddChild( mRadioButtonImage3, Toolkit::TableView::CellPosition( 2, 0 ) ); |
| 202 | 202 | imageSelectTableView.AddChild( image, Toolkit::TableView::CellPosition( 2, 1 ) ); |
| ... | ... | @@ -254,7 +254,7 @@ class ButtonsController: public ConnectionTracker |
| 254 | 254 | textLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); |
| 255 | 255 | |
| 256 | 256 | Toolkit::ImageView image = Toolkit::ImageView::New( ENABLED_IMAGE ); |
| 257 | - image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); | |
| 257 | + image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) ); | |
| 258 | 258 | image.SetProperty( Actor::Property::PADDING, Padding( DP(20.0f), 0.0f, 0.0f, 0.0f ) ); |
| 259 | 259 | tableView.AddChild( image, Toolkit::TableView::CellPosition( 0, 1 ) ); |
| 260 | 260 | |
| ... | ... | @@ -266,7 +266,7 @@ class ButtonsController: public ConnectionTracker |
| 266 | 266 | radioButton.SetProperty( Dali::Actor::Property::NAME, "radioSelectEnable" ); |
| 267 | 267 | radioButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 268 | 268 | radioButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 269 | - radioButton.SetPosition( 0, 0 ); | |
| 269 | + radioButton.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 )); | |
| 270 | 270 | radioButton.SetProperty( Toolkit::Button::Property::SELECTED, true ); |
| 271 | 271 | |
| 272 | 272 | radioButton.StateChangedSignal().Connect( this, &ButtonsController::EnableSelectButton ); |
| ... | ... | @@ -280,7 +280,7 @@ class ButtonsController: public ConnectionTracker |
| 280 | 280 | radioButton.SetProperty( Dali::Actor::Property::NAME, "radioSelectDisable" ); |
| 281 | 281 | radioButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 282 | 282 | radioButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 283 | - radioButton.SetPosition( 0, DP(50) ); | |
| 283 | + radioButton.SetProperty( Actor::Property::POSITION, Vector2( 0, DP(50) )); | |
| 284 | 284 | |
| 285 | 285 | radioButton.StateChangedSignal().Connect( this, &ButtonsController::EnableSelectButton ); |
| 286 | 286 | ... | ... |
examples/clipping/clipping-example.cpp
| ... | ... | @@ -123,7 +123,7 @@ private: |
| 123 | 123 | .Add( BorderVisual::Property::COLOR, Color::WHITE ) |
| 124 | 124 | .Add( BorderVisual::Property::SIZE, 2.0f ) |
| 125 | 125 | .Add( BorderVisual::Property::ANTI_ALIASING, true ) ); |
| 126 | - 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 ) ); | |
| 126 | + 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 ) ); | |
| 127 | 127 | stage.Add( border ); |
| 128 | 128 | |
| 129 | 129 | // Constrain the border's orientation to the orientation of item-view. | ... | ... |
examples/color-visual/color-visual-example.cpp
| ... | ... | @@ -74,7 +74,7 @@ public: |
| 74 | 74 | |
| 75 | 75 | mImageView = ImageView::New( IMAGE_FILE ); |
| 76 | 76 | mImageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 77 | - mImageView.SetSize( 200.0f, 200.0f ); | |
| 77 | + mImageView.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) ); | |
| 78 | 78 | mImageView.SetProperty( DevelControl::Property::SHADOW, SHADOW ); |
| 79 | 79 | |
| 80 | 80 | stage.Add( mImageView ); | ... | ... |
examples/compressed-texture-formats/compressed-texture-formats-example.cpp
| ... | ... | @@ -77,7 +77,7 @@ void AddImage( const char*imagePath, Actor& actor, Geometry& geometry, Shader& s |
| 77 | 77 | renderer.SetTextures( textureSet ); |
| 78 | 78 | |
| 79 | 79 | //Set actor size and add the renderer |
| 80 | - actor.SetSize( texture.GetWidth(), texture.GetHeight() ); | |
| 80 | + actor.SetProperty( Actor::Property::SIZE, Vector2( texture.GetWidth(), texture.GetHeight() ) ); | |
| 81 | 81 | actor.AddRenderer( renderer ); |
| 82 | 82 | } |
| 83 | 83 | ... | ... |
examples/contact-cards/contact-card.cpp
| ... | ... | @@ -118,35 +118,35 @@ ContactCard::ContactCard( |
| 118 | 118 | mContactCard.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN ); |
| 119 | 119 | mContactCard.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 120 | 120 | mContactCard.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 121 | - mContactCard.SetPosition( foldedPosition.x, foldedPosition.y ); | |
| 122 | - mContactCard.SetSize( mContactCardLayoutInfo.foldedSize ); | |
| 121 | + mContactCard.SetProperty( Actor::Property::POSITION, Vector2( foldedPosition.x, foldedPosition.y )); | |
| 122 | + mContactCard.SetProperty( Actor::Property::SIZE, mContactCardLayoutInfo.foldedSize ); | |
| 123 | 123 | stage.Add( mContactCard ); |
| 124 | 124 | |
| 125 | 125 | // Create the header which will be shown only when the contact is unfolded |
| 126 | 126 | mHeader = Control::New(); |
| 127 | - mHeader.SetSize( mContactCardLayoutInfo.headerSize ); | |
| 127 | + mHeader.SetProperty( Actor::Property::SIZE, mContactCardLayoutInfo.headerSize ); | |
| 128 | 128 | mHeader.SetProperty( Control::Property::BACKGROUND, |
| 129 | 129 | Property::Map{ { Toolkit::Visual::Property::TYPE, Visual::COLOR }, |
| 130 | 130 | { ColorVisual::Property::MIX_COLOR, HEADER_COLOR } } ); |
| 131 | 131 | mHeader.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 132 | 132 | mHeader.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 133 | - mHeader.SetPosition( mContactCardLayoutInfo.headerFoldedPosition.x, mContactCardLayoutInfo.headerFoldedPosition.y ); | |
| 133 | + mHeader.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.headerFoldedPosition.x, mContactCardLayoutInfo.headerFoldedPosition.y )); | |
| 134 | 134 | |
| 135 | 135 | // Create a clipped image (whose clipping can be animated) |
| 136 | 136 | mClippedImage = ClippedImage::Create( imagePath, mClippedImagePropertyIndex ); |
| 137 | - mClippedImage.SetSize( mContactCardLayoutInfo.imageSize ); | |
| 137 | + mClippedImage.SetProperty( Actor::Property::SIZE, mContactCardLayoutInfo.imageSize ); | |
| 138 | 138 | mClippedImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 139 | 139 | mClippedImage.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 140 | - mClippedImage.SetPosition( mContactCardLayoutInfo.imageFoldedPosition.x, mContactCardLayoutInfo.imageFoldedPosition.y ); | |
| 140 | + mClippedImage.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.imageFoldedPosition.x, mContactCardLayoutInfo.imageFoldedPosition.y )); | |
| 141 | 141 | mClippedImage.SetProperty( Actor::Property::VISIBLE, false ); // Hide image as we only want to display it if we are animating or unfolded |
| 142 | 142 | mContactCard.Add( mClippedImage ); |
| 143 | 143 | |
| 144 | 144 | // Create an image with a mask which is to be used when the contact is folded |
| 145 | 145 | mMaskedImage = MaskedImage::Create( imagePath ); |
| 146 | - mMaskedImage.SetSize( mContactCardLayoutInfo.imageSize ); | |
| 146 | + mMaskedImage.SetProperty( Actor::Property::SIZE, mContactCardLayoutInfo.imageSize ); | |
| 147 | 147 | mMaskedImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 148 | 148 | mMaskedImage.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 149 | - mMaskedImage.SetPosition( mContactCardLayoutInfo.imageFoldedPosition.x, mContactCardLayoutInfo.imageFoldedPosition.y ); | |
| 149 | + mMaskedImage.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.imageFoldedPosition.x, mContactCardLayoutInfo.imageFoldedPosition.y )); | |
| 150 | 150 | mContactCard.Add( mMaskedImage ); |
| 151 | 151 | |
| 152 | 152 | // Add the text label for just the name |
| ... | ... | @@ -155,7 +155,7 @@ ContactCard::ContactCard( |
| 155 | 155 | mNameText.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 156 | 156 | mNameText.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 157 | 157 | mNameText.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 158 | - mNameText.SetPosition( mContactCardLayoutInfo.textFoldedPosition.x, mContactCardLayoutInfo.textFoldedPosition.y ); | |
| 158 | + mNameText.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.textFoldedPosition.x, mContactCardLayoutInfo.textFoldedPosition.y )); | |
| 159 | 159 | mContactCard.Add( mNameText ); |
| 160 | 160 | |
| 161 | 161 | // Create the detail text-label |
| ... | ... | @@ -167,8 +167,8 @@ ContactCard::ContactCard( |
| 167 | 167 | mDetailText.SetStyleName( "ContactDetailTextLabel" ); |
| 168 | 168 | mDetailText.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 169 | 169 | mDetailText.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 170 | - mDetailText.SetPosition( mContactCardLayoutInfo.textFoldedPosition.x, mContactCardLayoutInfo.textFoldedPosition.y ); | |
| 171 | - mDetailText.SetSize( Vector2( mContactCardLayoutInfo.unfoldedSize.width - mContactCardLayoutInfo.textFoldedPosition.x * 2.0f, 0.0f ) ); | |
| 170 | + mDetailText.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.textFoldedPosition.x, mContactCardLayoutInfo.textFoldedPosition.y )); | |
| 171 | + mDetailText.SetProperty( Actor::Property::SIZE, Vector2( mContactCardLayoutInfo.unfoldedSize.width - mContactCardLayoutInfo.textFoldedPosition.x * 2.0f, 0.0f ) ); | |
| 172 | 172 | mDetailText.SetProperty( DevelActor::Property::OPACITY, 0.0f ); |
| 173 | 173 | |
| 174 | 174 | // Attach tap detection to the overall clip control | ... | ... |
examples/cube-transition-effect/cube-transition-effect-example.cpp
| ... | ... | @@ -252,7 +252,7 @@ void CubeTransitionApp::OnInit( Application& application ) |
| 252 | 252 | mCubeWaveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT_WAVE ); |
| 253 | 253 | mCubeWaveEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted); |
| 254 | 254 | |
| 255 | - mCubeWaveEffect.SetSize( mViewSize ); | |
| 255 | + mCubeWaveEffect.SetProperty( Actor::Property::SIZE, mViewSize ); | |
| 256 | 256 | mCubeWaveEffect.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 257 | 257 | mCubeWaveEffect.SetCurrentTexture( mCurrentTexture ); |
| 258 | 258 | |
| ... | ... | @@ -262,7 +262,7 @@ void CubeTransitionApp::OnInit( Application& application ) |
| 262 | 262 | mCubeCrossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT_CROSS ); |
| 263 | 263 | mCubeCrossEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted); |
| 264 | 264 | |
| 265 | - mCubeCrossEffect.SetSize( mViewSize ); | |
| 265 | + mCubeCrossEffect.SetProperty( Actor::Property::SIZE, mViewSize ); | |
| 266 | 266 | mCubeCrossEffect.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 267 | 267 | mCubeCrossEffect.SetCurrentTexture( mCurrentTexture ); |
| 268 | 268 | |
| ... | ... | @@ -270,7 +270,7 @@ void CubeTransitionApp::OnInit( Application& application ) |
| 270 | 270 | mCubeFoldEffect.SetTransitionDuration( ANIMATION_DURATION_FOLD ); |
| 271 | 271 | mCubeFoldEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted); |
| 272 | 272 | |
| 273 | - mCubeFoldEffect.SetSize( mViewSize ); | |
| 273 | + mCubeFoldEffect.SetProperty( Actor::Property::SIZE, mViewSize ); | |
| 274 | 274 | mCubeFoldEffect.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 275 | 275 | mCubeFoldEffect.SetCurrentTexture( mCurrentTexture ); |
| 276 | 276 | ... | ... |
examples/deferred-shading/deferred-shading.cpp
| ... | ... | @@ -579,11 +579,11 @@ private: |
| 579 | 579 | CenterActor(a); |
| 580 | 580 | |
| 581 | 581 | Vector3 position{ v * unit * 5.f }; |
| 582 | - a.SetPosition(position); | |
| 582 | + a.SetProperty( Actor::Property::POSITION, position ); | |
| 583 | 583 | |
| 584 | 584 | float scale = (c + ((v.x + v.y + v.z) + c * 3.f) * .5f) / (c * 4.f); |
| 585 | 585 | Vector3 size{ Vector3::ONE * scale * unit * 2.f }; |
| 586 | - a.SetSize(size); | |
| 586 | + a.SetProperty( Actor::Property::SIZE, size); | |
| 587 | 587 | |
| 588 | 588 | a.SetProperty( Actor::Property::COLOR,Color::WHITE * .25f + |
| 589 | 589 | (Color::RED * (v.x + c) / (c * 2.f) + |
| ... | ... | @@ -625,7 +625,7 @@ private: |
| 625 | 625 | // Create final image for deferred shading |
| 626 | 626 | auto finalImage = Actor::New(); |
| 627 | 627 | CenterActor(finalImage); |
| 628 | - finalImage.SetSize(stageSize); | |
| 628 | + finalImage.SetProperty( Actor::Property::SIZE, stageSize); | |
| 629 | 629 | |
| 630 | 630 | TextureSet finalImageTextures = TextureSet::New(); |
| 631 | 631 | finalImageTextures.SetTexture(0, rttNormal); | ... | ... |
examples/dissolve-effect/dissolve-effect-example.cpp
| ... | ... | @@ -248,7 +248,7 @@ void DissolveEffectApp::OnInit( Application& application ) |
| 248 | 248 | |
| 249 | 249 | // Set size to stage size to avoid seeing a black border on transition |
| 250 | 250 | mParent = Actor::New(); |
| 251 | - mParent.SetSize( Stage::GetCurrent().GetSize() ); | |
| 251 | + mParent.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize() ); | |
| 252 | 252 | mParent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 253 | 253 | mContent.Add( mParent ); |
| 254 | 254 | |
| ... | ... | @@ -290,7 +290,7 @@ void DissolveEffectApp::OnPanGesture( Actor actor, const PanGesture& gesture ) |
| 290 | 290 | mNextImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 291 | 291 | mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); |
| 292 | 292 | mNextImage.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); |
| 293 | - mNextImage.SetZ(INITIAL_DEPTH); | |
| 293 | + mNextImage.SetProperty( Actor::Property::POSITION_Z, INITIAL_DEPTH); | |
| 294 | 294 | mParent.Add( mNextImage ); |
| 295 | 295 | Vector2 size = Vector2( mCurrentImage.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) ); |
| 296 | 296 | StartTransition( gesture.position / size, gesture.displacement * Vector2(1.0, size.x/size.y)); |
| ... | ... | @@ -405,7 +405,7 @@ bool DissolveEffectApp::OnTimerTick() |
| 405 | 405 | mNextImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 406 | 406 | mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); |
| 407 | 407 | mNextImage.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); |
| 408 | - mNextImage.SetZ(INITIAL_DEPTH); | |
| 408 | + mNextImage.SetProperty( Actor::Property::POSITION_Z, INITIAL_DEPTH); | |
| 409 | 409 | mParent.Add( mNextImage ); |
| 410 | 410 | switch( mCentralLineIndex%4 ) |
| 411 | 411 | { | ... | ... |
examples/drag-and-drop/drag-and-drop-example.cpp
| ... | ... | @@ -80,7 +80,7 @@ public: |
| 80 | 80 | stage.KeyEventSignal().Connect( this, &DragAndDropExample::OnKeyEvent ); |
| 81 | 81 | |
| 82 | 82 | TextLabel hintText = TextLabel::New("please drag one textlabel, move and drop on other textlabel"); |
| 83 | - hintText.SetPosition(0.0f, 700.0f); | |
| 83 | + hintText.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 700.0f)); | |
| 84 | 84 | hintText.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); |
| 85 | 85 | hintText.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); |
| 86 | 86 | hintText.SetProperty(TextLabel::Property::MULTI_LINE, true); |
| ... | ... | @@ -98,8 +98,8 @@ public: |
| 98 | 98 | mTextLabel[i].SetProperty(TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER"); |
| 99 | 99 | mTextLabel[i].SetBackgroundColor(TEXT_LABEL_COLOR[i]); |
| 100 | 100 | |
| 101 | - mTextLabel[i].SetSize(TEXT_LABEL_WIDTH, TEXT_LABEL_HEIGHT); | |
| 102 | - mTextLabel[i].SetPosition(TEXT_LABEL_POSITION_X, TEXT_LABEL_POSITION_START_Y + TEXT_LABEL_HEIGHT * i); | |
| 101 | + mTextLabel[i].SetProperty( Actor::Property::SIZE, Vector2(TEXT_LABEL_WIDTH, TEXT_LABEL_HEIGHT) ); | |
| 102 | + mTextLabel[i].SetProperty( Actor::Property::POSITION, Vector2(TEXT_LABEL_POSITION_X, TEXT_LABEL_POSITION_START_Y + TEXT_LABEL_HEIGHT * i)); | |
| 103 | 103 | mDragAndDropDetector.Attach(mTextLabel[i]); |
| 104 | 104 | |
| 105 | 105 | mRect[i] = Rect<float>(TEXT_LABEL_POSITION_X, TEXT_LABEL_POSITION_START_Y + TEXT_LABEL_HEIGHT * i, TEXT_LABEL_WIDTH, TEXT_LABEL_HEIGHT); | ... | ... |
examples/effects-view/effects-view-example.cpp
| ... | ... | @@ -142,13 +142,13 @@ void EffectsViewApp::OnAppInitialize( Application& application ) |
| 142 | 142 | mDropShadowView = CreateEffectsView( EffectsView::DROP_SHADOW, effectsViewSize, mEffectSize ); |
| 143 | 143 | mDropShadowView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 144 | 144 | mDropShadowView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); |
| 145 | - mDropShadowView.SetZ( -mStageSize.height * 0.1f ); | |
| 145 | + mDropShadowView.SetProperty( Actor::Property::POSITION_Z, -mStageSize.height * 0.1f ); | |
| 146 | 146 | mContents.Add( mDropShadowView ); |
| 147 | 147 | |
| 148 | 148 | mEmbossView = CreateEffectsView( EffectsView::EMBOSS, effectsViewSize, mEffectSize ); |
| 149 | 149 | mEmbossView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 150 | 150 | mEmbossView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 151 | - mEmbossView.SetZ( mStageSize.height * 0.1f ); | |
| 151 | + mEmbossView.SetProperty( Actor::Property::POSITION_Z, mStageSize.height * 0.1f ); | |
| 152 | 152 | mContents.Add( mEmbossView ); |
| 153 | 153 | |
| 154 | 154 | SetTitle( mEffectSize ); |
| ... | ... | @@ -159,7 +159,7 @@ EffectsView EffectsViewApp::CreateEffectsView( EffectsView::EffectType type, con |
| 159 | 159 | { |
| 160 | 160 | Toolkit::EffectsView effectsView = Toolkit::EffectsView::New(type); |
| 161 | 161 | // set control size |
| 162 | - effectsView.SetSize( viewSize.width, viewSize.height ); | |
| 162 | + effectsView.SetProperty( Actor::Property::SIZE, Vector2( viewSize.width, viewSize.height ) ); | |
| 163 | 163 | // set effect size property |
| 164 | 164 | effectsView.SetProperty( EffectsView::Property::EFFECT_SIZE, effectSize ); |
| 165 | 165 | |
| ... | ... | @@ -169,8 +169,8 @@ EffectsView EffectsViewApp::CreateEffectsView( EffectsView::EffectType type, con |
| 169 | 169 | TextLabel textActor( TextLabel::New( text ) ); |
| 170 | 170 | textActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); |
| 171 | 171 | textActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); |
| 172 | - textActor.SetSize( viewSize ); | |
| 173 | - textActor.SetPosition( viewSize.width*0.4f, viewSize.height*0.3f ); | |
| 172 | + textActor.SetProperty( Actor::Property::SIZE, viewSize ); | |
| 173 | + textActor.SetProperty( Actor::Property::POSITION, Vector2( viewSize.width*0.4f, viewSize.height*0.3f )); | |
| 174 | 174 | textActor.SetProperty( TextLabel::Property::POINT_SIZE, DemoHelper::ScalePointSize(14.f) ); |
| 175 | 175 | effectsView.Add( textActor ); |
| 176 | 176 | |
| ... | ... | @@ -178,8 +178,8 @@ EffectsView EffectsViewApp::CreateEffectsView( EffectsView::EffectType type, con |
| 178 | 178 | ImageView icon = ImageView::New( TEST_IMAGE ); |
| 179 | 179 | icon.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT ); |
| 180 | 180 | icon.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT ); |
| 181 | - icon.SetX( viewSize.width*0.1f ); | |
| 182 | - icon.SetSize( viewSize.height*0.8f, viewSize.height*0.8f ); | |
| 181 | + icon.SetProperty( Actor::Property::POSITION_X, viewSize.width*0.1f ); | |
| 182 | + icon.SetProperty( Actor::Property::SIZE, Vector2( viewSize.height*0.8f, viewSize.height*0.8f ) ); | |
| 183 | 183 | effectsView.Add( icon ); |
| 184 | 184 | |
| 185 | 185 | AnimateEffectProperties( effectsView ); | ... | ... |
examples/flex-container/flex-container-example.cpp
| ... | ... | @@ -192,8 +192,8 @@ public: |
| 192 | 192 | mFlexContainer = FlexContainer::New(); |
| 193 | 193 | mFlexContainer.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); |
| 194 | 194 | mFlexContainer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); |
| 195 | - mFlexContainer.SetSize( stageSize.width, stageSize.height - VIEW_STYLE.mToolBarHeight ); | |
| 196 | - mFlexContainer.SetY(VIEW_STYLE.mToolBarHeight); | |
| 195 | + mFlexContainer.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width, stageSize.height - VIEW_STYLE.mToolBarHeight ) ); | |
| 196 | + mFlexContainer.SetProperty( Actor::Property::POSITION_Y, VIEW_STYLE.mToolBarHeight); | |
| 197 | 197 | mFlexContainer.SetProperty(FlexContainer::Property::FLEX_DIRECTION, FlexContainer::COLUMN); // column as main axis |
| 198 | 198 | contents.Add(mFlexContainer); |
| 199 | 199 | |
| ... | ... | @@ -237,7 +237,7 @@ public: |
| 237 | 237 | // flex properties that only work when there are multiple lines in the layout |
| 238 | 238 | flexItem.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS); |
| 239 | 239 | // Make sure there are still extra space in the line after wrapping |
| 240 | - flexItem.SetSize(stageSize.width / NUM_FLEX_ITEMS * 1.25f, (stageSize.height - VIEW_STYLE.mToolBarHeight) * 0.95f / NUM_FLEX_ITEMS * 1.25f); | |
| 240 | + flexItem.SetProperty( Actor::Property::SIZE, Vector2(stageSize.width / NUM_FLEX_ITEMS * 1.25f, (stageSize.height - VIEW_STYLE.mToolBarHeight) * 0.95f / NUM_FLEX_ITEMS * 1.25f) ); | |
| 241 | 241 | |
| 242 | 242 | mFlexItemContainer.Add( flexItem ); |
| 243 | 243 | } | ... | ... |
examples/focus-integration/focus-integration.cpp
| ... | ... | @@ -72,12 +72,12 @@ public: |
| 72 | 72 | { |
| 73 | 73 | contentTable.SetFitHeight( i ); |
| 74 | 74 | } |
| 75 | - contentTable.SetPosition( 0.0f, TOP_MARGIN ); | |
| 75 | + contentTable.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, TOP_MARGIN )); | |
| 76 | 76 | mContentLayer.Add( contentTable ); |
| 77 | 77 | |
| 78 | 78 | // Create label to display which control's KeyEvent callback is called |
| 79 | 79 | mEventLabel = TextLabel::New("Controls don't get KeyEvent yet"); |
| 80 | - mEventLabel.SetSize( mStage.GetSize().width, mStage.GetSize().height*0.1f ); | |
| 80 | + mEventLabel.SetProperty( Actor::Property::SIZE, Vector2( mStage.GetSize().width, mStage.GetSize().height*0.1f ) ); | |
| 81 | 81 | mEventLabel.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH); |
| 82 | 82 | mEventLabel.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); |
| 83 | 83 | mEventLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); |
| ... | ... | @@ -85,7 +85,7 @@ public: |
| 85 | 85 | contentTable.Add( mEventLabel ); |
| 86 | 86 | |
| 87 | 87 | mContainer = TableView::New( 4, 3 ); |
| 88 | - mContainer.SetSize( mStage.GetSize().width, mStage.GetSize().height*0.4f ); | |
| 88 | + mContainer.SetProperty( Actor::Property::SIZE, Vector2( mStage.GetSize().width, mStage.GetSize().height*0.4f ) ); | |
| 89 | 89 | mContainer.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH); |
| 90 | 90 | mContainer.SetBackgroundColor( BACKGROUND_COLOUR ); |
| 91 | 91 | mContainer.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) ); | ... | ... |
examples/fpp-game/fpp-game-tutorial-controller.cpp
| ... | ... | @@ -113,7 +113,7 @@ void FppGameTutorialController::DisplayTutorial() |
| 113 | 113 | mLeftLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 114 | 114 | mLeftLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 115 | 115 | mLeftLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); |
| 116 | - mLeftLabel.SetSize( Vector3( stageSize.x*0.5, stageSize.y, 1.0f ) ); | |
| 116 | + mLeftLabel.SetProperty( Actor::Property::SIZE, Vector3( stageSize.x*0.5, stageSize.y, 1.0f ) ); | |
| 117 | 117 | mLeftLabel.SetProperty( Toolkit::Control::Property::BACKGROUND, |
| 118 | 118 | Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR ) |
| 119 | 119 | .Add( ColorVisual::Property::MIX_COLOR, Vector4( 0.0, 0.0, 0.7, 0.2 ) ) ); |
| ... | ... | @@ -126,7 +126,7 @@ void FppGameTutorialController::DisplayTutorial() |
| 126 | 126 | mRightLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 127 | 127 | mRightLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 128 | 128 | mRightLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); |
| 129 | - mRightLabel.SetSize( Vector3( stageSize.x*0.5, stageSize.y, 1.0f ) ); | |
| 129 | + mRightLabel.SetProperty( Actor::Property::SIZE, Vector3( stageSize.x*0.5, stageSize.y, 1.0f ) ); | |
| 130 | 130 | mRightLabel.SetProperty( Toolkit::Control::Property::BACKGROUND, |
| 131 | 131 | Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR ) |
| 132 | 132 | .Add( ColorVisual::Property::MIX_COLOR, Vector4( 0.5, 0.0, 0.0, 0.2 ) ) ); |
| ... | ... | @@ -147,8 +147,8 @@ void FppGameTutorialController::DisplayTutorial() |
| 147 | 147 | uiCamera.RotateBy( Degree(90.0f), Vector3( 0.0f, 0.0f, 1.0f )); |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | - mLeftLabel.SetPosition( Vector3( -stageSize.x*0.25f, 0.0, 0.0 ) ); | |
| 151 | - mRightLabel.SetPosition( Vector3( stageSize.x*0.25f, 0.0, 0.0 ) ); | |
| 150 | + mLeftLabel.SetProperty( Actor::Property::POSITION, Vector3( -stageSize.x*0.25f, 0.0, 0.0 ) ); | |
| 151 | + mRightLabel.SetProperty( Actor::Property::POSITION, Vector3( stageSize.x*0.25f, 0.0, 0.0 ) ); | |
| 152 | 152 | |
| 153 | 153 | mUiRoot.Add( mLeftLabel ); |
| 154 | 154 | mUiRoot.Add( mRightLabel ); | ... | ... |
examples/fpp-game/game-camera.cpp
| ... | ... | @@ -169,7 +169,7 @@ bool GameCamera::OnTick() |
| 169 | 169 | |
| 170 | 170 | position += sidewaysVector * (sidewaysSpeed * 0.5f); |
| 171 | 171 | |
| 172 | - mCameraActor.SetPosition( position ); | |
| 172 | + mCameraActor.SetProperty( Actor::Property::POSITION, position ); | |
| 173 | 173 | |
| 174 | 174 | mCameraPosition = position; |
| 175 | 175 | |
| ... | ... | @@ -188,7 +188,7 @@ void GameCamera::InitialiseDefaultCamera() |
| 188 | 188 | // should be read from file |
| 189 | 189 | mCameraActor.SetNearClippingPlane( mNear ); |
| 190 | 190 | mCameraActor.SetFarClippingPlane( mFar ); |
| 191 | - mCameraActor.SetPosition( CAMERA_DEFAULT_POSITION ); | |
| 191 | + mCameraActor.SetProperty( Actor::Property::POSITION, CAMERA_DEFAULT_POSITION ); | |
| 192 | 192 | |
| 193 | 193 | // Camera position is shadowed in order to avoid using.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) |
| 194 | 194 | mCameraPosition = CAMERA_DEFAULT_POSITION; |
| ... | ... | @@ -200,8 +200,8 @@ void GameCamera::CreateInterceptorActor() |
| 200 | 200 | |
| 201 | 201 | mInterceptorActor = Actor::New(); |
| 202 | 202 | mInterceptorActor.SetProperty( Dali::Actor::Property::NAME, "GameInputInterceptor" ); |
| 203 | - mInterceptorActor.SetSize( Vector3( stage.GetSize().x, stage.GetSize().y, 1 ) ); | |
| 204 | - mInterceptorActor.SetPosition( Vector3( 0.0, 0.0, 1.0 ) ); | |
| 203 | + mInterceptorActor.SetProperty( Actor::Property::SIZE, Vector3( stage.GetSize().x, stage.GetSize().y, 1 ) ); | |
| 204 | + mInterceptorActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0, 0.0, 1.0 ) ); | |
| 205 | 205 | mInterceptorActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 206 | 206 | mInterceptorActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 207 | 207 | mCameraActor.Add( mInterceptorActor ); | ... | ... |
examples/fpp-game/game-entity.cpp
| ... | ... | @@ -57,7 +57,7 @@ Dali::Actor& GameEntity::GetActor() |
| 57 | 57 | |
| 58 | 58 | void GameEntity::SetLocation( const Dali::Vector3& loc ) |
| 59 | 59 | { |
| 60 | - mActor.SetPosition( loc ); | |
| 60 | + mActor.SetProperty( Dali::Actor::Property::POSITION, loc ); | |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | void GameEntity::SetRotation( const Dali::Quaternion& rot ) |
| ... | ... | @@ -67,10 +67,10 @@ void GameEntity::SetRotation( const Dali::Quaternion& rot ) |
| 67 | 67 | |
| 68 | 68 | void GameEntity::SetScale( const Dali::Vector3& scale ) |
| 69 | 69 | { |
| 70 | - mActor.SetScale( scale ); | |
| 70 | + mActor.SetProperty( Dali::Actor::Property::SCALE, scale ); | |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | void GameEntity::SetSize( const Dali::Vector3& size ) |
| 74 | 74 | { |
| 75 | - mActor.SetSize( size ); | |
| 75 | + mActor.SetProperty( Dali::Actor::Property::SIZE, size ); | |
| 76 | 76 | } | ... | ... |
examples/fpp-game/game-scene.cpp
| ... | ... | @@ -156,8 +156,8 @@ bool GameScene::Load(const char *filename) |
| 156 | 156 | mRootActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 157 | 157 | mRootActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 158 | 158 | stage.GetRootLayer().Add( mRootActor ); |
| 159 | - mRootActor.SetScale( -1.0, 1.0, 1.0 ); | |
| 160 | - mRootActor.SetPosition( 0.0, 0.0, 0.0 ); | |
| 159 | + mRootActor.SetProperty( Actor::Property::SCALE, Vector3( -1.0, 1.0, 1.0 ) ); | |
| 160 | + mRootActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0, 0.0, 0.0 ) ); | |
| 161 | 161 | mRootActor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Degree( 90 ), Vector3( 1.0, 0.0, 0.0 ) ) ); |
| 162 | 162 | for( size_t i = 0; i < mEntities.Size(); ++i ) |
| 163 | 163 | { | ... | ... |
examples/frame-callback/frame-callback-example.cpp
| ... | ... | @@ -108,7 +108,7 @@ private: |
| 108 | 108 | ImageView imageView = ImageView::New( IMAGE_NAME ); |
| 109 | 109 | imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 110 | 110 | imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 111 | - imageView.SetY( yPos ); | |
| 111 | + imageView.SetProperty( Actor::Property::POSITION_Y, yPos ); | |
| 112 | 112 | yPos += imageView.GetNaturalSize().height; |
| 113 | 113 | |
| 114 | 114 | // Add the ID of the created ImageView to mFrameCallback. | ... | ... |
examples/gaussian-blur-view/gaussian-blur-view-example.cpp
| ... | ... | @@ -86,7 +86,7 @@ private: |
| 86 | 86 | Layer onTop = Layer::New(); |
| 87 | 87 | onTop.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 88 | 88 | onTop.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 89 | - onTop.SetSize( stageSize ); | |
| 89 | + onTop.SetProperty( Actor::Property::SIZE, stageSize ); | |
| 90 | 90 | stage.Add( onTop ); |
| 91 | 91 | onTop.RaiseToTop(); |
| 92 | 92 | |
| ... | ... | @@ -120,7 +120,7 @@ private: |
| 120 | 120 | mGaussianBlurView = GaussianBlurView::New( 30, 8.0f, Pixel::RGBA8888, 0.5f, 0.5f, false ); |
| 121 | 121 | mGaussianBlurView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 122 | 122 | mGaussianBlurView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 123 | - mGaussianBlurView.SetSize( stage.GetSize() ); | |
| 123 | + mGaussianBlurView.SetProperty( Actor::Property::SIZE, stage.GetSize() ); | |
| 124 | 124 | stage.Add( mGaussianBlurView ); |
| 125 | 125 | |
| 126 | 126 | mGaussianBlurView.Add( mImageView ); | ... | ... |
examples/gestures/gesture-example.cpp
| ... | ... | @@ -88,7 +88,7 @@ void AddHelpInfo( const std::string&& string, Actor parent, Animation animation, |
| 88 | 88 | |
| 89 | 89 | text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 90 | 90 | text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 91 | - text.SetPosition( position ); | |
| 91 | + text.SetProperty( Actor::Property::POSITION, position ); | |
| 92 | 92 | text.SetProperty( DevelActor::Property::OPACITY, 0.0f ); |
| 93 | 93 | text.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, Text::HorizontalAlignment::CENTER ); |
| 94 | 94 | text.SetProperty( TextLabel::Property::MULTI_LINE, true ); |
| ... | ... | @@ -154,7 +154,7 @@ private: |
| 154 | 154 | |
| 155 | 155 | // Create a control with a circular gradient that we'll use for the gestures and be a quarter of the size of the stage. |
| 156 | 156 | Actor touchControl = Control::New(); |
| 157 | - touchControl.SetSize( stage.GetSize() * 0.25f ); | |
| 157 | + touchControl.SetProperty( Actor::Property::SIZE, stage.GetSize() * 0.25f ); | |
| 158 | 158 | touchControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 159 | 159 | touchControl.SetProperty( Control::Property::BACKGROUND, CONTROL_BACKGROUND ); |
| 160 | 160 | background.Add( touchControl ); |
| ... | ... | @@ -303,7 +303,7 @@ private: |
| 303 | 303 | actor.GetProperty( Actor::Property::POSITION ).Get( currentPosition ); |
| 304 | 304 | |
| 305 | 305 | Vector3 newPosition = currentPosition + scaledDisplacement; |
| 306 | - actor.SetPosition( newPosition ); | |
| 306 | + actor.SetProperty( Actor::Property::POSITION, newPosition ); | |
| 307 | 307 | |
| 308 | 308 | switch( pan.state ) |
| 309 | 309 | { |
| ... | ... | @@ -408,7 +408,7 @@ private: |
| 408 | 408 | } |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | - actor.SetScale( mStartingScale * pinch.scale ); | |
| 411 | + actor.SetProperty( Actor::Property::SCALE, mStartingScale * pinch.scale ); | |
| 412 | 412 | } |
| 413 | 413 | |
| 414 | 414 | /** | ... | ... |
examples/hello-world/hello-world-example.cpp
| ... | ... | @@ -50,24 +50,6 @@ public: |
| 50 | 50 | textLabel.SetProperty( Dali::Actor::Property::NAME, "helloWorldLabel" ); |
| 51 | 51 | stage.Add( textLabel ); |
| 52 | 52 | |
| 53 | - | |
| 54 | - Actor parent = Actor::New(); | |
| 55 | - Vector4 parentColor( 1.0f, 0.5f, 0.0f, 0.8f ); | |
| 56 | - parent.SetProperty( Actor::Property::COLOR, parentColor ); | |
| 57 | - Stage::GetCurrent().Add( parent ); | |
| 58 | - | |
| 59 | - Actor child = Actor::New(); | |
| 60 | - Vector4 childColor( 0.5f, 0.6f, 0.5f, 1.0f ); | |
| 61 | - child.SetProperty( Actor::Property::COLOR, childColor ); | |
| 62 | - parent.Add( child ); | |
| 63 | - | |
| 64 | - std::string colorMode = static_cast<std::string>( child.GetProperty< std::string >( Actor::Property::COLOR_MODE ) ); | |
| 65 | - printf("color mode: %s, should be: %d\n", colorMode.c_str(), ColorMode::USE_OWN_MULTIPLY_PARENT_ALPHA ); | |
| 66 | - | |
| 67 | - child.SetProperty( Actor::Property::COLOR_MODE, ColorMode::USE_PARENT_COLOR ); | |
| 68 | - colorMode = static_cast<std::string>( child.GetProperty< std::string >( Actor::Property::COLOR_MODE ) ); | |
| 69 | - printf("color mode: %s, should be: %d\n", colorMode.c_str(), ColorMode::USE_PARENT_COLOR ); | |
| 70 | - | |
| 71 | 53 | // Respond to a click anywhere on the stage |
| 72 | 54 | stage.GetRootLayer().TouchSignal().Connect( this, &HelloWorldController::OnTouch ); |
| 73 | 55 | ... | ... |
examples/homescreen-benchmark/homescreen-benchmark.cpp
| ... | ... | @@ -277,8 +277,8 @@ public: |
| 277 | 277 | { |
| 278 | 278 | float rowX = x * COL_WIDTH + PADDING; |
| 279 | 279 | float rowY = y * ROW_HEIGHT + PADDING; |
| 280 | - iconView.SetSize( Vector3( COL_WIDTH, ROW_HEIGHT, 1.0f ) ); | |
| 281 | - iconView.SetPosition( Vector3( rowX, rowY, 0.0f ) ); | |
| 280 | + iconView.SetProperty( Actor::Property::SIZE, Vector3( COL_WIDTH, ROW_HEIGHT, 1.0f ) ); | |
| 281 | + iconView.SetProperty( Actor::Property::POSITION, Vector3( rowX, rowY, 0.0f ) ); | |
| 282 | 282 | } |
| 283 | 283 | else |
| 284 | 284 | { |
| ... | ... | @@ -385,12 +385,12 @@ public: |
| 385 | 385 | // Move page 'a little bit up'. |
| 386 | 386 | page.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 387 | 387 | page.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 388 | - page.SetPosition( Vector3( stageSize.x * i, 0.0f, 0.0f ) ); | |
| 388 | + page.SetProperty( Actor::Property::POSITION, Vector3( stageSize.x * i, 0.0f, 0.0f ) ); | |
| 389 | 389 | mScrollParent.Add( page ); |
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 392 | mScrollParent.SetProperty( DevelActor::Property::OPACITY, 1.0f ); |
| 393 | - mScrollParent.SetScale( Vector3::ONE ); | |
| 393 | + mScrollParent.SetProperty( Actor::Property::SCALE, Vector3::ONE ); | |
| 394 | 394 | |
| 395 | 395 | // Fade in. |
| 396 | 396 | ShowAnimation(); | ... | ... |
examples/image-policies/image-policies-example.cpp
| ... | ... | @@ -416,8 +416,8 @@ class ImagePolicies: public ConnectionTracker |
| 416 | 416 | mNextButton.SetProperty( Button::Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL, LOADING_IMAGE ); |
| 417 | 417 | mNextButton.SetProperty( Button::Property::DISABLED_SELECTED_BACKGROUND_VISUAL, NEXT_BUTTON_DISABLED_IMAGE ); |
| 418 | 418 | mNextButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); |
| 419 | - mNextButton.SetY( -50.0f ); | |
| 420 | - mNextButton.SetSize( 100.0f, 100.0f ); | |
| 419 | + mNextButton.SetProperty( Actor::Property::POSITION_Y, -50.0f ); | |
| 420 | + mNextButton.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) ); | |
| 421 | 421 | mNextButton.ClickedSignal().Connect( this, &ImagePolicies::ChangeImageClicked ); |
| 422 | 422 | mTable.AddChild( mNextButton, TableView::CellPosition( TableRowPlacement::NEXT_BUTTON, 0 ) ); |
| 423 | 423 | mTable.SetCellPadding( Vector2( 2.0f, 2.0f ) ); | ... | ... |
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp
| ... | ... | @@ -191,7 +191,7 @@ public: |
| 191 | 191 | Toolkit::ImageView background = Toolkit::ImageView::New(); |
| 192 | 192 | background.SetProperty( Toolkit::ImageView::Property::IMAGE, backgroundImage ); |
| 193 | 193 | background.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 194 | - background.SetSize( stage.GetSize() ); | |
| 194 | + background.SetProperty( Actor::Property::SIZE, stage.GetSize() ); | |
| 195 | 195 | stage.Add( background ); |
| 196 | 196 | |
| 197 | 197 | BufferImage heightBackground = BufferImage::WHITE(); |
| ... | ... | @@ -217,15 +217,15 @@ public: |
| 217 | 217 | mDesiredBox = Toolkit::ImageView::New( BORDER_IMAGE ); |
| 218 | 218 | background.Add( mDesiredBox ); |
| 219 | 219 | |
| 220 | - mDesiredBox.SetSize( stage.GetSize() * mImageStageScale ); | |
| 220 | + mDesiredBox.SetProperty( Actor::Property::SIZE, stage.GetSize() * mImageStageScale ); | |
| 221 | 221 | mDesiredBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 222 | 222 | mDesiredBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 223 | 223 | |
| 224 | - mHeightBox.SetSize( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ); | |
| 224 | + mHeightBox.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ) ); | |
| 225 | 225 | mHeightBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 226 | 226 | mHeightBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 227 | 227 | |
| 228 | - mWidthBox.SetSize( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ); | |
| 228 | + mWidthBox.SetProperty( Actor::Property::SIZE, Vector2( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ) ); | |
| 229 | 229 | mWidthBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 230 | 230 | mWidthBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 231 | 231 | |
| ... | ... | @@ -239,7 +239,7 @@ public: |
| 239 | 239 | // Display the actor on the stage |
| 240 | 240 | mDesiredBox.Add( mImageView ); |
| 241 | 241 | |
| 242 | - mImageView.SetSize( stage.GetSize() * mImageStageScale ); | |
| 242 | + mImageView.SetProperty( Actor::Property::SIZE, stage.GetSize() * mImageStageScale ); | |
| 243 | 243 | |
| 244 | 244 | // Setup the pinch detector for scaling the desired image load dimensions: |
| 245 | 245 | mPinchDetector = PinchGestureDetector::New(); |
| ... | ... | @@ -251,7 +251,7 @@ public: |
| 251 | 251 | mGrabCorner.SetProperty( Dali::Actor::Property::NAME, "GrabCorner" ); |
| 252 | 252 | mGrabCorner.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); |
| 253 | 253 | mGrabCorner.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_RIGHT ); |
| 254 | - mGrabCorner.SetPosition( -BORDER_WIDTH, -BORDER_WIDTH ); | |
| 254 | + mGrabCorner.SetProperty( Actor::Property::POSITION, Vector2( -BORDER_WIDTH, -BORDER_WIDTH )); | |
| 255 | 255 | mGrabCorner.SetProperty( DevelActor::Property::OPACITY, 0.6f ); |
| 256 | 256 | |
| 257 | 257 | Layer grabCornerLayer = Layer::New(); |
| ... | ... | @@ -293,8 +293,8 @@ public: |
| 293 | 293 | // Last image button: |
| 294 | 294 | imagePrevious.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 295 | 295 | imagePrevious.RotateBy( Radian(3.14159265358979323846f), Vector3( 0, 1.0f, 0 ) ); |
| 296 | - imagePrevious.SetY( playWidth * 0.5f ); | |
| 297 | - imagePrevious.SetX( playWidth + playWidth * 0.5f ); | |
| 296 | + imagePrevious.SetProperty( Actor::Property::POSITION_Y, playWidth * 0.5f ); | |
| 297 | + imagePrevious.SetProperty( Actor::Property::POSITION_X, playWidth + playWidth * 0.5f ); | |
| 298 | 298 | imagePrevious.SetProperty( DevelActor::Property::OPACITY, 0.6f ); |
| 299 | 299 | controlsLayer.Add( imagePrevious ); |
| 300 | 300 | imagePrevious.SetProperty( Dali::Actor::Property::NAME, PREVIOUS_BUTTON_ID ); |
| ... | ... | @@ -303,8 +303,8 @@ public: |
| 303 | 303 | // Next image button: |
| 304 | 304 | Toolkit::ImageView imageNext = Toolkit::ImageView::New( DALI_ICON_PLAY, ImageDimensions( playWidth, playWidth ) ); |
| 305 | 305 | imageNext.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT ); |
| 306 | - imageNext.SetY( playWidth * 0.5f ); | |
| 307 | - imageNext.SetX( stage.GetSize().x - playWidth * 0.5f ); | |
| 306 | + imageNext.SetProperty( Actor::Property::POSITION_Y, playWidth * 0.5f ); | |
| 307 | + imageNext.SetProperty( Actor::Property::POSITION_X, stage.GetSize().x - playWidth * 0.5f ); | |
| 308 | 308 | imageNext.SetProperty( DevelActor::Property::OPACITY, 0.6f ); |
| 309 | 309 | controlsLayer.Add( imageNext ); |
| 310 | 310 | imageNext.SetProperty( Dali::Actor::Property::NAME, NEXT_BUTTON_ID ); |
| ... | ... | @@ -322,7 +322,7 @@ public: |
| 322 | 322 | |
| 323 | 323 | modesGroupBackground.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); |
| 324 | 324 | modesGroupBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT ); |
| 325 | - modesGroupBackground.SetPosition( 0.0f, 0.0f ); | |
| 325 | + modesGroupBackground.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f )); | |
| 326 | 326 | |
| 327 | 327 | controlsLayer.Add( modesGroupBackground ); |
| 328 | 328 | |
| ... | ... | @@ -390,7 +390,7 @@ public: |
| 390 | 390 | popup.SetProperty( Dali::Actor::Property::NAME, "POPUP" ); |
| 391 | 391 | popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 392 | 392 | popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 393 | - popup.SetSize( POPUP_WIDTH_DP, 0.0f ); | |
| 393 | + popup.SetProperty( Actor::Property::SIZE, Vector2( POPUP_WIDTH_DP, 0.0f ) ); | |
| 394 | 394 | |
| 395 | 395 | popup.OutsideTouchedSignal().Connect( this, &ImageScalingAndFilteringController::OnPopupOutsideTouched ); |
| 396 | 396 | |
| ... | ... | @@ -673,7 +673,7 @@ private: |
| 673 | 673 | const char * const path = IMAGE_PATHS[ mCurrentPath ]; |
| 674 | 674 | Stage stage = Stage::GetCurrent(); |
| 675 | 675 | Size imageSize = stage.GetSize() * mImageStageScale; |
| 676 | - mImageView.SetSize( imageSize ); | |
| 676 | + mImageView.SetProperty( Actor::Property::SIZE, imageSize ); | |
| 677 | 677 | |
| 678 | 678 | Property::Map map; |
| 679 | 679 | map[Toolkit::ImageVisual::Property::URL] = path; |
| ... | ... | @@ -696,10 +696,10 @@ private: |
| 696 | 696 | |
| 697 | 697 | // Border size needs to be modified to take into account the width of the frame. |
| 698 | 698 | Vector2 borderScale( ( imageSize + Vector2( BORDER_WIDTH * 2.0f, BORDER_WIDTH * 2.0f ) ) / stage.GetSize() ); |
| 699 | - mDesiredBox.SetSize( stage.GetSize() * borderScale ); | |
| 699 | + mDesiredBox.SetProperty( Actor::Property::SIZE, stage.GetSize() * borderScale ); | |
| 700 | 700 | |
| 701 | - mHeightBox.SetSize( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ); | |
| 702 | - mWidthBox.SetSize( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ); | |
| 701 | + mHeightBox.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ) ); | |
| 702 | + mWidthBox.SetProperty( Actor::Property::SIZE, Vector2( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ) ); | |
| 703 | 703 | } |
| 704 | 704 | |
| 705 | 705 | private: | ... | ... |
examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp
| ... | ... | @@ -393,7 +393,7 @@ public: |
| 393 | 393 | void OnScrollViewRelayout(Actor actor) |
| 394 | 394 | { |
| 395 | 395 | // Make the height of the horizontal scroll bar to be the same as the width of scroll view. |
| 396 | - mScrollBarHorizontal.SetSize(Vector2(0.0f, mScrollView.GetRelayoutSize( Dimension::WIDTH) )); | |
| 396 | + mScrollBarHorizontal.SetProperty( Actor::Property::SIZE, Vector2(0.0f, mScrollView.GetRelayoutSize( Dimension::WIDTH) )); | |
| 397 | 397 | } |
| 398 | 398 | |
| 399 | 399 | /** |
| ... | ... | @@ -473,8 +473,8 @@ public: |
| 473 | 473 | const Vector2 imagePosition = imageRegionCorner + Vector2( GRID_CELL_PADDING , GRID_CELL_PADDING ) + imageSize * 0.5f; |
| 474 | 474 | |
| 475 | 475 | ImageView image = CreateImageView( imageSource.configuration.path, imageSize.x, imageSize.y, fittingMode ); |
| 476 | - image.SetPosition( Vector3( imagePosition.x, imagePosition.y, 0 ) ); | |
| 477 | - image.SetSize( imageSize ); | |
| 476 | + image.SetProperty( Actor::Property::POSITION, Vector3( imagePosition.x, imagePosition.y, 0 ) ); | |
| 477 | + image.SetProperty( Actor::Property::SIZE, imageSize ); | |
| 478 | 478 | image.TouchSignal().Connect( this, &ImageScalingIrregularGridController::OnTouchImage ); |
| 479 | 479 | image.ResourceReadySignal().Connect( this, &ImageScalingIrregularGridController::ResourceReadySignal ); |
| 480 | 480 | mFittingModes[image.GetId()] = fittingMode; | ... | ... |
examples/image-view-alpha-blending/image-view-alpha-blending-example.cpp
| ... | ... | @@ -57,23 +57,23 @@ private: |
| 57 | 57 | float imageSize = 512.f; |
| 58 | 58 | |
| 59 | 59 | Toolkit::ImageView imageView0 = CreateImageView( IMAGE_PATH ); |
| 60 | - imageView0.SetSize(imageSize, imageSize); | |
| 60 | + imageView0.SetProperty( Actor::Property::SIZE, Vector2(imageSize, imageSize) ); | |
| 61 | 61 | imageView0.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 62 | - imageView0.SetY( -imageSize*0.5f ); | |
| 62 | + imageView0.SetProperty( Actor::Property::POSITION_Y, -imageSize*0.5f ); | |
| 63 | 63 | stage.Add(imageView0); |
| 64 | 64 | Toolkit::ImageView imageView1 = CreateImageView( redGreen0 ); |
| 65 | 65 | imageView1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 66 | - imageView1.SetSize(imageSize, imageSize); | |
| 66 | + imageView1.SetProperty( Actor::Property::SIZE, Vector2(imageSize, imageSize) ); | |
| 67 | 67 | imageView0.Add(imageView1); |
| 68 | 68 | |
| 69 | 69 | Toolkit::ImageView imageView2 = CreateImageView( IMAGE_PATH ); |
| 70 | - imageView2.SetSize(imageSize, imageSize); | |
| 70 | + imageView2.SetProperty( Actor::Property::SIZE, Vector2(imageSize, imageSize) ); | |
| 71 | 71 | imageView2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 72 | - imageView2.SetY( imageSize*0.5f ); | |
| 72 | + imageView2.SetProperty( Actor::Property::POSITION_Y, imageSize*0.5f ); | |
| 73 | 73 | stage.Add(imageView2); |
| 74 | 74 | Toolkit::ImageView imageView3 = CreateImageView( redGreen1); |
| 75 | 75 | imageView3.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 76 | - imageView3.SetSize(imageSize, imageSize); | |
| 76 | + imageView3.SetProperty( Actor::Property::SIZE, Vector2(imageSize, imageSize) ); | |
| 77 | 77 | imageView2.Add(imageView3); |
| 78 | 78 | |
| 79 | 79 | imageView2.SetProperty( Toolkit::ImageView::Property::PRE_MULTIPLIED_ALPHA, true ); | ... | ... |
examples/image-view-pixel-area/image-view-pixel-area-example.cpp
| ... | ... | @@ -121,17 +121,17 @@ private: |
| 121 | 121 | { |
| 122 | 122 | mImageView[i][j] = Toolkit::ImageView::New(); |
| 123 | 123 | mImageView[i][j].SetProperty( Toolkit::ImageView::Property::IMAGE, propertyMap ); |
| 124 | - mImageView[i][j].SetPosition( 50.f*(i-1), 50.f*(j-1) ); | |
| 124 | + mImageView[i][j].SetProperty( Actor::Property::POSITION, Vector2( 50.f*(i-1), 50.f*(j-1) )); | |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | mImageView[1][1].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 128 | 128 | mImageView[1][1].SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER ); |
| 129 | - mImageView[1][1].SetScale( 1.f/3.f ); | |
| 129 | + mImageView[1][1].SetProperty( Actor::Property::SCALE, 1.f/3.f ); | |
| 130 | 130 | mContent.Add( mImageView[1][1] ); |
| 131 | 131 | |
| 132 | 132 | mImageView[0][0].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 133 | 133 | mImageView[0][0].SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT ); |
| 134 | - mImageView[0][0].SetPosition( -50.f, -50.f ); | |
| 134 | + mImageView[0][0].SetProperty( Actor::Property::POSITION, Vector2( -50.f, -50.f )); | |
| 135 | 135 | mImageView[1][1].Add( mImageView[0][0] ); |
| 136 | 136 | |
| 137 | 137 | mImageView[1][0].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); | ... | ... |
examples/image-view-svg/image-view-svg-example.cpp
| ... | ... | @@ -78,7 +78,7 @@ public: |
| 78 | 78 | mStageBackground = Actor::New(); |
| 79 | 79 | mStageBackground.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 80 | 80 | mStageBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 81 | - mStageBackground.SetSize( stageSize.x, stageSize.y ); | |
| 81 | + mStageBackground.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, stageSize.y ) ); | |
| 82 | 82 | stage.Add(mStageBackground); |
| 83 | 83 | |
| 84 | 84 | // Push button, for changing the image set for displaying |
| ... | ... | @@ -101,7 +101,7 @@ public: |
| 101 | 101 | for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ ) |
| 102 | 102 | { |
| 103 | 103 | mSvgActor[i] = Toolkit::ImageView::New(SVG_IMAGES[mIndex+i]); |
| 104 | - mSvgActor[i].SetSize( mActorSize ); | |
| 104 | + mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize ); | |
| 105 | 105 | mSvgActor[i].TranslateBy( Vector3( 0.0, stageSize.height * 0.05, 0.0f ) ); |
| 106 | 106 | stage.Add( mSvgActor[i] ); |
| 107 | 107 | } |
| ... | ... | @@ -145,8 +145,8 @@ public: |
| 145 | 145 | { |
| 146 | 146 | for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED ; i++ ) |
| 147 | 147 | { |
| 148 | - mSvgActor[i].SetSize(mActorSize); | |
| 149 | - mSvgActor[i].SetPosition( Vector3::ZERO ); | |
| 148 | + mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize); | |
| 149 | + mSvgActor[i].SetProperty( Actor::Property::POSITION, Vector3::ZERO ); | |
| 150 | 150 | mScale = 1.f; |
| 151 | 151 | } |
| 152 | 152 | |
| ... | ... | @@ -180,7 +180,7 @@ public: |
| 180 | 180 | |
| 181 | 181 | for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ ) |
| 182 | 182 | { |
| 183 | - mSvgActor[i].SetScale( scale ); | |
| 183 | + mSvgActor[i].SetProperty( Actor::Property::SCALE, scale ); | |
| 184 | 184 | } |
| 185 | 185 | break; |
| 186 | 186 | } |
| ... | ... | @@ -194,8 +194,8 @@ public: |
| 194 | 194 | mScale = mScale < MIN_SCALE ? MIN_SCALE : mScale; |
| 195 | 195 | for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ ) |
| 196 | 196 | { |
| 197 | - mSvgActor[i].SetSize( mActorSize * mScale ); | |
| 198 | - mSvgActor[i].SetScale( 1.0f ); | |
| 197 | + mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize * mScale ); | |
| 198 | + mSvgActor[i].SetProperty( Actor::Property::SCALE, 1.0f ); | |
| 199 | 199 | } |
| 200 | 200 | break; |
| 201 | 201 | } |
| ... | ... | @@ -229,7 +229,7 @@ public: |
| 229 | 229 | } |
| 230 | 230 | for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ ) |
| 231 | 231 | { |
| 232 | - mSvgActor[i].SetSize( mActorSize * mScale ); | |
| 232 | + mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize * mScale ); | |
| 233 | 233 | } |
| 234 | 234 | } |
| 235 | 235 | else if( strcmp(keyName, "Right") == 0 ) |
| ... | ... | @@ -240,7 +240,7 @@ public: |
| 240 | 240 | } |
| 241 | 241 | for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ ) |
| 242 | 242 | { |
| 243 | - mSvgActor[i].SetSize( mActorSize * mScale ); | |
| 243 | + mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize * mScale ); | |
| 244 | 244 | } |
| 245 | 245 | } |
| 246 | 246 | } | ... | ... |
examples/image-view-url/image-view-url-example.cpp
| ... | ... | @@ -118,7 +118,7 @@ private: |
| 118 | 118 | // create actor to render input with applied shader |
| 119 | 119 | mActorForInput = Toolkit::ImageView::New( url ); |
| 120 | 120 | mActorForInput.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); |
| 121 | - mActorForInput.SetSize(TARGET_SIZE); | |
| 121 | + mActorForInput.SetProperty( Actor::Property::SIZE, TARGET_SIZE); | |
| 122 | 122 | Property::Map customShader; |
| 123 | 123 | customShader[Toolkit::Visual::Shader::Property::FRAGMENT_SHADER] = FILTER_FRAGMENT_SOURCE; |
| 124 | 124 | Property::Map visualMap; | ... | ... |
examples/image-view/image-view-example.cpp
| ... | ... | @@ -122,7 +122,7 @@ class ImageViewController: public ConnectionTracker |
| 122 | 122 | Toolkit::TextLabel instructions = Toolkit::TextLabel::New( EXAMPLE_INSTRUCTIONS ); |
| 123 | 123 | instructions.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 124 | 124 | instructions.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_CENTER); |
| 125 | - instructions.SetY(-50.0f); | |
| 125 | + instructions.SetProperty( Actor::Property::POSITION_Y, -50.0f); | |
| 126 | 126 | instructions.SetProperty( Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL, true ); |
| 127 | 127 | instructions.SetProperty( Toolkit::TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 10 ); |
| 128 | 128 | mContentLayer.Add(instructions); | ... | ... |
examples/item-view/item-view-example.cpp
| ... | ... | @@ -232,12 +232,12 @@ public: |
| 232 | 232 | mDeleteButton = Toolkit::PushButton::New(); |
| 233 | 233 | mDeleteButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT); |
| 234 | 234 | mDeleteButton.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); |
| 235 | - mDeleteButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); | |
| 235 | + mDeleteButton.SetProperty( Actor::Property::POSITION, Vector2( BUTTON_BORDER, BUTTON_BORDER )); | |
| 236 | 236 | mDeleteButton.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D ); |
| 237 | 237 | mDeleteButton.SetProperty( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, DELETE_IMAGE ); |
| 238 | 238 | mDeleteButton.SetProperty( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, DELETE_IMAGE_SELECTED ); |
| 239 | 239 | mDeleteButton.SetProperty( Toolkit::Control::Property::BACKGROUND, TOOLBAR_IMAGE ); |
| 240 | - mDeleteButton.SetSize( Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) ); | |
| 240 | + mDeleteButton.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) ); | |
| 241 | 241 | mDeleteButton.ClickedSignal().Connect( this, &ItemViewExample::OnDeleteButtonClicked); |
| 242 | 242 | mDeleteButton.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); |
| 243 | 243 | mDeleteButton.SetProperty( Actor::Property::VISIBLE, false ); |
| ... | ... | @@ -247,12 +247,12 @@ public: |
| 247 | 247 | mInsertButton = Toolkit::PushButton::New(); |
| 248 | 248 | mInsertButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT); |
| 249 | 249 | mInsertButton.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); |
| 250 | - mInsertButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); | |
| 250 | + mInsertButton.SetProperty( Actor::Property::POSITION, Vector2( BUTTON_BORDER, BUTTON_BORDER )); | |
| 251 | 251 | mInsertButton.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D ); |
| 252 | 252 | mInsertButton.SetProperty( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, INSERT_IMAGE ); |
| 253 | 253 | mInsertButton.SetProperty( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, INSERT_IMAGE_SELECTED ); |
| 254 | 254 | mInsertButton.SetProperty( Toolkit::Control::Property::BACKGROUND, TOOLBAR_IMAGE ); |
| 255 | - mInsertButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f ); | |
| 255 | + mInsertButton.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) ); | |
| 256 | 256 | mInsertButton.ClickedSignal().Connect( this, &ItemViewExample::OnInsertButtonClicked); |
| 257 | 257 | mInsertButton.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); |
| 258 | 258 | mInsertButton.SetProperty( Actor::Property::VISIBLE, false ); |
| ... | ... | @@ -262,12 +262,12 @@ public: |
| 262 | 262 | mReplaceButton = Toolkit::PushButton::New(); |
| 263 | 263 | mReplaceButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT); |
| 264 | 264 | mReplaceButton.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT); |
| 265 | - mReplaceButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER ); | |
| 265 | + mReplaceButton.SetProperty( Actor::Property::POSITION, Vector2( BUTTON_BORDER, BUTTON_BORDER )); | |
| 266 | 266 | mReplaceButton.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D ); |
| 267 | 267 | mReplaceButton.SetProperty( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, REPLACE_IMAGE ); |
| 268 | 268 | mReplaceButton.SetProperty( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, REPLACE_IMAGE_SELECTED ); |
| 269 | 269 | mReplaceButton.SetProperty( Toolkit::Control::Property::BACKGROUND, TOOLBAR_IMAGE ); |
| 270 | - mReplaceButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f ); | |
| 270 | + mReplaceButton.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) ); | |
| 271 | 271 | mReplaceButton.ClickedSignal().Connect( this, &ItemViewExample::OnReplaceButtonClicked); |
| 272 | 272 | mReplaceButton.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); |
| 273 | 273 | mReplaceButton.SetProperty( Actor::Property::VISIBLE, false ); |
| ... | ... | @@ -872,8 +872,8 @@ public: // From ItemFactory |
| 872 | 872 | propertyMap.Insert(DevelVisual::Property::VISUAL_FITTING_MODE, DevelVisual::FILL); |
| 873 | 873 | ImageView actor = ImageView::New(); |
| 874 | 874 | actor.SetProperty( Toolkit::ImageView::Property::IMAGE, propertyMap ); |
| 875 | - actor.SetZ( 0.0f ); | |
| 876 | - actor.SetPosition( INITIAL_OFFSCREEN_POSITION ); | |
| 875 | + actor.SetProperty( Actor::Property::POSITION_Z, 0.0f ); | |
| 876 | + actor.SetProperty( Actor::Property::POSITION, INITIAL_OFFSCREEN_POSITION ); | |
| 877 | 877 | |
| 878 | 878 | // Add a border image child actor |
| 879 | 879 | ImageView borderActor = ImageView::New(); |
| ... | ... | @@ -903,9 +903,9 @@ public: // From ItemFactory |
| 903 | 903 | checkbox.SetProperty( Actor::Property::COLOR_MODE, USE_PARENT_COLOR ); |
| 904 | 904 | checkbox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT ); |
| 905 | 905 | checkbox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT ); |
| 906 | - checkbox.SetSize( spiralItemSize.width * 0.2f, spiralItemSize.width * 0.2f ); | |
| 907 | - checkbox.SetPosition( -SELECTION_BORDER_WIDTH, SELECTION_BORDER_WIDTH ); | |
| 908 | - checkbox.SetZ( 0.1f ); | |
| 906 | + checkbox.SetProperty( Actor::Property::SIZE, Vector2( spiralItemSize.width * 0.2f, spiralItemSize.width * 0.2f ) ); | |
| 907 | + checkbox.SetProperty( Actor::Property::POSITION, Vector2( -SELECTION_BORDER_WIDTH, SELECTION_BORDER_WIDTH )); | |
| 908 | + checkbox.SetProperty( Actor::Property::POSITION_Z, 0.1f ); | |
| 909 | 909 | |
| 910 | 910 | Property::Map solidColorProperty; |
| 911 | 911 | solidColorProperty.Insert( Toolkit::Visual::Property::TYPE, Visual::COLOR ); |
| ... | ... | @@ -925,8 +925,8 @@ public: // From ItemFactory |
| 925 | 925 | tick.SetProperty( Actor::Property::COLOR_MODE, USE_PARENT_COLOR ); |
| 926 | 926 | tick.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT ); |
| 927 | 927 | tick.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT ); |
| 928 | - tick.SetSize( spiralItemSize.width * 0.2f, spiralItemSize.width * 0.2f ); | |
| 929 | - tick.SetZ( 0.2f ); | |
| 928 | + tick.SetProperty( Actor::Property::SIZE, Vector2( spiralItemSize.width * 0.2f, spiralItemSize.width * 0.2f ) ); | |
| 929 | + tick.SetProperty( Actor::Property::POSITION_Z, 0.2f ); | |
| 930 | 930 | tick.SetProperty( Actor::Property::VISIBLE, false ); |
| 931 | 931 | checkbox.Add( tick ); |
| 932 | 932 | ... | ... |
examples/line-mesh/line-mesh-example.cpp
| ... | ... | @@ -194,7 +194,7 @@ public: |
| 194 | 194 | |
| 195 | 195 | mMeshActor = Actor::New(); |
| 196 | 196 | mMeshActor.AddRenderer( mRenderer ); |
| 197 | - mMeshActor.SetSize(200, 200); | |
| 197 | + mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(200, 200) ); | |
| 198 | 198 | |
| 199 | 199 | Property::Index morphAmountIndex = mMeshActor.RegisterProperty( "uMorphAmount", 0.0f ); |
| 200 | 200 | |
| ... | ... | @@ -228,7 +228,7 @@ public: |
| 228 | 228 | modeSelectTableView.SetFitHeight( 1 ); |
| 229 | 229 | modeSelectTableView.SetFitHeight( 2 ); |
| 230 | 230 | modeSelectTableView.SetCellPadding( Vector2( 6.0f, 0.0f ) ); |
| 231 | - modeSelectTableView.SetScale( Vector3( 0.8f, 0.8f, 0.8f )); | |
| 231 | + modeSelectTableView.SetProperty( Actor::Property::SCALE, Vector3( 0.8f, 0.8f, 0.8f )); | |
| 232 | 232 | |
| 233 | 233 | const char* labels[] = |
| 234 | 234 | { | ... | ... |
examples/magnifier/magnifier-example.cpp
| ... | ... | @@ -220,14 +220,14 @@ public: |
| 220 | 220 | Layer overlay = Layer::New(); |
| 221 | 221 | overlay.SetProperty( Actor::Property::SENSITIVE,false); |
| 222 | 222 | overlay.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 223 | - overlay.SetSize(mStageSize); | |
| 223 | + overlay.SetProperty( Actor::Property::SIZE, mStageSize); | |
| 224 | 224 | Stage::GetCurrent().Add(overlay); |
| 225 | 225 | |
| 226 | 226 | mMagnifier = Toolkit::Magnifier::New(); |
| 227 | 227 | mMagnifier.SetSourceActor( mView ); |
| 228 | - mMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width | |
| 228 | + mMagnifier.SetProperty( Actor::Property::SIZE, MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width | |
| 229 | 229 | mMagnifier.SetProperty( Toolkit::Magnifier::Property::MAGNIFICATION_FACTOR, MAGNIFICATION_FACTOR ); |
| 230 | - mMagnifier.SetScale(Vector3::ZERO); | |
| 230 | + mMagnifier.SetProperty( Actor::Property::SCALE,Vector3::ZERO); | |
| 231 | 231 | overlay.Add( mMagnifier ); |
| 232 | 232 | |
| 233 | 233 | // Apply constraint to animate the position of the magnifier. |
| ... | ... | @@ -242,7 +242,7 @@ public: |
| 242 | 242 | // Create bouncing magnifier automatically bounces around screen. |
| 243 | 243 | mBouncingMagnifier = Toolkit::Magnifier::New(); |
| 244 | 244 | mBouncingMagnifier.SetSourceActor( mView ); |
| 245 | - mBouncingMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width | |
| 245 | + mBouncingMagnifier.SetProperty( Actor::Property::SIZE, MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width | |
| 246 | 246 | mBouncingMagnifier.SetProperty( Toolkit::Magnifier::Property::MAGNIFICATION_FACTOR, MAGNIFICATION_FACTOR ); |
| 247 | 247 | overlay.Add( mBouncingMagnifier ); |
| 248 | 248 | |
| ... | ... | @@ -374,7 +374,7 @@ public: |
| 374 | 374 | Vector3 glassPosition(position); |
| 375 | 375 | glassPosition.y -= mStageSize.width * MAGNIFIER_SIZE.height * 0.5f + Stage::GetCurrent().GetDpi().height * FINGER_RADIUS_INCHES; |
| 376 | 376 | |
| 377 | - mMagnifier.SetPosition( glassPosition ); | |
| 377 | + mMagnifier.SetProperty( Actor::Property::POSITION, glassPosition ); | |
| 378 | 378 | } |
| 379 | 379 | |
| 380 | 380 | void OnKeyEvent(const KeyEvent& event) | ... | ... |
examples/mesh-morph/mesh-morph-example.cpp
| ... | ... | @@ -296,7 +296,7 @@ public: |
| 296 | 296 | |
| 297 | 297 | mMeshActor = Actor::New(); |
| 298 | 298 | mMeshActor.AddRenderer( mRenderer ); |
| 299 | - mMeshActor.SetSize(400, 400); | |
| 299 | + mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(400, 400) ); | |
| 300 | 300 | |
| 301 | 301 | Property::Index morphDeltaIndex = mMeshActor.RegisterProperty( "uDelta", 0.f ); |
| 302 | 302 | ... | ... |
examples/mesh-visual/mesh-visual-example.cpp
| ... | ... | @@ -273,7 +273,7 @@ public: |
| 273 | 273 | //Set position relative to top left, as the light source property is also relative to the top left. |
| 274 | 274 | mLightSource.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 275 | 275 | mLightSource.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 276 | - mLightSource.SetPosition( Stage::GetCurrent().GetSize().x * 0.85f, Stage::GetCurrent().GetSize().y * 0.125 ); | |
| 276 | + mLightSource.SetProperty( Actor::Property::POSITION, Vector2( Stage::GetCurrent().GetSize().x * 0.85f, Stage::GetCurrent().GetSize().y * 0.125 )); | |
| 277 | 277 | |
| 278 | 278 | //Supply an image to represent the light. |
| 279 | 279 | SetLightImage(); |
| ... | ... | @@ -440,7 +440,7 @@ public: |
| 440 | 440 | case LIGHT_TAG: //Drag light |
| 441 | 441 | { |
| 442 | 442 | //Set light source to new position and update the models accordingly. |
| 443 | - mLightSource.SetPosition( Vector3( touch.GetScreenPosition( 0 ) ) ); | |
| 443 | + mLightSource.SetProperty( Actor::Property::POSITION, Vector3( touch.GetScreenPosition( 0 ) ) ); | |
| 444 | 444 | UpdateLight(); |
| 445 | 445 | |
| 446 | 446 | break; | ... | ... |
examples/metaball-explosion/metaball-explosion-example.cpp
| ... | ... | @@ -444,7 +444,7 @@ void MetaballExplosionController::CreateMetaballActors() |
| 444 | 444 | |
| 445 | 445 | mMetaballs[i].actor = Actor::New( ); |
| 446 | 446 | mMetaballs[i].actor.SetProperty( Dali::Actor::Property::NAME, "Metaball" ); |
| 447 | - mMetaballs[i].actor.SetScale( 1.0f ); | |
| 447 | + mMetaballs[i].actor.SetProperty( Actor::Property::SCALE, 1.0f ); | |
| 448 | 448 | mMetaballs[i].actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 449 | 449 | mMetaballs[i].actor.AddRenderer( renderer ); |
| 450 | 450 | |
| ... | ... | @@ -506,8 +506,8 @@ void MetaballExplosionController::CreateComposition() |
| 506 | 506 | // Create actor |
| 507 | 507 | mCompositionActor = Actor::New( ); |
| 508 | 508 | mCompositionActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); |
| 509 | - mCompositionActor.SetPosition(Vector3(0.0f, 0.0f, 0.0f)); | |
| 510 | - mCompositionActor.SetSize(mScreenSize.x, mScreenSize.y); | |
| 509 | + mCompositionActor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f)); | |
| 510 | + mCompositionActor.SetProperty( Actor::Property::SIZE, Vector2(mScreenSize.x, mScreenSize.y) ); | |
| 511 | 511 | mCompositionActor.AddRenderer( mRenderer ); |
| 512 | 512 | |
| 513 | 513 | Vector2 metaballCenter(0.0,0); |
| ... | ... | @@ -517,7 +517,7 @@ void MetaballExplosionController::CreateComposition() |
| 517 | 517 | |
| 518 | 518 | SetPositionToMetaballs( metaballCenter ); |
| 519 | 519 | |
| 520 | - mCompositionActor.SetSize(mScreenSize.x, mScreenSize.y); | |
| 520 | + mCompositionActor.SetProperty( Actor::Property::SIZE, Vector2(mScreenSize.x, mScreenSize.y) ); | |
| 521 | 521 | |
| 522 | 522 | Stage stage = Stage::GetCurrent(); |
| 523 | 523 | stage.Add( mCompositionActor ); | ... | ... |
examples/metaball-refrac/metaball-refrac-example.cpp
| ... | ... | @@ -423,7 +423,7 @@ void MetaballRefracController::CreateMetaballActors() |
| 423 | 423 | |
| 424 | 424 | mMetaballs[i].actor = Actor::New(); |
| 425 | 425 | mMetaballs[i].actor.SetProperty( Dali::Actor::Property::NAME, "Metaball" ); |
| 426 | - mMetaballs[i].actor.SetScale( 1.0f ); | |
| 426 | + mMetaballs[i].actor.SetProperty( Actor::Property::SCALE, 1.0f ); | |
| 427 | 427 | mMetaballs[i].actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 428 | 428 | |
| 429 | 429 | |
| ... | ... | @@ -485,8 +485,8 @@ void MetaballRefracController::CreateComposition() |
| 485 | 485 | // Create actor |
| 486 | 486 | mCompositionActor = Actor::New( ); |
| 487 | 487 | mCompositionActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); |
| 488 | - mCompositionActor.SetPosition(Vector3(0.0f, 0.0f, 0.0f)); | |
| 489 | - mCompositionActor.SetSize(mScreenSize.x, mScreenSize.y); | |
| 488 | + mCompositionActor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f)); | |
| 489 | + mCompositionActor.SetProperty( Actor::Property::SIZE, Vector2(mScreenSize.x, mScreenSize.y) ); | |
| 490 | 490 | |
| 491 | 491 | // Create geometry |
| 492 | 492 | Geometry metaballGeometry = CreateGeometry( false ); | ... | ... |
examples/model3d-view/model3d-view-example.cpp
| ... | ... | @@ -97,7 +97,7 @@ public: |
| 97 | 97 | mModel3dView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 98 | 98 | mModel3dView.SetProperty( Dali::Actor::Property::NAME, "model3dViewControl" ); |
| 99 | 99 | mModel3dView.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS); |
| 100 | - mModel3dView.SetSize(screenSize); | |
| 100 | + mModel3dView.SetProperty( Actor::Property::SIZE, screenSize); | |
| 101 | 101 | |
| 102 | 102 | mModel3dView.SetProperty(Model3dView::Property::LIGHT_POSITION, Vector3(5,10.,0)); |
| 103 | 103 | |
| ... | ... | @@ -170,8 +170,8 @@ public: |
| 170 | 170 | { |
| 171 | 171 | if (mScaled) |
| 172 | 172 | { |
| 173 | - mModel3dView.SetScale(1.0); | |
| 174 | - mModel3dView.SetPosition(0,0,0); | |
| 173 | + mModel3dView.SetProperty( Actor::Property::SCALE, 1.0f ); | |
| 174 | + mModel3dView.SetProperty( Actor::Property::POSITION, Vector3( 0, 0, 0 ) ); | |
| 175 | 175 | mScaled = false; |
| 176 | 176 | } |
| 177 | 177 | else |
| ... | ... | @@ -185,8 +185,8 @@ public: |
| 185 | 185 | |
| 186 | 186 | float size = 2.5; |
| 187 | 187 | |
| 188 | - mModel3dView.SetScale(size); | |
| 189 | - mModel3dView.SetPosition(-position.x * size,-position.y * size, 0); | |
| 188 | + mModel3dView.SetProperty( Actor::Property::SCALE, size ); | |
| 189 | + mModel3dView.SetProperty( Actor::Property::POSITION, Vector3( -position.x * size, -position.y * size, 0 ) ); | |
| 190 | 190 | mScaled = true; |
| 191 | 191 | } |
| 192 | 192 | } | ... | ... |
examples/motion-blur/motion-blur-example.cpp
| ... | ... | @@ -164,7 +164,7 @@ public: |
| 164 | 164 | // Ensure the content layer is a square so the touch area works in all orientations |
| 165 | 165 | Vector2 stageSize = Stage::GetCurrent().GetSize(); |
| 166 | 166 | float size = std::max( stageSize.width, stageSize.height ); |
| 167 | - mContentLayer.SetSize( size, size ); | |
| 167 | + mContentLayer.SetProperty( Actor::Property::SIZE, Vector2( size, size ) ); | |
| 168 | 168 | |
| 169 | 169 | //Add an effects icon on the right of the title |
| 170 | 170 | mActorEffectsButton = Toolkit::PushButton::New(); |
| ... | ... | @@ -210,7 +210,7 @@ public: |
| 210 | 210 | mMotionBlurImageView = ImageView::New(); |
| 211 | 211 | SetImageFittedInBox( mMotionBlurImageView, mMotionBlurEffect, MOTION_BLUR_ACTOR_IMAGE1, mMotionBlurActorSize.x, mMotionBlurActorSize.y ); |
| 212 | 212 | mMotionBlurImageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 213 | - mMotionBlurImageView.SetSize(mMotionBlurActorSize.x, mMotionBlurActorSize.y); | |
| 213 | + mMotionBlurImageView.SetProperty( Actor::Property::SIZE, Vector2(mMotionBlurActorSize.x, mMotionBlurActorSize.y) ); | |
| 214 | 214 | |
| 215 | 215 | mContentLayer.Add( mMotionBlurImageView ); |
| 216 | 216 | |
| ... | ... | @@ -253,13 +253,13 @@ public: |
| 253 | 253 | } |
| 254 | 254 | else |
| 255 | 255 | { |
| 256 | - mView.SetSize( targetSize ); | |
| 256 | + mView.SetProperty( Actor::Property::SIZE, targetSize ); | |
| 257 | 257 | } |
| 258 | 258 | } |
| 259 | 259 | else |
| 260 | 260 | { |
| 261 | 261 | // for first time just set size |
| 262 | - mView.SetSize( targetSize ); | |
| 262 | + mView.SetProperty( Actor::Property::SIZE, targetSize ); | |
| 263 | 263 | } |
| 264 | 264 | } |
| 265 | 265 | ... | ... |
examples/motion-stretch/motion-stretch-example.cpp
| ... | ... | @@ -143,7 +143,7 @@ public: |
| 143 | 143 | // Ensure the content layer is a square so the touch area works in all orientations |
| 144 | 144 | Vector2 stageSize = Stage::GetCurrent().GetSize(); |
| 145 | 145 | float size = std::max( stageSize.width, stageSize.height ); |
| 146 | - mContentLayer.SetSize( size, size ); | |
| 146 | + mContentLayer.SetProperty( Actor::Property::SIZE, Vector2( size, size ) ); | |
| 147 | 147 | |
| 148 | 148 | //Add an slideshow icon on the right of the title |
| 149 | 149 | mActorEffectsButton = Toolkit::PushButton::New(); |
| ... | ... | @@ -187,7 +187,7 @@ public: |
| 187 | 187 | mMotionStretchImageView.SetProperty( Toolkit::ImageView::Property::IMAGE, mMotionStretchEffect ); |
| 188 | 188 | mMotionStretchImageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 189 | 189 | mMotionStretchImageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 190 | - mMotionStretchImageView.SetSize( MOTION_STRETCH_ACTOR_WIDTH, MOTION_STRETCH_ACTOR_HEIGHT ); | |
| 190 | + mMotionStretchImageView.SetProperty( Actor::Property::SIZE, Vector2( MOTION_STRETCH_ACTOR_WIDTH, MOTION_STRETCH_ACTOR_HEIGHT ) ); | |
| 191 | 191 | |
| 192 | 192 | mContentLayer.Add( mMotionStretchImageView ); |
| 193 | 193 | |
| ... | ... | @@ -226,13 +226,13 @@ public: |
| 226 | 226 | } |
| 227 | 227 | else |
| 228 | 228 | { |
| 229 | - mView.SetSize( targetSize ); | |
| 229 | + mView.SetProperty( Actor::Property::SIZE, targetSize ); | |
| 230 | 230 | } |
| 231 | 231 | } |
| 232 | 232 | else |
| 233 | 233 | { |
| 234 | 234 | // for first time just set size |
| 235 | - mView.SetSize( targetSize ); | |
| 235 | + mView.SetProperty( Actor::Property::SIZE, targetSize ); | |
| 236 | 236 | } |
| 237 | 237 | } |
| 238 | 238 | ... | ... |
examples/native-image-source/native-image-source-example.cpp
| ... | ... | @@ -146,7 +146,7 @@ public: |
| 146 | 146 | Vector2 stageSize = stage.GetSize(); |
| 147 | 147 | |
| 148 | 148 | mButtonArea = Layer::New(); |
| 149 | - mButtonArea.SetSize( stageSize.x, BUTTON_HEIGHT ); | |
| 149 | + mButtonArea.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, BUTTON_HEIGHT ) ); | |
| 150 | 150 | mButtonArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 151 | 151 | mButtonArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 152 | 152 | stage.Add( mButtonArea ); |
| ... | ... | @@ -156,7 +156,7 @@ public: |
| 156 | 156 | mButtonShow.SetProperty( Toolkit::Button::Property::LABEL, "SHOW" ); |
| 157 | 157 | mButtonShow.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 158 | 158 | mButtonShow.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 159 | - mButtonShow.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); | |
| 159 | + mButtonShow.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); | |
| 160 | 160 | mButtonShow.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); |
| 161 | 161 | mButtonArea.Add( mButtonShow ); |
| 162 | 162 | |
| ... | ... | @@ -165,8 +165,8 @@ public: |
| 165 | 165 | mButtonRefreshAlways.SetProperty( Toolkit::Button::Property::LABEL, "ALWAYS" ); |
| 166 | 166 | mButtonRefreshAlways.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 167 | 167 | mButtonRefreshAlways.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 168 | - mButtonRefreshAlways.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); | |
| 169 | - mButtonRefreshAlways.SetPosition( (stageSize.x / BUTTON_COUNT)*1.0f, 0.0f ); | |
| 168 | + mButtonRefreshAlways.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); | |
| 169 | + mButtonRefreshAlways.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*1.0f, 0.0f )); | |
| 170 | 170 | mButtonRefreshAlways.StateChangedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); |
| 171 | 171 | mButtonArea.Add( mButtonRefreshAlways ); |
| 172 | 172 | |
| ... | ... | @@ -174,8 +174,8 @@ public: |
| 174 | 174 | mButtonRefreshOnce.SetProperty( Toolkit::Button::Property::LABEL, "ONCE" ); |
| 175 | 175 | mButtonRefreshOnce.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 176 | 176 | mButtonRefreshOnce.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 177 | - mButtonRefreshOnce.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); | |
| 178 | - mButtonRefreshOnce.SetPosition( (stageSize.x / BUTTON_COUNT)*2.0f, 0.0f ); | |
| 177 | + mButtonRefreshOnce.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); | |
| 178 | + mButtonRefreshOnce.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*2.0f, 0.0f )); | |
| 179 | 179 | mButtonRefreshOnce.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); |
| 180 | 180 | mButtonArea.Add( mButtonRefreshOnce ); |
| 181 | 181 | |
| ... | ... | @@ -183,8 +183,8 @@ public: |
| 183 | 183 | mButtonCapture.SetProperty( Toolkit::Button::Property::LABEL, "CAPTURE" ); |
| 184 | 184 | mButtonCapture.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 185 | 185 | mButtonCapture.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 186 | - mButtonCapture.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); | |
| 187 | - mButtonCapture.SetPosition( (stageSize.x / BUTTON_COUNT)*3.0f, 0.0f ); | |
| 186 | + mButtonCapture.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); | |
| 187 | + mButtonCapture.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*3.0f, 0.0f )); | |
| 188 | 188 | mButtonCapture.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); |
| 189 | 189 | mButtonArea.Add( mButtonCapture ); |
| 190 | 190 | |
| ... | ... | @@ -192,8 +192,8 @@ public: |
| 192 | 192 | mButtonReset.SetProperty( Toolkit::Button::Property::LABEL, "RESET" ); |
| 193 | 193 | mButtonReset.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 194 | 194 | mButtonReset.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 195 | - mButtonReset.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ); | |
| 196 | - mButtonReset.SetPosition( (stageSize.x / BUTTON_COUNT)*4.0f, 0.0f ); | |
| 195 | + mButtonReset.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) ); | |
| 196 | + mButtonReset.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*4.0f, 0.0f )); | |
| 197 | 197 | mButtonReset.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected ); |
| 198 | 198 | mButtonArea.Add( mButtonReset ); |
| 199 | 199 | } |
| ... | ... | @@ -206,14 +206,14 @@ public: |
| 206 | 206 | float contentHeight( (stageSize.y - BUTTON_HEIGHT)/2.0f ); |
| 207 | 207 | |
| 208 | 208 | mTopContentArea = Actor::New(); |
| 209 | - mTopContentArea.SetSize( stageSize.x, contentHeight ); | |
| 209 | + mTopContentArea.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, contentHeight ) ); | |
| 210 | 210 | mTopContentArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 211 | 211 | mTopContentArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 212 | - mTopContentArea.SetY( BUTTON_HEIGHT ); | |
| 212 | + mTopContentArea.SetProperty( Actor::Property::POSITION_Y, BUTTON_HEIGHT ); | |
| 213 | 213 | stage.Add( mTopContentArea ); |
| 214 | 214 | |
| 215 | 215 | mBottomContentArea = Actor::New(); |
| 216 | - mBottomContentArea.SetSize( stageSize.x, contentHeight ); | |
| 216 | + mBottomContentArea.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, contentHeight ) ); | |
| 217 | 217 | mBottomContentArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); |
| 218 | 218 | mBottomContentArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); |
| 219 | 219 | stage.Add( mBottomContentArea ); |
| ... | ... | @@ -311,7 +311,7 @@ public: |
| 311 | 311 | renderer.SetTextures( textureSet ); |
| 312 | 312 | |
| 313 | 313 | mDisplayActor.AddRenderer( renderer ); |
| 314 | - mDisplayActor.SetSize( mNativeTexture.GetWidth(), mNativeTexture.GetHeight() ); | |
| 314 | + mDisplayActor.SetProperty( Actor::Property::SIZE, Vector2( mNativeTexture.GetWidth(), mNativeTexture.GetHeight() ) ); | |
| 315 | 315 | |
| 316 | 316 | mBottomContentArea.Add( mDisplayActor ); |
| 317 | 317 | } | ... | ... |
examples/perf-scroll/perf-scroll.cpp
| ... | ... | @@ -288,7 +288,7 @@ public: |
| 288 | 288 | propertyMap.Insert(Toolkit::DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::FILL); |
| 289 | 289 | mImageView[i].SetProperty(Toolkit::ImageView::Property::IMAGE, propertyMap); |
| 290 | 290 | |
| 291 | - mImageView[i].SetSize( Vector3(0.0f,0.0f,0.0f) ); | |
| 291 | + mImageView[i].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) ); | |
| 292 | 292 | mImageView[i].SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 293 | 293 | mParent.Add( mImageView[i] ); |
| 294 | 294 | } |
| ... | ... | @@ -315,7 +315,7 @@ public: |
| 315 | 315 | { |
| 316 | 316 | mActor[i] = Actor::New(); |
| 317 | 317 | mActor[i].AddRenderer( renderers[i % numImages] ); |
| 318 | - mActor[i].SetSize(0.0f,0.0f,0.0f); | |
| 318 | + mActor[i].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) ); | |
| 319 | 319 | mParent.Add(mActor[i]); |
| 320 | 320 | } |
| 321 | 321 | } |
| ... | ... | @@ -369,16 +369,16 @@ public: |
| 369 | 369 | } |
| 370 | 370 | if( gUseMesh ) |
| 371 | 371 | { |
| 372 | - mActor[count].SetPosition( initialPosition ); | |
| 373 | - mActor[count].SetSize( Vector3(0.0f,0.0f,0.0f) ); | |
| 372 | + mActor[count].SetProperty( Actor::Property::POSITION, initialPosition ); | |
| 373 | + mActor[count].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) ); | |
| 374 | 374 | mActor[count].SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian( 0.0f ), Vector3::XAXIS ) ) ); |
| 375 | 375 | mShow.AnimateTo( Property( mActor[count], Actor::Property::POSITION ), Vector3( xpos+mSize.x*0.5f, ypos+mSize.y*0.5f, 0.0f), AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ) ); |
| 376 | 376 | mShow.AnimateTo( Property( mActor[count], Actor::Property::SIZE ), mSize, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ) ); |
| 377 | 377 | } |
| 378 | 378 | else |
| 379 | 379 | { |
| 380 | - mImageView[count].SetPosition( initialPosition ); | |
| 381 | - mImageView[count].SetSize( Vector3(0.0f,0.0f,0.0f) ); | |
| 380 | + mImageView[count].SetProperty( Actor::Property::POSITION, initialPosition ); | |
| 381 | + mImageView[count].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) ); | |
| 382 | 382 | mImageView[count].SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian(0.0f), Vector3::XAXIS ) ) ); |
| 383 | 383 | mShow.AnimateTo( Property( mImageView[count], Actor::Property::POSITION ), Vector3( xpos+mSize.x*0.5f, ypos+mSize.y*0.5f, 0.0f ), AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ) ); |
| 384 | 384 | mShow.AnimateTo( Property( mImageView[count], Actor::Property::SIZE ), mSize, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ) ); | ... | ... |
examples/point-mesh/point-mesh-example.cpp
| ... | ... | @@ -168,7 +168,7 @@ public: |
| 168 | 168 | |
| 169 | 169 | mMeshActor = Actor::New(); |
| 170 | 170 | mMeshActor.AddRenderer( mRenderer ); |
| 171 | - mMeshActor.SetSize(400, 400); | |
| 171 | + mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(400, 400) ); | |
| 172 | 172 | |
| 173 | 173 | mMeshActor.RegisterProperty( "uFadeColor", Color::GREEN ); |
| 174 | 174 | ... | ... |
examples/popup/popup-example.cpp
| ... | ... | @@ -279,7 +279,7 @@ public: |
| 279 | 279 | if( modifySize ) |
| 280 | 280 | { |
| 281 | 281 | // The size is set once at the end. |
| 282 | - popup.SetSize( Vector2( newSize[ 0 ], newSize[ 1 ] ) ); | |
| 282 | + popup.SetProperty( Actor::Property::SIZE, Vector2( newSize[ 0 ], newSize[ 1 ] ) ); | |
| 283 | 283 | } |
| 284 | 284 | } |
| 285 | 285 | |
| ... | ... | @@ -337,7 +337,7 @@ public: |
| 337 | 337 | popup.SetProperty( Dali::Actor::Property::NAME, "popup" ); |
| 338 | 338 | popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 339 | 339 | popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 340 | - popup.SetSize( POPUP_WIDTH_DP, 0.0f ); | |
| 340 | + popup.SetProperty( Actor::Property::SIZE, Vector2( POPUP_WIDTH_DP, 0.0f ) ); | |
| 341 | 341 | popup.SetProperty( Toolkit::Popup::Property::TAIL_VISIBILITY, false ); |
| 342 | 342 | |
| 343 | 343 | popup.OutsideTouchedSignal().Connect( this, &PopupExample::HidePopup ); |
| ... | ... | @@ -359,7 +359,7 @@ public: |
| 359 | 359 | // Set up the container's layout. |
| 360 | 360 | footer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 361 | 361 | footer.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT ); |
| 362 | - footer.SetSize( 0.0f, 130.0f ); | |
| 362 | + footer.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 130.0f ) ); | |
| 363 | 363 | footer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 364 | 364 | footer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 365 | 365 | |
| ... | ... | @@ -565,7 +565,7 @@ public: |
| 565 | 565 | mPopup.Add( text ); |
| 566 | 566 | |
| 567 | 567 | // Fix the popup's size. |
| 568 | - mPopup.SetSize( 240.0f, 400.0f ); | |
| 568 | + mPopup.SetProperty( Actor::Property::SIZE, Vector2( 240.0f, 400.0f ) ); | |
| 569 | 569 | mPopup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 570 | 570 | |
| 571 | 571 | SetupPopup( mPopup, button ); |
| ... | ... | @@ -632,7 +632,7 @@ public: |
| 632 | 632 | root.SetProperty( Actor::Property::PADDING, Padding( 0.0f, 0.0f, 0.0f, 20.0f ) ); |
| 633 | 633 | |
| 634 | 634 | Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New(); |
| 635 | - checkBox.SetSize( 48, 48 ); | |
| 635 | + checkBox.SetProperty( Actor::Property::SIZE, Vector2( 48, 48 ) ); | |
| 636 | 636 | root.AddChild( checkBox, Toolkit::TableView::CellPosition( 0, 0 ) ); |
| 637 | 637 | |
| 638 | 638 | Toolkit::TextLabel text = Toolkit::TextLabel::New( "Don't show again" ); | ... | ... |
examples/pre-render-callback/pre-render-callback-example.cpp
| ... | ... | @@ -34,8 +34,8 @@ void AddText( Control textContainer, std::string text, unsigned int yIndex ) |
| 34 | 34 | auto label = TextLabel::New(text); |
| 35 | 35 | label.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 36 | 36 | label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 37 | - label.SetSize( 300,TEXT_HEIGHT ); | |
| 38 | - label.SetY( yIndex*TEXT_HEIGHT ); | |
| 37 | + label.SetProperty( Actor::Property::SIZE, Vector2( 300,TEXT_HEIGHT ) ); | |
| 38 | + label.SetProperty( Actor::Property::POSITION_Y, yIndex*TEXT_HEIGHT ); | |
| 39 | 39 | textContainer.Add( label ); |
| 40 | 40 | } |
| 41 | 41 | |
| ... | ... | @@ -114,7 +114,7 @@ private: |
| 114 | 114 | mSpinner = TextLabel::New(""); |
| 115 | 115 | mSpinner.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 116 | 116 | mSpinner.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 117 | - mSpinner.SetSize(100,100); | |
| 117 | + mSpinner.SetProperty( Actor::Property::SIZE, Vector2(100,100) ); | |
| 118 | 118 | |
| 119 | 119 | mStage.Add(mSpinner); |
| 120 | 120 | mStage.Add(textContainer); |
| ... | ... | @@ -168,8 +168,8 @@ private: |
| 168 | 168 | mSceneAnimation.SetLooping(true); |
| 169 | 169 | mSceneAnimation.Play(); |
| 170 | 170 | |
| 171 | - mSceneActor.SetSize(250.0f, 250.0f); | |
| 172 | - mSceneActor.SetPosition(0.0f, 0.0f, 130.0f); | |
| 171 | + mSceneActor.SetProperty( Actor::Property::SIZE, Vector2(250.0f, 250.0f) ); | |
| 172 | + mSceneActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 130.0f ) ); | |
| 173 | 173 | Quaternion p( Degree( -6.0f ), Vector3::XAXIS ); |
| 174 | 174 | Quaternion q( Degree( 20.0f ), Vector3::YAXIS ); |
| 175 | 175 | mSceneActor.SetProperty( Actor::Property::ORIENTATION, p * q ); | ... | ... |
examples/progress-bar/progress-bar-example.cpp
| ... | ... | @@ -95,7 +95,7 @@ private: |
| 95 | 95 | contentTable.SetFitHeight( i ); |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | - contentTable.SetPosition( 0.0f, TOP_MARGIN ); | |
| 98 | + contentTable.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, TOP_MARGIN )); | |
| 99 | 99 | mContentLayer.Add( contentTable ); |
| 100 | 100 | |
| 101 | 101 | // Image selector for progress bar | ... | ... |
examples/reflection-demo/reflection-example.cpp
| ... | ... | @@ -192,7 +192,7 @@ private: |
| 192 | 192 | |
| 193 | 193 | stage.GetRenderTaskList().GetTask(0).SetClearEnabled(false); |
| 194 | 194 | mLayer3D = Layer::New(); |
| 195 | - mLayer3D.SetSize( stageWidth, stageHeight ); | |
| 195 | + mLayer3D.SetProperty( Actor::Property::SIZE, Vector2( stageWidth, stageHeight ) ); | |
| 196 | 196 | stage.Add(mLayer3D); |
| 197 | 197 | |
| 198 | 198 | mLayer3D.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| ... | ... | @@ -301,11 +301,11 @@ private: |
| 301 | 301 | |
| 302 | 302 | Actor panScreen = Actor::New(); |
| 303 | 303 | auto stageSize = stage.GetSize(); |
| 304 | - panScreen.SetSize( stageSize.width, stageSize.height ); | |
| 304 | + panScreen.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width, stageSize.height ) ); | |
| 305 | 305 | panScreen.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 306 | 306 | panScreen.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 307 | 307 | auto camera2d = stage.GetRenderTaskList().GetTask(0).GetCameraActor(); |
| 308 | - panScreen.SetPosition( 0, 0, camera2d.GetNearClippingPlane() ); | |
| 308 | + panScreen.SetProperty( Actor::Property::POSITION, Vector3( 0, 0, camera2d.GetNearClippingPlane() )); | |
| 309 | 309 | camera2d.Add(panScreen); |
| 310 | 310 | camera2d.RotateBy( Degree(180.0f), Vector3( 0.0, 1.0, 0.0 ) ); |
| 311 | 311 | mPanGestureDetector = PanGestureDetector::New(); |
| ... | ... | @@ -330,12 +330,12 @@ private: |
| 330 | 330 | { |
| 331 | 331 | auto actor = node.cameraId != 0xffffffff ? CameraActor::New( stage.GetSize() ) : Actor::New(); |
| 332 | 332 | |
| 333 | - actor.SetSize( 1, 1, 1 ); | |
| 333 | + actor.SetProperty( Actor::Property::SIZE, Vector3( 1, 1, 1 ) ); | |
| 334 | 334 | actor.SetProperty( Dali::Actor::Property::NAME, node.name ); |
| 335 | 335 | actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 336 | 336 | actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 337 | - actor.SetPosition( node.translation[0], node.translation[1], node.translation[2] ); | |
| 338 | - actor.SetScale( node.scale[0], node.scale[1], node.scale[2] ); | |
| 337 | + actor.SetProperty( Actor::Property::POSITION, Vector3( node.translation[0], node.translation[1], node.translation[2] )); | |
| 338 | + actor.SetProperty( Actor::Property::SCALE, Vector3( node.scale[0], node.scale[1], node.scale[2] ) ); | |
| 339 | 339 | actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(node.rotationQuaternion[3], |
| 340 | 340 | node.rotationQuaternion[0], |
| 341 | 341 | node.rotationQuaternion[1], | ... | ... |
examples/refraction-effect/refraction-effect-example.cpp
| ... | ... | @@ -293,7 +293,7 @@ private: |
| 293 | 293 | |
| 294 | 294 | mMeshActor = Actor::New(); |
| 295 | 295 | mMeshActor.AddRenderer( mRenderer ); |
| 296 | - mMeshActor.SetSize( stageSize ); | |
| 296 | + mMeshActor.SetProperty( Actor::Property::SIZE, stageSize ); | |
| 297 | 297 | mMeshActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); |
| 298 | 298 | mContent.Add( mMeshActor ); |
| 299 | 299 | ... | ... |
examples/remote-image-loading/remote-image-loading-example.cpp
| ... | ... | @@ -76,7 +76,7 @@ public: |
| 76 | 76 | mImageView1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); |
| 77 | 77 | mImageView1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER); |
| 78 | 78 | mImageView1.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false); |
| 79 | - mImageView1.SetPosition(0, 100); | |
| 79 | + mImageView1.SetProperty( Actor::Property::POSITION, Vector2(0, 100)); | |
| 80 | 80 | mImageView1.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f)); |
| 81 | 81 | stage.Add(mImageView1); |
| 82 | 82 | |
| ... | ... | @@ -85,7 +85,7 @@ public: |
| 85 | 85 | mImageView2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); |
| 86 | 86 | mImageView2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER); |
| 87 | 87 | mImageView2.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false); |
| 88 | - mImageView2.SetPosition(400, 100); | |
| 88 | + mImageView2.SetProperty( Actor::Property::POSITION, Vector2(400, 100)); | |
| 89 | 89 | mImageView2.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f)); |
| 90 | 90 | stage.Add(mImageView2); |
| 91 | 91 | |
| ... | ... | @@ -94,7 +94,7 @@ public: |
| 94 | 94 | mImageView3.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); |
| 95 | 95 | mImageView3.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER); |
| 96 | 96 | mImageView3.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false); |
| 97 | - mImageView3.SetPosition(0, 400); | |
| 97 | + mImageView3.SetProperty( Actor::Property::POSITION, Vector2(0, 400)); | |
| 98 | 98 | mImageView3.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f)); |
| 99 | 99 | stage.Add(mImageView3); |
| 100 | 100 | |
| ... | ... | @@ -103,7 +103,7 @@ public: |
| 103 | 103 | mImageView4.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); |
| 104 | 104 | mImageView4.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER); |
| 105 | 105 | mImageView4.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false); |
| 106 | - mImageView4.SetPosition(400, 400); | |
| 106 | + mImageView4.SetProperty( Actor::Property::POSITION, Vector2(400, 400)); | |
| 107 | 107 | mImageView4.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f)); |
| 108 | 108 | stage.Add(mImageView4); |
| 109 | 109 | |
| ... | ... | @@ -112,7 +112,7 @@ public: |
| 112 | 112 | mImageView4.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); |
| 113 | 113 | mImageView5.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER); |
| 114 | 114 | mImageView5.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false); |
| 115 | - mImageView5.SetPosition(800, 100); | |
| 115 | + mImageView5.SetProperty( Actor::Property::POSITION, Vector2(800, 100)); | |
| 116 | 116 | mImageView5.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f)); |
| 117 | 117 | stage.Add(mImageView5); |
| 118 | 118 | ... | ... |
examples/renderer-stencil/renderer-stencil-example.cpp
| ... | ... | @@ -280,7 +280,7 @@ private: |
| 280 | 280 | Toolkit::Control container = Toolkit::Control::New(); |
| 281 | 281 | container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); |
| 282 | 282 | container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); |
| 283 | - container.SetSize( size ); | |
| 283 | + container.SetProperty( Actor::Property::SIZE, Vector2( size ) ); | |
| 284 | 284 | container.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 285 | 285 | |
| 286 | 286 | // Create a renderer from the geometry and add the texture. |
| ... | ... | @@ -317,7 +317,7 @@ private: |
| 317 | 317 | Toolkit::Control container = Toolkit::Control::New(); |
| 318 | 318 | container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 319 | 319 | container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 320 | - container.SetSize( size ); | |
| 320 | + container.SetProperty( Actor::Property::SIZE, Vector2( size ) ); | |
| 321 | 321 | container.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 322 | 322 | |
| 323 | 323 | // Create a renderer from the geometry and add the texture. |
| ... | ... | @@ -355,7 +355,7 @@ private: |
| 355 | 355 | Toolkit::Control container = Toolkit::Control::New(); |
| 356 | 356 | container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 357 | 357 | container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 358 | - container.SetSize( size ); | |
| 358 | + container.SetProperty( Actor::Property::SIZE, Vector2( size ) ); | |
| 359 | 359 | container.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 360 | 360 | |
| 361 | 361 | // We rotate the plane as the geometry is created flat in X & Y. We want it to span X & Z axis. |
| ... | ... | @@ -404,7 +404,7 @@ private: |
| 404 | 404 | Toolkit::Control container = Toolkit::Control::New(); |
| 405 | 405 | container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 406 | 406 | container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 407 | - container.SetSize( size ); | |
| 407 | + container.SetProperty( Actor::Property::SIZE, Vector2( size ) ); | |
| 408 | 408 | container.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 409 | 409 | |
| 410 | 410 | // Create the cube geometry of unity size. | ... | ... |
examples/rendering-basic-light/rendering-basic-light-example.cpp
| ... | ... | @@ -163,7 +163,7 @@ public: |
| 163 | 163 | mLabel = TextLabel::New( material[MaterialID].name ); |
| 164 | 164 | mLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 165 | 165 | mLabel.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.0f, 0.5f ) ); |
| 166 | - mLabel.SetSize( stage.GetSize().x * 0.5f, stage.GetSize().y * 0.083f ); | |
| 166 | + mLabel.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().x * 0.5f, stage.GetSize().y * 0.083f ) ); | |
| 167 | 167 | mLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); |
| 168 | 168 | mLabel.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); |
| 169 | 169 | mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Vector4( 1.0f, 1.0f, 1.0f, 1.0f )); |
| ... | ... | @@ -380,7 +380,7 @@ public: |
| 380 | 380 | mActor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 1.0f, 0.6f, 1.0f ) ); |
| 381 | 381 | mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 382 | 382 | mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 383 | - mActor.SetSize( Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) ); | |
| 383 | + mActor.SetProperty( Actor::Property::SIZE, Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) ); | |
| 384 | 384 | mActor.AddRenderer( mRenderer ); |
| 385 | 385 | stage.Add( mActor ); |
| 386 | 386 | } | ... | ... |
examples/rendering-basic-pbr/model-pbr.cpp
| ... | ... | @@ -72,8 +72,8 @@ void ModelPbr::Init( Shader shader, const std::string& modelUrl, const Vector3& |
| 72 | 72 | mActor = Actor::New(); |
| 73 | 73 | mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 74 | 74 | mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 75 | - mActor.SetPosition( position ); | |
| 76 | - mActor.SetSize( size ); | |
| 75 | + mActor.SetProperty( Actor::Property::POSITION, position ); | |
| 76 | + mActor.SetProperty( Actor::Property::SIZE, size ); | |
| 77 | 77 | mActor.AddRenderer( renderer ); |
| 78 | 78 | } |
| 79 | 79 | ... | ... |
examples/rendering-basic-pbr/model-skybox.cpp
| ... | ... | @@ -96,7 +96,7 @@ void ModelSkybox::Init( const Vector3& size ) |
| 96 | 96 | mActor = Actor::New(); |
| 97 | 97 | mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 98 | 98 | mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 99 | - mActor.SetSize( size ); | |
| 99 | + mActor.SetProperty( Actor::Property::SIZE, size ); | |
| 100 | 100 | mActor.AddRenderer( renderer ); |
| 101 | 101 | } |
| 102 | 102 | ... | ... |
examples/rendering-basic-pbr/rendering-basic-pbr-example.cpp
| ... | ... | @@ -115,7 +115,7 @@ public: |
| 115 | 115 | mLabel = TextLabel::New( "R:1 M:0" ); |
| 116 | 116 | mLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 117 | 117 | mLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 118 | - mLabel.SetSize( stage.GetSize().width * 0.5f, stage.GetSize().height * 0.083f ); | |
| 118 | + mLabel.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width * 0.5f, stage.GetSize().height * 0.083f ) ); | |
| 119 | 119 | mLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); |
| 120 | 120 | mLabel.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); |
| 121 | 121 | mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::WHITE ); |
| ... | ... | @@ -293,16 +293,16 @@ public: |
| 293 | 293 | |
| 294 | 294 | mUiRoot.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT); |
| 295 | 295 | mUiRoot.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT); |
| 296 | - mUiRoot.SetSize(stage.GetSize()); | |
| 296 | + mUiRoot.SetProperty( Actor::Property::SIZE, stage.GetSize()); | |
| 297 | 297 | |
| 298 | 298 | m3dRoot.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); |
| 299 | 299 | m3dRoot.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); |
| 300 | 300 | |
| 301 | 301 | // Setting camera parameters for 3D Scene |
| 302 | - mSkybox.GetActor().SetPosition( CAMERA_DEFAULT_POSITION ); | |
| 302 | + mSkybox.GetActor().SetProperty( Actor::Property::POSITION, CAMERA_DEFAULT_POSITION ); | |
| 303 | 303 | CameraActor camera3d = stage.GetRenderTaskList().GetTask(0).GetCameraActor(); |
| 304 | 304 | camera3d.SetInvertYAxis( true ); |
| 305 | - camera3d.SetPosition( CAMERA_DEFAULT_POSITION ); | |
| 305 | + camera3d.SetProperty( Actor::Property::POSITION, CAMERA_DEFAULT_POSITION ); | |
| 306 | 306 | camera3d.SetNearClippingPlane( CAMERA_DEFAULT_NEAR ); |
| 307 | 307 | camera3d.SetFarClippingPlane( CAMERA_DEFAULT_FAR ); |
| 308 | 308 | camera3d.SetFieldOfView( Radian( Degree( CAMERA_DEFAULT_FOV ) ) ); | ... | ... |
examples/rendering-cube/rendering-cube.cpp
| ... | ... | @@ -249,8 +249,8 @@ public: |
| 249 | 249 | mActor = Actor::New(); |
| 250 | 250 | mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 251 | 251 | mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 252 | - mActor.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) ); | |
| 253 | - mActor.SetSize( Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) ); | |
| 252 | + mActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) ); | |
| 253 | + mActor.SetProperty( Actor::Property::SIZE, Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) ); | |
| 254 | 254 | mActor.AddRenderer( mRenderer ); |
| 255 | 255 | stage.Add( mActor ); |
| 256 | 256 | } | ... | ... |
examples/rendering-line/rendering-line.cpp
| ... | ... | @@ -170,9 +170,9 @@ public: |
| 170 | 170 | mActor = Actor::New(); |
| 171 | 171 | mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 172 | 172 | mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 173 | - mActor.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) ); | |
| 173 | + mActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) ); | |
| 174 | 174 | mActor.SetProperty( Actor::Property::COLOR, Color::BLACK ); |
| 175 | - mActor.SetSize( Vector3( size.x, size.x, size.x ) ); | |
| 175 | + mActor.SetProperty( Actor::Property::SIZE, Vector3( size.x, size.x, size.x ) ); | |
| 176 | 176 | mActor.AddRenderer( mRenderer ); |
| 177 | 177 | stage.Add( mActor ); |
| 178 | 178 | } | ... | ... |
examples/rendering-radial-progress/radial-progress.cpp
| ... | ... | @@ -134,7 +134,7 @@ public: |
| 134 | 134 | mActor = Actor::New(); |
| 135 | 135 | mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 136 | 136 | mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 137 | - mActor.SetSize( Vector2( TEXTURE_WIDTH, TEXTURE_HEIGHT ) ); | |
| 137 | + mActor.SetProperty( Actor::Property::SIZE, Vector2( TEXTURE_WIDTH, TEXTURE_HEIGHT ) ); | |
| 138 | 138 | mActor.RegisterProperty("uProgress", float(1.0f) ); |
| 139 | 139 | stage.Add( mActor ); |
| 140 | 140 | ... | ... |
examples/rendering-skybox/look-camera.cpp
| ... | ... | @@ -129,7 +129,7 @@ void LookCamera::InitialiseDefaultCamera() |
| 129 | 129 | // should be read from file |
| 130 | 130 | mCameraActor.SetNearClippingPlane( mNear ); |
| 131 | 131 | mCameraActor.SetFarClippingPlane( mFar ); |
| 132 | - mCameraActor.SetPosition( mCameraPosition ); | |
| 132 | + mCameraActor.SetProperty( Actor::Property::POSITION, mCameraPosition ); | |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | void LookCamera::CreateInterceptorActor() |
| ... | ... | @@ -138,8 +138,8 @@ void LookCamera::CreateInterceptorActor() |
| 138 | 138 | |
| 139 | 139 | mInterceptorActor = Actor::New(); |
| 140 | 140 | mInterceptorActor.SetProperty( Dali::Actor::Property::NAME, "InputInterceptor" ); |
| 141 | - mInterceptorActor.SetSize( Vector3( stage.GetSize().x, stage.GetSize().y, 1 ) ); | |
| 142 | - mInterceptorActor.SetPosition( Vector3( 0.0, 0.0, 1.0 ) ); | |
| 141 | + mInterceptorActor.SetProperty( Actor::Property::SIZE, Vector3( stage.GetSize().x, stage.GetSize().y, 1 ) ); | |
| 142 | + mInterceptorActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0, 0.0, 1.0 ) ); | |
| 143 | 143 | mInterceptorActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 144 | 144 | mInterceptorActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 145 | 145 | mCameraActor.Add( mInterceptorActor ); | ... | ... |
examples/rendering-skybox/rendering-skybox.cpp
| ... | ... | @@ -407,7 +407,7 @@ public: |
| 407 | 407 | mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 408 | 408 | mActor.AddRenderer( mRenderer ); |
| 409 | 409 | |
| 410 | - mActor.SetSize( 10.f, 10.f, 10.f ); | |
| 410 | + mActor.SetProperty( Actor::Property::SIZE, Vector3( 10.f, 10.f, 10.f ) ); | |
| 411 | 411 | |
| 412 | 412 | Stage stage = Stage::GetCurrent(); |
| 413 | 413 | stage.Add( mActor ); |
| ... | ... | @@ -446,7 +446,7 @@ public: |
| 446 | 446 | mSkyboxActor.SetProperty( Dali::Actor::Property::NAME, "SkyBox" ); |
| 447 | 447 | mSkyboxActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 448 | 448 | mSkyboxActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 449 | - mSkyboxActor.SetPosition( CAMERA_DEFAULT_POSITION ); | |
| 449 | + mSkyboxActor.SetProperty( Actor::Property::POSITION, CAMERA_DEFAULT_POSITION ); | |
| 450 | 450 | mSkyboxActor.AddRenderer( mSkyboxRenderer ); |
| 451 | 451 | stage.Add( mSkyboxActor ); |
| 452 | 452 | } | ... | ... |
examples/rendering-textured-cube/rendering-textured-cube.cpp
| ... | ... | @@ -267,8 +267,8 @@ public: |
| 267 | 267 | mActor = Actor::New(); |
| 268 | 268 | mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 269 | 269 | mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 270 | - mActor.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) ); | |
| 271 | - mActor.SetSize( Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) ); | |
| 270 | + mActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) ); | |
| 271 | + mActor.SetProperty( Actor::Property::SIZE, Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) ); | |
| 272 | 272 | mActor.AddRenderer( mRenderer ); |
| 273 | 273 | stage.Add( mActor ); |
| 274 | 274 | } | ... | ... |
examples/rendering-triangle/rendering-triangle.cpp
| ... | ... | @@ -171,9 +171,9 @@ public: |
| 171 | 171 | mActor = Actor::New(); |
| 172 | 172 | mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 173 | 173 | mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 174 | - mActor.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) ); | |
| 174 | + mActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) ); | |
| 175 | 175 | mActor.SetProperty( Actor::Property::COLOR, Color::RED ); |
| 176 | - mActor.SetSize( Vector3( size.x, size.x, size.x ) ); | |
| 176 | + mActor.SetProperty( Actor::Property::SIZE, Vector3( size.x, size.x, size.x ) ); | |
| 177 | 177 | mActor.AddRenderer( mRenderer ); |
| 178 | 178 | stage.Add( mActor ); |
| 179 | 179 | } | ... | ... |
examples/scroll-view/scroll-view-example.cpp
| ... | ... | @@ -217,7 +217,7 @@ private: |
| 217 | 217 | mScrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); |
| 218 | 218 | mScrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); |
| 219 | 219 | mContentLayer.Add( mScrollView ); |
| 220 | - mScrollView.SetSize( stageSize ); | |
| 220 | + mScrollView.SetProperty( Actor::Property::SIZE, stageSize ); | |
| 221 | 221 | mScrollView.SetAxisAutoLock( true ); |
| 222 | 222 | mScrollView.SetAxisAutoLockGradient( 1.0f ); |
| 223 | 223 | |
| ... | ... | @@ -230,7 +230,7 @@ private: |
| 230 | 230 | { |
| 231 | 231 | Actor page = CreatePage(); |
| 232 | 232 | |
| 233 | - page.SetPosition( column * stageSize.x, row * stageSize.y ); | |
| 233 | + page.SetProperty( Actor::Property::POSITION, Vector2( column * stageSize.x, row * stageSize.y )); | |
| 234 | 234 | mScrollView.Add( page ); |
| 235 | 235 | |
| 236 | 236 | mPages.push_back(page); |
| ... | ... | @@ -300,8 +300,8 @@ private: |
| 300 | 300 | Vector3 position( margin * 0.5f + (imageSize.x + margin) * column - stageSize.width * 0.5f, |
| 301 | 301 | margin * 0.5f + (imageSize.y + margin) * row - stageSize.height * 0.5f, |
| 302 | 302 | 0.0f); |
| 303 | - image.SetPosition( position + imageSize * 0.5f ); | |
| 304 | - image.SetSize( imageSize ); | |
| 303 | + image.SetProperty( Actor::Property::POSITION, position + imageSize * 0.5f ); | |
| 304 | + image.SetProperty( Actor::Property::SIZE, imageSize ); | |
| 305 | 305 | page.Add(image); |
| 306 | 306 | } |
| 307 | 307 | } | ... | ... |
examples/shadows-and-lights/shadows-and-lights-example.cpp
| ... | ... | @@ -186,12 +186,12 @@ public: |
| 186 | 186 | toolBar.AddControl( resetButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING ); |
| 187 | 187 | |
| 188 | 188 | // Setup |
| 189 | - mView.SetPosition(Vector3(0.0f, 0.0f, 0.0f)); | |
| 189 | + mView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) ); | |
| 190 | 190 | |
| 191 | 191 | mContents.SetBehavior(Layer::LAYER_3D); |
| 192 | - mContents.SetPosition(mTranslation); | |
| 192 | + mContents.SetProperty( Actor::Property::POSITION, mTranslation ); | |
| 193 | 193 | mContents.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mSceneXRotation, mSceneYRotation ) ); |
| 194 | - mContents.SetScale(mPinchScale, mPinchScale, mPinchScale); | |
| 194 | + mContents.SetProperty( Actor::Property::SCALE, Vector3( mPinchScale, mPinchScale, mPinchScale ) ); | |
| 195 | 195 | |
| 196 | 196 | mPanGestureDetector = PanGestureDetector::New(); |
| 197 | 197 | mPanGestureDetector.Attach( mView ); |
| ... | ... | @@ -222,9 +222,9 @@ public: |
| 222 | 222 | mShadowPlaneBg.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); |
| 223 | 223 | mShadowPlaneBg.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); |
| 224 | 224 | mShadowPlaneBg.SetProperty( Dali::Actor::Property::NAME,"Plane"); |
| 225 | - mShadowPlaneBg.SetSize(1000.0f, 1000.0f); | |
| 225 | + mShadowPlaneBg.SetProperty( Actor::Property::SIZE, Vector2(1000.0f, 1000.0f) ); | |
| 226 | 226 | mContents.Add(mShadowPlaneBg); |
| 227 | - mShadowPlaneBg.SetPosition(Vector3(50.0f, 50.0f, -200.0f)); | |
| 227 | + mShadowPlaneBg.SetProperty( Actor::Property::POSITION, Vector3(50.0f, 50.0f, -200.0f)); | |
| 228 | 228 | |
| 229 | 229 | mShadowView.SetShadowPlaneBackground(mShadowPlaneBg); |
| 230 | 230 | mShadowView.Activate(); |
| ... | ... | @@ -242,7 +242,7 @@ public: |
| 242 | 242 | mCastingLight = Actor::New(); |
| 243 | 243 | mCastingLight.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); |
| 244 | 244 | mCastingLight.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER); |
| 245 | - mCastingLight.SetPosition( Vector3( 0.0f, 0.0f, 800.0f ) * scaleFactor ); | |
| 245 | + mCastingLight.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 800.0f ) * scaleFactor ); | |
| 246 | 246 | |
| 247 | 247 | TextLabel text = TextLabel::New( "Light" ); |
| 248 | 248 | text.SetProperty( TextLabel::Property::POINT_SIZE, 20.0f ); |
| ... | ... | @@ -303,8 +303,8 @@ public: |
| 303 | 303 | mSceneAnimation.SetLooping(true); |
| 304 | 304 | mSceneAnimation.Play(); |
| 305 | 305 | |
| 306 | - mSceneActor.SetSize(250.0f, 250.0f); | |
| 307 | - mSceneActor.SetPosition(0.0f, 0.0f, 130.0f); | |
| 306 | + mSceneActor.SetProperty( Actor::Property::SIZE, Vector2( 250.0f, 250.0f ) ); | |
| 307 | + mSceneActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 130.0f ) ); | |
| 308 | 308 | mShadowView.Add(mSceneActor); |
| 309 | 309 | } |
| 310 | 310 | |
| ... | ... | @@ -354,7 +354,7 @@ public: |
| 354 | 354 | case PAN_SCENE: |
| 355 | 355 | { |
| 356 | 356 | mTranslation += Vector3(gesture.displacement.x, gesture.displacement.y, 0.f); |
| 357 | - mContents.SetPosition(mTranslation); | |
| 357 | + mContents.SetProperty( Actor::Property::POSITION, mTranslation ); | |
| 358 | 358 | break; |
| 359 | 359 | } |
| 360 | 360 | |
| ... | ... | @@ -396,7 +396,7 @@ public: |
| 396 | 396 | } |
| 397 | 397 | mPinchScale = Clamp(mScaleAtPinchStart * gesture.scale, MIN_PINCH_SCALE, MAX_PINCH_SCALE); |
| 398 | 398 | |
| 399 | - mContents.SetScale(mPinchScale, mPinchScale, mPinchScale); | |
| 399 | + mContents.SetProperty( Actor::Property::SCALE, Vector3( mPinchScale, mPinchScale, mPinchScale ) ); | |
| 400 | 400 | } |
| 401 | 401 | |
| 402 | 402 | void Terminate(Application& app) |
| ... | ... | @@ -453,7 +453,7 @@ public: |
| 453 | 453 | { |
| 454 | 454 | // Reset translation |
| 455 | 455 | mTranslation = Vector3::ZERO; |
| 456 | - mContents.SetPosition(mTranslation); | |
| 456 | + mContents.SetProperty( Actor::Property::POSITION, mTranslation ); | |
| 457 | 457 | |
| 458 | 458 | // Align scene so that light anchor orientation is Z Axis |
| 459 | 459 | mSceneXRotation = -mLightXRotation; | ... | ... |
examples/simple-bitmap-font-text-label/simple-text-label-example.cpp
| ... | ... | @@ -108,8 +108,8 @@ public: |
| 108 | 108 | TextLabel label01 = TextLabel::New(); |
| 109 | 109 | label01.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 110 | 110 | label01.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 111 | - label01.SetSize( 400.f, 50.f ); | |
| 112 | - label01.SetPosition( 0.f, -100.f ); | |
| 111 | + label01.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 50.f ) ); | |
| 112 | + label01.SetProperty( Actor::Property::POSITION, Vector2( 0.f, -100.f )); | |
| 113 | 113 | label01.SetProperty( TextLabel::Property::MULTI_LINE, true ); |
| 114 | 114 | |
| 115 | 115 | label01.SetProperty( TextLabel::Property::ENABLE_MARKUP, true ); |
| ... | ... | @@ -125,8 +125,8 @@ public: |
| 125 | 125 | TextLabel label02 = TextLabel::New(); |
| 126 | 126 | label02.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 127 | 127 | label02.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 128 | - label02.SetSize( 400.f, 50.f ); | |
| 129 | - label02.SetPosition( 0.f, -50.f ); | |
| 128 | + label02.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 50.f ) ); | |
| 129 | + label02.SetProperty( Actor::Property::POSITION, Vector2( 0.f, -50.f )); | |
| 130 | 130 | label02.SetProperty( TextLabel::Property::MULTI_LINE, true ); |
| 131 | 131 | |
| 132 | 132 | label02.SetProperty( TextLabel::Property::TEXT, "0123456789:" ); |
| ... | ... | @@ -140,8 +140,8 @@ public: |
| 140 | 140 | TextLabel label03 = TextLabel::New(); |
| 141 | 141 | label03.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 142 | 142 | label03.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 143 | - label03.SetSize( 400.f, 50.f ); | |
| 144 | - label03.SetPosition( 0.f, 0.f ); | |
| 143 | + label03.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 50.f ) ); | |
| 144 | + label03.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f )); | |
| 145 | 145 | label03.SetProperty( TextLabel::Property::MULTI_LINE, true ); |
| 146 | 146 | |
| 147 | 147 | label03.SetProperty( TextLabel::Property::TEXT, "0123456789:" ); |
| ... | ... | @@ -154,8 +154,8 @@ public: |
| 154 | 154 | TextLabel label04 = TextLabel::New(); |
| 155 | 155 | label04.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 156 | 156 | label04.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 157 | - label04.SetSize( 400.f, 50.f ); | |
| 158 | - label04.SetPosition( 0.f, 50.f ); | |
| 157 | + label04.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 50.f ) ); | |
| 158 | + label04.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 50.f )); | |
| 159 | 159 | label04.SetProperty( TextLabel::Property::MULTI_LINE, true ); |
| 160 | 160 | |
| 161 | 161 | label04.SetProperty( TextLabel::Property::TEXT, "0123456789:" ); | ... | ... |
examples/simple-scroll-view/simple-scroll-view-example.cpp
| ... | ... | @@ -69,7 +69,7 @@ private: |
| 69 | 69 | ScrollView scrollView = ScrollView::New(); |
| 70 | 70 | scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 71 | 71 | scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 72 | - scrollView.SetSize( pageSize ); | |
| 72 | + scrollView.SetProperty( Actor::Property::SIZE, pageSize ); | |
| 73 | 73 | scrollView.SetAxisAutoLock( true ); |
| 74 | 74 | stage.Add( scrollView ); |
| 75 | 75 | |
| ... | ... | @@ -89,7 +89,7 @@ private: |
| 89 | 89 | for( int column = 0, textNumber = 0; column < NUMBER_OF_PAGES; column++ ) |
| 90 | 90 | { |
| 91 | 91 | Actor page = CreatePage( pageSize, textNumber ); |
| 92 | - page.SetPosition( column * pageSize.x, 0.0f ); | |
| 92 | + page.SetProperty( Actor::Property::POSITION, Vector2( column * pageSize.x, 0.0f )); | |
| 93 | 93 | scrollView.Add( page ); |
| 94 | 94 | } |
| 95 | 95 | ... | ... |
examples/simple-text-field/simple-text-field.cpp
| ... | ... | @@ -58,7 +58,7 @@ public: |
| 58 | 58 | |
| 59 | 59 | TextField field = TextField::New(); |
| 60 | 60 | field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 61 | - field.SetSize( 300.f, 60.f ); | |
| 61 | + field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 60.f ) ); | |
| 62 | 62 | field.SetBackgroundColor( Color::WHITE ); |
| 63 | 63 | field.SetBackgroundColor( Vector4( 1.f, 1.f, 1.f, 0.15f ) ); |
| 64 | 64 | ... | ... |
examples/simple-text-label/simple-text-label-example.cpp
| ... | ... | @@ -58,7 +58,7 @@ public: |
| 58 | 58 | mLabel.SetProperty( Dali::Actor::Property::NAME, "SimpleTextLabel" ); |
| 59 | 59 | mLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 60 | 60 | mLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 61 | - mLabel.SetSize( 400.f, 400.f ); | |
| 61 | + mLabel.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 400.f ) ); | |
| 62 | 62 | mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true ); |
| 63 | 63 | mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK ); |
| 64 | 64 | mLabel.SetBackgroundColor( Color::WHITE ); | ... | ... |
examples/simple-text-renderer/simple-text-renderer-example.cpp
| ... | ... | @@ -313,8 +313,8 @@ public: |
| 313 | 313 | Actor actor = Actor::New(); |
| 314 | 314 | actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 315 | 315 | actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 316 | - actor.SetPosition( 0.f, 0.f); | |
| 317 | - actor.SetSize( 360.f, 360.f ); | |
| 316 | + actor.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f)); | |
| 317 | + actor.SetProperty( Actor::Property::SIZE, Vector2( 360.f, 360.f ) ); | |
| 318 | 318 | actor.SetProperty( Actor::Property::COLOR, Color::WHITE ); |
| 319 | 319 | |
| 320 | 320 | actor.AddRenderer( renderer ); | ... | ... |
examples/size-negotiation/size-negotiation-example.cpp
| ... | ... | @@ -183,7 +183,7 @@ public: |
| 183 | 183 | popup.SetProperty( Dali::Actor::Property::NAME, "popup" ); |
| 184 | 184 | popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 185 | 185 | popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 186 | - popup.SetSize( POPUP_WIDTH_DP, 0.0f ); | |
| 186 | + popup.SetProperty( Actor::Property::SIZE, Vector2( POPUP_WIDTH_DP, 0.0f ) ); | |
| 187 | 187 | popup.SetProperty( Toolkit::Popup::Property::TAIL_VISIBILITY, false ); |
| 188 | 188 | |
| 189 | 189 | popup.OutsideTouchedSignal().Connect( this, &SizeNegotiationController::OnPopupOutsideTouched ); |
| ... | ... | @@ -428,7 +428,7 @@ public: |
| 428 | 428 | { |
| 429 | 429 | Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); |
| 430 | 430 | backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 431 | - backing.SetSize( 0.0f, 100.0f ); | |
| 431 | + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) ); | |
| 432 | 432 | |
| 433 | 433 | Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); |
| 434 | 434 | text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); |
| ... | ... | @@ -461,7 +461,7 @@ public: |
| 461 | 461 | { |
| 462 | 462 | Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); |
| 463 | 463 | backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 464 | - backing.SetSize( 0.0f, 100.0f ); | |
| 464 | + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) ); | |
| 465 | 465 | |
| 466 | 466 | Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); |
| 467 | 467 | text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); |
| ... | ... | @@ -509,7 +509,7 @@ public: |
| 509 | 509 | { |
| 510 | 510 | Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) ); |
| 511 | 511 | backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 512 | - backing.SetSize( 0.0f, 200.0f ); | |
| 512 | + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) ); | |
| 513 | 513 | |
| 514 | 514 | Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); |
| 515 | 515 | text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); |
| ... | ... | @@ -561,7 +561,7 @@ public: |
| 561 | 561 | { |
| 562 | 562 | Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); |
| 563 | 563 | backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 564 | - backing.SetSize( 0.0f, 100.0f ); | |
| 564 | + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) ); | |
| 565 | 565 | |
| 566 | 566 | Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); |
| 567 | 567 | text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); |
| ... | ... | @@ -578,7 +578,7 @@ public: |
| 578 | 578 | { |
| 579 | 579 | Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) ); |
| 580 | 580 | backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 581 | - backing.SetSize( 0.0f, 200.0f ); | |
| 581 | + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) ); | |
| 582 | 582 | |
| 583 | 583 | Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); |
| 584 | 584 | text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); |
| ... | ... | @@ -595,7 +595,7 @@ public: |
| 595 | 595 | { |
| 596 | 596 | Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); |
| 597 | 597 | backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 598 | - backing.SetSize( 0.0f, 300.0f ); | |
| 598 | + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 300.0f ) ); | |
| 599 | 599 | |
| 600 | 600 | Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); |
| 601 | 601 | text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); |
| ... | ... | @@ -631,7 +631,7 @@ public: |
| 631 | 631 | Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) ); |
| 632 | 632 | backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 633 | 633 | backing.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT ); |
| 634 | - backing.SetSize( 0.0f, 100.0f ); | |
| 634 | + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) ); | |
| 635 | 635 | |
| 636 | 636 | Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); |
| 637 | 637 | text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); |
| ... | ... | @@ -648,7 +648,7 @@ public: |
| 648 | 648 | { |
| 649 | 649 | Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); |
| 650 | 650 | backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 651 | - backing.SetSize( 0.0f, 200.0f ); | |
| 651 | + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) ); | |
| 652 | 652 | |
| 653 | 653 | Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); |
| 654 | 654 | text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); |
| ... | ... | @@ -699,7 +699,7 @@ public: |
| 699 | 699 | { |
| 700 | 700 | Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) ); |
| 701 | 701 | backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 702 | - backing.SetSize( 0.0f, 200.0f ); | |
| 702 | + backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) ); | |
| 703 | 703 | |
| 704 | 704 | Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" ); |
| 705 | 705 | text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); | ... | ... |
examples/sparkle/sparkle-effect-example.cpp
| ... | ... | @@ -101,8 +101,8 @@ private: |
| 101 | 101 | |
| 102 | 102 | stage.Add( mMeshActor ); |
| 103 | 103 | |
| 104 | - mMeshActor.SetPosition( ACTOR_POSITION ); | |
| 105 | - mMeshActor.SetScale( ACTOR_SCALE ); | |
| 104 | + mMeshActor.SetProperty( Actor::Property::POSITION, ACTOR_POSITION ); | |
| 105 | + mMeshActor.SetProperty( Actor::Property::SCALE, ACTOR_SCALE ); | |
| 106 | 106 | |
| 107 | 107 | mTapDetector = TapGestureDetector::New(); |
| 108 | 108 | mTapDetector.Attach(mCircleBackground); |
| ... | ... | @@ -167,7 +167,7 @@ private: |
| 167 | 167 | |
| 168 | 168 | Actor meshActor = Actor::New(); |
| 169 | 169 | meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 170 | - meshActor.SetSize( 1, 1 ); | |
| 170 | + meshActor.SetProperty( Actor::Property::SIZE, Vector2( 1, 1 ) ); | |
| 171 | 171 | meshActor.AddRenderer( renderer ); |
| 172 | 172 | |
| 173 | 173 | return meshActor; |
| ... | ... | @@ -354,9 +354,9 @@ private: |
| 354 | 354 | |
| 355 | 355 | // prepare the animation by setting the uniform to the required value |
| 356 | 356 | mEffect.SetProperty( mEffect.GetPropertyIndex( BREAK_UNIFORM_NAME ), 1.f ); |
| 357 | - mMeshActor.SetScale(0.01f); | |
| 357 | + mMeshActor.SetProperty( Actor::Property::SCALE,0.01f); | |
| 358 | 358 | mEffect.SetProperty( mEffect.GetPropertyIndex( "uScale" ), 0.01f ); |
| 359 | - mMeshActor.SetPosition( 0.f, 0.f, 1.f ); | |
| 359 | + mMeshActor.SetProperty( Actor::Property::POSITION, Vector3( 0.f, 0.f, 1.f ) ); | |
| 360 | 360 | |
| 361 | 361 | Animation breakAnimation = Animation::New(duration*1.5f); |
| 362 | 362 | breakAnimation.AnimateTo( Property(mMeshActor, Actor::Property::SCALE), Vector3(ACTOR_SCALE,ACTOR_SCALE,ACTOR_SCALE), EaseOutSquare); | ... | ... |
examples/styling/styling-application.cpp
| ... | ... | @@ -113,7 +113,7 @@ void StylingApplication::Create( Application& application ) |
| 113 | 113 | |
| 114 | 114 | mContentPane = CreateContentPane(); |
| 115 | 115 | stage.Add( mContentPane ); |
| 116 | - mContentPane.SetSize( stage.GetSize() ); | |
| 116 | + mContentPane.SetProperty( Actor::Property::SIZE, stage.GetSize() ); | |
| 117 | 117 | |
| 118 | 118 | // Content panes: |
| 119 | 119 | TableView contentLayout = TableView::New( 5, 1 ); |
| ... | ... | @@ -179,7 +179,7 @@ void StylingApplication::Create( Application& application ) |
| 179 | 179 | std::ostringstream thumbnailName; thumbnailName << "thumbnail" << i+1; |
| 180 | 180 | ImageView image = ImageView::New( images[i] ); |
| 181 | 181 | image.SetProperty( Dali::Actor::Property::NAME, thumbnailName.str() ); |
| 182 | - image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); | |
| 182 | + image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) ); | |
| 183 | 183 | |
| 184 | 184 | std::ostringstream label; label << (i+1); |
| 185 | 185 | std::ostringstream radioButtonStyleName; |
| ... | ... | @@ -379,7 +379,7 @@ Actor StylingApplication::CreateResizableContentPane() |
| 379 | 379 | grabHandle.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); |
| 380 | 380 | grabHandle.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_RIGHT ); |
| 381 | 381 | grabHandle.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT ); |
| 382 | - grabHandle.SetPosition( -BORDER_WIDTH, -BORDER_WIDTH ); | |
| 382 | + grabHandle.SetProperty( Actor::Property::POSITION, Vector2( -BORDER_WIDTH, -BORDER_WIDTH )); | |
| 383 | 383 | grabHandle.SetProperty( DevelActor::Property::OPACITY, 0.6f ); |
| 384 | 384 | |
| 385 | 385 | Layer grabCornerLayer = Layer::New(); |
| ... | ... | @@ -405,7 +405,7 @@ Popup StylingApplication::CreateResetPopup() |
| 405 | 405 | popup.SetStyleName("ResetPopup"); |
| 406 | 406 | popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 407 | 407 | popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 408 | - popup.SetSize( stage.GetSize().width * 0.75f, 0.0f ); | |
| 408 | + popup.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width * 0.75f, 0.0f ) ); | |
| 409 | 409 | popup.SetProperty( Popup::Property::TAIL_VISIBILITY, false ); |
| 410 | 410 | popup.OutsideTouchedSignal().Connect( this, &StylingApplication::HidePopup ); |
| 411 | 411 | popup.HiddenSignal().Connect( this, &StylingApplication::PopupHidden ); |
| ... | ... | @@ -426,7 +426,7 @@ Popup StylingApplication::CreateResetPopup() |
| 426 | 426 | footer.SetStyleName( "PopupFooter" ); |
| 427 | 427 | footer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 428 | 428 | footer.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT ); |
| 429 | - footer.SetSize( 0.0f, 80.0f ); | |
| 429 | + footer.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 80.0f ) ); | |
| 430 | 430 | footer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 431 | 431 | footer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 432 | 432 | |
| ... | ... | @@ -630,7 +630,7 @@ void StylingApplication::PopupHidden() |
| 630 | 630 | void StylingApplication::OnPan( Actor actor, const PanGesture& gesture ) |
| 631 | 631 | { |
| 632 | 632 | Vector3 size = mContentPane.GetTargetSize(); |
| 633 | - mContentPane.SetSize( size.GetVectorXY() + gesture.displacement * 2.0f ); | |
| 633 | + mContentPane.SetProperty( Actor::Property::SIZE, Vector2( size.GetVectorXY() + gesture.displacement * 2.0f ) ); | |
| 634 | 634 | } |
| 635 | 635 | |
| 636 | 636 | void StylingApplication::OnKeyEvent( const KeyEvent& keyEvent ) | ... | ... |
examples/super-blur-view/super-blur-view-example.cpp
| ... | ... | @@ -58,7 +58,7 @@ private: |
| 58 | 58 | mSuperBlurView = SuperBlurView::New( DEFAULT_BLUR_LEVEL ); |
| 59 | 59 | mSuperBlurView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 60 | 60 | mSuperBlurView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 61 | - mSuperBlurView.SetSize( 800, 1280 ); | |
| 61 | + mSuperBlurView.SetProperty( Actor::Property::SIZE, Vector2( 800, 1280 ) ); | |
| 62 | 62 | mSuperBlurView.SetProperty( SuperBlurView::Property::IMAGE_URL, BACKGROUND_IMAGE ); |
| 63 | 63 | stage.Add( mSuperBlurView ); |
| 64 | 64 | ... | ... |
examples/text-editor/text-editor-example.cpp
| ... | ... | @@ -152,7 +152,7 @@ public: |
| 152 | 152 | mEditor = TextEditor::New(); |
| 153 | 153 | mEditor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 154 | 154 | mEditor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 155 | - mEditor.SetPosition( 0.f, toolBarHeight * 2.0f, 0.f ); | |
| 155 | + mEditor.SetProperty( Actor::Property::POSITION, Vector3( 0.f, toolBarHeight * 2.0f, 0.f )); | |
| 156 | 156 | mEditor.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS ); |
| 157 | 157 | mEditor.SetProperty( Actor::Property::SIZE_MODE_FACTOR, TEXT_EDITOR_RELATIVE_SIZE ); |
| 158 | 158 | |
| ... | ... | @@ -195,7 +195,7 @@ public: |
| 195 | 195 | // Place below color selection button. |
| 196 | 196 | mButtonContainer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); |
| 197 | 197 | mButtonContainer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); |
| 198 | - mButtonContainer.SetPosition( 0.0f, 2.f * TOOLBAR_PADDING, 0.f ); | |
| 198 | + mButtonContainer.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 2.f * TOOLBAR_PADDING, 0.f )); | |
| 199 | 199 | mColorContainer.Add( mButtonContainer ); |
| 200 | 200 | |
| 201 | 201 | const Vector3 buttonPercentage( 1.f, 0.8f / static_cast<float>( NUMBER_OF_COLORS ), 1.f ); | ... | ... |
examples/text-fonts/text-fonts-example.cpp
| ... | ... | @@ -92,7 +92,7 @@ public: |
| 92 | 92 | void CreateContainer( Control& container, const Vector2 size ) |
| 93 | 93 | { |
| 94 | 94 | container = Control::New(); |
| 95 | - container.SetSize( size ); | |
| 95 | + container.SetProperty( Actor::Property::SIZE, size ); | |
| 96 | 96 | container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 97 | 97 | container.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D ); |
| 98 | 98 | } |
| ... | ... | @@ -102,7 +102,7 @@ public: |
| 102 | 102 | button = PushButton::New(); |
| 103 | 103 | button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); |
| 104 | 104 | button.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 105 | - button.SetSize( 50.0f, 50.0f ); | |
| 105 | + button.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) ); | |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | bool OnButtonClicked( Toolkit::Button button ) |
| ... | ... | @@ -117,7 +117,7 @@ public: |
| 117 | 117 | CreateContainer ( mContainer4 , mLayoutSize); |
| 118 | 118 | Stage stage = Stage::GetCurrent(); |
| 119 | 119 | Vector2 stageSize = stage.GetSize(); |
| 120 | - mContainer4.SetPosition( 0, stageSize.height*0.25f*3 ); | |
| 120 | + mContainer4.SetProperty( Actor::Property::POSITION, Vector2( 0, stageSize.height*0.25f*3 )); | |
| 121 | 121 | stage.Add( mContainer4 ); |
| 122 | 122 | // Info |
| 123 | 123 | CreateContainer ( mContainer4Info , mLayoutSize ); |
| ... | ... | @@ -192,9 +192,9 @@ public: |
| 192 | 192 | CreateTextLabel ( mLabel3, LABEL_TEXT, Color::WHITE ); |
| 193 | 193 | mLabel3.SetProperty( TextLabel::Property::FONT_FAMILY, "SamsungOneUI" ); |
| 194 | 194 | |
| 195 | - mContainer.SetPosition( 0, 0 ); | |
| 196 | - mContainer2.SetPosition( 0, stageSize.height*0.25f ); | |
| 197 | - mContainer3.SetPosition( 0, stageSize.height*0.25f*2 ); | |
| 195 | + mContainer.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 )); | |
| 196 | + mContainer2.SetProperty( Actor::Property::POSITION, Vector2( 0, stageSize.height*0.25f )); | |
| 197 | + mContainer3.SetProperty( Actor::Property::POSITION, Vector2( 0, stageSize.height*0.25f*2 )); | |
| 198 | 198 | |
| 199 | 199 | mContainer.Add( mLabel ); |
| 200 | 200 | mContainer2.Add( mLabel2 ); | ... | ... |
examples/text-label/expanding-buttons-impl.cpp
| ... | ... | @@ -84,7 +84,7 @@ void ExpandingButtons::OnInitialize() |
| 84 | 84 | void ExpandingButtons::OnRelayout( const Dali::Vector2& targetSize, Dali::RelayoutContainer& container ) |
| 85 | 85 | { |
| 86 | 86 | mButtonSize = targetSize; |
| 87 | - mExpandButton.SetSize( targetSize ); | |
| 87 | + mExpandButton.SetProperty( Actor::Property::SIZE, targetSize ); | |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | void ExpandingButtons::RegisterButton( Dali::Toolkit::Control& control ) | ... | ... |
examples/text-label/text-label-example.cpp
| ... | ... | @@ -185,9 +185,9 @@ public: |
| 185 | 185 | void SetUpExpandingStyleButtons( Vector2 position ) |
| 186 | 186 | { |
| 187 | 187 | mExpandingButtons = Demo::ExpandingButtons::New(); |
| 188 | - mExpandingButtons.SetPosition( mButtonSize.width, mStageSize.height * STYLE_BUTTON_POSTION_RELATIVE_TO_STAGE ); | |
| 188 | + mExpandingButtons.SetProperty( Actor::Property::POSITION, Vector2( mButtonSize.width, mStageSize.height * STYLE_BUTTON_POSTION_RELATIVE_TO_STAGE )); | |
| 189 | 189 | mExpandingButtons.CollapsingSignal().Connect( this, &TextLabelExample::OnExpandingButtonCollapsing ); |
| 190 | - mExpandingButtons.SetSize( mButtonSize ); | |
| 190 | + mExpandingButtons.SetProperty( Actor::Property::SIZE, mButtonSize ); | |
| 191 | 191 | // Creates the buttons to be expanded |
| 192 | 192 | CreateStyleButtons(); |
| 193 | 193 | |
| ... | ... | @@ -213,7 +213,7 @@ public: |
| 213 | 213 | mContainer.SetProperty( Dali::Actor::Property::NAME, "Container" ); |
| 214 | 214 | mContainer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 215 | 215 | mLayoutSize = Vector2(mStageSize.width*0.6f, mStageSize.width*0.6f); |
| 216 | - mContainer.SetSize( mLayoutSize ); | |
| 216 | + mContainer.SetProperty( Actor::Property::SIZE, mLayoutSize ); | |
| 217 | 217 | stage.Add( mContainer ); |
| 218 | 218 | |
| 219 | 219 | // Resize the center layout when the corner is grabbed |
| ... | ... | @@ -232,7 +232,7 @@ public: |
| 232 | 232 | |
| 233 | 233 | mLabel.SetProperty( Dali::Actor::Property::NAME, "TextLabel" ); |
| 234 | 234 | mLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 235 | - mLabel.SetSize(mLayoutSize); | |
| 235 | + mLabel.SetProperty( Actor::Property::SIZE, mLayoutSize ); | |
| 236 | 236 | mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true ); |
| 237 | 237 | mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::GREEN ); |
| 238 | 238 | mLabel.SetBackgroundColor( Color::WHITE ); |
| ... | ... | @@ -446,7 +446,7 @@ public: |
| 446 | 446 | if ( ! mColorButtons[index] ) |
| 447 | 447 | { |
| 448 | 448 | mColorButtons[index] = RadioButton::New(); |
| 449 | - mColorButtons[index].SetSize( mButtonSize ); | |
| 449 | + mColorButtons[index].SetProperty( Actor::Property::SIZE, mButtonSize ); | |
| 450 | 450 | mColorButtons[index].ClickedSignal().Connect( this, &TextLabelExample::OnColorSelected ); |
| 451 | 451 | mColorButtons[index].SetProperty( Button::Property::TOGGLABLE, true ); |
| 452 | 452 | Property::Map propertyMap; |
| ... | ... | @@ -489,7 +489,7 @@ public: |
| 489 | 489 | mColorButtons[index].Lower(); |
| 490 | 490 | |
| 491 | 491 | // Position button using nice animation |
| 492 | - mColorButtons[index].SetY( -GAP_BETWEEN_BUTTONS ); | |
| 492 | + mColorButtons[index].SetProperty( Actor::Property::POSITION_Y, -GAP_BETWEEN_BUTTONS ); | |
| 493 | 493 | float desiredPosition = -( mButtonSize.height + GAP_BETWEEN_BUTTONS ) * (index); |
| 494 | 494 | AlphaFunction focusedAlphaFunction = AlphaFunction( Vector2 ( 0.32f, 0.08f ), Vector2( 0.38f, 1.72f ) ); |
| 495 | 495 | mColorButtonsAnimation.AnimateBy( Property( mColorButtons[index], Actor::Property::POSITION_Y ), desiredPosition, focusedAlphaFunction ); |
| ... | ... | @@ -533,7 +533,7 @@ public: |
| 533 | 533 | mStyleButtons[index].SetProperty( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, BUTTON_IMAGES[ index ] ); |
| 534 | 534 | mStyleButtons[index].SetProperty( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, STYLE_SELECTED_IMAGE ); |
| 535 | 535 | mStyleButtons[index].SetProperty( Dali::Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 536 | - mStyleButtons[index].SetSize( mButtonSize ); | |
| 536 | + mStyleButtons[index].SetProperty( Actor::Property::SIZE, mButtonSize ); | |
| 537 | 537 | mStyleButtons[index].ClickedSignal().Connect( this, &TextLabelExample::OnStyleButtonClicked ); |
| 538 | 538 | } |
| 539 | 539 | } |
| ... | ... | @@ -603,13 +603,13 @@ public: |
| 603 | 603 | Vector2 clampedSize = Vector2( std::max( ConvertToEven( static_cast<int>( mLayoutSize.x )), 2 ), |
| 604 | 604 | std::max( ConvertToEven( static_cast<int>( mLayoutSize.y )), 2 ) ); |
| 605 | 605 | |
| 606 | - mContainer.SetSize( clampedSize ); | |
| 606 | + mContainer.SetProperty( Actor::Property::SIZE, clampedSize ); | |
| 607 | 607 | } |
| 608 | 608 | |
| 609 | 609 | if( gesture.state == Gesture::Cancelled || gesture.state == Gesture::Finished ) |
| 610 | 610 | { |
| 611 | 611 | // Resize the text label to match the container size when panning is finished |
| 612 | - mLabel.SetSize(mLayoutSize); | |
| 612 | + mLabel.SetProperty( Actor::Property::SIZE, mLayoutSize ); | |
| 613 | 613 | mBorder.SetProperty( Actor::Property::VISIBLE,false); |
| 614 | 614 | } |
| 615 | 615 | } | ... | ... |
examples/text-memory-profiling/text-memory-profiling-example.cpp
| ... | ... | @@ -107,7 +107,7 @@ public: |
| 107 | 107 | label.SetProperty( TextLabel::Property::ENABLE_MARKUP, true ); |
| 108 | 108 | |
| 109 | 109 | Vector2 stageSize = Stage::GetCurrent().GetSize(); |
| 110 | - label.SetPosition( Vector3( Random::Range( 0.0f, stageSize.x ), Random::Range( 0.0f, stageSize.y ), 0.0f) ); | |
| 110 | + label.SetProperty( Actor::Property::POSITION, Vector3( Random::Range( 0.0f, stageSize.x ), Random::Range( 0.0f, stageSize.y ), 0.0f) ); | |
| 111 | 111 | |
| 112 | 112 | switch ( type ) |
| 113 | 113 | { |
| ... | ... | @@ -181,7 +181,7 @@ public: |
| 181 | 181 | |
| 182 | 182 | shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) ); |
| 183 | 183 | label.SetProperty( TextLabel::Property::SHADOW, shadowMap ); |
| 184 | - label.SetSize(stageSize.x, stageSize.y * 0.25f); // Set the text label in larger size | |
| 184 | + label.SetProperty( Actor::Property::SIZE, Vector2(stageSize.x, stageSize.y * 0.25f) ); // Set the text label in larger size | |
| 185 | 185 | break; |
| 186 | 186 | } |
| 187 | 187 | default: | ... | ... |
examples/text-overlap/text-overlap-example.cpp
| ... | ... | @@ -47,7 +47,7 @@ void TextOverlapController::Create( Application& app ) |
| 47 | 47 | mLabels[i].SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); |
| 48 | 48 | mLabels[i].SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 49 | 49 | mLabels[i].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT ); |
| 50 | - mLabels[i].SetPosition( 0, (i*2+1) * stageSize.height * 0.25f ); | |
| 50 | + mLabels[i].SetProperty( Actor::Property::POSITION, Vector2( 0, (i*2+1) * stageSize.height * 0.25f )); | |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | stage.Add( mLabels[0] ); |
| ... | ... | @@ -94,7 +94,7 @@ void TextOverlapController::OnPan( Actor actor, const PanGesture& gesture ) |
| 94 | 94 | Vector2 stageSize = Stage::GetCurrent().GetSize(); |
| 95 | 95 | Vector3 size = mGrabbedActor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ); |
| 96 | 96 | float y = Clamp( gesture.position.y, size.y * 0.5f, stageSize.y - size.y*0.5f ); |
| 97 | - mGrabbedActor.SetPosition( 0, y ); | |
| 97 | + mGrabbedActor.SetProperty( Actor::Property::POSITION, Vector2( 0, y )); | |
| 98 | 98 | } |
| 99 | 99 | else |
| 100 | 100 | { | ... | ... |
examples/text-scrolling/text-scrolling-example.cpp
| ... | ... | @@ -81,7 +81,7 @@ public: |
| 81 | 81 | box.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 82 | 82 | box.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT ); |
| 83 | 83 | box.SetResizePolicy( ResizePolicy::FIXED, Dimension::WIDTH ); |
| 84 | - box.SetSize( size.width, 0.f ); | |
| 84 | + box.SetProperty( Actor::Property::SIZE, Vector2( size.width, 0.f ) ); | |
| 85 | 85 | parent.Add( box ); |
| 86 | 86 | |
| 87 | 87 | Dali::Property::Map border; |
| ... | ... | @@ -107,7 +107,7 @@ public: |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | button.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 110 | - button.SetSize(BOX_SIZE.height,BOX_SIZE.height); | |
| 110 | + button.SetProperty( Actor::Property::SIZE, Vector2(BOX_SIZE.height,BOX_SIZE.height) ); | |
| 111 | 111 | button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT ); |
| 112 | 112 | button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 113 | 113 | parent.Add(button); |
| ... | ... | @@ -128,7 +128,7 @@ public: |
| 128 | 128 | Actor rootActor = Actor::New(); |
| 129 | 129 | rootActor.SetProperty( Dali::Actor::Property::NAME,"rootActor"); |
| 130 | 130 | rootActor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 131 | - rootActor.SetSize( mStageSize ); | |
| 131 | + rootActor.SetProperty( Actor::Property::SIZE, mStageSize ); | |
| 132 | 132 | rootActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 133 | 133 | |
| 134 | 134 | stage.Add( rootActor ); |
| ... | ... | @@ -143,7 +143,7 @@ public: |
| 143 | 143 | desktop.SetProperty( Dali::Actor::Property::NAME,"desktopActor"); |
| 144 | 144 | desktop.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 145 | 145 | desktop.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 146 | - desktop.SetSize( mTargetActorSize ); | |
| 146 | + desktop.SetProperty( Actor::Property::SIZE, mTargetActorSize ); | |
| 147 | 147 | |
| 148 | 148 | rootActor.Add( desktop ); // Add desktop (content) to offscreen actor |
| 149 | 149 | |
| ... | ... | @@ -155,7 +155,7 @@ public: |
| 155 | 155 | Control boxE = Control::New(); |
| 156 | 156 | |
| 157 | 157 | CreateBox( "boxA", boxA, desktop, BOX_SIZE ); |
| 158 | - boxA.SetPosition( 0.0f, -500.0f, 1.0f ); | |
| 158 | + boxA.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -500.0f, 1.0f )); | |
| 159 | 159 | |
| 160 | 160 | // Create TextField |
| 161 | 161 | TextField field = TextField::New(); |
| ... | ... | @@ -165,16 +165,16 @@ public: |
| 165 | 165 | field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Enter Folder Name" ); |
| 166 | 166 | field.SetProperty( TextField::Property::DECORATION_BOUNDING_BOX, Rect<int>( SCREEN_BORDER, SCREEN_BORDER, mStageSize.width - SCREEN_BORDER*2, mStageSize.height - SCREEN_BORDER*2 ) ); |
| 167 | 167 | boxA.Add( field ); |
| 168 | - boxA.SetSize(BOX_SIZE); | |
| 168 | + boxA.SetProperty( Actor::Property::SIZE, BOX_SIZE); | |
| 169 | 169 | |
| 170 | 170 | CreateBox( "boxB", boxB, desktop, SCROLLING_BOX_SIZE ); |
| 171 | - boxB.SetPosition( 0.0f, -400.0f, 1.0f ); | |
| 171 | + boxB.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -400.0f, 1.0f )); | |
| 172 | 172 | Toolkit::PushButton scrollLargeButton = Toolkit::PushButton::New(); |
| 173 | 173 | scrollLargeButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedLarge ); |
| 174 | 174 | CreateLabel( mLargeLabel, "A Quick Brown Fox Jumps Over The Lazy Dog", boxB, false ,scrollLargeButton ); |
| 175 | 175 | |
| 176 | 176 | CreateBox( "boxC", boxC, desktop, SCROLLING_BOX_SIZE ); |
| 177 | - boxC.SetPosition( 0.0f, -300.0f, 1.0f ); | |
| 177 | + boxC.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -300.0f, 1.0f )); | |
| 178 | 178 | Toolkit::PushButton scrollSmallButton = Toolkit::PushButton::New(); |
| 179 | 179 | scrollSmallButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedSmall ); |
| 180 | 180 | CreateLabel( mSmallLabel, "Hello Text", boxC , true, scrollSmallButton ); |
| ... | ... | @@ -185,7 +185,7 @@ public: |
| 185 | 185 | mSmallLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); |
| 186 | 186 | |
| 187 | 187 | CreateBox( "boxD", boxD, desktop, SCROLLING_BOX_SIZE ); |
| 188 | - boxD.SetPosition( 0.0f, -200.0f, 1.0f ); | |
| 188 | + boxD.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -200.0f, 1.0f )); | |
| 189 | 189 | Toolkit::PushButton scrollRtlButton = Toolkit::PushButton::New(); |
| 190 | 190 | scrollRtlButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedRtl ); |
| 191 | 191 | CreateLabel( mRtlLabel, "ู ุฑุญุจุง ุจุงูุนุงูู ", boxD , true, scrollRtlButton ); |
| ... | ... | @@ -193,7 +193,7 @@ public: |
| 193 | 193 | mRtlLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_LOOP_DELAY, 0.3f ); |
| 194 | 194 | |
| 195 | 195 | CreateBox( "boxE", boxE, desktop, SCROLLING_BOX_SIZE ); |
| 196 | - boxE.SetPosition( 0.0f, -100.0f, 1.0f ); | |
| 196 | + boxE.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -100.0f, 1.0f )); | |
| 197 | 197 | Toolkit::PushButton scrollRtlLongButton = Toolkit::PushButton::New(); |
| 198 | 198 | scrollRtlLongButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedRtlLong ); |
| 199 | 199 | CreateLabel( mRtlLongLabel, " ู ุฑุญุจุง ุจุงูุนุงูู ู ุฑุญุจุง ุจุงูุนุงูู ู ุฑุญุจุง ุจุงูุนุงูู ู ุฑุญุจุง ุจุงูุนุงูู ู ุฑุญุจุง ุจุงูุนุงูู ู ุฑุญุจุง ุจุงูุนุงูู ู ุฑุญุจุง ุจุงูุนุงูู ู ุฑุญุจุง ุจุงูุนุงูู ู ุฑุญุจุง ุจุงูุนุงูู ", boxE , false, scrollRtlLongButton ); |
| ... | ... | @@ -213,7 +213,7 @@ public: |
| 213 | 213 | colorButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); |
| 214 | 214 | colorButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); |
| 215 | 215 | colorButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 216 | - colorButton.SetSize(BOX_SIZE.height,BOX_SIZE.height); | |
| 216 | + colorButton.SetProperty( Actor::Property::SIZE, Vector2(BOX_SIZE.height,BOX_SIZE.height) ); | |
| 217 | 217 | colorButton.ClickedSignal().Connect( this, &TextScrollingExample::OnColorButtonClicked ); |
| 218 | 218 | rootActor.Add( colorButton ); |
| 219 | 219 | |
| ... | ... | @@ -383,7 +383,7 @@ public: |
| 383 | 383 | mTargetActorPosition.y = mTargetActorPosition.y + position.y; |
| 384 | 384 | mTargetActorPosition.y = std::min( mTargetActorPosition.y, -mTargetActorSize.height ); |
| 385 | 385 | mTargetActorPosition.y = std::max( mTargetActorPosition.y, ( mTargetActorSize.height - mStageSize.height*0.25f ) ); |
| 386 | - actor.SetPosition( 0.0f, mTargetActorPosition.y ); | |
| 386 | + actor.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, mTargetActorPosition.y )); | |
| 387 | 387 | } |
| 388 | 388 | } |
| 389 | 389 | ... | ... |
examples/textured-mesh/textured-mesh-example.cpp
| ... | ... | @@ -129,7 +129,7 @@ public: |
| 129 | 129 | |
| 130 | 130 | mMeshActor = Actor::New(); |
| 131 | 131 | mMeshActor.AddRenderer( mRenderer ); |
| 132 | - mMeshActor.SetSize(400, 400); | |
| 132 | + mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(400, 400) ); | |
| 133 | 133 | |
| 134 | 134 | Property::Index fadeColorIndex = mRenderer.RegisterProperty( "uFadeColor", Color::MAGENTA ); |
| 135 | 135 | mRenderer.SetProperty( Renderer::Property::DEPTH_INDEX, 0 ); |
| ... | ... | @@ -143,7 +143,7 @@ public: |
| 143 | 143 | |
| 144 | 144 | mMeshActor2 = Actor::New(); |
| 145 | 145 | mMeshActor2.AddRenderer( mRenderer2 ); |
| 146 | - mMeshActor2.SetSize(400, 400); | |
| 146 | + mMeshActor2.SetProperty( Actor::Property::SIZE, Vector2(400, 400) ); | |
| 147 | 147 | |
| 148 | 148 | mMeshActor2.RegisterProperty( "anotherProperty", Color::GREEN ); |
| 149 | 149 | ... | ... |
examples/tooltip/tooltip-example.cpp
| ... | ... | @@ -157,7 +157,7 @@ private: |
| 157 | 157 | control.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75, 0.1, 1.0 ) ); |
| 158 | 158 | control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 159 | 159 | control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER ); |
| 160 | - control.SetY( stageSize.height * previousPosition ); | |
| 160 | + control.SetProperty( Actor::Property::POSITION_Y, stageSize.height * previousPosition ); | |
| 161 | 161 | } |
| 162 | 162 | } |
| 163 | 163 | ... | ... |
examples/video-view/video-view-example.cpp
| ... | ... | @@ -68,7 +68,7 @@ class VideoViewController: public ConnectionTracker |
| 68 | 68 | mVideoView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 69 | 69 | mVideoView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); |
| 70 | 70 | mVideoView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); |
| 71 | - mVideoView.SetSize( INIT_WIDTH, INIT_HEIGHT ); | |
| 71 | + mVideoView.SetProperty( Actor::Property::SIZE, Vector2( INIT_WIDTH, INIT_HEIGHT ) ); | |
| 72 | 72 | mVideoView.SetProperty( VideoView::Property::LOOPING, true ); |
| 73 | 73 | mVideoView.SetProperty( VideoView::Property::MUTED, false ); |
| 74 | 74 | mVideoView.SetProperty( VideoView::Property::VIDEO, PLAY_FILE ); |
| ... | ... | @@ -77,7 +77,7 @@ class VideoViewController: public ConnectionTracker |
| 77 | 77 | mMenu.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT ); |
| 78 | 78 | mMenu.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT ); |
| 79 | 79 | mMenu.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 80 | - mMenu.SetSize( INIT_WIDTH, 120 ); | |
| 80 | + mMenu.SetProperty( Actor::Property::SIZE, Vector2( INIT_WIDTH, 120 ) ); | |
| 81 | 81 | mVideoView.Add( mMenu ); |
| 82 | 82 | |
| 83 | 83 | mPlayButton = PushButton::New(); |
| ... | ... | @@ -85,8 +85,8 @@ class VideoViewController: public ConnectionTracker |
| 85 | 85 | mPlayButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 86 | 86 | mPlayButton.SetProperty( Dali::Actor::Property::NAME, "Play" ); |
| 87 | 87 | mPlayButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 88 | - mPlayButton.SetSize( BUTTON_SIZE, BUTTON_SIZE ); | |
| 89 | - mPlayButton.SetPosition( 40, 10 ); | |
| 88 | + mPlayButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) ); | |
| 89 | + mPlayButton.SetProperty( Actor::Property::POSITION, Vector2( 40, 10 )); | |
| 90 | 90 | mPlayButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked ); |
| 91 | 91 | |
| 92 | 92 | mPauseButton = PushButton::New(); |
| ... | ... | @@ -94,8 +94,8 @@ class VideoViewController: public ConnectionTracker |
| 94 | 94 | mPauseButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 95 | 95 | mPauseButton.SetProperty( Dali::Actor::Property::NAME, "Pause" ); |
| 96 | 96 | mPauseButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 97 | - mPauseButton.SetSize( BUTTON_SIZE, BUTTON_SIZE ); | |
| 98 | - mPauseButton.SetPosition( 40, 10 ); | |
| 97 | + mPauseButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) ); | |
| 98 | + mPauseButton.SetProperty( Actor::Property::POSITION, Vector2( 40, 10 )); | |
| 99 | 99 | mPauseButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked ); |
| 100 | 100 | |
| 101 | 101 | mChangeButton = PushButton::New(); |
| ... | ... | @@ -103,8 +103,8 @@ class VideoViewController: public ConnectionTracker |
| 103 | 103 | mChangeButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 104 | 104 | mChangeButton.SetProperty( Dali::Actor::Property::NAME, "Change" ); |
| 105 | 105 | mChangeButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 106 | - mChangeButton.SetSize( BUTTON_SIZE, BUTTON_SIZE ); | |
| 107 | - mChangeButton.SetPosition( 140, 10 ); | |
| 106 | + mChangeButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) ); | |
| 107 | + mChangeButton.SetProperty( Actor::Property::POSITION, Vector2( 140, 10 )); | |
| 108 | 108 | mChangeButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked ); |
| 109 | 109 | |
| 110 | 110 | mBackwardButton = PushButton::New(); |
| ... | ... | @@ -112,8 +112,8 @@ class VideoViewController: public ConnectionTracker |
| 112 | 112 | mBackwardButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 113 | 113 | mBackwardButton.SetProperty( Dali::Actor::Property::NAME, "Backward" ); |
| 114 | 114 | mBackwardButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 115 | - mBackwardButton.SetSize( BUTTON_SIZE, BUTTON_SIZE ); | |
| 116 | - mBackwardButton.SetPosition( 240, 10 ); | |
| 115 | + mBackwardButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) ); | |
| 116 | + mBackwardButton.SetProperty( Actor::Property::POSITION, Vector2( 240, 10 )); | |
| 117 | 117 | mBackwardButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked ); |
| 118 | 118 | |
| 119 | 119 | mForwardButton = PushButton::New(); |
| ... | ... | @@ -121,8 +121,8 @@ class VideoViewController: public ConnectionTracker |
| 121 | 121 | mForwardButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); |
| 122 | 122 | mForwardButton.SetProperty( Dali::Actor::Property::NAME, "Forward" ); |
| 123 | 123 | mForwardButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS ); |
| 124 | - mForwardButton.SetSize( BUTTON_SIZE, BUTTON_SIZE ); | |
| 125 | - mForwardButton.SetPosition( 340, 10 ); | |
| 124 | + mForwardButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) ); | |
| 125 | + mForwardButton.SetProperty( Actor::Property::POSITION, Vector2( 340, 10 )); | |
| 126 | 126 | mForwardButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked ); |
| 127 | 127 | |
| 128 | 128 | mMenu.Add( mPlayButton ); |
| ... | ... | @@ -239,7 +239,7 @@ class VideoViewController: public ConnectionTracker |
| 239 | 239 | if( gesture.state == Gesture::Finished ) |
| 240 | 240 | { |
| 241 | 241 | mScale = mPinchStartScale * gesture.scale; |
| 242 | - mVideoView.SetScale( mScale ); | |
| 242 | + mVideoView.SetProperty( Actor::Property::SCALE, mScale ); | |
| 243 | 243 | } |
| 244 | 244 | } |
| 245 | 245 | |
| ... | ... | @@ -247,12 +247,12 @@ class VideoViewController: public ConnectionTracker |
| 247 | 247 | { |
| 248 | 248 | if( !mIsFullScreen ) |
| 249 | 249 | { |
| 250 | - mVideoView.SetSize( mStageSize.x, mStageSize.y ); | |
| 250 | + mVideoView.SetProperty( Actor::Property::SIZE, mStageSize ); | |
| 251 | 251 | mIsFullScreen = true; |
| 252 | 252 | } |
| 253 | 253 | else |
| 254 | 254 | { |
| 255 | - mVideoView.SetSize( INIT_WIDTH, INIT_HEIGHT ); | |
| 255 | + mVideoView.SetProperty( Actor::Property::SIZE, Vector2( INIT_WIDTH, INIT_HEIGHT ) ); | |
| 256 | 256 | mIsFullScreen = false; |
| 257 | 257 | } |
| 258 | 258 | } | ... | ... |
examples/visual-transitions/transition-application.cpp
| ... | ... | @@ -127,7 +127,7 @@ void TransitionApplication::Create( Application& application ) |
| 127 | 127 | mVisualButtons[i].SetProperty( BeatControl::Property::BEAT_VISUAL, map ); |
| 128 | 128 | mVisualButtons[i].SetProperty( Dali::Actor::Property::NAME,"VisualButton"); |
| 129 | 129 | mVisualButtons[i].SetStyleName("VisualButton"); |
| 130 | - mVisualButtons[i].SetSize(0, 50); | |
| 130 | + mVisualButtons[i].SetProperty( Actor::Property::SIZE, Vector2(0, 50) ); | |
| 131 | 131 | mVisualButtons[i].SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); |
| 132 | 132 | mVisualButtons[i].SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT ); |
| 133 | 133 | mVisualIndex = mVisualButtons[i].RegisterProperty( "visualId", i, Property::READ_WRITE ); | ... | ... |
examples/web-view/web-view-example.cpp
| ... | ... | @@ -68,8 +68,8 @@ public: |
| 68 | 68 | mWebView = Toolkit::WebView::New( "ko-KR", "Asia/Seoul" ); |
| 69 | 69 | mWebView.SetProperty( Actor::Property::PARENT_ORIGIN, Dali::ParentOrigin::CENTER ); |
| 70 | 70 | mWebView.SetProperty( Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::CENTER ); |
| 71 | - mWebView.SetPosition( 0, 0 ); | |
| 72 | - mWebView.SetSize( width, height ); | |
| 71 | + mWebView.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 )); | |
| 72 | + mWebView.SetProperty( Actor::Property::SIZE, Vector2( width, height ) ); | |
| 73 | 73 | mWebView.PageLoadStartedSignal().Connect( this, &WebViewController::OnPageLoadStarted ); |
| 74 | 74 | mWebView.PageLoadFinishedSignal().Connect( this, &WebViewController::OnPageLoadFinished ); |
| 75 | 75 | ... | ... |
shared/dali-table-view.cpp
| ... | ... | @@ -739,7 +739,7 @@ void DaliTableView::InitialiseBackgroundActors( Actor actor ) |
| 739 | 739 | Random::Range( -size.y, size.y ), |
| 740 | 740 | Random::Range( BUBBLE_MIN_Z, BUBBLE_MAX_Z ) ); |
| 741 | 741 | |
| 742 | - child.SetPosition( childPos ); | |
| 742 | + child.SetProperty( Actor::Property::POSITION, childPos ); | |
| 743 | 743 | |
| 744 | 744 | // Define bubble horizontal parallax and vertical wrapping |
| 745 | 745 | Constraint animConstraint = Constraint::New < Vector3 > ( child, Actor::Property::POSITION, AnimateBubbleConstraint( childPos, Random::Range( -0.85f, 0.25f ) ) ); |
| ... | ... | @@ -766,7 +766,7 @@ void DaliTableView::AddBackgroundActors( Actor layer, int count ) |
| 766 | 766 | int shapeType = static_cast<int>( Random::Range( 0.0f, NUMBER_OF_SHAPE_IMAGES - 1 ) + 0.5f ); |
| 767 | 767 | |
| 768 | 768 | ImageView dfActor = ImageView::New(); |
| 769 | - dfActor.SetSize( Vector2( randSize, randSize ) ); | |
| 769 | + dfActor.SetProperty( Actor::Property::SIZE, Vector2( randSize, randSize ) ); | |
| 770 | 770 | dfActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); |
| 771 | 771 | |
| 772 | 772 | // Set the Image URL and the custom shader at the same time | ... | ... |
shared/view.h
| ... | ... | @@ -70,7 +70,7 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar& toolBar, |
| 70 | 70 | toolBarLayer.SetProperty( Dali::Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::TOP_CENTER ); |
| 71 | 71 | toolBarLayer.SetProperty( Dali::Actor::Property::PARENT_ORIGIN, Dali::ParentOrigin::TOP_CENTER ); |
| 72 | 72 | toolBarLayer.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::WIDTH ); |
| 73 | - toolBarLayer.SetSize( 0.0f, style.mToolBarHeight ); | |
| 73 | + toolBarLayer.SetProperty( Dali::Actor::Property::SIZE, Dali::Vector2( 0.0f, style.mToolBarHeight ) ); | |
| 74 | 74 | |
| 75 | 75 | // Raise tool bar layer to the top. |
| 76 | 76 | toolBarLayer.RaiseToTop(); | ... | ... |