### Requirements
- - Ubuntu 14.04 or later
+ - Ubuntu 16.04 or later
- Environment created using dali_env script in dali-core repository
- - GCC version 6
+ - GCC version 9
-DALi requires a compiler supporting C++11 features.
-Ubuntu 16.04 is the first version to offer this by default (GCC v5.4.0).
-
-GCC version 6 is recommended since it has fixes for issues in version 5
-e.g. it avoids spurious 'defined but not used' warnings in header files.
+DALi requires a compiler supporting C++17 features.
### Building the Repository
childRemoveCalled(false),
sizeSetCalled(false),
sizeAnimationCalled(false),
- touchEventCalled(false),
hoverEventCalled(false),
wheelEventCalled(false),
keyEventCalled(false),
void Impl::DummyControl::OnInitialize() { initializeCalled = true; }
bool Impl::DummyControl::OnAccessibilityActivated() { activatedCalled = true; return true; }
-bool Impl::DummyControl::OnAccessibilityTouch(const TouchEvent& touchEvent) { onAccTouchedCalled = true; return true; }
+bool Impl::DummyControl::OnAccessibilityTouch(const TouchData& touchData) { onAccTouchedCalled = true; return true; }
bool Impl::DummyControl::OnAccessibilityValueChange( bool isIncrease )
{
onAccValueChangeCalled = true; return true;
void Impl::DummyControl::OnChildRemove(Actor& child) { childRemoveCalled = true; }
void Impl::DummyControl::OnSizeSet(const Vector3& targetSize) { Control::OnSizeSet( targetSize ); sizeSetCalled = true; }
void Impl::DummyControl::OnSizeAnimation(Animation& animation, const Vector3& targetSize) { Control::OnSizeAnimation( animation, targetSize ); sizeAnimationCalled = true; }
-bool Impl::DummyControl::OnTouchEvent(const TouchEvent& event) { touchEventCalled = true; return false; }
bool Impl::DummyControl::OnHoverEvent(const HoverEvent& event) { hoverEventCalled = true; return false; }
bool Impl::DummyControl::OnWheelEvent(const WheelEvent& event) { wheelEventCalled = true; return false; }
bool Impl::DummyControl::OnKeyEvent(const KeyEvent& event) { keyEventCalled = true; return false;}
virtual void OnInitialize();
virtual bool OnAccessibilityActivated();
- virtual bool OnAccessibilityTouch( const TouchEvent& touchEvent );
+ virtual bool OnAccessibilityTouch( const TouchData& touchData );
virtual bool OnAccessibilityValueChange( bool isIncrease );
virtual void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change );
virtual void OnChildRemove(Actor& child);
virtual void OnSizeSet(const Vector3& targetSize);
virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize);
- virtual bool OnTouchEvent(const TouchEvent& event);
virtual bool OnHoverEvent(const HoverEvent& event);
virtual bool OnWheelEvent(const WheelEvent& event);
virtual bool OnKeyEvent(const KeyEvent& event);
bool childRemoveCalled;
bool sizeSetCalled;
bool sizeAnimationCalled;
- bool touchEventCalled;
bool hoverEventCalled;
bool wheelEventCalled;
bool keyEventCalled;
+++ /dev/null
-#ifndef TEST_TOUCH_UTILS_H
-#define TEST_TOUCH_UTILS_H
-
-/*
- * Copyright (c) 2019 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/public-api/actors/actor.h>
-
-namespace Dali
-{
-
-// Data for touch events
-struct TouchEventData
-{
- TouchEventData()
- : functorCalled(false),
- receivedTouch(),
- touchActor()
- {
- }
-
- void Reset()
- {
- functorCalled = false;
-
- receivedTouch.points.clear();
- receivedTouch.time = 0;
-
- touchActor.Reset();
- }
-
- bool functorCalled;
- TouchEvent receivedTouch;
- Actor touchActor;
-};
-
-// Functor that sets the data when called
-struct TouchEventDataFunctor
-{
- TouchEventDataFunctor(TouchEventData& data) : touchEventData(data) { }
-
- bool operator()(Actor actor, const TouchEvent& touch)
- {
- touchEventData.functorCalled = true;
- touchEventData.touchActor = actor;
- touchEventData.receivedTouch = touch;
- return false;
- }
-
- // Generate a touch-event
- Integration::TouchEvent GenerateSingleTouch( PointState::Type state, const Vector2& screenPosition ) const
- {
- Integration::TouchEvent touchEvent;
- Integration::Point point;
- point.SetState( state );
- point.SetScreenPosition( screenPosition );
- touchEvent.points.push_back( point );
- return touchEvent;
- }
-
- TouchEventData& touchEventData;
-};
-
-
-} // namespace Dali
-
-#endif // TEST_TOUCH_UTILS_H
#include <dali/devel-api/adaptor-framework/accessibility-action-handler.h>
#include <dali/devel-api/adaptor-framework/accessibility-gesture-handler.h>
#include <dali/devel-api/adaptor-framework/accessibility-gesture-event.h>
+#include <dali/integration-api/events/touch-data-integ.h>
namespace Dali
{
{
if( mActionHandler )
{
- Dali::TouchEvent touchEvent;
- touchEvent.points.push_back( point );
- return mActionHandler->AccessibilityActionScroll( touchEvent );
+ Dali::TouchData touchData = Integration::NewTouchData(timeStamp, point);
+ return mActionHandler->AccessibilityActionScroll( touchData );
}
return false;
}
{
if( mActionHandler )
{
- Dali::TouchEvent touchEvent;
- touchEvent.points.push_back( point );
- return mActionHandler->AccessibilityActionTouch( touchEvent );
+ Dali::TouchData touchData = Integration::NewTouchData(timeStamp, point);
+ return mActionHandler->AccessibilityActionTouch( touchData );
}
return false;
}
{
}
- bool Callback( AccessibilityManager& accessibilityManager, const Dali::TouchEvent& touchEvent )
+ bool Callback( AccessibilityManager& accessibilityManager, const Dali::TouchData& touchEvent )
{
mCalls++;
- mTouchEvent = touchEvent;
+ Dali::TouchData handle(touchEvent); // Ensure it's ref-counted
+ mTouchData = handle;
tet_infoline( "Signal called" );
return true;
}
return mCalls;
}
- const Dali::TouchEvent& GetTouchEvent() const
+ const Dali::TouchData& GetTouchData() const
{
- return mTouchEvent;
+ return mTouchData;
}
private:
unsigned int mCalls; ///< Keeps track of how many times the signal has been called.
- Dali::TouchEvent mTouchEvent; ///< Stores the last touch event received.
+ Dali::TouchData mTouchData ; ///< Stores the last touch event received.
};
int UtcDaliAccessibilityManagerActionScrollSignalP(void)
DALI_TEST_EQUALS( callback.GetCalls(), 1u, TEST_LOCATION );
- const TouchEvent& signalTouchEvent = callback.GetTouchEvent();
- DALI_TEST_EQUALS( signalTouchEvent.GetPointCount(), 1u, TEST_LOCATION );
+ const TouchData& signalTouchData = callback.GetTouchData();
+ DALI_TEST_EQUALS( signalTouchData.GetPointCount(), 1u, TEST_LOCATION );
- const TouchPoint& signalTouchPoint = signalTouchEvent.GetPoint( 0u );
- DALI_TEST_EQUALS( signalTouchPoint.state, TouchPoint::Started, TEST_LOCATION );
- DALI_TEST_EQUALS( signalTouchPoint.screen.x, 100.0f, TEST_LOCATION );
- DALI_TEST_EQUALS( signalTouchPoint.screen.y, 200.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( signalTouchData.GetState(0), PointState::STARTED, TEST_LOCATION );
+ DALI_TEST_EQUALS( signalTouchData.GetScreenPosition(0).x, 100.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( signalTouchData.GetScreenPosition(0).y, 200.0f, TEST_LOCATION );
END_TEST;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
-int UtcDaliControlImplTouchEvent(void)
-{
- ToolkitTestApplication application;
-
- {
- DummyControl dummy = DummyControl::New( true );
- Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
-
- dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
- dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- application.GetScene().Add(dummy);
-
- application.Render();
- application.SendNotification();
- application.Render();
- application.SendNotification();
-
- DALI_TEST_EQUALS( dummyImpl.touchEventCalled, false, TEST_LOCATION );
- Integration::TouchEvent touchEvent(1);
- Integration::Point point;
- point.SetDeviceId( 1 );
- point.SetState( PointState::DOWN );
- point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
- touchEvent.AddPoint(point);
- application.ProcessEvent(touchEvent);
- DALI_TEST_EQUALS( dummyImpl.touchEventCalled, true, TEST_LOCATION );
-
- application.GetScene().Remove(dummy);
- }
-
- // Ensure full code coverage
- {
- DummyControl dummy = DummyControl::New();
-
- dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
- dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- application.GetScene().Add(dummy);
-
- application.Render();
- application.SendNotification();
- application.Render();
- application.SendNotification();
-
- Integration::TouchEvent touchEvent(1);
- Integration::Point point;
- point.SetDeviceId( 1 );
- point.SetState( PointState::DOWN );
- point.SetScreenPosition( Vector2( 20.0f, 20.0f ) );
- touchEvent.AddPoint(point);
- application.ProcessEvent(touchEvent);
-
- application.GetScene().Remove(dummy);
- }
- END_TEST;
-}
-
int UtcDaliControlImplHoverEvent(void)
{
ToolkitTestApplication application;
ToolkitTestApplication application;
Control dummy = Control::New();
Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy );
- TouchEvent touch;
+ TouchData touch;
DALI_TEST_EQUALS( false, controlImpl.OnAccessibilityTouch( touch ), TEST_LOCATION );
END_TEST;
mTargetSize = targetSize;
Control::OnSizeAnimation( animation, targetSize );
}
- virtual bool OnTouchEvent( const TouchEvent& event )
- {
- return true;
- }
virtual bool OnHoverEvent( const HoverEvent& event )
{
return true;
const char* const PROPERTY_NAME_ENABLE_SHIFT_SELECTION = "enableShiftSelection";
const char* const PROPERTY_NAME_ENABLE_GRAB_HANDLE = "enableGrabHandle";
const char* const PROPERTY_NAME_MATCH_SYSTEM_LANGUAGE_DIRECTION = "matchSystemLanguageDirection";
+const char* const PROPERTY_NAME_MAX_LENGTH = "maxLength";
const Vector4 PLACEHOLDER_TEXT_COLOR( 0.8f, 0.8f, 0.8f, 0.8f );
static bool gTextChangedCallBackCalled;
static bool gInputStyleChangedCallbackCalled;
+static bool gMaxCharactersCallBackCalled;
static Dali::Toolkit::TextEditor::InputStyle::Mask gInputStyleMask;
struct CallbackFunctor
gInputStyleMask = mask;
}
+static void TestMaxLengthReachedCallback( TextEditor control )
+{
+ tet_infoline(" TestMaxLengthReachedCallback");
+
+ gMaxCharactersCallBackCalled = true;
+}
+
// Generate a KeyEvent to send to Core.
Integration::KeyEvent GenerateKey( const std::string& keyName,
const std::string& logicalKey,
DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_ENABLE_SHIFT_SELECTION ) == DevelTextEditor::Property::ENABLE_SHIFT_SELECTION );
DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_ENABLE_GRAB_HANDLE ) == DevelTextEditor::Property::ENABLE_GRAB_HANDLE );
DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_MATCH_SYSTEM_LANGUAGE_DIRECTION ) == DevelTextEditor::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION );
+ DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_MAX_LENGTH ) == DevelTextEditor::Property::MAX_LENGTH );
END_TEST;
}
END_TEST;
}
+
+int utcDaliTextEditorMaxCharactersReached(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline("utcDaliTextEditorMaxCharactersReached");
+
+ TextEditor editor = TextEditor::New();
+ DALI_TEST_CHECK( editor );
+
+ application.GetScene().Add( editor );
+
+ const int maxNumberOfCharacters = 1;
+ editor.SetProperty( DevelTextEditor::Property::MAX_LENGTH, maxNumberOfCharacters );
+ DALI_TEST_EQUALS( editor.GetProperty<int>( DevelTextEditor::Property::MAX_LENGTH ), maxNumberOfCharacters, TEST_LOCATION );
+
+ editor.SetKeyInputFocus();
+
+ // connect to the text changed signal.
+ ConnectionTracker* testTracker = new ConnectionTracker();
+ DevelTextEditor::MaxLengthReachedSignal( editor ).Connect(&TestMaxLengthReachedCallback);
+ bool maxLengthReachedSignal = false;
+ editor.ConnectSignal( testTracker, "maxLengthReached", CallbackFunctor(&maxLengthReachedSignal) );
+
+ gMaxCharactersCallBackCalled = false;
+
+ application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "a", "", "a", KEY_A_CODE, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
+
+ DALI_TEST_CHECK( gMaxCharactersCallBackCalled );
+ DALI_TEST_CHECK( maxLengthReachedSignal );
+
+ END_TEST;
+}
SET(name "dali2-toolkit")
+SET(CMAKE_C_STANDARD 99)
PROJECT(${name})
SET(PKG_NAME ${name})
IF( WIN32 )
ADD_COMPILE_OPTIONS( /FIdali-windows-dependencies.h ) # Adds missing definitions.
ADD_COMPILE_OPTIONS( /vmg ) # Avoids a 'reinterpret_cast' compile error while compiling signals and callbacks.
+ ADD_COMPILE_OPTIONS( /std:c++17 ) # c++17 support
ADD_COMPILE_OPTIONS( /wd4251 ) # Ignores warning C4251: "'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'"
ELSE()
# Set up compiler flags and warnings
- ADD_COMPILE_OPTIONS( -std=c++11 )
+ ADD_COMPILE_OPTIONS( -std=c++17 )
ADD_COMPILE_OPTIONS( -Wno-ignored-qualifiers )
# TODO: Clang is a lot more strict with warnings, we should address
* @SINCE_1_0.0
*/
typedef Signal< bool ( AccessibilityManager& ) > AccessibilityActionSignalType; ///< Generic signal type @SINCE_1_0.0
- typedef Signal< bool ( AccessibilityManager&, const Dali::TouchEvent& )> AccessibilityActionScrollSignalType; ///< Scroll signal type @SINCE_1_0.0
+ typedef Signal< bool ( AccessibilityManager&, const Dali::TouchData& )> AccessibilityActionScrollSignalType; ///< Scroll signal type @SINCE_1_0.0
/**
* @brief Enumeration for accessibility that needs four information which will be read by screen-reader.
*
* A callback of the following type may be connected:
* @code
- * bool YourCallback( AccessibilityManager& manager, const TouchEvent& event );
+ * bool YourCallback( AccessibilityManager& manager, const TouchData& event );
* @endcode
* @SINCE_1_0.0
* @return The signal to connect to
return GetImpl( textEditor ).GetInputMethodContext();
}
+MaxLengthReachedSignalType& MaxLengthReachedSignal( TextEditor textEditor )
+{
+ return GetImpl( textEditor ).MaxLengthReachedSignal();
+}
+
} // namespace DevelTextEditor
} // namespace Toolkit
-} // namespace Dali
\ No newline at end of file
+} // namespace Dali
* @details Name "renderingBackend", type Property::INTEGER.
*/
RENDERING_BACKEND,
+
+ /**
+ * @brief The maximum number of characters that can be inserted.
+ * @details Name "maxLength", type Property::INTEGER.
+ */
+ MAX_LENGTH,
};
} // namespace Property
*/
DALI_TOOLKIT_API InputMethodContext GetInputMethodContext( TextEditor textEditor );
+/**
+ * @brief Max Characters Exceed signal type.
+ */
+using MaxLengthReachedSignalType = Signal< void ( TextEditor ) >;
+
+/**
+ * @brief This signal is emitted when inserted text exceeds the maximum character limit.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallbackName( TextEditor textEditor );
+ * @endcode
+ * @param[in] textEditor The instance of TextEditor.
+ * @return The signal to connect to
+ */
+DALI_TOOLKIT_API MaxLengthReachedSignalType& MaxLengthReachedSignal( TextEditor textEditor );
+
} // namespace DevelTextEditor
} // namespace Toolkit
}
}
-bool AccessibilityManager::AccessibilityActionScroll( Dali::TouchEvent& touchEvent )
+bool AccessibilityManager::AccessibilityActionScroll( Dali::TouchData& touchData )
{
Dali::Toolkit::AccessibilityManager handle( this );
if( !mActionScrollSignal.Empty() )
{
- mActionScrollSignal.Emit( handle, touchEvent );
+ mActionScrollSignal.Emit( handle, touchData );
}
return true;
return mIsAccessibilityTtsEnabled;
}
-bool AccessibilityManager::AccessibilityActionTouch(const TouchEvent& touchEvent)
+bool AccessibilityManager::AccessibilityActionTouch(const TouchData& touchData)
{
bool handled = false;
Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(GetCurrentFocusActor());
if(control)
{
- handled = GetImplementation( control ).OnAccessibilityTouch(touchEvent);
+ handled = GetImplementation( control ).OnAccessibilityTouch(touchData);
}
return handled;
/**
* Perform the accessibility action associated with a scroll event.
- * @param touchEvent The touch point (and time) of the event.
+ * @param touchData The touch point (and time) of the event.
* @return whether the focus is cleared or not.
*/
- virtual bool AccessibilityActionScroll( Dali::TouchEvent& touchEvent );
+ virtual bool AccessibilityActionScroll( Dali::TouchData& touchData );
/**
* Perform the accessibility action to move focus to the previous focusable actor (by one finger flick up).
/**
* Perform the accessibility action to mouse move (by one finger tap & hold and move).
- * @param touchEvent touch event structure
+ * @param touchData touch point and time of the event
* @return whether the accessibility action is performed or not.
*/
- virtual bool AccessibilityActionTouch(const TouchEvent& touchEvent);
+ virtual bool AccessibilityActionTouch(const TouchData& touchData);
/**
* This function is connected to the TtsPlayer StateChangeSignal.
/*
* Collect nodes
*/
-struct CollectNodes : public std::unary_function<TreeNode*, void>
+struct CollectNodes
{
CollectNodes() {};
/*
* Call operator to add nodes to the list
*/
- result_type operator()(argument_type& n)
+ void operator()(TreeNode*& n)
{
DALI_ASSERT_DEBUG(n && "Operation on NULL JSON node");
nodes.push_back(n);
#include <dali-toolkit/devel-api/text/rendering-backend.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
-#include <dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h>
#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/text/text-enumerations-impl.h>
#include <dali-toolkit/internal/text/rendering/text-backend.h>
DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "enableGrabHandle", BOOLEAN, ENABLE_GRAB_HANDLE )
DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "matchSystemLanguageDirection", BOOLEAN, MATCH_SYSTEM_LANGUAGE_DIRECTION )
DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "renderingBackend", INTEGER, RENDERING_BACKEND )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "maxLength", INTEGER, MAX_LENGTH )
DALI_SIGNAL_REGISTRATION( Toolkit, TextEditor, "textChanged", SIGNAL_TEXT_CHANGED )
DALI_SIGNAL_REGISTRATION( Toolkit, TextEditor, "inputStyleChanged", SIGNAL_INPUT_STYLE_CHANGED )
+DALI_SIGNAL_REGISTRATION( Toolkit, TextEditor, "maxLengthReached", SIGNAL_MAX_LENGTH_REACHED )
DALI_TYPE_REGISTRATION_END()
}
break;
}
+ case Toolkit::DevelTextEditor::Property::MAX_LENGTH:
+ {
+ if( impl.mController )
+ {
+ const int max = value.Get< int >();
+ DALI_LOG_INFO( gLogFilter, Debug::General, "TextEditor %p MAX_LENGTH %d\n", impl.mController.Get(), max );
+
+ impl.mController->SetMaximumNumberOfCharacters( max );
+ }
+ break;
+ }
} // switch
} // texteditor
}
}
break;
}
+ case Toolkit::DevelTextEditor::Property::MAX_LENGTH:
+ {
+ if( impl.mController )
+ {
+ value = impl.mController->GetMaximumNumberOfCharacters();
+ }
+ break;
+ }
} //switch
}
return mInputMethodContext;
}
+DevelTextEditor::MaxLengthReachedSignalType& TextEditor::MaxLengthReachedSignal()
+{
+ return mMaxLengthReachedSignal;
+}
+
bool TextEditor::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
{
Dali::BaseHandle handle( object );
{
editor.InputStyleChangedSignal().Connect( tracker, functor );
}
+ else if( 0 == strcmp( signalName.c_str(), SIGNAL_MAX_LENGTH_REACHED ) )
+ {
+ if( editor )
+ {
+ Internal::TextEditor& editorImpl( GetImpl( editor ) );
+ editorImpl.MaxLengthReachedSignal().Connect( tracker, functor );
+ }
+ }
else
{
// signalName does not match any signal
void TextEditor::MaxLengthReached()
{
- // Nothing to do as TextEditor doesn't emit a max length reached signal.
+ Dali::Toolkit::TextEditor handle( GetOwner() );
+ mMaxLengthReachedSignal.Emit( handle );
}
void TextEditor::InputStyleChanged( Text::InputStyle::Mask inputStyleMask )
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/devel-api/controls/scroll-bar/scroll-bar.h>
#include <dali-toolkit/public-api/controls/text-controls/text-editor.h>
+#include <dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h>
#include <dali-toolkit/internal/text/decorator/text-decorator.h>
#include <dali-toolkit/internal/text/text-control-interface.h>
#include <dali-toolkit/internal/text/text-editable-control-interface.h>
InputMethodContext GetInputMethodContext();
/**
+ * @copydoc Dali::Toollkit::TextEditor::MaxLengthReachedSignal()
+ */
+ DevelTextEditor::MaxLengthReachedSignalType& MaxLengthReachedSignal();
+
+ /**
* Connects a callback function with the object's signals.
* @param[in] object The object providing the signal.
* @param[in] tracker Used to disconnect the signal.
Toolkit::TextEditor::TextChangedSignalType mTextChangedSignal;
Toolkit::TextEditor::InputStyleChangedSignalType mInputStyleChangedSignal;
Toolkit::TextEditor::ScrollStateChangedSignalType mScrollStateChangedSignal;
+ Toolkit::DevelTextEditor::MaxLengthReachedSignalType mMaxLengthReachedSignal;
InputMethodContext mInputMethodContext;
Text::ControllerPtr mController;
bool Tooltip::OnHovered( Actor /* actor */, const HoverEvent& hover )
{
- const TouchPoint::State state = hover.points[0].state;
+ const PointState::Type state = hover.GetState( 0 );
switch( state )
{
- case TouchPoint::Started:
- case TouchPoint::Motion:
+ case PointState::STARTED:
+ case PointState::MOTION:
{
if( ! mPopup )
{
if( ! mTooltipTimer )
{
- mHoverPoint = hover.points[ 0 ].screen;
+ mHoverPoint = hover.GetScreenPosition( 0 );
mTooltipTimer = Timer::New( mWaitTime );
mTooltipTimer.TickSignal().Connect( this, &Tooltip::OnTimeout );
mTooltipTimer.Start();
}
else
{
- Vector2 movement = mHoverPoint - hover.points[ 0 ].screen;
+ Vector2 movement = mHoverPoint - hover.GetScreenPosition( 0 );
if( std::abs( movement.Length() ) > mMovementThreshold )
{
mTooltipTimer.Stop();
mTooltipTimer.Reset();
- mHoverPoint = hover.points[ 0 ].screen;
+ mHoverPoint = hover.GetScreenPosition( 0 );
mTooltipTimer = Timer::New( mWaitTime );
mTooltipTimer.TickSignal().Connect( this, &Tooltip::OnTimeout );
mTooltipTimer.Start();
{
// Popup is showing, and we're set to disappear on excessive movement so make sure we're still within the threshold.
- Vector2 movement = mHoverPoint - hover.points[ 0 ].screen;
+ Vector2 movement = mHoverPoint - hover.GetScreenPosition( 0 );
if( std::abs( movement.Length() ) > mMovementThreshold )
{
// Exceeding the threshold, hide the popup.
}
break;
}
- case TouchPoint::Finished:
- case TouchPoint::Leave:
- case TouchPoint::Interrupted:
+ case PointState::FINISHED:
+ case PointState::LEAVE:
+ case PointState::INTERRUPTED:
{
if( mTooltipTimer )
{
break;
}
- case TouchPoint::Stationary:
- case TouchPoint::Last:
+ case PointState::STATIONARY:
{
break;
}
return false; // Accessibility pan gesture is not handled by default
}
-bool Control::OnAccessibilityTouch(const TouchEvent& touchEvent)
+bool Control::OnAccessibilityTouch(const TouchData& touchData)
{
return false; // Accessibility touch event is not handled by default
}
// @todo size negotiate background to new size, animate as well?
}
-bool Control::OnTouchEvent(const TouchEvent& event)
-{
- return false; // Do not consume
-}
-
bool Control::OnHoverEvent(const HoverEvent& event)
{
return false; // Do not consume
virtual void OnSizeAnimation( Animation& animation, const Vector3& targetSize ) override;
/**
- * @copydoc CustomActorImpl::OnTouchEvent()
- */
- virtual bool OnTouchEvent( const TouchEvent& event ) override;
-
- /**
* @copydoc CustomActorImpl::OnHoverEvent()
*/
virtual bool OnHoverEvent( const HoverEvent& event ) override;
* touch event.
*
* @SINCE_1_0.0
- * @param[in] touchEvent The touch event
+ * @param[in] touchData The touch event
* @return true if the touch event has been consumed by this control
*/
- virtual bool OnAccessibilityTouch( const TouchEvent& touchEvent );
+ virtual bool OnAccessibilityTouch( const TouchData& touchData );
/**
* @brief This method should be overridden by deriving classes when they wish to respond
const unsigned int TOOLKIT_MAJOR_VERSION = 1;
const unsigned int TOOLKIT_MINOR_VERSION = 9;
-const unsigned int TOOLKIT_MICRO_VERSION = 24;
+const unsigned int TOOLKIT_MICRO_VERSION = 25;
const char * const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
Name: dali2-toolkit
Summary: Dali 3D engine Toolkit
-Version: 1.9.24
+Version: 1.9.25
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT