#ifndef __DALI_TOOLKIT_INTERNAL_BUTTON_H__
#define __DALI_TOOLKIT_INTERNAL_BUTTON_H__
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
// INTERNAL INCLUDES
#include <dali/dali.h>
*/
virtual float OnAnimationTimeRequested() const;
+ /**
+ * This method is called when the button is removed from the stage.
+ * Could be reimplemented in subclasses to provide specific behaviour.
+ */
+ virtual void OnButtonStageDisconnection() { }
+
public:
/**
Toolkit::Button::ClickedSignalV2& ClickedSignal();
/**
+ * @copydoc Dali::Toolkit::Button::ToggledSignal()
+ */
+ Toolkit::Button::ToggledSignalV2& ToggledSignal();
+
+ /**
* Connects a callback function with the object's signals.
* @param[in] object The object providing the signal.
* @param[in] tracker Used to disconnect the signal.
*/
virtual void OnControlSizeSet( const Vector3& targetSize );
+ /**
+ * Callback received when the button is disconnected from the stage.
+ * It resets the button status.
+ */
+ void OnControlStageDisconnection();
+
private:
/**
private:
- /**
- * Callback received when the button is disconected from the stage.
- * It resets the button status.
- */
- void OnStageDisconnection();
-
-private:
-
// Undefined
Button( const Button& );
ButtonPainterPtr mPainter; ///< Pointer to a ButtonPainter base class.
Toolkit::Button::ClickedSignalV2 mClickedSignalV2; ///< Signal emitted when the button is clicked.
+ Toolkit::Button::ToggledSignalV2 mToggledSignalV2; ///< Signal emitted when the button is toggled.
TapGestureDetector mTapDetector;
};