{
public:
// PushButton Pressed
- typedef SignalV2< bool ( Button ) > PressedSignalV2;
+ typedef Signal< bool ( Button ) > PressedSignalType;
- PressedSignalV2& PressedSignal();
+ PressedSignalType& PressedSignal();
/**
* Default constructor.
/**
* @return the pressed signal.
*/
- Toolkit::TETButton::PressedSignalV2& PressedSignal();
+ Toolkit::TETButton::PressedSignalType& PressedSignal();
/**
* Callback called when an interrupt events is received.
*/
void OnButtonDown();
- Toolkit::TETButton::PressedSignalV2 mPressedSignal; ///< Signal emitted when the button is pressed.
+ Toolkit::TETButton::PressedSignalType mPressedSignal; ///< Signal emitted when the button is pressed.
};
} // namespace Internal
return Control::DownCast<TETButton, Internal::TETButton>(handle);
}
-TETButton::PressedSignalV2& TETButton::PressedSignal()
+TETButton::PressedSignalType& TETButton::PressedSignal()
{
TETButton button( *this );
DALI_ASSERT_ALWAYS( button );
return tetButton;
}
-Toolkit::TETButton::PressedSignalV2& TETButton::PressedSignal()
+Toolkit::TETButton::PressedSignalType& TETButton::PressedSignal()
{
return mPressedSignal;
}
PushButton button = PushButton::New();
Stage::GetCurrent().Add( button );
- // PushButton::PROPERTY_AUTO_REPEATING
+ // Button::PROPERTY_AUTO_REPEATING
button.SetAutoRepeating( false );
- DALI_TEST_CHECK( ! button.GetProperty< bool >( PushButton::PROPERTY_AUTO_REPEATING ) );
- button.SetProperty( PushButton::PROPERTY_AUTO_REPEATING, true );
+ DALI_TEST_CHECK( ! button.GetProperty< bool >( Button::PROPERTY_AUTO_REPEATING ) );
+ button.SetProperty( Button::PROPERTY_AUTO_REPEATING, true );
DALI_TEST_CHECK( button.IsAutoRepeating() ) ;
- DALI_TEST_CHECK( button.GetProperty< bool >( PushButton::PROPERTY_AUTO_REPEATING ) );
+ DALI_TEST_CHECK( button.GetProperty< bool >( Button::PROPERTY_AUTO_REPEATING ) );
- // PushButton::PROPERTY_INITIAL_AUTO_REPEATING_DELAY
+ // Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY
button.SetInitialAutoRepeatingDelay( 10.0f );
- DALI_TEST_EQUALS( 10.0f, button.GetProperty< float >( PushButton::PROPERTY_INITIAL_AUTO_REPEATING_DELAY ), TEST_LOCATION );
- button.SetProperty( PushButton::PROPERTY_INITIAL_AUTO_REPEATING_DELAY, 25.0f );
+ DALI_TEST_EQUALS( 10.0f, button.GetProperty< float >( Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY ), TEST_LOCATION );
+ button.SetProperty( Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY, 25.0f );
DALI_TEST_EQUALS( 25.0f, button.GetInitialAutoRepeatingDelay(), TEST_LOCATION );
- DALI_TEST_EQUALS( 25.0f, button.GetProperty< float >( PushButton::PROPERTY_INITIAL_AUTO_REPEATING_DELAY ), TEST_LOCATION );
+ DALI_TEST_EQUALS( 25.0f, button.GetProperty< float >( Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY ), TEST_LOCATION );
- // PushButton::PROPERTY_NEXT_AUTO_REPEATING_DELAY
+ // Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY
button.SetNextAutoRepeatingDelay( 3.0f );
- DALI_TEST_EQUALS( 3.0f, button.GetProperty< float >( PushButton::PROPERTY_NEXT_AUTO_REPEATING_DELAY ), TEST_LOCATION );
- button.SetProperty( PushButton::PROPERTY_NEXT_AUTO_REPEATING_DELAY, 4.0f );
+ DALI_TEST_EQUALS( 3.0f, button.GetProperty< float >( Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY ), TEST_LOCATION );
+ button.SetProperty( Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY, 4.0f );
DALI_TEST_EQUALS( 4.0f, button.GetNextAutoRepeatingDelay(), TEST_LOCATION );
- DALI_TEST_EQUALS( 4.0f, button.GetProperty< float >( PushButton::PROPERTY_NEXT_AUTO_REPEATING_DELAY ), TEST_LOCATION );
+ DALI_TEST_EQUALS( 4.0f, button.GetProperty< float >( Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY ), TEST_LOCATION );
- // PushButton::PROPERTY_TOGGLABLE
+ // Button::PROPERTY_TOGGLABLE
button.SetToggleButton( false );
- DALI_TEST_CHECK( ! button.GetProperty< bool >( PushButton::PROPERTY_TOGGLABLE ) );
- button.SetProperty( PushButton::PROPERTY_TOGGLABLE, true );
+ DALI_TEST_CHECK( ! button.GetProperty< bool >( Button::PROPERTY_TOGGLABLE ) );
+ button.SetProperty( Button::PROPERTY_TOGGLABLE, true );
DALI_TEST_CHECK( button.IsToggleButton() ) ;
- DALI_TEST_CHECK( button.GetProperty< bool >( PushButton::PROPERTY_TOGGLABLE ) );
+ DALI_TEST_CHECK( button.GetProperty< bool >( Button::PROPERTY_TOGGLABLE ) );
- // PushButton::PROPERTY_TOGGLE
+ // Button::PROPERTY_TOGGLED
button.SetToggled( false );
- DALI_TEST_CHECK( ! button.GetProperty< bool >( PushButton::PROPERTY_TOGGLE ) );
- button.SetProperty( PushButton::PROPERTY_TOGGLE, true );
+ DALI_TEST_CHECK( ! button.GetProperty< bool >( Button::PROPERTY_TOGGLED ) );
+ button.SetProperty( Button::PROPERTY_TOGGLED, true );
DALI_TEST_CHECK( button.IsToggled() ) ;
- DALI_TEST_CHECK( button.GetProperty< bool >( PushButton::PROPERTY_TOGGLE ) );
+ DALI_TEST_CHECK( button.GetProperty< bool >( Button::PROPERTY_TOGGLED ) );
- // PushButton::PROPERTY_NORMAL_STATE_ACTOR
+ // Button::PROPERTY_NORMAL_STATE_ACTOR
{
button.SetButtonImage( Image::New( "IMAGE_PATH_1") );
- DALI_TEST_EQUALS( "IMAGE_PATH_1", button.GetProperty( PushButton::PROPERTY_NORMAL_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
+ DALI_TEST_EQUALS( "IMAGE_PATH_1", button.GetProperty( Button::PROPERTY_NORMAL_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
Property::Map map;
map[ "type" ] = "ImageActor";
- button.SetProperty( PushButton::PROPERTY_NORMAL_STATE_ACTOR, map );
- DALI_TEST_EQUALS( "ImageActor", button.GetProperty( PushButton::PROPERTY_NORMAL_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
+ button.SetProperty( Button::PROPERTY_NORMAL_STATE_ACTOR, map );
+ DALI_TEST_EQUALS( "ImageActor", button.GetProperty( Button::PROPERTY_NORMAL_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
}
- // PushButton::PROPERTY_PRESSED_IMAGE
+ // Button::PROPERTY_SELECTED_STATE_ACTOR
{
- button.SetPressedImage( Image::New( "IMAGE_PATH_2") );
- DALI_TEST_EQUALS( "IMAGE_PATH_2", button.GetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
+ button.SetSelectedImage( Image::New( "IMAGE_PATH_2") );
+ DALI_TEST_EQUALS( "IMAGE_PATH_2", button.GetProperty( Button::PROPERTY_SELECTED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
Property::Map map;
map[ "type" ] = "Actor";
- button.SetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR, map );
- DALI_TEST_EQUALS( "Actor", button.GetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
- DALI_TEST_CHECK( "ImageActor" != button.GetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >() );
+ button.SetProperty( Button::PROPERTY_SELECTED_STATE_ACTOR, map );
+ DALI_TEST_EQUALS( "Actor", button.GetProperty( Button::PROPERTY_SELECTED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
+ DALI_TEST_CHECK( "ImageActor" != button.GetProperty( Button::PROPERTY_SELECTED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >() );
}
- // PushButton::PROPERTY_DIMMED_STATE_ACTOR
+ // Button::PROPERTY_DISABLED_STATE_ACTOR
{
- button.SetDimmedImage( Image::New( "IMAGE_PATH_3") );
- DALI_TEST_EQUALS( "IMAGE_PATH_3", button.GetProperty( PushButton::PROPERTY_DIMMED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
+ button.SetDisabledImage( Image::New( "IMAGE_PATH_3") );
+ DALI_TEST_EQUALS( "IMAGE_PATH_3", button.GetProperty( Button::PROPERTY_DISABLED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
Property::Map map;
map[ "type" ] = "Actor";
- button.SetProperty( PushButton::PROPERTY_DIMMED_STATE_ACTOR, map );
- DALI_TEST_EQUALS( "Actor", button.GetProperty( PushButton::PROPERTY_DIMMED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
+ button.SetProperty( Button::PROPERTY_DISABLED_STATE_ACTOR, map );
+ DALI_TEST_EQUALS( "Actor", button.GetProperty( Button::PROPERTY_DISABLED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
}
- // PushButton::PROPERTY_LABEL_ACTOR
+ // Button::PROPERTY_LABEL_ACTOR
{
- button.SetLabelText( "LABEL_TEXT_CUSTOM" );
- DALI_TEST_EQUALS( "TextView", button.GetProperty( PushButton::PROPERTY_LABEL_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
+ button.SetLabel( "LABEL_TEXT_CUSTOM" );
+ DALI_TEST_EQUALS( "TextView", button.GetProperty( Button::PROPERTY_LABEL_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
Property::Map map;
map[ "type" ] = "Actor";
- button.SetProperty( PushButton::PROPERTY_LABEL_ACTOR, map );
- DALI_TEST_EQUALS( "Actor", button.GetProperty( PushButton::PROPERTY_LABEL_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
+ button.SetProperty( Button::PROPERTY_LABEL_ACTOR, map );
+ DALI_TEST_EQUALS( "Actor", button.GetProperty( Button::PROPERTY_LABEL_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
}
END_TEST;
}
PushButton pushButton = PushButton::New();
//Test various properties
- checkBoxButton.SetProperty( checkBoxButton.GetPropertyIndex("dimmed"), false );
- DALI_TEST_CHECK( false == checkBoxButton.IsDimmed() );
+ checkBoxButton.SetProperty( checkBoxButton.GetPropertyIndex("disabled"), false );
+ DALI_TEST_CHECK( false == checkBoxButton.IsDisabled() );
- checkBoxButton.SetProperty( checkBoxButton.GetPropertyIndex("dimmed"), true );
- DALI_TEST_CHECK( true == checkBoxButton.IsDimmed() );
+ checkBoxButton.SetProperty( checkBoxButton.GetPropertyIndex("disabled"), true );
+ DALI_TEST_CHECK( true == checkBoxButton.IsDisabled() );
END_TEST;
}
tet_infoline(" UtcDaliButtonSetGetDimmed");
CheckBoxButton checkBoxButton = CheckBoxButton::New();
- checkBoxButton.SetDimmed( true );
+ checkBoxButton.SetDisabled( true );
- DALI_TEST_CHECK( checkBoxButton.IsDimmed() );
- checkBoxButton.SetDimmed( false );
+ DALI_TEST_CHECK( checkBoxButton.IsDisabled() );
+ checkBoxButton.SetDisabled( false );
- DALI_TEST_CHECK( !checkBoxButton.IsDimmed() );
- checkBoxButton.SetDimmed( true );
+ DALI_TEST_CHECK( !checkBoxButton.IsDisabled() );
+ checkBoxButton.SetDisabled( true );
- DALI_TEST_CHECK( checkBoxButton.IsDimmed() );
- checkBoxButton.SetDimmed( false );
+ DALI_TEST_CHECK( checkBoxButton.IsDisabled() );
+ checkBoxButton.SetDisabled( false );
- DALI_TEST_CHECK( !checkBoxButton.IsDimmed() );
+ DALI_TEST_CHECK( !checkBoxButton.IsDisabled() );
END_TEST;
}
tet_infoline(" UtcDaliCheckBoxButtonSetGetChecked");
CheckBoxButton checkBoxButton = CheckBoxButton::New();
- checkBoxButton.ToggledSignal().Connect( &CheckBoxButtonClicked );
+ checkBoxButton.StateChangedSignal().Connect( &CheckBoxButtonClicked );
// global var used to check if CheckBoxButtonClicked is called;
gCheckBoxButtonState = false;
DALI_TEST_EQUALS( size.width, 40.f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 40.f, TEST_LOCATION );
- checkBoxButton.SetDimmedBackgroundImage( image03 );
+ checkBoxButton.SetDisabledBackgroundImage( image03 );
application.SendNotification();
application.Render();
- size = checkBoxButton.GetDimmedBackgroundImage().GetCurrentSize();
+ size = checkBoxButton.GetDisabledBackgroundImage().GetCurrentSize();
DALI_TEST_EQUALS( size.width, 50.f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 50.f, TEST_LOCATION );
- checkBoxButton.SetDimmedBackgroundImage( imageActor03 );
+ checkBoxButton.SetDisabledBackgroundImage( imageActor03 );
application.SendNotification();
application.Render();
- size = checkBoxButton.GetDimmedBackgroundImage().GetCurrentSize();
+ size = checkBoxButton.GetDisabledBackgroundImage().GetCurrentSize();
DALI_TEST_EQUALS( size.width, 60.f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 60.f, TEST_LOCATION );
- checkBoxButton.SetDimmedCheckedImage( image04 );
+ checkBoxButton.SetDisabledCheckedImage( image04 );
application.SendNotification();
application.Render();
- size = checkBoxButton.GetDimmedCheckedImage().GetCurrentSize();
+ size = checkBoxButton.GetDisabledCheckedImage().GetCurrentSize();
DALI_TEST_EQUALS( size.width, 70.f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 70.f, TEST_LOCATION );
- checkBoxButton.SetDimmedCheckedImage( imageActor04 );
+ checkBoxButton.SetDisabledCheckedImage( imageActor04 );
application.SendNotification();
application.Render();
- size = checkBoxButton.GetDimmedCheckedImage().GetCurrentSize();
+ size = checkBoxButton.GetDisabledCheckedImage().GetCurrentSize();
DALI_TEST_EQUALS( size.width, 80.f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 80.f, TEST_LOCATION );
RadioButton radioButton = RadioButton::New();
// Default active
- DALI_TEST_CHECK( radioButton.IsActive() == false );
+ DALI_TEST_CHECK( radioButton.IsSelected() == false );
// False to true
radioButton.ToggleState();
- DALI_TEST_CHECK( radioButton.IsActive() == true );
+ DALI_TEST_CHECK( radioButton.IsSelected() == true );
// True to false
radioButton.ToggleState();
- DALI_TEST_CHECK( radioButton.IsActive() == false );
+ DALI_TEST_CHECK( radioButton.IsSelected() == false );
// False
- radioButton.SetActive( false );
- DALI_TEST_CHECK( radioButton.IsActive() == false );
+ radioButton.SetSelected( false );
+ DALI_TEST_CHECK( radioButton.IsSelected() == false );
// True
- radioButton.SetActive( true );
- DALI_TEST_CHECK( radioButton.IsActive() == true );
+ radioButton.SetSelected( true );
+ DALI_TEST_CHECK( radioButton.IsSelected() == true );
// False
- radioButton.SetActive( false );
- DALI_TEST_CHECK( radioButton.IsActive() == false );
+ radioButton.SetSelected( false );
+ DALI_TEST_CHECK( radioButton.IsSelected() == false );
END_TEST;
}
radioButton.SetPosition( 0.0f, 0.0f );
// Default active
- DALI_TEST_CHECK( radioButton.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
+ DALI_TEST_CHECK( radioButton.GetProperty<bool>( Button::PROPERTY_TOGGLED ) == false );
// Setting false active
- radioButton.SetProperty( RadioButton::PROPERTY_ACTIVE, false );
- DALI_TEST_CHECK( radioButton.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
+ radioButton.SetProperty( Button::PROPERTY_TOGGLED, false );
+ DALI_TEST_CHECK( radioButton.GetProperty<bool>( Button::PROPERTY_TOGGLED ) == false );
// Setting true active
- radioButton.SetProperty( RadioButton::PROPERTY_ACTIVE, true );
- DALI_TEST_CHECK( radioButton.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == true );
+ radioButton.SetProperty( Button::PROPERTY_TOGGLED, true );
+ DALI_TEST_CHECK( radioButton.GetProperty<bool>( Button::PROPERTY_TOGGLED ) == true );
// Setting false again
- radioButton.SetProperty( RadioButton::PROPERTY_ACTIVE, false );
- DALI_TEST_CHECK( radioButton.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
+ radioButton.SetProperty( Button::PROPERTY_TOGGLED, false );
+ DALI_TEST_CHECK( radioButton.GetProperty<bool>( Button::PROPERTY_TOGGLED ) == false );
// Test selecting radio buttons
RadioButton radioButton2 = RadioButton::New( "label" );
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 );
+ DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::PROPERTY_TOGGLED ) == false );
+ DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::PROPERTY_TOGGLED ) == false );
// Select first radio
{
application.SendNotification();
application.Render();
- DALI_TEST_CHECK( radioButton2.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == true );
- DALI_TEST_CHECK( radioButton3.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
+ DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::PROPERTY_TOGGLED ) == true );
+ DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::PROPERTY_TOGGLED ) == false );
}
// Select an already selected radio
application.SendNotification();
application.Render();
- DALI_TEST_CHECK( radioButton2.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == true );
- DALI_TEST_CHECK( radioButton3.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
+ DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::PROPERTY_TOGGLED ) == true );
+ DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::PROPERTY_TOGGLED ) == false );
}
// Select second radio
application.SendNotification();
application.Render();
- DALI_TEST_CHECK( radioButton2.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
- DALI_TEST_CHECK( radioButton3.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == true );
+ DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::PROPERTY_TOGGLED ) == false );
+ DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::PROPERTY_TOGGLED ) == true );
}
// Select outside radio group
application.SendNotification();
application.Render();
- DALI_TEST_CHECK( radioButton2.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == false );
- DALI_TEST_CHECK( radioButton3.GetProperty<bool>( RadioButton::PROPERTY_ACTIVE ) == true );
+ DALI_TEST_CHECK( radioButton2.GetProperty<bool>( Button::PROPERTY_TOGGLED ) == false );
+ DALI_TEST_CHECK( radioButton3.GetProperty<bool>( Button::PROPERTY_TOGGLED ) == true );
}
END_TEST;
public: // Signals
- Dali::AccessibilityManager::AccessibilityActionSignalV2& StatusChangedSignal();
- Dali::AccessibilityManager::AccessibilityActionSignalV2& ActionNextSignal();
- Dali::AccessibilityManager::AccessibilityActionSignalV2& ActionPreviousSignal();
- Dali::AccessibilityManager::AccessibilityActionSignalV2& ActionActivateSignal();
- Dali::AccessibilityManager::AccessibilityActionSignalV2& ActionReadSignal();
- Dali::AccessibilityManager::AccessibilityActionSignalV2& ActionReadNextSignal();
- Dali::AccessibilityManager::AccessibilityActionSignalV2& ActionReadPreviousSignal();
- Dali::AccessibilityManager::AccessibilityActionSignalV2& ActionOverSignal();
- Dali::AccessibilityManager::AccessibilityActionSignalV2& ActionUpSignal();
- Dali::AccessibilityManager::AccessibilityActionSignalV2& ActionDownSignal();
- Dali::AccessibilityManager::AccessibilityActionSignalV2& ActionClearFocusSignal();
- Dali::AccessibilityManager::AccessibilityActionSignalV2& ActionBackSignal();
- Dali::AccessibilityManager::AccessibilityActionSignalV2& ActionControlPanelOpenSignal();
+ Dali::AccessibilityManager::AccessibilityActionSignalType& StatusChangedSignal();
+ Dali::AccessibilityManager::AccessibilityActionSignalType& ActionNextSignal();
+ Dali::AccessibilityManager::AccessibilityActionSignalType& ActionPreviousSignal();
+ Dali::AccessibilityManager::AccessibilityActionSignalType& ActionActivateSignal();
+ Dali::AccessibilityManager::AccessibilityActionSignalType& ActionReadSignal();
+ Dali::AccessibilityManager::AccessibilityActionSignalType& ActionReadNextSignal();
+ Dali::AccessibilityManager::AccessibilityActionSignalType& ActionReadPreviousSignal();
+ Dali::AccessibilityManager::AccessibilityActionSignalType& ActionOverSignal();
+ Dali::AccessibilityManager::AccessibilityActionSignalType& ActionUpSignal();
+ Dali::AccessibilityManager::AccessibilityActionSignalType& ActionDownSignal();
+ Dali::AccessibilityManager::AccessibilityActionSignalType& ActionClearFocusSignal();
+ Dali::AccessibilityManager::AccessibilityActionSignalType& ActionBackSignal();
+ Dali::AccessibilityManager::AccessibilityActionSignalType& ActionControlPanelOpenSignal();
private:
- Dali::AccessibilityManager::AccessibilityActionSignalV2 mStatusChangedSignal;
- Dali::AccessibilityManager::AccessibilityActionSignalV2 mActionNextSignal;
- Dali::AccessibilityManager::AccessibilityActionSignalV2 mActionPreviousSignal;
- Dali::AccessibilityManager::AccessibilityActionSignalV2 mActionActivateSignal;
- Dali::AccessibilityManager::AccessibilityActionSignalV2 mActionReadSignal;
- Dali::AccessibilityManager::AccessibilityActionSignalV2 mActionReadNextSignal;
- Dali::AccessibilityManager::AccessibilityActionSignalV2 mActionReadPreviousSignal;
- Dali::AccessibilityManager::AccessibilityActionSignalV2 mActionOverSignal;
- Dali::AccessibilityManager::AccessibilityActionSignalV2 mActionUpSignal;
- Dali::AccessibilityManager::AccessibilityActionSignalV2 mActionDownSignal;
- Dali::AccessibilityManager::AccessibilityActionSignalV2 mActionClearFocusSignal;
- Dali::AccessibilityManager::AccessibilityActionSignalV2 mActionBackSignal;
- Dali::AccessibilityManager::AccessibilityActionSignalV2 mActionControlPanelOpenSignal;
+ Dali::AccessibilityManager::AccessibilityActionSignalType mStatusChangedSignal;
+ Dali::AccessibilityManager::AccessibilityActionSignalType mActionNextSignal;
+ Dali::AccessibilityManager::AccessibilityActionSignalType mActionPreviousSignal;
+ Dali::AccessibilityManager::AccessibilityActionSignalType mActionActivateSignal;
+ Dali::AccessibilityManager::AccessibilityActionSignalType mActionReadSignal;
+ Dali::AccessibilityManager::AccessibilityActionSignalType mActionReadNextSignal;
+ Dali::AccessibilityManager::AccessibilityActionSignalType mActionReadPreviousSignal;
+ Dali::AccessibilityManager::AccessibilityActionSignalType mActionOverSignal;
+ Dali::AccessibilityManager::AccessibilityActionSignalType mActionUpSignal;
+ Dali::AccessibilityManager::AccessibilityActionSignalType mActionDownSignal;
+ Dali::AccessibilityManager::AccessibilityActionSignalType mActionClearFocusSignal;
+ Dali::AccessibilityManager::AccessibilityActionSignalType mActionBackSignal;
+ Dali::AccessibilityManager::AccessibilityActionSignalType mActionControlPanelOpenSignal;
bool mIsEnabled;
Dali::AccessibilityActionHandler* mActionHandler;
mGestureHandler = &handler;
}
-Dali::AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::StatusChangedSignal()
+Dali::AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::StatusChangedSignal()
{
return mStatusChangedSignal;
}
-Dali::AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionNextSignal()
+Dali::AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionNextSignal()
{
return mActionNextSignal;
}
-Dali::AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionPreviousSignal()
+Dali::AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionPreviousSignal()
{
return mActionPreviousSignal;
}
-Dali::AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionActivateSignal()
+Dali::AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionActivateSignal()
{
return mActionActivateSignal;
}
-Dali::AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionReadSignal()
+Dali::AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionReadSignal()
{
return mActionReadSignal;
}
-Dali::AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionReadNextSignal()
+Dali::AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionReadNextSignal()
{
return mActionReadNextSignal;
}
-Dali::AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionReadPreviousSignal()
+Dali::AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionReadPreviousSignal()
{
return mActionReadPreviousSignal;
}
-Dali::AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionOverSignal()
+Dali::AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionOverSignal()
{
return mActionOverSignal;
}
-Dali::AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionUpSignal()
+Dali::AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionUpSignal()
{
return mActionUpSignal;
}
-Dali::AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionDownSignal()
+Dali::AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionDownSignal()
{
return mActionDownSignal;
}
-Dali::AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionClearFocusSignal()
+Dali::AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionClearFocusSignal()
{
return mActionClearFocusSignal;
}
-Dali::AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionBackSignal()
+Dali::AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionBackSignal()
{
return mActionBackSignal;
}
-Dali::AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionControlPanelOpenSignal()
+Dali::AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionControlPanelOpenSignal()
{
return mActionControlPanelOpenSignal;
}
//Internal::Adaptor::GetImplementation(*this).HandleActionDisableEvent();
}
-AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::StatusChangedSignal()
+AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::StatusChangedSignal()
{
return Internal::Adaptor::GetImplementation(*this).StatusChangedSignal();
}
-AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionNextSignal()
+AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionNextSignal()
{
return Internal::Adaptor::GetImplementation(*this).ActionNextSignal();
}
-AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionPreviousSignal()
+AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionPreviousSignal()
{
return Internal::Adaptor::GetImplementation(*this).ActionPreviousSignal();
}
-AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionActivateSignal()
+AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionActivateSignal()
{
return Internal::Adaptor::GetImplementation(*this).ActionActivateSignal();
}
-AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionOverSignal()
+AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionOverSignal()
{
return Internal::Adaptor::GetImplementation(*this).ActionOverSignal();
}
-AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionReadSignal()
+AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionReadSignal()
{
return Internal::Adaptor::GetImplementation(*this).ActionReadSignal();
}
-AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionReadNextSignal()
+AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionReadNextSignal()
{
return Internal::Adaptor::GetImplementation(*this).ActionReadNextSignal();
}
-AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionReadPreviousSignal()
+AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionReadPreviousSignal()
{
return Internal::Adaptor::GetImplementation(*this).ActionReadPreviousSignal();
}
-AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionUpSignal()
+AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionUpSignal()
{
return Internal::Adaptor::GetImplementation(*this).ActionUpSignal();
}
-AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionDownSignal()
+AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionDownSignal()
{
return Internal::Adaptor::GetImplementation(*this).ActionDownSignal();
}
-AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionClearFocusSignal()
+AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionClearFocusSignal()
{
return Internal::Adaptor::GetImplementation(*this).ActionClearFocusSignal();
}
-AccessibilityManager::AccessibilityActionSignalV2& AccessibilityManager::ActionBackSignal()
+AccessibilityManager::AccessibilityActionSignalType& AccessibilityManager::ActionBackSignal()
{
return Internal::Adaptor::GetImplementation(*this).ActionBackSignal();
}
#include <string>
#include <boost/function.hpp>
#include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
#include <dali/public-api/events/touch-point.h>
namespace Dali
class AccessibilityManager : public BaseHandle
{
public: // Typedefs
- typedef SignalV2< bool ( AccessibilityManager& ) > AccessibilityActionSignalV2;
+ typedef Signal< bool ( AccessibilityManager& ) > AccessibilityActionSignalType;
public: // Construction & Destruction
AccessibilityManager();
void HandleActionDisableEvent();
public: // Signals
- AccessibilityActionSignalV2& StatusChangedSignal();
- AccessibilityActionSignalV2& ActionNextSignal();
- AccessibilityActionSignalV2& ActionPreviousSignal();
- AccessibilityActionSignalV2& ActionActivateSignal();
- AccessibilityActionSignalV2& ActionReadSignal();
- AccessibilityActionSignalV2& ActionOverSignal();
- AccessibilityActionSignalV2& ActionReadNextSignal();
- AccessibilityActionSignalV2& ActionReadPreviousSignal();
- AccessibilityActionSignalV2& ActionUpSignal();
- AccessibilityActionSignalV2& ActionDownSignal();
- AccessibilityActionSignalV2& ActionClearFocusSignal();
- AccessibilityActionSignalV2& ActionBackSignal();
+ AccessibilityActionSignalType& StatusChangedSignal();
+ AccessibilityActionSignalType& ActionNextSignal();
+ AccessibilityActionSignalType& ActionPreviousSignal();
+ AccessibilityActionSignalType& ActionActivateSignal();
+ AccessibilityActionSignalType& ActionReadSignal();
+ AccessibilityActionSignalType& ActionOverSignal();
+ AccessibilityActionSignalType& ActionReadNextSignal();
+ AccessibilityActionSignalType& ActionReadPreviousSignal();
+ AccessibilityActionSignalType& ActionUpSignal();
+ AccessibilityActionSignalType& ActionDownSignal();
+ AccessibilityActionSignalType& ActionClearFocusSignal();
+ AccessibilityActionSignalType& ActionBackSignal();
AccessibilityManager( Internal::Adaptor::AccessibilityManager* manager );
};
#include <boost/any.hpp>
#include <dali/public-api/common/dali-common.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
#include <dali/public-api/adaptor-framework/orientation.h>
namespace Dali
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/object/base-object.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
namespace Dali
{
{
public:
- typedef Dali::ClipboardEventNotifier::ClipboardEventSignalV2 ClipboardEventSignalV2;
+ typedef Dali::ClipboardEventNotifier::ClipboardEventSignalType ClipboardEventSignalType;
// Creation
static Dali::ClipboardEventNotifier New();
void EmitContentSelectedSignal();
// Signals
- ClipboardEventSignalV2& ContentSelectedSignal()
+ ClipboardEventSignalType& ContentSelectedSignal()
{
- return mContentSelectedSignalV2;
+ return mContentSelectedSignal;
}
private:
private:
std::string mContent; ///< The current selected content.
- ClipboardEventSignalV2 mContentSelectedSignalV2;
+ ClipboardEventSignalType mContentSelectedSignal;
static Dali::ClipboardEventNotifier mToolkitClipboardEventNotifier;
void ClipboardEventNotifier::EmitContentSelectedSignal()
{
- if ( !mContentSelectedSignalV2.Empty() )
+ if ( !mContentSelectedSignal.Empty() )
{
Dali::ClipboardEventNotifier handle( this );
- mContentSelectedSignalV2.Emit( handle );
+ mContentSelectedSignal.Emit( handle );
}
}
Internal::Adaptor::ClipboardEventNotifier::GetImplementation(*this).EmitContentSelectedSignal();
}
-ClipboardEventNotifier::ClipboardEventSignalV2& ClipboardEventNotifier::ContentSelectedSignal()
+ClipboardEventNotifier::ClipboardEventSignalType& ClipboardEventNotifier::ContentSelectedSignal()
{
return Internal::Adaptor::ClipboardEventNotifier::GetImplementation(*this).ContentSelectedSignal();
}
// PUBLIC INCLUDES
#define __DALI_CLIPBOARD_EVENT_NOTIFIER_H__
#include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
namespace Dali
class ClipboardEventNotifier : public BaseHandle
{
public:
- typedef SignalV2< void ( ClipboardEventNotifier& ) > ClipboardEventSignalV2;
+ typedef Signal< void ( ClipboardEventNotifier& ) > ClipboardEventSignalType;
ClipboardEventNotifier();
static ClipboardEventNotifier Get();
void ClearContent();
void EmitContentSelectedSignal();
- ClipboardEventSignalV2& ContentSelectedSignal();
+ ClipboardEventSignalType& ContentSelectedSignal();
ClipboardEventNotifier( Internal::Adaptor::ClipboardEventNotifier* notifier );
};
class ImfManager : public Dali::BaseObject
{
public:
- typedef Dali::ImfManager::ImfManagerSignalV2 ImfManagerSignalV2;
- typedef Dali::ImfManager::ImfEventSignalV2 ImfEventSignalV2;
+ typedef Dali::ImfManager::ImfManagerSignalType ImfManagerSignalType;
+ typedef Dali::ImfManager::ImfEventSignalType ImfEventSignalType;
public:
static Dali::ImfManager Get();
std::string GetSurroundingText();
public: // Signals
- ImfManagerSignalV2& ActivatedSignal() { return mActivatedSignalV2; }
- ImfEventSignalV2& EventReceivedSignal() { return mEventSignalV2; }
+ ImfManagerSignalType& ActivatedSignal() { return mActivatedSignal; }
+ ImfEventSignalType& EventReceivedSignal() { return mEventSignal; }
protected:
virtual ~ImfManager();
bool mIdleCallbackConnected:1; ///< Whether the idle callback is already connected.
std::vector<Dali::Integration::KeyEvent> mKeyEvents; ///< Stores key events to be sent from idle call-back.
- ImfManagerSignalV2 mActivatedSignalV2;
- ImfEventSignalV2 mEventSignalV2;
+ ImfManagerSignalType mActivatedSignal;
+ ImfEventSignalType mEventSignal;
static Dali::ImfManager mToolkitImfManager;
return Internal::Adaptor::ImfManager::GetImplementation(*this).GetSurroundingText();
}
-ImfManager::ImfManagerSignalV2& ImfManager::ActivatedSignal()
+ImfManager::ImfManagerSignalType& ImfManager::ActivatedSignal()
{
return Internal::Adaptor::ImfManager::GetImplementation(*this).ActivatedSignal();
}
-ImfManager::ImfEventSignalV2& ImfManager::EventReceivedSignal()
+ImfManager::ImfEventSignalType& ImfManager::EventReceivedSignal()
{
return Internal::Adaptor::ImfManager::GetImplementation(*this).EventReceivedSignal();
}
// EXTERNAL INCLUDES
#define __DALI_IMF_MANAGER_H__
#include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
namespace Dali DALI_IMPORT_API
{
bool preeditResetRequired; // flag if preedit reset is required.
};
- typedef SignalV2< void (ImfManager&) > ImfManagerSignalV2;
+ typedef Signal< void (ImfManager&) > ImfManagerSignalType;
- typedef SignalV2< ImfCallbackData ( ImfManager&, const ImfEventData& ) > ImfEventSignalV2;
+ typedef Signal< ImfCallbackData ( ImfManager&, const ImfEventData& ) > ImfEventSignalType;
public:
* This is emitted when the virtual keyboard is connected to or the hardware keyboard is activated.
* @return The IMF Activated signal.
*/
- ImfManagerSignalV2& ActivatedSignal();
+ ImfManagerSignalType& ActivatedSignal();
/**
* This is emitted when the IMF manager receives an event from the IMF
* @return The Event signal containing the event data.
*/
- ImfEventSignalV2& EventReceivedSignal();
+ ImfEventSignalType& EventReceivedSignal();
// Construction & Destruction
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/object/base-object.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
namespace Dali
{
public: // Signals
- Dali::Orientation::OrientationSignalV2& ChangedSignal();
+ Dali::Orientation::OrientationSignalType& ChangedSignal();
void EmitChangedSignal()
{
private:
- Dali::Orientation::OrientationSignalV2 mChangedSignal;
+ Dali::Orientation::OrientationSignalType mChangedSignal;
ToolkitOrientation* mToolkitOrientation;
return Math::PI * (float)mOrientation / 180.0f;
}
-Dali::Orientation::OrientationSignalV2& Orientation::ChangedSignal()
+Dali::Orientation::OrientationSignalType& Orientation::ChangedSignal()
{
mToolkitOrientation->mFunctionsCalled.ChangedSignal = true;
return mChangedSignal;
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/object/base-object.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
namespace Dali
{
bool IsAttached() const;
public: // Signals
- Dali::PhysicalKeyboard::Signal& StatusChangedSignal();
+ Dali::PhysicalKeyboard::PhysicalKeyboardSignalType& StatusChangedSignal();
private:
- Dali::PhysicalKeyboard::Signal mStatusChangedSignal;
+ Dali::PhysicalKeyboard::PhysicalKeyboardSignalType mStatusChangedSignal;
bool mIsAttached;
static Dali::PhysicalKeyboard mPhysicalKeyboard;
};
return mIsAttached;
}
-Dali::PhysicalKeyboard::Signal& PhysicalKeyboard::StatusChangedSignal()
+Dali::PhysicalKeyboard::PhysicalKeyboardSignalType& PhysicalKeyboard::StatusChangedSignal()
{
return mStatusChangedSignal;
}
return pyke.IsAttached();
}
-PhysicalKeyboard::Signal& PhysicalKeyboard::StatusChangedSignal()
+PhysicalKeyboard::PhysicalKeyboardSignalType& PhysicalKeyboard::StatusChangedSignal()
{
BaseObject& object = GetBaseObject();
Internal::Adaptor::PhysicalKeyboard& pyke = static_cast< Internal::Adaptor::PhysicalKeyboard& >( object );
// EXTERNAL INCLUDES
#include <string>
#include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
namespace Dali
{
class PhysicalKeyboard : public BaseHandle
{
public:
- typedef SignalV2< void (PhysicalKeyboard) > Signal;
+ typedef Signal< void (PhysicalKeyboard) > PhysicalKeyboardSignalType;
PhysicalKeyboard();
~PhysicalKeyboard();
static PhysicalKeyboard Get();
bool IsAttached() const;
- Signal& StatusChangedSignal();
+ PhysicalKeyboardSignalType& StatusChangedSignal();
PhysicalKeyboard( Internal::Adaptor::PhysicalKeyboard* impl );
};
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/object/base-object.h>
#include <dali/public-api/common/map-wrapper.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
namespace Dali
{
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/object/base-object.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
namespace Dali
{
void SetTheme(std::string theme);
public: // Signals
- Dali::StyleMonitor::StyleChangeSignalV2& StyleChangeSignal();
+ Dali::StyleMonitor::StyleChangeSignalType& StyleChangeSignal();
void EmitStyleChangeSignal(StyleChange styleChange)
{
}
private:
- Dali::StyleMonitor::StyleChangeSignalV2 mStyleChangeSignal;
+ Dali::StyleMonitor::StyleChangeSignalType mStyleChangeSignal;
static Dali::StyleMonitor mToolkitStyleMonitor;
std::string mTheme;
};
EmitStyleChangeSignal(styleChange);
}
-Dali::StyleMonitor::StyleChangeSignalV2& StyleMonitor::StyleChangeSignal()
+Dali::StyleMonitor::StyleChangeSignalType& StyleMonitor::StyleChangeSignal()
{
return mStyleChangeSignal;
}
GetImplementation(*this).SetTheme(themeFilePath);
}
-StyleMonitor::StyleChangeSignalV2& StyleMonitor::StyleChangeSignal()
+StyleMonitor::StyleChangeSignalType& StyleMonitor::StyleChangeSignal()
{
return GetImplementation(*this).StyleChangeSignal();
}
// INTERNAL INCLUDES
#define __DALI_STYLE_MONITOR_H__
#include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
#include <dali/public-api/adaptor-framework/style-change.h>
namespace Dali
class StyleMonitor : public BaseHandle
{
public: // Typedefs
- typedef SignalV2< void (StyleMonitor, StyleChange) > StyleChangeSignalV2;
+ typedef Signal< void (StyleMonitor, StyleChange) > StyleChangeSignalType;
static const std::string DEFAULT_FONT_FAMILY;
static const float DEFAULT_FONT_SIZE;
void SetTheme(std::string themeFilePath);
public: // Signals
- StyleChangeSignalV2& StyleChangeSignal();
+ StyleChangeSignalType& StyleChangeSignal();
void EmitStyleChangeSignal(StyleChange handle);
public: // Operators
// INTERNAL INCLUDES
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/object/base-object.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
namespace Dali
{
public: // Signals
- Dali::Timer::TimerSignalV2& TickSignal();
+ Dali::Timer::TimerSignalType& TickSignal();
private: // Implementation
private: // Data
- Dali::Timer::TimerSignalV2 mTickSignal;
+ Dali::Timer::TimerSignalType mTickSignal;
unsigned int mInterval;
};
return false;
}
-Dali::Timer::TimerSignalV2& Timer::TickSignal()
+Dali::Timer::TimerSignalType& Timer::TickSignal()
{
return mTickSignal;
}
return true;
}
-Timer::TimerSignalV2& Timer::TickSignal()
+Timer::TimerSignalType& Timer::TickSignal()
{
return Internal::Adaptor::GetImplementation( *this ).TickSignal();
}
// PUBLIC INCLUDES
#define __DALI_TIMER_H__
#include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
namespace Dali
{
class Timer : public BaseHandle
{
public:
- typedef SignalV2< bool () > TimerSignalV2;
+ typedef Signal< bool () > TimerSignalType;
Timer();
static Timer New( unsigned int milliSec );
Timer( const Timer& timer );
void SetInterval( unsigned int milliSec );
unsigned int GetInterval() const;
bool IsRunning() const;
- TimerSignalV2& TickSignal();
+ TimerSignalType& TickSignal();
private:
Timer(Internal::Adaptor::Timer* timer);
};
PushButton pushButton = PushButton::New();
- pushButton.SetProperty(pushButton.GetPropertyIndex("dimmed"), false);
- DALI_TEST_CHECK( false == pushButton.IsDimmed() );
- pushButton.SetProperty(pushButton.GetPropertyIndex("dimmed"), true);
- DALI_TEST_CHECK( true == pushButton.IsDimmed() );
+ pushButton.SetProperty(pushButton.GetPropertyIndex("disabled"), false);
+ DALI_TEST_CHECK( false == pushButton.IsDisabled() );
+ pushButton.SetProperty(pushButton.GetPropertyIndex("disabled"), true);
+ DALI_TEST_CHECK( true == pushButton.IsDisabled() );
END_TEST;
}
PushButton pushButton = PushButton::New();
- pushButton.SetDimmed( true );
+ pushButton.SetDisabled( true );
- DALI_TEST_CHECK( pushButton.IsDimmed() );
+ DALI_TEST_CHECK( pushButton.IsDisabled() );
- pushButton.SetDimmed( false );
+ pushButton.SetDisabled( false );
- DALI_TEST_CHECK( !pushButton.IsDimmed() );
+ DALI_TEST_CHECK( !pushButton.IsDisabled() );
- pushButton.SetDimmed( true );
+ pushButton.SetDisabled( true );
- DALI_TEST_CHECK( pushButton.IsDimmed() );
+ DALI_TEST_CHECK( pushButton.IsDisabled() );
- pushButton.SetDimmed( false );
+ pushButton.SetDisabled( false );
- DALI_TEST_CHECK( !pushButton.IsDimmed() );
+ DALI_TEST_CHECK( !pushButton.IsDisabled() );
END_TEST;
}
PushButton pushButton = PushButton::New();
pushButton.SetToggleButton( true );
- pushButton.ToggledSignal().Connect( &PushButtonToggled );
+ pushButton.StateChangedSignal().Connect( &PushButtonToggled );
gPushButtonToggleState = false;
pushButton.SetToggled( true );
PushButton pushButton = PushButton::New();
pushButton.SetToggleButton( false );
- pushButton.ToggledSignal().Connect( &PushButtonToggled );
+ pushButton.StateChangedSignal().Connect( &PushButtonToggled );
gPushButtonToggleState = false;
pushButton.SetToggled( true );
DALI_TEST_EQUALS( size.width, 40.f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 40.f, TEST_LOCATION );
- pushButton.SetPressedImage( image03 );
+ pushButton.SetSelectedImage( image03 );
application.SendNotification();
application.Render();
- size = pushButton.GetPressedImage().GetCurrentSize();
+ size = pushButton.GetSelectedImage().GetCurrentSize();
DALI_TEST_EQUALS( size.width, 50.f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 50.f, TEST_LOCATION );
- pushButton.SetPressedImage( imageActor03 );
+ pushButton.SetSelectedImage( imageActor03 );
application.SendNotification();
application.Render();
- size = pushButton.GetPressedImage().GetCurrentSize();
+ size = pushButton.GetSelectedImage().GetCurrentSize();
DALI_TEST_EQUALS( size.width, 60.f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 60.f, TEST_LOCATION );
- pushButton.SetDimmedBackgroundImage( image04 );
+ pushButton.SetDisabledBackgroundImage( image04 );
application.SendNotification();
application.Render();
- size = pushButton.GetDimmedBackgroundImage().GetCurrentSize();
+ size = pushButton.GetDisabledBackgroundImage().GetCurrentSize();
DALI_TEST_EQUALS( size.width, 70.f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 70.f, TEST_LOCATION );
- pushButton.SetDimmedBackgroundImage( imageActor04 );
+ pushButton.SetDisabledBackgroundImage( imageActor04 );
application.SendNotification();
application.Render();
- size = pushButton.GetDimmedBackgroundImage().GetCurrentSize();
+ size = pushButton.GetDisabledBackgroundImage().GetCurrentSize();
DALI_TEST_EQUALS( size.width, 80.f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 80.f, TEST_LOCATION );
- pushButton.SetDimmedImage( image05 );
+ pushButton.SetDisabledImage( image05 );
application.SendNotification();
application.Render();
- size = pushButton.GetDimmedImage().GetCurrentSize();
+ size = pushButton.GetDisabledImage().GetCurrentSize();
DALI_TEST_EQUALS( size.width, 90.f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 90.f, TEST_LOCATION );
- pushButton.SetDimmedImage( imageActor05 );
+ pushButton.SetDisabledImage( imageActor05 );
application.SendNotification();
application.Render();
- size = pushButton.GetDimmedImage().GetCurrentSize();
+ size = pushButton.GetDisabledImage().GetCurrentSize();
DALI_TEST_EQUALS( size.width, 100.f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 100.f, TEST_LOCATION );
TextView textView;
- pushButton.SetLabelText( STR );
+ pushButton.SetLabel( STR );
- textView = TextView::DownCast( pushButton.GetLabelText() );
+ textView = TextView::DownCast( pushButton.GetLabel() );
DALI_TEST_CHECK( STR == textView.GetText() );
TextView text = TextView::New( STR );
- pushButton.SetLabelText( text );
+ pushButton.SetLabel( text );
- textView = TextView::DownCast( pushButton.GetLabelText() );
+ textView = TextView::DownCast( pushButton.GetLabel() );
DALI_TEST_CHECK( STR == textView.GetText() );
END_TEST;
}
application.Render();
// connect to its touch signal
- pushButton.ToggledSignal().Connect( &PushButtonToggled );
+ pushButton.StateChangedSignal().Connect( &PushButtonToggled );
Dali::Integration::TouchEvent event;
END_TEST;
}
-
-
-
-int UtcDaliScrollViewSlideEffectSetup(void)
-{
- tet_infoline(" UtcDaliScrollViewSlideEffectSetup");
-
- ScrollViewSlideEffect effect;
-
- DALI_TEST_CHECK( !effect );
-
- BaseHandle handle = ScrollViewSlideEffect::New();
-
- DALI_TEST_CHECK( handle );
-
- effect = ScrollViewSlideEffect::DownCast(handle);
-
- DALI_TEST_CHECK( effect );
- END_TEST;
-}
-
int UtcDaliScrollViewCubeEffectTest(void)
{
ToolkitTestApplication application;
END_TEST;
}
-
-
-int UtcDaliScrollViewSlideEffectTest(void)
-{
- ToolkitTestApplication application;
- tet_infoline(" UtcDaliScrollViewSlideEffectTest");
-
- Vector2 size = Stage::GetCurrent().GetSize();
- Vector3 pageSize(size.x, size.y, 0.0f);
-
- ScrollView scrollView = SetupTestScrollView(1, 3, size);
- Actor testPage = gPages[1];
- Wait(application, 500);
-
- ScrollViewSlideEffect effect = ScrollViewSlideEffect::New();
- effect.SetDelayReferenceOffset(pageSize * 0.25);
- DALI_TEST_EQUALS(effect.GetDelayReferenceOffset(), pageSize * 0.25, Math::MACHINE_EPSILON_0, TEST_LOCATION);
- effect.SetMaxDelayDuration(0.5f);
- DALI_TEST_EQUALS(effect.GetMaxDelayDuration(), 0.5f, Math::MACHINE_EPSILON_0, TEST_LOCATION);
- effect.SetSlideDirection(false);
- DALI_TEST_CHECK(!effect.GetSlideDirection());
-
- scrollView.ApplyEffect(effect);
-
- Actor actor = AddActorToPage(testPage, 0.5f, 0.5f, 3, 3);
- Wait(application);
- Vector3 actorPrePosition = actor.GetCurrentPosition();
-
- effect.ApplyToActor(actor, 0.0f, 0.5f);
-
- scrollView.ScrollTo(1);
- while(!gOnScrollCompleteCalled)
- {
- Wait(application);
- }
- // test that the first page has reached centre of screen
- Vector3 actorPostPosition = actor.GetCurrentPosition();
- // just check the actor has moved
- DALI_TEST_CHECK((actorPostPosition - actorPrePosition).Length() > Math::MACHINE_EPSILON_1);
- CleanupTest();
- END_TEST;
-}
return ret;
}
-Toolkit::Builder::Signal& Builder::QuitSignal()
+Toolkit::Builder::BuilderSignalType& Builder::QuitSignal()
{
return mQuitSignal;
}
/**
* @copydoc Toolkit::Builder::QuitSignal
*/
- Toolkit::Builder::Signal& QuitSignal();
+ Toolkit::Builder::BuilderSignalType& QuitSignal();
/**
* Emits the quit signal
void SetProperties( const TreeNode& node, Handle& handle, const Replacement& constant );
- Toolkit::Builder::Signal mQuitSignal;
+ Toolkit::Builder::BuilderSignalType mQuitSignal;
};
} // namespace Internal
#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/object/type-registry.h>
-namespace
-{
-const char* const PROPERTY_DIMMED = "dimmed";
-} // unnamed namespace
-
namespace Dali
{
namespace Toolkit
{
-const Property::Index Button::PROPERTY_DIMMED( Internal::Button::BUTTON_PROPERTY_START_INDEX );
+const Property::Index Button::PROPERTY_DISABLED = Internal::Button::BUTTON_PROPERTY_START_INDEX;
+const Property::Index Button::PROPERTY_AUTO_REPEATING = Internal::Button::BUTTON_PROPERTY_START_INDEX + 1;
+const Property::Index Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY = Internal::Button::BUTTON_PROPERTY_START_INDEX + 2;
+const Property::Index Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY = Internal::Button::BUTTON_PROPERTY_START_INDEX + 3;
+const Property::Index Button::PROPERTY_TOGGLABLE = Internal::Button::BUTTON_PROPERTY_START_INDEX + 4;
+const Property::Index Button::PROPERTY_TOGGLED = Internal::Button::BUTTON_PROPERTY_START_INDEX + 5;
+const Property::Index Button::PROPERTY_NORMAL_STATE_ACTOR = Internal::Button::BUTTON_PROPERTY_START_INDEX + 6;
+const Property::Index Button::PROPERTY_SELECTED_STATE_ACTOR = Internal::Button::BUTTON_PROPERTY_START_INDEX + 7;
+const Property::Index Button::PROPERTY_DISABLED_STATE_ACTOR = Internal::Button::BUTTON_PROPERTY_START_INDEX + 8;
+const Property::Index Button::PROPERTY_LABEL_ACTOR = Internal::Button::BUTTON_PROPERTY_START_INDEX + 9;
namespace Internal
{
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 );
+SignalConnectorType signalConnector2( typeRegistration, Toolkit::Button::SIGNAL_STATE_CHANGED, &Button::DoConnectSignal );
+
+PropertyRegistration property1( typeRegistration, "disabled", Toolkit::Button::PROPERTY_DISABLED, Property::BOOLEAN, &Button::SetProperty, &Button::GetProperty );
+PropertyRegistration property2( typeRegistration, "auto-repeating", Toolkit::Button::PROPERTY_AUTO_REPEATING, Property::BOOLEAN, &Button::SetProperty, &Button::GetProperty );
+PropertyRegistration property3( typeRegistration, "initial-auto-repeating-delay", Toolkit::Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY, Property::FLOAT, &Button::SetProperty, &Button::GetProperty );
+PropertyRegistration property4( typeRegistration, "next-auto-repeating-delay", Toolkit::Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY, Property::FLOAT, &Button::SetProperty, &Button::GetProperty );
+PropertyRegistration property5( typeRegistration, "togglable", Toolkit::Button::PROPERTY_TOGGLABLE, Property::BOOLEAN, &Button::SetProperty, &Button::GetProperty );
+PropertyRegistration property6( typeRegistration, "toggled", Toolkit::Button::PROPERTY_TOGGLED, Property::BOOLEAN, &Button::SetProperty, &Button::GetProperty );
+PropertyRegistration property7( typeRegistration, "normal-state-actor", Toolkit::Button::PROPERTY_NORMAL_STATE_ACTOR, Property::MAP, &Button::SetProperty, &Button::GetProperty );
+PropertyRegistration property8( typeRegistration, "selected-state-actor", Toolkit::Button::PROPERTY_SELECTED_STATE_ACTOR, Property::MAP, &Button::SetProperty, &Button::GetProperty );
+PropertyRegistration property9( typeRegistration, "disabled-state-actor", Toolkit::Button::PROPERTY_DISABLED_STATE_ACTOR, Property::MAP, &Button::SetProperty, &Button::GetProperty );
+PropertyRegistration property10( typeRegistration, "label-actor", Toolkit::Button::PROPERTY_LABEL_ACTOR, Property::MAP, &Button::SetProperty, &Button::GetProperty );
} // unnamed namespace
Button::Button()
: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) ),
+ mPainter( NULL ),
mState( ButtonUp ),
- mDimmed( false ),
- mPainter( NULL )
+ mDisabled( false )
{
}
{
}
-void Button::SetDimmed( bool dimmed )
+void Button::SetDisabled( bool disabled )
{
- mDimmed = dimmed;
+ mDisabled = disabled;
// Notifies the painter.
Toolkit::Button handle( GetOwner() );
if( mPainter )
{
- mPainter->SetDimmed( handle, mDimmed );
+ mPainter->SetDisabled( handle, mDisabled );
}
}
-bool Button::IsDimmed() const
+bool Button::IsDisabled() const
{
- return mDimmed;
+ return mDisabled;
}
void Button::SetAnimationTime( float animationTime )
// nothing to do.
}
+void Button::OnButtonDown()
+{
+
+}
+
+void Button::OnButtonUp()
+{
+
+}
+
float Button::OnAnimationTimeRequested() const
{
return 0.f;
}
-Toolkit::Button::ClickedSignalV2& Button::ClickedSignal()
+Toolkit::Button::ClickedSignalType& Button::ClickedSignal()
{
- return mClickedSignalV2;
+ return mClickedSignal;
}
-Toolkit::Button::ToggledSignalV2& Button::ToggledSignal()
+Toolkit::Button::StateChangedSignalType& Button::StateChangedSignal()
{
- return mToggledSignalV2;
+ return mStateChangedSignal;
}
bool Button::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
{
button.ClickedSignal().Connect( tracker, functor );
}
- else if( Dali::Toolkit::Button::SIGNAL_TOGGLED == signalName )
+ else if( Dali::Toolkit::Button::SIGNAL_STATE_CHANGED == signalName )
{
- button.ToggledSignal().Connect( tracker, functor );
+ button.StateChangedSignal().Connect( tracker, functor );
}
else
{
bool Button::OnTouchEvent(const TouchEvent& event)
{
- // Only events are processed when the button is not dimmed and the touch event has only
+ // Only events are processed when the button is not disabled and the touch event has only
// one touch point.
- if( ( !mDimmed ) && ( 1 == event.GetPointCount() ) )
+ if( ( !mDisabled ) && ( 1 == event.GetPointCount() ) )
{
switch( event.GetPoint(0).state )
{
{
Toolkit::Button button = Toolkit::Button::DownCast( Dali::BaseHandle( object ) );
- if ( button && ( index == Toolkit::Button::PROPERTY_DIMMED ) )
+ if ( button && ( index == Toolkit::Button::PROPERTY_DISABLED ) )
{
- GetImplementation( button ).SetDimmed( value.Get<bool>() );
+ GetImplementation( button ).SetDisabled( value.Get<bool>() );
}
}
{
Toolkit::Button button = Toolkit::Button::DownCast( Dali::BaseHandle( object ) );
- if ( button && ( propertyIndex == Toolkit::Button::PROPERTY_DIMMED ) )
+ if ( button && ( propertyIndex == Toolkit::Button::PROPERTY_DISABLED ) )
{
- return Property::Value( GetImplementation( button ).mDimmed );
+ return Property::Value( GetImplementation( button ).mDisabled );
}
return Property::Value();
public:
/**
- * @copydoc Dali::Toolkit::Button::SetDimmed( bool dimmed )
+ * @copydoc Dali::Toolkit::Button::SetDisabled( bool disabled )
*/
- void SetDimmed( bool dimmed );
+ void SetDisabled( bool disabled );
/**
- * @copydoc Dali::Toolkit::Button::IsDimmed() const
+ * @copydoc Dali::Toolkit::Button::IsDisabled() const
*/
- bool IsDimmed() const;
+ bool IsDisabled() const;
/**
* @copydoc Dali::Toolkit::Button::SetAnimationTime()
* This method is called from the OnTouchEvent method when the button is down.
* Could be reimplemented in subclasses to provide specific behaviour.
*/
- virtual void OnButtonDown() { }
+ virtual void OnButtonDown();
/**
* This method is called from the OnTouchEvent method when the button is up.
* Could be reimplemented in subclasses to provide specific behaviour.
*/
- virtual void OnButtonUp() { }
+ virtual void OnButtonUp();
/**
* This method is called from the OnTouchEvent method when the touch point leaves the boundary of the button or
/**
* @copydoc Dali::Toolkit::Button::ClickedSignal()
*/
- Toolkit::Button::ClickedSignalV2& ClickedSignal();
+ Toolkit::Button::ClickedSignalType& ClickedSignal();
/**
- * @copydoc Dali::Toolkit::Button::ToggledSignal()
+ * @copydoc Dali::Toolkit::Button::StateChangedSignal()
*/
- Toolkit::Button::ToggledSignalV2& ToggledSignal();
+ Toolkit::Button::StateChangedSignalType& StateChangedSignal();
/**
* Connects a callback function with the object's signals.
// Undefined
Button& operator = ( const Button& );
-protected: // Signals
+protected:
enum ButtonState
{
ButtonDown, ///< The button is down.
};
- ButtonState mState; ///< Stores the button state.
-
- bool mDimmed; ///< Stores the dimmed property.
-
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.
+ Toolkit::Button::ClickedSignalType mClickedSignal; ///< Signal emitted when the button is clicked.
+ Toolkit::Button::StateChangedSignalType mStateChangedSignal; ///< Signal emitted when the button's state is changed.
TapGestureDetector mTapDetector;
+
+ ButtonState mState; ///< Stores the button state.
+
+ bool mDisabled; ///< Stores the disabled property.
};
} // namespace Internal
virtual void SetSize( Toolkit::Button& button, const Vector3& size ) = 0;
/**
- * This method is called from the Dali::Toolkit::Internal::PushButton when the \e dimmed property changes.
+ * This method is called from the Dali::Toolkit::Internal::PushButton when the \e disabled property changes.
*
* @param[inout] button The button in which all actors that form its appearance are going to be added.
- * @param[in] dimmed The dimmed state.
+ * @param[in] disabled The disabled state.
*/
- virtual void SetDimmed( Toolkit::Button& button, bool dimmed ) = 0;
+ virtual void SetDisabled( Toolkit::Button& button, bool disabled ) = 0;
/**
* Sets the animation time.
const float ANIMATION_TIME( 0.26f ); // EFL checkbox tick time
-const std::string PERCENTAGE_PARENT_SIZE_PROPERTY_NAME( "percentage-parent-size" );
-
-
-/**
- * Constraint to wrap an actor in y that is moving vertically
- */
-Vector3 EqualToPercentageWidthConstraint( const Vector3& current,
- const PropertyInput& percentageProperty,
- const PropertyInput& parentSizeProperty )
-{
- float percentage = percentageProperty.GetFloat();
- const Vector3& parentSize = parentSizeProperty.GetVector3();
-
- Vector3 size( parentSize );
- size.x *= percentage;
-
- return size;
-}
-
-
inline Toolkit::Internal::CheckBoxButton& GetCheckBoxButtonImpl( Toolkit::Button& button )
{
DALI_ASSERT_ALWAYS( button );
CheckBoxButtonDefaultPainter::CheckBoxButtonDefaultPainter()
: CheckBoxButtonPainter(),
- mDimmed( false ),
+ mDisabled( false ),
mPaintState( UncheckedState ),
mButton(NULL),
- mAnimationTime( ANIMATION_TIME ),
- mPercentageParentSizeProperty( Property::INVALID_INDEX )
+ mAnimationTime( ANIMATION_TIME )
{
}
}
break;
}
- case DimmedUncheckedTransition: // FALLTHROUGH
- case DimmedCheckedTransition:
+ case DisabledUncheckedTransition: // FALLTHROUGH
+ case DisabledCheckedTransition:
{
StopCheckInAnimation();
checkBox.Remove( backgroundImage );
StartCheckInAnimation();
break;
}
- case CheckedDimmedTransition: // FALLTHROUGH
- case UncheckedDimmedTransition:
+ case CheckedDisabledTransition: // FALLTHROUGH
+ case UncheckedDisabledTransition:
{
float opacity = 1.f;
if( fadeOutBackgroundImage )
break;
}
case UncheckedCheckedTransition: // FALLTHROUGH
- case DimmedCheckedTransition:
+ case DisabledCheckedTransition:
{
StopCheckInAnimation();
checkBox.Remove( checkedImage );
break;
}
case CheckedUncheckedTransition: // FALLTHROUGH
- case CheckedDimmedTransition:
+ case CheckedDisabledTransition:
{
float opacity = 1.f;
if( fadeOutCheckedImage )
ApplyCheckedConstraint( checkedImage, FOREGROUND_DEPTH );
}
-void CheckBoxButtonDefaultPainter::SetDimmedCheckedImage( Toolkit::CheckBoxButton& checkBox, Actor image )
+void CheckBoxButtonDefaultPainter::SetDisabledCheckedImage( Toolkit::CheckBoxButton& checkBox, Actor image )
{
Toolkit::Internal::CheckBoxButton& checkBoxImpl = GetImplementation( checkBox );
- Actor& dimmedCheckedImage = checkBoxImpl.GetDimmedCheckedImage();
+ Actor& disabledCheckedImage = checkBoxImpl.GetDisabledCheckedImage();
Actor& fadeOutCheckedImage = checkBoxImpl.GetFadeOutCheckedImage();
switch( mPaintState )
{
- case DimmedCheckedState:
+ case DisabledCheckedState:
{
- if( dimmedCheckedImage && dimmedCheckedImage.GetParent() )
+ if( disabledCheckedImage && disabledCheckedImage.GetParent() )
{
StopCheckOutAnimation( checkBox );
- FadeOutImage( checkBox, Foreground, dimmedCheckedImage );
+ FadeOutImage( checkBox, Foreground, disabledCheckedImage );
- dimmedCheckedImage = image;
+ disabledCheckedImage = image;
- FadeInImage( checkBox, dimmedCheckedImage );
+ FadeInImage( checkBox, disabledCheckedImage );
StartCheckOutAnimation( checkBox );
StartCheckInAnimation();
}
else
{
- dimmedCheckedImage = image;
- checkBox.Add( dimmedCheckedImage );
+ disabledCheckedImage = image;
+ checkBox.Add( disabledCheckedImage );
}
break;
}
- case CheckedDimmedTransition:
+ case CheckedDisabledTransition:
{
StopCheckInAnimation();
- checkBox.Remove( dimmedCheckedImage );
+ checkBox.Remove( disabledCheckedImage );
- dimmedCheckedImage = image;
+ disabledCheckedImage = image;
- FadeInImage( checkBox, dimmedCheckedImage );
+ FadeInImage( checkBox, disabledCheckedImage );
StartCheckInAnimation();
break;
}
- case DimmedCheckedTransition:
+ case DisabledCheckedTransition:
{
float opacity = 1.f;
if( fadeOutCheckedImage )
StopCheckOutAnimation( checkBox );
// Replaces the button image.
- dimmedCheckedImage = image;
+ disabledCheckedImage = image;
- checkBox.Add( dimmedCheckedImage );
- FadeOutImage( checkBox, Foreground, dimmedCheckedImage, opacity );
+ checkBox.Add( disabledCheckedImage );
+ FadeOutImage( checkBox, Foreground, disabledCheckedImage, opacity );
StartCheckOutAnimation( checkBox );
break;
}
default:
{
- dimmedCheckedImage = image;
+ disabledCheckedImage = image;
break;
}
}
- dimmedCheckedImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- dimmedCheckedImage.SetParentOrigin( ParentOrigin::TOP_LEFT );
- ApplyConstraint( dimmedCheckedImage, FOREGROUND_DEPTH );
+ disabledCheckedImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ disabledCheckedImage.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ ApplyConstraint( disabledCheckedImage, FOREGROUND_DEPTH );
}
-void CheckBoxButtonDefaultPainter::SetDimmedBackgroundImage( Toolkit::CheckBoxButton& checkBox, Actor image )
+void CheckBoxButtonDefaultPainter::SetDisabledBackgroundImage( Toolkit::CheckBoxButton& checkBox, Actor image )
{
Toolkit::Internal::CheckBoxButton& checkBoxImpl = GetImplementation( checkBox );
- Actor& dimmedBackgroundImage = checkBoxImpl.GetDimmedBackgroundImage();
+ Actor& disabledBackgroundImage = checkBoxImpl.GetDisabledBackgroundImage();
Actor& fadeOutBackgroundImage = checkBoxImpl.GetFadeOutBackgroundImage();
switch( mPaintState )
{
- case DimmedCheckedState: // FALLTHROUGH
- case DimmedUncheckedState:
+ case DisabledCheckedState: // FALLTHROUGH
+ case DisabledUncheckedState:
{
- if( dimmedBackgroundImage && dimmedBackgroundImage.GetParent() )
+ if( disabledBackgroundImage && disabledBackgroundImage.GetParent() )
{
StopCheckOutAnimation( checkBox );
- FadeOutImage( checkBox, Background, dimmedBackgroundImage );
+ FadeOutImage( checkBox, Background, disabledBackgroundImage );
- dimmedBackgroundImage = image;
+ disabledBackgroundImage = image;
- FadeInImage( checkBox, dimmedBackgroundImage );
+ FadeInImage( checkBox, disabledBackgroundImage );
StartCheckOutAnimation( checkBox );
StartCheckInAnimation();
}
else
{
- dimmedBackgroundImage = image;
- checkBox.Add( dimmedBackgroundImage );
+ disabledBackgroundImage = image;
+ checkBox.Add( disabledBackgroundImage );
}
break;
}
- case UncheckedDimmedTransition: // FALLTHROUGH
- case CheckedDimmedTransition:
+ case UncheckedDisabledTransition: // FALLTHROUGH
+ case CheckedDisabledTransition:
{
StopCheckInAnimation();
- checkBox.Remove( dimmedBackgroundImage );
+ checkBox.Remove( disabledBackgroundImage );
- dimmedBackgroundImage = image;
+ disabledBackgroundImage = image;
- FadeInImage( checkBox, dimmedBackgroundImage );
+ FadeInImage( checkBox, disabledBackgroundImage );
StartCheckInAnimation();
break;
}
- case DimmedUncheckedTransition: // FALLTHROUGH
- case DimmedCheckedTransition:
+ case DisabledUncheckedTransition: // FALLTHROUGH
+ case DisabledCheckedTransition:
{
float opacity = 1.f;
if( fadeOutBackgroundImage )
StopCheckOutAnimation( checkBox );
// Replaces the button image.
- dimmedBackgroundImage = image;
+ disabledBackgroundImage = image;
- checkBox.Add( dimmedBackgroundImage );
- FadeOutImage( checkBox, Background, dimmedBackgroundImage, opacity );
+ checkBox.Add( disabledBackgroundImage );
+ FadeOutImage( checkBox, Background, disabledBackgroundImage, opacity );
StartCheckOutAnimation( checkBox );
break;
}
default:
{
- dimmedBackgroundImage = image;
+ disabledBackgroundImage = image;
break;
}
}
- dimmedBackgroundImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- dimmedBackgroundImage.SetParentOrigin( ParentOrigin::TOP_LEFT );
- ApplyConstraint( dimmedBackgroundImage, BACKGROUND_DEPTH );
+ disabledBackgroundImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ disabledBackgroundImage.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ ApplyConstraint( disabledBackgroundImage, BACKGROUND_DEPTH );
}
void CheckBoxButtonDefaultPainter::Initialize( Toolkit::Button& button )
Toolkit::Internal::CheckBoxButton& buttonImpl = GetCheckBoxButtonImpl( button );
Actor& backgroundImage = buttonImpl.GetBackgroundImage();
Actor& checkedImage = buttonImpl.GetCheckedImage();
- Actor& dimmedBackgroundImage = buttonImpl.GetDimmedBackgroundImage();
- Actor& dimmedCheckedImage = buttonImpl.GetDimmedCheckedImage();
+ Actor& disabledBackgroundImage = buttonImpl.GetDisabledBackgroundImage();
+ Actor& disabledCheckedImage = buttonImpl.GetDisabledCheckedImage();
Toolkit::CheckBoxButton& checkBox = static_cast<Toolkit::CheckBoxButton&>( button );
SetCheckedImage( checkBox, checkedImage );
}
- if( dimmedBackgroundImage )
+ if( disabledBackgroundImage )
{
- SetDimmedBackgroundImage( checkBox, dimmedBackgroundImage );
+ SetDisabledBackgroundImage( checkBox, disabledBackgroundImage );
}
- if( dimmedCheckedImage )
+ if( disabledCheckedImage )
{
- SetDimmedCheckedImage( checkBox, dimmedCheckedImage );
+ SetDisabledCheckedImage( checkBox, disabledCheckedImage );
}
- SetDimmed( button, mDimmed );
+ SetDisabled( button, mDisabled );
}
void CheckBoxButtonDefaultPainter::SetSize( Toolkit::Button& button, const Vector3& size )
Toolkit::Internal::CheckBoxButton& buttonImpl = GetCheckBoxButtonImpl( button );
Actor& backgroundImage = buttonImpl.GetBackgroundImage();
Actor& checkedImage = buttonImpl.GetCheckedImage();
- Actor& dimmedBackgroundImage = buttonImpl.GetDimmedBackgroundImage();
- Actor& dimmedCheckedImage = buttonImpl.GetDimmedCheckedImage();
+ Actor& disabledBackgroundImage = buttonImpl.GetDisabledBackgroundImage();
+ Actor& disabledCheckedImage = buttonImpl.GetDisabledCheckedImage();
ApplyCheckedConstraint( checkedImage, FOREGROUND_DEPTH );
ApplyConstraint( backgroundImage, BACKGROUND_DEPTH );
- ApplyConstraint( dimmedCheckedImage, FOREGROUND_DEPTH );
- ApplyConstraint( dimmedBackgroundImage, BACKGROUND_DEPTH );
+ ApplyConstraint( disabledCheckedImage, FOREGROUND_DEPTH );
+ ApplyConstraint( disabledBackgroundImage, BACKGROUND_DEPTH );
}
-void CheckBoxButtonDefaultPainter::SetDimmed( Toolkit::Button& button, bool dimmed )
+void CheckBoxButtonDefaultPainter::SetDisabled( Toolkit::Button& button, bool disabled )
{
- mDimmed = dimmed;
+ mDisabled = disabled;
Toolkit::Internal::CheckBoxButton& buttonImpl = GetCheckBoxButtonImpl( button );
Actor& backgroundImage = buttonImpl.GetBackgroundImage();
Actor& checkedImage = buttonImpl.GetCheckedImage();
- Actor& dimmedBackgroundImage = buttonImpl.GetDimmedBackgroundImage();
- Actor& dimmedCheckedImage = buttonImpl.GetDimmedCheckedImage();
+ Actor& disabledBackgroundImage = buttonImpl.GetDisabledBackgroundImage();
+ Actor& disabledCheckedImage = buttonImpl.GetDisabledCheckedImage();
Actor& fadeOutCheckedImage = buttonImpl.GetFadeOutCheckedImage();
Actor& fadeOutBackgroundImage = buttonImpl.GetFadeOutBackgroundImage();
{
case UncheckedState:
{
- if( dimmed )
+ if( disabled )
{
StopCheckOutAnimation( checkBox );
FadeOutImage( checkBox, Background, backgroundImage );
- FadeInImage( checkBox, dimmedBackgroundImage );
+ FadeInImage( checkBox, disabledBackgroundImage );
StartCheckOutAnimation( checkBox );
StartCheckInAnimation();
- mPaintState = UncheckedDimmedTransition;
+ mPaintState = UncheckedDisabledTransition;
}
break;
}
case CheckedState:
{
- if( dimmed )
+ if( disabled )
{
StopCheckOutAnimation( checkBox );
FadeOutImage( checkBox, Background, backgroundImage );
FadeOutImage( checkBox, Foreground, checkedImage );
- FadeInImage( checkBox, dimmedCheckedImage );
- FadeInImage( checkBox, dimmedBackgroundImage );
+ FadeInImage( checkBox, disabledCheckedImage );
+ FadeInImage( checkBox, disabledBackgroundImage );
StartCheckOutAnimation( checkBox );
StartCheckInAnimation();
- mPaintState = CheckedDimmedTransition;
+ mPaintState = CheckedDisabledTransition;
}
break;
}
- case DimmedUncheckedState:
+ case DisabledUncheckedState:
{
- if( !dimmed )
+ if( !disabled )
{
StopCheckOutAnimation( checkBox );
- FadeOutImage( checkBox, Background, dimmedBackgroundImage );
+ FadeOutImage( checkBox, Background, disabledBackgroundImage );
FadeInImage( checkBox, backgroundImage );
StartCheckOutAnimation( checkBox );
StartCheckInAnimation();
- mPaintState = DimmedUncheckedTransition;
+ mPaintState = DisabledUncheckedTransition;
}
break;
}
- case DimmedCheckedState:
+ case DisabledCheckedState:
{
- if( !dimmed )
+ if( !disabled )
{
StopCheckOutAnimation( checkBox );
- FadeOutImage( checkBox, Background, dimmedBackgroundImage );
- FadeOutImage( checkBox, Foreground, dimmedCheckedImage );
+ FadeOutImage( checkBox, Background, disabledBackgroundImage );
+ FadeOutImage( checkBox, Foreground, disabledCheckedImage );
FadeInImage( checkBox, backgroundImage );
FadeInImage( checkBox, checkedImage );
StartCheckOutAnimation( checkBox );
StartCheckInAnimation();
- mPaintState = DimmedCheckedTransition;
+ mPaintState = DisabledCheckedTransition;
}
break;
}
case UncheckedCheckedTransition:
{
- if( dimmed )
+ if( disabled )
{
float opacity = 1.f;
if( checkedImage )
FadeOutImage( checkBox, Foreground, checkedImage, opacity );
FadeOutImage( checkBox, Background, backgroundImage );
- FadeInImage( checkBox, dimmedCheckedImage );
- FadeInImage( checkBox, dimmedBackgroundImage );
+ FadeInImage( checkBox, disabledCheckedImage );
+ FadeInImage( checkBox, disabledBackgroundImage );
StartCheckOutAnimation( checkBox );
StartCheckInAnimation();
- mPaintState = CheckedDimmedTransition;
+ mPaintState = CheckedDisabledTransition;
}
break;
}
case CheckedUncheckedTransition:
{
- if( dimmed )
+ if( disabled )
{
float opacity = 1.f;
if( fadeOutCheckedImage )
StopCheckOutAnimation( checkBox );
StopCheckInAnimation();
- button.Add( dimmedCheckedImage );
- FadeOutImage( checkBox, Foreground, dimmedCheckedImage, opacity );
+ button.Add( disabledCheckedImage );
+ FadeOutImage( checkBox, Foreground, disabledCheckedImage, opacity );
FadeOutImage( checkBox, Background, backgroundImage );
- FadeInImage( checkBox, dimmedBackgroundImage );
+ FadeInImage( checkBox, disabledBackgroundImage );
StartCheckOutAnimation( checkBox );
StartCheckInAnimation();
- mPaintState = UncheckedDimmedTransition;
+ mPaintState = UncheckedDisabledTransition;
}
break;
}
- case UncheckedDimmedTransition:
+ case UncheckedDisabledTransition:
{
- if( !dimmed )
+ if( !disabled )
{
float opacity = 1.f;
if( fadeOutBackgroundImage )
StopCheckOutAnimation( checkBox, false );
StopCheckInAnimation();
- FadeOutImage( checkBox, Background, dimmedBackgroundImage, 1.f - opacity );
+ FadeOutImage( checkBox, Background, disabledBackgroundImage, 1.f - opacity );
FadeInImage( checkBox, backgroundImage, opacity );
StartCheckOutAnimation( checkBox );
StartCheckInAnimation();
- mPaintState = DimmedUncheckedTransition;
+ mPaintState = DisabledUncheckedTransition;
}
break;
}
- case DimmedUncheckedTransition:
+ case DisabledUncheckedTransition:
{
- if( dimmed )
+ if( disabled )
{
float opacity = 1.f;
if( fadeOutBackgroundImage )
StopCheckInAnimation();
FadeOutImage( checkBox, Background, backgroundImage, 1.f - opacity );
- FadeInImage( checkBox, dimmedBackgroundImage, opacity );
+ FadeInImage( checkBox, disabledBackgroundImage, opacity );
StartCheckOutAnimation( checkBox );
StartCheckInAnimation();
- mPaintState = UncheckedDimmedTransition;
+ mPaintState = UncheckedDisabledTransition;
}
break;
}
- case CheckedDimmedTransition:
+ case CheckedDisabledTransition:
{
- if( !dimmed )
+ if( !disabled )
{
float opacity = 1.f;
if( fadeOutBackgroundImage )
StopCheckOutAnimation( checkBox, false );
StopCheckInAnimation();
- FadeOutImage( checkBox, Foreground, dimmedCheckedImage, 1.f - opacity );
- FadeOutImage( checkBox, Background, dimmedBackgroundImage, 1.f - opacity );
+ FadeOutImage( checkBox, Foreground, disabledCheckedImage, 1.f - opacity );
+ FadeOutImage( checkBox, Background, disabledBackgroundImage, 1.f - opacity );
FadeInImage( checkBox, checkedImage, opacity );
FadeInImage( checkBox, backgroundImage, opacity );
StartCheckOutAnimation( checkBox );
StartCheckInAnimation();
- mPaintState = DimmedCheckedTransition;
+ mPaintState = DisabledCheckedTransition;
}
break;
}
- case DimmedCheckedTransition:
+ case DisabledCheckedTransition:
{
- if( dimmed )
+ if( disabled )
{
float opacity = 1.f;
if( fadeOutBackgroundImage )
FadeOutImage( checkBox, Foreground, checkedImage, 1.f - opacity );
FadeOutImage( checkBox, Background, backgroundImage, 1.f - opacity );
- FadeInImage( checkBox, dimmedCheckedImage, opacity );
- FadeInImage( checkBox, dimmedBackgroundImage, opacity );
+ FadeInImage( checkBox, disabledCheckedImage, opacity );
+ FadeInImage( checkBox, disabledBackgroundImage, opacity );
StartCheckOutAnimation( checkBox );
StartCheckInAnimation();
- mPaintState = CheckedDimmedTransition;
+ mPaintState = CheckedDisabledTransition;
}
break;
}
FadeOutImage( button, Foreground, checkedImage );
StartCheckOutAnimation( button );
- if( button.GetProperty<bool>( button.GetPropertyIndex( Toolkit::CheckBoxButton::USE_FADE_ANIMATION_PROPERTY_NAME ) ) )
- {
- mPaintState = CheckedUncheckedTransition;
- }
- else
- {
- mPaintState = UncheckedState;
- }
+ mPaintState = UncheckedState;
break;
}
case UncheckedCheckedTransition:
FadeOutImage( button, Foreground, checkedImage, opacity );
StartCheckOutAnimation( button );
- if( button.GetProperty<bool>( button.GetPropertyIndex( Toolkit::CheckBoxButton::USE_FADE_ANIMATION_PROPERTY_NAME ) ) )
- {
- mPaintState = CheckedUncheckedTransition;
- }
- else
- {
- mPaintState = UncheckedState;
- }
+ mPaintState = UncheckedState;
break;
}
case CheckedUncheckedTransition:
{
if( actor )
{
- if( mPercentageParentSizeProperty == Property::INVALID_INDEX )
- {
- mPercentageParentSizeProperty = actor.RegisterProperty( PERCENTAGE_PARENT_SIZE_PROPERTY_NAME, 1.0f );
- }
-
actor.RemoveConstraints();
- actor.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE,
- LocalSource( mPercentageParentSizeProperty ),
- ParentSource( Actor::SIZE ),
- EqualToPercentageWidthConstraint ) );
+ actor.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
actor.SetZ( depth );
}
}
checkBox.Add( image );
}
- if( checkBox.GetProperty<bool>( checkBox.GetPropertyIndex( Toolkit::CheckBoxButton::USE_FADE_ANIMATION_PROPERTY_NAME ) ) )
- {
- image.SetOpacity( opacity );
- AddToFadeInAnimation( image );
- }
- else
- {
- image.SetOpacity( 1.0f );
- }
+ image.SetOpacity( 1.0f );
}
}
actorLayer = image;
- if( checkBox.GetProperty<bool>( checkBox.GetPropertyIndex( Toolkit::CheckBoxButton::USE_FADE_ANIMATION_PROPERTY_NAME ) ) )
- {
- actorLayer.SetOpacity( opacity );
- AddToFadeOutAnimation( actorLayer );
- }
- else
- {
- actorLayer.SetOpacity( 0.0f );
- }
+ actorLayer.SetOpacity( 0.0f );
}
}
// Actor size anim
Handle handle = actor; // Get rid of const
- mCheckInAnimation.AnimateTo( Property( handle, mPercentageParentSizeProperty ), 1.0f );
+ mCheckInAnimation.AnimateTo( Property( handle, Actor::SCALE_X ), 1.0f);
}
void CheckBoxButtonDefaultPainter::SetupCheckedAnimation( Toolkit::CheckBoxButton& checkBox, Actor& image )
{
- if( checkBox.GetProperty<bool>( checkBox.GetPropertyIndex( Toolkit::CheckBoxButton::USE_CHECK_ANIMATION_PROPERTY_NAME ) ) && image )
+ if( image )
{
if( !mTickUVEffect )
{
imageActor.SetShaderEffect( mTickUVEffect );
}
- // Register a custom property to animate size of tick over
- if( mPercentageParentSizeProperty != Property::INVALID_INDEX )
- {
- image.SetProperty( mPercentageParentSizeProperty, 0.0f );
- }
+ image.SetScale( Vector3( 0.0f, 1.0f, 1.0f ) );
mTickUVEffect.SetBottomRight( Vector2( 0.0f, 1.0f ) );
mPaintState = UncheckedState;
break;
}
- case UncheckedDimmedTransition:
+ case UncheckedDisabledTransition:
{
- mPaintState = DimmedUncheckedState;
+ mPaintState = DisabledUncheckedState;
break;
}
- case DimmedUncheckedTransition:
+ case DisabledUncheckedTransition:
{
mPaintState = UncheckedState;
break;
}
- case CheckedDimmedTransition:
+ case CheckedDisabledTransition:
{
- mPaintState = DimmedCheckedState;
+ mPaintState = DisabledCheckedState;
break;
}
- case DimmedCheckedTransition:
+ case DisabledCheckedTransition:
{
mPaintState = CheckedState;
break;
mPaintState = UncheckedState;
break;
}
- case UncheckedDimmedTransition:
+ case UncheckedDisabledTransition:
{
- mPaintState = DimmedUncheckedState;
+ mPaintState = DisabledUncheckedState;
break;
}
- case DimmedUncheckedTransition:
+ case DisabledUncheckedTransition:
{
mPaintState = UncheckedState;
break;
}
- case CheckedDimmedTransition:
+ case CheckedDisabledTransition:
{
- mPaintState = DimmedCheckedState;
+ mPaintState = DisabledCheckedState;
break;
}
- case DimmedCheckedTransition:
+ case DisabledCheckedTransition:
{
mPaintState = CheckedState;
break;
void SetCheckedImage( Toolkit::CheckBoxButton& checkBox, Actor image );
/**
- * Sets the dimmed backgroundimage.
+ * Sets the disabled backgroundimage.
*
- * It adds the dimmed backgroundimage to the root actor and creates the image transition if needed.
+ * It adds the disabled backgroundimage to the root actor and creates the image transition if needed.
*
* @param[inout] checkBox The button in which all actors that form its appearance are going to be added.
- * @param[in] image The dimmed backgroundimage.
+ * @param[in] image The disabled backgroundimage.
*/
- void SetDimmedBackgroundImage( Toolkit::CheckBoxButton& checkBox, Actor image );
+ void SetDisabledBackgroundImage( Toolkit::CheckBoxButton& checkBox, Actor image );
/**
- * Sets the dimmed checked image.
+ * Sets the disabled checked image.
*
- * It adds the dimmed checked image to the root actor and creates the image transition if needed.
+ * It adds the disabled checked image to the root actor and creates the image transition if needed.
*
* @param[inout] checkBox The button in which all actors that form its appearance are going to be added.
- * @param[in] image The dimmed checked image.
+ * @param[in] image The disabled checked image.
*/
- void SetDimmedCheckedImage( Toolkit::CheckBoxButton& checkBox, Actor image );
+ void SetDisabledCheckedImage( Toolkit::CheckBoxButton& checkBox, Actor image );
/////////////////////////////////////////////////////////////////////////////
// ButtonPainter interface
void SetSize( Toolkit::Button& button, const Vector3& size );
/**
- * Changes the Vega::Toolkit::CheckBoxButton for the given dimmed state.
+ * Changes the Vega::Toolkit::CheckBoxButton for the given disabled state.
*
* It creates the image transition if needed.
*
* @param[inout] button The button in which all actors that form its appearance are going to be added.
- * @param[in] dimmed The dimmed state.
+ * @param[in] disabled The disabled state.
*/
- void SetDimmed( Toolkit::Button& button, bool dimmed );
+ void SetDisabled( Toolkit::Button& button, bool disabled );
/**
* Sets the animation time.
*/
enum PaintState
{
- UncheckedState, ///< The check box button is unchecked.
- CheckedState, ///< The check box button is checked.
- DimmedUncheckedState, ///< The check box button is dimmed and unchecked.
- DimmedCheckedState, ///< The check box button is dimmed and checked.
- UncheckedCheckedTransition, ///< The check box button is in transition from unchecked to checked.
- CheckedUncheckedTransition, ///< The check box button is in transition from checked to unchecked.
- UncheckedDimmedTransition, ///< The check box button is in transition from unchecked to dimmed.
- DimmedUncheckedTransition, ///< The check box button is in transition from dimmed to unchecked.
- CheckedDimmedTransition, ///< The check box button is in transition from checked to dimmed.
- DimmedCheckedTransition ///< The check box button is in transition from dimmed to checked.
+ UncheckedState, ///< The check box button is unchecked.
+ CheckedState, ///< The check box button is checked.
+ DisabledUncheckedState, ///< The check box button is disabled and unchecked.
+ DisabledCheckedState, ///< The check box button is disabled and checked.
+ UncheckedCheckedTransition, ///< The check box button is in transition from unchecked to checked.
+ CheckedUncheckedTransition, ///< The check box button is in transition from checked to unchecked.
+ UncheckedDisabledTransition, ///< The check box button is in transition from unchecked to disabled.
+ DisabledUncheckedTransition, ///< The check box button is in transition from disabled to unchecked.
+ CheckedDisabledTransition, ///< The check box button is in transition from checked to disabled.
+ DisabledCheckedTransition ///< The check box button is in transition from disabled to checked.
};
/**
void CheckInAnimationFinished( Dali::Animation& source );
private:
- bool mDimmed; ///< Stores the dimmed property.
+ bool mDisabled; ///< Stores the disabled property.
PaintState mPaintState; ///< The painter state.
void CheckBoxButton::SetChecked( bool checked )
{
- if( !mDimmed && ( checked != mChecked ) )
+ if( !mDisabled && ( checked != mChecked ) )
{
// Stores the state.
mChecked = checked;
// Notifies the painter the checkbox has been checked.
GetCheckBoxButtonPainter( mPainter )->Checked( handle );
- // Raise toggled signal
- mToggledSignalV2.Emit( handle, mChecked );
+ // Raise state changed signal
+ mStateChangedSignal.Emit( handle, mChecked );
}
}
return mCheckedImage;
}
-void CheckBoxButton::SetDimmedBackgroundImage( Image image )
+void CheckBoxButton::SetDisabledBackgroundImage( Image image )
{
- SetDimmedBackgroundImage( ImageActor::New( image ) );
+ SetDisabledBackgroundImage( ImageActor::New( image ) );
}
-void CheckBoxButton::SetDimmedBackgroundImage( Actor image )
+void CheckBoxButton::SetDisabledBackgroundImage( Actor image )
{
Toolkit::CheckBoxButton handle( GetOwner() );
- GetCheckBoxButtonPainter( mPainter )->SetDimmedBackgroundImage( handle, image );
+ GetCheckBoxButtonPainter( mPainter )->SetDisabledBackgroundImage( handle, image );
}
-Actor& CheckBoxButton::GetDimmedBackgroundImage()
+Actor& CheckBoxButton::GetDisabledBackgroundImage()
{
- return mDimmedBackgroundImage;
+ return mDisabledBackgroundImage;
}
-Actor CheckBoxButton::GetDimmedBackgroundImage() const
+Actor CheckBoxButton::GetDisabledBackgroundImage() const
{
- return mDimmedBackgroundImage;
+ return mDisabledBackgroundImage;
}
-void CheckBoxButton::SetDimmedCheckedImage( Image image )
+void CheckBoxButton::SetDisabledCheckedImage( Image image )
{
- SetDimmedCheckedImage( ImageActor::New( image ) );
+ SetDisabledCheckedImage( ImageActor::New( image ) );
}
-void CheckBoxButton::SetDimmedCheckedImage( Actor image )
+void CheckBoxButton::SetDisabledCheckedImage( Actor image )
{
Toolkit::CheckBoxButton handle( GetOwner() );
- GetCheckBoxButtonPainter( mPainter )->SetDimmedCheckedImage( handle, image );
+ GetCheckBoxButtonPainter( mPainter )->SetDisabledCheckedImage( handle, image );
}
-Actor& CheckBoxButton::GetDimmedCheckedImage()
+Actor& CheckBoxButton::GetDisabledCheckedImage()
{
- return mDimmedCheckedImage;
+ return mDisabledCheckedImage;
}
-Actor CheckBoxButton::GetDimmedCheckedImage() const
+Actor CheckBoxButton::GetDisabledCheckedImage() const
{
- return mDimmedCheckedImage;
+ return mDisabledCheckedImage;
}
Actor& CheckBoxButton::GetFadeOutBackgroundImage()
void CheckBoxButton::OnButtonInitialize()
{
- mUseFadeAnimationProperty = Self().RegisterProperty( Toolkit::CheckBoxButton::USE_FADE_ANIMATION_PROPERTY_NAME, false );
- mUseCheckAnimationProperty = Self().RegisterProperty( Toolkit::CheckBoxButton::USE_CHECK_ANIMATION_PROPERTY_NAME, true );
}
void CheckBoxButton::OnButtonUp()
CheckBoxButton::CheckBoxButton()
: Button(),
mChecked( false ),
- mClickActionPerforming(false),
- mUseFadeAnimationProperty(Property::INVALID_INDEX),
- mUseCheckAnimationProperty(Property::INVALID_INDEX)
+ mClickActionPerforming(false)
{
// Creates specific painter.
mPainter = new CheckBoxButtonDefaultPainter();
Actor GetCheckedImage() const;
/**
- * @copydoc Dali::Toolkit::CheckBoxButton::SetDimmedBackgroundImage( Image image )
+ * @copydoc Dali::Toolkit::CheckBoxButton::SetDisabledBackgroundImage( Image image )
*/
- void SetDimmedBackgroundImage( Image image );
+ void SetDisabledBackgroundImage( Image image );
/**
- * @copydoc Dali::Toolkit::CheckBoxButton::SetDimmedBackgroundImage( Actor image )
+ * @copydoc Dali::Toolkit::CheckBoxButton::SetDisabledBackgroundImage( Actor image )
*/
- void SetDimmedBackgroundImage( Actor image );
+ void SetDisabledBackgroundImage( Actor image );
/**
* Used by the painter only.
- * @return A reference to the dimmed background image.
+ * @return A reference to the disabled background image.
*/
- Actor& GetDimmedBackgroundImage();
+ Actor& GetDisabledBackgroundImage();
/**
- * @copydoc Dali::Toolkit::CheckBoxButton::GetDimmedBackgroundImage()
+ * @copydoc Dali::Toolkit::CheckBoxButton::GetDisabledBackgroundImage()
*/
- Actor GetDimmedBackgroundImage() const;
+ Actor GetDisabledBackgroundImage() const;
/**
- * @copydoc Dali::Toolkit::CheckBoxButton::SetDimmedCheckedImage( Image image )
+ * @copydoc Dali::Toolkit::CheckBoxButton::SetDisabledCheckedImage( Image image )
*/
- void SetDimmedCheckedImage( Image image );
+ void SetDisabledCheckedImage( Image image );
/**
- * @copydoc Dali::Toolkit::CheckBoxButton::SetDimmedCheckedImage( Actor image )
+ * @copydoc Dali::Toolkit::CheckBoxButton::SetDisabledCheckedImage( Actor image )
*/
- void SetDimmedCheckedImage( Actor image );
+ void SetDisabledCheckedImage( Actor image );
/**
* Used by the painter only.
- * @return A reference to the dimmed checked image.
+ * @return A reference to the disabled checked image.
*/
- Actor& GetDimmedCheckedImage();
+ Actor& GetDisabledCheckedImage();
/**
- * @copydoc Dali::Toolkit::CheckBoxButton::GetDimmedCheckedImage()
+ * @copydoc Dali::Toolkit::CheckBoxButton::GetDisabledCheckedImage()
*/
- Actor GetDimmedCheckedImage() const;
+ Actor GetDisabledCheckedImage() const;
/**
* Used by the painter only.
Actor mBackgroundImage; ///< Stores the background image.
Actor mCheckedImage; ///< Stores the checked image.
- Actor mDimmedCheckedImage; ///< Stores the dimmed checked image.
- Actor mDimmedBackgroundImage; ///< Stores the dimmed background image.
+ Actor mDisabledCheckedImage; ///< Stores the disabled checked image.
+ Actor mDisabledBackgroundImage; ///< Stores the disabled background image.
Actor mFadeOutBackgroundImage; ///< Stores a background image, which is in a fade out animation, to be removed when the animation finishes.
Actor mFadeOutCheckedImage; ///< Stores a foreground image, which is in a fade out animation, to be removed when the animation finishes.
// Actions
bool mClickActionPerforming;
-
- // Properties
- Property::Index mUseFadeAnimationProperty;
- Property::Index mUseCheckAnimationProperty;
};
} // namespace Internal
virtual void SetSize( Toolkit::Button& button, const Vector3& size ) = 0;
/**
- * @copydoc ButtonPainter::SetDimmed( Toolkit::Button& button, bool dimmed )
+ * @copydoc ButtonPainter::SetDisabled( Toolkit::Button& button, bool disabled )
*/
- virtual void SetDimmed( Toolkit::Button& button, bool dimmed ) = 0;
+ virtual void SetDisabled( Toolkit::Button& button, bool disabled ) = 0;
/**
* @copydoc ButtonPainter::SetAnimationTime()
PushButtonDefaultPainter::PushButtonDefaultPainter()
: PushButtonPainter(),
mAutoRepeating( false ),
- mDimmed( false ),
+ mDisabled( false ),
mPaintState( ReleasedState ),
mButton( NULL ),
mAnimationTime( ANIMATION_TIME ),
break;
}
case ReleasedPressedTransition: // FALLTHROUGH
- case ReleasedDimmedTransition:
+ case ReleasedDisabledTransition:
{
float opacity = 1.f;
if( fadeOutButtonImage )
break;
}
case PressedReleasedTransition: // FALLTHROUGH
- case DimmedReleasedTransition:
+ case DisabledReleasedTransition:
{
StopFadeInAnimation();
pushButton.Remove( buttonImage );
}
break;
}
- case ReleasedDimmedTransition: // FALLTHROUGH
- case PressedDimmedTransition:
+ case ReleasedDisabledTransition: // FALLTHROUGH
+ case PressedDisabledTransition:
{
float opacity = 1.f;
if( fadeOutBackgroundImage )
StartFadeOutAnimation( pushButton );
break;
}
- case DimmedReleasedTransition: // FALLTHROUGH
- case DimmedPressedTransition:
+ case DisabledReleasedTransition: // FALLTHROUGH
+ case DisabledPressedTransition:
{
StopFadeInAnimation();
pushButton.Remove( backgroundImage );
ApplyConstraint( backgroundImage, BACKGROUND_DEPTH );
}
-void PushButtonDefaultPainter::SetPressedImage( Toolkit::PushButton& pushButton, Actor image )
+void PushButtonDefaultPainter::SetSelectedImage( Toolkit::PushButton& pushButton, Actor image )
{
Toolkit::Internal::PushButton& pushButtonImpl = GetImplementation( pushButton );
- Actor& pressedImage = pushButtonImpl.GetPressedImage();
+ Actor& selectedImage = pushButtonImpl.GetSelectedImage();
Actor& fadeOutButtonImage = pushButtonImpl.GetFadeOutButtonImage();
switch( mPaintState )
{
case PressedState:
{
- if( pressedImage && pressedImage.GetParent() )
+ if( selectedImage && selectedImage.GetParent() )
{
StopFadeOutAnimation( pushButton );
- FadeOutImage( pushButton, Foreground, pressedImage );
+ FadeOutImage( pushButton, Foreground, selectedImage );
- pressedImage = image;
+ selectedImage = image;
- FadeInImage( pushButton, pressedImage );
+ FadeInImage( pushButton, selectedImage );
StartFadeOutAnimation( pushButton );
StartFadeInAnimation();
}
else
{
- pressedImage = image;
- pushButton.Add( pressedImage );
+ selectedImage = image;
+ pushButton.Add( selectedImage );
}
break;
}
case PressedReleasedTransition: // FALLTHROUGH
- case PressedDimmedTransition:
+ case PressedDisabledTransition:
{
float opacity = 1.f;
if( fadeOutButtonImage )
StopFadeOutAnimation( pushButton );
// Replaces the button image.
- pressedImage = image;
+ selectedImage = image;
- pushButton.Add( pressedImage );
- FadeOutImage( pushButton, Foreground, pressedImage, opacity );
+ pushButton.Add( selectedImage );
+ FadeOutImage( pushButton, Foreground, selectedImage, opacity );
StartFadeOutAnimation( pushButton );
break;
}
case ReleasedPressedTransition: // FALLTHROUGH
- case DimmedPressedTransition:
+ case DisabledPressedTransition:
{
StopFadeInAnimation();
- pushButton.Remove( pressedImage );
+ pushButton.Remove( selectedImage );
- pressedImage = image;
+ selectedImage = image;
- FadeInImage( pushButton, pressedImage );
+ FadeInImage( pushButton, selectedImage );
StartFadeInAnimation();
break;
}
default:
- pressedImage = image;
+ selectedImage = image;
break;
}
- pressedImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- pressedImage.SetParentOrigin( ParentOrigin::TOP_LEFT );
- ApplyConstraint( pressedImage, FOREGROUND_DEPTH );
+ selectedImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ selectedImage.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ ApplyConstraint( selectedImage, FOREGROUND_DEPTH );
}
-void PushButtonDefaultPainter::SetDimmedImage( Toolkit::PushButton& pushButton, Actor image )
+void PushButtonDefaultPainter::SetDisabledImage( Toolkit::PushButton& pushButton, Actor image )
{
Toolkit::Internal::PushButton& pushButtonImpl = GetImplementation( pushButton );
- Actor& dimmedImage = pushButtonImpl.GetDimmedImage();
+ Actor& disabledImage = pushButtonImpl.GetDisabledImage();
Actor& fadeOutButtonImage = pushButtonImpl.GetFadeOutButtonImage();
switch( mPaintState )
{
- case DimmedReleasedState: // FALLTHROUGH
- case DimmedPressedState:
+ case DisabledReleasedState: // FALLTHROUGH
+ case DisabledPressedState:
{
- if( dimmedImage && dimmedImage.GetParent() )
+ if( disabledImage && disabledImage.GetParent() )
{
StopFadeOutAnimation( pushButton );
- FadeOutImage( pushButton, Foreground, dimmedImage );
+ FadeOutImage( pushButton, Foreground, disabledImage );
- dimmedImage = image;
+ disabledImage = image;
- FadeInImage( pushButton, dimmedImage );
+ FadeInImage( pushButton, disabledImage );
StartFadeOutAnimation( pushButton );
StartFadeInAnimation();
}
else
{
- dimmedImage = image;
- pushButton.Add( dimmedImage );
+ disabledImage = image;
+ pushButton.Add( disabledImage );
}
break;
}
- case ReleasedDimmedTransition: // FALLTHROUGH
- case PressedDimmedTransition:
+ case ReleasedDisabledTransition: // FALLTHROUGH
+ case PressedDisabledTransition:
{
StopFadeInAnimation();
- pushButton.Remove( dimmedImage );
+ pushButton.Remove( disabledImage );
- dimmedImage = image;
+ disabledImage = image;
- FadeInImage( pushButton, dimmedImage );
+ FadeInImage( pushButton, disabledImage );
StartFadeInAnimation();
break;
}
- case DimmedReleasedTransition: // FALLTHROUGH
- case DimmedPressedTransition:
+ case DisabledReleasedTransition: // FALLTHROUGH
+ case DisabledPressedTransition:
{
float opacity = 1.f;
if( fadeOutButtonImage )
StopFadeOutAnimation( pushButton );
// Replaces the button image.
- dimmedImage = image;
+ disabledImage = image;
- pushButton.Add( dimmedImage );
- FadeOutImage( pushButton, Foreground, dimmedImage, opacity );
+ pushButton.Add( disabledImage );
+ FadeOutImage( pushButton, Foreground, disabledImage, opacity );
StartFadeOutAnimation( pushButton );
break;
}
default:
- dimmedImage = image;
+ disabledImage = image;
break;
}
- dimmedImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- dimmedImage.SetParentOrigin( ParentOrigin::TOP_LEFT );
- ApplyConstraint( dimmedImage, FOREGROUND_DEPTH );
+ disabledImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ disabledImage.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ ApplyConstraint( disabledImage, FOREGROUND_DEPTH );
}
-void PushButtonDefaultPainter::SetDimmedBackgroundImage( Toolkit::PushButton& pushButton, Actor image )
+void PushButtonDefaultPainter::SetDisabledBackgroundImage( Toolkit::PushButton& pushButton, Actor image )
{
Toolkit::Internal::PushButton& pushButtonImpl = GetImplementation( pushButton );
- Actor& dimmedBackgroundImage = pushButtonImpl.GetDimmedBackgroundImage();
+ Actor& disabledBackgroundImage = pushButtonImpl.GetDisabledBackgroundImage();
Actor& fadeOutBackgroundImage = pushButtonImpl.GetFadeOutBackgroundImage();
switch( mPaintState )
{
- case DimmedReleasedState: // FALLTHROUGH
- case DimmedPressedState:
+ case DisabledReleasedState: // FALLTHROUGH
+ case DisabledPressedState:
{
- if( dimmedBackgroundImage && dimmedBackgroundImage.GetParent() )
+ if( disabledBackgroundImage && disabledBackgroundImage.GetParent() )
{
StopFadeOutAnimation( pushButton );
- FadeOutImage( pushButton, Background, dimmedBackgroundImage );
+ FadeOutImage( pushButton, Background, disabledBackgroundImage );
- dimmedBackgroundImage = image;
+ disabledBackgroundImage = image;
- FadeInImage( pushButton, dimmedBackgroundImage );
+ FadeInImage( pushButton, disabledBackgroundImage );
StartFadeOutAnimation( pushButton );
StartFadeInAnimation();
}
else
{
- dimmedBackgroundImage = image;
- pushButton.Add( dimmedBackgroundImage );
+ disabledBackgroundImage = image;
+ pushButton.Add( disabledBackgroundImage );
}
break;
}
- case ReleasedDimmedTransition: // FALLTHROUGH
- case PressedDimmedTransition:
+ case ReleasedDisabledTransition: // FALLTHROUGH
+ case PressedDisabledTransition:
{
StopFadeInAnimation();
- pushButton.Remove( dimmedBackgroundImage );
+ pushButton.Remove( disabledBackgroundImage );
- dimmedBackgroundImage = image;
+ disabledBackgroundImage = image;
- FadeInImage( pushButton, dimmedBackgroundImage );
+ FadeInImage( pushButton, disabledBackgroundImage );
StartFadeInAnimation();
break;
}
- case DimmedReleasedTransition: // FALLTHROUGH
- case DimmedPressedTransition:
+ case DisabledReleasedTransition: // FALLTHROUGH
+ case DisabledPressedTransition:
{
float opacity = 1.f;
if( fadeOutBackgroundImage )
StopFadeOutAnimation( pushButton );
// Replaces the button image.
- dimmedBackgroundImage = image;
+ disabledBackgroundImage = image;
- pushButton.Add( dimmedBackgroundImage );
- FadeOutImage( pushButton, Background, dimmedBackgroundImage, opacity );
+ pushButton.Add( disabledBackgroundImage );
+ FadeOutImage( pushButton, Background, disabledBackgroundImage, opacity );
StartFadeOutAnimation( pushButton );
break;
}
default:
- dimmedBackgroundImage = image;
+ disabledBackgroundImage = image;
break;
}
- dimmedBackgroundImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- dimmedBackgroundImage.SetParentOrigin( ParentOrigin::TOP_LEFT );
- ApplyConstraint( dimmedBackgroundImage, BACKGROUND_DEPTH );
+ disabledBackgroundImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ disabledBackgroundImage.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ ApplyConstraint( disabledBackgroundImage, BACKGROUND_DEPTH );
}
-void PushButtonDefaultPainter::SetLabelText( Toolkit::PushButton& pushButton, Actor text )
+void PushButtonDefaultPainter::SetLabel( Toolkit::PushButton& pushButton, Actor label )
{
Toolkit::Internal::PushButton& pushButtonImpl = GetImplementation( pushButton );
- Actor& label = pushButtonImpl.GetLabel();
+ Actor& labelActor = pushButtonImpl.GetLabel();
- if( label && label.GetParent() )
+ if( labelActor && labelActor.GetParent() )
{
- label.GetParent().Remove( label );
+ labelActor.GetParent().Remove( labelActor );
}
- label = text;
- label.SetAnchorPoint( AnchorPoint::CENTER );
- label.SetParentOrigin( ParentOrigin::CENTER );
+ labelActor = label;
+ labelActor.SetAnchorPoint( AnchorPoint::CENTER );
+ labelActor.SetParentOrigin( ParentOrigin::CENTER );
- label.SetPosition( 0.f, 0.f, LABEL_DEPTH );
- label.SetSize( mSize );
+ labelActor.SetPosition( 0.f, 0.f, LABEL_DEPTH );
+ labelActor.SetSize( mSize );
- pushButton.Add( label );
+ pushButton.Add( labelActor );
}
void PushButtonDefaultPainter::Initialize( Toolkit::Button& button )
{
Toolkit::Internal::PushButton& pushButtonImpl = GetPushButtonImpl( button );
Actor& buttonImage = pushButtonImpl.GetButtonImage();
- Actor& pressedImage = pushButtonImpl.GetPressedImage();
+ Actor& selectedImage = pushButtonImpl.GetSelectedImage();
Actor& backgroundImage = pushButtonImpl.GetBackgroundImage();
- Actor& dimmedImage = pushButtonImpl.GetDimmedImage();
- Actor& dimmedBackgroundImage = pushButtonImpl.GetDimmedBackgroundImage();
+ Actor& disabledImage = pushButtonImpl.GetDisabledImage();
+ Actor& disabledBackgroundImage = pushButtonImpl.GetDisabledBackgroundImage();
Actor& label = pushButtonImpl.GetLabel();
Toolkit::PushButton& pushButton = static_cast<Toolkit::PushButton&>( button );
SetBackgroundImage( pushButton, backgroundImage );
}
- if( pressedImage )
+ if( selectedImage )
{
- SetPressedImage( pushButton, pressedImage );
+ SetSelectedImage( pushButton, selectedImage );
}
- if( dimmedImage )
+ if( disabledImage )
{
- SetDimmedImage( pushButton, dimmedImage );
+ SetDisabledImage( pushButton, disabledImage );
}
- if( dimmedBackgroundImage )
+ if( disabledBackgroundImage )
{
- SetDimmedBackgroundImage( pushButton, dimmedBackgroundImage );
+ SetDisabledBackgroundImage( pushButton, disabledBackgroundImage );
}
if( label )
{
- SetLabelText( pushButton, label );
+ SetLabel( pushButton, label );
}
- SetDimmed( pushButton, mDimmed );
+ SetDisabled( pushButton, mDisabled );
}
void PushButtonDefaultPainter::SetSize( Toolkit::Button& button, const Vector3& size )
Toolkit::Internal::PushButton& pushButtonImpl = GetPushButtonImpl( button );
Actor& buttonImage = pushButtonImpl.GetButtonImage();
- Actor& pressedImage = pushButtonImpl.GetPressedImage();
+ Actor& selectedImage = pushButtonImpl.GetSelectedImage();
Actor& backgroundImage = pushButtonImpl.GetBackgroundImage();
- Actor& dimmedImage = pushButtonImpl.GetDimmedImage();
- Actor& dimmedBackgroundImage = pushButtonImpl.GetDimmedBackgroundImage();
+ Actor& disabledImage = pushButtonImpl.GetDisabledImage();
+ Actor& disabledBackgroundImage = pushButtonImpl.GetDisabledBackgroundImage();
Actor& label = pushButtonImpl.GetLabel();
ApplyConstraint( buttonImage, FOREGROUND_DEPTH );
ApplyConstraint( backgroundImage, BACKGROUND_DEPTH );
- ApplyConstraint( pressedImage, FOREGROUND_DEPTH );
- ApplyConstraint( dimmedImage, FOREGROUND_DEPTH );
- ApplyConstraint( dimmedBackgroundImage, BACKGROUND_DEPTH );
+ ApplyConstraint( selectedImage, FOREGROUND_DEPTH );
+ ApplyConstraint( disabledImage, FOREGROUND_DEPTH );
+ ApplyConstraint( disabledBackgroundImage, BACKGROUND_DEPTH );
if( label )
{
}
}
-void PushButtonDefaultPainter::SetDimmed( Toolkit::Button& button, bool dimmed )
+void PushButtonDefaultPainter::SetDisabled( Toolkit::Button& button, bool disabled )
{
Toolkit::Internal::PushButton& pushButtonImpl = GetPushButtonImpl( button );
Actor& buttonImage = pushButtonImpl.GetButtonImage();
- Actor& pressedImage = pushButtonImpl.GetPressedImage();
+ Actor& selectedImage = pushButtonImpl.GetSelectedImage();
Actor& backgroundImage = pushButtonImpl.GetBackgroundImage();
- Actor& dimmedImage = pushButtonImpl.GetDimmedImage();
- Actor& dimmedBackgroundImage = pushButtonImpl.GetDimmedBackgroundImage();
+ Actor& disabledImage = pushButtonImpl.GetDisabledImage();
+ Actor& disabledBackgroundImage = pushButtonImpl.GetDisabledBackgroundImage();
Actor& fadeOutButtonImage = pushButtonImpl.GetFadeOutButtonImage();
Toolkit::PushButton& pushButton = static_cast<Toolkit::PushButton&>( button );
- mDimmed = dimmed;
+ mDisabled = disabled;
switch( mPaintState )
{
case ReleasedState:
{
- if( dimmed )
+ if( disabled )
{
StopFadeOutAnimation( pushButton );
FadeOutImage( pushButton, Background, backgroundImage );
FadeOutImage( pushButton, Foreground, buttonImage );
- FadeInImage( pushButton, dimmedBackgroundImage );
- FadeInImage( pushButton, dimmedImage );
+ FadeInImage( pushButton, disabledBackgroundImage );
+ FadeInImage( pushButton, disabledImage );
StartFadeOutAnimation( pushButton );
StartFadeInAnimation();
- if( buttonImage || dimmedImage || backgroundImage || dimmedBackgroundImage )
+ if( buttonImage || disabledImage || backgroundImage || disabledBackgroundImage )
{
- mPaintState = ReleasedDimmedTransition;
+ mPaintState = ReleasedDisabledTransition;
}
else
{
- mPaintState = DimmedReleasedState;
+ mPaintState = DisabledReleasedState;
}
}
break;
}
case PressedState:
{
- if( dimmed )
+ if( disabled )
{
StopFadeOutAnimation( pushButton );
FadeOutImage( pushButton, Background, backgroundImage );
- FadeOutImage( pushButton, Foreground, pressedImage );
- FadeInImage( pushButton, dimmedBackgroundImage );
- FadeInImage( pushButton, dimmedImage );
+ FadeOutImage( pushButton, Foreground, selectedImage );
+ FadeInImage( pushButton, disabledBackgroundImage );
+ FadeInImage( pushButton, disabledImage );
StartFadeOutAnimation( pushButton );
StartFadeInAnimation();
- if( pressedImage || dimmedImage || backgroundImage || dimmedBackgroundImage )
+ if( selectedImage || disabledImage || backgroundImage || disabledBackgroundImage )
{
- mPaintState = PressedDimmedTransition;
+ mPaintState = PressedDisabledTransition;
}
else
{
- mPaintState = DimmedPressedState;
+ mPaintState = DisabledPressedState;
}
}
break;
}
- case DimmedReleasedState:
+ case DisabledReleasedState:
{
- if( !dimmed )
+ if( !disabled )
{
StopFadeOutAnimation( pushButton );
- FadeOutImage( pushButton, Background, dimmedBackgroundImage );
- FadeOutImage( pushButton, Foreground, dimmedImage );
+ FadeOutImage( pushButton, Background, disabledBackgroundImage );
+ FadeOutImage( pushButton, Foreground, disabledImage );
FadeInImage( pushButton, backgroundImage );
FadeInImage( pushButton, buttonImage );
StartFadeOutAnimation( pushButton );
StartFadeInAnimation();
- if( buttonImage || dimmedImage || backgroundImage || dimmedBackgroundImage )
+ if( buttonImage || disabledImage || backgroundImage || disabledBackgroundImage )
{
- mPaintState = DimmedReleasedTransition;
+ mPaintState = DisabledReleasedTransition;
}
else
{
}
break;
}
- case DimmedPressedState:
+ case DisabledPressedState:
{
- if( !dimmed )
+ if( !disabled )
{
StopFadeOutAnimation( pushButton );
- FadeOutImage( pushButton, Background, dimmedBackgroundImage );
- FadeOutImage( pushButton, Foreground, dimmedImage );
+ FadeOutImage( pushButton, Background, disabledBackgroundImage );
+ FadeOutImage( pushButton, Foreground, disabledImage );
FadeInImage( pushButton, backgroundImage );
- FadeInImage( pushButton, pressedImage );
+ FadeInImage( pushButton, selectedImage );
StartFadeOutAnimation( pushButton );
StartFadeInAnimation();
- if( pressedImage || dimmedImage || backgroundImage || dimmedBackgroundImage )
+ if( selectedImage || disabledImage || backgroundImage || disabledBackgroundImage )
{
- mPaintState = DimmedPressedTransition;
+ mPaintState = DisabledPressedTransition;
}
else
{
}
case ReleasedPressedTransition:
{
- if( dimmed )
+ if( disabled )
{
float opacity = 1.f;
if( fadeOutButtonImage )
StopFadeOutAnimation( pushButton );
StopFadeInAnimation();
- FadeOutImage( pushButton, Foreground, pressedImage, 1.f - opacity );
+ FadeOutImage( pushButton, Foreground, selectedImage, 1.f - opacity );
FadeOutImage( pushButton, Background, backgroundImage );
- FadeInImage( pushButton, dimmedImage );
- FadeInImage( pushButton, dimmedBackgroundImage );
+ FadeInImage( pushButton, disabledImage );
+ FadeInImage( pushButton, disabledBackgroundImage );
StartFadeOutAnimation( pushButton );
StartFadeInAnimation();
- if( pressedImage || dimmedImage || backgroundImage || dimmedBackgroundImage )
+ if( selectedImage || disabledImage || backgroundImage || disabledBackgroundImage )
{
- mPaintState = PressedDimmedTransition;
+ mPaintState = PressedDisabledTransition;
}
else
{
- mPaintState = DimmedPressedState;
+ mPaintState = DisabledPressedState;
}
}
break;
}
case PressedReleasedTransition:
{
- if( dimmed )
+ if( disabled )
{
float opacity = 1.f;
if( fadeOutButtonImage )
FadeOutImage( pushButton, Foreground, buttonImage, 1.f - opacity );
FadeOutImage( pushButton, Background, backgroundImage );
- FadeInImage( pushButton, dimmedImage );
- FadeInImage( pushButton, dimmedBackgroundImage );
+ FadeInImage( pushButton, disabledImage );
+ FadeInImage( pushButton, disabledBackgroundImage );
StartFadeOutAnimation( pushButton );
StartFadeInAnimation();
- if( buttonImage || dimmedImage || backgroundImage || dimmedBackgroundImage )
+ if( buttonImage || disabledImage || backgroundImage || disabledBackgroundImage )
{
- mPaintState = ReleasedDimmedTransition;
+ mPaintState = ReleasedDisabledTransition;
}
else
{
- mPaintState = DimmedReleasedState;
+ mPaintState = DisabledReleasedState;
}
}
break;
}
- case ReleasedDimmedTransition:
+ case ReleasedDisabledTransition:
{
- if( !dimmed )
+ if( !disabled )
{
float opacity = 1.f;
if( fadeOutButtonImage )
StopFadeOutAnimation( pushButton, false );
StopFadeInAnimation();
- FadeOutImage( pushButton, Foreground, dimmedImage, 1.f - opacity );
- FadeOutImage( pushButton, Background, dimmedBackgroundImage, 1.f - opacity );
+ FadeOutImage( pushButton, Foreground, disabledImage, 1.f - opacity );
+ FadeOutImage( pushButton, Background, disabledBackgroundImage, 1.f - opacity );
FadeInImage( pushButton, buttonImage, opacity );
FadeInImage( pushButton, backgroundImage, opacity );
StartFadeOutAnimation( pushButton );
StartFadeInAnimation();
- if( buttonImage || dimmedImage || backgroundImage || dimmedBackgroundImage )
+ if( buttonImage || disabledImage || backgroundImage || disabledBackgroundImage )
{
- mPaintState = DimmedReleasedTransition;
+ mPaintState = DisabledReleasedTransition;
}
else
{
}
break;
}
- case DimmedReleasedTransition:
+ case DisabledReleasedTransition:
{
- if( dimmed )
+ if( disabled )
{
float opacity = 1.f;
if( fadeOutButtonImage )
FadeOutImage( pushButton, Foreground, buttonImage, 1.f - opacity );
FadeOutImage( pushButton, Background, backgroundImage, 1.f - opacity );
- FadeInImage( pushButton, dimmedImage, opacity );
- FadeInImage( pushButton, dimmedBackgroundImage, opacity );
+ FadeInImage( pushButton, disabledImage, opacity );
+ FadeInImage( pushButton, disabledBackgroundImage, opacity );
StartFadeOutAnimation( pushButton );
StartFadeInAnimation();
- if( buttonImage || dimmedImage || backgroundImage || dimmedBackgroundImage )
+ if( buttonImage || disabledImage || backgroundImage || disabledBackgroundImage )
{
- mPaintState = ReleasedDimmedTransition;
+ mPaintState = ReleasedDisabledTransition;
}
else
{
- mPaintState = DimmedReleasedState;
+ mPaintState = DisabledReleasedState;
}
}
break;
}
- case PressedDimmedTransition:
+ case PressedDisabledTransition:
{
- if( !dimmed )
+ if( !disabled )
{
float opacity = 1.f;
if( fadeOutButtonImage )
StopFadeOutAnimation( pushButton, false );
StopFadeInAnimation();
- FadeOutImage( pushButton, Foreground, dimmedImage, 1.f - opacity );
- FadeOutImage( pushButton, Background, dimmedBackgroundImage, 1.f - opacity );
- FadeInImage( pushButton, pressedImage, opacity );
+ FadeOutImage( pushButton, Foreground, disabledImage, 1.f - opacity );
+ FadeOutImage( pushButton, Background, disabledBackgroundImage, 1.f - opacity );
+ FadeInImage( pushButton, selectedImage, opacity );
FadeInImage( pushButton, backgroundImage, opacity );
StartFadeOutAnimation( pushButton );
StartFadeInAnimation();
- if( pressedImage || dimmedImage || backgroundImage || dimmedBackgroundImage )
+ if( selectedImage || disabledImage || backgroundImage || disabledBackgroundImage )
{
- mPaintState = DimmedPressedTransition;
+ mPaintState = DisabledPressedTransition;
}
else
{
}
break;
}
- case DimmedPressedTransition:
+ case DisabledPressedTransition:
{
- if( dimmed )
+ if( disabled )
{
float opacity = 1.f;
if( fadeOutButtonImage )
StopFadeOutAnimation( pushButton, false );
StopFadeInAnimation();
- FadeOutImage( pushButton, Foreground, pressedImage, 1.f - opacity );
+ FadeOutImage( pushButton, Foreground, selectedImage, 1.f - opacity );
FadeOutImage( pushButton, Background, backgroundImage, 1.f - opacity );
- FadeInImage( pushButton, dimmedImage, opacity );
- FadeInImage( pushButton, dimmedBackgroundImage, opacity );
+ FadeInImage( pushButton, disabledImage, opacity );
+ FadeInImage( pushButton, disabledBackgroundImage, opacity );
StartFadeOutAnimation( pushButton );
StartFadeInAnimation();
- if( pressedImage || dimmedImage || backgroundImage || dimmedBackgroundImage )
+ if( selectedImage || disabledImage || backgroundImage || disabledBackgroundImage )
{
- mPaintState = PressedDimmedTransition;
+ mPaintState = PressedDisabledTransition;
}
else
{
- mPaintState = DimmedPressedState;
+ mPaintState = DisabledPressedState;
}
}
break;
void PushButtonDefaultPainter::Pressed( Toolkit::PushButton& button )
{
Toolkit::Internal::PushButton& pushButtonImpl = GetPushButtonImpl( button );
- Actor& pressedImage = pushButtonImpl.GetPressedImage();
+ Actor& selectedImage = pushButtonImpl.GetSelectedImage();
Actor& buttonImage = pushButtonImpl.GetButtonImage();
Actor& fadeOutButtonImage = pushButtonImpl.GetFadeOutButtonImage();
{
StopFadeOutAnimation( button );
FadeOutImage( button, Foreground, buttonImage );
- FadeInImage( button, pressedImage );
+ FadeInImage( button, selectedImage );
StartFadeOutAnimation( button );
StartFadeInAnimation();
- if( buttonImage || pressedImage )
+ if( buttonImage || selectedImage )
{
mPaintState = ReleasedPressedTransition;
}
StopFadeInAnimation();
FadeOutImage( button, Foreground, buttonImage, 1.f - opacity );
- FadeInImage( button, pressedImage, opacity );
+ FadeInImage( button, selectedImage, opacity );
StartFadeOutAnimation( button );
StartFadeInAnimation();
- if( buttonImage || pressedImage )
+ if( buttonImage || selectedImage )
{
mPaintState = ReleasedPressedTransition;
}
void PushButtonDefaultPainter::Released( Toolkit::PushButton& button )
{
Toolkit::Internal::PushButton& pushButtonImpl = GetPushButtonImpl( button );
- Actor& pressedImage = pushButtonImpl.GetPressedImage();
+ Actor& selectedImage = pushButtonImpl.GetSelectedImage();
Actor& buttonImage = pushButtonImpl.GetButtonImage();
Actor& fadeOutButtonImage = pushButtonImpl.GetFadeOutButtonImage();
case PressedState:
{
StopFadeOutAnimation( button );
- FadeOutImage( button, Foreground, pressedImage );
+ FadeOutImage( button, Foreground, selectedImage );
FadeInImage( button, buttonImage );
StartFadeOutAnimation( button );
StartFadeInAnimation();
- if( buttonImage || pressedImage )
+ if( buttonImage || selectedImage )
{
mPaintState = PressedReleasedTransition;
}
StopFadeOutAnimation( button, false );
StopFadeInAnimation();
- FadeOutImage( button, Foreground, pressedImage, 1.f - opacity );
+ FadeOutImage( button, Foreground, selectedImage, 1.f - opacity );
FadeInImage( button, buttonImage, opacity );
StartFadeOutAnimation( button );
StartFadeInAnimation();
- if( buttonImage || pressedImage )
+ if( buttonImage || selectedImage )
{
mPaintState = PressedReleasedTransition;
}
void PushButtonDefaultPainter::Toggled( Toolkit::PushButton& button )
{
Toolkit::Internal::PushButton& pushButtonImpl = GetPushButtonImpl( button );
- Actor& pressedImage = pushButtonImpl.GetPressedImage();
+ Actor& selectedImage = pushButtonImpl.GetSelectedImage();
Actor& buttonImage = pushButtonImpl.GetButtonImage();
Actor& fadeOutButtonImage = pushButtonImpl.GetFadeOutButtonImage();
{
StopFadeOutAnimation( button );
FadeOutImage( button, Foreground, buttonImage );
- FadeInImage( button, pressedImage );
+ FadeInImage( button, selectedImage );
StartFadeOutAnimation( button );
StartFadeInAnimation();
- if( buttonImage || pressedImage )
+ if( buttonImage || selectedImage )
{
mPaintState = ReleasedPressedTransition;
}
case PressedState:
{
StopFadeOutAnimation( button );
- FadeOutImage( button, Foreground, pressedImage );
+ FadeOutImage( button, Foreground, selectedImage );
FadeInImage( button, buttonImage );
StartFadeOutAnimation( button );
StartFadeInAnimation();
- if( buttonImage || pressedImage )
+ if( buttonImage || selectedImage )
{
mPaintState = PressedReleasedTransition;
}
StopFadeOutAnimation( button, false );
StopFadeInAnimation();
- FadeOutImage( button, Foreground, pressedImage, 1.f - opacity );
+ FadeOutImage( button, Foreground, selectedImage, 1.f - opacity );
FadeInImage( button, buttonImage, opacity );
StartFadeOutAnimation( button );
StartFadeInAnimation();
- if( buttonImage || pressedImage )
+ if( buttonImage || selectedImage )
{
mPaintState = PressedReleasedTransition;
}
StopFadeInAnimation();
FadeOutImage( button, Foreground, buttonImage, 1.f - opacity );
- FadeInImage( button, pressedImage, opacity );
+ FadeInImage( button, selectedImage, opacity );
StartFadeOutAnimation( button );
StartFadeInAnimation();
- if( buttonImage || pressedImage )
+ if( buttonImage || selectedImage )
{
mPaintState = ReleasedPressedTransition;
}
mPaintState = ReleasedState;
break;
}
- case ReleasedDimmedTransition:
+ case ReleasedDisabledTransition:
{
- mPaintState = DimmedReleasedState;
+ mPaintState = DisabledReleasedState;
break;
}
- case DimmedReleasedTransition:
+ case DisabledReleasedTransition:
{
mPaintState = ReleasedState;
break;
}
- case PressedDimmedTransition:
+ case PressedDisabledTransition:
{
- mPaintState = DimmedPressedState;
+ mPaintState = DisabledPressedState;
break;
}
- case DimmedPressedTransition:
+ case DisabledPressedTransition:
{
mPaintState = PressedState;
break;
mPaintState = ReleasedState;
break;
}
- case ReleasedDimmedTransition:
+ case ReleasedDisabledTransition:
{
- mPaintState = DimmedReleasedState;
+ mPaintState = DisabledReleasedState;
break;
}
- case DimmedReleasedTransition:
+ case DisabledReleasedTransition:
{
mPaintState = ReleasedState;
break;
}
- case PressedDimmedTransition:
+ case PressedDisabledTransition:
{
- mPaintState = DimmedPressedState;
+ mPaintState = DisabledPressedState;
break;
}
- case DimmedPressedTransition:
+ case DisabledPressedTransition:
{
mPaintState = PressedState;
break;
void SetBackgroundImage( Toolkit::PushButton& pushButton, Actor image );
/**
- * Sets the pressed image.
+ * Sets the selected image.
*
- * It adds the pressed image to the root actor and creates the image transition if needed.
+ * It adds the selected image to the root actor and creates the image transition if needed.
*
* @param[inout] pushButton The button in which all actors that form its appearance are going to be added.
- * @param[in] image The pressed image.
+ * @param[in] image The selected image.
*/
- void SetPressedImage( Toolkit::PushButton& pushButton, Actor image );
+ void SetSelectedImage( Toolkit::PushButton& pushButton, Actor image );
/**
- * Sets the dimmed background image.
+ * Sets the disabled background image.
*
- * It adds the dimmed background image to the root actor and creates the image transition if needed.
+ * It adds the disabled background image to the root actor and creates the image transition if needed.
*
* @param[inout] pushButton The button in which all actors that form its appearance are going to be added.
- * @param[in] image The dimmed background image.
+ * @param[in] image The disabled background image.
*/
- void SetDimmedBackgroundImage( Toolkit::PushButton& pushButton, Actor image );
+ void SetDisabledBackgroundImage( Toolkit::PushButton& pushButton, Actor image );
/**
- * Sets the dimmed image.
+ * Sets the disabled image.
*
- * It adds the dimmed image to the root actor and creates the image transition if needed.
+ * It adds the disabled image to the root actor and creates the image transition if needed.
*
* @param[inout] pushButton The button in which all actors that form its appearance are going to be added.
* @param[in] image The image.
*/
- void SetDimmedImage( Toolkit::PushButton& pushButton, Actor image );
+ void SetDisabledImage( Toolkit::PushButton& pushButton, Actor image );
/**
- * Sets the text label.
+ * Sets the label.
*
- * It adds the text to the root actor.
+ * It adds the label to the root actor.
*
* @param[inout] pushButton The button in which all actors that form its appearance are going to be added.
- * @param[in] text Label text.
+ * @param[in] label Button label.
*/
- void SetLabelText( Toolkit::PushButton& pushButton, Actor text );
+ void SetLabel( Toolkit::PushButton& pushButton, Actor label );
/////////////////////////////////////////////////////////////////////////////
// ButtonPainter interface
void SetSize( Toolkit::Button& button, const Vector3& size );
/**
- * This method is called when the \e dimmed property in the Dali::Toolkit::PushButton changes.
+ * This method is called when the \e disabled property in the Dali::Toolkit::PushButton changes.
*
* Creates image transitions if needed.
*
* @param[inout] button The button in which all actors that form its appearance are going to be added.
- * @param[in] dimmed property.
+ * @param[in] disabled property.
*/
- void SetDimmed( Toolkit::Button& button, bool dimmed );
+ void SetDisabled( Toolkit::Button& button, bool disabled );
/**
* Sets the animation time.
/**
* This method is called when the Dali::Toolkit::Internal::PushButton in which this object is registered
- * is pressed. It changes to the pressed image with a transition.
+ * is pressed. It changes to the selected image with a transition.
*
* @param[inout] button The Dali::Toolkit::PushButton in which this object is registered.
*/
*/
enum PaintState
{
- ReleasedState, ///< The push button is released.
- PressedState, ///< The push button is pressed.
- DimmedReleasedState, ///< The push button is dimmed and released.
- DimmedPressedState, ///< The push button is dimemd and pressed.
- ReleasedPressedTransition, ///< The push button is in transition from released to pressed.
- PressedReleasedTransition, ///< The push button is in transition from pressed to released.
- ReleasedDimmedTransition, ///< The push button is in transition from released to dimmed.
- DimmedReleasedTransition, ///< The push button is in transition from dimmed to released.
- PressedDimmedTransition, ///< The push button is in transition from pressed to dimmed.
- DimmedPressedTransition ///< The push button is in transition from dimmed to pressed.
+ ReleasedState, ///< The push button is released.
+ PressedState, ///< The push button is pressed.
+ DisabledReleasedState, ///< The push button is disabled and released.
+ DisabledPressedState, ///< The push button is Disabled and pressed.
+ ReleasedPressedTransition, ///< The push button is in transition from released to pressed.
+ PressedReleasedTransition, ///< The push button is in transition from pressed to released.
+ ReleasedDisabledTransition, ///< The push button is in transition from released to disabled.
+ DisabledReleasedTransition, ///< The push button is in transition from disabled to released.
+ PressedDisabledTransition, ///< The push button is in transition from pressed to disabled.
+ DisabledPressedTransition ///< The push button is in transition from disabled to pressed.
};
/**
private:
bool mAutoRepeating; ///< Stores the autorepeating property.
- bool mDimmed; ///< Stores the dimmed property.
+ bool mDisabled; ///< Stores the disabled property.
PaintState mPaintState; ///< The painter state.
Animation mFadeInAnimation; ///< Animation used in the state transitions.
namespace Toolkit
{
-const Property::Index PushButton::PROPERTY_AUTO_REPEATING = Internal::Button::BUTTON_PROPERTY_END_INDEX + 1;
-const Property::Index PushButton::PROPERTY_INITIAL_AUTO_REPEATING_DELAY = Internal::Button::BUTTON_PROPERTY_END_INDEX + 2;
-const Property::Index PushButton::PROPERTY_NEXT_AUTO_REPEATING_DELAY = Internal::Button::BUTTON_PROPERTY_END_INDEX + 3;
-const Property::Index PushButton::PROPERTY_TOGGLABLE = Internal::Button::BUTTON_PROPERTY_END_INDEX + 4;
-const Property::Index PushButton::PROPERTY_TOGGLE = Internal::Button::BUTTON_PROPERTY_END_INDEX + 5;
-const Property::Index PushButton::PROPERTY_NORMAL_STATE_ACTOR = Internal::Button::BUTTON_PROPERTY_END_INDEX + 6;
-const Property::Index PushButton::PROPERTY_PRESSED_STATE_ACTOR = Internal::Button::BUTTON_PROPERTY_END_INDEX + 7;
-const Property::Index PushButton::PROPERTY_DIMMED_STATE_ACTOR = Internal::Button::BUTTON_PROPERTY_END_INDEX + 8;
-const Property::Index PushButton::PROPERTY_LABEL_ACTOR = Internal::Button::BUTTON_PROPERTY_END_INDEX + 9;
-
namespace Internal
{
TypeAction action1( typeRegistration, Toolkit::PushButton::ACTION_PUSH_BUTTON_CLICK, &PushButton::DoAction );
-PropertyRegistration property1( typeRegistration, "auto-repeating", Toolkit::PushButton::PROPERTY_AUTO_REPEATING, Property::BOOLEAN, &PushButton::SetProperty, &PushButton::GetProperty );
-PropertyRegistration property2( typeRegistration, "initial-auto-repeating-delay", Toolkit::PushButton::PROPERTY_INITIAL_AUTO_REPEATING_DELAY, Property::FLOAT, &PushButton::SetProperty, &PushButton::GetProperty );
-PropertyRegistration property3( typeRegistration, "next-auto-repeating-delay", Toolkit::PushButton::PROPERTY_NEXT_AUTO_REPEATING_DELAY, Property::FLOAT, &PushButton::SetProperty, &PushButton::GetProperty );
-PropertyRegistration property4( typeRegistration, "togglable", Toolkit::PushButton::PROPERTY_TOGGLABLE, Property::BOOLEAN, &PushButton::SetProperty, &PushButton::GetProperty );
-PropertyRegistration property5( typeRegistration, "toggle", Toolkit::PushButton::PROPERTY_TOGGLE, Property::BOOLEAN, &PushButton::SetProperty, &PushButton::GetProperty );
-PropertyRegistration property6( typeRegistration, "normal-state-actor", Toolkit::PushButton::PROPERTY_NORMAL_STATE_ACTOR, Property::MAP, &PushButton::SetProperty, &PushButton::GetProperty );
-PropertyRegistration property7( typeRegistration, "pressed-state-actor", Toolkit::PushButton::PROPERTY_PRESSED_STATE_ACTOR, Property::MAP, &PushButton::SetProperty, &PushButton::GetProperty );
-PropertyRegistration property8( typeRegistration, "dimmed-state-actor", Toolkit::PushButton::PROPERTY_DIMMED_STATE_ACTOR, Property::MAP, &PushButton::SetProperty, &PushButton::GetProperty );
-PropertyRegistration property9( typeRegistration, "label-actor", Toolkit::PushButton::PROPERTY_LABEL_ACTOR, Property::MAP, &PushButton::SetProperty, &PushButton::GetProperty );
-
} // unnamed namespace
namespace
void PushButton::SetToggled( bool toggle )
{
- if( !mDimmed && mToggleButton && ( toggle != mToggled ) )
+ if( !mDisabled && mToggleButton && ( toggle != mToggled ) )
{
mToggled = toggle;
GetPushButtonPainter( mPainter )->Toggled( handle );
// Emit signal.
- mToggledSignalV2.Emit( handle, mToggled );
+ mStateChangedSignal.Emit( handle, mToggled );
}
}
return mBackgroundImage;
}
-void PushButton::SetPressedImage( Image image )
+void PushButton::SetSelectedImage( Image image )
{
- SetPressedImage( ImageActor::New( image ) );
+ SetSelectedImage( ImageActor::New( image ) );
}
-void PushButton::SetPressedImage( Actor image )
+void PushButton::SetSelectedImage( Actor image )
{
Toolkit::PushButton handle( GetOwner() );
- GetPushButtonPainter( mPainter )->SetPressedImage( handle, image );
+ GetPushButtonPainter( mPainter )->SetSelectedImage( handle, image );
}
-Actor& PushButton::GetPressedImage()
+Actor& PushButton::GetSelectedImage()
{
- return mPressedImage;
+ return mSelectedImage;
}
-Actor PushButton::GetPressedImage() const
+Actor PushButton::GetSelectedImage() const
{
- return mPressedImage;
+ return mSelectedImage;
}
-void PushButton::SetDimmedBackgroundImage( Image image )
+void PushButton::SetDisabledBackgroundImage( Image image )
{
- SetDimmedBackgroundImage( ImageActor::New( image ) );
+ SetDisabledBackgroundImage( ImageActor::New( image ) );
}
-void PushButton::SetDimmedBackgroundImage( Actor image )
+void PushButton::SetDisabledBackgroundImage( Actor image )
{
Toolkit::PushButton handle( GetOwner() );
- GetPushButtonPainter( mPainter )->SetDimmedBackgroundImage( handle, image );
+ GetPushButtonPainter( mPainter )->SetDisabledBackgroundImage( handle, image );
}
-Actor& PushButton::GetDimmedBackgroundImage()
+Actor& PushButton::GetDisabledBackgroundImage()
{
- return mDimmedBackgroundImage;
+ return mDisabledBackgroundImage;
}
-Actor PushButton::GetDimmedBackgroundImage() const
+Actor PushButton::GetDisabledBackgroundImage() const
{
- return mDimmedBackgroundImage;
+ return mDisabledBackgroundImage;
}
-void PushButton::SetDimmedImage( Image image )
+void PushButton::SetDisabledImage( Image image )
{
- SetDimmedImage( ImageActor::New( image ) );
+ SetDisabledImage( ImageActor::New( image ) );
}
-void PushButton::SetDimmedImage( Actor image )
+void PushButton::SetDisabledImage( Actor image )
{
Toolkit::PushButton handle( GetOwner() );
- GetPushButtonPainter( mPainter )->SetDimmedImage( handle, image );
+ GetPushButtonPainter( mPainter )->SetDisabledImage( handle, image );
}
-Actor& PushButton::GetDimmedImage()
+Actor& PushButton::GetDisabledImage()
{
- return mDimmedImage;
+ return mDisabledImage;
}
-Actor PushButton::GetDimmedImage() const
+Actor PushButton::GetDisabledImage() const
{
- return mDimmedImage;
+ return mDisabledImage;
}
-void PushButton::SetLabelText( const std::string& text )
+void PushButton::SetLabel( const std::string& label )
{
- Toolkit::TextView textView ( Toolkit::TextView::New( text ) );
+ Toolkit::TextView textView ( Toolkit::TextView::New( label ) );
textView.SetWidthExceedPolicy( Toolkit::TextView::ShrinkToFit ); // Make sure our text always fits inside the button
- SetLabelText( textView );
+ SetLabel( textView );
}
-void PushButton::SetLabelText( Actor text )
+void PushButton::SetLabel( Actor label )
{
Toolkit::PushButton handle( GetOwner() );
- GetPushButtonPainter( mPainter )->SetLabelText( handle, text );
+ GetPushButtonPainter( mPainter )->SetLabel( handle, label );
}
-Actor& PushButton::GetLabel()
+Actor PushButton::GetLabel() const
{
return mLabel;
}
-Actor PushButton::GetLabelText() const
+Actor& PushButton::GetLabel()
{
return mLabel;
}
return mFadeOutButtonImage;
}
-Toolkit::PushButton::PressedSignalV2& PushButton::PressedSignal()
+Toolkit::PushButton::PressedSignalType& PushButton::PressedSignal()
{
- return mPressedSignalV2;
+ return mPressedSignal;
}
-Toolkit::PushButton::ReleasedSignalV2& PushButton::ReleasedSignal()
+Toolkit::PushButton::ReleasedSignalType& PushButton::ReleasedSignal()
{
- return mReleasedSignalV2;
+ return mReleasedSignal;
}
bool PushButton::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
bool connected( true );
Toolkit::PushButton button = Toolkit::PushButton::DownCast(handle);
- if( Toolkit::PushButton::SIGNAL_TOGGLED == signalName )
+ if( Toolkit::PushButton::SIGNAL_STATE_CHANGED == signalName )
{
- button.ToggledSignal().Connect( tracker, functor );
+ button.StateChangedSignal().Connect( tracker, functor );
}
else if( Toolkit::PushButton::SIGNAL_PRESSED == signalName )
{
{
PushButton& pushButtonImpl( GetImplementation( pushButton ) );
- switch ( propertyIndex )
+ if ( propertyIndex == Toolkit::Button::PROPERTY_AUTO_REPEATING )
{
- case Toolkit::PushButton::PROPERTY_AUTO_REPEATING:
- {
- pushButtonImpl.SetAutoRepeating( value.Get< bool >() );
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_INITIAL_AUTO_REPEATING_DELAY:
- {
- pushButtonImpl.SetInitialAutoRepeatingDelay( value.Get< float >() );
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_NEXT_AUTO_REPEATING_DELAY:
- {
- pushButtonImpl.SetNextAutoRepeatingDelay( value.Get< float >() );
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_TOGGLABLE:
- {
- pushButtonImpl.SetToggleButton( value.Get< bool >() );
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_TOGGLE:
- {
- pushButtonImpl.SetToggled( value.Get< bool >() );
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_NORMAL_STATE_ACTOR:
- {
- pushButtonImpl.SetButtonImage( Scripting::NewActor( value.Get< Property::Map >() ) );
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_PRESSED_STATE_ACTOR:
- {
- pushButtonImpl.SetPressedImage( Scripting::NewActor( value.Get< Property::Map >() ) );
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_DIMMED_STATE_ACTOR:
- {
- pushButtonImpl.SetDimmedImage( Scripting::NewActor( value.Get< Property::Map >() ) );
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_LABEL_ACTOR:
- {
- pushButtonImpl.SetLabelText( Scripting::NewActor( value.Get< Property::Map >() ) );
- break;
- }
+ pushButtonImpl.SetAutoRepeating( value.Get< bool >() );
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY )
+ {
+ pushButtonImpl.SetInitialAutoRepeatingDelay( value.Get< float >() );
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY )
+ {
+ pushButtonImpl.SetNextAutoRepeatingDelay( value.Get< float >() );
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_TOGGLABLE )
+ {
+ pushButtonImpl.SetToggleButton( value.Get< bool >() );
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_TOGGLED )
+ {
+ pushButtonImpl.SetToggled( value.Get< bool >() );
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_NORMAL_STATE_ACTOR )
+ {
+ pushButtonImpl.SetButtonImage( Scripting::NewActor( value.Get< Property::Map >() ) );
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_SELECTED_STATE_ACTOR )
+ {
+ pushButtonImpl.SetSelectedImage( Scripting::NewActor( value.Get< Property::Map >() ) );
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_DISABLED_STATE_ACTOR )
+ {
+ pushButtonImpl.SetDisabledImage( Scripting::NewActor( value.Get< Property::Map >() ) );
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_LABEL_ACTOR )
+ {
+ pushButtonImpl.SetLabel( Scripting::NewActor( value.Get< Property::Map >() ) );
}
}
}
{
PushButton& pushButtonImpl( GetImplementation( pushButton ) );
- switch ( propertyIndex )
+ if ( propertyIndex == Toolkit::Button::PROPERTY_AUTO_REPEATING )
{
- case Toolkit::PushButton::PROPERTY_AUTO_REPEATING:
- {
- value = pushButtonImpl.mAutoRepeating;
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_INITIAL_AUTO_REPEATING_DELAY:
- {
- value = pushButtonImpl.mInitialAutoRepeatingDelay;
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_NEXT_AUTO_REPEATING_DELAY:
- {
- value = pushButtonImpl.mNextAutoRepeatingDelay;
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_TOGGLABLE:
- {
- value = pushButtonImpl.mToggleButton;
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_TOGGLE:
- {
- value = pushButtonImpl.mToggled;
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_NORMAL_STATE_ACTOR:
- {
- Property::Map map;
- Scripting::CreatePropertyMap( pushButtonImpl.mButtonImage, map );
- value = map;
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_PRESSED_STATE_ACTOR:
- {
- Property::Map map;
- Scripting::CreatePropertyMap( pushButtonImpl.mPressedImage, map );
- value = map;
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_DIMMED_STATE_ACTOR:
- {
- Property::Map map;
- Scripting::CreatePropertyMap( pushButtonImpl.mDimmedImage, map );
- value = map;
- break;
- }
-
- case Toolkit::PushButton::PROPERTY_LABEL_ACTOR:
- {
- Property::Map map;
- Scripting::CreatePropertyMap( pushButtonImpl.mLabel, map );
- value = map;
- break;
- }
+ value = pushButtonImpl.mAutoRepeating;
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_INITIAL_AUTO_REPEATING_DELAY )
+ {
+ value = pushButtonImpl.mInitialAutoRepeatingDelay;
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_NEXT_AUTO_REPEATING_DELAY )
+ {
+ value = pushButtonImpl.mNextAutoRepeatingDelay;
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_TOGGLABLE )
+ {
+ value = pushButtonImpl.mToggleButton;
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_TOGGLED )
+ {
+ value = pushButtonImpl.mToggled;
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_NORMAL_STATE_ACTOR )
+ {
+ Property::Map map;
+ Scripting::CreatePropertyMap( pushButtonImpl.mButtonImage, map );
+ value = map;
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_SELECTED_STATE_ACTOR )
+ {
+ Property::Map map;
+ Scripting::CreatePropertyMap( pushButtonImpl.mSelectedImage, map );
+ value = map;
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_DISABLED_STATE_ACTOR )
+ {
+ Property::Map map;
+ Scripting::CreatePropertyMap( pushButtonImpl.mDisabledImage, map );
+ value = map;
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_LABEL_ACTOR )
+ {
+ Property::Map map;
+ Scripting::CreatePropertyMap( pushButtonImpl.mLabel, map );
+ value = map;
}
}
}
//Emit signal.
- mPressedSignalV2.Emit( handle );
+ mPressedSignal.Emit( handle );
}
}
GetPushButtonPainter( mPainter )->Toggled( handle );
// Emit signal.
- mToggledSignalV2.Emit( handle, mToggled );
+ mStateChangedSignal.Emit( handle, mToggled );
}
else
{
}
//Emit signal.
- mReleasedSignalV2.Emit( handle );
- mClickedSignalV2.Emit( handle );
+ mReleasedSignal.Emit( handle );
+ mClickedSignal.Emit( handle );
}
}
}
}
//Emit signal.
- mReleasedSignalV2.Emit( handle );
+ mReleasedSignal.Emit( handle );
}
}
}
bool PushButton::AutoRepeatingSlot()
{
bool consumed = false;
- if( !mDimmed )
+ if( !mDisabled )
{
// Restart the autorepeat timer.
SetUpTimer( mNextAutoRepeatingDelay );
GetPushButtonPainter( mPainter )->Pressed( handle );
//Emit signal.
- consumed = mReleasedSignalV2.Emit( handle );
- consumed |= mClickedSignalV2.Emit( handle );
- consumed |= mPressedSignalV2.Emit( handle );
+ consumed = mReleasedSignal.Emit( handle );
+ consumed |= mClickedSignal.Emit( handle );
+ consumed |= mPressedSignal.Emit( handle );
}
return consumed;
Actor GetBackgroundImage() const;
/**
- * @copydoc Dali::Toolkit::PushButton::SetPressedImage( const Image image )
+ * @copydoc Dali::Toolkit::PushButton::SetSelectedImage( const Image image )
*/
- void SetPressedImage( Image image );
+ void SetSelectedImage( Image image );
/**
- * @copydoc Dali::Toolkit::PushButton::SetPressedImage( Actor image )
+ * @copydoc Dali::Toolkit::PushButton::SetSelectedImage( Actor image )
*/
- void SetPressedImage( Actor image );
+ void SetSelectedImage( Actor image );
/**
* Used by the painter only.
- * @return A reference to the pressed image.
+ * @return A reference to the selected image.
*/
- Actor& GetPressedImage();
+ Actor& GetSelectedImage();
/**
- * @copydoc Dali::Toolkit::PushButton::GetPressedImage()
+ * @copydoc Dali::Toolkit::PushButton::GetSelectedImage()
*/
- Actor GetPressedImage() const;
+ Actor GetSelectedImage() const;
/**
- * @copydoc Dali::Toolkit::PushButton::SetDimmedBackgroundImage( Image image )
+ * @copydoc Dali::Toolkit::PushButton::SetDisabledBackgroundImage( Image image )
*/
- void SetDimmedBackgroundImage( Image image );
+ void SetDisabledBackgroundImage( Image image );
/**
- * @copydoc Dali::Toolkit::PushButton::SetDimmedBackgroundImage( Actor image )
+ * @copydoc Dali::Toolkit::PushButton::SetDisabledBackgroundImage( Actor image )
*/
- void SetDimmedBackgroundImage( Actor image );
+ void SetDisabledBackgroundImage( Actor image );
/**
* Used by the painter only.
- * @return A reference to the dimmed background image.
+ * @return A reference to the disabled background image.
*/
- Actor& GetDimmedBackgroundImage();
+ Actor& GetDisabledBackgroundImage();
/**
- * @copydoc Dali::Toolkit::PushButton::GetDimmedBackgroundImage()
+ * @copydoc Dali::Toolkit::PushButton::GetDisabledBackgroundImage()
*/
- Actor GetDimmedBackgroundImage() const;
+ Actor GetDisabledBackgroundImage() const;
/**
- * @copydoc Dali::Toolkit::PushButton::SetDimmedImage( Image image )
+ * @copydoc Dali::Toolkit::PushButton::SetDisabledImage( Image image )
*/
- void SetDimmedImage( Image image );
+ void SetDisabledImage( Image image );
/**
- * @copydoc Dali::Toolkit::PushButton::SetDimmedImage( Actor image )
+ * @copydoc Dali::Toolkit::PushButton::SetDisabledImage( Actor image )
*/
- void SetDimmedImage( Actor image );
+ void SetDisabledImage( Actor image );
/**
* Used by the painter only.
- * @return A reference to the dimmed button image.
+ * @return A reference to the disabled button image.
*/
- Actor& GetDimmedImage();
+ Actor& GetDisabledImage();
/**
- * @copydoc Dali::Toolkit::PushButton::GetDimmedImage()
+ * @copydoc Dali::Toolkit::PushButton::GetDisabledImage()
*/
- Actor GetDimmedImage() const;
+ Actor GetDisabledImage() const;
/**
- * @copydoc Dali::Toolkit::PushButton::SetLabelText( const std::string& text )
+ * @copydoc Dali::Toolkit::PushButton::SetLabel( const std::string& label )
*/
- void SetLabelText( const std::string& text );
+ void SetLabel( const std::string& label );
/**
- * @copydoc Dali::Toolkit::PushButton::SetLabelText( Actor text )
+ * @copydoc Dali::Toolkit::PushButton::SetLabel( Actor label )
*/
- void SetLabelText( Actor text );
+ void SetLabel( Actor label );
/**
- * Used by the painter only.
- * @return A reference to the label actor.
+ * @copydoc Dali::Toolkit::PushButton::GetLabel()
*/
- Actor& GetLabel();
+ Actor GetLabel() const;
/**
- * @copydoc Dali::Toolkit::PushButton::GetLabelText()
+ * Used by the painter only.
+ * @return A reference to the label actor.
*/
- Actor GetLabelText() const;
+ Actor& GetLabel();
/**
* Used by the painter only.
/**
* @copydoc Dali::Toolkit::PushButton::PressedSignal()
*/
- Toolkit::PushButton::PressedSignalV2& PressedSignal();
+ Toolkit::PushButton::PressedSignalType& PressedSignal();
/**
* @copydoc Dali::Toolkit::PushButton::ReleasedSignal()
*/
- Toolkit::PushButton::ReleasedSignalV2& ReleasedSignal();
+ Toolkit::PushButton::ReleasedSignalType& ReleasedSignal();
/**
* Connects a callback function with the object's signals.
bool mToggled; ///< Stores the toggle state.
// Signals
- Toolkit::PushButton::PressedSignalV2 mPressedSignalV2; ///< Signal emitted when the button is pressed.
- Toolkit::PushButton::ReleasedSignalV2 mReleasedSignalV2; ///< Signal emitted when the button is released.
+ Toolkit::PushButton::PressedSignalType mPressedSignal; ///< Signal emitted when the button is pressed.
+ Toolkit::PushButton::ReleasedSignalType mReleasedSignal; ///< Signal emitted when the button is released.
- Actor mButtonImage; ///< Stores the released image.
+ Actor mButtonImage; ///< Stores the unselected image.
Actor mBackgroundImage; ///< Stores the background image.
- Actor mPressedImage; ///< Stores the pressed image.
- Actor mDimmedImage; ///< Stores the dimmed image.
- Actor mDimmedBackgroundImage; ///< Stores the dimmed background image.
+ Actor mSelectedImage; ///< Stores the selected image.
+ Actor mDisabledImage; ///< Stores the disabled image.
+ Actor mDisabledBackgroundImage; ///< Stores the disabled background image.
Actor mLabel; ///< Stores the text label.
virtual void SetSize( Toolkit::Button& button, const Vector3& size ) = 0;
/**
- * @copydoc ButtonPainter::SetDimmed( Toolkit::Button& button, bool dimmed )
+ * @copydoc ButtonPainter::SetDisabled( Toolkit::Button& button, bool disabled )
*/
- virtual void SetDimmed( Toolkit::Button& button, bool dimmed ) = 0;
+ virtual void SetDisabled( Toolkit::Button& button, bool disabled ) = 0;
/**
* @copydoc ButtonPainter::SetAnimationTime()
using namespace Dali;
using namespace Dali::Toolkit::Internal;
-namespace Dali
-{
-namespace Toolkit
-{
-const Property::Index RadioButton::PROPERTY_ACTIVE = Internal::Button::BUTTON_PROPERTY_END_INDEX + 11;
-const Property::Index RadioButton::PROPERTY_LABEL_ACTOR = Internal::Button::BUTTON_PROPERTY_END_INDEX + 12;
-}
-}
-
namespace
{
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);
-
-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 char* const UNSELECTED_BUTTON_IMAGE_DIR = DALI_IMAGE_DIR "radio-button-unselected.png";
+const char* const SELECTED_BUTTON_IMAGE_DIR = DALI_IMAGE_DIR "radio-button-selected.png";
const Vector3 DISTANCE_BETWEEN_IMAGE_AND_LABEL(5.0f, 0.0f, 0.0f);
}
}
RadioButton::RadioButton()
- : mActive(false)
+ : mSelected(false)
{
- mInactiveImage = Dali::Image::New( INACTIVE_BUTTON_IMAGE_DIR );
- mActiveImage = Dali::Image::New( ACTIVE_BUTTON_IMAGE_DIR );
+ mUnselectedImage = Dali::Image::New( UNSELECTED_BUTTON_IMAGE_DIR );
+ mSelectedImage = Dali::Image::New( SELECTED_BUTTON_IMAGE_DIR );
- mRadioIcon = Dali::ImageActor::New( mInactiveImage );
+ mRadioIcon = Dali::ImageActor::New( mUnselectedImage );
}
RadioButton::~RadioButton()
return mLabel;
}
-void RadioButton::SetActive(bool active)
+void RadioButton::SetSelected(bool selected)
{
- if( mActive != active )
+ if( mSelected != selected )
{
- if( active )
+ if( selected )
{
Actor parent = Self().GetParent();
if( parent )
if( rbChild )
{
- rbChild.SetActive(false);
+ rbChild.SetSelected(false);
}
}
}
- mActive = true;
- mRadioIcon.SetImage(mActiveImage);
+ mSelected = true;
+ mRadioIcon.SetImage(mSelectedImage);
}
else
{
- mActive = false;
- mRadioIcon.SetImage(mInactiveImage);
+ mSelected = false;
+ mRadioIcon.SetImage(mUnselectedImage);
}
- // Raise toggled signal
+ // Raise state changed signal
Toolkit::RadioButton handle( GetOwner() );
- mToggledSignalV2.Emit( handle, mActive );
+ mStateChangedSignal.Emit( handle, mSelected );
RelayoutRequest();
}
}
-bool RadioButton::IsActive()const
+bool RadioButton::IsSelected()const
{
- return mActive;
+ return mSelected;
}
void RadioButton::ToggleState()
{
- SetActive(!mActive);
+ SetSelected(!mSelected);
}
void RadioButton::OnRelaidOut( Vector2 /*size*/, ActorSizeContainer& container )
void RadioButton::OnButtonUp()
{
- // Don't allow selection on an already active radio button
- if( !mActive )
+ // Don't allow selection on an already selected radio button
+ if( !mSelected )
{
ToggleState();
}
{
RadioButton& radioButtonImpl( GetImplementation( radioButton ) );
- switch ( propertyIndex )
+ if ( propertyIndex == Toolkit::Button::PROPERTY_TOGGLED )
{
- case Toolkit::RadioButton::PROPERTY_ACTIVE:
- {
- radioButtonImpl.SetActive( value.Get< bool >( ) );
- break;
- }
- case Toolkit::RadioButton::PROPERTY_LABEL_ACTOR:
- {
- radioButtonImpl.SetLabel( Scripting::NewActor( value.Get< Property::Map >( ) ) );
- break;
- }
+ radioButtonImpl.SetSelected( value.Get< bool >( ) );
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_LABEL_ACTOR )
+ {
+ radioButtonImpl.SetLabel( Scripting::NewActor( value.Get< Property::Map >( ) ) );
}
}
}
{
RadioButton& radioButtonImpl( GetImplementation( radioButton ) );
- switch ( propertyIndex )
+ if ( propertyIndex == Toolkit::Button::PROPERTY_TOGGLED )
{
- case Toolkit::RadioButton::PROPERTY_ACTIVE:
- {
- value = radioButtonImpl.mActive;
- break;
- }
- case Toolkit::RadioButton::PROPERTY_LABEL_ACTOR:
- {
- Property::Map map;
- Scripting::CreatePropertyMap( radioButtonImpl.mLabel, map );
- value = map;
- break;
- }
+ value = radioButtonImpl.mSelected;
+ }
+ else if ( propertyIndex == Toolkit::Button::PROPERTY_LABEL_ACTOR )
+ {
+ Property::Map map;
+ Scripting::CreatePropertyMap( radioButtonImpl.mLabel, map );
+ value = map;
}
}
Actor GetLabel() const;
/**
- * @copydoc Dali::Toolkit::RadioButton::SetActive(bool active)
+ * @copydoc Dali::Toolkit::RadioButton::SetSelected(bool selected)
*/
- void SetActive(bool active);
+ void SetSelected(bool selected);
/**
- * @copydoc Dali::Toolkit::RadioButton::IsActive()
+ * @copydoc Dali::Toolkit::RadioButton::IsSelected()
*/
- bool IsActive()const;
+ bool IsSelected()const;
/**
* @copydoc Dali::Toolkit::RadioButton::ToggleState()
// Undefined
RadioButton& operator=(const RadioButton& origin);
- Image mInactiveImage; ///< Stores the inactive image
- Image mActiveImage; ///< Stores the active image
+ Image mUnselectedImage; ///< Stores the unselected image
+ Image mSelectedImage; ///< Stores the selected image
ImageActor mRadioIcon; ///< Stores the current image
- Actor mLabel; ///< Stores the button label
- bool mActive; ///< Stores the active state
+ Actor mLabel; ///< Stores the button label
+ bool mSelected; ///< Stores the selected state
} ;
} // namespace Internal
// Guard against destruction during signal emission
Toolkit::Popup handle( GetOwner() );
- mHiddenSignalV2.Emit();
+ mHiddenSignal.Emit();
}
}
-Toolkit::Popup::TouchedOutsideSignalV2& Popup::OutsideTouchedSignal()
+Toolkit::Popup::TouchedOutsideSignalType& Popup::OutsideTouchedSignal()
{
- return mTouchedOutsideSignalV2;
+ return mTouchedOutsideSignal;
}
-Toolkit::Popup::HiddenSignalV2& Popup::HiddenSignal()
+Toolkit::Popup::HiddenSignalType& Popup::HiddenSignal()
{
- return mHiddenSignalV2;
+ return mHiddenSignal;
}
bool Popup::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
// Guard against destruction during signal emission
Toolkit::Popup handle( GetOwner() );
- mTouchedOutsideSignalV2.Emit();
+ mTouchedOutsideSignal.Emit();
}
}
/**
* @copydoc Dali::Toolkit::Popup::OutsideTouchedSignal()
*/
- Toolkit::Popup::TouchedOutsideSignalV2& OutsideTouchedSignal();
+ Toolkit::Popup::TouchedOutsideSignalType& OutsideTouchedSignal();
/**
* @copydoc Dali::Toolkit::Popup::HiddenSignal()
*/
- Toolkit::Popup::HiddenSignalV2& HiddenSignal();
+ Toolkit::Popup::HiddenSignalType& HiddenSignal();
/**
* Connects a callback function with the object's signals.
LayoutInfo mLayoutInfo; ///< Stores sizes of all popup components.
- Toolkit::Popup::TouchedOutsideSignalV2 mTouchedOutsideSignalV2;
- Toolkit::Popup::HiddenSignalV2 mHiddenSignalV2;
+ Toolkit::Popup::TouchedOutsideSignalType mTouchedOutsideSignal;
+ Toolkit::Popup::HiddenSignalType mHiddenSignal;
Property::Index mPropertyTitle; ///< Property index for Title.
Property::Index mPropertyState; ///< Property index for popup state.
RemoveActorsOutsideRange( range );
AddActorsWithinRange( range, 0.0f/*immediate*/ );
- mScrollUpdatedSignalV2.Emit( Vector3(0.0f, currentLayoutPosition, 0.0f) );
+ mScrollUpdatedSignal.Emit( Vector3(0.0f, currentLayoutPosition, 0.0f) );
}
}
if(mScrollAnimation)
{
- mScrollCompletedSignalV2.Emit(GetCurrentScrollPosition());
+ mScrollCompletedSignal.Emit(GetCurrentScrollPosition());
}
RemoveAnimation(mScrollAnimation);
mScrollPositionObject.SetProperty( ScrollConnector::SCROLL_POSITION, firstItemScrollPosition );
self.SetProperty(mPropertyPosition, GetScrollPosition(firstItemScrollPosition, layoutSize));
- mScrollStartedSignalV2.Emit(GetCurrentScrollPosition());
+ mScrollStartedSignal.Emit(GetCurrentScrollPosition());
mRefreshEnabled = true;
}
mScrollOvershoot = 0.0f;
AnimateScrollOvershoot(0.0f);
- mScrollCompletedSignalV2.Emit(GetCurrentScrollPosition());
+ mScrollCompletedSignal.Emit(GetCurrentScrollPosition());
}
}
// Reset the overshoot if no scroll animation.
if (!mScrollAnimation)
{
- mScrollCompletedSignalV2.Emit(GetCurrentScrollPosition());
+ mScrollCompletedSignal.Emit(GetCurrentScrollPosition());
AnimateScrollOvershoot(0.0f, false);
}
case Gesture::Started: // Fall through
{
mTotalPanDisplacement = Vector2::ZERO;
- mScrollStartedSignalV2.Emit(GetCurrentScrollPosition());
+ mScrollStartedSignal.Emit(GetCurrentScrollPosition());
mRefreshEnabled = true;
}
RemoveAnimation(mScrollAnimation); // mScrollAnimation is used to query whether we're scrolling
- mScrollCompletedSignalV2.Emit(GetCurrentScrollPosition());
+ mScrollCompletedSignal.Emit(GetCurrentScrollPosition());
if(mIsFlicking && fabsf(mScrollOvershoot) > Math::MACHINE_EPSILON_1)
{
AnimateScrollOvershoot(0.0f);
}
- mScrollStartedSignalV2.Emit(GetCurrentScrollPosition());
+ mScrollStartedSignal.Emit(GetCurrentScrollPosition());
mRefreshEnabled = true;
}
AnimateScrollOvershoot(0.0f);
}
- mScrollStartedSignalV2.Emit(GetCurrentScrollPosition());
+ mScrollStartedSignal.Emit(GetCurrentScrollPosition());
mRefreshEnabled = true;
}
// EXTERNAL INCLUDES
#include <dali/public-api/object/base-object.h>
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/scrollable/scroll-connector.h>
* move the Actor's edge visually away from the neighboring actor, as they rotate
* around their default anchor point.
*/
-class ScrollCarouselEffectInfo : public Dali::RefObject
+class ScrollCarouselEffectInfo
{
public:
Vector2 mVisibilityThreshold; ///< Threshold for when to to switch off visibility of Actor (for performance)
};
-typedef IntrusivePtr<ScrollCarouselEffectInfo> ScrollCarouselEffectInfoPtr;
-
/**
* Helper: Applies the 3D scroll carousel constraints to the child actor
*
*/
void ApplyScrollCarouselConstraints(Toolkit::ScrollView scrollView,
Actor child,
- ScrollCarouselEffectInfoPtr info)
+ ScrollCarouselEffectInfo& info)
{
// Apply constraints to this actor //
Constraint constraint;
void ScrollViewCarouselEffect::ApplyToActor(Actor child, const Vector2& angleSwing)
{
- ScrollCarouselEffectInfoPtr info(new ScrollCarouselEffectInfo(angleSwing));
+ ScrollCarouselEffectInfo info( angleSwing );
ApplyScrollCarouselConstraints( GetScrollView(), child, info );
}
* When at middle of the screen the position is not altered.
* When one screen away from middle the position is rotated about it's origin + mAnchor
*/
-class ScrollCubeEffectInfo : public Dali::RefObject
+class ScrollCubeEffectInfo
{
public:
Vector3 mPositionSwing; ///< Maximum amount in X and Y axes to alter position.
};
-typedef IntrusivePtr<ScrollCubeEffectInfo> ScrollCubeEffectInfoPtr;
-
/**
* Helper: Applies the 3D scroll cube constraints to the child actor
*
void ApplyScrollCubeConstraints(Toolkit::ScrollView scrollView,
Actor child,
Actor parentPage,
- ScrollCubeEffectInfoPtr info)
+ const ScrollCubeEffectInfo& info)
{
// Apply constraints to this actor //
Constraint constraint;
const Vector2& angleSwing,
const Vector2& positionSwing)
{
- ScrollCubeEffectInfoPtr info(new ScrollCubeEffectInfo(anchor, angleSwing, positionSwing));
+ ScrollCubeEffectInfo info( anchor, angleSwing, positionSwing );
ApplyScrollCubeConstraints( GetScrollView(), child, child.GetParent(), info );
}
const Vector2& angleSwing,
const Vector2& positionSwing)
{
- ScrollCubeEffectInfoPtr info(new ScrollCubeEffectInfo(anchor, angleSwing, positionSwing));
+ ScrollCubeEffectInfo info( anchor, angleSwing, positionSwing );
ApplyScrollCubeConstraints( GetScrollView(), child, parentPage, info );
}
{
// set mScrolling to false, in case user has code that interrogates mScrolling Getter() in complete.
mScrolling = false;
- DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignalV2 1 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
- mScrollCompletedSignalV2.Emit( currentScrollPosition );
+ DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignal 1 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
+ mScrollCompletedSignal.Emit( currentScrollPosition );
}
if( mPanning ) // are we interrupting a current pan?
self.SetProperty(mPropertyScrolling, true);
mScrolling = true;
- DALI_LOG_SCROLL_STATE("[0x%X] mScrollStartedSignalV2 1 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
- mScrollStartedSignalV2.Emit( currentScrollPosition );
+ DALI_LOG_SCROLL_STATE("[0x%X] mScrollStartedSignal 1 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
+ mScrollStartedSignal.Emit( currentScrollPosition );
bool animating = AnimateTo(-position,
Vector3::ONE * duration,
alpha,
completedPosition = position;
}
- DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignalV2 2 [%.2f, %.2f]", this, completedPosition.x, completedPosition.y);
+ DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignal 2 [%.2f, %.2f]", this, completedPosition.x, completedPosition.y);
SetScrollUpdateNotification(false);
- mScrollCompletedSignalV2.Emit( completedPosition );
+ mScrollCompletedSignal.Emit( completedPosition );
}
}
snapEvent.position = -mScrollTargetPosition;
snapEvent.duration = totalDuration;
- DALI_LOG_SCROLL_STATE("[0x%X] mSnapStartedSignalV2 [%.2f, %.2f]", this, snapEvent.position.x, snapEvent.position.y);
- mSnapStartedSignalV2.Emit( snapEvent );
+ DALI_LOG_SCROLL_STATE("[0x%X] mSnapStartedSignal [%.2f, %.2f]", this, snapEvent.position.x, snapEvent.position.y);
+ mSnapStartedSignal.Emit( snapEvent );
return (mScrollStateFlags & SCROLL_ANIMATION_FLAGS) != 0;
}
panGesture.RemoveDirection( direction );
}
-Toolkit::ScrollView::SnapStartedSignalV2& ScrollView::SnapStartedSignal()
+Toolkit::ScrollView::SnapStartedSignalType& ScrollView::SnapStartedSignal()
{
- return mSnapStartedSignalV2;
+ return mSnapStartedSignal;
}
void ScrollView::FindAndUnbindActor(Actor child)
self.SetProperty(mPropertyPrePosition, mScrollPrePosition);
Vector3 currentScrollPosition = GetCurrentScrollPosition();
- DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignalV2 3 current[%.2f, %.2f], mScrollTargetPosition[%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y, -mScrollTargetPosition.x, -mScrollTargetPosition.y );
- mScrollCompletedSignalV2.Emit( currentScrollPosition );
+ DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignal 3 current[%.2f, %.2f], mScrollTargetPosition[%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y, -mScrollTargetPosition.x, -mScrollTargetPosition.y );
+ mScrollCompletedSignal.Emit( currentScrollPosition );
mDomainOffset += deltaPosition - mScrollPostPosition;
self.SetProperty(mPropertyDomainOffset, mDomainOffset);
Toolkit::ScrollView handle( GetOwner() );
Vector3 currentScrollPosition = GetCurrentScrollPosition();
- mScrollUpdatedSignalV2.Emit( currentScrollPosition );
+ mScrollUpdatedSignal.Emit( currentScrollPosition );
}
bool ScrollView::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
UpdateLocalScrollProperties();
Vector3 currentScrollPosition = GetCurrentScrollPosition();
- DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignalV2 4 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
- mScrollCompletedSignalV2.Emit( currentScrollPosition );
+ DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignal 4 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
+ mScrollCompletedSignal.Emit( currentScrollPosition );
}
}
mScrolling = false;
// send negative scroll position since scroll internal scroll position works as an offset for actors,
// give applications the position within the domain from the scroll view's anchor position
- DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignalV2 5 [%.2f, %.2f]", this, -mScrollPostPosition.x, -mScrollPostPosition.y);
- mScrollCompletedSignalV2.Emit( -mScrollPostPosition );
+ DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignal 5 [%.2f, %.2f]", this, -mScrollPostPosition.x, -mScrollPostPosition.y);
+ mScrollCompletedSignal.Emit( -mScrollPostPosition );
}
}
}
Vector3 currentScrollPosition = GetCurrentScrollPosition();
Self().SetProperty(mPropertyScrolling, true);
mScrolling = true;
- DALI_LOG_SCROLL_STATE("[0x%X] mScrollStartedSignalV2 2 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
- mScrollStartedSignalV2.Emit( currentScrollPosition );
+ DALI_LOG_SCROLL_STATE("[0x%X] mScrollStartedSignal 2 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
+ mScrollStartedSignal.Emit( currentScrollPosition );
}
else if( (state == Gesture::Finished) ||
(state == Gesture::Cancelled) ) // Finished/default
SnapInternalYTo(mScrollTargetPosition.y);
}
Vector3 currentScrollPosition = GetCurrentScrollPosition();
- DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignalV2 6 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
- mScrollCompletedSignalV2.Emit( currentScrollPosition );
+ DALI_LOG_SCROLL_STATE("[0x%X] mScrollCompletedSignal 6 [%.2f, %.2f]", this, currentScrollPosition.x, currentScrollPosition.y);
+ mScrollCompletedSignal.Emit( currentScrollPosition );
}
}
/**
* @copydoc Dali::Toolkit::ScrollView::SnapStartedSignal()
*/
- Toolkit::ScrollView::SnapStartedSignalV2& SnapStartedSignal();
+ Toolkit::ScrollView::SnapStartedSignalType& SnapStartedSignal();
/**
* Connects a callback function with the object's signals.
ScrollOvershootIndicatorPtr mOvershootIndicator;
- Toolkit::ScrollView::SnapStartedSignalV2 mSnapStartedSignalV2;
+ Toolkit::ScrollView::SnapStartedSignalType mSnapStartedSignal;
bool mInAccessibilityPan : 1; ///< With AccessibilityPan its easier to move between snap positions
bool mInitialized:1;
* When at middle of the screen the position is not altered.
* When one screen away from middle the position is rotated as per expected in a 3D carousel.
*/
-class ScrollPageCarouselEffectInfo : public Dali::RefObject
+class ScrollPageCarouselEffectInfo
{
public:
const Vector2 mPositionToPageSizeRatio; ///< The page will move its position according to this ratio.
};
-typedef IntrusivePtr<ScrollPageCarouselEffectInfo> ScrollPageCarouselEffectInfoPtr;
-
/**
* Helper: Applies the 3D scroll cube constraints to the child actor
*
*/
void ApplyScrollCubeConstraints(Toolkit::ScrollView scrollView,
Actor child,
- ScrollPageCarouselEffectInfoPtr info)
+ ScrollPageCarouselEffectInfo& info)
{
// Apply constraints to this actor //
Constraint constraint;
void ScrollViewPageCarouselEffect::ApplyToPage( Actor page, const Vector2& positionToPageSizeRatio )
{
- ScrollPageCarouselEffectInfoPtr info(new ScrollPageCarouselEffectInfo( positionToPageSizeRatio ) );
+ ScrollPageCarouselEffectInfo info( positionToPageSizeRatio );
ApplyScrollCubeConstraints( GetScrollView(), page, info );
}
* When at middle of the screen the position is not altered.
* When one screen away from middle the position is rotated as per expected in a 3D inner cube.
*/
-class ScrollPageCubeEffectInfo : public Dali::RefObject
+class ScrollPageCubeEffectInfo
{
public:
Vector2 mAngleSwing; ///< Maximum amount in X and Y axes to rotate.
};
-typedef IntrusivePtr<ScrollPageCubeEffectInfo> ScrollPageCubeEffectInfoPtr;
-
/**
* Helper: Applies the 3D scroll cube constraints to the child actor
*
*/
void ApplyScrollCubeConstraints(Toolkit::ScrollView scrollView,
Actor child,
- ScrollPageCubeEffectInfoPtr info)
+ ScrollPageCubeEffectInfo& info)
{
// Apply constraints to this actor //
Constraint constraint;
void ScrollViewPageCubeEffect::ApplyToPage( Actor page, const Vector2& angleSwing )
{
- ScrollPageCubeEffectInfoPtr info(new ScrollPageCubeEffectInfo( angleSwing ));
+ ScrollPageCubeEffectInfo info( angleSwing );
ApplyScrollCubeConstraints( GetScrollView(), page, info );
}
* relative to the middle of the screen.
* When at middle of the screen the position is not altered.
*/
-class ScrollPageSpiralEffectInfo : public Dali::RefObject
+class ScrollPageSpiralEffectInfo
{
public:
bool mScrollWrap; ///< Whether the scroll view wraps or not.
};
-typedef IntrusivePtr<ScrollPageSpiralEffectInfo> ScrollPageSpiralEffectInfoPtr;
-
/**
* Helper: Applies the 3D scroll cube constraints to the child actor
*
*/
void ApplyScrollCubeConstraints(Toolkit::ScrollView scrollView,
Actor child,
- ScrollPageSpiralEffectInfoPtr info)
+ ScrollPageSpiralEffectInfo& info)
{
// Apply constraints to this actor //
Constraint constraint;
if ( scrollView )
{
- ScrollPageSpiralEffectInfoPtr info(new ScrollPageSpiralEffectInfo( spiralAngle, GetImpl( scrollView ).GetWrapMode() ));
+ ScrollPageSpiralEffectInfo info( spiralAngle, GetImpl( scrollView ).GetWrapMode() );
ApplyScrollCubeConstraints( scrollView, page, info );
}
}
+++ /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.
- *
- */
-
-// CLASS HEADER
-#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-slide-effect-impl.h>
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/events/touch-event.h>
-#include <dali/public-api/common/stage.h>
-
-// INTERNAL INCLUDES
-
-using namespace Dali;
-
-typedef Dali::Toolkit::Internal::ScrollSlideInfo ScrollSlideInfo;
-typedef Dali::Toolkit::Internal::ScrollSlideInfoPtr ScrollSlideInfoPtr;
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-/**
- * ScrollSlideInfo structure contains
- * common info that is shared amongst the constraints applied to Actors.
- * The constraints + effect all share ownership of this info struct.
- * The info is written to by the ScrollSlideInfoUpdate constraint. While
- * the other constraints read from by the other constraints. Due to the order
- * in which the constraints are applied, all constraints will get the current
- * property values for these properties.
- * The advantage of doing this is that:
- * A) Constraints are not restricted by the 6 property limit. to function.
- * B) Properties which rarely change or only change when another property changes
- * (e.g. time), such as scroll position, scroll domain, size, wrap mode don't need
- * to be checked for each constraint to apply.
- */
-class ScrollSlideInfo : public RefObject
-{
-
-public:
-
- /**
- * Constructor
- */
- ScrollSlideInfo()
- : mScrollWrap(false),
- mVertical(false)
- {
- }
-
- /**
- * Destructor
- */
- virtual ~ScrollSlideInfo()
- {
- }
-
-public:
-
- Vector3 mScrollPosition;
- Vector3 mEffectReference;
- Vector3 mScrollSize;
- Vector3 mScrollPositionMin;
- Vector3 mScrollPositionMax;
- bool mScrollWrap;
- bool mVertical;
-
-};
-
-} // namespace Internal
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-
-namespace // unnamed namespace
-{
-
-const float SLIDEEFFECT_ANIMATION_MAX_TIME = 60.0f; ///< Animation time (every time finishes, checks if it needs to go again)
-const float COMPLETION_START_DURATION = 0.25f; ///< Maximum time for completion of effect after scroll-view initially completes (due to delay effect)
-const float COMPLETION_END_DURATION = 5.0f; ///< Maximum time for completion of effect after scroll-view initially completes (due to delay effect)
-const float ANIMATION_BLEND_COEFFICIENT = 0.05f; ///< Animation blending coefficient (blends between target value e.g. 5% and current value 9%)
-const float INV_ANIMATION_BLEND_COEFFICIENT = (1.0f - ANIMATION_BLEND_COEFFICIENT);
-const float DEFAULT_MAX_DELAY_DURATION = 0.25f; ///< Default maximum delay duration of the effect after scroll completes is 0.25f
-const float EFFECT_SNAP_GROW_DURATION = 0.33f; ///< Take 1/3rd of a second for the snap effect property to grow
-const float EFFECT_SNAP_DECAY_DURATION = 0.667f; ///< Take 2/3rds of a second for the snap effect property to decay
-
-/**
- * Gets a property index. If the property doesn't already exist, then
- * it will create the property.
- * @param[in] handle The handle that owns or will own the property
- * @param[in] name The name for this property
- * @param[in] propertyValue The initial value for this property
- * @return The property index for this property is returned.
- */
-Property::Index SafeRegisterProperty( Handle& handle, const std::string& name, Property::Value propertyValue )
-{
- Property::Index index = handle.GetPropertyIndex( name );
-
- if(index == Property::INVALID_INDEX)
- {
- index = handle.RegisterProperty( name, propertyValue );
- }
-
- return index;
-}
-
-/**
- * Re-scales input value x from x0 - x1, to linearly map
- * over the values y0 - y1. Values outside of this range
- * will also conform to the trend (gradient) set.
- * @param[in] y0 output minimum bound
- * @param[in] y1 output maximum bound
- * @param[in] x input X value
- * @param[in] x0 (optional) input minimum bound (default 0.0)
- * @param[in] x1 (optional) input maximum bound (default 1.0)
- * @return The result of the mapping is returned.
- */
-float Mix(float y0, float y1, float x, float x0 = 0.0f, float x1 = 1.0f)
-{
- return y0 + (y1 - y0) * (x - x0) / (x1-x0);
-}
-
-/**
- * Returns the value of x chasing target.
- * returns a value of x which is closer to target.
- * but limited by maxDelta. #
- * For example:
- * x = 10.0f
- * target = 50.0f
- * maxDelta = 20.0f
- * result is 30.0f (x is 20.0f units closer to target)
- * However, if x is already within maxDelta units
- * of target, x will equal target.
- * For example:
- * x = 55.0f
- * target = 50.0f
- * maxDelta = 20.0f
- * result is 50.0f (x was already within 20.0f units of target)
- */
-float Chase( float x, float target, float maxDelta )
-{
- float delta = target - x;
-
- if(delta > 0.0f)
- {
- x = std::min( x + maxDelta, target );
- }
- else
- {
- x = std::max( x - maxDelta, target );
- }
-
- return x;
-}
-
-// constraints ////////////////////////////////////////////////////////////////
-
-/**
- * ScrollSlideInfoUpdate
- *
- * Info constraint updates an info struct with property info,
- * so that constraints can use this instead of having it passed through
- * as parameters.
- */
-struct ScrollSlideInfoUpdate
-{
- /**
- * Constraint constructor
- */
- ScrollSlideInfoUpdate(ScrollSlideInfoPtr scrollInfo)
- : mScrollSlideInfo(scrollInfo)
- {
- }
-
- /**
- * @param[in] current The current value
- * @param[in] scrollPositionProperty The scroll-view's position property (SCROLL_POSITION_PROPERTY_NAME)
- * @param[in] effectReferenceProperty The point in the scroll-view where the user touched the screen
- * @param[in] effectTimeProperty The current timer. Starting from 0.0 when scroll animation/dragging
- * commences. Ensures that constraint is applied and processed every frame (to achieve the delay effect)
- * @param[in] sizeProperty The size of the ScrollView.
- * @return The new position of this Actor.
- */
- float operator()(const float& current,
- const PropertyInput& scrollPositionProperty,
- const PropertyInput& effectReferenceProperty,
- const PropertyInput& scrollSizeProperty,
- const PropertyInput& scrollPositionMinProperty,
- const PropertyInput& scrollPositionMaxProperty,
- const PropertyInput& scrollWrapProperty)
- {
- mScrollSlideInfo->mScrollPosition = scrollPositionProperty.GetVector3();
- mScrollSlideInfo->mEffectReference = effectReferenceProperty.GetVector3();
- mScrollSlideInfo->mScrollSize = scrollSizeProperty.GetVector3();
- mScrollSlideInfo->mScrollPositionMin = scrollPositionMinProperty.GetVector3();
- mScrollSlideInfo->mScrollPositionMax = scrollPositionMaxProperty.GetVector3();
- mScrollSlideInfo->mScrollWrap = scrollWrapProperty.GetBoolean();
-
- return current;
- }
-
-private:
-
- ScrollSlideInfoPtr mScrollSlideInfo;
-
-};
-
-
-/**
- * ScrollSlidePositionConstraint
- *
- * Position constraint adjusts the position of the Actors
- * based on their parent page's position relative to the middle of the screen.
- * When at middle of the screen the position is not altered.
- * When one screen away from middle the position is rotated about it's origin + mAnchor
- */
-struct ScrollSlidePositionConstraint
-{
- /**
- * Constraint constructor
- */
- ScrollSlidePositionConstraint(ScrollSlideInfoPtr scrollInfo, float delayMin, float delayMax)
- : mScrollSlideInfo(scrollInfo),
- mScrollPosition(scrollInfo->mScrollPosition),
- mDelayMin(delayMin),
- mDelayMax(delayMax),
- mAverageSpeed(0.0f)
- {
- }
-
- /**
- * @param[in] current The current position
- * @param[in] scrollPositionProperty The scroll-view's position property (SCROLL_POSITION_PROPERTY_NAME)
- * @param[in] effectReferenceProperty The point in the scroll-view where the user touched the screen
- * @param[in] effectTimeProperty The current timer. Starting from 0.0 when scroll animation/dragging
- * commences. Ensures that constraint is applied and processed every frame (to achieve the delay effect)
- * @param[in] sizeProperty The size of the ScrollView.
- * @return The new position of this Actor.
- */
- Vector3 operator()(const Vector3& current,
- const PropertyInput& pagePositionProperty,
- const PropertyInput& effectTimeProperty,
- const PropertyInput& deltaPositionProperty,
- const PropertyInput& snapProperty)
- {
- const float complete = snapProperty.GetFloat();
- bool activate = (complete > Math::MACHINE_EPSILON_1);
- const Vector3& pagePosition = pagePositionProperty.GetVector3();
- const Vector3& scrollPosition = mScrollSlideInfo->mScrollPosition;
-
- // Get position of page.
- Vector2 relativePosition(pagePosition + scrollPosition);
-
- // short circuit: for orthognal view and when the blending has been deactivated.
- if( (!activate) &&
- (fabsf(relativePosition.x) < Math::MACHINE_EPSILON_1) &&
- (fabsf(relativePosition.y) < Math::MACHINE_EPSILON_1) )
- {
- Vector3 actorPosition(current + scrollPosition);
- return actorPosition;
- }
-
- const Vector3& referencePoint = mScrollSlideInfo->mEffectReference;
- const Vector3& scrollSize = mScrollSlideInfo->mScrollSize;
- const Vector3& deltaPosition = deltaPositionProperty.GetVector3();
-
- // 1. Determine the relative position of the actor from the scrolling reference point.
- // (the further away from the reference, the longer the delay should be)
- const Vector3& min = mScrollSlideInfo->mScrollPositionMin;
- const Vector3& max = mScrollSlideInfo->mScrollPositionMax;
-
- relativePosition.y = (pagePosition.y + current.y - referencePoint.y) / scrollSize.height;
-
- // Smoothen the relativePosition value by averaging with mRelativePosition (avoids sudden jerk when
- // user touche different points)
- float shortestDirection = ShortestDistanceInDomain(mRelativePosition.y, relativePosition.y, min.y, max.y);
- mRelativePosition.y += activate ? shortestDirection * ANIMATION_BLEND_COEFFICIENT : shortestDirection;
-
- // f represents this absolute distance. Get as a relative distance and inverse exponential
- // (as delay equation has an exponential effect i.e. the closer delayFactor to 1.0f,
- // the longer the delay would appear exponentially)
- float f = fabsf(mRelativePosition.y) * complete;
- f = std::min(f, 1.0f);
- f = 1.0f - powf(ANIMATION_BLEND_COEFFICIENT, f);
-
- // at center delay factor is mDelayMin, at maximum (1.0) it is mDelayMax
- f = Mix(mDelayMin, mDelayMax, f);
-
- // 2. Now that f (delay factor) has been determined for this Actor,
- // move mScrollPosition towards the actual scroll position, at rate determined by f.
- float shortest = ShortestDistanceInDomain(mScrollPosition.x, WrapInDomain(scrollPosition.x, -min.x, -max.x), min.x, max.x);
- mScrollPosition.x += activate ? shortest * (1.0f-f) : shortest;
- mScrollPosition.x = WrapInDomain(mScrollPosition.x, -min.x, -max.x);
- mScrollPosition.y = scrollPosition.y;
-
- Vector3 actorPosition(current + pagePosition + mScrollPosition);
-
- // Get position of actor.
- bool wrap = mScrollSlideInfo->mScrollWrap;
-
- if(wrap)
- {
- if(fabsf(min.x - max.x) > Math::MACHINE_EPSILON_1)
- {
- // WRAP X (based on the position of the right side)
- actorPosition.x = WrapInDomain(actorPosition.x + scrollSize.x, min.x, max.x) - scrollSize.width;
- }
- }
-
- const float targetRelativePositionX = (referencePoint.x + deltaPosition.x);
-
- float blend(Mix(1.0f, ANIMATION_BLEND_COEFFICIENT, 1.0f - (1.0f - complete) * (1.0f - complete) ));
- float invBlend(1.0f - blend);
-
- mRelativePosition.x = activate ? mRelativePosition.x * invBlend + targetRelativePositionX * blend : targetRelativePositionX;
- mRelativePosition.x = Chase( mRelativePosition.x, targetRelativePositionX, 1.0f );
-
- relativePosition.x = (actorPosition.x - mRelativePosition.x) / scrollSize.width;
-
- float difference = fabsf(ShortestDistanceInDomain(mScrollPosition.x, scrollPosition.x, -max.x, -min.x));
- mAverageSpeed = activate ? mAverageSpeed * invBlend + difference * blend : 0.0f;
-
- actorPosition.x += relativePosition.x * mAverageSpeed;
-
- return actorPosition - pagePosition;
- }
-
-private:
-
- ScrollSlideInfoPtr mScrollSlideInfo;
- Vector3 mScrollPosition; ///< The current scroll position
- float mDelayMin; ///< Minimum delay rate (at closest position to touch)
- float mDelayMax; ///< Maximum delay rate (at furthest position from touch - 1 page away)
- Vector2 mRelativePosition;
- float mAverageSpeed; ///< The Average speed of the Actor (proportional to mScrollPosition - scrollPosition)
-
-};
-
-/**
- * ScrollSlideScaleConstraint
- *
- */
-struct ScrollSlideScaleConstraint
-{
- /**
- * Constraint constructor
- */
- ScrollSlideScaleConstraint()
- {
- }
-
- /**
- * @param[in] current The current position
- * @param[in] scrollPositionProperty The scroll-view's position property (SCROLL_POSITION_PROPERTY_NAME)
- * @param[in] effectReferenceProperty The point in the scroll-view where the user touched the screen
- * @param[in] effectTimeProperty The current timer. Starting from 0.0 when scroll animation/dragging
- * commences. Ensures that constraint is applied and processed every frame (to achieve the delay effect)
- * @param[in] sizeProperty The size of the ScrollView.
- * @return The new position of this Actor.
- */
- Vector3 operator()(const Vector3& current,
- const PropertyInput& snapProperty)
- {
- float scale = 1.0f + snapProperty.GetFloat() * 0.008f;
- return Vector3( current.x * scale, current.y * scale, current.z);
- }
-
-};
-
-/**
- * Applies the slide constraints to the child actor for overshoot effect.
- *
- * @param[in] scrollView The ScrollView containing the pages.
- * @param[in] child The child to be affected with the slide effect.
- * @param[in] angleSwing The maximum amount the child actor should
- * rotate in radians for each axis (X and Y) as the page is scrolled.
- * move for each axis (X and Y) as the page is scrolled.
- */
-void ApplyScrollSlideConstraints(ScrollSlideInfoPtr scrollSlideInfo,
- Toolkit::ScrollView scrollView,
- Actor child,
- float delayMin,
- float delayMax)
-{
- // Apply constraints to these actors //
- Constraint constraint = Constraint::New<Vector3>( Actor::POSITION,
- ParentSource(Actor::POSITION),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewSlideEffect::EFFECT_TIME ) ),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_DELTA_PROPERTY_NAME ) ),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewSlideEffect::EFFECT_ACTIVE ) ),
- ScrollSlidePositionConstraint(scrollSlideInfo, delayMin, delayMax) );
- constraint.SetRemoveAction( Constraint::Discard );
- child.ApplyConstraint( constraint );
-
- constraint = Constraint::New<Vector3>( Actor::SCALE,
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewSlideEffect::EFFECT_ACTIVE ) ),
- ScrollSlideScaleConstraint() );
- constraint.SetRemoveAction( Constraint::Discard );
- child.ApplyConstraint( constraint );
-}
-
-} // unnamed namespace
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-ScrollViewSlideEffect::ScrollViewSlideEffect()
-: mScrollSlideInfo(new ScrollSlideInfo()),
- mPropertyTime(Property::INVALID_INDEX),
- mPropertyReference(Property::INVALID_INDEX),
- mPropertyActive(Property::INVALID_INDEX),
- mDelayReferenceOffset(Vector3::ZERO),
- mMaxDelayDuration(DEFAULT_MAX_DELAY_DURATION)
-{
-}
-
-ScrollViewSlideEffect::~ScrollViewSlideEffect()
-{
-}
-
-bool ScrollViewSlideEffect::GetSlideDirection() const
-{
- return mScrollSlideInfo->mVertical;
-}
-
-void ScrollViewSlideEffect::SetSlideDirection(bool vertical)
-{
- mScrollSlideInfo->mVertical = vertical;
-}
-
-const Vector3& ScrollViewSlideEffect::GetDelayReferenceOffset() const
-{
- return mDelayReferenceOffset;
-}
-
-void ScrollViewSlideEffect::SetDelayReferenceOffset(const Vector3& offset)
-{
- mDelayReferenceOffset = offset;
-}
-
-float ScrollViewSlideEffect::GetMaxDelayDuration() const
-{
- return mMaxDelayDuration;
-}
-
-void ScrollViewSlideEffect::SetMaxDelayDuration(float duration)
-{
- mMaxDelayDuration = duration;
-}
-
-void ScrollViewSlideEffect::ApplyToActor(Actor child,
- float delayMin,
- float delayMax)
-{
- ApplyScrollSlideConstraints( mScrollSlideInfo,
- GetScrollView(),
- child,
- delayMin,
- delayMax );
-}
-
-void ScrollViewSlideEffect::OnAttach(Toolkit::ScrollView& scrollView)
-{
- mScrollSlideInfo->mScrollPosition = scrollView.GetProperty<Vector3>( scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_PROPERTY_NAME ) );
- mScrollSlideInfo->mScrollSize = scrollView.GetProperty<Vector3>( Actor::SIZE );
- mScrollSlideInfo->mScrollPositionMin = scrollView.GetProperty<Vector3>( scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) );
- mScrollSlideInfo->mScrollPositionMax = scrollView.GetProperty<Vector3>( scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) );
- mScrollSlideInfo->mScrollWrap = scrollView.GetProperty<bool>( scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_WRAP_PROPERTY_NAME ) );
- mScrollSlideInfo->mVertical = false;
-
- // Create effect-time property if not already created.
- if(mPropertyTime == Property::INVALID_INDEX)
- {
- mPropertyTime = SafeRegisterProperty( scrollView, Toolkit::ScrollViewSlideEffect::EFFECT_TIME, 0.0f );
- mPropertyReference = SafeRegisterProperty( scrollView, Toolkit::ScrollViewSlideEffect::EFFECT_REFERENCE, Vector3::ZERO );
- mPropertyActive = SafeRegisterProperty( scrollView, Toolkit::ScrollViewSlideEffect::EFFECT_ACTIVE, 0.0f );
- }
-
- // Create constraint to update ScrollSlideInfo
- // Doesn't matter what this is applied to and on what property.
- // Just needs to update mScrollSlideInfo values as properties change.
- // The minor constraints (applied to the Actors) can use this mScrollSlideInfo.
- Constraint constraint = Constraint::New<float>( mPropertyTime,
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_PROPERTY_NAME ) ),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewSlideEffect::EFFECT_REFERENCE ) ),
- Source(scrollView, Actor::SIZE),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MIN_PROPERTY_NAME ) ),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_MAX_PROPERTY_NAME ) ),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_WRAP_PROPERTY_NAME ) ),
- ScrollSlideInfoUpdate(mScrollSlideInfo) );
- constraint.SetRemoveAction( Constraint::Discard );
- mInfoUpdateConstraint = scrollView.ApplyConstraint( constraint );
-
- // Connect to the scroll view signals
- scrollView.ScrollStartedSignal().Connect(this, &ScrollViewSlideEffect::OnScrollStart);
- scrollView.SnapStartedSignal().Connect(this, &ScrollViewSlideEffect::OnScrollSnapStarted);
- scrollView.TouchedSignal().Connect(this, &ScrollViewSlideEffect::OnScrollTouched);
-
- AttachActor(scrollView);
-}
-
-bool ScrollViewSlideEffect::OnScrollTouched(Actor actor, const TouchEvent& event)
-{
- // Ignore events with multiple-touch points
- if (event.GetPointCount() != 1)
- {
- return false;
- }
-
- if (event.GetPoint(0).state == TouchPoint::Down)
- {
- const TouchPoint& point = event.GetPoint(0);
- Vector3 touchPosition(point.local - Stage::GetCurrent().GetSize() * 0.5f);
-
- Vector3 scrollPosition = GetScrollView().GetCurrentScrollPosition();
- GetScrollView().SetProperty(mPropertyReference, scrollPosition + touchPosition + mDelayReferenceOffset);
- }
-
- return false;
-}
-
-void ScrollViewSlideEffect::OnDetach(Toolkit::ScrollView& scrollView)
-{
- scrollView.ScrollStartedSignal().Disconnect(this, &ScrollViewSlideEffect::OnScrollStart);
- scrollView.SnapStartedSignal().Disconnect(this, &ScrollViewSlideEffect::OnScrollSnapStarted);
- scrollView.TouchedSignal().Disconnect(this, &ScrollViewSlideEffect::OnScrollTouched);
- scrollView.RemoveConstraint( mInfoUpdateConstraint );
-
- if(mAnimation)
- {
- mAnimation.FinishedSignal().Disconnect(this, &ScrollViewSlideEffect::OnAnimationFinished);
- mAnimation.Clear();
- mAnimation.Reset();
- }
-
- if(mAnimationSnap)
- {
- mAnimationSnap.FinishedSignal().Disconnect(this, &ScrollViewSlideEffect::OnAnimationSnapFinished);
- mAnimationSnap.Clear();
- mAnimationSnap.Reset();
- }
-}
-
-void ScrollViewSlideEffect::AttachActor(Actor actor)
-{
-
-}
-
-void ScrollViewSlideEffect::DetachActor(Actor actor)
-{
- // TODO: remove the specific constraint defined in AttachActor (and possibly
- // unregister property) - neither functionality exists in Dali.
-}
-
-void ScrollViewSlideEffect::ContinueAnimation(float endTime)
-{
- // continue animating
- if(mAnimation)
- {
- mAnimation.FinishedSignal().Disconnect(this, &ScrollViewSlideEffect::OnAnimationFinished);
- mAnimation.Clear();
- }
-
- Actor scrollView = GetScrollView();
-
- mAnimation = Animation::New(SLIDEEFFECT_ANIMATION_MAX_TIME);
- mAnimation.AnimateTo( Property(scrollView, mPropertyTime), endTime, AlphaFunctions::Linear );
- mAnimation.FinishedSignal().Connect(this, &ScrollViewSlideEffect::OnAnimationFinished);
- mAnimation.Play();
-}
-
-void ScrollViewSlideEffect::OnScrollStart( const Vector3& position )
-{
- Actor scrollView = GetScrollView();
- GetScrollView().SetProperty(mPropertyTime, 0.0f);
-
- ContinueAnimation(SLIDEEFFECT_ANIMATION_MAX_TIME);
-
- if(mAnimationSnap)
- {
- mAnimationSnap.FinishedSignal().Disconnect(this, &ScrollViewSlideEffect::OnAnimationSnapFinished);
- mAnimationSnap.Clear();
- }
-
- mAnimationSnap = Animation::New( EFFECT_SNAP_GROW_DURATION );
- mAnimationSnap.AnimateTo( Property(scrollView, mPropertyActive), 1.0f, AlphaFunctions::Linear );
- mAnimationSnap.FinishedSignal().Connect(this, &ScrollViewSlideEffect::OnAnimationSnapFinished);
- mAnimationSnap.Play();
-}
-
-void ScrollViewSlideEffect::OnScrollSnapStarted(const Toolkit::ScrollView::SnapEvent& event)
-{
- if(mAnimationSnap)
- {
- mAnimationSnap.Clear();
- }
-
- Actor scrollView = GetScrollView();
- mAnimationSnap = Animation::New(EFFECT_SNAP_DECAY_DURATION );
- mAnimationSnap.AnimateTo( Property(scrollView, mPropertyActive), 0.0f, AlphaFunctions::Linear );
- mAnimationSnap.FinishedSignal().Connect(this, &ScrollViewSlideEffect::OnAnimationSnapFinished);
- mAnimationSnap.Play();
-}
-
-void ScrollViewSlideEffect::OnAnimationSnapFinished( Animation& animation )
-{
- mAnimationSnap.FinishedSignal().Disconnect(this, &ScrollViewSlideEffect::OnAnimationSnapFinished);
- mAnimationSnap.Clear();
-
- // stop time animation
- if(mAnimation)
- {
- mAnimation.FinishedSignal().Disconnect(this, &ScrollViewSlideEffect::OnAnimationFinished);
- mAnimation.Clear();
- }
-}
-
-void ScrollViewSlideEffect::OnAnimationFinished( Animation& animation )
-{
- // still unstable, so continue animating.
- // TODO: Requires an instability check to ensure time animation finishes when delay is
- // less noticeable. i.e. all present scrollPositions are approx the same as mScrollPosition in constraints.
- // best solution for this is to switch to a single history vector of scroll position, and compare if
- // position has not deviated >= 0.5 pixel for the past 1 second.
- float endTime = GetScrollView().GetProperty<float>(mPropertyTime) + SLIDEEFFECT_ANIMATION_MAX_TIME;
- ContinueAnimation(endTime);
-}
-
-} // namespace Internal
-
-} // namespace Toolkit
-
-} // namespace Dali
+++ /dev/null
-#ifndef __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_SLIDE_EFFECT_H__
-#define __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_SLIDE_EFFECT_H__
-
-/*
- * 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.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/animation/animation.h>
-#include <dali/public-api/animation/alpha-functions.h>
-#include <dali/public-api/animation/time-period.h>
-#include <dali/public-api/object/ref-object.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-slide-effect.h>
-#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-effect-impl.h>
-
-namespace Dali
-{
-
-class Animation;
-
-namespace Toolkit
-{
-
-class ScrollView;
-
-namespace Internal
-{
-
-class ScrollSlideInfo;
-
-typedef IntrusivePtr<ScrollSlideInfo> ScrollSlideInfoPtr;
-
-/**
- * @copydoc Toolkit::ScrollViewSlideEffect
- */
-class ScrollViewSlideEffect : public ScrollViewEffect
-{
-public:
-
- /**
- * Constructor
- */
- ScrollViewSlideEffect();
-
-public:
-
- /**
- * @copydoc ScrollViewEffect::GetSlideDirection
- */
- bool GetSlideDirection() const;
-
- /**
- * @copydoc ScrollViewEffect::SetSlideDirection
- */
- void SetSlideDirection(bool vertical);
-
- /**
- * @copydoc ScrollViewEffect::GetDelayReferenceOffset
- */
- const Vector3& GetDelayReferenceOffset() const;
-
- /**
- * @copydoc ScrollViewEffect::SetDelayReferenceOffset
- */
- void SetDelayReferenceOffset(const Vector3& offset);
-
- /**
- * @copydoc ScrollViewEffect::GetMaxDelayDuration
- */
- float GetMaxDelayDuration() const;
-
- /**
- * @copydoc ScrollViewEffect::SetMaxDelayDuration
- */
- void SetMaxDelayDuration(float duration);
-
- /**
- * @copydoc ScrollViewEffect::ApplyToActor
- */
- void ApplyToActor( Actor child,
- float delayMin,
- float delayMax );
-public:
-
- /**
- * @copydoc ScrollViewEffect::OnAttach
- */
- virtual void OnAttach(Toolkit::ScrollView& scrollView);
-
- /**
- * @copydoc ScrollViewEffect::OnDetach
- */
- virtual void OnDetach(Toolkit::ScrollView& scrollView);
-
-protected:
-
- /**
- * A reference counted object may only be deleted by calling Unreference()
- */
- virtual ~ScrollViewSlideEffect();
-
-private:
-
- /**
- * Invoked when user touches the scroll-view
- * We keep track of the touch as this is used to determine
- * the reference point which is used to determine the delay
- * factor for the Actors' movements.
- * @param[in] actor The actor touched
- * @param[in] event The touch Event
- * @return Whether to consume the even or not.
- */
- bool OnScrollTouched(Actor actor, const TouchEvent& event);
-
- /**
- * Signal handler, called when the ScrollView starts to move
- *
- * @param[in] position The current scroll position
- */
- void OnScrollStart( const Vector3& position );
-
- /**
- * Signal handler, called when the ScrollView starts to snap
- * @param[in] event The snap event.
- */
- void OnScrollSnapStarted(const Toolkit::ScrollView::SnapEvent& event);
-
- /**
- * Signal handler, called some time after the ScrollView has completed
- * movement. There is a delay as when the ScrollView has completed
- * movement, there are Actors that have a delay, and take time to arrive
- * at their final destination.
- *
- * @param[in] animation The animation delegate for this delay
- */
- void OnAnimationSnapFinished( Animation& animation );
-
- /**
- * Signal handler, called when the Wobble Effect animation has completed.
- *
- * @param[in] animation The animation.
- */
- void OnAnimationFinished( Animation& animation );
-
- /**
- * Attaches effect to Scroll Actor (ScrollView)
- *
- * Applies the same wobble effect to each Scroll Actor.
- *
- * @param[in] actor The attached Actor
- */
- void AttachActor(Actor actor);
-
- /**
- * Detaches effect from Scroll Actor (ScrollView)
- *
- * @param[in] actor The attached Actor
- */
- void DetachActor(Actor actor);
-
- /**
- * Continues Animation to time reaches endTime
- *
- * @param[in] endTime the target time to reach.
- */
- void ContinueAnimation(float endTime);
-
-private:
-
- ScrollSlideInfoPtr mScrollSlideInfo; ///< Info structure to keep track of common properties amongst many constraints.
- ActiveConstraint mInfoUpdateConstraint; ///< Constraint applied to scroll-view to update Info structure.
- Animation mAnimation; ///< Animation Timer to drive the slide effect constraint.
- Animation mAnimationSnap; ///< Animation Snap (this animates from from 1.0 to 0.0 when contents snap)
- Property::Index mPropertyTime; ///< Time property used by slide effect constraint to calculate timePassed.
- Property::Index mPropertyReference; ///< Reference point in scroll-contents, this point has no delay.
- ///< The further out from this point, the further the delay.
- Property::Index mPropertyActive; ///< Property indicates the progress of the scrolling from 1.0f (scrolling) to 0.0f (fully snapped)
- Vector3 mDelayReferenceOffset; ///< Where to offset the delay reference point when dragging.
- float mMaxDelayDuration; ///< Maximum duration of effect after scroll-view completes.
-};
-
-} // namespace Internal
-
-// Helpers for public-api forwarding methods
-
-inline Internal::ScrollViewSlideEffect& GetImpl(Dali::Toolkit::ScrollViewSlideEffect& obj)
-{
- DALI_ASSERT_ALWAYS(obj);
-
- Dali::RefObject& handle = obj.GetBaseObject();
-
- return static_cast<Internal::ScrollViewSlideEffect&>(handle);
-}
-
-inline const Internal::ScrollViewSlideEffect& GetImpl(const Dali::Toolkit::ScrollViewSlideEffect& obj)
-{
- DALI_ASSERT_ALWAYS(obj);
-
- const Dali::RefObject& handle = obj.GetBaseObject();
-
- return static_cast<const Internal::ScrollViewSlideEffect&>(handle);
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_SLIDE_EFFECT_H__
return mOvershootAnimationSpeed;
};
-Toolkit::Scrollable::ScrollStartedSignalV2& Scrollable::ScrollStartedSignal()
+Toolkit::Scrollable::ScrollStartedSignalType& Scrollable::ScrollStartedSignal()
{
- return mScrollStartedSignalV2;
+ return mScrollStartedSignal;
}
-Toolkit::Scrollable::ScrollUpdatedSignalV2& Scrollable::ScrollUpdatedSignal()
+Toolkit::Scrollable::ScrollUpdatedSignalType& Scrollable::ScrollUpdatedSignal()
{
- return mScrollUpdatedSignalV2;
+ return mScrollUpdatedSignal;
}
-Toolkit::Scrollable::ScrollCompletedSignalV2& Scrollable::ScrollCompletedSignal()
+Toolkit::Scrollable::ScrollCompletedSignalType& Scrollable::ScrollCompletedSignal()
{
- return mScrollCompletedSignalV2;
+ return mScrollCompletedSignal;
}
-Toolkit::Scrollable::ScrollClampedSignalV2& Scrollable::ScrollClampedSignal()
+Toolkit::Scrollable::ScrollClampedSignalType& Scrollable::ScrollClampedSignal()
{
- return mScrollClampedSignalV2;
+ return mScrollClampedSignal;
}
bool Scrollable::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
/**
* @copydoc Dali::Toolkit::Scrollable::ScrollStartedSignal()
*/
- Toolkit::Scrollable::ScrollStartedSignalV2& ScrollStartedSignal();
+ Toolkit::Scrollable::ScrollStartedSignalType& ScrollStartedSignal();
/**
* @copydoc Dali::Toolkit::Scrollable::ScrollUpdatedSignal()
*/
- Toolkit::Scrollable::ScrollUpdatedSignalV2& ScrollUpdatedSignal();
+ Toolkit::Scrollable::ScrollUpdatedSignalType& ScrollUpdatedSignal();
/**
* @copydoc Dali::Toolkit::Scrollable::ScrollCompletedSignal()
*/
- Toolkit::Scrollable::ScrollCompletedSignalV2& ScrollCompletedSignal();
+ Toolkit::Scrollable::ScrollCompletedSignalType& ScrollCompletedSignal();
/**
* @copydoc Dali::Toolkit::Scrollable::ScrollClampedSignal()
*/
- Toolkit::Scrollable::ScrollClampedSignalV2& ScrollClampedSignal();
+ Toolkit::Scrollable::ScrollClampedSignalType& ScrollClampedSignal();
/**
* Connects a callback function with the object's signals.
std::map<Toolkit::Scrollable::ScrollComponentType, ScrollComponentPtr> mComponent; ///< ScrollComponent (such as a scrollbar/page indicator/status)
- Toolkit::Scrollable::ScrollStartedSignalV2 mScrollStartedSignalV2;
- Toolkit::Scrollable::ScrollUpdatedSignalV2 mScrollUpdatedSignalV2;
- Toolkit::Scrollable::ScrollCompletedSignalV2 mScrollCompletedSignalV2;
- Toolkit::Scrollable::ScrollClampedSignalV2 mScrollClampedSignalV2;
+ Toolkit::Scrollable::ScrollStartedSignalType mScrollStartedSignal;
+ Toolkit::Scrollable::ScrollUpdatedSignalType mScrollUpdatedSignal;
+ Toolkit::Scrollable::ScrollCompletedSignalType mScrollCompletedSignal;
+ Toolkit::Scrollable::ScrollClampedSignalType mScrollClampedSignal;
private:
public:
- typedef SignalV2< bool( Toolkit::Button ) > PressedSignal;
- typedef SignalV2< void () > CursorPositionedSignal;
+ typedef Signal< bool( Toolkit::Button ) > PressedSignal;
+ typedef Signal< void () > CursorPositionedSignal;
/**
* @brief Signal emitted when the button is touched.
* This is relayed from the PopUp class. It enables the owner of the Decorator to act on the PopUp button press.
// Signals
-Toolkit::TextInput::InputSignalV2& TextInput::InputStartedSignal()
+Toolkit::TextInput::InputSignalType& TextInput::InputStartedSignal()
{
- return mInputStartedSignalV2;
+ return mInputStartedSignal;
}
-Toolkit::TextInput::InputSignalV2& TextInput::InputFinishedSignal()
+Toolkit::TextInput::InputSignalType& TextInput::InputFinishedSignal()
{
- return mInputFinishedSignalV2;
+ return mInputFinishedSignal;
}
-Toolkit::TextInput::InputSignalV2& TextInput::CutAndPasteToolBarDisplayedSignal()
+Toolkit::TextInput::InputSignalType& TextInput::CutAndPasteToolBarDisplayedSignal()
{
- return mCutAndPasteToolBarDisplayedV2;
+ return mCutAndPasteToolBarDisplayed;
}
-Toolkit::TextInput::StyleChangedSignalV2& TextInput::StyleChangedSignal()
+Toolkit::TextInput::StyleChangedSignalType& TextInput::StyleChangedSignal()
{
- return mStyleChangedSignalV2;
+ return mStyleChangedSignal;
}
Toolkit::TextInput::TextModifiedSignalType& TextInput::TextModifiedSignal()
return mTextModifiedSignal;
}
-Toolkit::TextInput::MaxInputCharactersReachedSignalV2& TextInput::MaxInputCharactersReachedSignal()
+Toolkit::TextInput::MaxInputCharactersReachedSignalType& TextInput::MaxInputCharactersReachedSignal()
{
- return mMaxInputCharactersReachedSignalV2;
+ return mMaxInputCharactersReachedSignal;
}
-Toolkit::TextInput::InputTextExceedBoundariesSignalV2& TextInput::InputTextExceedBoundariesSignal()
+Toolkit::TextInput::InputTextExceedBoundariesSignalType& TextInput::InputTextExceedBoundariesSignal()
{
- return mInputTextExceedBoundariesSignalV2;
+ return mInputTextExceedBoundariesSignal;
}
bool TextInput::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
StartCursorBlinkTimer();
Toolkit::TextInput handle( GetOwner() );
- mInputStartedSignalV2.Emit( handle );
+ mInputStartedSignal.Emit( handle );
ImfManager imfManager = ImfManager::Get();
VirtualKeyboard::LanguageChangedSignal().Disconnect( this, &TextInput::SetTextDirection );
Toolkit::TextInput handle( GetOwner() );
- mInputFinishedSignalV2.Emit( handle );
+ mInputFinishedSignal.Emit( handle );
mEditModeActive = false;
mPreEditFlag = false;
RemoveHighlight();
{
// emit signal if input style changes.
Toolkit::TextInput handle( GetOwner() );
- mStyleChangedSignalV2.Emit( handle, mInputStyle );
+ mStyleChangedSignal.Emit( handle, mInputStyle );
}
void TextInput::EmitTextModified()
DALI_LOG_INFO(gLogFilter, Debug::General, "EmitMaxInputCharactersReachedSignal \n");
Toolkit::TextInput handle( GetOwner() );
- mMaxInputCharactersReachedSignalV2.Emit( handle );
+ mMaxInputCharactersReachedSignal.Emit( handle );
}
void TextInput::EmitInputTextExceedsBoundariesSignal()
// Emit a signal when the input text exceeds the boundaries of the text input.
Toolkit::TextInput handle( GetOwner() );
- mInputTextExceedBoundariesSignalV2.Emit( handle );
+ mInputTextExceedBoundariesSignal.Emit( handle );
}
} // namespace Internal
/**
* @copydoc Toolkit::TextInput::InputStartedSignal()
*/
- Toolkit::TextInput::InputSignalV2& InputStartedSignal();
+ Toolkit::TextInput::InputSignalType& InputStartedSignal();
/**
* @copydoc Toolkit::TextInput::InputFinishedSignal()
*/
- Toolkit::TextInput::InputSignalV2& InputFinishedSignal();
+ Toolkit::TextInput::InputSignalType& InputFinishedSignal();
/**
* @copydoc Toolkit::TextInput::CutAndPasteToolBarDisplayedSignal()
*/
- Toolkit::TextInput::InputSignalV2& CutAndPasteToolBarDisplayedSignal();
+ Toolkit::TextInput::InputSignalType& CutAndPasteToolBarDisplayedSignal();
/**
* @copydoc Toolkit::TextInput::StyleChangedSignal()
*/
- Toolkit::TextInput::StyleChangedSignalV2& StyleChangedSignal();
+ Toolkit::TextInput::StyleChangedSignalType& StyleChangedSignal();
/**
* @copydoc Toolkit::TextInput::TextModifiedSignal()
/**
* @copydoc Toolkit::TextInput::MaxInputCharactersReachedSignal()
*/
- Toolkit::TextInput::MaxInputCharactersReachedSignalV2& MaxInputCharactersReachedSignal();
+ Toolkit::TextInput::MaxInputCharactersReachedSignalType& MaxInputCharactersReachedSignal();
/**
* @copydoc Toolkit::TextInput::InputTextExceedBoundariesSignal()
*/
- Toolkit::TextInput::InputTextExceedBoundariesSignalV2& InputTextExceedBoundariesSignal();
+ Toolkit::TextInput::InputTextExceedBoundariesSignalType& InputTextExceedBoundariesSignal();
/**
* Connects a callback function with the object's signals.
bool mPlaceHolderSet:1; ///< Whether the place holder text is set.
bool mMarkUpEnabled:1; ///< enable to scan for mark-up
- Toolkit::TextInput::InputSignalV2 mInputStartedSignalV2; ///< Signal emitted when input starts
- Toolkit::TextInput::InputSignalV2 mInputFinishedSignalV2; ///< Signal emitted when input ends
- Toolkit::TextInput::StyleChangedSignalV2 mStyleChangedSignalV2; ///< Signal emitted when style changes.
+ Toolkit::TextInput::InputSignalType mInputStartedSignal; ///< Signal emitted when input starts
+ Toolkit::TextInput::InputSignalType mInputFinishedSignal; ///< Signal emitted when input ends
+ Toolkit::TextInput::StyleChangedSignalType mStyleChangedSignal; ///< Signal emitted when style changes.
Toolkit::TextInput::TextModifiedSignalType mTextModifiedSignal; ///< Signal emitted when text modified.
- Toolkit::TextInput::MaxInputCharactersReachedSignalV2 mMaxInputCharactersReachedSignalV2; ///< Signal emitted when max input characters is reached.
- Toolkit::TextInput::InputSignalV2 mCutAndPasteToolBarDisplayedV2; ///< Signal emitted when toolbar displayed
- Toolkit::TextInput::InputTextExceedBoundariesSignalV2 mInputTextExceedBoundariesSignalV2; ///< Signal emitted when input text exceeds the boundaries of the text-input.
+ Toolkit::TextInput::MaxInputCharactersReachedSignalType mMaxInputCharactersReachedSignal; ///< Signal emitted when max input characters is reached.
+ Toolkit::TextInput::InputSignalType mCutAndPasteToolBarDisplayed; ///< Signal emitted when toolbar displayed
+ Toolkit::TextInput::InputTextExceedBoundariesSignalType mInputTextExceedBoundariesSignal; ///< Signal emitted when input text exceeds the boundaries of the text-input.
};
} // namespace Internal
optionPressedBackground.Add( pressedIcon );
// 12. Set the pressed option image
- option.SetPressedImage( optionPressedContainer );
+ option.SetSelectedImage( optionPressedContainer );
// 13. Add the divider
if ( !finalOption )
mShowFinishedSignal.Emit( *this );
}
-TextInputPopup::PressedSignalV2& TextInputPopup::PressedSignal()
+TextInputPopup::PressedSignalType& TextInputPopup::PressedSignal()
{
return mPressedSignal;
}
-TextInputPopup::HideFinishedSignalV2& TextInputPopup::HideFinishedSignal()
+TextInputPopup::HideFinishedSignalType& TextInputPopup::HideFinishedSignal()
{
return mHideFinishedSignal;
}
-TextInputPopup::ShowFinishedSignalV2& TextInputPopup::ShowFinishedSignal()
+TextInputPopup::ShowFinishedSignalType& TextInputPopup::ShowFinishedSignal()
{
return mShowFinishedSignal;
}
static const char* const SIGNAL_SHOW_FINISHED;
// Popup Button Pressed
- typedef SignalV2< bool( Toolkit::Button ) > PressedSignalV2;
+ typedef Signal< bool( Toolkit::Button ) > PressedSignalType;
// Popup Hide Finished
- typedef SignalV2< void( TextInputPopup& ) > HideFinishedSignalV2;
+ typedef Signal< void( TextInputPopup& ) > HideFinishedSignalType;
// Popup Show Finished
- typedef SignalV2< void( TextInputPopup& ) > ShowFinishedSignalV2;
+ typedef Signal< void( TextInputPopup& ) > ShowFinishedSignalType;
/**
* Signal emitted when the button is touched.
*/
- PressedSignalV2& PressedSignal();
+ PressedSignalType& PressedSignal();
/**
* Signal emitted when popup is completely hidden
* @note Only occurs after a Show() call with animation enabled.
*/
- HideFinishedSignalV2& HideFinishedSignal();
+ HideFinishedSignalType& HideFinishedSignal();
/**
* Signal emitted when popup is completely shown
* @note Only occurs after a Hide() call with animation enabled.
*/
- ShowFinishedSignalV2& ShowFinishedSignal();
+ ShowFinishedSignalType& ShowFinishedSignal();
public:
std::size_t mPasteOptionPriority; // Position of Paste button
std::size_t mClipboardOptionPriority; // Position of Clipboard button
- PressedSignalV2 mPressedSignal; ///< Signal emitted when a button within the popup is pressed.
- HideFinishedSignalV2 mHideFinishedSignal; ///< Signal emitted when popup is completely hidden
- ShowFinishedSignalV2 mShowFinishedSignal; ///< Signal emitted when popup is completely shown
+ PressedSignalType mPressedSignal; ///< Signal emitted when a button within the popup is pressed.
+ HideFinishedSignalType mHideFinishedSignal; ///< Signal emitted when popup is completely hidden
+ ShowFinishedSignalType mShowFinishedSignal; ///< Signal emitted when popup is completely shown
};
static const char* const SIGNAL_SHOW_FINISHED;
// Popup Button Pressed
- typedef SignalV2< bool( Toolkit::Button ) > PopUpPressedSignal;
+ typedef Signal< bool( Toolkit::Button ) > PopUpPressedSignal;
// Popup Hide Finished
- typedef SignalV2< void( TextInputPopupNew& ) > PopUpHideFinishedSignal;
+ typedef Signal< void( TextInputPopupNew& ) > PopUpHideFinishedSignal;
// Popup Show Finished
- typedef SignalV2< void( TextInputPopupNew& ) > PopUpShowFinishedSignal;
+ typedef Signal< void( TextInputPopupNew& ) > PopUpShowFinishedSignal;
/**
* Signal emitted when the button is touched.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/signals/dali-signal-v2.h>
+#include <dali/public-api/signals/dali-signal.h>
#include <dali/public-api/text/text-style.h>
// INTERNAL INCLUDES
*/
/* Input style changed signal.*/
- typedef SignalV2< void( const TextStyle& style ) > StyleChangedSignalType;
+ typedef Signal< void( const TextStyle& style ) > StyleChangedSignalType;
/**
* @brief Signal emitted when style changes.
return mVisualParameters.mScrollPositionTrimmed;
}
-Toolkit::TextView::ScrolledSignalV2& TextView::ScrolledSignal()
+Toolkit::TextView::ScrolledSignalType& TextView::ScrolledSignal()
{
- return mScrolledSignalV2;
+ return mScrolledSignal;
}
bool TextView::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
// Emit the signal.
Toolkit::TextView handle( GetOwner() );
- mScrolledSignalV2.Emit( handle, delta );
+ mScrolledSignal.Emit( handle, delta );
}
void TextView::CombineExceedPolicies()
/**
* @copydoc ScrolledSignal()
*/
- Toolkit::TextView::ScrolledSignalV2& ScrolledSignal();
+ Toolkit::TextView::ScrolledSignalType& ScrolledSignal();
/**
* Connects a callback function with the object's signals.
bool mPreviousSnapshotModeEnabled:1; ///< Stores the previous snapshot mode value.
bool mMarkUpEnabled:1; ///< enable to scan for mark-up
- Toolkit::TextView::ScrolledSignalV2 mScrolledSignalV2; ///< Signal emitted when text is scrolled.
+ Toolkit::TextView::ScrolledSignalType mScrolledSignal; ///< Signal emitted when text is scrolled.
};
} // namespace Internal
$(toolkit_base_src_dir)/controls/scrollable/scroll-view/scroll-view-page-cube-effect-impl.cpp \
$(toolkit_base_src_dir)/controls/scrollable/scroll-view/scroll-view-page-carousel-effect-impl.cpp \
$(toolkit_base_src_dir)/controls/scrollable/scroll-view/scroll-view-page-spiral-effect-impl.cpp \
- $(toolkit_base_src_dir)/controls/scrollable/scroll-view/scroll-view-slide-effect-impl.cpp \
$(toolkit_base_src_dir)/controls/scrollable/scroll-view/scroll-view-wobble-effect-impl.cpp \
$(toolkit_base_src_dir)/controls/table-view/table-view-impl.cpp \
$(toolkit_base_src_dir)/controls/text-input/text-input-decorator-impl.cpp \
}
// Send notification for the change of focus actor
- mFocusChangedSignalV2.Emit( GetCurrentFocusActor(), actor );
+ mFocusChangedSignal.Emit( GetCurrentFocusActor(), actor );
// Save the current focused actor
mCurrentFocusActor = FocusIDPair(GetFocusOrder(actor), actorID);
}
// Send notification for the activation of focused actor
- mFocusedActorActivatedSignalV2.Emit(actor);
+ mFocusedActorActivatedSignal.Emit(actor);
}
}
mCurrentFocusActor = FocusIDPair(0, 0);
// Send notification for the change of focus actor
- mFocusChangedSignalV2.Emit(actor, Actor());
+ mFocusChangedSignal.Emit(actor, Actor());
if(mIsAccessibilityTtsEnabled)
{
{
DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] Overshot\n", __FUNCTION__, __LINE__);
// Send notification for handling overshooted situation
- mFocusOvershotSignalV2.Emit(GetCurrentFocusActor(), forward ? Toolkit::FocusManager::OVERSHOT_NEXT : Toolkit::FocusManager::OVERSHOT_PREVIOUS);
+ mFocusOvershotSignal.Emit(GetCurrentFocusActor(), forward ? Toolkit::FocusManager::OVERSHOT_NEXT : Toolkit::FocusManager::OVERSHOT_PREVIOUS);
return false; // Try to move the focus out of the scope
}
return handled;
}
-Toolkit::FocusManager::FocusChangedSignalV2& FocusManager::FocusChangedSignal()
+Toolkit::FocusManager::FocusChangedSignalType& FocusManager::FocusChangedSignal()
{
- return mFocusChangedSignalV2;
+ return mFocusChangedSignal;
}
-Toolkit::FocusManager::FocusOvershotSignalV2& FocusManager::FocusOvershotSignal()
+Toolkit::FocusManager::FocusOvershotSignalType& FocusManager::FocusOvershotSignal()
{
- return mFocusOvershotSignalV2;
+ return mFocusOvershotSignal;
}
-Toolkit::FocusManager::FocusedActorActivatedSignalV2& FocusManager::FocusedActorActivatedSignal()
+Toolkit::FocusManager::FocusedActorActivatedSignalType& FocusManager::FocusedActorActivatedSignal()
{
- return mFocusedActorActivatedSignalV2;
+ return mFocusedActorActivatedSignal;
}
bool FocusManager::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
/**
* @copydoc Toolkit::FocusManager::FocusChangedSignal()
*/
- Toolkit::FocusManager::FocusChangedSignalV2& FocusChangedSignal();
+ Toolkit::FocusManager::FocusChangedSignalType& FocusChangedSignal();
/**
* @copydoc Toolkit::FocusManager::FocusOvershotSignal()
*/
- Toolkit::FocusManager::FocusOvershotSignalV2& FocusOvershotSignal();
+ Toolkit::FocusManager::FocusOvershotSignalType& FocusOvershotSignal();
/**
* @copydoc Toolkit::FocusManager::FocusedActorActivatedSignal()
*/
- Toolkit::FocusManager::FocusedActorActivatedSignalV2& FocusedActorActivatedSignal();
+ Toolkit::FocusManager::FocusedActorActivatedSignalType& FocusedActorActivatedSignal();
/**
* Connects a callback function with the object's signals.
private:
- Toolkit::FocusManager::FocusChangedSignalV2 mFocusChangedSignalV2; ///< The signal to notify the focus change
- Toolkit::FocusManager::FocusOvershotSignalV2 mFocusOvershotSignalV2; ///< The signal to notify the focus overshooted
- Toolkit::FocusManager::FocusedActorActivatedSignalV2 mFocusedActorActivatedSignalV2; ///< The signal to notify the activation of focused actor
+ Toolkit::FocusManager::FocusChangedSignalType mFocusChangedSignal; ///< The signal to notify the focus change
+ Toolkit::FocusManager::FocusOvershotSignalType mFocusOvershotSignal; ///< The signal to notify the focus overshooted
+ Toolkit::FocusManager::FocusedActorActivatedSignalType mFocusedActorActivatedSignal; ///< The signal to notify the activation of focused actor
bool mIsWrapped; ///< Whether the focus movement is wrapped around or not
bool mIsFocusWithinGroup; ///< Whether the focus movement is limited to the current focus group or not
}
// Send notification for the change of focus actor
- if( !mFocusChangedSignalV2.Empty() )
+ if( !mFocusChangedSignal.Empty() )
{
- mFocusChangedSignalV2.Emit(GetCurrentFocusActor(), actor);
+ mFocusChangedSignal.Emit(GetCurrentFocusActor(), actor);
}
DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] Focus Changed\n", __FUNCTION__, __LINE__);
parentLayoutControl = GetParentLayoutControl(parentLayoutControl);
}
- if(!succeed && !mPreFocusChangeSignalV2.Empty())
+ if(!succeed && !mPreFocusChangeSignal.Empty())
{
// Don't know how to move the focus further. The application needs to tell us which actor to move the focus to
mIsWaitingKeyboardFocusChangeCommit = true;
- Actor nextFocusableActor = mPreFocusChangeSignalV2.Emit(currentFocusActor, Actor(), direction);
+ Actor nextFocusableActor = mPreFocusChangeSignal.Emit(currentFocusActor, Actor(), direction);
mIsWaitingKeyboardFocusChangeCommit = false;
if ( nextFocusableActor && nextFocusableActor.IsKeyboardFocusable() )
// We will try to move the focus to the actor. Emit a signal to notify the proposed actor to focus
// Signal handler can check the proposed actor and return a different actor if it wishes.
- if( !mPreFocusChangeSignalV2.Empty() )
+ if( !mPreFocusChangeSignal.Empty() )
{
mIsWaitingKeyboardFocusChangeCommit = true;
- committedFocusActor = mPreFocusChangeSignalV2.Emit(currentFocusActor, nextFocusableActor, direction);
+ committedFocusActor = mPreFocusChangeSignal.Emit(currentFocusActor, nextFocusableActor, direction);
mIsWaitingKeyboardFocusChangeCommit = false;
}
parentLayoutControl = GetParentLayoutControl(parentLayoutControl);
}
- if(!mFocusGroupChangedSignalV2.Empty())
+ if(!mFocusGroupChangedSignal.Empty())
{
// Emit a focus group changed signal. The applicaton can move the focus to a new focus group
- mFocusGroupChangedSignalV2.Emit(GetCurrentFocusActor(), forward);
+ mFocusGroupChangedSignal.Emit(GetCurrentFocusActor(), forward);
}
return succeed;
}
// Send notification for the activation of focused actor
- if( !mFocusedActorActivatedSignalV2.Empty() )
+ if( !mFocusedActorActivatedSignal.Empty() )
{
- mFocusedActorActivatedSignalV2.Emit(actor);
+ mFocusedActorActivatedSignal.Emit(actor);
}
}
}
}
// Send notification for the change of focus actor
- if( !mFocusChangedSignalV2.Empty() )
+ if( !mFocusChangedSignal.Empty() )
{
- mFocusChangedSignalV2.Emit(actor, Actor());
+ mFocusChangedSignal.Emit(actor, Actor());
}
}
ClearFocus();
}
-Toolkit::KeyboardFocusManager::PreFocusChangeSignalV2& KeyboardFocusManager::PreFocusChangeSignal()
+Toolkit::KeyboardFocusManager::PreFocusChangeSignalType& KeyboardFocusManager::PreFocusChangeSignal()
{
- return mPreFocusChangeSignalV2;
+ return mPreFocusChangeSignal;
}
-Toolkit::KeyboardFocusManager::FocusChangedSignalV2& KeyboardFocusManager::FocusChangedSignal()
+Toolkit::KeyboardFocusManager::FocusChangedSignalType& KeyboardFocusManager::FocusChangedSignal()
{
- return mFocusChangedSignalV2;
+ return mFocusChangedSignal;
}
-Toolkit::KeyboardFocusManager::FocusGroupChangedSignalV2& KeyboardFocusManager::FocusGroupChangedSignal()
+Toolkit::KeyboardFocusManager::FocusGroupChangedSignalType& KeyboardFocusManager::FocusGroupChangedSignal()
{
- return mFocusGroupChangedSignalV2;
+ return mFocusGroupChangedSignal;
}
-Toolkit::KeyboardFocusManager::FocusedActorActivatedSignalV2& KeyboardFocusManager::FocusedActorActivatedSignal()
+Toolkit::KeyboardFocusManager::FocusedActorActivatedSignalType& KeyboardFocusManager::FocusedActorActivatedSignal()
{
- return mFocusedActorActivatedSignalV2;
+ return mFocusedActorActivatedSignal;
}
bool KeyboardFocusManager::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
/**
* @copydoc Toolkit::KeyboardFocusManager::PreFocusChangeSignal()
*/
- Toolkit::KeyboardFocusManager::PreFocusChangeSignalV2& PreFocusChangeSignal();
+ Toolkit::KeyboardFocusManager::PreFocusChangeSignalType& PreFocusChangeSignal();
/**
* @copydoc Toolkit::KeyboardFocusManager::FocusChangedSignal()
*/
- Toolkit::KeyboardFocusManager::FocusChangedSignalV2& FocusChangedSignal();
+ Toolkit::KeyboardFocusManager::FocusChangedSignalType& FocusChangedSignal();
/**
* @copydoc Toolkit::KeyboardFocusManager::FocusGroupChangedSignal()
*/
- Toolkit::KeyboardFocusManager::FocusGroupChangedSignalV2& FocusGroupChangedSignal();
+ Toolkit::KeyboardFocusManager::FocusGroupChangedSignalType& FocusGroupChangedSignal();
/**
* @copydoc Toolkit::KeyboardFocusManager::FocusedActorActivatedSignal()
*/
- Toolkit::KeyboardFocusManager::FocusedActorActivatedSignalV2& FocusedActorActivatedSignal();
+ Toolkit::KeyboardFocusManager::FocusedActorActivatedSignalType& FocusedActorActivatedSignal();
/**
* Connects a callback function with the object's signals.
private:
- Toolkit::KeyboardFocusManager::PreFocusChangeSignalV2 mPreFocusChangeSignalV2; ///< The signal to notify the focus will be changed
- Toolkit::KeyboardFocusManager::FocusChangedSignalV2 mFocusChangedSignalV2; ///< The signal to notify the focus change
- Toolkit::KeyboardFocusManager::FocusGroupChangedSignalV2 mFocusGroupChangedSignalV2; ///< The signal to notify the focus group change
- Toolkit::KeyboardFocusManager::FocusedActorActivatedSignalV2 mFocusedActorActivatedSignalV2; ///< The signal to notify the activation of focused actor
+ Toolkit::KeyboardFocusManager::PreFocusChangeSignalType mPreFocusChangeSignal; ///< The signal to notify the focus will be changed
+ Toolkit::KeyboardFocusManager::FocusChangedSignalType mFocusChangedSignal; ///< The signal to notify the focus change
+ Toolkit::KeyboardFocusManager::FocusGroupChangedSignalType mFocusGroupChangedSignal; ///< The signal to notify the focus group change
+ Toolkit::KeyboardFocusManager::FocusedActorActivatedSignalType mFocusedActorActivatedSignal; ///< The signal to notify the activation of focused actor
unsigned int mCurrentFocusActor; ///< The actor ID of current focused actor
control.GetImplementation().OnKeyInputFocusGained();
// Emit the signal to inform focus change to the application.
- if ( !mKeyInputFocusChangedSignalV2.Empty() )
+ if ( !mKeyInputFocusChangedSignal.Empty() )
{
- mKeyInputFocusChangedSignalV2.Emit( control, previousFocusControl );
+ mKeyInputFocusChangedSignal.Emit( control, previousFocusControl );
}
}
return result;
}
-Toolkit::KeyInputFocusManager::KeyInputFocusChangedSignalV2& KeyInputFocusManager::KeyInputFocusChangedSignal()
+Toolkit::KeyInputFocusManager::KeyInputFocusChangedSignalType& KeyInputFocusManager::KeyInputFocusChangedSignal()
{
- return mKeyInputFocusChangedSignalV2;
+ return mKeyInputFocusChangedSignal;
}
-Toolkit::KeyInputFocusManager::UnhandledKeyEventSignalV2& KeyInputFocusManager::UnhandledKeyEventSignal()
+Toolkit::KeyInputFocusManager::UnhandledKeyEventSignalType& KeyInputFocusManager::UnhandledKeyEventSignal()
{
- return mUnhandledKeyEventSignalV2;
+ return mUnhandledKeyEventSignal;
}
KeyInputFocusManager::FocusStackIterator KeyInputFocusManager::FindFocusControlInStack( Toolkit::Control control ) const
if( !consumed )
{
// Emit signal to inform that a key event is not consumed.
- if( !mUnhandledKeyEventSignalV2.Empty() )
+ if( !mUnhandledKeyEventSignal.Empty() )
{
- mUnhandledKeyEventSignalV2.Emit(event);
+ mUnhandledKeyEventSignal.Emit(event);
}
}
}
/**
* @copydoc Toolkit::KeyInputFocusManager::KeyInputFocusChangedSignal()
*/
- Toolkit::KeyInputFocusManager::KeyInputFocusChangedSignalV2& KeyInputFocusChangedSignal();
+ Toolkit::KeyInputFocusManager::KeyInputFocusChangedSignalType& KeyInputFocusChangedSignal();
/**
* @copydoc Toolkit::KeyInputFocusManager::UnhandledKeyEventSignal()
*/
- Toolkit::KeyInputFocusManager::UnhandledKeyEventSignalV2& UnhandledKeyEventSignal();
+ Toolkit::KeyInputFocusManager::UnhandledKeyEventSignalType& UnhandledKeyEventSignal();
/**
* Connects a callback function with the object's signals.
private:
// The key input focus change signal
- Toolkit::KeyInputFocusManager::KeyInputFocusChangedSignalV2 mKeyInputFocusChangedSignalV2;
+ Toolkit::KeyInputFocusManager::KeyInputFocusChangedSignalType mKeyInputFocusChangedSignal;
// The un-handled key event signal
- Toolkit::KeyInputFocusManager::UnhandledKeyEventSignalV2 mUnhandledKeyEventSignalV2;
+ Toolkit::KeyInputFocusManager::UnhandledKeyEventSignalType mUnhandledKeyEventSignal;
// Keyboard events are sent to the current focus actor, which will be the actor on the top of the focus actors stack.
FocusStack mFocusStack;
return GetImpl(*this).GetPath( name );
}
-Builder::Signal& Builder::QuitSignal()
+Builder::BuilderSignalType& Builder::QuitSignal()
{
return GetImpl( *this ).QuitSignal();
}
/**
* @brief Builder signal type
*/
- typedef SignalV2< void () > Signal;
+ typedef Signal< void () > BuilderSignalType;
/**
* @brief Signal emitted when a quit action is requested by the builder.
*/
- Signal& QuitSignal();
+ BuilderSignalType& QuitSignal();
private:
explicit DALI_INTERNAL Builder(Internal::Builder *impl);
{
const char* const Button::SIGNAL_CLICKED = "clicked";
-const char* const Button::SIGNAL_TOGGLED = "toggled";
+const char* const Button::SIGNAL_STATE_CHANGED = "state-changed";
Button::Button()
{}
return Control::DownCast<Button, Internal::Button>(handle);
}
-void Button::SetDimmed( bool dimmed )
+void Button::SetDisabled( bool disabled )
{
- Dali::Toolkit::GetImplementation( *this ).SetDimmed( dimmed );
+ Dali::Toolkit::GetImplementation( *this ).SetDisabled( disabled );
}
-bool Button::IsDimmed() const
+bool Button::IsDisabled() const
{
- return Dali::Toolkit::GetImplementation( *this ).IsDimmed();
+ return Dali::Toolkit::GetImplementation( *this ).IsDisabled();
}
void Button::SetAnimationTime( float animationTime )
return Dali::Toolkit::GetImplementation( *this ).GetAnimationTime();
}
-Button::ClickedSignalV2& Button::ClickedSignal()
+Button::ClickedSignalType& Button::ClickedSignal()
{
return Dali::Toolkit::GetImplementation( *this ).ClickedSignal();
}
-Button::ToggledSignalV2& Button::ToggledSignal()
+Button::StateChangedSignalType& Button::StateChangedSignal()
{
- return Dali::Toolkit::GetImplementation( *this ).ToggledSignal();
+ return Dali::Toolkit::GetImplementation( *this ).StateChangedSignal();
}
Button::Button( Internal::Button& implementation )
/**
* @brief Button is a base class for different kind of buttons.
*
- * This class provides the dimmed property and the clicked signal.
+ * This class provides the disabled property and the clicked signal.
*
* A ClickedSignal() is emitted when the button is touched and the touch
* point doesn't leave the boundary of the button.
*
- * When the \e dimmed property is set to \e true, no signal is emitted.
+ * When the \e disabled property is set to \e true, no signal is emitted.
*/
class DALI_IMPORT_API Button : public Control
{
public:
// Signal Names
- static const char* const SIGNAL_CLICKED; ///< name "clicked"
- static const char* const SIGNAL_TOGGLED; ///< name "toggled"
+ static const char* const SIGNAL_CLICKED; ///< name "clicked"
+ static const char* const SIGNAL_STATE_CHANGED; ///< name "state-changed"
// Properties
- static const Property::Index PROPERTY_DIMMED; ///< name "dimmed", @see SetDimmed(), type BOOLEAN
+ static const Property::Index PROPERTY_DISABLED; ///< name "disabled", @see SetDisabled(), type BOOLEAN
+ static const Property::Index PROPERTY_AUTO_REPEATING; ///< name "auto-repeating", @see SetAutoRepeating(), type BOOLEAN
+ static const Property::Index PROPERTY_INITIAL_AUTO_REPEATING_DELAY; ///< name "initial-auto-repeating-delay", @see SetInitialAutoRepeatingDelay(), type FLOAT
+ static const Property::Index PROPERTY_NEXT_AUTO_REPEATING_DELAY; ///< name "next-auto-repeating-delay", @see SetNextAutoRepeatingDelay(), type FLOAT
+ static const Property::Index PROPERTY_TOGGLABLE; ///< name "togglable", @see SetToggleButton(), type BOOLEAN
+ static const Property::Index PROPERTY_TOGGLED; ///< name "toggled", @see SetToggled(), type BOOLEAN
+ static const Property::Index PROPERTY_NORMAL_STATE_ACTOR; ///< name "button-state-actor", @see SetButtonImage(), type MAP
+ static const Property::Index PROPERTY_SELECTED_STATE_ACTOR; ///< name "selected-state-actor", @see SetSelectedImage(), type MAP
+ static const Property::Index PROPERTY_DISABLED_STATE_ACTOR; ///< name "disabled-state-actor", @see SetDisabledImage(), type MAP
+ static const Property::Index PROPERTY_LABEL_ACTOR; ///< name "label-actor", @see SetLabel(), type MAP
public:
~Button();
/**
- * @brief Sets the button as \e dimmed.
+ * @brief Sets the button as \e disabled.
*
- * No signals are emitted when the \e dimmed property is set.
+ * No signals are emitted when the \e disabled property is set.
*
- * @param[in] dimmed property.
+ * @param[in] disabled property.
*/
- void SetDimmed( bool dimmed );
+ void SetDisabled( bool disabled );
/**
- * @return \e true if the button is \e dimmed.
+ * @return \e true if the button is \e disabled.
*/
- bool IsDimmed() const;
+ bool IsDisabled() const;
/**
* @brief Sets the animation time.
/**
* @brief Button Clicked signal type
*/
- typedef SignalV2< bool ( Button ) > ClickedSignalV2;
+ typedef Signal< bool ( Button ) > ClickedSignalType;
/**
- * @brief Button toggled signal type
+ * @brief Button state changed signal type
*/
- typedef SignalV2< bool ( Button, bool ) > ToggledSignalV2;
+ typedef Signal< bool ( Button, bool ) > StateChangedSignalType;
/**
* @brief Signal emitted when the button is touched and the touch point doesn't leave the boundary of the button.
*/
- ClickedSignalV2& ClickedSignal();
+ ClickedSignalType& ClickedSignal();
/**
- * @brief Signal emitted when the button's state is toggled.
+ * @brief Signal emitted when the button's state is changed.
*/
- ToggledSignalV2& ToggledSignal();
+ StateChangedSignalType& StateChangedSignal();
public: // Not intended for application developers
const char* const CheckBoxButton::ACTION_CHECK_BOX_BUTTON_CLICK = "check-box-button-click";
-const std::string CheckBoxButton::USE_FADE_ANIMATION_PROPERTY_NAME( "use-fade-animation" );
-const std::string CheckBoxButton::USE_CHECK_ANIMATION_PROPERTY_NAME( "use-check-animation" );
-
-
CheckBoxButton::CheckBoxButton()
: Button()
{
return Dali::Toolkit::GetImplementation( *this ).GetCheckedImage();
}
-void CheckBoxButton::SetDimmedBackgroundImage( Image image )
+void CheckBoxButton::SetDisabledBackgroundImage( Image image )
{
- Dali::Toolkit::GetImplementation( *this ).SetDimmedBackgroundImage( image );
+ Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( image );
}
-void CheckBoxButton::SetDimmedBackgroundImage( Actor image )
+void CheckBoxButton::SetDisabledBackgroundImage( Actor image )
{
- Dali::Toolkit::GetImplementation( *this ).SetDimmedBackgroundImage( image );
+ Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( image );
}
-Actor CheckBoxButton::GetDimmedBackgroundImage() const
+Actor CheckBoxButton::GetDisabledBackgroundImage() const
{
- return Dali::Toolkit::GetImplementation( *this ).GetDimmedBackgroundImage();
+ return Dali::Toolkit::GetImplementation( *this ).GetDisabledBackgroundImage();
}
-void CheckBoxButton::SetDimmedCheckedImage( Image image )
+void CheckBoxButton::SetDisabledCheckedImage( Image image )
{
- Dali::Toolkit::GetImplementation( *this ).SetDimmedCheckedImage( image );
+ Dali::Toolkit::GetImplementation( *this ).SetDisabledCheckedImage( image );
}
-void CheckBoxButton::SetDimmedCheckedImage( Actor image )
+void CheckBoxButton::SetDisabledCheckedImage( Actor image )
{
- Dali::Toolkit::GetImplementation( *this ).SetDimmedCheckedImage( image );
+ Dali::Toolkit::GetImplementation( *this ).SetDisabledCheckedImage( image );
}
-Actor CheckBoxButton::GetDimmedCheckedImage() const
+Actor CheckBoxButton::GetDisabledCheckedImage() const
{
- return Dali::Toolkit::GetImplementation( *this ).GetDimmedCheckedImage();
+ return Dali::Toolkit::GetImplementation( *this ).GetDisabledCheckedImage();
}
CheckBoxButton::CheckBoxButton( Internal::CheckBoxButton& implementation )
* By default a CheckBoxButton emits a Button::ClickedSignal() signal when the button changes its state to checked or unchecked.
*
* The button's appearance could be modified by setting images or actors with CheckBoxButton::SetBackgroundImage,
- * CheckBoxButton::SetCheckedImage, CheckBoxButton::SetDimmedBackgroundImage and CheckBoxButton::SetDimmedCheckedImage.
+ * CheckBoxButton::SetCheckedImage, CheckBoxButton::SetDisabledBackgroundImage and CheckBoxButton::SetDisabledCheckedImage.
*
- * When the button is not dimmed, if it's not checked it only shows the \e background image. The \e checked image is shown over the
+ * When the button is not disabled, if it's not checked it only shows the \e background image. The \e checked image is shown over the
* \e background image when the box is checked (\e background image is not replaced by \e checked image).
*
- * When the button is dimmed, \e background image and \e checked image are replaced by \e dimmed images.
+ * When the button is disabled, \e background image and \e checked image are replaced by \e disabled images.
*
* CheckBoxButton doesn't have a text. However, a Dali::Toolkit::TableView with a Dali::TextActor or a Dali::Toolkit::TextView
* and a CheckBoxButton could be used instead.
//Action Names
static const char* const ACTION_CHECK_BOX_BUTTON_CLICK;
- // Properties
- static const std::string USE_FADE_ANIMATION_PROPERTY_NAME;
- static const std::string USE_CHECK_ANIMATION_PROPERTY_NAME;
-
public:
/**
/**
* Sets the button as checked or unchecked.
*
- * Emits a Button::ClickedSignal() signal if the checkbox is not dimmed and the new state,
+ * Emits a Button::ClickedSignal() signal if the checkbox is not disabled and the new state,
* given in the \e checked param, is different than the previous one.
*
* @param[in] checked state.
Actor GetCheckedImage() const;
/**
- * Sets the dimmed background image.
+ * Sets the disabled background image.
*
- * @param[in] image The dimmed background image.
+ * @param[in] image The disabled background image.
*/
- void SetDimmedBackgroundImage( Image image );
+ void SetDisabledBackgroundImage( Image image );
/**
- * @copydoc SetDimmedBackgroundImage( Image image )
+ * @copydoc SetDisabledBackgroundImage( Image image )
*/
- void SetDimmedBackgroundImage( Actor image );
+ void SetDisabledBackgroundImage( Actor image );
/**
- * Gets the dimmed background image.
- * @return An actor with the dimmed background image.
+ * Gets the disabled background image.
+ * @return An actor with the disabled background image.
*/
- Actor GetDimmedBackgroundImage() const;
+ Actor GetDisabledBackgroundImage() const;
/**
- * Sets the dimmed checked image.
+ * Sets the disabled checked image.
*
- * @param[in] image The dimmed checked image.
+ * @param[in] image The disabled checked image.
*/
- void SetDimmedCheckedImage( Image image );
+ void SetDisabledCheckedImage( Image image );
/**
- * @copydoc SetDimmedCheckedImage( Image image )
+ * @copydoc SetDisabledCheckedImage( Image image )
*/
- void SetDimmedCheckedImage( Actor image );
+ void SetDisabledCheckedImage( Actor image );
/**
- * Gets the dimmed checked image.
- * @return An actor with the dimmed checked image.
+ * Gets the disabled checked image.
+ * @return An actor with the disabled checked image.
*/
- Actor GetDimmedCheckedImage() const;
+ Actor GetDisabledCheckedImage() const;
public: // Not intended for application developers
return Dali::Toolkit::GetImplementation( *this ).GetBackgroundImage();
}
-void PushButton::SetPressedImage( Image image )
+void PushButton::SetSelectedImage( Image image )
{
- Dali::Toolkit::GetImplementation( *this ).SetPressedImage( image );
+ Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( image );
}
-void PushButton::SetPressedImage( Actor image )
+void PushButton::SetSelectedImage( Actor image )
{
- Dali::Toolkit::GetImplementation( *this ).SetPressedImage( image );
+ Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( image );
}
-Actor PushButton::GetPressedImage() const
+Actor PushButton::GetSelectedImage() const
{
- return Dali::Toolkit::GetImplementation( *this ).GetPressedImage();
+ return Dali::Toolkit::GetImplementation( *this ).GetSelectedImage();
}
-void PushButton::SetDimmedBackgroundImage( Image image )
+void PushButton::SetDisabledBackgroundImage( Image image )
{
- Dali::Toolkit::GetImplementation( *this ).SetDimmedBackgroundImage( image );
+ Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( image );
}
-void PushButton::SetDimmedBackgroundImage( Actor image )
+void PushButton::SetDisabledBackgroundImage( Actor image )
{
- Dali::Toolkit::GetImplementation( *this ).SetDimmedBackgroundImage( image );
+ Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( image );
}
-Actor PushButton::GetDimmedBackgroundImage() const
+Actor PushButton::GetDisabledBackgroundImage() const
{
- return Dali::Toolkit::GetImplementation( *this ).GetDimmedBackgroundImage();
+ return Dali::Toolkit::GetImplementation( *this ).GetDisabledBackgroundImage();
}
-void PushButton::SetDimmedImage( Image image )
+void PushButton::SetDisabledImage( Image image )
{
- Dali::Toolkit::GetImplementation( *this ).SetDimmedImage( image );
+ Dali::Toolkit::GetImplementation( *this ).SetDisabledImage( image );
}
-void PushButton::SetDimmedImage( Actor image )
+void PushButton::SetDisabledImage( Actor image )
{
- Dali::Toolkit::GetImplementation( *this ).SetDimmedImage( image );
+ Dali::Toolkit::GetImplementation( *this ).SetDisabledImage( image );
}
-Actor PushButton::GetDimmedImage() const
+Actor PushButton::GetDisabledImage() const
{
- return Dali::Toolkit::GetImplementation( *this ).GetDimmedImage();
+ return Dali::Toolkit::GetImplementation( *this ).GetDisabledImage();
}
-void PushButton::SetLabelText( const std::string& text )
+void PushButton::SetLabel( const std::string& label )
{
- Dali::Toolkit::GetImplementation( *this ).SetLabelText( text );
+ Dali::Toolkit::GetImplementation( *this ).SetLabel( label );
}
-void PushButton::SetLabelText( Actor text )
+void PushButton::SetLabel( Actor label )
{
- Dali::Toolkit::GetImplementation( *this ).SetLabelText( text );
+ Dali::Toolkit::GetImplementation( *this ).SetLabel( label );
}
-Actor PushButton::GetLabelText() const
+Actor PushButton::GetLabel() const
{
- return Dali::Toolkit::GetImplementation( *this ).GetLabelText();
+ return Dali::Toolkit::GetImplementation( *this ).GetLabel();
}
-PushButton::PressedSignalV2& PushButton::PressedSignal()
+PushButton::PressedSignalType& PushButton::PressedSignal()
{
return Dali::Toolkit::GetImplementation( *this ).PressedSignal();
}
-PushButton::ReleasedSignalV2& PushButton::ReleasedSignal()
+PushButton::ReleasedSignalType& PushButton::ReleasedSignal()
{
return Dali::Toolkit::GetImplementation( *this ).ReleasedSignal();
}
*
* The intervals could be modified with the PushButton::SetInitialAutoRepeatingDelay and PushButton::SetNextAutoRepeatingDelay methods.
*
- * A \e toggle button can't be \e autorepeating. If the \e autorepeating property is set to \e true, then the \e toggle property is set to
+ * A \e toggle button can't be \e autorepeating. If the \e autorepeating property is set to \e true, then the \e toggled property is set to
* false but no signal is emitted.
*
* <li>\e toggle
*
- * When \e toggle is set to \e true, a PushButton::ToggledSignal() signal is emitted, with the toggle state, every time the button is touched instead
+ * When \e toggle is set to \e true, a Button::StateChangedSignal() signal is emitted, with the toggle state, every time the button is touched instead
* of emit PushButton::PressedSignal(), Button::ClickedSignal() and PushButton::ReleasedSignal() signals.
*
- * An \e autorepeating button can't be \e toggle. If the \e toggle property is set to \e true, then the \e autorepeating property is set to false.
+ * An \e autorepeating button can't be \e toggle. If the \e toggled property is set to \e true, then the \e autorepeating property is set to false.
* </ul>
*
* The button's appearance could be modified by setting images or actors with PushButton::SetButtonImage, PushButton::SetBackgroundImage,
- * PushButton::SetPressedImage, PushButton::SetDimmedBackgroundImage and PushButton::SetDimmedImage or setting a text with
- * PushButton::SetLabelText.
+ * PushButton::SetSelectedImage, PushButton::SetDisabledBackgroundImage and PushButton::SetDisabledImage or setting a text with
+ * PushButton::SetLabel.
*
* The \e background is always shown and doesn't change if the button is pressed or released. The \e button image is shown over the \e background image when the
- * button is not pressed and is replaced by the \e pressed image when the button is pressed. The text label is placed always on the top of all images.
+ * button is not pressed and is replaced by the \e selected image when the button is pressed. The text label is placed always on the top of all images.
*
- * When the button is dimmed, \e background, \e button and \e pressed images are replaced by their \e dimmed images.
+ * When the button is disabled, \e background, \e button and \e selected images are replaced by their \e disabled images.
*
* The methods used to modify the button's appearance could receive Dali::Actor objects as a parameter, so more complex images could be defined.
*
- * Is not mandatory set all images. A button could be defined only by setting its \e background image or by setting its \e background and \e pressed images.
+ * Is not mandatory set all images. A button could be defined only by setting its \e background image or by setting its \e background and \e selected images.
*/
class DALI_IMPORT_API PushButton : public Button
{
//Action Names
static const char* const ACTION_PUSH_BUTTON_CLICK; ///< name "push-button-click"
- // Properties
- static const Property::Index PROPERTY_AUTO_REPEATING; ///< name "auto-repeating", @see SetAutoRepeating(), type BOOLEAN
- static const Property::Index PROPERTY_INITIAL_AUTO_REPEATING_DELAY; ///< name "initial-auto-repeating-delay", @see SetInitialAutoRepeatingDelay(), type FLOAT
- static const Property::Index PROPERTY_NEXT_AUTO_REPEATING_DELAY; ///< name "next-auto-repeating-delay", @see SetNextAutoRepeatingDelay(), type FLOAT
- static const Property::Index PROPERTY_TOGGLABLE; ///< name "togglable", @see SetToggleButton(), type BOOLEAN
- static const Property::Index PROPERTY_TOGGLE; ///< name "toggle", @see SetToggled(), type BOOLEAN
- static const Property::Index PROPERTY_NORMAL_STATE_ACTOR; ///< name "button-state-actor", @see SetButtonImage(), type MAP
- static const Property::Index PROPERTY_PRESSED_STATE_ACTOR; ///< name "pressed-state-actor", @see SetPressedImage(), type MAP
- static const Property::Index PROPERTY_DIMMED_STATE_ACTOR; ///< name "dimmed-state-actor", @see SetDimmedImage(), type MAP
- static const Property::Index PROPERTY_LABEL_ACTOR; ///< name "label-actor", @see SetLabelText(), type STRING
-
public:
/**
/**
* @brief Sets the \e autorepeating property.
*
- * If the \e autorepeating property is set to \e true, then the \e toggle property is set to false
+ * If the \e autorepeating property is set to \e true, then the \e toggled property is set to false
* but no signal is emitted.
*
* @param[in] autoRepeating \e autorepeating property.
float GetNextAutoRepeatingDelay() const;
/**
- * @brief Sets the \e toggle property.
+ * @brief Sets the \e toggled property.
*
- * If the \e toggle property is set to \e true, then the \e autorepeating property is set to false.
+ * If the \e toggled property is set to \e true, then the \e autorepeating property is set to false.
*
* @param[in] toggle property.
*/
void SetToggleButton( bool toggle );
/**
- * @return \e true if the \e toggle property is set.
+ * @return \e true if the \e toggled property is set.
*/
bool IsToggleButton() const;
/**
* @brief Sets the button as toggled or not toggled.
*
- * \e toggle property must be set to \e true.
+ * \e toggled property must be set to \e true.
*
- * Emits a PushButton::ToggledSignal() signal.
+ * Emits a Button::StateChangedSignal() signal.
*
* @param[in] toggle state.
*/
void SetToggled( bool toggle );
/**
- * @return \e true if the \e toggle property is set and the button is toggled.
+ * @return \e true if the \e toggled property is set and the button is toggled.
*/
bool IsToggled() const;
Actor GetBackgroundImage() const;
/**
- * @brief Sets the pressed image.
+ * @brief Sets the selected image.
*
- * @param[in] image The pressed image.
+ * @param[in] image The selected image.
*/
- void SetPressedImage( Image image );
+ void SetSelectedImage( Image image );
/**
- * @copydoc SetPressedImage( Image image )
+ * @copydoc SetSelectedImage( Image image )
*/
- void SetPressedImage( Actor image );
+ void SetSelectedImage( Actor image );
/**
- * @brief Gets the pressed image.
+ * @brief Gets the selected image.
*
- * @return An actor with the pressed image.
+ * @return An actor with the selected image.
*/
- Actor GetPressedImage() const;
+ Actor GetSelectedImage() const;
/**
- * @brief Sets the dimmed background image.
+ * @brief Sets the disabled background image.
*
- * @param[in] image The dimmed background image.
+ * @param[in] image The disabled background image.
*/
- void SetDimmedBackgroundImage( Image image );
+ void SetDisabledBackgroundImage( Image image );
/**
- * @copydoc SetDimmedBackgroundImage( Image image )
+ * @copydoc SetDisabledBackgroundImage( Image image )
*/
- void SetDimmedBackgroundImage( Actor image );
+ void SetDisabledBackgroundImage( Actor image );
/**
- * @brief Gets the dimmed background image.
+ * @brief Gets the disabled background image.
*
- * @return An actor with the dimmed background image.
+ * @return An actor with the disabled background image.
*/
- Actor GetDimmedBackgroundImage() const;
+ Actor GetDisabledBackgroundImage() const;
/**
- * @brief Sets the dimmed button image.
+ * @brief Sets the disabled button image.
*
- * @param[in] image The dimmed button image.
+ * @param[in] image The disabled button image.
*/
- void SetDimmedImage( Image image );
+ void SetDisabledImage( Image image );
/**
- * @copydoc SetDimmedImage( Image image )
+ * @copydoc SetDisabledImage( Image image )
*/
- void SetDimmedImage( Actor image );
+ void SetDisabledImage( Actor image );
/**
- * @brief Gets the dimmed image.
+ * @brief Gets the disabled image.
*
- * @return An actor with the dimmed image.
+ * @return An actor with the disabled image.
*/
- Actor GetDimmedImage() const;
+ Actor GetDisabledImage() const;
/**
- * @brief Sets the text label.
+ * @brief Sets the button label.
*
- * @param[in] text Label text.
+ * @param[in] label The button label.
*/
- void SetLabelText( const std::string& text );
+ void SetLabel( const std::string& label );
/**
- * @copydoc SetLabelText( const std::string& text )
+ * @copydoc SetLabel( const std::string& label )
*/
- void SetLabelText( Actor text );
+ void SetLabel( Actor label );
/**
- * @brief Gets the label text.
+ * @brief Gets the label.
*
- * @return An actor with the label text.
+ * @return An actor with the label.
*/
- Actor GetLabelText() const;
+ Actor GetLabel() const;
public: //Signals
/// @brief PushButton Pressed signal type.
- typedef SignalV2< bool ( Button ) > PressedSignalV2;
+ typedef Signal< bool ( Button ) > PressedSignalType;
/// @brief PushButton Released signal type.
- typedef SignalV2< bool ( Button ) > ReleasedSignalV2;
+ typedef Signal< bool ( Button ) > ReleasedSignalType;
/**
* @brief Signal emitted when the button is touched.
*/
- PressedSignalV2& PressedSignal();
+ PressedSignalType& PressedSignal();
/**
* @brief Signal emitted when the button is touched and the touch point leaves the boundary of the button.
*/
- ReleasedSignalV2& ReleasedSignal();
+ ReleasedSignalType& ReleasedSignal();
public: // Not intended for application developers
return Dali::Toolkit::GetImplementation(*this).GetLabel();
}
-void RadioButton::SetActive(bool active)
+void RadioButton::SetSelected(bool selected)
{
- Dali::Toolkit::GetImplementation(*this).SetActive(active);
+ Dali::Toolkit::GetImplementation(*this).SetSelected(selected);
}
-bool RadioButton::IsActive()const
+bool RadioButton::IsSelected()const
{
- return Dali::Toolkit::GetImplementation(*this).IsActive();
+ return Dali::Toolkit::GetImplementation(*this).IsSelected();
}
void RadioButton::ToggleState()
}
/**
- * @brief A RadioButton provides a radio button which two states \e active or \e inactive.
+ * @brief A RadioButton provides a radio button which two states \e selected or \e unselected.
*
* 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::SetSelected.
*
* RadioButton can change its current state using RadioButton::ToggleState.
*
* RadioButtons can be grouped.
* Two or more RadioButtons are in one group when they have this same parent.
- * In each groups only one RadioButton can be \e active at a given time.
- * So when RadioButton is set to \e active, other RadioButtons in its group are set to \e inactive.
- * When \e active RadioButton is set to \e inactive no other RadioButtons in his group is set to \e active.
+ * In each groups only one RadioButton can be \e selected at a given time.
+ * So when RadioButton is set to \e selected, other RadioButtons in its group are set to \e unselected.
+ * When \e selected RadioButton is set to \e unselected no other RadioButtons in his group is set to \e selected.
*
- * A Button::ClickedSignal() is emitted when the RadioButton change its state to \e active or \e inactive.
+ * A Button::ClickedSignal() is emitted when the RadioButton change its state to \e selected or \e unselected.
*/
class DALI_IMPORT_API RadioButton: public Button
{
public:
-
- // Properties
- static const Property::Index PROPERTY_ACTIVE; ///< name "active", @see SetActive(), type BOOLEAN
- static const Property::Index PROPERTY_LABEL_ACTOR; ///< name "label-actor", @see SetLabel(), type MAP
-
- public:
/**
* @brief Create an uninitialized RadioButton; this can be initialized with RadioButton::New().
*
Actor GetLabel() const;
/**
- * @brief Sets the button as active or inactive.
+ * @brief Sets the button as selected or unselected.
*
- * @param[in] active property
+ * @param[in] selected property
*/
- void SetActive(bool active);
+ void SetSelected(bool selected);
/**
- * @return true if button is active, false if button is inactive.
+ * @return true if button is selected, false if button is unselected.
*/
- bool IsActive()const;
+ bool IsSelected()const;
/**
* @brief Change button state.
*
- * If button is active deactivate it. If button is inactive activate it.
+ * If button is selected unselect it. If button is unselected select it.
*/
void ToggleState();
: mControlImpl( controlImpl ),
mBackground( NULL ),
mStartingPinchScale( NULL ),
- mKeyEventSignalV2(),
+ mKeyEventSignal(),
mPinchGestureDetector(),
mPanGestureDetector(),
mTapGestureDetector(),
Control& mControlImpl;
Background* mBackground; ///< Only create the background if we use it
Vector3* mStartingPinchScale; ///< The scale when a pinch gesture starts, TODO: consider removing this
- Toolkit::Control::KeyEventSignalV2 mKeyEventSignalV2;
+ Toolkit::Control::KeyEventSignalType mKeyEventSignal;
// Gesture Detection
PinchGestureDetector mPinchGestureDetector;
return connected;
}
-Toolkit::Control::KeyEventSignalV2& Control::KeyEventSignal()
+Toolkit::Control::KeyEventSignalType& Control::KeyEventSignal()
{
- return mImpl->mKeyEventSignalV2;
+ return mImpl->mKeyEventSignal;
}
bool Control::EmitKeyEventSignal( const KeyEvent& event )
bool consumed = false;
// signals are allocated dynamically when someone connects
- if ( !mImpl->mKeyEventSignalV2.Empty() )
+ if ( !mImpl->mKeyEventSignal.Empty() )
{
- consumed = mImpl->mKeyEventSignalV2.Emit( handle, event );
+ consumed = mImpl->mKeyEventSignal.Emit( handle, event );
}
if (!consumed)
/**
* @copydoc Dali::Toolkit::Control::KeyEventSignal()
*/
- Toolkit::Control::KeyEventSignalV2& KeyEventSignal();
+ Toolkit::Control::KeyEventSignalType& KeyEventSignal();
/**
* @brief Called by the KeyInputFocusManager to emit key event signals.
return GetImplementation().GetBackgroundActor();
}
-Control::KeyEventSignalV2& Control::KeyEventSignal()
+Control::KeyEventSignalType& Control::KeyEventSignal()
{
return GetImplementation().KeyEventSignal();
}
// Typedefs
/// @brief Key Event signal type;
- typedef SignalV2<bool ( Control, const KeyEvent& ) > KeyEventSignalV2;
+ typedef Signal<bool ( Control, const KeyEvent& ) > KeyEventSignalType;
public: // Creation & Destruction
* @pre The Control has been initialized.
* @return The signal to connect to.
*/
- KeyEventSignalV2& KeyEventSignal();
+ KeyEventSignalType& KeyEventSignal();
public: // Intended for control developers
} // namespace
-CheckBoxButton CreateCheckBoxButton( const std::string& backgroundImagePath, const std::string& checkedImagePath, const std::string& dimmedBackgroundImagePath, const std::string& dimmedCheckedImagePath )
+CheckBoxButton CreateCheckBoxButton( const std::string& backgroundImagePath, const std::string& checkedImagePath, const std::string& disabledBackgroundImagePath, const std::string& disabledCheckedImagePath )
{
CheckBoxButton button = Toolkit::CheckBoxButton::New();
button.SetCheckedImage( CreateAlignedImage( checkedImagePath ) );
}
- if( !dimmedBackgroundImagePath.empty() )
+ if( !disabledBackgroundImagePath.empty() )
{
- button.SetDimmedBackgroundImage( CreateAlignedImage( dimmedBackgroundImagePath ) );
+ button.SetDisabledBackgroundImage( CreateAlignedImage( disabledBackgroundImagePath ) );
}
- if( !dimmedCheckedImagePath.empty() )
+ if( !disabledCheckedImagePath.empty() )
{
- button.SetDimmedCheckedImage( CreateAlignedImage( dimmedCheckedImagePath ) );
+ button.SetDisabledCheckedImage( CreateAlignedImage( disabledCheckedImagePath ) );
}
return button;
}
-CheckBoxButton CreateCheckBoxButton( Actor backgroundImageActor, Actor checkedImageActor, Actor dimmedBackgroundImageActor, Actor dimmedCheckedImagActor )
+CheckBoxButton CreateCheckBoxButton( Actor backgroundImageActor, Actor checkedImageActor, Actor disabledBackgroundImageActor, Actor disabledCheckedImagActor )
{
CheckBoxButton button = Toolkit::CheckBoxButton::New();
button.SetCheckedImage( CreateAlignedImage( checkedImageActor ) );
}
- if( dimmedBackgroundImageActor )
+ if( disabledBackgroundImageActor )
{
- button.SetDimmedBackgroundImage( CreateAlignedImage( dimmedBackgroundImageActor ) );
+ button.SetDisabledBackgroundImage( CreateAlignedImage( disabledBackgroundImageActor ) );
}
- if( dimmedCheckedImagActor )
+ if( disabledCheckedImagActor )
{
- button.SetDimmedCheckedImage( CreateAlignedImage( dimmedCheckedImagActor ) );
+ button.SetDisabledCheckedImage( CreateAlignedImage( disabledCheckedImagActor ) );
}
return button;
*
* @param[in] backgroundImagePath Image path to be shown as button background.
* @param[in] checkedImagePath Image path to be shown as checked button.
- * @param[in] dimmedBackgroundImagePath Image path to be shown as button dimmed background.
- * @param[in] dimmedCheckedImagePath Image path to be shown as dimmed checked button.
+ * @param[in] disabledBackgroundImagePath Image path to be shown as button isabled background.
+ * @param[in] disabledCheckedImagePath Image path to be shown as disabled checked button.
*/
-DALI_IMPORT_API CheckBoxButton CreateCheckBoxButton( const std::string& backgroundImagePath, const std::string& checkedImagePath, const std::string& dimmedBackgroundImagePath, const std::string& dimmedCheckedImagePath );
+DALI_IMPORT_API CheckBoxButton CreateCheckBoxButton( const std::string& backgroundImagePath, const std::string& checkedImagePath, const std::string& disabledBackgroundImagePath, const std::string& disabledCheckedImagePath );
/**
* Creates a check box button with the given images.
*
* @param[in] backgroundImageActor Image to be shown as button background.
* @param[in] checkedImageActor Image to be shown as checked button.
- * @param[in] dimmedBackgroundImageActor Image to be shown as button dimmed background.
- * @param[in] dimmedCheckedImagActor Image to be shown as dimmed checked button.
+ * @param[in] disabledBackgroundImageActor Image to be shown as button disabled background.
+ * @param[in] disabledCheckedImagActor Image to be shown as disabled checked button.
*/
-DALI_IMPORT_API CheckBoxButton CreateCheckBoxButton( Actor backgroundImageActor, Actor checkedImageActor, Actor dimmedBackgroundImageActor, Actor dimmedCheckedImagActor );
+DALI_IMPORT_API CheckBoxButton CreateCheckBoxButton( Actor backgroundImageActor, Actor checkedImageActor, Actor disabledBackgroundImageActor, Actor disabledCheckedImagActor );
/**
* Creates a check box button with the given background and checked images.
} // namespace
-PushButton CreatePushButton( const std::string& releasedImagePath, const std::string& pressedImagePath, const std::string& backgroundImagePath,
- const std::string& dimmedReleasedImagePath, const std::string& dimmedBackgroundImagePath )
+PushButton CreatePushButton( const std::string& unselectedImagePath, const std::string& selectedImagePath, const std::string& backgroundImagePath,
+ const std::string& disabledUnselectedImagePath, const std::string& disabledBackgroundImagePath )
{
PushButton button = Toolkit::PushButton::New();
- if( !releasedImagePath.empty() )
+ if( !unselectedImagePath.empty() )
{
- button.SetButtonImage( CreateAlignedImage( releasedImagePath ) );
+ button.SetButtonImage( CreateAlignedImage( unselectedImagePath ) );
}
- if( !pressedImagePath.empty() )
+ if( !selectedImagePath.empty() )
{
- button.SetPressedImage( CreateAlignedImage( pressedImagePath ) );
+ button.SetSelectedImage( CreateAlignedImage( selectedImagePath ) );
}
if( !backgroundImagePath.empty() )
button.SetBackgroundImage( CreateAlignedImage( backgroundImagePath ) );
}
- if( !dimmedReleasedImagePath.empty() )
+ if( !disabledUnselectedImagePath.empty() )
{
- button.SetDimmedImage( CreateAlignedImage( dimmedReleasedImagePath ) );
+ button.SetDisabledImage( CreateAlignedImage( disabledUnselectedImagePath ) );
}
- if( !dimmedBackgroundImagePath.empty() )
+ if( !disabledBackgroundImagePath.empty() )
{
- button.SetDimmedBackgroundImage( CreateAlignedImage( dimmedBackgroundImagePath ) );
+ button.SetDisabledBackgroundImage( CreateAlignedImage( disabledBackgroundImagePath ) );
}
return button;
}
-PushButton CreatePushButton( Actor releasedImageActor, Actor pressedImageActor, Actor backgroundImageActor,
- Actor dimmedReleasedImageActor, Actor dimmedBackgroundImageActor )
+PushButton CreatePushButton( Actor unselectedImageActor, Actor selectedImageActor, Actor backgroundImageActor,
+ Actor disabledUnselectedImageActor, Actor disabledBackgroundImageActor )
{
PushButton button = Toolkit::PushButton::New();
- if( releasedImageActor )
+ if( unselectedImageActor )
{
- button.SetButtonImage( CreateAlignedImage( releasedImageActor ) );
+ button.SetButtonImage( CreateAlignedImage( unselectedImageActor ) );
}
- if( pressedImageActor )
+ if( selectedImageActor )
{
- button.SetPressedImage( CreateAlignedImage( pressedImageActor ) );
+ button.SetSelectedImage( CreateAlignedImage( selectedImageActor ) );
}
if( backgroundImageActor )
button.SetBackgroundImage( CreateAlignedImage( backgroundImageActor ) );
}
- if( dimmedReleasedImageActor )
+ if( disabledUnselectedImageActor )
{
- button.SetDimmedImage( CreateAlignedImage( dimmedReleasedImageActor ) );
+ button.SetDisabledImage( CreateAlignedImage( disabledUnselectedImageActor ) );
}
- if( dimmedBackgroundImageActor )
+ if( disabledBackgroundImageActor )
{
- button.SetDimmedBackgroundImage( CreateAlignedImage( dimmedBackgroundImageActor ) );
+ button.SetDisabledBackgroundImage( CreateAlignedImage( disabledBackgroundImageActor ) );
}
return button;
* @note Images won't be scaled to fill the whole button size.
* @note If an image path is empty, this image is not set to the button.
*
- * @param[in] releasedImagePath Image path to be shown when the button is released.
- * @param[in] pressedImagePath Image path to be shown when the button is pressed.
- * @param[in] backgroundImagePath Image path to be shown as button background.
- * @param[in] dimmedReleasedImagePath Image path to be shown when the button is released and dimmed.
- * @param[in] dimmedBackgroundImagePath Image path to be shown as button background when the button is dimmed.
+ * @param[in] unselectedImagePath Image path to be shown when the button is unselected.
+ * @param[in] selectedImagePath Image path to be shown when the button is selected.
+ * @param[in] backgroundImagePath Image path to be shown as button background.
+ * @param[in] disabledUnselectedImagePath Image path to be shown when the button is unselected and disabled.
+ * @param[in] disabledBackgroundImagePath Image path to be shown as button background when the button is disabled.
* @return A handle to the new push button
*/
-DALI_IMPORT_API PushButton CreatePushButton( const std::string& releasedImagePath, const std::string& pressedImagePath, const std::string& backgroundImagePath,
- const std::string& dimmedReleasedImagePath, const std::string& dimmedBackgroundImagePath );
+DALI_IMPORT_API PushButton CreatePushButton( const std::string& unselectedImagePath, const std::string& selectedImagePath, const std::string& backgroundImagePath,
+ const std::string& disabledUnselectedImagePath, const std::string& disabledBackgroundImagePath );
/**
* @brief Creates a push button with the given images.
* @note Images won't be scaled to fill the whole button size.
* @note If an image is an empty handle, this image is not set to the button.
*
- * @param[in] releasedImageActor Image to be shown when the button is released.
- * @param[in] pressedImageActor Image to be shown when the button is pressed.
- * @param[in] backgroundImageActor Image to be shown as button background.
- * @param[in] dimmedReleasedImageActor Image to be shown when the button is released and dimmed.
- * @param[in] dimmedBackgroundImageActor Image to be shown as button background when the button is dimmed.
+ * @param[in] unselectedImageActor Image to be shown when the button is unselected.
+ * @param[in] selectedImageActor Image to be shown when the button is pressed.
+ * @param[in] backgroundImageActor Image to be shown as button background.
+ * @param[in] disabledUnselectedImageActor Image to be shown when the button is unselected and disabled.
+ * @param[in] disabledBackgroundImageActor Image to be shown as button background when the button is disabled.
* @return A handle to the new pushbutton
*/
-DALI_IMPORT_API PushButton CreatePushButton( Actor releasedImageActor, Actor pressedImageActor, Actor backgroundImageActor,
- Actor dimmedReleasedImageActor, Actor dimmedBackgroundImageActor );
+DALI_IMPORT_API PushButton CreatePushButton( Actor unselectedImageActor, Actor selectedImageActor, Actor backgroundImageActor,
+ Actor disabledUnselectedImageActor, Actor disabledBackgroundImageActor );
/**
* @brief Creates a push button with the given background image.
GetImpl(*this).HideTail();
}
-Popup::TouchedOutsideSignalV2& Popup::OutsideTouchedSignal()
+Popup::TouchedOutsideSignalType& Popup::OutsideTouchedSignal()
{
return GetImpl(*this).OutsideTouchedSignal();
}
-Popup::HiddenSignalV2& Popup::HiddenSignal()
+Popup::HiddenSignalType& Popup::HiddenSignal()
{
return GetImpl(*this).HiddenSignal();
}
POPUP_SHOW, ///< Shown (visible in default size)
};
- typedef SignalV2< void () > TouchedOutsideSignalV2; ///< Touched outside signal type.
- typedef SignalV2< void () > HiddenSignalV2; ///< Hidden signal type.
+ typedef Signal< void () > TouchedOutsideSignalType; ///< Touched outside signal type.
+ typedef Signal< void () > HiddenSignalType; ///< Hidden signal type.
/**
* @brief Signal emitted when user has touched outside of the Dialog.
*/
- TouchedOutsideSignalV2& OutsideTouchedSignal();
+ TouchedOutsideSignalType& OutsideTouchedSignal();
/**
* @brief Signal emitted when popup has been hidden.
*/
- HiddenSignalV2& HiddenSignal();
+ HiddenSignalType& HiddenSignal();
public:
// Signals
static const char* const SCROLL_POSITION_NOTIFIED_SIGNAL_NAME; ///< "scroll-position-notified" signal name
- typedef SignalV2< void ( float ) > ScrollPositionNotifiedSignalType;
+ typedef Signal< void ( float ) > ScrollPositionNotifiedSignalType;
// Properties
static const Property::Index PROPERTY_INDICATOR_HEIGHT_POLICY; ///< name "indicator-height-policy", @see SetIndicatorHeightPolicy(), type STRING
// Signals
static const char* const DOMAIN_CHANGED_SIGNAL_NAME; ///< "domain-changed" signal name
- typedef SignalV2< void ( float min, float max, float size ) > DomainChangedSignalType;
+ typedef Signal< void ( float min, float max, float size ) > DomainChangedSignalType;
static const char* const SCROLL_POSITION_CHANGED_SIGNAL_NAME; ///< "scroll-position-changed" signal name
- typedef SignalV2< void ( float position ) > ScrollPositionChangedSignalType;
+ typedef Signal< void ( float position ) > ScrollPositionChangedSignalType;
/**
* Create a ScrollConnector.
+++ /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 <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
-#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-effect-impl.h>
-#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-slide-effect-impl.h>
-
-using namespace Dali;
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-const std::string ScrollViewSlideEffect::EFFECT_TIME( "ScrollViewSlideEffect::EFFECT_TIME" );
-const std::string ScrollViewSlideEffect::EFFECT_REFERENCE( "ScrollViewSlideEffect::EFFECT_REFERENCE" );
-const std::string ScrollViewSlideEffect::EFFECT_ACTIVE( "ScrollViewSlideEffect::EFFECT_ACTIVE" );
-
-ScrollViewSlideEffect ScrollViewSlideEffect::New()
-{
- return ScrollViewSlideEffect(new Internal::ScrollViewSlideEffect());
-}
-
-ScrollViewSlideEffect::ScrollViewSlideEffect()
-{
-
-}
-
-ScrollViewSlideEffect::ScrollViewSlideEffect(Internal::ScrollViewSlideEffect *impl)
-: ScrollViewEffect(impl)
-{
-}
-
-bool ScrollViewSlideEffect::GetSlideDirection() const
-{
- return GetImpl(*this).GetSlideDirection();
-}
-
-void ScrollViewSlideEffect::SetSlideDirection(bool vertical)
-{
- GetImpl(*this).SetSlideDirection( vertical );
-}
-
-Vector3 ScrollViewSlideEffect::GetDelayReferenceOffset() const
-{
- return GetImpl(*this).GetDelayReferenceOffset();
-}
-
-void ScrollViewSlideEffect::SetDelayReferenceOffset(const Vector3& offset)
-{
- GetImpl(*this).SetDelayReferenceOffset(offset);
-}
-
-float ScrollViewSlideEffect::GetMaxDelayDuration() const
-{
- return GetImpl(*this).GetMaxDelayDuration();
-}
-
-void ScrollViewSlideEffect::SetMaxDelayDuration(float offset)
-{
- GetImpl(*this).SetMaxDelayDuration(offset);
-}
-
-ScrollViewSlideEffect ScrollViewSlideEffect::DownCast( BaseHandle handle )
-{
- return ScrollViewSlideEffect( dynamic_cast<Internal::ScrollViewSlideEffect*>(handle.GetObjectPtr()) );
-}
-
-void ScrollViewSlideEffect::ApplyToActor( Actor child,
- float delayMin,
- float delayMax )
-{
- GetImpl(*this).ApplyToActor( child,
- delayMin,
- delayMax );
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
+++ /dev/null
-#ifndef __DALI_TOOLKIT_SCROLL_VIEW_SLIDE_EFFECT_H__
-#define __DALI_TOOLKIT_SCROLL_VIEW_SLIDE_EFFECT_H__
-
-/*
- * 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.
- *
- */
-
-// EXTERNAL INCLUDES
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
-
-namespace Dali
-{
-
-class Actor;
-
-namespace Toolkit
-{
-
-class ScrollViewEffect;
-
-namespace Internal DALI_INTERNAL
-{
-class ScrollViewSlideEffect;
-}
-
-/**
- * @brief ScrollView effect that uses slides for transitioning pages.
- */
-class DALI_IMPORT_API ScrollViewSlideEffect : public ScrollViewEffect
-{
-public:
- static const std::string EFFECT_TIME; ///< Effect time property name
- static const std::string EFFECT_REFERENCE; ///< Effect reference property name
- static const std::string EFFECT_ACTIVE; ///< Effect active property name
-
-public:
-
- /**
- * @brief Create an initialized ScrollViewSlideEffect.
- *
- * @return A handle to a newly allocated Dali resource.
- */
- static ScrollViewSlideEffect New();
-
- /**
- * @brief Create an uninitialized ScrollViewSlideEffect; this can be initialized with ScrollViewSlideEffect::New().
- *
- * Calling member functions with an uninitialized Toolkit::ScrollViewSlideEffect is not allowed.
- */
- ScrollViewSlideEffect();
-
- /**
- * @brief Downcast an Object handle to ScrollViewSlideEffect.
- *
- * If handle points to a ScrollViewSlideEffect the downcast produces
- * valid handle. If not the returned handle is left uninitialized.
- *
- * @param[in] handle Handle to an object
- * @return handle to a ScrollViewSlideEffect or an uninitialized handle
- */
- static ScrollViewSlideEffect DownCast( BaseHandle handle );
-
- /**
- * @brief Gets the slide direction for this effect.
- *
- * @return The slide direction (true = vertical, false = horizontal)
- */
- bool GetSlideDirection() const;
-
- /**
- * @brief Sets the slide direction for this effect.
- *
- * If the direction has been set to horizontal (false), then
- * the user will see the Actors have a delay in horizontal movement
- * based on the vertical distance the actor is away from the initial drag point.
- * If the direction has been set to vertical (true), then the
- * user will experience the opposite effect (i.e. delay in the vertical movement).
- * @param[in] vertical The slide direction (true = vertical, false = horizontal)
- * (default is horizontal i.e. false)
- */
- void SetSlideDirection(bool vertical);
-
- /**
- * @brief Gets the delay reference offset for this effect.
- *
- * @return The delay reference offset (Vector3::ZERO - indicates no offset)
- */
- Vector3 GetDelayReferenceOffset() const;
-
- /**
- * @brief Sets an offset for where the central delay point on the scroll-view should be
- * when dragging.
- *
- * By default the offset is 0. Which means that the point where the user drags
- * the scroll-view content should have no delay, and the further away from this
- * point, the delay should increase. Adjusting this offset to for example
- * 0.0f, -stageSize.height * 0.5f, will mean that dragging the center of the stage
- * will result in the content at the top of the stage moving with no delay, and
- * the further away from this point (top of stage), the delay should increase.
- * @param[in] offset The offset in local coordinates, relative to the ScrollView.
- */
- void SetDelayReferenceOffset(const Vector3& offset);
-
- /**
- * @brief Gets the maximum duration of the effect after scrolling completes.
- *
- * @return The duration in seconds
- */
- float GetMaxDelayDuration() const;
-
- /**
- * @brief Sets the maximum duration of the effect after scrolling completes.
- *
- * @param[in] duration The duration in seconds (>= 0.0f, default is 0.25 seconds)
- */
- void SetMaxDelayDuration(float duration);
-
- /**
- * @brief Manually apply effect to an Actor.
- *
- * @param[in] child The child Actor to be affected by this effect.
- * @param[in] delayMin The minimum delay coefficient for Actors at the
- * scroll-view touch point. Set to 0 for instantaneous, and 1 for infinite delay.
- * Default is 0.5f
- * @param[in] delayMax The maximum delay coefficient for Actors at the
- * scroll-view approx 1 ScrollView size from the touch point. Set to 0 for
- * instantaneous, and 1 for infinite delay. Default is 0.99f (a noticable delay)
- */
- void ApplyToActor( Actor child,
- float delayMin = 0.5f,
- float delayMax = 0.95f );
-
-protected:
-
- /**
- * @brief This constructor is used by Dali New() methods.
- *
- * @param [in] impl A pointer to a newly allocated Dali resource
- */
- explicit DALI_INTERNAL ScrollViewSlideEffect(Internal::ScrollViewSlideEffect *impl);
-
-};
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // __DALI_TOOLKIT_SCROLL_VIEW_SLIDE_EFFECT_H__
GetImpl(*this).UnbindActor(child);
}
-ScrollView::SnapStartedSignalV2& ScrollView::SnapStartedSignal()
+ScrollView::SnapStartedSignalType& ScrollView::SnapStartedSignal()
{
return GetImpl(*this).SnapStartedSignal();
}
float duration; ///< Duration of snap animation.
};
- typedef SignalV2< void ( const SnapEvent& ) > SnapStartedSignalV2; ///< SnapStarted signal type
+ typedef Signal< void ( const SnapEvent& ) > SnapStartedSignalType; ///< SnapStarted signal type
/**
* @brief Signal emitted when the ScrollView has started to snap or flick (it tells the target
* position, scale, rotation for the snap or flick)
*/
- SnapStartedSignalV2& SnapStartedSignal();
+ SnapStartedSignalType& SnapStartedSignal();
public:
return Control::DownCast<Scrollable, Internal::Scrollable>(handle);
}
-Scrollable::ScrollStartedSignalV2& Scrollable::ScrollStartedSignal()
+Scrollable::ScrollStartedSignalType& Scrollable::ScrollStartedSignal()
{
return GetImpl(*this).ScrollStartedSignal();
}
-Scrollable::ScrollUpdatedSignalV2& Scrollable::ScrollUpdatedSignal()
+Scrollable::ScrollUpdatedSignalType& Scrollable::ScrollUpdatedSignal()
{
return GetImpl(*this).ScrollUpdatedSignal();
}
-Scrollable::ScrollCompletedSignalV2& Scrollable::ScrollCompletedSignal()
+Scrollable::ScrollCompletedSignalType& Scrollable::ScrollCompletedSignal()
{
return GetImpl(*this).ScrollCompletedSignal();
}
-Scrollable::ScrollClampedSignalV2& Scrollable::ScrollClampedSignal()
+Scrollable::ScrollClampedSignalType& Scrollable::ScrollClampedSignal()
{
return GetImpl(*this).ScrollClampedSignal();
}
public:
- typedef SignalV2< void ( const Vector3& ) > ScrollStartedSignalV2; ///< ScrollStarted signal type
- typedef SignalV2< void ( const Vector3& ) > ScrollCompletedSignalV2; ///< ScrollCompleted signal type
- typedef SignalV2< void ( const Vector3& ) > ScrollUpdatedSignalV2; ///< Scroll updated signal type
- typedef SignalV2< void ( const ClampEvent& ) > ScrollClampedSignalV2; ///< Scroll clamped signal type
+ typedef Signal< void ( const Vector3& ) > ScrollStartedSignalType; ///< ScrollStarted signal type
+ typedef Signal< void ( const Vector3& ) > ScrollCompletedSignalType; ///< ScrollCompleted signal type
+ typedef Signal< void ( const Vector3& ) > ScrollUpdatedSignalType; ///< Scroll updated signal type
+ typedef Signal< void ( const ClampEvent& ) > ScrollClampedSignalType; ///< Scroll clamped signal type
/**
* @brief Signal emitted when the Scrollable has moved (whether by touch or animation).
*/
- ScrollStartedSignalV2& ScrollStartedSignal();
+ ScrollStartedSignalType& ScrollStartedSignal();
/**
* @brief Signal emitted when the Scrollable has moved (whether by touch or animation).
*/
- ScrollUpdatedSignalV2& ScrollUpdatedSignal();
+ ScrollUpdatedSignalType& ScrollUpdatedSignal();
/**
* @brief Signal emitted when the Scrollable has completed movement (whether by touch or animation).
*/
- ScrollCompletedSignalV2& ScrollCompletedSignal();
+ ScrollCompletedSignalType& ScrollCompletedSignal();
/**
* @brief Signal emitted when the Scrollable is pushing against a domain boundary
*
* @return The signal to connect to
*/
- ScrollClampedSignalV2& ScrollClampedSignal();
+ ScrollClampedSignalType& ScrollClampedSignal();
public:
return GetImpl( *this ).GetScrollPosition();
}
-TextInput::InputSignalV2& TextInput::InputStartedSignal()
+TextInput::InputSignalType& TextInput::InputStartedSignal()
{
return GetImpl(*this).InputStartedSignal();
}
-TextInput::InputSignalV2& TextInput::InputFinishedSignal()
+TextInput::InputSignalType& TextInput::InputFinishedSignal()
{
return GetImpl(*this).InputFinishedSignal();
}
-TextInput::InputSignalV2& TextInput::CutAndPasteToolBarDisplayedSignal()
+TextInput::InputSignalType& TextInput::CutAndPasteToolBarDisplayedSignal()
{
return GetImpl(*this).CutAndPasteToolBarDisplayedSignal();
}
-TextInput::StyleChangedSignalV2& TextInput::StyleChangedSignal()
+TextInput::StyleChangedSignalType& TextInput::StyleChangedSignal()
{
return GetImpl(*this).StyleChangedSignal();
}
return GetImpl(*this).TextModifiedSignal();
}
-TextInput::MaxInputCharactersReachedSignalV2& TextInput::MaxInputCharactersReachedSignal()
+TextInput::MaxInputCharactersReachedSignalType& TextInput::MaxInputCharactersReachedSignal()
{
return GetImpl(*this).MaxInputCharactersReachedSignal();
}
-TextInput::InputTextExceedBoundariesSignalV2& TextInput::InputTextExceedBoundariesSignal()
+TextInput::InputTextExceedBoundariesSignalType& TextInput::InputTextExceedBoundariesSignal()
{
return GetImpl(*this).InputTextExceedBoundariesSignal();
}
public: /* Signals */
/// @brief Input Signal.
- typedef SignalV2< void ( TextInput textInput ) > InputSignalV2;
+ typedef Signal< void ( TextInput textInput ) > InputSignalType;
/// @brief Input style changed signal.
- typedef SignalV2< void ( TextInput textInput, const TextStyle& style ) > StyleChangedSignalV2;
+ typedef Signal< void ( TextInput textInput, const TextStyle& style ) > StyleChangedSignalType;
/// @brief Text modified signal.
- typedef SignalV2< void ( TextInput textInput ) > TextModifiedSignalType;
+ typedef Signal< void ( TextInput textInput ) > TextModifiedSignalType;
/// @brief Max input characters reached signal.
- typedef SignalV2< void ( TextInput textInput ) > MaxInputCharactersReachedSignalV2;
+ typedef Signal< void ( TextInput textInput ) > MaxInputCharactersReachedSignalType;
/// @brief Input text exceeds boundaries signal.
- typedef SignalV2< void ( TextInput textInput ) > InputTextExceedBoundariesSignalV2;
+ typedef Signal< void ( TextInput textInput ) > InputTextExceedBoundariesSignalType;
/**
* @brief Signal emitted when the Text-Input starts receiving input.
*/
- InputSignalV2& InputStartedSignal();
+ InputSignalType& InputStartedSignal();
/**
* @brief Signal emitted when the Text-Input is finished receiving input.
* TextInput::GetText() can be called to get current text string.
* @return The signal to connect to
*/
- InputSignalV2& InputFinishedSignal();
+ InputSignalType& InputFinishedSignal();
/**
* @brief Signal emitted when the cut and paste toolbar is displayed.
*
* @return The signal to connect to
*/
- InputSignalV2& CutAndPasteToolBarDisplayedSignal();
+ InputSignalType& CutAndPasteToolBarDisplayedSignal();
/**
* @brief Signal emitted when style changes.
*
* @return The signal to connect to
*/
- StyleChangedSignalV2& StyleChangedSignal();
+ StyleChangedSignalType& StyleChangedSignal();
/**
* @brief Signal emitted when text changes.
*
* @return The signal to connect to
*/
- MaxInputCharactersReachedSignalV2& MaxInputCharactersReachedSignal();
+ MaxInputCharactersReachedSignalType& MaxInputCharactersReachedSignal();
/**
* @brief Signal emitted when input text exceeds the boundaries of the text-input.
*
* @return The signal to connect to
*/
- InputTextExceedBoundariesSignalV2& InputTextExceedBoundariesSignal();
+ InputTextExceedBoundariesSignalType& InputTextExceedBoundariesSignal();
public: // Not intended for application developers
return GetImpl( *this ).IsScrollPositionTrimmed();
}
-TextView::ScrolledSignalV2& TextView::ScrolledSignal()
+TextView::ScrolledSignalType& TextView::ScrolledSignal()
{
return GetImpl( *this ).ScrolledSignal();
}
public:
/// @brief Signal types
- typedef SignalV2< void ( TextView textView, Vector2 scrollDelta ) > ScrolledSignalV2;
+ typedef Signal< void ( TextView textView, Vector2 scrollDelta ) > ScrolledSignalType;
/**
* @brief Signal emitted when the text is scrolled inside the text-view.
* \e scrollDelta is the differente of the current scroll position with the previous one.
* @return The signal to connect to
*/
- ScrolledSignalV2& ScrolledSignal();
+ ScrolledSignalType& ScrolledSignal();
public: // Not intended for application developers
$(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-page-cube-effect.cpp \
$(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-page-carousel-effect.cpp \
$(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-page-spiral-effect.cpp \
- $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-slide-effect.cpp \
$(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-wobble-effect.cpp \
$(public_api_base_src_dir)/controls/table-view/table-view.cpp \
$(public_api_base_src_dir)/controls/text-input/text-input.cpp \
$(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view.h \
$(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-effect.h \
$(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-cube-effect.h \
- $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-page-spiral-effect.h \
- $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-slide-effect.h
+ $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-page-spiral-effect.h
public_api_base_table_view_header_files = \
$(public_api_base_src_dir)/controls/table-view/table-view.h
return GetImpl(*this).GetFocusGroup(actor);
}
-FocusManager::FocusChangedSignalV2& FocusManager::FocusChangedSignal()
+FocusManager::FocusChangedSignalType& FocusManager::FocusChangedSignal()
{
return GetImpl(*this).FocusChangedSignal();
}
-FocusManager::FocusOvershotSignalV2& FocusManager::FocusOvershotSignal()
+FocusManager::FocusOvershotSignalType& FocusManager::FocusOvershotSignal()
{
return GetImpl(*this).FocusOvershotSignal();
}
-FocusManager::FocusedActorActivatedSignalV2& FocusManager::FocusedActorActivatedSignal()
+FocusManager::FocusedActorActivatedSignalType& FocusManager::FocusedActorActivatedSignal()
{
return GetImpl(*this).FocusedActorActivatedSignal();
}
public:
/// @brief Focus changed signal
- typedef SignalV2< void ( Actor, Actor ) > FocusChangedSignalV2;
+ typedef Signal< void ( Actor, Actor ) > FocusChangedSignalType;
/// @brief Focus overshooted signal
- typedef SignalV2< void ( Actor, FocusOvershotDirection ) > FocusOvershotSignalV2;
+ typedef Signal< void ( Actor, FocusOvershotDirection ) > FocusOvershotSignalType;
/// @brief Focused actor activated signal
- typedef SignalV2< void ( Actor ) > FocusedActorActivatedSignalV2;
+ typedef Signal< void ( Actor ) > FocusedActorActivatedSignalType;
/**
* @brief Create a FocusManager handle; this can be initialised with FocusManager::New().
* @pre The Object has been initialized.
* @return The signal to connect to.
*/
- FocusChangedSignalV2& FocusChangedSignal();
+ FocusChangedSignalType& FocusChangedSignal();
/**
* @brief This signal is emitted when there is no way to move focus further.
* @pre The Object has been initialized.
* @return The signal to connect to.
*/
- FocusOvershotSignalV2& FocusOvershotSignal();
+ FocusOvershotSignalType& FocusOvershotSignal();
/**
* @brief This signal is emitted when the current focused actor is activated.
* @pre The Object has been initialized.
* @return The signal to connect to.
*/
- FocusedActorActivatedSignalV2& FocusedActorActivatedSignal();
+ FocusedActorActivatedSignalType& FocusedActorActivatedSignal();
private:
return GetImpl(*this).GetFocusIndicatorActor();
}
-KeyboardFocusManager::PreFocusChangeSignalV2& KeyboardFocusManager::PreFocusChangeSignal()
+KeyboardFocusManager::PreFocusChangeSignalType& KeyboardFocusManager::PreFocusChangeSignal()
{
return GetImpl(*this).PreFocusChangeSignal();
}
-KeyboardFocusManager::FocusChangedSignalV2& KeyboardFocusManager::FocusChangedSignal()
+KeyboardFocusManager::FocusChangedSignalType& KeyboardFocusManager::FocusChangedSignal()
{
return GetImpl(*this).FocusChangedSignal();
}
-KeyboardFocusManager::FocusGroupChangedSignalV2& KeyboardFocusManager::FocusGroupChangedSignal()
+KeyboardFocusManager::FocusGroupChangedSignalType& KeyboardFocusManager::FocusGroupChangedSignal()
{
return GetImpl(*this).FocusGroupChangedSignal();
}
-KeyboardFocusManager::FocusedActorActivatedSignalV2& KeyboardFocusManager::FocusedActorActivatedSignal()
+KeyboardFocusManager::FocusedActorActivatedSignalType& KeyboardFocusManager::FocusedActorActivatedSignal()
{
return GetImpl(*this).FocusedActorActivatedSignal();
}
public:
/// @brief Pre focus change signal
- typedef SignalV2< Actor ( Actor, Actor, Control::KeyboardFocusNavigationDirection ) > PreFocusChangeSignalV2;
+ typedef Signal< Actor ( Actor, Actor, Control::KeyboardFocusNavigationDirection ) > PreFocusChangeSignalType;
/// @brief Focus changed signal
- typedef SignalV2< void ( Actor, Actor ) > FocusChangedSignalV2;
+ typedef Signal< void ( Actor, Actor ) > FocusChangedSignalType;
/// @brief Focus group changed signal
- typedef SignalV2< void ( Actor, bool ) > FocusGroupChangedSignalV2;
+ typedef Signal< void ( Actor, bool ) > FocusGroupChangedSignalType;
/// @brief Focused actor activated signal
- typedef SignalV2< void ( Actor ) > FocusedActorActivatedSignalV2;
+ typedef Signal< void ( Actor ) > FocusedActorActivatedSignalType;
/**
* @brief Create a KeyboardFocusManager handle; this can be initialised with KeyboardFocusManager::New().
* @pre The Object has been initialized.
* @return The signal to connect to.
*/
- PreFocusChangeSignalV2& PreFocusChangeSignal();
+ PreFocusChangeSignalType& PreFocusChangeSignal();
/**
* @brief This signal is emitted after the current focused actor has been changed.
* @pre The Object has been initialized.
* @return The signal to connect to.
*/
- FocusChangedSignalV2& FocusChangedSignal();
+ FocusChangedSignalType& FocusChangedSignal();
/**
* @brief This signal is emitted when the focus group has been changed.
* @pre The Object has been initialized.
* @return The signal to connect to.
*/
- FocusGroupChangedSignalV2& FocusGroupChangedSignal();
+ FocusGroupChangedSignalType& FocusGroupChangedSignal();
/**
* @brief This signal is emitted when the current focused actor is activated.
* @pre The Object has been initialized.
* @return The signal to connect to.
*/
- FocusedActorActivatedSignalV2& FocusedActorActivatedSignal();
+ FocusedActorActivatedSignalType& FocusedActorActivatedSignal();
// Not intended for application developers
return GetImpl(*this).IsKeyboardListener(control);
}
-KeyInputFocusManager::KeyInputFocusChangedSignalV2& KeyInputFocusManager::KeyInputFocusChangedSignal()
+KeyInputFocusManager::KeyInputFocusChangedSignalType& KeyInputFocusManager::KeyInputFocusChangedSignal()
{
return GetImpl(*this).KeyInputFocusChangedSignal();
}
-KeyInputFocusManager::UnhandledKeyEventSignalV2& KeyInputFocusManager::UnhandledKeyEventSignal()
+KeyInputFocusManager::UnhandledKeyEventSignalType& KeyInputFocusManager::UnhandledKeyEventSignal()
{
return GetImpl(*this).UnhandledKeyEventSignal();
}
static const char* const SIGNAL_UNHANDLED_KEY_EVENT;
// KeyInputFocusChanged
- typedef SignalV2< void (Control, Control) > KeyInputFocusChangedSignalV2;
+ typedef Signal< void (Control, Control) > KeyInputFocusChangedSignalType;
// Unhandled Key Event
- typedef SignalV2< void (const KeyEvent&) > UnhandledKeyEventSignalV2;
+ typedef Signal< void (const KeyEvent&) > UnhandledKeyEventSignalType;
public:
* @endcode
* @return The signal to connect to.
*/
- KeyInputFocusChangedSignalV2& KeyInputFocusChangedSignal();
+ KeyInputFocusChangedSignalType& KeyInputFocusChangedSignal();
/**
* This signal is emitted when a key event was received, and none of the focused controls on the stage have consumed it.
* @endcode
* @return The signal to connect to.
*/
- UnhandledKeyEventSignalV2& UnhandledKeyEventSignal();
+ UnhandledKeyEventSignalType& UnhandledKeyEventSignal();
private:
public:
// Signals
- typedef SignalV2< void ( StyleManager, StyleChange ) > StyleChangeSignalType;
+ typedef Signal< void ( StyleManager, StyleChange ) > StyleChangeSignalType;
/**
* @brief Create a StyleManager handle; this can be initialised with StyleManager::Get()
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-cube-effect.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-page-spiral-effect.h>
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-slide-effect.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
#include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
#include <dali-toolkit/public-api/controls/super-blur-view/super-blur-view.h>
{
// root actor to parent all user added actors, needed to allow us to set that subtree as exclusive for our child render task
mChildrenRoot.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
- mChildrenRoot.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) ); // same size as BloomView object
-
//////////////////////////////////////////////////////
// Create shaders
// Create an ImageActor for compositing the result (scene and bloom textures) to output
mCompositeImageActor = ImageActor::New();
mCompositeImageActor.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
- mCompositeImageActor.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) ); // same size as BloomView object
mCompositeImageActor.SetShaderEffect( mCompositeShader );
mCompositeImageActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
// Create an ImageActor for holding final result, i.e. the blurred image. This will get rendered to screen later, via default / user render task
mTargetImageActor = ImageActor::New();
mTargetImageActor.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
- mTargetImageActor.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) ); // same size as BloomView object
mTargetImageActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
SetupProperties();
}
-/**
- * ZrelativeToYconstraint
- *
- * f(current, property, scale) = Vector3(current.x, current.y, property.y * scale)
- */
-struct ZrelativeToYconstraint
-{
- ZrelativeToYconstraint( float scale )
- : mScale( scale )
- {}
-
- Vector3 operator()(const Vector3& current,
- const PropertyInput& property)
- {
- Vector3 v;
-
- v.x = current.x;
- v.y = current.y;
- v.z = property.GetVector3().y * mScale;
-
- return v;
- }
-
- float mScale;
-};
-
void BloomView::OnControlSizeSet(const Vector3& targetSize)
{
mTargetSize = Vector2(targetSize);
+ mChildrenRoot.SetSize(targetSize);
+ mCompositeImageActor.SetSize(targetSize);
+ mTargetImageActor.SetSize(targetSize);
+
+ // Children render camera must move when GaussianBlurView object is
+ // resized. This is since we cannot change render target size - so we need
+ // to remap the child actors' rendering accordingly so they still exactly
+ // fill the render target. Note that this means the effective resolution of
+ // the child render changes as the GaussianBlurView object changes size,
+ // this is the trade off for not being able to modify render target size
+ // Change camera z position based on GaussianBlurView actor height
+ float cameraPosConstraintScale = 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f);
+ mRenderFullSizeCamera.SetZ( mTargetSize.height * cameraPosConstraintScale);
// if we are already on stage, need to update render target sizes now to reflect the new size of this actor
if(Self().OnStage())
float cameraPosConstraintScale = 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f);
mRenderFullSizeCamera.SetPosition(0.0f, 0.0f, mTargetSize.height * cameraPosConstraintScale);
-
- // Children render camera must move when GaussianBlurView object is
- // resized. This is since we cannot change render target size - so we need
- // to remap the child actors' rendering accordingly so they still exactly
- // fill the render target. Note that this means the effective resolution of
- // the child render changes as the GaussianBlurView object changes size,
- // this is the trade off for not being able to modify render target size
- // Change camera z position based on GaussianBlurView actor height
-
- mRenderFullSizeCamera.RemoveConstraints();
- mRenderFullSizeCamera.ApplyConstraint( Constraint::New<Vector3>( Actor::POSITION, ParentSource( Actor::SIZE ), ZrelativeToYconstraint(cameraPosConstraintScale) ) );
-
-
//////////////////////////////////////////////////////
// Pass size change onto GaussianBlurView, so it matches
mGaussianBlurView.SetSize(mTargetSize);
}
mActorForResult = Actor::New();
mActorForResult.SetParentOrigin( ParentOrigin::CENTER );
- mActorForResult.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mActorForResult.SetSize( mTargetSize );
mActorForResult.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) );
Self().Add( mActorForResult );
mEffectOffsetPropertyIndex = self.RegisterProperty(EFFECT_OFFSET_PROPERTY_NAME, EFFECT_OFFSET_DEFAULT);
mEffectColorPropertyIndex = self.RegisterProperty(EFFECT_COLOR_PROPERTY_NAME, EFFECT_COLOR_DEFAULT);
mActorPostFilter.ApplyConstraint( Constraint::New<Vector3>( Actor::POSITION, Source( self, mEffectOffsetPropertyIndex ), EqualToConstraint() ) );
- mActorPostFilter.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
mActorPostFilter.ApplyConstraint( Constraint::New<Vector4>( Actor::COLOR, Source( self, mEffectColorPropertyIndex ), EqualToConstraint() ) );
}
mActorForChildren = ImageActor::New();
mActorForChildren.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
- mActorForChildren.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) ); // same size as EffectsView object
mActorForChildren.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) );
mActorPostFilter = ImageActor::New();
mActorPostFilter.SetParentOrigin( ParentOrigin::CENTER );
- mActorPostFilter.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) ); // same size as EffectsView object
mActorPostFilter.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) );
mActorPostFilter.SetShaderEffect( ShaderEffect::New( "", EFFECTS_VIEW_FRAGMENT_SOURCE ) );
{
AllocateResources();
}
+
+ if( mActorForResult )
+ {
+ mActorForResult.SetSize( targetSize );
+ }
+ if( mActorForChildren )
+ {
+ mActorForChildren.SetSize( targetSize );
+ }
+ if( mActorPostFilter )
+ {
+ mActorPostFilter.SetSize( targetSize );
+ }
+
+ // Children render camera must move when EffectsView object is resized.
+ // This is since we cannot change render target size - so we need to remap the child actors' rendering
+ // accordingly so they still exactly fill the render target.
+ // Note that this means the effective resolution of the child render changes as the EffectsView object
+ // changes size, this is the trade off for not being able to modify render target size
+ // Change camera z position based on EffectsView actor height
+ if( mCameraForChildren )
+ {
+ const float cameraPosScale( 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f) );
+ mCameraForChildren.SetZ( targetSize.height * cameraPosScale );
+ }
+
+ const size_t numFilters( mFilters.size() );
+ for( size_t i = 0; i < numFilters; ++i )
+ {
+ mFilters[i]->SetSize( mTargetSize );
+ }
+
}
void EffectsView::OnStageDisconnection()
void EffectsView::SetupCameras()
{
- const float cameraPosConstraintScale( 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f) );
+ const float cameraPosScale( 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f) );
// Create and place a camera for the children render, corresponding to its render target size
mCameraForChildren.SetFieldOfView(ARBITRARY_FIELD_OF_VIEW);
mCameraForChildren.SetNearClippingPlane(1.0f);
mCameraForChildren.SetAspectRatio(mTargetSize.width / mTargetSize.height);
mCameraForChildren.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor
- mCameraForChildren.SetPosition(0.0f, 0.0f, mTargetSize.height * cameraPosConstraintScale);
+ mCameraForChildren.SetPosition(0.0f, 0.0f, mTargetSize.height * cameraPosScale);
mCameraForChildren.SetRotation(Quaternion(M_PI, Vector3::YAXIS));
-
- // Children render camera must move when EffectsView object is resized.
- // This is since we cannot change render target size - so we need to remap the child actors' rendering
- // accordingly so they still exactly fill the render target.
- // Note that this means the effective resolution of the child render changes as the EffectsView object
- // changes size, this is the trade off for not being able to modify render target size
- // Change camera z position based on EffectsView actor height
- mCameraForChildren.RemoveConstraints();
- mCameraForChildren.ApplyConstraint( Constraint::New<float>( Actor::POSITION_Z, ParentSource( Actor::SIZE_HEIGHT ), RelativeToConstraintFloat(cameraPosConstraintScale) ) );
+ mCameraForChildren.SetZ( mTargetSize.height * cameraPosScale );
}
void EffectsView::CreateRenderTasks()
{
// root actor to parent all user added actors, needed to allow us to set that subtree as exclusive for our child render task
mChildrenRoot.SetParentOrigin(ParentOrigin::CENTER);
- mChildrenRoot.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) ); // same size as GaussianBlurView object
-
//////////////////////////////////////////////////////
// Create shaders
{
mImageActorComposite = ImageActor::New();
mImageActorComposite.SetParentOrigin(ParentOrigin::CENTER);
- mImageActorComposite.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) ); // same size as GaussianBlurView object
mImageActorComposite.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
mImageActorComposite.SetOpacity(GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_STRENGTH); // ensure alpha is enabled for this object and set default value
// Create an ImageActor for holding final result, i.e. the blurred image. This will get rendered to screen later, via default / user render task
mTargetActor = ImageActor::New();
mTargetActor.SetParentOrigin(ParentOrigin::CENTER);
- mTargetActor.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) ); // same size as GaussianBlurView object
mTargetActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
{
mTargetSize = Vector2(targetSize);
+ mChildrenRoot.SetSize(targetSize);
+
+ if( !mBlurUserImage )
+ {
+ mImageActorComposite.SetSize(targetSize);
+ mTargetActor.SetSize(targetSize);
+
+ // Children render camera must move when GaussianBlurView object is resized. This is since we cannot change render target size - so we need to remap the child actors' rendering
+ // accordingly so they still exactly fill the render target. Note that this means the effective resolution of the child render changes as the GaussianBlurView object changes
+ // size, this is the trade off for not being able to modify render target size
+ // Change camera z position based on GaussianBlurView actor height
+ float cameraPosConstraintScale = 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f);
+ mRenderFullSizeCamera.SetZ(mTargetSize.height * cameraPosConstraintScale);
+ }
+
+
// if we are already on stage, need to update render target sizes now to reflect the new size of this actor
if(Self().OnStage())
{
float cameraPosConstraintScale = 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f);
mRenderFullSizeCamera.SetPosition(0.0f, 0.0f, mTargetSize.height * cameraPosConstraintScale);
- // Children render camera must move when GaussianBlurView object is resized. This is since we cannot change render target size - so we need to remap the child actors' rendering
- // accordingly so they still exactly fill the render target. Note that this means the effective resolution of the child render changes as the GaussianBlurView object changes
- // size, this is the trade off for not being able to modify render target size
- // Change camera z position based on GaussianBlurView actor height
- mRenderFullSizeCamera.RemoveConstraints();
- mRenderFullSizeCamera.ApplyConstraint( Constraint::New<Vector3>( Actor::POSITION, ParentSource( Actor::SIZE ), ZrelativeToYconstraint(cameraPosConstraintScale) ) );
-
// create offscreen buffer of new size to render our child actors to
mRenderTargetForRenderingChildren = FrameBufferImage::New( mTargetSize.width, mTargetSize.height, mPixelFormat, Dali::Image::Unused );
#include <dali-toolkit/internal/controls/magnifier/magnifier-impl.h>
// EXTERNAL INCLUDES
-#include <dali/public-api/actors/image-actor.h>
#include <dali/public-api/animation/constraints.h>
#include <dali/public-api/common/stage.h>
#include <dali/public-api/render-tasks/render-task-list.h>
mPropertySourcePosition = self.RegisterProperty( Toolkit::Magnifier::SOURCE_POSITION_PROPERTY_NAME, Vector3::ZERO );
Vector2 stageSize(Stage::GetCurrent().GetSize());
- Layer dummyLayer = Layer::New();
- Stage().GetCurrent().Add(dummyLayer);
- dummyLayer.SetParentOrigin(ParentOrigin::CENTER);
-
// NOTE:
// sourceActor is a dummy delegate actor that takes the source property position,
// and generates a WORLD_POSITION, which is 1 frame behind the source property.
// Perhaps this is a bug in the way the constraint system factors into what is dirty
// and what is not.
mSourceActor = Actor::New();
- dummyLayer.Add(mSourceActor);
+ Stage().GetCurrent().Add(mSourceActor);
mSourceActor.SetParentOrigin(ParentOrigin::CENTER);
Constraint constraint = Constraint::New<Vector3>( Actor::POSITION,
Source( self, mPropertySourcePosition ),
bool Magnifier::GetFrameVisibility() const
{
- return mFrameLayer;
+ return mFrame;
}
void Magnifier::SetFrameVisibility(bool visible)
{
- if(visible && !mFrameLayer)
+ if(visible && !mFrame)
{
Actor self(Self());
- Layer mFrameLayer = Layer::New();
- mFrameLayer.SetParentOrigin( ParentOrigin::CENTER );
- Stage::GetCurrent().Add(mFrameLayer);
-
Image image = Image::New( DEFAULT_FRAME_IMAGE_PATH );
- ImageActor frame = ImageActor::New( image );
- frame.SetDrawMode(DrawMode::OVERLAY);
- frame.SetStyle( ImageActor::STYLE_NINE_PATCH );
-
- frame.SetNinePatchBorder( Vector4::ONE * IMAGE_BORDER_INDENT );
- mFrameLayer.Add(frame);
-
- // Apply position constraint to the frame
- Constraint constraint = Constraint::New<Vector3>( Actor::POSITION,
- Source( self, Actor::WORLD_POSITION ),
- EqualToConstraint() );
- frame.ApplyConstraint(constraint);
-
- // Apply scale constraint to the frame
- constraint = Constraint::New<Vector3>( Actor::SCALE,
- Source( self, Actor::SCALE ),
- EqualToConstraint() );
- frame.ApplyConstraint(constraint);
-
- Source(self, Actor::SCALE),
-
- // Apply size constraint to the the frame
- constraint = Constraint::New<Vector3>(Actor::SIZE,
- Source(self, Actor::SIZE),
- ImageBorderSizeConstraint());
- frame.ApplyConstraint(constraint);
+ mFrame = ImageActor::New( image );
+ mFrame.SetDrawMode(DrawMode::OVERLAY);
+ mFrame.SetStyle( ImageActor::STYLE_NINE_PATCH );
+ mFrame.SetPositionInheritanceMode(USE_PARENT_POSITION);
+ mFrame.SetInheritScale(true);
+
+ mFrame.SetNinePatchBorder( Vector4::ONE * IMAGE_BORDER_INDENT );
+ self.Add(mFrame);
+
+ Vector3 sizeOffset(IMAGE_BORDER_INDENT*2.f - 2.f, IMAGE_BORDER_INDENT*2.f - 2.f, 0.0f);
+ mFrame.SetSize(mActorSize + sizeOffset);
}
- else if(!visible && mFrameLayer)
+ else if(!visible && mFrame)
{
- Stage::GetCurrent().Remove(mFrameLayer);
- mFrameLayer.Reset();
+ UnparentAndReset(mFrame);
}
}
void Magnifier::OnControlSizeSet(const Vector3& targetSize)
{
+ if( mFrame )
+ {
+ Vector3 sizeOffset(IMAGE_BORDER_INDENT*2.f - 2.f, IMAGE_BORDER_INDENT*2.f - 2.f, 0.0f);
+ mFrame.SetSize(targetSize + sizeOffset);
+ }
+
// TODO: Once Camera/CameraActor properties function as proper animatable properties
// this code can disappear.
// whenever the size of the magnifier changes, the field of view needs to change
#include <dali/public-api/actors/camera-actor.h>
#include <dali/public-api/actors/layer.h>
#include <dali/public-api/render-tasks/render-task.h>
+#include <dali/public-api/actors/image-actor.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
RenderTask mTask; ///< Render Task to render the source actor contents.
CameraActor mCameraActor; ///< CameraActor attached to RenderTask
- Layer mFrameLayer; ///< Frame is placed on separate layer added to stage.
+ ImageActor mFrame; ///< The Magnifier Frame
Property::Index mPropertySourcePosition; ///< Source Position ("source-position")
Actor mSourceActor; ///< Source Delegate Actor represents the source position to read.
float mDefaultCameraDistance; ///< Default RenderTask's camera distance from target.
}
}
-Toolkit::NavigationControl::ItemPushedSignalV2& NavigationControl::ItemPushedSignal()
+Toolkit::NavigationControl::ItemPushedSignalType& NavigationControl::ItemPushedSignal()
{
return mItemPushedSignal;
}
-Toolkit::NavigationControl::ItemPoppedSignalV2& NavigationControl::ItemPoppedSignal()
+Toolkit::NavigationControl::ItemPoppedSignalType& NavigationControl::ItemPoppedSignal()
{
return mItemPoppedSignal;
}
/**
* @copydoc Dali::Toolkit::NavigatinControl::ItemPushedSignal()
*/
- Toolkit::NavigationControl::ItemPushedSignalV2& ItemPushedSignal();
+ Toolkit::NavigationControl::ItemPushedSignalType& ItemPushedSignal();
/**
* @copydoc Dali::Toolkit::NavigatinControl::ItemPoppedSignal()
*/
- Toolkit::NavigationControl::ItemPoppedSignalV2& ItemPoppedSignal();
+ Toolkit::NavigationControl::ItemPoppedSignalType& ItemPoppedSignal();
private: // override functions from Control
Toolkit::Popup mPopupMenu;
private:
- Toolkit::NavigationControl::ItemPushedSignalV2 mItemPushedSignal; ///< The signal to notify the item push
- Toolkit::NavigationControl::ItemPoppedSignalV2 mItemPoppedSignal; ///< The signal to notify the item pop
+ Toolkit::NavigationControl::ItemPushedSignalType mItemPushedSignal; ///< The signal to notify the item push
+ Toolkit::NavigationControl::ItemPoppedSignalType mItemPoppedSignal; ///< The signal to notify the item pop
};
} // namespace Internal
}
Toolkit::View handle( GetOwner() );
- mOrientationAnimationStartedSignalV2.Emit( handle, mRotateAnimation, orientation );
+ mOrientationAnimationStartedSignal.Emit( handle, mRotateAnimation, orientation );
mRotateAnimation.Play();
}
mAutoRotateEnabled = enabled;
}
-Toolkit::View::OrientationAnimationStartedSignalV2& View::OrientationAnimationStartedSignal()
+Toolkit::View::OrientationAnimationStartedSignalType& View::OrientationAnimationStartedSignal()
{
- return mOrientationAnimationStartedSignalV2;
+ return mOrientationAnimationStartedSignal;
}
bool View::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
/**
* @copydoc Dali::Toolkit::View::AnimationStartedSignalOrientation()
*/
- Toolkit::View::OrientationAnimationStartedSignalV2& OrientationAnimationStartedSignal();
+ Toolkit::View::OrientationAnimationStartedSignalType& OrientationAnimationStartedSignal();
/**
* Connects a callback function with the object's signals.
float mOrientationFunction[4]; ///< The orientation function used to transform from degrees to the internal orientation.
bool mAutoRotateEnabled; ///< Whether the view rotates if the OrientationChanged method is called.
- Toolkit::View::OrientationAnimationStartedSignalV2 mOrientationAnimationStartedSignalV2;
+ Toolkit::View::OrientationAnimationStartedSignalType mOrientationAnimationStartedSignal;
};
} // namespace Internal
// create actor to render input with applied emboss effect
mActorForInput = ImageActor::New( mInputImage );
mActorForInput.SetParentOrigin( ParentOrigin::CENTER );
- mActorForInput.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mActorForInput.SetSize(mTargetSize);
mActorForInput.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) );
// create internal offscreen for result of horizontal pass
// create an actor to render mImageForHorz for vertical blur pass
mActorForHorz = ImageActor::New( mImageForHorz );
mActorForHorz.SetParentOrigin( ParentOrigin::CENTER );
- mActorForHorz.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mActorForHorz.SetSize(mTargetSize);
mActorForHorz.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) );
// create internal offscreen for result of the two pass blurred image
// create an actor to blend the blurred image and the input image with the given blur strength
mActorForBlending = ImageActor::New( mBlurredImage );
mActorForBlending.SetParentOrigin( ParentOrigin::CENTER );
- mActorForBlending.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mActorForBlending.SetSize(mTargetSize);
mActorForBlending.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) );
mRootActor.Add( mActorForInput );
}
}
+void BlurTwoPassFilter::SetSize( const Vector2& size )
+{
+ mTargetSize = size;
+ if( mActorForInput )
+ {
+ mActorForInput.SetSize(mTargetSize);
+ }
+ if( mActorForHorz )
+ {
+ mActorForHorz.SetSize(mTargetSize);
+ }
+ if( mActorForBlending )
+ {
+ mActorForBlending.SetSize(mTargetSize);
+ }
+}
+
Constrainable BlurTwoPassFilter::GetHandleForAnimateBlurStrength()
{
return mShaderForBlending;
/// @copydoc Dali::Toolkit::Internal::ImageFilter::Refresh
virtual void Refresh();
+ /// @copydoc Dali::Toolkit::Internal::ImageFilter::SetSize
+ virtual void SetSize( const Vector2& size );
+
/**
* Get the property index that controls the strength of the blur applied to the image. Useful for animating this property.
* This property represents a value in the range [0.0 - 1.0] where 0.0 is no blur and 1.0 is full blur.
// create actor to render input with applied emboss effect
mActorForInput1 = ImageActor::New( mInputImage );
mActorForInput1.SetParentOrigin( ParentOrigin::CENTER );
- mActorForInput1.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mActorForInput1.SetSize(mTargetSize);
mActorForInput1.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) );
mActorForInput1.SetColor( Color::WHITE );
mActorForInput2 = ImageActor::New( mInputImage );
mActorForInput2.SetParentOrigin( ParentOrigin::CENTER );
- mActorForInput2.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mActorForInput2.SetSize(mTargetSize);
mActorForInput2.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) );
mActorForInput2.SetColor( Color::WHITE );
mActorForEmboss1 = ImageActor::New( mImageForEmboss1 );
mActorForEmboss1.SetParentOrigin( ParentOrigin::CENTER );
- mActorForEmboss1.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mActorForEmboss1.SetSize(mTargetSize);
mActorForEmboss1.SetColor( Color::BLACK );
mActorForEmboss1.SetShaderEffect( ShaderEffect::New( "", COMPOSITE_FRAGMENT_SOURCE ) );
mActorForEmboss2 = ImageActor::New( mImageForEmboss2 );
mActorForEmboss2.SetParentOrigin( ParentOrigin::CENTER );
- mActorForEmboss2.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mActorForEmboss2.SetSize(mTargetSize);
mActorForEmboss2.SetColor( Color::WHITE );
mActorForEmboss2.SetShaderEffect( ShaderEffect::New( "", COMPOSITE_FRAGMENT_SOURCE ) );
mActorForComposite = Actor::New();
mActorForComposite.SetParentOrigin( ParentOrigin::CENTER );
- mActorForComposite.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mActorForComposite.SetSize(mTargetSize);
mActorForComposite.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) );
// create custom shader effect
}
}
+void EmbossFilter::SetSize( const Vector2& size )
+{
+ mTargetSize = size;
+ if( mActorForInput1 )
+ {
+ mActorForInput1.SetSize(mTargetSize);
+ }
+ if( mActorForInput2 )
+ {
+ mActorForInput2.SetSize(mTargetSize);
+ }
+ if( mActorForEmboss1 )
+ {
+ mActorForEmboss1.SetSize(mTargetSize);
+ }
+ if( mActorForEmboss2 )
+ {
+ mActorForEmboss2.SetSize(mTargetSize);
+ }
+ if( mActorForComposite )
+ {
+ mActorForComposite.SetSize(mTargetSize);
+ }
+}
+
void EmbossFilter::SetupCamera()
{
// Create and place a camera for the embossing render, corresponding to its render target size
/// @copydoc Dali::Toolkit::Internal::ImageFilter::Refresh
virtual void Refresh();
+ /// @copydoc Dali::Toolkit::Internal::ImageFilter::SetSize
+ virtual void SetSize( const Vector2& size );
+
private:
/**
* Setup position and parameters for camera
* Set size of ImageFilter. Used to create internal offscreen buffers
* @param[in] size THe size.
*/
- void SetSize( const Vector2& size );
+ virtual void SetSize( const Vector2& size );
/**
* Set the pixel format for internal offscreen buffers
// create actor to render input with applied emboss effect
mActorForInput = ImageActor::New( mInputImage );
mActorForInput.SetParentOrigin( ParentOrigin::CENTER );
- mActorForInput.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mActorForInput.SetSize(mTargetSize);
mActorForInput.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) );
// create internal offscreen for result of horizontal pass
// create an actor to render mImageForHorz for vertical blur pass
mActorForHorz = ImageActor::New( mImageForHorz );
mActorForHorz.SetParentOrigin( ParentOrigin::CENTER );
- mActorForHorz.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
+ mActorForHorz.SetSize(mTargetSize);
mActorForHorz.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) );
mRootActor.Add( mActorForInput );
}
}
+void SpreadFilter::SetSize( const Vector2& size )
+{
+ mTargetSize = size;
+ if( mActorForInput )
+ {
+ mActorForInput.SetSize(mTargetSize);
+ }
+ if( mActorForHorz )
+ {
+ mActorForHorz.SetSize(mTargetSize);
+ }
+}
+
void SpreadFilter::SetupCamera()
{
// Create and place a camera for the embossing render, corresponding to its render target size
/// @copydoc Dali::Toolkit::Internal::ImageFilter::Refresh
virtual void Refresh();
+ /// @copydoc Dali::Toolkit::Internal::ImageFilter::SetSize
+ virtual void SetSize( const Vector2& size );
+
private:
/**
* Setup position and parameters for camera
//Emit signal
Toolkit::CubeTransitionEffect handle( this );
- mTransitionCompletedSignalV2.Emit( handle, mCurrentImage );
+ mTransitionCompletedSignal.Emit( handle, mCurrentImage );
}
-Toolkit::CubeTransitionEffect::TransitionCompletedSignalV2& CubeTransitionEffect::TransitionCompletedSignal()
+Toolkit::CubeTransitionEffect::TransitionCompletedSignalType& CubeTransitionEffect::TransitionCompletedSignal()
{
- return mTransitionCompletedSignalV2;
+ return mTransitionCompletedSignal;
}
} // namespace Internal
/**
* @copydoc Toolkit::CubeTransitionEffect::TransitionCompletedSignal()
*/
- Toolkit::CubeTransitionEffect::TransitionCompletedSignalV2& TransitionCompletedSignal();
+ Toolkit::CubeTransitionEffect::TransitionCompletedSignalType& TransitionCompletedSignal();
protected:
private:
- Toolkit::CubeTransitionEffect::TransitionCompletedSignalV2 mTransitionCompletedSignalV2;
+ Toolkit::CubeTransitionEffect::TransitionCompletedSignalType mTransitionCompletedSignal;
};
/**
* Signal type for notifications
*/
- typedef SignalV2< void (GaussianBlurView source) > GaussianBlurViewSignal;
+ typedef Signal< void (GaussianBlurView source) > GaussianBlurViewSignal;
/**
* Create an uninitialized GaussianBlurView; this can be initialized with GaussianBlurView::New()
public: /* Signals */
/// @brief Finished signal type.
- typedef SignalV2< void (MaskedImageView& source) > MaskedImageViewSignal;
+ typedef Signal< void (MaskedImageView& source) > MaskedImageViewSignal;
/**
* @brief Signal emitted when the render task which targets the
GetImpl( *this ).SetOrientationRotateAnimation( duration, alphaFunc );
}
-NavigationControl::ItemPushedSignalV2& NavigationControl::ItemPushedSignal()
+NavigationControl::ItemPushedSignalType& NavigationControl::ItemPushedSignal()
{
return GetImpl( *this ).ItemPushedSignal();
}
-NavigationControl::ItemPoppedSignalV2& NavigationControl::ItemPoppedSignal()
+NavigationControl::ItemPoppedSignalType& NavigationControl::ItemPoppedSignal()
{
return GetImpl( *this ).ItemPoppedSignal();
}
public: //Signal
- typedef SignalV2< void( NavigationControl, Page ) > ItemPushedSignalV2;
- typedef SignalV2< void( NavigationControl, Page ) > ItemPoppedSignalV2;
+ typedef Signal< void( NavigationControl, Page ) > ItemPushedSignalType;
+ typedef Signal< void( NavigationControl, Page ) > ItemPoppedSignalType;
/**
* Signal emitted right after a new item is pushed into the navigation stack.
* @endcode
* @return The signal to connect to.
*/
- ItemPushedSignalV2& ItemPushedSignal();
+ ItemPushedSignalType& ItemPushedSignal();
/**
* Signal emitted right after an item is popped out from the navigation stack.
* The app can use this signal and check the poppedItem to be uninitialized to know the app window should be lower
* @return The signal to connect to.
*/
- ItemPoppedSignalV2& ItemPoppedSignal();
+ ItemPoppedSignalType& ItemPoppedSignal();
/**
* Signal type for notification
*/
- typedef SignalV2< void ( int ) > RefreshSignal;
+ typedef Signal< void ( int ) > RefreshSignal;
/**
* Signal emitted when the Actor tree is ready for rendering into the page image.
public: //Signal
// Page Turned signal, with page index and boolean turning direction (true = forward, false = backward)
- typedef SignalV2< void ( PageTurnView, unsigned int, bool ) > PageTurnSignal;
- typedef SignalV2< void ( PageTurnView ) > PagePanSignal;
+ typedef Signal< void ( PageTurnView, unsigned int, bool ) > PageTurnSignal;
+ typedef Signal< void ( PageTurnView ) > PagePanSignal;
/**
* Signal emitted when a page has started to turn over.
// Signals
// Value changed
- typedef SignalV2< bool ( Slider, float ) > ValueChangedSignalType;
- typedef SignalV2< bool ( Slider, int ) > MarkSignalType;
+ typedef Signal< bool ( Slider, float ) > ValueChangedSignalType;
+ typedef Signal< bool ( Slider, int ) > MarkSignalType;
/**
* Signal emitted when the slider value changes
/**
* @brief Signal type for notifications.
*/
- typedef SignalV2< void (SuperBlurView source) > SuperBlurViewSignal;
+ typedef Signal< void (SuperBlurView source) > SuperBlurViewSignal;
/**
* @brief Creates an empty SuperBlurView handle.
GetImpl( *this ).SetAutoRotate( enabled );
}
-View::OrientationAnimationStartedSignalV2& View::OrientationAnimationStartedSignal()
+View::OrientationAnimationStartedSignalType& View::OrientationAnimationStartedSignal()
{
return GetImpl( *this ).OrientationAnimationStartedSignal();
}
public: //Signals
// Orientation change animation starts.
- typedef SignalV2< void ( View, Animation&, const Orientation& ) > OrientationAnimationStartedSignalV2;
+ typedef Signal< void ( View, Animation&, const Orientation& ) > OrientationAnimationStartedSignalType;
/**
* Signal emitted just before the rotate animation starts when the device orientation changes.
*/
- OrientationAnimationStartedSignalV2& OrientationAnimationStartedSignal();
+ OrientationAnimationStartedSignalType& OrientationAnimationStartedSignal();
public: // Not intended for application developers
const unsigned int TOOLKIT_MAJOR_VERSION = 1;
const unsigned int TOOLKIT_MINOR_VERSION = 0;
-const unsigned int TOOLKIT_MICRO_VERSION = 27;
+const unsigned int TOOLKIT_MICRO_VERSION = 28;
const char * const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
GetImpl(*this).StopTransition();
}
-CubeTransitionEffect::TransitionCompletedSignalV2& CubeTransitionEffect::TransitionCompletedSignal()
+CubeTransitionEffect::TransitionCompletedSignalType& CubeTransitionEffect::TransitionCompletedSignal()
{
return GetImpl( *this ).TransitionCompletedSignal();
}
static const char* const SIGNAL_TRANSITION_COMPLETED;
//Transition animation completed signal
- typedef SignalV2< void ( CubeTransitionEffect, ImageActor ) > TransitionCompletedSignalV2;
+ typedef Signal< void ( CubeTransitionEffect, ImageActor ) > TransitionCompletedSignalType;
/**
* Signal emitted when the transition has completed animation
* @endcode
* @return The Signal to connect to.
*/
- TransitionCompletedSignalV2& TransitionCompletedSignal();
+ TransitionCompletedSignalType& TransitionCompletedSignal();
public: // Not intended for developer use
Name: dali-toolkit
Summary: The OpenGLES Canvas Core Library Toolkit
-Version: 1.0.27
+Version: 1.0.28
Release: 1
Group: System/Libraries
License: Apache-2.0