1 #ifndef __DALI_TOOLKIT_INTERNAL_PUSH_BUTTON_H__
2 #define __DALI_TOOLKIT_INTERNAL_PUSH_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/common/dali-vector.h>
25 #include <dali-toolkit/public-api/controls/buttons/push-button.h>
26 #include "button-impl.h"
38 * PushButton implementation class.
40 * \sa Dali::Toolkit::PushButton
42 class PushButton : public Button
47 * Create a new PushButton.
48 * @return A smart-pointer to the newly allocated PushButton.
50 static Dali::Toolkit::PushButton New();
52 protected: // From Button
55 * Sets the Leave signal.
57 virtual void OnButtonInitialize();
59 protected: // From Control
62 * @copydoc Control::GetNaturalSize()
64 virtual Vector3 GetNaturalSize();
67 * Construct a new PushButton.
72 * A reference counted object may only be deleted by calling Unreference()
74 virtual ~PushButton();
79 PushButton( const PushButton& );
82 PushButton& operator=( const PushButton& );
85 } // namespace Internal
87 // Helpers for public-api forwarding methods
89 inline Toolkit::Internal::PushButton& GetImplementation( Toolkit::PushButton& button )
91 DALI_ASSERT_ALWAYS( button );
93 Dali::RefObject& handle = button.GetImplementation();
95 return static_cast<Toolkit::Internal::PushButton&>( handle );
98 inline const Toolkit::Internal::PushButton& GetImplementation( const Toolkit::PushButton& button )
100 DALI_ASSERT_ALWAYS( button );
102 const Dali::RefObject& handle = button.GetImplementation();
104 return static_cast<const Toolkit::Internal::PushButton&>( handle );
107 } // namespace Toolkit
111 #endif // __DALI_TOOLKIT_INTERNAL_PUSH_BUTTON_H__