X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fbuttons%2Fbutton.cpp;h=c7b7b89de40b8d2fd91964fb6c8d0b329c104e11;hp=86746c3bd37008719a69e7696f23fa22dd28640c;hb=6c8eb158ad2fb68a20bdcfabf8e07dd017da0528;hpb=7d1d83b6d0af227e5887cad6121344fe0ea2b145 diff --git a/dali-toolkit/public-api/controls/buttons/button.cpp b/dali-toolkit/public-api/controls/buttons/button.cpp index 86746c3..c7b7b89 100644 --- a/dali-toolkit/public-api/controls/buttons/button.cpp +++ b/dali-toolkit/public-api/controls/buttons/button.cpp @@ -23,6 +23,9 @@ #include +// EXTERNAL INCLUDES +#include + namespace Dali { @@ -140,6 +143,51 @@ Actor Button::GetLabel() const return Dali::Toolkit::GetImplementation( *this ).GetLabel(); } +void Button::SetButtonImage( Image image ) +{ + Actor imageActor = ImageActor::New( image ); + Dali::Toolkit::GetImplementation( *this ).SetButtonImage( imageActor ); +} + +void Button::SetBackgroundImage( Image image ) +{ + Actor imageActor = ImageActor::New( image ); + Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( imageActor ); +} + +void Button::SetSelectedImage( Image image ) +{ + Actor imageActor = ImageActor::New( image ); + imageActor.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); + Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( imageActor ); +} + +void Button::SetSelectedBackgroundImage( Image image ) +{ + Dali::Toolkit::GetImplementation( *this ).SetSelectedBackgroundImage( ImageActor::New( image ) ); +} + +void Button::SetDisabledBackgroundImage( Image image ) +{ + Actor imageActor = ImageActor::New( image ); + imageActor.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); + Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( imageActor ); +} + +void Button::SetDisabledImage( Image image ) +{ + Actor imageActor = ImageActor::New( image ); + imageActor.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); + Dali::Toolkit::GetImplementation( *this ).SetDisabledImage( imageActor ); +} + +void Button::SetDisabledSelectedImage( Image image ) +{ + Actor imageActor = ImageActor::New( image ); + imageActor.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); + Dali::Toolkit::GetImplementation( *this ).SetDisabledSelectedImage( imageActor ); +} + Button::ButtonSignalType& Button::PressedSignal() { return Dali::Toolkit::GetImplementation( *this ).PressedSignal();