Moved PushButton::SetButtonImage etc to Button base class. 07/43607/5
authorChu Hoang <c.hoang@samsung.com>
Fri, 10 Jul 2015 16:48:13 +0000 (17:48 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 10 Jul 2015 17:17:29 +0000 (18:17 +0100)
Change-Id: I2eb20df5c00597c129ea0688ec3a4a11e42b77e6

automated-tests/src/dali-toolkit/utc-Dali-Button.cpp
automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp
automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp
dali-toolkit/public-api/controls/buttons/button.cpp
dali-toolkit/public-api/controls/buttons/button.h
dali-toolkit/public-api/controls/buttons/check-box-button.cpp
dali-toolkit/public-api/controls/buttons/check-box-button.h
dali-toolkit/public-api/controls/buttons/push-button.cpp
dali-toolkit/public-api/controls/buttons/push-button.h

index 5127cfb..3e7f4cf 100644 (file)
@@ -50,6 +50,27 @@ static bool ButtonCallback( Button button )
   return false;
 }
 
+Image CreateSolidColorImage( const Vector4& color, unsigned int width, unsigned int height )
+{
+  BufferImage imageData = BufferImage::New( width, height, Pixel::RGBA8888 );
+
+  // Create the image
+  PixelBuffer* pixbuf = imageData.GetBuffer();
+  unsigned int size = width * height;
+
+  for( size_t i = 0; i < size; i++ )
+    {
+      pixbuf[i*4+0] = 0xFF * color.r;
+      pixbuf[i*4+1] = 0xFF * color.g;
+      pixbuf[i*4+2] = 0xFF * color.b;
+      pixbuf[i*4+3] = 0xFF * color.a;
+    }
+
+  imageData.Update();
+
+  return imageData;
+}
+
 const Dali::TouchPoint pointDownInside( 0, TouchPoint::Down, 240, 400 );
 const Dali::TouchPoint pointUpInside( 0, TouchPoint::Up, 240, 400 );
 const Dali::TouchPoint pointLeave( 0, TouchPoint::Leave, 240, 400 );
@@ -308,6 +329,60 @@ int UtcDaliButtonSetLabelActorP(void)
   END_TEST;
 }
 
+int UtcDaliButtonSetButtonImage(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliButtonSetButtonImage");
+
+  Image image = CreateSolidColorImage( Color::RED, 10, 10 );
+
+  PushButton pushButton = PushButton::New();
+  Stage::GetCurrent().Add( pushButton );
+
+  application.SendNotification();
+  application.Render();
+
+  pushButton.SetSize( Vector2( 20.0f, 20.0f ) );
+  pushButton.SetButtonImage( image );
+
+  application.SendNotification();
+  application.Render();
+
+  Vector3 size = pushButton.GetCurrentSize();
+
+  DALI_TEST_EQUALS( size.width, 20.f, TEST_LOCATION );
+  DALI_TEST_EQUALS( size.height, 20.f, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliButtonSetSelectedImageP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliButtonSetButtonImage");
+
+  Image image = CreateSolidColorImage( Color::RED, 10, 10 );
+
+  PushButton pushButton = PushButton::New();
+  Stage::GetCurrent().Add( pushButton );
+
+  application.SendNotification();
+  application.Render();
+
+  pushButton.SetSize( Vector2( 20.0f, 20.0f ) );
+  pushButton.SetSelectedImage( image );
+
+  application.SendNotification();
+  application.Render();
+
+  Vector3 size = pushButton.GetCurrentSize();
+
+  DALI_TEST_EQUALS( size.width, 20.f, TEST_LOCATION );
+  DALI_TEST_EQUALS( size.height, 20.f, TEST_LOCATION );
+
+  END_TEST;
+}
+
 int UtcDaliButtonPressedSignalP(void)
 {
   ToolkitTestApplication application;
index f5a2a7c..a8aca48 100644 (file)
@@ -33,27 +33,6 @@ bool CheckBoxButtonClicked( Button button )
   return true;
 }
 
-Image CreateSolidColorImage( const Vector4& color, unsigned int width, unsigned int height )
-{
-  BufferImage imageData = BufferImage::New( width, height, Pixel::RGBA8888 );
-
-  // Create the image
-  PixelBuffer* pixbuf = imageData.GetBuffer();
-  unsigned int size = width * height;
-
-  for( size_t i = 0; i < size; i++ )
-    {
-      pixbuf[i*4+0] = 0xFF * color.r;
-      pixbuf[i*4+1] = 0xFF * color.g;
-      pixbuf[i*4+2] = 0xFF * color.b;
-      pixbuf[i*4+3] = 0xFF * color.a;
-    }
-
-  imageData.Update();
-
-  return imageData;
-}
-
 } // namespace
 
 void checkbox_button_startup(void)
@@ -141,94 +120,6 @@ int UtcDaliCheckBoxButtonDownCastN(void)
   END_TEST;
 }
 
-int UtcDaliCheckBoxButtonSetBackgroundImageP(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliCheckBoxButtonSetBackgroundImageP");
-
-  Image image = CreateSolidColorImage( Color::RED, 10, 10 );
-  ImageActor imageActor = CreateSolidColorActor( Color::RED );
-  imageActor.SetSize( 20, 20 );
-
-  CheckBoxButton checkBoxButton = CheckBoxButton::New();
-
-  checkBoxButton.SetBackgroundImage( image );
-
-  DALI_TEST_CHECK( checkBoxButton.GetBackgroundImage() );
-
-  checkBoxButton.SetBackgroundImage( imageActor );
-
-  DALI_TEST_CHECK( checkBoxButton.GetBackgroundImage() );
-
-  END_TEST;
-}
-
-int UtcDaliCheckBoxButtonSetSelectedImageP(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliCheckBoxButtonSetSelectedImageP");
-
-  Image image = CreateSolidColorImage( Color::RED, 10, 10 );
-  ImageActor imageActor = CreateSolidColorActor( Color::RED );
-  imageActor.SetSize( 20, 20 );
-
-  CheckBoxButton checkBoxButton = CheckBoxButton::New();
-
-  checkBoxButton.SetSelectedImage( image );
-
-  DALI_TEST_CHECK( checkBoxButton.GetSelectedImage() );
-
-  checkBoxButton.SetSelectedImage( imageActor );
-
-  DALI_TEST_CHECK( checkBoxButton.GetSelectedImage() );
-
-  END_TEST;
-}
-
-int UtcDaliCheckBoxButtonSetDisabledBackgroundImageP(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliCheckBoxButtonSetDisabledBackgroundImageP");
-
-  Image image = CreateSolidColorImage( Color::RED, 10, 10 );
-  ImageActor imageActor = CreateSolidColorActor( Color::RED );
-  imageActor.SetSize( 20, 20 );
-
-  CheckBoxButton checkBoxButton = CheckBoxButton::New();
-
-  checkBoxButton.SetDisabledBackgroundImage( image );
-
-  DALI_TEST_CHECK( checkBoxButton.GetDisabledBackgroundImage() );
-
-  checkBoxButton.SetDisabledBackgroundImage( imageActor );
-
-  DALI_TEST_CHECK( checkBoxButton.GetDisabledBackgroundImage() );
-
-  END_TEST;
-}
-
-int UtcDaliCheckBoxButtonSetDisabledSelectedImageP(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliCheckBoxButtonSetDisabledSelectedImageP");
-
-  Image image = CreateSolidColorImage( Color::RED, 10, 10 );
-  ImageActor imageActor = CreateSolidColorActor( Color::RED );
-  imageActor.SetSize( 20, 20 );
-
-  CheckBoxButton checkBoxButton = CheckBoxButton::New();
-
-  checkBoxButton.SetDisabledSelectedImage( image );
-
-  DALI_TEST_CHECK( checkBoxButton.GetDisabledSelectedImage() );
-
-  checkBoxButton.SetDisabledSelectedImage( imageActor );
-
-  DALI_TEST_CHECK( checkBoxButton.GetDisabledSelectedImage() );
-
-  END_TEST;
-}
-
 int UtcDaliCheckBoxButtonSetGetSelected(void)
 {
   ToolkitTestApplication application;
@@ -256,52 +147,3 @@ int UtcDaliCheckBoxButtonSetGetSelected(void)
   DALI_TEST_CHECK( gCheckBoxButtonState );
   END_TEST;
 }
-
-int UtcDaliCheckBoxButtonSetImages(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliCheckBoxButtonSetImages");
-
-  Actor imageActor;
-
-  Image image01 = CreateSolidColorImage( Color::RED, 10, 10 );
-  ImageActor imageActor01 = CreateSolidColorActor( Color::RED );
-  imageActor01.SetSize( 20, 20 );
-
-  Image image02 = CreateSolidColorImage( Color::RED, 30, 30 );
-  ImageActor imageActor02 = CreateSolidColorActor( Color::RED );
-  imageActor02.SetSize( 40, 40 );
-  imageActor02.SetName( "imageActor02" );
-
-  Image image03 = CreateSolidColorImage( Color::RED, 50, 50 );
-  ImageActor imageActor03 = CreateSolidColorActor( Color::RED );
-  imageActor03.SetSize( 60, 60 );
-
-  Image image04 = CreateSolidColorImage( Color::RED, 70, 70 );
-  ImageActor imageActor04 = CreateSolidColorActor( Color::RED );
-  imageActor04.SetSize( 80, 80 );
-
-  Vector3 size;
-  CheckBoxButton checkBoxButton = CheckBoxButton::New();
-  checkBoxButton.SetName( "UtcDaliCheckBoxButtonSetImages" );
-  Stage::GetCurrent().Add( checkBoxButton );
-
-  application.SendNotification();
-  application.Render();
-
-  // Just check if check box button size changes when a bigger image is set.
-
-  checkBoxButton.SetBackgroundImage( image01 );
-
-  application.SendNotification();
-  application.Render();
-
-  size = checkBoxButton.GetCurrentSize();
-
-  DALI_TEST_EQUALS( size.width, 10.f, TEST_LOCATION );
-  DALI_TEST_EQUALS( size.height, 10.f, TEST_LOCATION );
-
-  checkBoxButton.SetBackgroundImage( imageActor01 );
-
-  END_TEST;
-}
index ecf4907..326928b 100644 (file)
@@ -171,150 +171,6 @@ int UtcDaliPushButtonDownCastN(void)
   END_TEST;
 }
 
-int UtcDaliPushButtonSetButtonImage(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliPushButtonSetButtonImage");
-
-  Image image = CreateSolidColorImage( Color::RED, 10, 10 );
-  ImageActor imageActor = CreateSolidColorActor( Color::RED );
-  imageActor.SetSize( 20, 20 );
-
-  PushButton pushButton = PushButton::New();
-  Stage::GetCurrent().Add( pushButton );
-
-  application.SendNotification();
-  application.Render();
-
-  pushButton.SetSize( Vector2( 20.0f, 20.0f ) );
-  pushButton.SetButtonImage( image );
-
-  DALI_TEST_CHECK( pushButton.GetButtonImage() );
-
-  application.SendNotification();
-  application.Render();
-
-  Vector3 size = pushButton.GetCurrentSize();
-
-  DALI_TEST_EQUALS( size.width, 20.f, TEST_LOCATION );
-  DALI_TEST_EQUALS( size.height, 20.f, TEST_LOCATION );
-
-  pushButton.SetButtonImage( imageActor );
-
-  DALI_TEST_CHECK( pushButton.GetButtonImage() );
-  END_TEST;
-}
-
-int UtcDaliPushButtonSetBackgroundImageP(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliPushButtonSetBackgroundImageP");
-
-  Image image = CreateSolidColorImage( Color::RED, 10, 10 );
-  ImageActor imageActor = CreateSolidColorActor( Color::RED );
-  imageActor.SetSize( 20, 20 );
-
-  PushButton pushButton = PushButton::New();
-
-  pushButton.SetBackgroundImage( image );
-
-  DALI_TEST_CHECK( pushButton.GetBackgroundImage() );
-
-  pushButton.SetBackgroundImage( imageActor );
-
-  DALI_TEST_CHECK( pushButton.GetBackgroundImage() );
-
-  END_TEST;
-}
-
-int UtcDaliPushButtonSetSelectedImageP(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliPushButtonSetSelectedImageP");
-
-  Image image = CreateSolidColorImage( Color::RED, 10, 10 );
-  ImageActor imageActor = CreateSolidColorActor( Color::RED );
-  imageActor.SetSize( 20, 20 );
-
-  PushButton pushButton = PushButton::New();
-
-  pushButton.SetSelectedImage( image );
-
-  DALI_TEST_CHECK( pushButton.GetSelectedImage() );
-
-  pushButton.SetSelectedImage( imageActor );
-
-  DALI_TEST_CHECK( pushButton.GetSelectedImage() );
-
-  END_TEST;
-}
-
-int UtcDaliPushButtonSetSelectedBackgroundImageP(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliPushButtonSetSelectedBackgroundImageP");
-
-  Image image = CreateSolidColorImage( Color::RED, 10, 10 );
-  ImageActor imageActor = CreateSolidColorActor( Color::RED );
-  imageActor.SetSize( 20, 20 );
-
-  PushButton pushButton = PushButton::New();
-
-  pushButton.SetSelectedBackgroundImage( image );
-
-  DALI_TEST_CHECK( pushButton.GetSelectedBackgroundImage() );
-
-  pushButton.SetSelectedBackgroundImage( imageActor );
-
-  DALI_TEST_CHECK( pushButton.GetSelectedBackgroundImage() );
-
-  END_TEST;
-}
-
-int UtcDaliPushButtonSetDisabledBackgroundImageP(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliPushButtonSetDisabledBackgroundImageP");
-
-  Image image = CreateSolidColorImage( Color::RED, 10, 10 );
-  ImageActor imageActor = CreateSolidColorActor( Color::RED );
-  imageActor.SetSize( 20, 20 );
-
-  PushButton pushButton = PushButton::New();
-
-  pushButton.SetDisabledBackgroundImage( image );
-
-  DALI_TEST_CHECK( pushButton.GetDisabledBackgroundImage() );
-
-  pushButton.SetDisabledBackgroundImage( imageActor );
-
-  DALI_TEST_CHECK( pushButton.GetDisabledBackgroundImage() );
-
-  END_TEST;
-}
-
-int UtcDaliPushButtonSetDisabledImageP(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliPushButtonSetDisabledImageP");
-
-  Image image = CreateSolidColorImage( Color::RED, 10, 10 );
-  ImageActor imageActor = CreateSolidColorActor( Color::RED );
-  imageActor.SetSize( 20, 20 );
-
-  PushButton pushButton = PushButton::New();
-
-  pushButton.SetDisabledImage( image );
-
-  DALI_TEST_CHECK( pushButton.GetDisabledImage() );
-
-  pushButton.SetDisabledImage( imageActor );
-
-  DALI_TEST_CHECK( pushButton.GetDisabledImage() );
-
-  END_TEST;
-}
-
 int UtcDaliPushButtonSetGetAutoRepeating(void)
 {
   ToolkitTestApplication application;
index 86746c3..c7b7b89 100644 (file)
@@ -23,6 +23,9 @@
 
 #include <dali-toolkit/internal/controls/buttons/button-impl.h>
 
+// EXTERNAL INCLUDES
+#include <dali/public-api/actors/image-actor.h>
+
 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();
index a49a9e0..baad4dc 100644 (file)
@@ -248,6 +248,55 @@ public:
    */
   Actor GetLabel() const;
 
+  /**
+   * @brief Sets the button image.
+   *
+   * @param[in] image The button image.
+   */
+  void SetButtonImage( Image image );
+
+  /**
+   * @brief Sets the background image.
+   *
+   * @param[in] image The background image.
+   */
+  void SetBackgroundImage( Image image );
+
+  /**
+   * @brief Sets the selected image.
+   *
+   * @param[in] image The selected image.
+   */
+  void SetSelectedImage( Image image );
+
+  /**
+   * @brief Sets the selected background image.
+   *
+   * @param[in] image The selected background image.
+   */
+  void SetSelectedBackgroundImage( Image image );
+
+  /**
+   * @brief Sets the disabled background image.
+   *
+   * @param[in] image The disabled background image.
+   */
+  void SetDisabledBackgroundImage( Image image );
+
+  /**
+   * @brief Sets the disabled button image.
+   *
+   * @param[in] image The disabled button image.
+   */
+  void SetDisabledImage( Image image );
+
+  /**
+   * @brief Sets the disabled selected button image.
+   *
+   * @param[in] image The disabled selected button image.
+   */
+  void SetDisabledSelectedImage( Image image );
+
 public: //Signals
 
   /**
index de1c2b0..e2f7f56 100644 (file)
@@ -22,7 +22,6 @@
 // INTERNAL INCLUDES
 
 #include <dali-toolkit/internal/controls/buttons/check-box-button-impl.h>
-#include <dali/public-api/actors/image-actor.h>
 
 namespace Dali
 {
@@ -63,66 +62,6 @@ CheckBoxButton CheckBoxButton::DownCast( BaseHandle handle )
   return Control::DownCast<CheckBoxButton, Internal::CheckBoxButton>(handle);
 }
 
-void CheckBoxButton::SetBackgroundImage( Image image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( ImageActor::New( image ) );
-}
-
-void CheckBoxButton::SetBackgroundImage( Actor image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( image );
-}
-
-Actor CheckBoxButton::GetBackgroundImage() const
-{
-  return Dali::Toolkit::GetImplementation( *this ).GetBackgroundImage();
-}
-
-void CheckBoxButton::SetSelectedImage( Image image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( ImageActor::New( image ) );
-}
-
-void CheckBoxButton::SetSelectedImage( Actor image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( image );
-}
-
-Actor CheckBoxButton::GetSelectedImage() const
-{
-  return Dali::Toolkit::GetImplementation( *this ).GetSelectedImage();
-}
-
-void CheckBoxButton::SetDisabledBackgroundImage( Image image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( ImageActor::New( image ) );
-}
-
-void CheckBoxButton::SetDisabledBackgroundImage( Actor image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( image );
-}
-
-Actor CheckBoxButton::GetDisabledBackgroundImage() const
-{
-  return Dali::Toolkit::GetImplementation( *this ).GetDisabledBackgroundImage();
-}
-
-void CheckBoxButton::SetDisabledSelectedImage( Image image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetDisabledSelectedImage( ImageActor::New( image ) );
-}
-
-void CheckBoxButton::SetDisabledSelectedImage( Actor image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetDisabledSelectedImage( image );
-}
-
-Actor CheckBoxButton::GetDisabledSelectedImage() const
-{
-  return Dali::Toolkit::GetImplementation( *this ).GetDisabledSelectedImage();
-}
-
 CheckBoxButton::CheckBoxButton( Internal::CheckBoxButton& implementation )
 : Button( implementation )
 {
index 9752213..5798ef3 100644 (file)
@@ -91,78 +91,6 @@ public:
    */
   static CheckBoxButton DownCast( BaseHandle handle );
 
-  /**
-   * Sets the background image.
-   *
-   * @param[in] image The background image.
-   */
-  void SetBackgroundImage( Image image );
-
-  /**
-   * @copydoc SetBackgroundImage( Image image )
-   */
-  void SetBackgroundImage( Actor image );
-
-  /**
-   * Gets the background image.
-   * @return An actor with the background image.
-   */
-  Actor GetBackgroundImage() const;
-
-  /**
-   * Sets the selected image.
-   *
-   * @param[in] image The selected image.
-   */
-  void SetSelectedImage( Image image );
-
-  /**
-   * @copydoc SetSelectedImage( Image image )
-   */
-  void SetSelectedImage( Actor image );
-
-  /**
-   * Gets the selected image.
-   * @return An actor with the selected image.
-   */
-  Actor GetSelectedImage() const;
-
-  /**
-   * Sets the disabled background image.
-   *
-   * @param[in] image The disabled background image.
-   */
-  void SetDisabledBackgroundImage( Image image );
-
-  /**
-   * @copydoc SetDisabledBackgroundImage( Image image )
-   */
-  void SetDisabledBackgroundImage( Actor image );
-
-  /**
-   * Gets the disabled background image.
-   * @return An actor with the disabled background image.
-   */
-  Actor GetDisabledBackgroundImage() const;
-
-  /**
-   * Sets the disabled selected image.
-   *
-   * @param[in] image The disabled selected image.
-   */
-  void SetDisabledSelectedImage( Image image );
-
-  /**
-   * @copydoc SetDisabledSelectedImage( Image image )
-   */
-  void SetDisabledSelectedImage( Actor image );
-
-  /**
-   * Gets the disabled selected image.
-   * @return An actor with the disabled selected image.
-   */
-  Actor GetDisabledSelectedImage() const;
-
 public: // Not intended for application developers
 
   /**
index 0ef9698..d3f21d7 100644 (file)
@@ -74,12 +74,6 @@ PushButton PushButton::DownCast( BaseHandle handle )
   return Control::DownCast<PushButton, Internal::PushButton>(handle);
 }
 
-void PushButton::SetButtonImage( Image image )
-{
-  Actor imageActor = ImageActor::New( image );
-  Dali::Toolkit::GetImplementation( *this ).SetButtonImage( imageActor );
-}
-
 void PushButton::SetButtonImage( Actor image )
 {
   Dali::Toolkit::GetImplementation( *this ).SetButtonImage( image );
@@ -90,12 +84,6 @@ Actor PushButton::GetButtonImage() const
   return Dali::Toolkit::GetImplementation( *this ).GetButtonImage();
 }
 
-void PushButton::SetBackgroundImage( Image image )
-{
-  Actor imageActor = ImageActor::New( image );
-  Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( imageActor );
-}
-
 void PushButton::SetBackgroundImage( Actor image )
 {
   Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( image );
@@ -106,13 +94,6 @@ Actor PushButton::GetBackgroundImage() const
   return Dali::Toolkit::GetImplementation( *this ).GetBackgroundImage();
 }
 
-void PushButton::SetSelectedImage( Image image )
-{
-  Actor imageActor = ImageActor::New( image );
-  imageActor.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
-  Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( imageActor );
-}
-
 void PushButton::SetSelectedImage( Actor image )
 {
   Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( image );
@@ -123,11 +104,6 @@ Actor PushButton::GetSelectedImage() const
   return Dali::Toolkit::GetImplementation( *this ).GetSelectedImage();
 }
 
-void PushButton::SetSelectedBackgroundImage( Image image )
-{
-  Dali::Toolkit::GetImplementation( *this ).SetSelectedBackgroundImage( ImageActor::New( image ) );
-}
-
 void PushButton::SetSelectedBackgroundImage( Actor image )
 {
   Dali::Toolkit::GetImplementation( *this ).SetSelectedBackgroundImage( image );
@@ -138,13 +114,6 @@ Actor PushButton::GetSelectedBackgroundImage() const
   return Dali::Toolkit::GetImplementation( *this ).GetSelectedBackgroundImage();
 }
 
-void PushButton::SetDisabledBackgroundImage( Image image )
-{
-  Actor imageActor = ImageActor::New( image );
-  imageActor.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
-  Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( imageActor );
-}
-
 void PushButton::SetDisabledBackgroundImage( Actor image )
 {
   Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( image );
@@ -155,13 +124,6 @@ Actor PushButton::GetDisabledBackgroundImage() const
   return Dali::Toolkit::GetImplementation( *this ).GetDisabledBackgroundImage();
 }
 
-void PushButton::SetDisabledImage( Image image )
-{
-  Actor imageActor = ImageActor::New( image );
-  imageActor.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
-  Dali::Toolkit::GetImplementation( *this ).SetDisabledImage( imageActor );
-}
-
 void PushButton::SetDisabledImage( Actor image )
 {
   Dali::Toolkit::GetImplementation( *this ).SetDisabledImage( image );
index dd3ffb6..a74610a 100644 (file)
@@ -121,12 +121,7 @@ public:
    */
   static PushButton DownCast( BaseHandle handle );
 
-  /**
-   * @brief Sets the button image.
-   *
-   * @param[in] image The button image.
-   */
-  void SetButtonImage( Image image );
+  using Button::SetButtonImage;
 
   /**
    * @brief SetButtonImage
@@ -145,12 +140,7 @@ public:
    */
   Actor GetButtonImage() const;
 
-  /**
-   * @brief Sets the background image.
-   *
-   * @param[in] image The background image.
-   */
-  void SetBackgroundImage( Image image );
+  using Button::SetBackgroundImage;
 
   /**
    * @brief SetBackgroundImage
@@ -169,12 +159,7 @@ public:
    */
   Actor GetBackgroundImage() const;
 
-  /**
-   * @brief Sets the selected image.
-   *
-   * @param[in] image The selected image.
-   */
-  void SetSelectedImage( Image image );
+  using Button::SetSelectedImage;
 
   /**
    * @copydoc SetSelectedImage( Image image )
@@ -188,12 +173,7 @@ public:
    */
   Actor GetSelectedImage() const;
 
-  /**
-   * @brief Sets the selected background image.
-   *
-   * @param[in] image The selected background image.
-   */
-  void SetSelectedBackgroundImage( Image image );
+  using Button::SetSelectedBackgroundImage;
 
   /**
    * @copydoc SetSelectedBackgroundImage( Image image )
@@ -207,12 +187,7 @@ public:
    */
   Actor GetSelectedBackgroundImage() const;
 
-  /**
-   * @brief Sets the disabled background image.
-   *
-   * @param[in] image The disabled background image.
-   */
-  void SetDisabledBackgroundImage( Image image );
+  using Button::SetDisabledBackgroundImage;
 
   /**
    * @copydoc SetDisabledBackgroundImage( Image image )
@@ -226,12 +201,7 @@ public:
    */
   Actor GetDisabledBackgroundImage() const;
 
-  /**
-   * @brief Sets the disabled button image.
-   *
-   * @param[in] image The disabled button image.
-   */
-  void SetDisabledImage( Image image );
+  using Button::SetDisabledImage;
 
   /**
    * @copydoc SetDisabledImage( Image image )