-////////////////////////////////////////////////////////////////////////
-// Legacy functions from Tizen 2.4 and 3.0
-
-// Legacy code needed whilst Color can be set by direct Property setting ( deprecated ) instead of setting a Visual
-void Button::SetColor( const Vector4& color, Property::Index visualIndex )
-{
- if ( visualIndex == Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL )
- {
- mSelectedColor = color;
- }
- else
- {
- mUnselectedColor = color;
- }
-
- Property::Map map;
- map[ Toolkit::Visual::Property::TYPE ] = Toolkit::Visual::COLOR;
- map[ Toolkit::ColorVisual::Property::MIX_COLOR ] = color;
-
- CreateVisualsForComponent( visualIndex, map, DepthIndex::BACKGROUND );
-}
-
-const Vector4 Button::GetUnselectedColor() const
-{
- return mUnselectedColor;
-}
-
-const Vector4 Button::GetSelectedColor() const
-{
- return mSelectedColor;
-}
-
-void Button::SetAnimationTime( float animationTime )
-{
- // Used by depreciated API
- mAnimationTime = animationTime;
-}
-
-float Button::GetAnimationTime() const
-{
- // Used by depreciated API
- return mAnimationTime;
-}
-
-void Button::SetLabel( Actor label )
-{
- if ( label )
- {
- Property::Value value ="";
- value = label.GetProperty(Toolkit::TextLabel::Property::TEXT);
-
- SetLabelText( value.Get<std::string>() );
- }
-}
-
-void Button::SetUnselectedImage( const std::string& filename )
-{
- if( !filename.empty() )
- {
- CreateVisualsForComponent( Toolkit::Button::Property::UNSELECTED_VISUAL, filename, DepthIndex::CONTENT );
- }
-}
-
-void Button::SetBackgroundImage( const std::string& filename )
-{
- if( !filename.empty() )
- {
- CreateVisualsForComponent( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, filename, DepthIndex::BACKGROUND );
- }
-}
-
-void Button::SetSelectedImage( const std::string& filename )
-{
- if( !filename.empty() )
- {
- CreateVisualsForComponent( Toolkit::Button::Property::SELECTED_VISUAL, filename, DepthIndex::CONTENT );
- }
-}
-
-void Button::SetSelectedBackgroundImage( const std::string& filename )
-{
- if( !filename.empty() )
- {
- CreateVisualsForComponent( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, filename, DepthIndex::BACKGROUND );
- }
-}
-
-void Button::SetDisabledBackgroundImage( const std::string& filename )
-{
- if( !filename.empty() )
- {
- CreateVisualsForComponent( Toolkit::Button::Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL, filename, DepthIndex::BACKGROUND );
- }
-}
-
-void Button::SetDisabledImage( const std::string& filename )
-{
- if( !filename.empty() )
- {
- CreateVisualsForComponent( Toolkit::Button::Property::DISABLED_UNSELECTED_VISUAL, filename, DepthIndex::CONTENT );
- }
-}
-
-void Button::SetDisabledSelectedImage( const std::string& filename )
-{
- if( !filename.empty() )
- {
- CreateVisualsForComponent( Toolkit::Button::Property::DISABLED_SELECTED_VISUAL, filename, DepthIndex::CONTENT );
- }
-}
-
-std::string Button::GetUrlForImageVisual( Property::Index index )
-{
- Toolkit::Visual::Base visual = GetVisual( index );
- std::string result;
-
- if ( visual )
- {
- Dali::Property::Map retreivedMap;
- visual.CreatePropertyMap( retreivedMap );
- Property::Value* value = retreivedMap.Find( Toolkit::ImageVisual::Property::URL, Property::STRING );
- if ( value )
- {
- result = value->Get<std::string>();
- }
- }
-
- return result;
-}
-
-// Below functions DEPRECATED_1_0.50 - Return empty Actors
-
-Actor Button::GetButtonImage() const
-{
- DALI_LOG_WARNING("Button::GetButtonImage @DEPRECATED_1_0.50 Returning empty Actor \n");
- return Actor();;
-}
-
-Actor Button::GetSelectedImage() const
-{
- DALI_LOG_WARNING("Button::GetSelectedImage @DEPRECATED_1_0.50 Returning empty Actor \n");
- return Actor();
-}
-