1 #ifndef __DALI_TOOLKIT_INTERNAL_RADIO_BUTTON_H__
2 #define __DALI_TOOLKIT_INTERNAL_RADIO_BUTTON_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/actors/image-actor.h>
23 #include <dali/public-api/common/dali-vector.h>
26 #include <dali-toolkit/public-api/controls/buttons/radio-button.h>
27 #include <dali-toolkit/public-api/controls/table-view/table-view.h>
28 #include "button-impl.h"
38 * RadioButton implementation class.
40 * \sa Dali::Toolkit::RadioButton
42 class RadioButton: public Button
47 * Create a new RadioButton.
49 * @return A smart-pointer to the newly allocated RadioButton.
51 static Dali::Toolkit::RadioButton New();
56 * Construct a new RadioButton.
61 * A reference counted object may only be deleted by calling Unreference()
63 virtual ~RadioButton();
65 private: // From Button
68 * @copydoc Toolkit::Internal::Button::OnButtonInitialize()
70 virtual void OnButtonInitialize();
73 * @copydoc Toolkit::Internal::Button::OnButtonUp()
75 virtual void OnButtonUp();
78 * @copydoc Toolkit::Internal::Button::OnSelected()
80 virtual bool OnSelected();
83 * @copydoc Toolkit::Internal::Button::OnLabelSet()
85 virtual void OnLabelSet();
90 RadioButton( const RadioButton& origin );
93 RadioButton& operator=( const RadioButton& origin );
96 } // namespace Internal
98 // Helpers for public-api forwarding methods
100 inline Toolkit::Internal::RadioButton& GetImplementation(Toolkit::RadioButton& button)
102 DALI_ASSERT_ALWAYS(button);
104 Dali::RefObject& handle = button.GetImplementation();
106 return static_cast<Toolkit::Internal::RadioButton&> (handle);
109 inline const Toolkit::Internal::RadioButton& GetImplementation(const Toolkit::RadioButton& button)
111 DALI_ASSERT_ALWAYS(button);
113 const Dali::RefObject& handle = button.GetImplementation();
115 return static_cast<const Toolkit::Internal::RadioButton&> (handle);
118 } // namespace Toolkit
121 #endif // __DALI_TOOLKIT_INTERNAL_RADIO_BUTTON_H__