#include <dali/public-api/object/type-registry.h>
#include <dali/public-api/object/property-notification.h>
#include <dali/integration-api/debug.h>
+#include <dali/public-api/images/resource-image.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/controls/text-view/text-processor.h>
{
if ( !image )
{
- mGrabHandleImage = Image::New(DEFAULT_GRAB_HANDLE);
+ mGrabHandleImage = ResourceImage::New(DEFAULT_GRAB_HANDLE);
}
else
{
mGrabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
mGrabArea.SetName( "GrabArea" );
mGrabArea.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
- mGrabArea.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint( DEFAULT_GRAB_HANDLE_RELATIVE_SIZE ) ) ); // grab area to be larger than text actor
+ mGrabArea.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mGrabArea.SetSizeModeFactor( DEFAULT_GRAB_HANDLE_RELATIVE_SIZE );
mGrabArea.TouchedSignal().Connect(this,&TextInput::OnPressDown);
mTapDetector.Attach( mGrabArea );
mPanGestureDetector.Attach( mGrabArea );
if ( !mSelectionHandleOne )
{
// create normal and pressed images
- mSelectionHandleOneImage = Image::New( DEFAULT_SELECTION_HANDLE_ONE );
- mSelectionHandleOneImagePressed = Image::New( DEFAULT_SELECTION_HANDLE_ONE_PRESSED );
+ mSelectionHandleOneImage = ResourceImage::New( DEFAULT_SELECTION_HANDLE_ONE );
+ mSelectionHandleOneImagePressed = ResourceImage::New( DEFAULT_SELECTION_HANDLE_ONE_PRESSED );
mSelectionHandleOne = ImageActor::New( mSelectionHandleOneImage );
mSelectionHandleOne.SetName("SelectionHandleOne");
mHandleOneGrabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
mHandleOneGrabArea.SetName("SelectionHandleOneGrabArea");
- mHandleOneGrabArea.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint( DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE ) ) ); // grab area to be larger than text actor
+ mHandleOneGrabArea.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mHandleOneGrabArea.SetSizeModeFactor( DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE );
mHandleOneGrabArea.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
mTapDetector.Attach( mHandleOneGrabArea );
if ( !mSelectionHandleTwo )
{
// create normal and pressed images
- mSelectionHandleTwoImage = Image::New( DEFAULT_SELECTION_HANDLE_TWO );
- mSelectionHandleTwoImagePressed = Image::New( DEFAULT_SELECTION_HANDLE_TWO_PRESSED );
+ mSelectionHandleTwoImage = ResourceImage::New( DEFAULT_SELECTION_HANDLE_TWO );
+ mSelectionHandleTwoImagePressed = ResourceImage::New( DEFAULT_SELECTION_HANDLE_TWO_PRESSED );
mSelectionHandleTwo = ImageActor::New( mSelectionHandleTwoImage );
mSelectionHandleTwo.SetName("SelectionHandleTwo");
mHandleTwoGrabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
mHandleTwoGrabArea.SetName("SelectionHandleTwoGrabArea");
- mHandleTwoGrabArea.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), RelativeToConstraint( DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE ) ) ); // grab area to be larger than text actor
+ mHandleTwoGrabArea.SetSizeMode( SIZE_RELATIVE_TO_PARENT );
+ mHandleTwoGrabArea.SetSizeModeFactor( DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE );
mHandleTwoGrabArea.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
mTapDetector.Attach( mHandleTwoGrabArea );