+}
+
+void Button::SetLabel( Actor label )
+{
+ if( mLabel != label )
+ {
+ if( mLabel && mLabel.GetParent() )
+ {
+ mLabel.GetParent().Remove( mLabel );
+ }
+
+ mLabel = label;
+
+ OnLabelSet();
+
+ RelayoutRequest();
+ }
+}
+
+Actor Button::GetLabel() const
+{
+ return mLabel;
+}
+
+Actor& Button::GetLabel()
+{
+ return mLabel;
+}
+
+Actor Button::GetButtonImage() const
+{
+ return mButtonContent;
+}
+
+Actor& Button::GetButtonImage()
+{
+ return mButtonContent;
+}
+
+Actor Button::GetSelectedImage() const
+{
+ return mSelectedContent;
+}
+
+Actor& Button::GetSelectedImage()
+{
+ return mSelectedContent;
+}
+
+Actor Button::GetBackgroundImage() const
+{
+ return mBackgroundContent;
+}
+
+Actor& Button::GetBackgroundImage()
+{
+ return mBackgroundContent;
+}
+
+Actor Button::GetDisabledImage() const
+{
+ return mDisabledContent;
+}
+
+Actor& Button::GetDisabledImage()
+{
+ return mDisabledContent;
+}
+
+Actor Button::GetDisabledSelectedImage() const
+{
+ return mDisabledSelectedContent;
+}
+
+Actor& Button::GetDisabledSelectedImage()
+{
+ return mDisabledSelectedContent;
+}
+
+Actor Button::GetDisabledBackgroundImage() const
+{
+ return mDisabledBackgroundContent;
+}
+
+Actor& Button::GetDisabledBackgroundImage()
+{
+ return mDisabledBackgroundContent;
+}
+
+bool Button::DoAction( BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes )
+{
+ bool ret = false;
+
+ Dali::BaseHandle handle( object );
+
+ Toolkit::Button button = Toolkit::Button::DownCast( handle );
+
+ DALI_ASSERT_ALWAYS( button );
+
+ if( 0 == strcmp( actionName.c_str(), ACTION_BUTTON_CLICK ) )
+ {
+ GetImplementation( button ).DoClickAction( attributes );
+ ret = true;
+ }
+
+ return ret;
+}
+
+void Button::DoClickAction( const PropertyValueContainer& attributes )
+{
+ // Prevents the button signals from doing a recursive loop by sending an action
+ // and re-emitting the signals.
+ if( !mClickActionPerforming )
+ {
+ mClickActionPerforming = true;
+ OnButtonDown();
+ mState = ButtonDown;
+ OnButtonUp();
+ mClickActionPerforming = false;
+ }
+}
+
+void Button::OnButtonStageDisconnection()
+{
+ if( ButtonDown == mState )
+ {
+ if( !mTogglableButton )
+ {
+ Toolkit::Button handle( GetOwner() );
+
+ // Notifies the derived class the button has been released.
+ OnReleased();
+
+ if( mAutoRepeating )
+ {
+ mAutoRepeatingTimer.Reset();
+ }
+ }
+ }