/*
-* Copyright (c) 2017 Samsung Electronics Co., Ltd.
+* Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
mImageUrl[k] = CARD_IMAGE_LIST[k];
+ // Create an image view for this item
mCard[k] = ImageView::New();
- mCard[k].SetImage( mImageUrl[k] );
- mCard[k].SetParentOrigin( ParentOrigin::CENTER );
- mCard[k].SetAnchorPoint( AnchorPoint::CENTER );
- mCard[k].SetSize( mSize.x, mSize.y );
- mCard[k].SetPosition( mPosition[k].x, mPosition[k].y );
+ {
+ Property::Map propertyMap;
+ propertyMap.Insert(Visual::Property::TYPE, Visual::IMAGE);
+ propertyMap.Insert(ImageVisual::Property::URL, mImageUrl[k]);
+ propertyMap.Insert(DevelVisual::Property::VISUAL_FITTING_MODE, DevelVisual::FILL);
+ mCard[k].SetProperty(Toolkit::ImageView::Property::IMAGE, propertyMap);
+ }
+
+ mCard[k].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mCard[k].SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ mCard[k].SetProperty( Actor::Property::SIZE, Vector2( mSize.x, mSize.y ) );
+ mCard[k].SetProperty( Actor::Property::POSITION, Vector2( mPosition[k].x, mPosition[k].y ));
stage.Add( mCard[k] );
}
FONT_SCALE = 0.25f * STAGE_SIZE.y / STAGE_SIZE.x;
mBackground = Control::New();
- mBackground.SetParentOrigin( ParentOrigin::CENTER );
- mBackground.SetAnchorPoint( AnchorPoint::CENTER );
- mBackground.SetSize( STAGE_SIZE );
+ mBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mBackground.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ mBackground.SetProperty( Actor::Property::SIZE, STAGE_SIZE );
mStage.Add( mBackground );
{
mAddButton = ImageView::New();
mAddButton.SetImage( BUTTON_ADD_IMAGE );
- mAddButton.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
- mAddButton.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
- mAddButton.SetSize( BUTTON_ADD_SIZE * SCALED_WIDTH );
- mAddButton.SetPosition( BUTTON_ADD_POSITION * SCALED_WIDTH );
+ mAddButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
+ mAddButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
+ mAddButton.SetProperty( Actor::Property::SIZE, BUTTON_ADD_SIZE * SCALED_WIDTH );
+ mAddButton.SetProperty( Actor::Property::POSITION, BUTTON_ADD_POSITION * SCALED_WIDTH );
mLabel1 = TextLabel::New( LABEL_TICKET_STR );
- mLabel1.SetParentOrigin( ParentOrigin::TOP_CENTER );
- mLabel1.SetAnchorPoint( AnchorPoint::TOP_CENTER );
- mLabel1.SetSize( LABEL_TICKET_SIZE * SCALED_WIDTH );
- mLabel1.SetPosition( LABEL_TICKET_POSITION * SCALED_WIDTH );
- mLabel1.SetVisible( true );
+ mLabel1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
+ mLabel1.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
+ mLabel1.SetProperty( Actor::Property::SIZE, LABEL_TICKET_SIZE * SCALED_WIDTH );
+ mLabel1.SetProperty( Actor::Property::POSITION, LABEL_TICKET_POSITION * SCALED_WIDTH );
+ mLabel1.SetProperty( Actor::Property::VISIBLE, true );
mLabel1.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_TICKET_FONT_COLOR );
mLabel1.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_TICKET_FONT_SIZE * FONT_SCALE );
mLabel1.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
mLabel1.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
mLabel2 = TextLabel::New( LABEL_HOLD_STR );
- mLabel2.SetParentOrigin( ParentOrigin::CENTER );
- mLabel2.SetAnchorPoint( AnchorPoint::CENTER );
- mLabel2.SetSize( LABEL_HOLD_SIZE * SCALED_WIDTH );
- mLabel2.SetPosition( LABEL_HOLD_POSITION * SCALED_WIDTH );
- mLabel2.SetVisible( false );
+ mLabel2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mLabel2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ mLabel2.SetProperty( Actor::Property::SIZE, LABEL_HOLD_SIZE * SCALED_WIDTH );
+ mLabel2.SetProperty( Actor::Property::POSITION, LABEL_HOLD_POSITION * SCALED_WIDTH );
+ mLabel2.SetProperty( Actor::Property::VISIBLE, false );
mLabel2.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_HOLD_FONT_COLOR );
mLabel2.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_HOLD_FONT_SIZE * FONT_SCALE );
mLabel2.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
mLabel2.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
mLabel3 = TextLabel::New( LABEL_TERMINAL_STR );
- mLabel3.SetParentOrigin( ParentOrigin::CENTER );
- mLabel3.SetAnchorPoint( AnchorPoint::CENTER );
- mLabel3.SetSize( LABEL_TERMINAL_SIZE * SCALED_WIDTH );
- mLabel3.SetPosition( LABEL_TERMINAL_POSITION * SCALED_WIDTH );
- mLabel3.SetVisible( false );
+ mLabel3.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mLabel3.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ mLabel3.SetProperty( Actor::Property::SIZE, LABEL_TERMINAL_SIZE * SCALED_WIDTH );
+ mLabel3.SetProperty( Actor::Property::POSITION, LABEL_TERMINAL_POSITION * SCALED_WIDTH );
+ mLabel3.SetProperty( Actor::Property::VISIBLE, false );
mLabel3.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_TERMINAL_FONT_COLOR );
mLabel3.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_TERMINAL_FONT_SIZE * FONT_SCALE );
mLabel3.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
bool mIsTouchedActor;
};
-int main(int argc, char **argv)
+int DALI_EXPORT_API main(int argc, char **argv)
{
Application application = Application::New( &argc, &argv );