dummyControl.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
application.GetScene().Add( dummyControl );
- AccessibilityGestureEvent panGestureEvent(AccessibilityGestureEvent::Started);
+ AccessibilityGestureEvent panGestureEvent(AccessibilityGestureEvent::STARTED);
panGestureEvent.previousPosition = Vector2(0.f, 0.f);
panGestureEvent.currentPosition = Vector2(100.f, 0.f);
panGestureEvent.timeDelta = 16;
Test::AccessibilityAdaptor::SendPanGesture( accessibilityAdaptor, panGestureEvent );
- panGestureEvent.state = AccessibilityGestureEvent::Continuing;
+ panGestureEvent.state = AccessibilityGestureEvent::CONTINUING;
panGestureEvent.previousPosition = Vector2(100.f, 0.f);
panGestureEvent.currentPosition = Vector2(200.f, 0.f);
Test::AccessibilityAdaptor::SendPanGesture( accessibilityAdaptor, panGestureEvent );
- panGestureEvent.state = AccessibilityGestureEvent::Finished;
+ panGestureEvent.state = AccessibilityGestureEvent::FINISHED;
panGestureEvent.previousPosition = Vector2(200.f, 0.f);
panGestureEvent.currentPosition = Vector2(300.f, 0.f);
Test::AccessibilityAdaptor::SendPanGesture( accessibilityAdaptor, panGestureEvent );
{
ToolkitTestApplication application;
- // Default, HorizontalCenter, VerticalCenter - Ensure they do not change!
+ // Default, HORIZONTAL_CENTER, VERTICAL_CENTER - Ensure they do not change!
{
Alignment alignment = Alignment::New();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::Type(Alignment::HorizontalCenter | Alignment::VerticalCenter));
+ Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER));
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
}
- // HorizontalLeft, VerticalCenter
+ // HORIZONTAL_LEFT, VERTICAL_CENTER
{
Alignment alignment = Alignment::New();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::HorizontalLeft);
+ Alignment::Type type(Alignment::HORIZONTAL_LEFT);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
}
- // HorizontalRight, VerticalCenter
+ // HORIZONTAL_RIGHT, VERTICAL_CENTER
{
Alignment alignment = Alignment::New();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::HorizontalRight);
+ Alignment::Type type(Alignment::HORIZONTAL_RIGHT);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
}
- // HorizontalLeft, VerticalTop
+ // HORIZONTAL_LEFT, VERTICAL_TOP
{
Alignment alignment = Alignment::New();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::Type(Alignment::HorizontalLeft | Alignment::VerticalTop));
+ Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_LEFT | Alignment::VERTICAL_TOP));
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
}
- // HorizontalCenter, VerticalTop
+ // HORIZONTAL_CENTER, VERTICAL_TOP
{
Alignment alignment = Alignment::New();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::VerticalTop);
+ Alignment::Type type(Alignment::VERTICAL_TOP);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
}
- // HorizontalRight, VerticalTop
+ // HORIZONTAL_RIGHT, VERTICAL_TOP
{
Alignment alignment = Alignment::New();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::Type(Alignment::HorizontalRight | Alignment::VerticalTop));
+ Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_RIGHT | Alignment::VERTICAL_TOP));
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
}
- // HorizontalLeft, VerticalBottom
+ // HORIZONTAL_LEFT, VERTICAL_BOTTOM
{
Alignment alignment = Alignment::New();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::Type(Alignment::HorizontalLeft | Alignment::VerticalBottom));
+ Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_LEFT | Alignment::VERTICAL_BOTTOM));
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
}
- // HorizontalCenter, VerticalBottom
+ // HORIZONTAL_CENTER, VERTICAL_BOTTOM
{
Alignment alignment = Alignment::New();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::VerticalBottom);
+ Alignment::Type type(Alignment::VERTICAL_BOTTOM);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
}
- // HorizontalRight, VerticalBottom
+ // HORIZONTAL_RIGHT, VERTICAL_BOTTOM
{
Alignment alignment = Alignment::New();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::Type(Alignment::HorizontalRight | Alignment::VerticalBottom));
+ Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_RIGHT | Alignment::VERTICAL_BOTTOM));
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
}
{
ToolkitTestApplication application;
- // Default, HorizontalCenter, VerticalCenter - Ensure they do not change!
+ // Default, HORIZONTAL_CENTER, VERTICAL_CENTER - Ensure they do not change!
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
application.SendNotification();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::Type(Alignment::HorizontalCenter | Alignment::VerticalCenter));
+ Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER));
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
application.SendNotification();
}
- // HorizontalLeft, VerticalCenter
+ // HORIZONTAL_LEFT, VERTICAL_CENTER
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
application.SendNotification();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::HorizontalLeft);
+ Alignment::Type type(Alignment::HORIZONTAL_LEFT);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
application.SendNotification();
}
- // HorizontalRight, VerticalCenter
+ // HORIZONTAL_RIGHT, VERTICAL_CENTER
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
application.SendNotification();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::HorizontalRight);
+ Alignment::Type type(Alignment::HORIZONTAL_RIGHT);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
application.SendNotification();
}
- // HorizontalLeft, VerticalTop
+ // HORIZONTAL_LEFT, VERTICAL_TOP
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
application.SendNotification();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::Type(Alignment::HorizontalLeft | Alignment::VerticalTop));
+ Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_LEFT | Alignment::VERTICAL_TOP));
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
application.SendNotification();
}
- // HorizontalCenter, VerticalTop
+ // HORIZONTAL_CENTER, VERTICAL_TOP
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
application.SendNotification();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::VerticalTop);
+ Alignment::Type type(Alignment::VERTICAL_TOP);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
application.SendNotification();
}
- // HorizontalRight, VerticalTop
+ // HORIZONTAL_RIGHT, VERTICAL_TOP
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
application.SendNotification();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::Type(Alignment::HorizontalRight | Alignment::VerticalTop));
+ Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_RIGHT | Alignment::VERTICAL_TOP));
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
application.SendNotification();
}
- // HorizontalLeft, VerticalBottom
+ // HORIZONTAL_LEFT, VERTICAL_BOTTOM
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
application.SendNotification();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::Type(Alignment::HorizontalLeft | Alignment::VerticalBottom));
+ Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_LEFT | Alignment::VERTICAL_BOTTOM));
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
application.SendNotification();
}
- // HorizontalCenter, VerticalBottom
+ // HORIZONTAL_CENTER, VERTICAL_BOTTOM
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
application.SendNotification();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::VerticalBottom);
+ Alignment::Type type(Alignment::VERTICAL_BOTTOM);
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
application.SendNotification();
}
- // HorizontalRight, VerticalBottom
+ // HORIZONTAL_RIGHT, VERTICAL_BOTTOM
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
application.SendNotification();
// Check default values
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
- Alignment::Type type(Alignment::Type(Alignment::HorizontalRight | Alignment::VerticalBottom));
+ Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_RIGHT | Alignment::VERTICAL_BOTTOM));
alignment.SetAlignmentType(type);
DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
{
ToolkitTestApplication application;
- // Setting HorizontalLeft, HorizontalCenter
+ // Setting HORIZONTAL_LEFT, HORIZONTAL_CENTER
{
Alignment alignment = Alignment::New();
- Alignment::Type type(Alignment::Type(Alignment::HorizontalLeft | Alignment::HorizontalCenter));
+ Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_LEFT | Alignment::HORIZONTAL_CENTER));
alignment.SetAlignmentType(type);
// center will prevail in conflict
- DALI_TEST_CHECK( Alignment::HorizontalCenter & alignment.GetAlignmentType() );
- DALI_TEST_CHECK( !(Alignment::HorizontalLeft & alignment.GetAlignmentType()) );
+ DALI_TEST_CHECK( Alignment::HORIZONTAL_CENTER & alignment.GetAlignmentType() );
+ DALI_TEST_CHECK( !(Alignment::HORIZONTAL_LEFT & alignment.GetAlignmentType()) );
}
- // Setting HorizontalCenter, HorizontalRight
+ // Setting HORIZONTAL_CENTER, HORIZONTAL_RIGHT
{
Alignment alignment = Alignment::New();
- Alignment::Type type(Alignment::Type(Alignment::HorizontalCenter | Alignment::HorizontalRight));
+ Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_CENTER | Alignment::HORIZONTAL_RIGHT));
alignment.SetAlignmentType(type);
// center will prevail in conflict
- DALI_TEST_CHECK( Alignment::HorizontalCenter & alignment.GetAlignmentType() );
- DALI_TEST_CHECK( !(Alignment::HorizontalRight & alignment.GetAlignmentType()) );
+ DALI_TEST_CHECK( Alignment::HORIZONTAL_CENTER & alignment.GetAlignmentType() );
+ DALI_TEST_CHECK( !(Alignment::HORIZONTAL_RIGHT & alignment.GetAlignmentType()) );
}
- // Setting VerticalTop, VerticalCenter
+ // Setting VERTICAL_TOP, VERTICAL_CENTER
{
Alignment alignment = Alignment::New();
- Alignment::Type type(Alignment::Type(Alignment::VerticalTop | Alignment::VerticalCenter));
+ Alignment::Type type(Alignment::Type(Alignment::VERTICAL_TOP | Alignment::VERTICAL_CENTER));
alignment.SetAlignmentType(type);
// center will prevail in conflict
- DALI_TEST_CHECK( Alignment::VerticalCenter & alignment.GetAlignmentType() );
- DALI_TEST_CHECK( !(Alignment::VerticalTop & alignment.GetAlignmentType()) );
+ DALI_TEST_CHECK( Alignment::VERTICAL_CENTER & alignment.GetAlignmentType() );
+ DALI_TEST_CHECK( !(Alignment::VERTICAL_TOP & alignment.GetAlignmentType()) );
}
- // Setting VerticalCenter, VerticalBottom
+ // Setting VERTICAL_CENTER, VERTICAL_BOTTOM
{
Alignment alignment = Alignment::New();
- Alignment::Type type(Alignment::Type(Alignment::VerticalTop | Alignment::VerticalBottom));
+ Alignment::Type type(Alignment::Type(Alignment::VERTICAL_TOP | Alignment::VERTICAL_BOTTOM));
alignment.SetAlignmentType(type);
// top will prevail in conflict
- DALI_TEST_CHECK( Alignment::VerticalTop & alignment.GetAlignmentType() );
- DALI_TEST_CHECK( !(Alignment::VerticalBottom & alignment.GetAlignmentType()) );
+ DALI_TEST_CHECK( Alignment::VERTICAL_TOP & alignment.GetAlignmentType() );
+ DALI_TEST_CHECK( !(Alignment::VERTICAL_BOTTOM & alignment.GetAlignmentType()) );
}
END_TEST;
}
{
ToolkitTestApplication application;
- // Default, HorizonalCenter, VerticalCenter
+ // Default, HorizonalCenter, VERTICAL_CENTER
{
Alignment alignment = Alignment::New();
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
}
- // HorizontalLeft, VerticalCenter
+ // HORIZONTAL_LEFT, VERTICAL_CENTER
{
- Alignment alignment = Alignment::New(Alignment::HorizontalLeft);
- DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ Alignment alignment = Alignment::New(Alignment::HORIZONTAL_LEFT);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_LEFT | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
}
- // HorizontalRight, VerticalCenter
+ // HORIZONTAL_RIGHT, VERTICAL_CENTER
{
- Alignment alignment = Alignment::New(Alignment::HorizontalRight);
- DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+ Alignment alignment = Alignment::New(Alignment::HORIZONTAL_RIGHT);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_RIGHT | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
}
- // HorizontalLeft, VerticalTop
+ // HORIZONTAL_LEFT, VERTICAL_TOP
{
- Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalTop);
- DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
+ Alignment alignment = Alignment::New(Alignment::HORIZONTAL_LEFT, Alignment::VERTICAL_TOP);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_LEFT | Alignment::VERTICAL_TOP, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
}
- // HorizontalCenter, VerticalTop
+ // HORIZONTAL_CENTER, VERTICAL_TOP
{
- Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalTop);
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
+ Alignment alignment = Alignment::New(Alignment::HORIZONTAL_CENTER, Alignment::VERTICAL_TOP);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_TOP, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
}
- // HorizontalRight, VerticalTop
+ // HORIZONTAL_RIGHT, VERTICAL_TOP
{
- Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalTop);
- DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
+ Alignment alignment = Alignment::New(Alignment::HORIZONTAL_RIGHT, Alignment::VERTICAL_TOP);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_RIGHT | Alignment::VERTICAL_TOP, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
}
- // HorizontalLeft, VerticalBottom
+ // HORIZONTAL_LEFT, VERTICAL_BOTTOM
{
- Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalBottom);
- DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
+ Alignment alignment = Alignment::New(Alignment::HORIZONTAL_LEFT, Alignment::VERTICAL_BOTTOM);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_LEFT | Alignment::VERTICAL_BOTTOM, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
}
- // HorizontalCenter, VerticalBottom
+ // HORIZONTAL_CENTER, VERTICAL_BOTTOM
{
- Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalBottom);
- DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
+ Alignment alignment = Alignment::New(Alignment::HORIZONTAL_CENTER, Alignment::VERTICAL_BOTTOM);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_BOTTOM, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
application.GetScene().Add(alignment);
application.Render();
application.SendNotification();
}
- // HorizontalRight, VerticalBottom
+ // HORIZONTAL_RIGHT, VERTICAL_BOTTOM
{
- Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalBottom);
- DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
+ Alignment alignment = Alignment::New(Alignment::HORIZONTAL_RIGHT, Alignment::VERTICAL_BOTTOM);
+ DALI_TEST_EQUALS(Alignment::HORIZONTAL_RIGHT | Alignment::VERTICAL_BOTTOM, alignment.GetAlignmentType(), TEST_LOCATION);
alignment.Add(Actor::New());
application.GetScene().Add(alignment);
application.Render();
{
ToolkitTestApplication application;
- // ScaleToFill
+ // SCALE_TO_FILL
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS(Alignment::ScaleNone, alignment.GetScaling(), TEST_LOCATION);
- alignment.SetScaling(Alignment::ScaleToFill);
- DALI_TEST_EQUALS(Alignment::ScaleToFill, alignment.GetScaling(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::SCALE_NONE, alignment.GetScaling(), TEST_LOCATION);
+ alignment.SetScaling(Alignment::SCALE_TO_FILL);
+ DALI_TEST_EQUALS(Alignment::SCALE_TO_FILL, alignment.GetScaling(), TEST_LOCATION);
application.Render();
application.SendNotification();
// For complete line coverage
- alignment.SetAlignmentType(Alignment::HorizontalLeft);
+ alignment.SetAlignmentType(Alignment::HORIZONTAL_LEFT);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::HorizontalRight);
+ alignment.SetAlignmentType(Alignment::HORIZONTAL_RIGHT);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::VerticalTop);
+ alignment.SetAlignmentType(Alignment::VERTICAL_TOP);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::VerticalBottom);
+ alignment.SetAlignmentType(Alignment::VERTICAL_BOTTOM);
application.Render();
application.SendNotification();
application.SendNotification();
}
- // ScaleToFitKeepAspect
+ // SCALE_TO_FIT_KEEP_ASPECT
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS(Alignment::ScaleNone, alignment.GetScaling(), TEST_LOCATION);
- alignment.SetScaling(Alignment::ScaleToFitKeepAspect);
- DALI_TEST_EQUALS(Alignment::ScaleToFitKeepAspect, alignment.GetScaling(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::SCALE_NONE, alignment.GetScaling(), TEST_LOCATION);
+ alignment.SetScaling(Alignment::SCALE_TO_FIT_KEEP_ASPECT);
+ DALI_TEST_EQUALS(Alignment::SCALE_TO_FIT_KEEP_ASPECT, alignment.GetScaling(), TEST_LOCATION);
application.Render();
application.SendNotification();
// For complete line coverage
- alignment.SetAlignmentType(Alignment::HorizontalLeft);
+ alignment.SetAlignmentType(Alignment::HORIZONTAL_LEFT);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::HorizontalRight);
+ alignment.SetAlignmentType(Alignment::HORIZONTAL_RIGHT);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::VerticalTop);
+ alignment.SetAlignmentType(Alignment::VERTICAL_TOP);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::VerticalBottom);
+ alignment.SetAlignmentType(Alignment::VERTICAL_BOTTOM);
application.Render();
application.SendNotification();
application.SendNotification();
}
- // ScaleToFillKeepAspect
+ // SCALE_TO_FILL_KEEP_ASPECT
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS(Alignment::ScaleNone, alignment.GetScaling(), TEST_LOCATION);
- alignment.SetScaling(Alignment::ScaleToFillKeepAspect);
- DALI_TEST_EQUALS(Alignment::ScaleToFillKeepAspect, alignment.GetScaling(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::SCALE_NONE, alignment.GetScaling(), TEST_LOCATION);
+ alignment.SetScaling(Alignment::SCALE_TO_FILL_KEEP_ASPECT);
+ DALI_TEST_EQUALS(Alignment::SCALE_TO_FILL_KEEP_ASPECT, alignment.GetScaling(), TEST_LOCATION);
application.Render();
application.SendNotification();
// For complete line coverage
- alignment.SetAlignmentType(Alignment::HorizontalLeft);
+ alignment.SetAlignmentType(Alignment::HORIZONTAL_LEFT);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::HorizontalRight);
+ alignment.SetAlignmentType(Alignment::HORIZONTAL_RIGHT);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::VerticalTop);
+ alignment.SetAlignmentType(Alignment::VERTICAL_TOP);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::VerticalBottom);
+ alignment.SetAlignmentType(Alignment::VERTICAL_BOTTOM);
application.Render();
application.SendNotification();
application.SendNotification();
}
- // ShrinkToFit
+ // SHRINK_TO_FIT
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS(Alignment::ScaleNone, alignment.GetScaling(), TEST_LOCATION);
- alignment.SetScaling(Alignment::ShrinkToFit);
- DALI_TEST_EQUALS(Alignment::ShrinkToFit, alignment.GetScaling(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::SCALE_NONE, alignment.GetScaling(), TEST_LOCATION);
+ alignment.SetScaling(Alignment::SHRINK_TO_FIT);
+ DALI_TEST_EQUALS(Alignment::SHRINK_TO_FIT, alignment.GetScaling(), TEST_LOCATION);
application.Render();
application.SendNotification();
// For complete line coverage
- alignment.SetAlignmentType(Alignment::HorizontalLeft);
+ alignment.SetAlignmentType(Alignment::HORIZONTAL_LEFT);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::HorizontalRight);
+ alignment.SetAlignmentType(Alignment::HORIZONTAL_RIGHT);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::VerticalTop);
+ alignment.SetAlignmentType(Alignment::VERTICAL_TOP);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::VerticalBottom);
+ alignment.SetAlignmentType(Alignment::VERTICAL_BOTTOM);
application.Render();
application.SendNotification();
application.SendNotification();
}
- // ShrinkToFitKeepAspect
+ // SHRINK_TO_FIT_KEEP_ASPECT
{
Alignment alignment = Alignment::New();
alignment.Add(Actor::New());
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS(Alignment::ScaleNone, alignment.GetScaling(), TEST_LOCATION);
- alignment.SetScaling(Alignment::ShrinkToFitKeepAspect);
- DALI_TEST_EQUALS(Alignment::ShrinkToFitKeepAspect, alignment.GetScaling(), TEST_LOCATION);
+ DALI_TEST_EQUALS(Alignment::SCALE_NONE, alignment.GetScaling(), TEST_LOCATION);
+ alignment.SetScaling(Alignment::SHRINK_TO_FIT_KEEP_ASPECT);
+ DALI_TEST_EQUALS(Alignment::SHRINK_TO_FIT_KEEP_ASPECT, alignment.GetScaling(), TEST_LOCATION);
application.Render();
application.SendNotification();
// For complete line coverage
- alignment.SetAlignmentType(Alignment::HorizontalLeft);
+ alignment.SetAlignmentType(Alignment::HORIZONTAL_LEFT);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::HorizontalRight);
+ alignment.SetAlignmentType(Alignment::HORIZONTAL_RIGHT);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::VerticalTop);
+ alignment.SetAlignmentType(Alignment::VERTICAL_TOP);
application.Render();
application.SendNotification();
- alignment.SetAlignmentType(Alignment::VerticalBottom);
+ alignment.SetAlignmentType(Alignment::VERTICAL_BOTTOM);
application.Render();
application.SendNotification();
{
ToolkitTestApplication application;
- // ScaleToFill
+ // SCALE_TO_FILL
{
Alignment alignment = Alignment::New();
- DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleNone);
+ DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_NONE);
- alignment.SetScaling(Alignment::ScaleToFill);
- DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleToFill);
+ alignment.SetScaling(Alignment::SCALE_TO_FILL);
+ DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_TO_FILL);
}
- // ScaleToFitKeepAspect
+ // SCALE_TO_FIT_KEEP_ASPECT
{
Alignment alignment = Alignment::New();
- DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleNone);
+ DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_NONE);
- alignment.SetScaling(Alignment::ScaleToFitKeepAspect);
- DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleToFitKeepAspect);
+ alignment.SetScaling(Alignment::SCALE_TO_FIT_KEEP_ASPECT);
+ DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_TO_FIT_KEEP_ASPECT);
}
- // ScaleToFillKeepAspect
+ // SCALE_TO_FILL_KEEP_ASPECT
{
Alignment alignment = Alignment::New();
- DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleNone);
+ DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_NONE);
- alignment.SetScaling(Alignment::ScaleToFillKeepAspect);
- DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleToFillKeepAspect);
+ alignment.SetScaling(Alignment::SCALE_TO_FILL_KEEP_ASPECT);
+ DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_TO_FILL_KEEP_ASPECT);
}
- // ShrinkToFit
+ // SHRINK_TO_FIT
{
Alignment alignment = Alignment::New();
- DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleNone);
+ DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_NONE);
- alignment.SetScaling(Alignment::ShrinkToFit);
- DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ShrinkToFit);
+ alignment.SetScaling(Alignment::SHRINK_TO_FIT);
+ DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SHRINK_TO_FIT);
}
- // ShrinkToFitKeepAspect
+ // SHRINK_TO_FIT_KEEP_ASPECT
{
Alignment alignment = Alignment::New();
- DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleNone);
+ DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_NONE);
- alignment.SetScaling(Alignment::ShrinkToFitKeepAspect);
- DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ShrinkToFitKeepAspect);
+ alignment.SetScaling(Alignment::SHRINK_TO_FIT_KEEP_ASPECT);
+ DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SHRINK_TO_FIT_KEEP_ASPECT);
}
END_TEST;
{
ToolkitTestApplication application;
- tet_infoline( "Create an ImageVisual using ScaleToFill and animated vector image ( image: [600,600], view:[600,600] )" );
+ tet_infoline( "Create an ImageVisual using SCALE_TO_FILL and animated vector image ( image: [600,600], view:[600,600] )" );
ImageView imageView = ImageView::New();
Property::Map imageMap;
DALI_TEST_CHECK( scrollBar );
END_TEST;
- ScrollBar vertical = ScrollBar::New(ScrollBar::Vertical);
+ ScrollBar vertical = ScrollBar::New(ScrollBar::VERTICAL);
DALI_TEST_CHECK( vertical );
- DALI_TEST_CHECK( vertical.GetScrollDirection() == ScrollBar::Vertical );
+ DALI_TEST_CHECK( vertical.GetScrollDirection() == ScrollBar::VERTICAL );
Property::Value value = vertical.GetProperty(ScrollBar::Property::SCROLL_DIRECTION);
std::string scrollDirection = value.Get<std::string>();
- DALI_TEST_EQUALS( scrollDirection, "Vertical", TEST_LOCATION );
+ DALI_TEST_EQUALS( scrollDirection, "VERTICAL", TEST_LOCATION );
- ScrollBar horizontal = ScrollBar::New(ScrollBar::Horizontal);
+ ScrollBar horizontal = ScrollBar::New(ScrollBar::HORIZONTAL);
DALI_TEST_CHECK( horizontal );
- DALI_TEST_CHECK( horizontal.GetScrollDirection() == ScrollBar::Horizontal );
+ DALI_TEST_CHECK( horizontal.GetScrollDirection() == ScrollBar::HORIZONTAL );
value = vertical.GetProperty(ScrollBar::Property::SCROLL_DIRECTION);
scrollDirection = value.Get<std::string>();
- DALI_TEST_EQUALS( scrollDirection, "Horizontal", TEST_LOCATION );
+ DALI_TEST_EQUALS( scrollDirection, "HORIZONTAL", TEST_LOCATION );
END_TEST;
}
ScrollBar scrollBar = ScrollBar::DownCast( handle );
DALI_TEST_CHECK( scrollBar );
- scrollBar.SetProperty(ScrollBar::Property::SCROLL_DIRECTION, "Vertical");
- scrollBar.SetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY, "Fixed");
+ scrollBar.SetProperty(ScrollBar::Property::SCROLL_DIRECTION, "VERTICAL");
+ scrollBar.SetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY, "FIXED");
- DALI_TEST_EQUALS( scrollBar.GetScrollDirection(), Toolkit::ScrollBar::Vertical, TEST_LOCATION );
- DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::Fixed, TEST_LOCATION );
+ DALI_TEST_EQUALS( scrollBar.GetScrollDirection(), Toolkit::ScrollBar::VERTICAL, TEST_LOCATION );
+ DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::FIXED, TEST_LOCATION );
- scrollBar.SetProperty(ScrollBar::Property::SCROLL_DIRECTION, "Horizontal");
- scrollBar.SetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY, "Variable");
+ scrollBar.SetProperty(ScrollBar::Property::SCROLL_DIRECTION, "HORIZONTAL");
+ scrollBar.SetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY, "VARIABLE");
- DALI_TEST_EQUALS( scrollBar.GetScrollDirection(), Toolkit::ScrollBar::Horizontal, TEST_LOCATION );
- DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::Variable, TEST_LOCATION );
+ DALI_TEST_EQUALS( scrollBar.GetScrollDirection(), Toolkit::ScrollBar::HORIZONTAL, TEST_LOCATION );
+ DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::VARIABLE, TEST_LOCATION );
END_TEST;
}
ToolkitTestApplication application;
// Create a vertical scroll bar
- ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
+ ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL);
DALI_TEST_CHECK( scrollBar );
- DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::Vertical );
+ DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::VERTICAL );
float scrollBarHeight = 100.0f;
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) );
ToolkitTestApplication application;
// Create a vertical scroll bar
- ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
+ ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL);
DALI_TEST_CHECK( scrollBar );
scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
ToolkitTestApplication application;
// Create a vertical scroll bar
- ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
+ ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL);
DALI_TEST_CHECK( scrollBar );
// Set the values to get notified when the scroll positions of the source actor goes above or below these values
ToolkitTestApplication application;
// Create a vertical scroll bar
- ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
+ ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL);
DALI_TEST_CHECK( scrollBar );
- DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::Vertical );
+ DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::VERTICAL );
// Change the direction of scroll bar to horizontal
- scrollBar.SetScrollDirection(ScrollBar::Horizontal);
- DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::Horizontal );
+ scrollBar.SetScrollDirection(ScrollBar::HORIZONTAL);
+ DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::HORIZONTAL );
END_TEST;
}
DALI_TEST_EQUALS( indicatorHeight, scrollBarHeight * scrollBarHeight / 500.0f, TEST_LOCATION );
// Set the indicator height to be fixed to 50.0f
- scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
+ scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::FIXED);
scrollBar.SetIndicatorFixedHeight(50.0f);
Property::Value value = scrollBar.GetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY);
- DALI_TEST_EQUALS(value.Get<std::string>(), "Fixed", TEST_LOCATION );
+ DALI_TEST_EQUALS(value.Get<std::string>(), "FIXED", TEST_LOCATION );
// Render and notify
application.SendNotification();
DALI_TEST_EQUALS( indicatorHeight, 50.0f, TEST_LOCATION );
// Set the indicator height to be variable
- scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Variable);
+ scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::VARIABLE);
value = scrollBar.GetProperty(ScrollBar::Property::INDICATOR_HEIGHT_POLICY);
- DALI_TEST_EQUALS(value.Get<std::string>(), "Variable", TEST_LOCATION );
+ DALI_TEST_EQUALS(value.Get<std::string>(), "VARIABLE", TEST_LOCATION );
// Render and notify
application.SendNotification();
DALI_TEST_CHECK( scrollBar );
// Set the indicator height to be fixed
- scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
- DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::Fixed, TEST_LOCATION );
+ scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::FIXED);
+ DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::FIXED, TEST_LOCATION );
// Set the indicator height to be variable
- scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Variable);
- DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::Variable, TEST_LOCATION );
+ scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::VARIABLE);
+ DALI_TEST_EQUALS( scrollBar.GetIndicatorHeightPolicy(), Toolkit::ScrollBar::VARIABLE, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( indicator );
// Set the indicator height to be fixed to 50.0f
- scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
+ scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::FIXED);
scrollBar.SetIndicatorFixedHeight(50.0f);
// Render and notify
ToolkitTestApplication application;
// Create a vertical scroll bar
- ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
+ ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL);
DALI_TEST_CHECK( scrollBar );
scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
// Set the indicator height to be fixed to 50.0f
- scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
+ scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::FIXED);
scrollBar.SetIndicatorFixedHeight(50.0f);
application.GetScene().Add( scrollBar );
ToolkitTestApplication application;
// Create a vertical scroll bar
- ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
+ ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL);
DALI_TEST_CHECK( scrollBar );
scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
// Set the indicator height to be fixed to 50.0f
- scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
+ scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::FIXED);
scrollBar.SetIndicatorFixedHeight(50.0f);
application.GetScene().Add( scrollBar );
ToolkitTestApplication application;
// Create a vertical scroll bar
- ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
+ ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL);
DALI_TEST_CHECK( scrollBar );
scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
ToolkitTestApplication application;
// Create a vertical scroll bar
- ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
+ ScrollBar scrollBar = ScrollBar::New(ScrollBar::VERTICAL);
DALI_TEST_CHECK( scrollBar );
scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
Wait(application, RENDER_DELAY_SCROLL);
DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), target, TEST_LOCATION );
- scrollView.ScrollTo( target2, 0.25f, Dali::Toolkit::DirectionBiasLeft, Dali::Toolkit::DirectionBiasLeft );
+ scrollView.ScrollTo( target2, 0.25f, Dali::Toolkit::DIRECTION_BIAS_LEFT, Dali::Toolkit::DIRECTION_BIAS_LEFT );
Wait(application, RENDER_DELAY_SCROLL);
DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), target2, TEST_LOCATION );
Wait(application, RENDER_DELAY_SCROLL);
DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), target, TEST_LOCATION );
- scrollView.ScrollTo( target2, 0.25f, Dali::Toolkit::DirectionBiasRight, Dali::Toolkit::DirectionBiasRight );
+ scrollView.ScrollTo( target2, 0.25f, Dali::Toolkit::DIRECTION_BIAS_RIGHT, Dali::Toolkit::DIRECTION_BIAS_RIGHT );
Wait(application, RENDER_DELAY_SCROLL);
DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), target2, TEST_LOCATION );
Wait(application, RENDER_DELAY_SCROLL);
DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), target, TEST_LOCATION );
- scrollView.ScrollTo( target2, 0.25f, AlphaFunction::LINEAR, Dali::Toolkit::DirectionBiasLeft, Dali::Toolkit::DirectionBiasLeft );
+ scrollView.ScrollTo( target2, 0.25f, AlphaFunction::LINEAR, Dali::Toolkit::DIRECTION_BIAS_LEFT, Dali::Toolkit::DIRECTION_BIAS_LEFT );
Wait(application, RENDER_DELAY_SCROLL);
DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), target2, TEST_LOCATION );
Wait(application, RENDER_DELAY_SCROLL);
DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), target, TEST_LOCATION );
- scrollView.ScrollTo( target2, 0.25f, AlphaFunction::LINEAR, Dali::Toolkit::DirectionBiasRight, Dali::Toolkit::DirectionBiasRight );
+ scrollView.ScrollTo( target2, 0.25f, AlphaFunction::LINEAR, Dali::Toolkit::DIRECTION_BIAS_RIGHT, Dali::Toolkit::DIRECTION_BIAS_RIGHT );
Wait(application, RENDER_DELAY_SCROLL);
DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), target2, TEST_LOCATION );
Wait(application, RENDER_DELAY_SCROLL);
DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), target, TEST_LOCATION );
- scrollView.ScrollTo( target2, 0.25f, TestAlphaFunction, Dali::Toolkit::DirectionBiasRight, Dali::Toolkit::DirectionBiasRight );
+ scrollView.ScrollTo( target2, 0.25f, TestAlphaFunction, Dali::Toolkit::DIRECTION_BIAS_RIGHT, Dali::Toolkit::DIRECTION_BIAS_RIGHT );
Wait(application, 125);
// Check that the scroll animation should finish within just half of the specified duration with the above alpha function
DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), target2, TEST_LOCATION );
scrollView.SetWrapMode(true);
- scrollView.ScrollTo( 0, 0.25, Dali::Toolkit::DirectionBiasLeft );
+ scrollView.ScrollTo( 0, 0.25, Dali::Toolkit::DIRECTION_BIAS_LEFT );
Wait(application, RENDER_FRAME_INTERVAL); // Wait for one frame
// Check that the scroll position remains the same
DALI_TEST_EQUALS( static_cast<int>(scrollView.GetCurrentPage()), 0, TEST_LOCATION );
DALI_TEST_EQUALS( scrollView.GetCurrentScrollPosition(), Vector2(0.0f, 0.0f), TEST_LOCATION );
- scrollView.ScrollTo( 0, 0.25, Dali::Toolkit::DirectionBiasRight );
+ scrollView.ScrollTo( 0, 0.25, Dali::Toolkit::DIRECTION_BIAS_RIGHT );
Wait(application, RENDER_FRAME_INTERVAL); // Wait for one frame
// Check that it scrolls towards the right
Constraint constraint = Constraint::New<Vector3>( scrollView, Actor::Property::POSITION, TestSumConstraint( TEST_CONSTRAINT_OFFSET ) );
constraint.AddSource( Source(scrollView, ScrollView::Property::SCROLL_POSITION) );
- constraint.SetRemoveAction(Constraint::Discard);
+ constraint.SetRemoveAction(Constraint::DISCARD);
scrollView.ApplyConstraintToChildren(constraint);
Wait(application);
// apply this constraint to scrollview
Constraint constraint = Constraint::New<Vector3>( scrollView, Actor::Property::POSITION, TestSumConstraint( TEST_CONSTRAINT_OFFSET ) );
constraint.AddSource( Source(scrollView, ScrollView::Property::SCROLL_POSITION) );
- constraint.SetRemoveAction(Constraint::Discard);
+ constraint.SetRemoveAction(Constraint::DISCARD);
scrollView.ApplyConstraintToChildren(constraint);
Wait(application);
PerformGestureSwipe(application, CLAMP_TOUCH_START, Vector2(0.5f, 0.0f), 60, time, true);
DALI_TEST_CHECK( gOnSnapStartCalled );
- DALI_TEST_CHECK( gLastSnapType == Toolkit::Snap );
+ DALI_TEST_CHECK( gLastSnapType == Toolkit::SNAP );
// Second try a swipe.
PerformGestureSwipe(application, CLAMP_TOUCH_START, Vector2(20.0f, 0.0f), 60, time, true);
DALI_TEST_CHECK( gOnSnapStartCalled );
- DALI_TEST_CHECK( gLastSnapType == Toolkit::Flick );
+ DALI_TEST_CHECK( gLastSnapType == Toolkit::FLICK );
END_TEST;
}
ClampState clamped;
float value = domainX.Clamp(50.0f, 100.0f, 1.0f, clamped);
DALI_TEST_EQUALS( value, 50.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( clamped, Dali::Toolkit::NotClamped, TEST_LOCATION);
+ DALI_TEST_EQUALS( clamped, Dali::Toolkit::NOT_CLAMPED, TEST_LOCATION);
value = domainX.Clamp(-100.0f, 200.0f, 1.0f, clamped);
DALI_TEST_EQUALS( value, 0.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( clamped, Dali::Toolkit::ClampedToMin, TEST_LOCATION);
+ DALI_TEST_EQUALS( clamped, Dali::Toolkit::CLAMPED_TO_MIN, TEST_LOCATION);
value = domainX.Clamp(300.0f, 20.0f, 1.0f, clamped);
DALI_TEST_EQUALS( value, 180.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( clamped, Dali::Toolkit::ClampedToMax, TEST_LOCATION);
+ DALI_TEST_EQUALS( clamped, Dali::Toolkit::CLAMPED_TO_MAX, TEST_LOCATION);
END_TEST;
}
RulerPtr defaultRuler = new DefaultRuler();
DALI_TEST_CHECK( defaultRuler );
- DALI_TEST_EQUALS( defaultRuler->GetType(), Dali::Toolkit::Ruler::Free, TEST_LOCATION);
+ DALI_TEST_EQUALS( defaultRuler->GetType(), Dali::Toolkit::Ruler::FREE, TEST_LOCATION);
RulerPtr fixedRuler = new FixedRuler( 100.0f );
DALI_TEST_CHECK( fixedRuler );
- DALI_TEST_EQUALS( fixedRuler->GetType(), Dali::Toolkit::Ruler::Fixed, TEST_LOCATION);
+ DALI_TEST_EQUALS( fixedRuler->GetType(), Dali::Toolkit::Ruler::FIXED, TEST_LOCATION);
END_TEST;
}
// clamp state testing.
ClampState clamped;
DALI_TEST_EQUALS( ruler->SnapAndClamp(50.0f, 0.5f, 0.0f, 1.0f, clamped), 50.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( clamped, NotClamped, TEST_LOCATION );
+ DALI_TEST_EQUALS( clamped, NOT_CLAMPED, TEST_LOCATION );
DALI_TEST_EQUALS( ruler->SnapAndClamp(30.0f, 0.5f, 0.0f, 1.0f, clamped), 50.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( clamped, NotClamped, TEST_LOCATION );
+ DALI_TEST_EQUALS( clamped, NOT_CLAMPED, TEST_LOCATION );
DALI_TEST_EQUALS( ruler->SnapAndClamp(10.0f, 0.5f, 0.0f, 1.0f, clamped), 0.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( clamped, NotClamped, TEST_LOCATION );
+ DALI_TEST_EQUALS( clamped, NOT_CLAMPED, TEST_LOCATION );
DALI_TEST_EQUALS( ruler->SnapAndClamp(-40.0f, 0.5f, 0.0f, 1.0f, clamped), 0.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( clamped, ClampedToMin, TEST_LOCATION );
+ DALI_TEST_EQUALS( clamped, CLAMPED_TO_MIN, TEST_LOCATION );
DALI_TEST_EQUALS( ruler->SnapAndClamp(390.0f, 0.5f, 0.0f, 1.0f, clamped), 400.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( clamped, NotClamped, TEST_LOCATION );
+ DALI_TEST_EQUALS( clamped, NOT_CLAMPED, TEST_LOCATION );
DALI_TEST_EQUALS( ruler->SnapAndClamp(430.0f, 0.5f, 0.0f, 1.0f, clamped), 400.0f, TEST_LOCATION);
- DALI_TEST_EQUALS( clamped, ClampedToMax, TEST_LOCATION );
+ DALI_TEST_EQUALS( clamped, CLAMPED_TO_MAX, TEST_LOCATION );
END_TEST;
}
Constraint constraint = Constraint::New<Vector3>( scrollView, Actor::Property::POSITION, MoveActorConstraint );
constraint.AddSource( Source(scrollView, ScrollView::Property::SCROLL_POSITION) );
- constraint.SetRemoveAction(Constraint::Discard);
+ constraint.SetRemoveAction(Constraint::DISCARD);
scrollView.ApplyConstraintToChildren(constraint);
scrollView.ScrollTo( target, 0.0f );
constraint.AddSource( Source( scrollView, Toolkit::Scrollable::Property::SCROLL_POSITION_MIN ) );
constraint.AddSource( Source( scrollView, Toolkit::Scrollable::Property::SCROLL_POSITION_MAX ) );
constraint.AddSource( Source( scrollView, Toolkit::ScrollView::Property::WRAP ) );
- constraint.SetRemoveAction(Constraint::Discard);
+ constraint.SetRemoveAction(Constraint::DISCARD);
scrollView.ApplyConstraintToChildren(constraint);
scrollView.ScrollTo( target, 0.0f );
application.SendNotification();
toolbar.Add( control1 );
- toolbar.AddControl( control2, 0.1f, Alignment::HorizontalLeft, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
- toolbar.AddControl( control3, 0.1f, Alignment::HorizontalCenter, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
- toolbar.AddControl( control4, 0.1f, Alignment::HorizontalCenter, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
- toolbar.AddControl( control5, 0.1f, Alignment::HorizontalRight, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
+ toolbar.AddControl( control2, 0.1f, Alignment::HORIZONTAL_LEFT, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
+ toolbar.AddControl( control3, 0.1f, Alignment::HORIZONTAL_CENTER, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
+ toolbar.AddControl( control4, 0.1f, Alignment::HORIZONTAL_CENTER, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
+ toolbar.AddControl( control5, 0.1f, Alignment::HORIZONTAL_RIGHT, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
Actor control6 = CreateColorActor( Color::RED );
control6.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
application.Render();
application.SendNotification();
- toolbar.AddControl( control6, 0.4f, Alignment::HorizontalLeft, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
- toolbar.AddControl( control7, 0.2f, Alignment::HorizontalCenter, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
- toolbar.AddControl( control8, 0.2f, Alignment::HorizontalRight, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
+ toolbar.AddControl( control6, 0.4f, Alignment::HORIZONTAL_LEFT, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
+ toolbar.AddControl( control7, 0.2f, Alignment::HORIZONTAL_CENTER, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
+ toolbar.AddControl( control8, 0.2f, Alignment::HORIZONTAL_RIGHT, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
}
catch( ... )
{
Actor control = CreateColorActor( Color::RED );
ToolBar toolbar = ToolBar::New();
- toolbar.AddControl( control, 0.1f, Alignment::HorizontalLeft );
+ toolbar.AddControl( control, 0.1f, Alignment::HORIZONTAL_LEFT );
toolbar.RemoveControl( control );
}
ToolBar toolbar01 = ToolBar::New();
ToolBar toolbar02 = ToolBar::New();
- toolbar01.AddControl( control01, 0.1f, Alignment::HorizontalLeft );
- toolbar02.AddControl( control02, 0.1f, Alignment::HorizontalLeft );
+ toolbar01.AddControl( control01, 0.1f, Alignment::HORIZONTAL_LEFT );
+ toolbar02.AddControl( control02, 0.1f, Alignment::HORIZONTAL_LEFT );
toolbar02.RemoveControl( control01 );
}
Actor control = CreateColorActor( Color::RED );
ToolBar toolbar = ToolBar::New();
- toolbar.AddControl( control, 0.1f, Alignment::HorizontalLeft );
+ toolbar.AddControl( control, 0.1f, Alignment::HORIZONTAL_LEFT );
toolbar.RemoveControl( control );
toolbar.RemoveControl( control );
* @note The use of scaling property will override all constraints applied to actors.
*
* All actors added to an alignment are going to be set with the same anchor point and parent origin. And if the scaling property is set to a value
- * different than ScaleNone, constraints as well.
+ * different than SCALE_NONE, constraints as well.
*/
class DALI_TOOLKIT_API Alignment : public Control
{
*/
enum Type
{
- HorizontalLeft = 1, ///< Horizontal left alignment @SINCE_1_0.0
- HorizontalCenter = 2, ///< Horizontal center alignment @SINCE_1_0.0
- HorizontalRight = 4, ///< Horizontal right alignment @SINCE_1_0.0
- VerticalTop = 8, ///< Vertical top alignment @SINCE_1_0.0
- VerticalCenter = 16, ///< Vertical center alignment @SINCE_1_0.0
- VerticalBottom = 32 ///< Vertical bottom alignment @SINCE_1_0.0
+ HORIZONTAL_LEFT = 1, ///< HORIZONTAL left alignment @SINCE_1_9.28
+ HORIZONTAL_CENTER = 2, ///< HORIZONTAL center alignment @SINCE_1_9.28
+ HORIZONTAL_RIGHT = 4, ///< HORIZONTAL right alignment @SINCE_1_9.28
+ VERTICAL_TOP = 8, ///< VERTICAL top alignment @SINCE_1_9.28
+ VERTICAL_CENTER = 16, ///< VERTICAL center alignment @SINCE_1_9.28
+ VERTICAL_BOTTOM = 32 ///< VERTICAL bottom alignment @SINCE_1_9.28
};
/**
*/
enum Scaling
{
- ScaleNone, ///< The original size is kept. @SINCE_1_0.0
- ScaleToFill, ///< Scale added actors to fill alignment's boundary. Aspect ratio is not maintained. @SINCE_1_0.0
- ScaleToFitKeepAspect, ///< Scale added actors to fit within the alignment's boundary. Aspect ratio is maintained. @SINCE_1_0.0
- ScaleToFillKeepAspect, ///< Scale added actors to fill the alignment's boundary. Aspect ratio is maintained, and the actor may exceed the alignment's boundary. @SINCE_1_0.0
- ShrinkToFit, ///< If added actors are larger than the alignment's boundary it will be shrunk down to fit. Aspect ratio is not maintained @SINCE_1_0.0
- ShrinkToFitKeepAspect, ///< If added actors are larger than the alignment's boundary it will be shrunk down to fit. Aspect ratio is maintained @SINCE_1_0.0
+ SCALE_NONE, ///< The original size is kept. @SINCE_1_9.28
+ SCALE_TO_FILL, ///< Scale added actors to fill alignment's boundary. Aspect ratio is not maintained. @SINCE_1_9.28
+ SCALE_TO_FIT_KEEP_ASPECT, ///< Scale added actors to fit within the alignment's boundary. Aspect ratio is maintained. @SINCE_1_9.28
+ SCALE_TO_FILL_KEEP_ASPECT, ///< Scale added actors to fill the alignment's boundary. Aspect ratio is maintained, and the actor may exceed the alignment's boundary. @SINCE_1_9.28
+ SHRINK_TO_FIT, ///< If added actors are larger than the alignment's boundary it will be shrunk down to fit. Aspect ratio is not maintained @SINCE_1_9.28
+ SHRINK_TO_FIT_KEEP_ASPECT, ///< If added actors are larger than the alignment's boundary it will be shrunk down to fit. Aspect ratio is maintained @SINCE_1_9.28
};
/**
* @brief Creates an alignment control.
*
* @SINCE_1_0.0
- * @param[in] horizontal Specifies how to align actors horizontally. Could be HorizontalLeft, HorizontalCenter or HorizontalRight. By default, HorizontalCenter
- * @param[in] vertical Specifies how to align actors vertically. Could be VerticalTop, VerticalCenter or VerticalBottom. By default, VerticalCenter
+ * @param[in] horizontal Specifies how to align actors horizontally. Could be HORIZONTAL_LEFT, HORIZONTAL_CENTER or HORIZONTAL_RIGHT. By default, HORIZONTAL_CENTER
+ * @param[in] vertical Specifies how to align actors vertically. Could be VERTICAL_TOP, VERTICAL_CENTER or VERTICAL_BOTTOM. By default, VERTICAL_CENTER
* @return A handle to the Alignment control
*/
- static Alignment New( Type horizontal = HorizontalCenter, Type vertical = VerticalCenter );
+ static Alignment New( Type horizontal = HORIZONTAL_CENTER, Type vertical = VERTICAL_CENTER );
/**
* @brief Copy constructor. Creates another handle that points to the same real object.
static Alignment DownCast( BaseHandle handle );
/**
- * @brief Sets the new alignment. By default, ( HorizontalCenter | VerticalCenter ).
+ * @brief Sets the new alignment. By default, ( HORIZONTAL_CENTER | VERTICAL_CENTER ).
*
* @SINCE_1_0.0
* @param[in] type The new alignment option
/**
* @brief The scrolling direction of the indicator.
* @details Name "scrollDirection", type Property::STRING.
- * Possible values are "Vertical" and "Horizontal".
+ * Possible values are "VERTICAL" and "HORIZONTAL".
* @SINCE_1_0.0
* @see SetScrollDirection()
*/
/**
* @brief The indicator height policy.
* @details Name "indicatorHeightPolicy", type Property::STRING.
- * Possible values are "Variable" and "Fixed".
+ * Possible values are "VARIABLE" and "FIXED".
* @SINCE_1_0.0
* @see SetIndicatorHeightPolicy()
*/
/**
* @brief The padding at the start of the indicator.
* @details Name "indicatorStartPadding", type Property::FLOAT.
- * For example, the padding at the top if scrollDirection is Vertical.
+ * For example, the padding at the top if scrollDirection is VERTICAL.
* @SINCE_1_1.36
*/
INDICATOR_START_PADDING,
/**
* @brief The padding at the end of the indicator.
* @details Name "indicatorEndPadding", type Property::FLOAT.
- * For example, the padding at the bottom if scrollDirection is Vertical.
+ * For example, the padding at the bottom if scrollDirection is VERTICAL.
* @SINCE_1_1.36
*/
INDICATOR_END_PADDING,
*/
enum Direction
{
- Vertical = 0, ///< Scroll in the vertical direction @SINCE_1_0.0
- Horizontal ///< Scroll in the horizontal direction @SINCE_1_0.0
+ VERTICAL = 0, ///< Scroll in the vertical direction @SINCE_1_9.28
+ HORIZONTAL ///< Scroll in the horizontal direction @SINCE_1_9.28
};
/**
*/
enum IndicatorHeightPolicy
{
- Variable = 0, ///< Variable height changed dynamically according to the length of scroll content @SINCE_1_0.0
- Fixed ///< Fixed height regardless of the length of scroll content @SINCE_1_0.0
+ VARIABLE = 0, ///< VARIABLE height changed dynamically according to the length of scroll content @SINCE_1_9.28
+ FIXED ///< FIXED height regardless of the length of scroll content @SINCE_1_9.28
};
/**
* @param[in] direction The direction of scroll bar (either vertically or horizontally)
* @return A pointer to the created ScrollBar
*/
- static ScrollBar New(Direction direction = Vertical);
+ static ScrollBar New(Direction direction = VERTICAL);
/**
* @brief Downcasts a handle to ScrollBar handle.
{
bool handled = false;
- if( panEvent.state == AccessibilityGestureEvent::Started )
+ if( panEvent.state == AccessibilityGestureEvent::STARTED )
{
// Find the focusable actor at the event position
Dali::HitTestAlgorithm::Results results;
// Gesture::Finished (Up) events are delivered with previous (Motion) event position
// Use the real previous position; otherwise we may incorrectly get a ZERO velocity
- if ( AccessibilityGestureEvent::Finished != panEvent.state )
+ if ( AccessibilityGestureEvent::FINISHED != panEvent.state )
{
// Store the previous position for next Gesture::Finished iteration.
mPreviousPosition = panEvent.previousPosition;
switch( horizontalAlignment )
{
- case Dali::Toolkit::Alignment::HorizontalLeft:
+ case Dali::Toolkit::Alignment::HORIZONTAL_LEFT:
{
position.x += padding.left;
break;
}
- case Dali::Toolkit::Alignment::HorizontalRight:
+ case Dali::Toolkit::Alignment::HORIZONTAL_RIGHT:
{
position.x -= padding.right;
break;
}
- case Dali::Toolkit::Alignment::HorizontalCenter: // FALLTHROUGH
+ case Dali::Toolkit::Alignment::HORIZONTAL_CENTER: // FALLTHROUGH
default: // use center as default
{
if( currentSize.width + padding.left + padding.right >= parentSize.width )
switch( verticalAlignment )
{
- case Dali::Toolkit::Alignment::VerticalTop:
+ case Dali::Toolkit::Alignment::VERTICAL_TOP:
{
position.y += padding.top;
break;
}
- case Dali::Toolkit::Alignment::VerticalBottom:
+ case Dali::Toolkit::Alignment::VERTICAL_BOTTOM:
{
position.y -= padding.bottom;
break;
}
- case Dali::Toolkit::Alignment::VerticalCenter: // FALLTHROUGH
+ case Dali::Toolkit::Alignment::VERTICAL_CENTER: // FALLTHROUGH
default: // use center as default
{
if( currentSize.height + padding.top + padding.bottom >= parentSize.height )
void Alignment::SetAlignmentType( Toolkit::Alignment::Type type )
{
// Horizontal Alignment
- if( type & Toolkit::Alignment::HorizontalRight )
+ if( type & Toolkit::Alignment::HORIZONTAL_RIGHT )
{
- mHorizontal = Toolkit::Alignment::HorizontalRight;
+ mHorizontal = Toolkit::Alignment::HORIZONTAL_RIGHT;
}
- if( type & Toolkit::Alignment::HorizontalLeft )
+ if( type & Toolkit::Alignment::HORIZONTAL_LEFT )
{
- mHorizontal = Toolkit::Alignment::HorizontalLeft;
+ mHorizontal = Toolkit::Alignment::HORIZONTAL_LEFT;
}
- if( type & Toolkit::Alignment::HorizontalCenter )
+ if( type & Toolkit::Alignment::HORIZONTAL_CENTER )
{
- mHorizontal = Toolkit::Alignment::HorizontalCenter;
+ mHorizontal = Toolkit::Alignment::HORIZONTAL_CENTER;
}
// Vertical Alignment
- if( type & Toolkit::Alignment::VerticalBottom )
+ if( type & Toolkit::Alignment::VERTICAL_BOTTOM )
{
- mVertical = Toolkit::Alignment::VerticalBottom;
+ mVertical = Toolkit::Alignment::VERTICAL_BOTTOM;
}
- if( type & Toolkit::Alignment::VerticalTop )
+ if( type & Toolkit::Alignment::VERTICAL_TOP )
{
- mVertical = Toolkit::Alignment::VerticalTop;
+ mVertical = Toolkit::Alignment::VERTICAL_TOP;
}
- if( type & Toolkit::Alignment::VerticalCenter )
+ if( type & Toolkit::Alignment::VERTICAL_CENTER )
{
- mVertical = Toolkit::Alignment::VerticalCenter;
+ mVertical = Toolkit::Alignment::VERTICAL_CENTER;
}
RelayoutRequest();
// lay out the actors
Vector3 anchorPointAndParentOrigin = Vector3::ZERO;
anchorPointAndParentOrigin.z = 0.5f;
- // anchorPoint.x is initialized to 0.0, which is HorizontalLeft
- if( Toolkit::Alignment::HorizontalCenter == mHorizontal )
+ // anchorPoint.x is initialized to 0.0, which is HORIZONTAL_LEFT
+ if( Toolkit::Alignment::HORIZONTAL_CENTER == mHorizontal )
{
anchorPointAndParentOrigin.x = 0.5f;
}
- else if( Toolkit::Alignment::HorizontalRight == mHorizontal )
+ else if( Toolkit::Alignment::HORIZONTAL_RIGHT == mHorizontal )
{
anchorPointAndParentOrigin.x = 1.0f;
}
- // anchorPoint.y is initialized to 0.0, which is VerticalTop
- if( Toolkit::Alignment::VerticalCenter == mVertical )
+ // anchorPoint.y is initialized to 0.0, which is VERTICAL_TOP
+ if( Toolkit::Alignment::VERTICAL_CENTER == mVertical )
{
anchorPointAndParentOrigin.y = 0.5f;
}
- else if( Toolkit::Alignment::VerticalBottom == mVertical )
+ else if( Toolkit::Alignment::VERTICAL_BOTTOM == mVertical )
{
anchorPointAndParentOrigin.y = 1.0f;
}
// no point trying to squeeze actors into too small size
switch( mScaling )
{
- case Toolkit::Alignment::ScaleNone:
+ case Toolkit::Alignment::SCALE_NONE:
{
// Nothing to do
renegotiate = false;
break;
}
- case Toolkit::Alignment::ScaleToFill:
+ case Toolkit::Alignment::SCALE_TO_FILL:
{
// Nothing to do, newChildSize is already full size minus padding
break;
}
- case Toolkit::Alignment::ScaleToFitKeepAspect:
+ case Toolkit::Alignment::SCALE_TO_FIT_KEEP_ASPECT:
{
newChildSize = currentChildSize * std::min( ( newChildSize.width / currentChildSize.width ), ( newChildSize.height / currentChildSize.height ) );
break;
}
- case Toolkit::Alignment::ScaleToFillKeepAspect:
+ case Toolkit::Alignment::SCALE_TO_FILL_KEEP_ASPECT:
{
newChildSize = currentChildSize * std::max( ( newChildSize.width / currentChildSize.width ), ( newChildSize.height / currentChildSize.height ) );
break;
}
- case Toolkit::Alignment::ShrinkToFit:
+ case Toolkit::Alignment::SHRINK_TO_FIT:
{
newChildSize = Vector2( std::min( newChildSize.width, currentChildSize.width ), std::min( newChildSize.height, currentChildSize.height ) );
break;
}
- case Toolkit::Alignment::ShrinkToFitKeepAspect:
+ case Toolkit::Alignment::SHRINK_TO_FIT_KEEP_ASPECT:
{
// check source size vs target size to see if we need to shrink
float widthScale = ( newChildSize.width < currentChildSize.width ) ? (newChildSize.width / currentChildSize.width) : 1.f;
: Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ),
mHorizontal( horizontal ),
mVertical( vertical ),
- mScaling( Toolkit::Alignment::ScaleNone ),
+ mScaling( Toolkit::Alignment::SCALE_NONE ),
mPadding( 0.f, 0.f, 0.f, 0.f )
{
}
DALI_TYPE_REGISTRATION_END()
-const char* SCROLL_DIRECTION_NAME[] = {"Vertical", "Horizontal"};
-const char* INDICATOR_HEIGHT_POLICY_NAME[] = {"Variable", "Fixed"};
+const char* SCROLL_DIRECTION_NAME[] = {"VERTICAL", "HORIZONTAL"};
+const char* INDICATOR_HEIGHT_POLICY_NAME[] = {"VARIABLE", "FIXED"};
}
mScrollStart(0.0f),
mGestureDisplacement( Vector3::ZERO ),
mCurrentScrollPosition(0.0f),
- mIndicatorHeightPolicy(Toolkit::ScrollBar::Variable),
+ mIndicatorHeightPolicy(Toolkit::ScrollBar::VARIABLE),
mIndicatorFixedHeight(DEFAULT_INDICATOR_FIXED_HEIGHT),
mIndicatorMinimumHeight(DEFAULT_INDICATOR_MINIMUM_HEIGHT),
mIndicatorStartPadding(DEFAULT_INDICATOR_START_PADDING),
}
// Set indicator height according to the indicator's height policy
- if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed)
+ if(mIndicatorHeightPolicy == Toolkit::ScrollBar::FIXED)
{
mIndicator.SetProperty( Actor::Property::SIZE, Vector2( Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight) );
}
void ScrollBar::OnSizeSet( const Vector3& size )
{
- if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed)
+ if(mIndicatorHeightPolicy == Toolkit::ScrollBar::FIXED)
{
mIndicator.SetProperty( Actor::Property::SIZE, Vector2( size.width, mIndicatorFixedHeight ) );
}
{
mIndicatorFixedHeight = height;
- if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed)
+ if(mIndicatorHeightPolicy == Toolkit::ScrollBar::FIXED)
{
mIndicator.SetProperty( Actor::Property::SIZE, Vector2( Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight) );
}
void ScrollBar::OnScrollDirectionPropertySet( Property::Value propertyValue )
{
std::string directionName( propertyValue.Get<std::string>() );
- if(directionName == "Vertical")
+ if(directionName == "VERTICAL")
{
- SetScrollDirection(Toolkit::ScrollBar::Vertical);
+ SetScrollDirection(Toolkit::ScrollBar::VERTICAL);
}
- else if(directionName == "Horizontal")
+ else if(directionName == "HORIZONTAL")
{
- SetScrollDirection(Toolkit::ScrollBar::Horizontal);
+ SetScrollDirection(Toolkit::ScrollBar::HORIZONTAL);
}
else
{
void ScrollBar::OnIndicatorHeightPolicyPropertySet( Property::Value propertyValue )
{
std::string policyName( propertyValue.Get<std::string>() );
- if(policyName == "Variable")
+ if(policyName == "VARIABLE")
{
- SetIndicatorHeightPolicy(Toolkit::ScrollBar::Variable);
+ SetIndicatorHeightPolicy(Toolkit::ScrollBar::VARIABLE);
}
- else if(policyName == "Fixed")
+ else if(policyName == "FIXED")
{
- SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
+ SetIndicatorHeightPolicy(Toolkit::ScrollBar::FIXED);
}
else
{
// Color constraint
constraint = Constraint::New< Vector4 >( actor, Actor::Property::COLOR, DepthColorConstraint( itemId, mImpl->mNumberOfColumns, mImpl->mNumberOfRows*0.5f, itemId % mImpl->mNumberOfColumns ) );
constraint.AddSource( ParentSource( Toolkit::ItemView::Property::LAYOUT_POSITION ) );
- constraint.SetRemoveAction( Dali::Constraint::Discard );
+ constraint.SetRemoveAction( Dali::Constraint::DISCARD );
constraint.Apply();
// Visibility constraint
constraint = Constraint::New< bool >( actor, Actor::Property::VISIBLE, DepthVisibilityConstraint( itemId, mImpl->mNumberOfColumns, mImpl->mNumberOfRows*0.5f, itemId % mImpl->mNumberOfColumns ) );
constraint.AddSource( ParentSource( Toolkit::ItemView::Property::LAYOUT_POSITION ) );
- constraint.SetRemoveAction( Dali::Constraint::Discard );
+ constraint.SetRemoveAction( Dali::Constraint::DISCARD );
constraint.Apply();
}
}
// Color constraint
constraint = Constraint::New< Vector4 >( actor, Actor::Property::COLOR, &GridColorConstraint );
- constraint.SetRemoveAction( Dali::Constraint::Discard );
+ constraint.SetRemoveAction( Dali::Constraint::DISCARD );
constraint.Apply();
// Visibility constraint
}
constraint.AddSource( ParentSource( Toolkit::ItemView::Property::LAYOUT_POSITION ) );
constraint.AddSource( ParentSource( Actor::Property::SIZE ) );
- constraint.SetRemoveAction( Dali::Constraint::Discard );
+ constraint.SetRemoveAction( Dali::Constraint::DISCARD );
constraint.Apply();
}
}
// Color constraint
constraint = Constraint::New< Vector4 >( actor, Actor::Property::COLOR, SpiralColorConstraint( itemId, mImpl->mItemSpacingRadians ) );
constraint.AddSource( ParentSource( Toolkit::ItemView::Property::LAYOUT_POSITION ) );
- constraint.SetRemoveAction(Dali::Constraint::Discard);
+ constraint.SetRemoveAction(Dali::Constraint::DISCARD);
constraint.Apply();
// Visibility constraint
}
constraint.AddSource( ParentSource( Toolkit::ItemView::Property::LAYOUT_POSITION ) );
constraint.AddSource( ParentSource( Actor::Property::SIZE ) );
- constraint.SetRemoveAction(Dali::Constraint::Discard);
+ constraint.SetRemoveAction(Dali::Constraint::DISCARD);
constraint.Apply();
}
}
increaseStep = MAX_OVERSHOOT_NOTIFY_AMOUNT;
}
mOvershootIncreaseNotification = self.AddPropertyNotification( mOvershootProperty, OutsideCondition(-increaseStep, increaseStep) );
- mOvershootIncreaseNotification.SetNotifyMode(PropertyNotification::NotifyOnTrue);
+ mOvershootIncreaseNotification.SetNotifyMode(PropertyNotification::NOTIFY_ON_TRUE);
mOvershootIncreaseNotification.NotifySignal().Connect(this, &ScrollOvershootEffectRipple::OnOvershootNotification);
}
reduceStep = MIN_OVERSHOOT_NOTIFY_AMOUNT;
}
mOvershootDecreaseNotification = self.AddPropertyNotification( mOvershootProperty, InsideCondition(-reduceStep, reduceStep) );
- mOvershootDecreaseNotification.SetNotifyMode(PropertyNotification::NotifyOnTrue);
+ mOvershootDecreaseNotification.SetNotifyMode(PropertyNotification::NOTIFY_ON_TRUE);
mOvershootDecreaseNotification.NotifySignal().Connect(this, &ScrollOvershootEffectRipple::OnOvershootNotification);
}
}
*/
float VectorInDomain(float a, float b, float start, float end, Dali::Toolkit::DirectionBias bias)
{
- if(bias == Dali::Toolkit::DirectionBiasNone)
+ if(bias == Dali::Toolkit::DIRECTION_BIAS_NONE)
{
return ShortestDistanceInDomain( a, b, start, end );
}
if(vect > 0)
{
// +ve vector
- if(bias == Dali::Toolkit::DirectionBiasRight) // going right, take the vector.
+ if(bias == Dali::Toolkit::DIRECTION_BIAS_RIGHT) // going right, take the vector.
{
return vect;
}
else
{
// -ve vector
- if(bias == Dali::Toolkit::DirectionBiasLeft) // going left, take the vector.
+ if(bias == Dali::Toolkit::DIRECTION_BIAS_LEFT) // going left, take the vector.
{
return vect;
}
mDomainMax = Vector2( -rulerDomainX.max, -rulerDomainY.max );
mClampX = rulerDomainX.enabled;
mClampY = rulerDomainY.enabled;
- mFixedRulerX = rulerX->GetType() == Ruler::Fixed;
- mFixedRulerY = rulerY->GetType() == Ruler::Fixed;
+ mFixedRulerX = rulerX->GetType() == Ruler::FIXED;
+ mFixedRulerY = rulerY->GetType() == Ruler::FIXED;
}
void operator()( Vector2& scrollPostPosition, const PropertyInputContainer& inputs )
true,
horizontalBias,
verticalBias,
- Snap);
+ SNAP);
if(!animating)
{
void ScrollView::ScrollTo(const Vector2& position, float duration)
{
- ScrollTo(position, duration, DirectionBiasNone, DirectionBiasNone);
+ ScrollTo(position, duration, DIRECTION_BIAS_NONE, DIRECTION_BIAS_NONE);
}
void ScrollView::ScrollTo(const Vector2& position, float duration, AlphaFunction alpha)
{
- ScrollTo(position, duration, alpha, DirectionBiasNone, DirectionBiasNone);
+ ScrollTo(position, duration, alpha, DIRECTION_BIAS_NONE, DIRECTION_BIAS_NONE);
}
void ScrollView::ScrollTo(const Vector2& position, float duration,
Vector2 clampDelta(Vector2::ZERO);
ClampPosition(positionSnap);
- if( (mRulerX->GetType() == Ruler::Free || mRulerY->GetType() == Ruler::Free)
+ if( (mRulerX->GetType() == Ruler::FREE || mRulerY->GetType() == Ruler::FREE)
&& isFreeFlick && !mActorAutoSnapEnabled)
{
// Calculate target position based on velocity of flick.
float t = speed / a;
- if(mRulerX->IsEnabled() && mRulerX->GetType() == Ruler::Free)
+ if(mRulerX->IsEnabled() && mRulerX->GetType() == Ruler::FREE)
{
positionSnap.x += t*u.x*0.5f;
}
- if(mRulerY->IsEnabled() && mRulerY->GetType() == Ruler::Free)
+ if(mRulerY->IsEnabled() && mRulerY->GetType() == Ruler::FREE)
{
positionSnap.y += t*u.y*0.5f;
}
// If Axis is Free and has velocity, then calculate time taken
// to reach target based on velocity in axis.
- if(mRulerX->IsEnabled() && mRulerX->GetType() == Ruler::Free)
+ if(mRulerX->IsEnabled() && mRulerX->GetType() == Ruler::FREE)
{
float deltaX = fabsf(startPosition.x - positionSnap.x);
}
}
- if(mRulerY->IsEnabled() && mRulerY->GetType() == Ruler::Free)
+ if(mRulerY->IsEnabled() && mRulerY->GetType() == Ruler::FREE)
{
float deltaY = fabsf(startPosition.y - positionSnap.y);
bool animating = AnimateTo(positionSnap, positionDuration,
alphaFunction, false,
- DirectionBiasNone, DirectionBiasNone,
- isFlick || isFreeFlick ? Flick : Snap);
+ DIRECTION_BIAS_NONE, DIRECTION_BIAS_NONE,
+ isFlick || isFreeFlick ? FLICK : SNAP);
return animating;
}
scrollBar.SetProperty( Dali::Actor::Property::NAME,"ScrollBar");
mInternalActor.Add( scrollBar );
- if( scrollBar.GetScrollDirection() == Toolkit::ScrollBar::Horizontal )
+ if( scrollBar.GetScrollDirection() == Toolkit::ScrollBar::HORIZONTAL )
{
scrollBar.SetScrollPropertySource( Self(),
Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_X,
if(mRulerX->IsEnabled() && !mRulerY->IsEnabled())
{
// If only the ruler in the X axis is enabled, scroll in the X axis.
- if(mRulerX->GetType() == Ruler::Free)
+ if(mRulerX->GetType() == Ruler::FREE)
{
// Free panning mode
targetScrollPosition.x += event.GetDelta() * mWheelScrollDistanceStep.x;
else
{
// If the ruler in the Y axis is enabled, scroll in the Y axis.
- if(mRulerY->GetType() == Ruler::Free)
+ if(mRulerY->GetType() == Ruler::FREE)
{
// Free panning mode
targetScrollPosition.y += event.GetDelta() * mWheelScrollDistanceStep.y;
// MoveActor (scrolling)
constraint = Constraint::New<Vector3>( self, Actor::Property::POSITION, MoveActorConstraint );
constraint.AddSource( Source( self, Toolkit::ScrollView::Property::SCROLL_POSITION ) );
- constraint.SetRemoveAction(Constraint::Discard);
+ constraint.SetRemoveAction(Constraint::DISCARD);
ApplyConstraintToBoundActors(constraint);
// WrapActor (wrap functionality)
constraint.AddSource( Source( self, Toolkit::Scrollable::Property::SCROLL_POSITION_MIN ) );
constraint.AddSource( Source( self, Toolkit::Scrollable::Property::SCROLL_POSITION_MAX ) );
constraint.AddSource( Source( self, Toolkit::ScrollView::Property::WRAP ) );
- constraint.SetRemoveAction(Constraint::Discard);
+ constraint.SetRemoveAction(Constraint::DISCARD);
ApplyConstraintToBoundActors(constraint);
}
* @copydoc ScrollTo(const Vector2&)
*/
void TransformTo(const Vector2& position,
- DirectionBias horizontalBias = DirectionBiasNone, DirectionBias verticalBias = DirectionBiasNone);
+ DirectionBias horizontalBias = DIRECTION_BIAS_NONE, DirectionBias verticalBias = DIRECTION_BIAS_NONE);
/**
* @copydoc ScrollTo(const Vector2&, float, AlhpaFunction, DirectionBias, DirectionBias)
*/
void TransformTo(const Vector2& position, float duration, AlphaFunction alpha,
- DirectionBias horizontalBias = DirectionBiasNone, DirectionBias verticalBias = DirectionBiasNone);
+ DirectionBias horizontalBias = DIRECTION_BIAS_NONE, DirectionBias verticalBias = DIRECTION_BIAS_NONE);
/**
* @copydoc Toolkit::ScrollView::ScrollTo(const Vector2 &position)
/**
* @copydoc Toolkit::ScrollView::ScrollTo(unsigned int page, float duration, DirectionBias bias)
*/
- void ScrollTo(unsigned int page, float duration, DirectionBias bias = DirectionBiasNone);
+ void ScrollTo(unsigned int page, float duration, DirectionBias bias = DIRECTION_BIAS_NONE);
/**
* @copydoc Toolkit::ScrollView::ScrollTo(Actor& actor)
*/
bool AnimateTo(const Vector2& position, const Vector2& positionDuration,
AlphaFunction alpha, bool findShortcuts = true,
- DirectionBias horizontalBias = DirectionBiasNone, DirectionBias verticalBias = DirectionBiasNone,
- SnapType snapType = Snap);
+ DirectionBias horizontalBias = DIRECTION_BIAS_NONE, DirectionBias verticalBias = DIRECTION_BIAS_NONE,
+ SnapType snapType = SNAP);
/**
* @copydoc Toolkit::Scrollable::AddOverlay()
CustomActor self = Self();
if( !mScrollBar )
{
- mScrollBar = Toolkit::ScrollBar::New( Toolkit::ScrollBar::Vertical );
- mScrollBar.SetIndicatorHeightPolicy( Toolkit::ScrollBar::Variable );
+ mScrollBar = Toolkit::ScrollBar::New( Toolkit::ScrollBar::VERTICAL );
+ mScrollBar.SetIndicatorHeightPolicy( Toolkit::ScrollBar::VARIABLE );
mScrollBar.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT );
mScrollBar.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT );
mScrollBar.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
indicator.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
indicator.SetStyleName( "TextSelectionScrollIndicator" );
- mScrollBar = Toolkit::ScrollBar::New( Toolkit::ScrollBar::Horizontal );
+ mScrollBar = Toolkit::ScrollBar::New( Toolkit::ScrollBar::HORIZONTAL );
mScrollBar.SetProperty( Dali::Actor::Property::NAME, "Text popup scroll bar" );
mScrollBar.SetStyleName( "TextSelectionScrollBar" );
mScrollBar.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT );
DALI_TYPE_REGISTRATION_END()
const float DEFAULT_RELATIVE_SIZE( 0.1f );
-const Toolkit::Alignment::Type DEFAULT_ALIGNMENT( Toolkit::Alignment::HorizontalLeft );
+const Toolkit::Alignment::Type DEFAULT_ALIGNMENT( Toolkit::Alignment::HORIZONTAL_LEFT );
} // namespace
Toolkit::ToolBar ToolBar::New()
unsigned int index = 0;
switch( alignment )
{
- case Toolkit::Alignment::HorizontalLeft:
+ case Toolkit::Alignment::HORIZONTAL_LEFT:
{
index = mLeftOffset;
++mLeftOffset;
++mRightBase;
break;
}
- case Toolkit::Alignment::HorizontalCenter:
+ case Toolkit::Alignment::HORIZONTAL_CENTER:
{
index = mCenterBase + mCenterOffset;
++mCenterOffset;
++mRightBase;
break;
}
- case Toolkit::Alignment::HorizontalRight:
+ case Toolkit::Alignment::HORIZONTAL_RIGHT:
{
index = mRightBase - mRightOffset;
++mRightBase;
// Update spaces between left, center and right groups of controls.
switch( alignment )
{
- case Toolkit::Alignment::HorizontalLeft:
+ case Toolkit::Alignment::HORIZONTAL_LEFT:
{
mLeftRelativeSpace -= relativeSize;
if ( mLeftRelativeSpace < 0.f )
}
break;
}
- case Toolkit::Alignment::HorizontalCenter:
+ case Toolkit::Alignment::HORIZONTAL_CENTER:
{
mLeftRelativeSpace -= 0.5f * relativeSize;
if ( mLeftRelativeSpace < 0.f )
}
break;
}
- case Toolkit::Alignment::HorizontalRight:
+ case Toolkit::Alignment::HORIZONTAL_RIGHT:
{
mRightRelativeSpace -= relativeSize;
if ( mRightRelativeSpace < 0.f )
// Update spaces between left, center and right groups of controls.
if( 1.0 > mAccumulatedRelativeSpace )
{
- Toolkit::Alignment::Type alignment = Toolkit::Alignment::HorizontalLeft;
+ Toolkit::Alignment::Type alignment = Toolkit::Alignment::HORIZONTAL_LEFT;
if( position.columnIndex < mLeftOffset )
{
- alignment = Toolkit::Alignment::HorizontalLeft;
+ alignment = Toolkit::Alignment::HORIZONTAL_LEFT;
}
else if( ( position.columnIndex > mLeftOffset ) && ( position.columnIndex < mCenterBase + mCenterOffset ) )
{
- alignment = Toolkit::Alignment::HorizontalCenter;
+ alignment = Toolkit::Alignment::HORIZONTAL_CENTER;
}
else if( position.columnIndex > mCenterBase + mCenterOffset )
{
- alignment = Toolkit::Alignment::HorizontalRight;
+ alignment = Toolkit::Alignment::HORIZONTAL_RIGHT;
}
else
{
switch( alignment )
{
- case Toolkit::Alignment::HorizontalLeft:
+ case Toolkit::Alignment::HORIZONTAL_LEFT:
{
mLeftRelativeSpace += relativeSize;
if ( mLeftRelativeSpace < 0.f )
}
break;
}
- case Toolkit::Alignment::HorizontalCenter:
+ case Toolkit::Alignment::HORIZONTAL_CENTER:
{
mLeftRelativeSpace += 0.5f * relativeSize;
if ( mLeftRelativeSpace < 0.f )
}
break;
}
- case Toolkit::Alignment::HorizontalRight:
+ case Toolkit::Alignment::HORIZONTAL_RIGHT:
{
mRightRelativeSpace += relativeSize;
if ( mRightRelativeSpace < 0.f )
LessThanCondition( mBoundingBox.y + topHeight ) );
// Notifies the change from false to true and from true to false.
- mHandleVerticalLessThanNotification.SetNotifyMode( PropertyNotification::NotifyOnChanged );
+ mHandleVerticalLessThanNotification.SetNotifyMode( PropertyNotification::NOTIFY_ON_CHANGED );
// Connects the signals with the callbacks.
mHandleVerticalLessThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
GreaterThanCondition( mBoundingBox.w - bottomHeight ) );
// Notifies the change from false to true and from true to false.
- mHandleVerticalGreaterThanNotification.SetNotifyMode( PropertyNotification::NotifyOnChanged );
+ mHandleVerticalGreaterThanNotification.SetNotifyMode( PropertyNotification::NOTIFY_ON_CHANGED );
// Connects the signals with the callbacks.
mHandleVerticalGreaterThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
LessThanCondition( mBoundingBox.y + topHeight ) );
// Notifies the change from false to true and from true to false.
- mHandleVerticalLessThanNotification.SetNotifyMode( PropertyNotification::NotifyOnChanged );
+ mHandleVerticalLessThanNotification.SetNotifyMode( PropertyNotification::NOTIFY_ON_CHANGED );
// Connects the signals with the callbacks.
mHandleVerticalLessThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
GreaterThanCondition( mBoundingBox.w - bottomHeight ) );
// Notifies the change from false to true and from true to false.
- mHandleVerticalGreaterThanNotification.SetNotifyMode( PropertyNotification::NotifyOnChanged );
+ mHandleVerticalGreaterThanNotification.SetNotifyMode( PropertyNotification::NOTIFY_ON_CHANGED );
// Connects the signals with the callbacks.
mHandleVerticalGreaterThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
LessThanCondition( mBoundingBox.y + topHeight ) );
// Notifies the change from false to true and from true to false.
- mHandleVerticalLessThanNotification.SetNotifyMode( PropertyNotification::NotifyOnChanged );
+ mHandleVerticalLessThanNotification.SetNotifyMode( PropertyNotification::NOTIFY_ON_CHANGED );
// Connects the signals with the callbacks.
mHandleVerticalLessThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
GreaterThanCondition( mBoundingBox.w - bottomHeight ) );
// Notifies the change from false to true and from true to false.
- mHandleVerticalGreaterThanNotification.SetNotifyMode( PropertyNotification::NotifyOnChanged );
+ mHandleVerticalGreaterThanNotification.SetNotifyMode( PropertyNotification::NOTIFY_ON_CHANGED );
// Connects the signals with the callbacks.
mHandleVerticalGreaterThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
LessThanCondition( mBoundingBox.x + leftWidth ) );
// Notifies the change from false to true and from true to false.
- mHandleHorizontalLessThanNotification.SetNotifyMode( PropertyNotification::NotifyOnChanged );
+ mHandleHorizontalLessThanNotification.SetNotifyMode( PropertyNotification::NOTIFY_ON_CHANGED );
// Connects the signals with the callbacks.
mHandleHorizontalLessThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
GreaterThanCondition( mBoundingBox.z - rightWidth ) );
// Notifies the change from false to true and from true to false.
- mHandleHorizontalGreaterThanNotification.SetNotifyMode( PropertyNotification::NotifyOnChanged );
+ mHandleHorizontalGreaterThanNotification.SetNotifyMode( PropertyNotification::NOTIFY_ON_CHANGED );
// Connects the signals with the callbacks.
mHandleHorizontalGreaterThanNotification.NotifySignal().Connect( this, &Decorator::Impl::HandleResetPosition );
GreaterThanCondition( mBoundingBox.w - popupHalfSize.height ) );
// Notifies the change from false to true and from true to false.
- mPopupTopExceedNotification.SetNotifyMode( PropertyNotification::NotifyOnChanged );
- mPopupBottomExceedNotification.SetNotifyMode( PropertyNotification::NotifyOnChanged );
+ mPopupTopExceedNotification.SetNotifyMode( PropertyNotification::NOTIFY_ON_CHANGED );
+ mPopupBottomExceedNotification.SetNotifyMode( PropertyNotification::NOTIFY_ON_CHANGED );
mPopupTopExceedNotification.NotifySignal().Connect( this, &Decorator::Impl::PopUpLeavesTopBoundary );
mPopupBottomExceedNotification.NotifySignal().Connect( this, &Decorator::Impl::PopUpLeavesBottomBoundary );
return false;
}
- // Set the line position. Discard if ellipsis is enabled and the position exceeds the boundaries
+ // Set the line position. DISCARD if ellipsis is enabled and the position exceeds the boundaries
// of the box.
penY += layout.ascender;
mImpl->mEventData->mRightSelectionPosition = mImpl->mEventData->mPrimaryCursorPosition;
}
- // Discard temporary text
+ // DISCARD temporary text
events.Clear();
}
/**
* @brief Get the alignment string from the provided alignment string.
- * @param[in] alignment the Text::Horizontal enum source
+ * @param[in] alignment the Text::HORIZONTAL enum source
* @return the string equivalent
*/
const char* GetHorizontalAlignmentString( const Toolkit::Text::HorizontalAlignment::Type& alignment );
{
if(!enabled)
{
- clamped = NotClamped;
+ clamped = NOT_CLAMPED;
return x;
}
const float maxExtent = max * scale - length;
if(x < minExtent)
{
- clamped = ClampedToMin;
+ clamped = CLAMPED_TO_MIN;
return minExtent;
}
else if(x > maxExtent)
{
- clamped = ClampedToMax;
+ clamped = CLAMPED_TO_MAX;
return maxExtent;
}
- clamped = NotClamped;
+ clamped = NOT_CLAMPED;
return x;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
Ruler::Ruler()
-: mType(Free),
+: mType(FREE),
mEnabled(true),
mDomain(RulerDomain(0.0f,1.0f,false))
{
DefaultRuler::DefaultRuler()
{
- mType = Free;
+ mType = FREE;
}
float DefaultRuler::Snap(float x, float bias) const
DALI_LOG_ERROR( "Page spacing too small (%f).\n", double(spacing) );
mSpacing = spacing >= 0.0f ? Math::MACHINE_EPSILON_1 : -Math::MACHINE_EPSILON_1;
}
- mType = Fixed;
+ mType = FIXED;
}
float FixedRuler::Snap(float x, float bias) const
*/
enum ClampState
{
- NotClamped, ///< The quantity isn't clamped @SINCE_1_0.0
- ClampedToMin, ///< The quantity is clamped to the min value @SINCE_1_0.0
- ClampedToMax ///< The quantity is clamped to the max value @SINCE_1_0.0
+ NOT_CLAMPED, ///< The quantity isn't clamped @SINCE_1_9.28
+ CLAMPED_TO_MIN, ///< The quantity is clamped to the min value @SINCE_1_9.28
+ CLAMPED_TO_MAX ///< The quantity is clamped to the max value @SINCE_1_9.28
};
/**
*/
enum SnapType
{
- Snap, ///< Snap @SINCE_1_0.0
- Flick ///< Flick @SINCE_1_0.0
+ SNAP, ///< SNAP @SINCE_1_9.28
+ FLICK ///< FLICK @SINCE_1_9.28
};
/**
*/
enum DirectionBias
{
- DirectionBiasLeft = -1, ///< Bias scroll snap to Left @SINCE_1_0.0
- DirectionBiasNone = 0, ///< Don't bias scroll snap @SINCE_1_0.0
- DirectionBiasRight = 1 ///< Bias scroll snap to Right @SINCE_1_0.0
+ DIRECTION_BIAS_LEFT = -1, ///< Bias scroll snap to Left @SINCE_1_9.28
+ DIRECTION_BIAS_NONE = 0, ///< Don't bias scroll snap @SINCE_1_9.28
+ DIRECTION_BIAS_RIGHT = 1 ///< Bias scroll snap to Right @SINCE_1_9.28
};
/**
* @SINCE_1_0.0
*/
enum RulerType {
- Fixed, ///< A fixed ruler @SINCE_1_0.0
- Free ///< A free ruler @SINCE_1_0.0
+ FIXED, ///< A fixed ruler @SINCE_1_9.28
+ FREE ///< A free ruler @SINCE_1_9.28
};
public:
protected:
- RulerType mType; ///< Type of Ruler (Fixed or Free).
+ RulerType mType; ///< Type of Ruler (FIXED or FREE).
bool mEnabled; ///< If the ruler is enabled.
RulerDomain mDomain; ///< The domain of the ruler.