utc-Dali-ScrollViewEffect.cpp
utc-Dali-TextInput.cpp
utc-Dali-StyleManager.cpp
+ utc-Dali-RadioButton.cpp
)
# Append list of test harness files (Won't get parsed for test cases)
--- /dev/null
+/*
+ * 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.
+ *
+ */
+
+#include <iostream>
+#include <stdlib.h>
+#include <dali-toolkit-test-suite-utils.h>
+#include <dali-toolkit/dali-toolkit.h>
+#include <dali/integration-api/events/touch-event-integ.h>
+
+
+using namespace Dali;
+using namespace Dali::Toolkit;
+
+void dali_radio_button_startup(void)
+{
+ test_return_value = TET_UNDEF;
+}
+
+void dali_radio_button_cleanup(void)
+{
+ test_return_value = TET_PASS;
+}
+
+namespace
+{
+
+static bool gObjectCreatedCallBackCalled;
+
+static void TestCallback(BaseHandle handle)
+{
+ gObjectCreatedCallBackCalled = true;
+}
+
+}
+
+int UtcDaliRadioButtonNew(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliRadioButtonNew");
+
+ // Create the Slider actor
+ RadioButton radioButton;
+
+ DALI_TEST_CHECK( !radioButton );
+
+ radioButton = RadioButton::New();
+
+ DALI_TEST_CHECK( radioButton );
+
+ RadioButton radioButton2(radioButton);
+
+ DALI_TEST_CHECK( radioButton2 == radioButton );
+
+ //Additional check to ensure object is created by checking if it's registered
+ ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
+ DALI_TEST_CHECK( registry );
+
+ gObjectCreatedCallBackCalled = false;
+ registry.ObjectCreatedSignal().Connect( &TestCallback );
+ {
+ RadioButton radioButton = RadioButton::New();
+ }
+ DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
+ END_TEST;
+}
+
+int UtcDaliRadioButtonDestructor(void)
+{
+ ToolkitTestApplication application;
+
+ RadioButton* radioButton = new RadioButton();
+ delete radioButton;
+
+ DALI_TEST_CHECK( true );
+ END_TEST;
+}
+
+int UtcDaliRadioButtonDownCast(void)
+{
+ ToolkitTestApplication application;
+
+ Handle handle = RadioButton::New();
+
+ RadioButton radioButton = RadioButton::DownCast( handle );
+
+ DALI_TEST_CHECK( radioButton == handle );
+ END_TEST;
+}
+
+int UtcDaliRadioButtonLabelActor(void)
+{
+ ToolkitTestApplication application;
+
+ TextView actor1 = TextView::New( "test actor 1" );
+
+ RadioButton radioButton = RadioButton::New( actor1 );
+ DALI_TEST_CHECK( actor1 == radioButton.GetLabel() );
+
+ TextView actor2 = TextView::New( "test actor 2" );
+ radioButton.SetLabel( actor2 );
+ DALI_TEST_CHECK( actor2 == radioButton.GetLabel() );
+
+ END_TEST;
+}
+
+int UtcDaliRadioButtonActive(void)
+{
+ ToolkitTestApplication application;
+
+ RadioButton radioButton = RadioButton::New();
+
+ // Default active
+ DALI_TEST_CHECK( radioButton.IsActive() == false );
+
+ // False to true
+ radioButton.ToggleState();
+ DALI_TEST_CHECK( radioButton.IsActive() == true );
+
+ // True to false
+ radioButton.ToggleState();
+ DALI_TEST_CHECK( radioButton.IsActive() == false );
+
+ // False
+ radioButton.SetActive( false );
+ DALI_TEST_CHECK( radioButton.IsActive() == false );
+
+ // True
+ radioButton.SetActive( true );
+ DALI_TEST_CHECK( radioButton.IsActive() == true );
+
+ // False
+ radioButton.SetActive( false );
+ DALI_TEST_CHECK( radioButton.IsActive() == false );
+
+ END_TEST;
+}
+
+int UtcDaliRadioButtonActiveProperty(void)
+{
+ ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
+ tet_infoline(" UtcDaliRadioButtonActiveProperty");
+
+ // Create the RadioButton actor
+ RadioButton radioButton = RadioButton::New();
+ Stage::GetCurrent().Add( radioButton );
+ radioButton.SetParentOrigin(ParentOrigin::TOP_LEFT);
+ radioButton.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ radioButton.SetPosition( 0.0f, 0.0f );
+
+ // Default active
+ DALI_TEST_CHECK( radioButton.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
+
+ // Setting false active
+ radioButton.SetProperty( RadioButton::PROPERTY_ACTIVE, false );
+ DALI_TEST_CHECK( radioButton.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
+
+ // Setting true active
+ radioButton.SetProperty( RadioButton::PROPERTY_ACTIVE, true );
+ DALI_TEST_CHECK( radioButton.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == true );
+
+ // Setting false again
+ radioButton.SetProperty( RadioButton::PROPERTY_ACTIVE, false );
+ DALI_TEST_CHECK( radioButton.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
+
+ // Test selecting radio buttons
+ RadioButton radioButton2 = RadioButton::New( "label" );
+ radioButton2.SetParentOrigin(ParentOrigin::TOP_LEFT);
+ radioButton2.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ radioButton2.SetPosition( 0.0f, 0.0f );
+
+ RadioButton radioButton3 = RadioButton::New( "label" );
+ radioButton3.SetParentOrigin(ParentOrigin::TOP_LEFT);
+ radioButton3.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ radioButton3.SetPosition( 0.0f, 40.0f );
+
+ Actor radioGroup = Actor::New();
+ Stage::GetCurrent().Add( radioGroup );
+ radioGroup.SetParentOrigin(ParentOrigin::TOP_LEFT);
+ radioGroup.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ radioGroup.SetPosition( 0.0f, 0.0f );
+ radioGroup.SetSize( 400.0f, 400.0 );
+
+ radioGroup.Add( radioButton2 );
+ radioGroup.Add( radioButton3 );
+
+ application.SendNotification();
+ application.Render();
+
+ // Simulate touch events
+ DALI_TEST_CHECK( radioButton2.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
+ DALI_TEST_CHECK( radioButton3.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
+
+ // Select first radio
+ {
+ Dali::Integration::TouchEvent event = Dali::Integration::TouchEvent();
+
+ const Dali::TouchPoint pointUp( 0, TouchPoint::Up, 10.0f, 10.0f );
+ event.AddPoint( pointUp );
+
+ application.ProcessEvent( event );
+
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK( radioButton2.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == true );
+ DALI_TEST_CHECK( radioButton3.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
+ }
+
+ // Select an already selected radio
+ {
+ Dali::Integration::TouchEvent event = Dali::Integration::TouchEvent();
+
+ const Dali::TouchPoint pointDown( 0, TouchPoint::Up, 10.0f, 10.0f );
+ event.AddPoint( pointDown );
+
+ application.ProcessEvent( event );
+
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK( radioButton2.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == true );
+ DALI_TEST_CHECK( radioButton3.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
+ }
+
+ // Select second radio
+ {
+ Dali::Integration::TouchEvent event = Dali::Integration::TouchEvent();
+
+ const Dali::TouchPoint pointDown( 0, TouchPoint::Up, 10.0f, 50.0f );
+ event.AddPoint( pointDown );
+
+ application.ProcessEvent( event );
+
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK( radioButton2.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
+ DALI_TEST_CHECK( radioButton3.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == true );
+ }
+
+ // Select outside radio group
+ {
+ Dali::Integration::TouchEvent event = Dali::Integration::TouchEvent();
+
+ const Dali::TouchPoint pointDown( 0, TouchPoint::Up, 10.0f, 500.0f );
+ event.AddPoint( pointDown );
+
+ application.ProcessEvent( event );
+
+ application.SendNotification();
+ application.Render();
+
+ DALI_TEST_CHECK( radioButton2.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
+ DALI_TEST_CHECK( radioButton3.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == true );
+ }
+
+ END_TEST;
+}
TypeRegistration typeRegistration( typeid(Toolkit::Button), typeid(Toolkit::Control), Create );
SignalConnectorType signalConnector1( typeRegistration, Toolkit::Button::SIGNAL_CLICKED, &Button::DoConnectSignal );
+SignalConnectorType signalConnector2( typeRegistration, Toolkit::Button::SIGNAL_TOGGLED, &Button::DoConnectSignal );
PropertyRegistration property1( typeRegistration, "dimmed", Toolkit::Button::PROPERTY_DIMMED, Property::BOOLEAN, &Button::SetProperty, &Button::GetProperty );
return mClickedSignalV2;
}
+Toolkit::Button::ToggledSignalV2& Button::ToggledSignal()
+{
+ return mToggledSignalV2;
+}
+
bool Button::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
{
Dali::BaseHandle handle( object );
{
button.ClickedSignal().Connect( tracker, functor );
}
+ else if( Dali::Toolkit::Button::SIGNAL_TOGGLED == signalName )
+ {
+ button.ToggledSignal().Connect( tracker, functor );
+ }
else
{
// signalName does not match any signal
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.
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;
};
// Notifies the painter the checkbox has been checked.
GetCheckBoxButtonPainter( mPainter )->Checked( handle );
- // Emit signal.
- mClickedSignalV2.Emit( handle );
+ // Raise toggled signal
+ mToggledSignalV2.Emit( handle, mChecked );
}
}
TypeRegistration typeRegistration( typeid(Toolkit::PushButton), typeid(Toolkit::Button), Create );
-SignalConnectorType signalConnector1( typeRegistration, Toolkit::PushButton::SIGNAL_TOGGLED , &PushButton::DoConnectSignal );
-SignalConnectorType signalConnector2( typeRegistration, Toolkit::PushButton::SIGNAL_PRESSED , &PushButton::DoConnectSignal );
-SignalConnectorType signalConnector3( typeRegistration, Toolkit::PushButton::SIGNAL_RELEASED, &PushButton::DoConnectSignal );
+SignalConnectorType signalConnector1( typeRegistration, Toolkit::PushButton::SIGNAL_PRESSED , &PushButton::DoConnectSignal );
+SignalConnectorType signalConnector2( typeRegistration, Toolkit::PushButton::SIGNAL_RELEASED, &PushButton::DoConnectSignal );
TypeAction action1( typeRegistration, Toolkit::PushButton::ACTION_PUSH_BUTTON_CLICK, &PushButton::DoAction );
return mFadeOutButtonImage;
}
-Toolkit::PushButton::ToggledSignalV2& PushButton::ToggledSignal()
-{
- return mToggledSignalV2;
-}
-
Toolkit::PushButton::PressedSignalV2& PushButton::PressedSignal()
{
return mPressedSignalV2;
// Notifies the painter the button has been toggled.
GetPushButtonPainter( mPainter )->Toggled( handle );
- //Emit signal.
+ // Emit signal.
mToggledSignalV2.Emit( handle, mToggled );
}
else
// Signals
/**
- * @copydoc Dali::Toolkit::PushButton::ToggledSignal()
- */
- Toolkit::PushButton::ToggledSignalV2& ToggledSignal();
-
- /**
* @copydoc Dali::Toolkit::PushButton::PressedSignal()
*/
Toolkit::PushButton::PressedSignalV2& PressedSignal();
bool mToggled; ///< Stores the toggle state.
// Signals
- Toolkit::PushButton::ToggledSignalV2 mToggledSignalV2; ///< Signal emitted when the button is toggled.
Toolkit::PushButton::PressedSignalV2 mPressedSignalV2; ///< Signal emitted when the button is pressed.
Toolkit::PushButton::ReleasedSignalV2 mReleasedSignalV2; ///< Signal emitted when the button is released.
return Toolkit::RadioButton::New();
}
-TypeRegistration typeRegistration(typeid (Toolkit::RadioButton ), typeid (Toolkit::Button ), Create);
+TypeRegistration typeRegistration( typeid( Toolkit::RadioButton ), typeid( Toolkit::Button ), Create);
PropertyRegistration property1(typeRegistration, "active", Toolkit::RadioButton::PROPERTY_ACTIVE, Property::BOOLEAN, &RadioButton::SetProperty, &RadioButton::GetProperty);
PropertyRegistration property2(typeRegistration, "label-actor", Toolkit::RadioButton::PROPERTY_LABEL_ACTOR, Property::MAP, &RadioButton::SetProperty, &RadioButton::GetProperty);
-}
-namespace
-{
const char* const INACTIVE_BUTTON_IMAGE_DIR = DALI_IMAGE_DIR "radio-button-inactive.png";
const char* const ACTIVE_BUTTON_IMAGE_DIR = DALI_IMAGE_DIR "radio-button-active.png";
-const Vector3 IMAGE_WIDTH(16.f, 0.f, 0.f);
-const Vector3 DISTANCE_BETWEEN_IMAGE_AND_LABEL(5.f, 0.f, 0.f);
+
+const Vector3 DISTANCE_BETWEEN_IMAGE_AND_LABEL(5.0f, 0.0f, 0.0f);
}
Dali::Toolkit::RadioButton RadioButton::New()
}
RadioButton::RadioButton()
- : Button(),
- mActive(false)
+ : mActive(false)
{
- mInactiveImage = Dali::Image::New(INACTIVE_BUTTON_IMAGE_DIR);
- mActiveImage = Dali::Image::New(ACTIVE_BUTTON_IMAGE_DIR);
+ mInactiveImage = Dali::Image::New( INACTIVE_BUTTON_IMAGE_DIR );
+ mActiveImage = Dali::Image::New( ACTIVE_BUTTON_IMAGE_DIR );
- mImageActor = Dali::ImageActor::New(mInactiveImage);
- mLabel = Actor::New();
+ mRadioIcon = Dali::ImageActor::New( mInactiveImage );
}
RadioButton::~RadioButton()
void RadioButton::SetLabel(const std::string& label)
{
- mLabel.Reset();
- mLabel = Actor::New();
-
- Toolkit::TextView textView = Toolkit::TextView::New(label);
- textView.SetWidthExceedPolicy(Toolkit::TextView::ShrinkToFit); // Make sure our text always fits inside the button
- textView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ TextActor textActor = TextActor::DownCast( mLabel );
+ if( textActor )
+ {
+ textActor.SetText( label );
+ }
+ else
+ {
+ Toolkit::TextView newTextView = Toolkit::TextView::New( label );
+ SetLabel( newTextView );
+ }
- mLabel.Add(textView);
+ RelayoutRequest();
}
void RadioButton::SetLabel(Actor label)
{
if( mLabel != label )
{
- Self().Remove(mLabel);
+ if( mLabel )
+ {
+ mRadioIcon.Remove( mLabel );
+ }
+
+ if( label )
+ {
+ label.SetParentOrigin( ParentOrigin::CENTER_RIGHT );
+ label.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ label.MoveBy( DISTANCE_BETWEEN_IMAGE_AND_LABEL );
+ mRadioIcon.Add( label );
+ }
+
mLabel = label;
- Self().Add(mLabel);
+
+ RelayoutRequest();
}
}
if( active )
{
Actor parent = Self().GetParent();
-
if( parent )
{
for( unsigned int i = 0; i < parent.GetChildCount(); ++i )
}
}
}
+
mActive = true;
- mImageActor.SetImage(mActiveImage);
+ mRadioIcon.SetImage(mActiveImage);
}
else
{
mActive = false;
- mImageActor.SetImage(mInactiveImage);
+ mRadioIcon.SetImage(mInactiveImage);
}
+
+ // Raise toggled signal
+ Toolkit::RadioButton handle( GetOwner() );
+ mToggledSignalV2.Emit( handle, mActive );
+
+ RelayoutRequest();
}
}
SetActive(!mActive);
}
+void RadioButton::OnRelaidOut( Vector2 /*size*/, ActorSizeContainer& container )
+{
+ Vector3 newSize( mRadioIcon.GetNaturalSize() );
+
+ if( mLabel )
+ {
+ // Offset the label from the radio button image
+ newSize.width += DISTANCE_BETWEEN_IMAGE_AND_LABEL.width;
+
+ // Find the size of the control using size negotiation
+ Vector3 actorNaturalSize( mLabel.GetNaturalSize() );
+ Control::Relayout( mLabel, Vector2( actorNaturalSize.width, actorNaturalSize.height ), container );
+
+ Vector3 actorSize( mLabel.GetSize() );
+ newSize.width += actorSize.width;
+ newSize.height = std::max( newSize.height, actorSize.height );
+ }
+
+ Self().SetSize( newSize );
+}
+
void RadioButton::OnInitialize()
{
- mImageActor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- Self().Add(mImageActor);
+ mRadioIcon.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ mRadioIcon.SetParentOrigin( ParentOrigin::CENTER_LEFT );
+ Self().Add( mRadioIcon );
- mLabel.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- mLabel.MoveBy(IMAGE_WIDTH + DISTANCE_BETWEEN_IMAGE_AND_LABEL);
- Self().Add(mLabel);
+ RelayoutRequest();
}
void RadioButton::OnButtonUp()
{
- ToggleState();
+ // Don't allow selection on an already active radio button
+ if( !mActive )
+ {
+ ToggleState();
+ }
}
void RadioButton::SetProperty(BaseObject* object, Property::Index propertyIndex, const Property::Value& value)
{
- Toolkit::RadioButton radioButton = Toolkit::RadioButton::DownCast(Dali::BaseHandle(object));
+ Toolkit::RadioButton radioButton = Toolkit::RadioButton::DownCast( Dali::BaseHandle( object ) );
if( radioButton )
{
- RadioButton & radioButtonImpl(GetImplementation(radioButton));
+ RadioButton& radioButtonImpl( GetImplementation( radioButton ) );
switch ( propertyIndex )
{
case Toolkit::RadioButton::PROPERTY_ACTIVE:
{
- radioButtonImpl.SetActive(value.Get< bool >( ));
+ radioButtonImpl.SetActive( value.Get< bool >( ) );
break;
}
case Toolkit::RadioButton::PROPERTY_LABEL_ACTOR:
{
- radioButtonImpl.SetLabel(Scripting::NewActor(value.Get< Property::Map >( )));
+ radioButtonImpl.SetLabel( Scripting::NewActor( value.Get< Property::Map >( ) ) );
break;
}
}
{
Property::Value value;
- Toolkit::RadioButton radioButton = Toolkit::RadioButton::DownCast(Dali::BaseHandle(object));
+ Toolkit::RadioButton radioButton = Toolkit::RadioButton::DownCast( Dali::BaseHandle(object) );
if( radioButton )
{
- RadioButton & radioButtonImpl(GetImplementation(radioButton));
+ RadioButton& radioButtonImpl( GetImplementation( radioButton ) );
switch ( propertyIndex )
{
case Toolkit::RadioButton::PROPERTY_LABEL_ACTOR:
{
Property::Map map;
- Scripting::CreatePropertyMap(radioButtonImpl.mLabel, map);
+ Scripting::CreatePropertyMap( radioButtonImpl.mLabel, map );
value = map;
break;
}
}
return value;
-}
\ No newline at end of file
+}
*/
void ToggleState();
+ /**
+ * @copydoc Dali::Toolkit::Control::OnRelaidOut(Vector2 size, ActorSizeContainer& container)
+ */
+ virtual void OnRelaidOut( Vector2 size, ActorSizeContainer& container );
+
public:
// Properties
Image mInactiveImage; ///< Stores the inactive image
Image mActiveImage; ///< Stores the active image
- ImageActor mImageActor; ///< Stores the current image
+ ImageActor mRadioIcon; ///< Stores the current image
Actor mLabel; ///< Stores the button label
bool mActive; ///< Stores the active state
} ;
} // namespace Toolkit
} // namespace Dali
-#endif // __DALI_TOOLKIT_INTERNAL_RADIO_BUTTON_H__
\ No newline at end of file
+#endif // __DALI_TOOLKIT_INTERNAL_RADIO_BUTTON_H__
{
const char* const Button::SIGNAL_CLICKED = "clicked";
+const char* const Button::SIGNAL_TOGGLED = "toggled";
Button::Button()
{}
return Dali::Toolkit::GetImplementation( *this ).ClickedSignal();
}
+Button::ToggledSignalV2& Button::ToggledSignal()
+{
+ return Dali::Toolkit::GetImplementation( *this ).ToggledSignal();
+}
+
Button::Button( Internal::Button& implementation )
: Control( implementation )
{
// Signal Names
static const char* const SIGNAL_CLICKED; ///< name "clicked"
+ static const char* const SIGNAL_TOGGLED; ///< name "toggled"
// Properties
static const Property::Index PROPERTY_DIMMED; ///< name "dimmed", @see SetDimmed(), type BOOLEAN
typedef SignalV2< bool ( Button ) > ClickedSignalV2;
/**
+ * @brief Button toggled signal type
+ */
+ typedef SignalV2< bool ( Button, bool ) > ToggledSignalV2;
+
+ /**
* @brief Signal emitted when the button is touched and the touch point doesn't leave the boundary of the button.
*/
ClickedSignalV2& ClickedSignal();
+ /**
+ * @brief Signal emitted when the button's state is toggled.
+ */
+ ToggledSignalV2& ToggledSignal();
+
public: // Not intended for application developers
/**
namespace Toolkit
{
-const char* const PushButton::SIGNAL_TOGGLED = "toggled";
const char* const PushButton::SIGNAL_PRESSED = "pressed";
const char* const PushButton::SIGNAL_RELEASED = "released";
return Dali::Toolkit::GetImplementation( *this ).GetLabelText();
}
-PushButton::ToggledSignalV2& PushButton::ToggledSignal()
-{
- return Dali::Toolkit::GetImplementation( *this ).ToggledSignal();
-}
-
PushButton::PressedSignalV2& PushButton::PressedSignal()
{
return Dali::Toolkit::GetImplementation( *this ).PressedSignal();
public:
//Signal Names
- static const char* const SIGNAL_TOGGLED; ///< name "toggled"
static const char* const SIGNAL_PRESSED; ///< name "pressed"
static const char* const SIGNAL_RELEASED; ///< name "released"
public: //Signals
- /// @brief PushButton Toggled signal type.
- typedef SignalV2< bool ( Button, bool ) > ToggledSignalV2;
-
/// @brief PushButton Pressed signal type.
typedef SignalV2< bool ( Button ) > PressedSignalV2;
typedef SignalV2< bool ( Button ) > ReleasedSignalV2;
/**
- * @brief Signal emitted when the \e toggle property is set and the button is touched.
- */
- ToggledSignalV2& ToggledSignal();
-
- /**
* @brief Signal emitted when the button is touched.
*/
PressedSignalV2& PressedSignal();
*
* Radio buttons are designed to select one of many option at the same time.
*
- * Every button have its own \e label and \e state, which can be modified by RadioButton::SetLabel and RadioBUtton::SetActive.
+ * Every button have its own \e label and \e state, which can be modified by RadioButton::SetLabel and RadioButton::SetActive.
*
* RadioButton can change its current state using RadioButton::ToggleState.
*
* @param[in] internal A pointer to the internal CustomActor.
*/
RadioButton(Dali::Internal::CustomActor* internal);
-} ;
+
+};
} // namespace Toolkit