button.SetPosition(position.x,position.y);
//button.SetSize(size);
button.SetProperty( Button::Property::LABEL, label );
- button.SetProperty(Button::Property::UNSELECTED_COLOR, selectedColor);
- button.SetProperty(Button::Property::SELECTED_COLOR, unselectedColor);
+
+ Property::Map propertyMap;
+ propertyMap.Insert(Visual::Property::TYPE, Visual::COLOR);
+ propertyMap.Insert(ColorVisual::Property::MIX_COLOR, selectedColor);
+ button.SetProperty(Button::Property::UNSELECTED_BACKGROUND_VISUAL, propertyMap);
+
+ Property::Map propertyMap1;
+ propertyMap1.Insert(Visual::Property::TYPE, Visual::COLOR);
+ propertyMap1.Insert(ColorVisual::Property::MIX_COLOR, unselectedColor);
+ button.SetProperty(Button::Property::SELECTED_BACKGROUND_VISUAL, propertyMap1);
parent.AddChild(button, cellPosition);
button.ClickedSignal().Connect(obj, onClickedCallback);
button.SetPosition(position.x,position.y);
//button.SetSize(size);
button.SetProperty( Button::Property::LABEL, label );
- button.SetProperty(Button::Property::UNSELECTED_COLOR, selectedColor);
- button.SetProperty(Button::Property::SELECTED_COLOR, unselectedColor);
+ Property::Map propertyMap;
+ propertyMap.Insert(Visual::Property::TYPE, Visual::COLOR);
+ propertyMap.Insert(ColorVisual::Property::MIX_COLOR, selectedColor);
+ button.SetProperty(Button::Property::UNSELECTED_BACKGROUND_VISUAL, propertyMap);
+
+ Property::Map propertyMap1;
+ propertyMap1.Insert(Visual::Property::TYPE, Visual::COLOR);
+ propertyMap1.Insert(ColorVisual::Property::MIX_COLOR, unselectedColor);
+ button.SetProperty(Button::Property::SELECTED_BACKGROUND_VISUAL, propertyMap1);
//button.ClickedSignal().Connect(obj, onClickedCallback);
return button;
customTextField.SetParentOrigin(parentOrigin);
customTextField.SetSize( size);
customTextField.SetPosition( position.x,position.y );
- Image customTextFieldBgImage = ResourceImage::New( this->mImageDirectory+"customTextFieldBgImage.jpg" );
- customTextField.SetBackgroundImage(customTextFieldBgImage);
+ customTextField.SetProperty( Control::Property::BACKGROUND, this->mImageDirectory+"customTextFieldBgImage.jpg" );
TextField field=TextField::New();
field.SetAnchorPoint(anchorPoint);
btnCross.SetParentOrigin(parentOrigin);
btnCross.SetSize( size.width/10, size.height );
btnCross.SetPosition( size.width - size.width/10, 0.0f );
- btnCross.SetUnselectedImage( this->mImageDirectory + "innerButtonUnselected.png" );
- btnCross.SetSelectedImage( this->mImageDirectory + "innerButtonSelected.png" );
+ btnCross.SetProperty( Toolkit::Button::Property::UNSELECTED_VISUAL, this->mImageDirectory + "innerButtonUnselected.png" );
+ btnCross.SetProperty( Toolkit::Button::Property::SELECTED_VISUAL, this->mImageDirectory + "innerButtonSelected.png" );
//btnCross.ClickedSignal().Connect( obj, onClickedCallback );
customTextField.Add(btnCross);
btnCross.SetParentOrigin(parentOrigin);
btnCross.SetSize( bodySize.width*TEXTEDITOR_HEIGHT, bodySize.height*TEXTEDITOR_HEIGHT );
btnCross.SetPosition( size.width - size.width/10, 0.0f );
- btnCross.SetUnselectedImage( this->mImageDirectory + "innerButtonSelected.png" );
- btnCross.SetSelectedImage( this->mImageDirectory + "innerButtonUnselected.png" );
+ btnCross.SetProperty( Toolkit::Button::Property::UNSELECTED_VISUAL, this->mImageDirectory + "innerButtonSelected.png" );
+ btnCross.SetProperty( Toolkit::Button::Property::SELECTED_VISUAL, this->mImageDirectory + "innerButtonUnselected.png" );
//btnCross.ClickedSignal().Connect( obj, onClickedCallback );
customTextEditor.Add(btnCross);
Actor hitActor=touchpoint.hitActor;
PushButton btn=PushButton::DownCast(hitActor);
txt.append(", Hit Actor: ");
- txt.append(btn.GetLabelText());
+
+ Property::Value value = btn.GetProperty( Toolkit::Button::Property::LABEL );
+ Property::Map *labelProperty = value.GetMap();
+ std::string textLabel;
+ if( labelProperty )
+ {
+ Property::Value* value = labelProperty->Find( Toolkit::TextVisual::Property::TEXT );
+ value->Get( textLabel );
+ }
+ txt.append(textLabel);
//state
txt.append(", State: ");
Actor hitActor=touchpoint.hitActor;
PushButton btn=PushButton::DownCast(hitActor);
txt.append(", Hit Actor: ");
- txt.append(btn.GetLabelText());
+ Property::Value value = btn.GetProperty( Toolkit::Button::Property::LABEL );
+ Property::Map *labelProperty = value.GetMap();
+ std::string textLabel;
+ if( labelProperty )
+ {
+ Property::Value* value = labelProperty->Find( Toolkit::TextVisual::Property::TEXT );
+ value->Get( textLabel );
+ }
+ txt.append(textLabel);
//state
txt.append(", State: ");
btnAddremove.SetParentOrigin(ParentOrigin::BOTTOM_CENTER);
btnAddremove.SetPosition(0.0f, -10.0f);
btnAddremove.ClickedSignal().Connect(this, &TBTDaliPanGestureAngleDirectionView::OnSetunSetButtonClick);
- btnAddremove.SetProperty(Button::Property::UNSELECTED_COLOR, selectedColor);
- btnAddremove.SetProperty(Button::Property::SELECTED_COLOR, unSelectedColor);
+
+ Property::Map propertyMap;
+ propertyMap.Insert(Visual::Property::TYPE, Visual::COLOR);
+ propertyMap.Insert(ColorVisual::Property::MIX_COLOR, selectedColor);
+ btnAddremove.SetProperty(Button::Property::UNSELECTED_BACKGROUND_VISUAL, propertyMap);
+
+ Property::Map propertyMap1;
+ propertyMap1.Insert(Visual::Property::TYPE, Visual::COLOR);
+ propertyMap1.Insert(ColorVisual::Property::MIX_COLOR, unSelectedColor);
+ btnAddremove.SetProperty(Button::Property::SELECTED_BACKGROUND_VISUAL, propertyMap1);
btnAddremove.SetSize(this->bodySize.width, BUTTON_HEIGHT * bodySize.height);
this->ctlBody.Add(btnAddremove);
if(flag==false)
- btnAddremove.SetLabelText("Remove Angle & Direction");
+ btnAddremove.SetProperty( Toolkit::Button::Property::LABEL, "Remove Angle & Direction" );
setUnset();
}
void TBTDaliPanGestureAngleDirectionView::setUnset()
pangesturedetector.AddAngle(angle,threshold);
pangesturedetector.AddDirection( PanGestureDetector::DIRECTION_LEFT, Radian( Math::PI * 0.25 ) );
flag=true;
- btnAddremove.SetLabelText("Remove Angle & Direction");
+ btnAddremove.SetProperty( Toolkit::Button::Property::LABEL, "Remove Angle & Direction" );
}
else
{
pangesturedetector.RemoveDirection(PanGestureDetector::DIRECTION_LEFT);
pangesturedetector.ClearAngles();
flag=false;
- btnAddremove.SetLabelText("Add Angle & Direction");
+ btnAddremove.SetProperty( Toolkit::Button::Property::LABEL, "Add Angle & Direction" );
}
}
void TBTDaliPanGestureAngleDirectionView::OnPanGestureDetector(Actor actor, const PanGesture& gesture)
//mApplication.AddIdle( MakeCallback( TBTDaliStageView::NewWindow ) );
// textButton=PushButton::New();
-// textButton.SetProperty(Button::Property::LABEL_TEXT,"Test Button");
+// textButton.SetProperty(Button::Property::LABEL,"Test Button");
// mrootTable.AddChild(textButton,TableView::CellPosition(11,0));
-//
-// textButton.SetSelectedImage( "/images/gallery-medium-0.jpg" );
+// textButton.SetProperty( Toolkit::Button::Property::SELECTED_VISUAL, "/images/gallery-medium-0.jpg" );
}
else
{
bCheck=false;
//gApplication.Reset();
-// textButton.SetUnselectedImage( "/images/gallery-medium-1.jpg" );
+ //textButton.SetProperty( Toolkit::Button::Property::UNSELECTED_VISUAL, "/images/gallery-medium-1.jpg" );
// mrootTable.RemoveChildAt(TableView::CellPosition(11,0));
}
return true;
DBG("TBTTTSView::updateViewControls");
if (tts.GetState() == TtsPlayer::PLAYING)
{
- playButton.SetDisabled(true);
- interruptButton.SetDisabled(false);
- interruptButton.SetLabelText("Pause");
- stopButton.SetDisabled(false);
+ playButton.SetProperty( Button::Property::DISABLED, true);
+ interruptButton.SetProperty( Button::Property::DISABLED, false);
+ interruptButton.SetProperty( Toolkit::Button::Property::LABEL, "Pause" );
+ stopButton.SetProperty( Button::Property::DISABLED, false);
}
else if (tts.GetState() == TtsPlayer::PAUSED)
{
- playButton.SetDisabled(true);
- interruptButton.SetDisabled(false);
- interruptButton.SetLabelText("Resume");
- stopButton.SetDisabled(false);
+ playButton.SetProperty( Button::Property::DISABLED, true);
+ interruptButton.SetProperty( Button::Property::DISABLED, false);
+ interruptButton.SetProperty( Toolkit::Button::Property::LABEL, "Resume" );
+ stopButton.SetProperty( Button::Property::DISABLED, false);
}
else
{
- playButton.SetDisabled(false);
- interruptButton.SetDisabled(true);
- stopButton.SetDisabled(true);
+ playButton.SetProperty( Button::Property::DISABLED, false);
+ interruptButton.SetProperty( Button::Property::DISABLED, true);
+ stopButton.SetProperty( Button::Property::DISABLED, true);
}
}