build
build.log
tct*core.h
+results_xml.*
if [[ $? -eq 0 ]]
then
lcov $LCOV_OPTS --directory . -c -o dali.info
- lcov $LCOV_OPTS --remove dali.info "*boost*" "/usr/include/*" "*/automated-tests/*" -o dali.info
+ lcov $LCOV_OPTS --remove dali.info "/usr/include/*" "*/automated-tests/*" "*/dali-env/*" -o dali.info
+ if [ ! -s dali.info ]
+ then
+ rm -f dali.info
+ fi
fi
)
done
FILE=$2
fi
-#Debug needs to be output on stderr ( calling script redirects stdout to file )
#echo "Dir: $DIR File: $FILE" >& 2
+
# populate $TC_FILES with files declared in CMakeLists.txt
if [[ -z $FILE ]]; then
get_tc_files $DIR
utc-Dali-ControlImpl.cpp
utc-Dali-DefaultControls.cpp
utc-Dali-DissolveEffect.cpp
- utc-Dali-FocusManager.cpp
+ utc-Dali-AccessibilityFocusManager.cpp
utc-Dali-IrisEffect.cpp
utc-Dali-ItemLayout.cpp
utc-Dali-ItemView.cpp
sizeAnimationCalled(false),
touchEventCalled(false),
hoverEventCalled(false),
- mouseWheelEventCalled(false),
+ wheelEventCalled(false),
keyEventCalled(false),
keyInputFocusGained(false),
keyInputFocusLost(false)
void DummyControlImplOverride::OnSizeAnimation(Animation& animation, const Vector3& targetSize) { sizeAnimationCalled = true; }
bool DummyControlImplOverride::OnTouchEvent(const TouchEvent& event) { touchEventCalled = true; return false; }
bool DummyControlImplOverride::OnHoverEvent(const HoverEvent& event) { hoverEventCalled = true; return false; }
-bool DummyControlImplOverride::OnMouseWheelEvent(const MouseWheelEvent& event) { mouseWheelEventCalled = true; return false; }
+bool DummyControlImplOverride::OnWheelEvent(const WheelEvent& event) { wheelEventCalled = true; return false; }
bool DummyControlImplOverride::OnKeyEvent(const KeyEvent& event) { keyEventCalled = true; return false;}
void DummyControlImplOverride::OnKeyInputFocusGained() { keyInputFocusGained = true; }
void DummyControlImplOverride::OnKeyInputFocusLost() { keyInputFocusLost = true; }
virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize);
virtual bool OnTouchEvent(const TouchEvent& event);
virtual bool OnHoverEvent(const HoverEvent& event);
- virtual bool OnMouseWheelEvent(const MouseWheelEvent& event);
+ virtual bool OnWheelEvent(const WheelEvent& event);
virtual bool OnKeyEvent(const KeyEvent& event);
virtual void OnKeyInputFocusGained();
virtual void OnKeyInputFocusLost();
bool sizeAnimationCalled;
bool touchEventCalled;
bool hoverEventCalled;
- bool mouseWheelEventCalled;
+ bool wheelEventCalled;
bool keyEventCalled;
bool keyInputFocusGained;
bool keyInputFocusLost;
// EXTERNAL INCLUDES
#include <stdint.h>
#include <cstring>
-#include <dali/devel-api/images/image-operations.h>
+#include <dali/public-api/images/image-operations.h>
// INTERNAL INCLUDES
#include <dali/devel-api/common/set-wrapper.h>
using namespace Toolkit;
-void utc_dali_toolkit_focus_manager_startup(void)
+void utc_dali_toolkit_accessibility_focus_manager_startup(void)
{
test_return_value = TET_UNDEF;
}
-void utc_dali_toolkit_focus_manager_cleanup(void)
+void utc_dali_toolkit_accessibility_focus_manager_cleanup(void)
{
test_return_value = TET_PASS;
}
FocusOvershotCallback(bool& signalReceived)
: mSignalVerified(signalReceived),
mCurrentFocusedActor(),
- mFocusOvershotDirection(Toolkit::FocusManager::OVERSHOT_NEXT)
+ mFocusOvershotDirection(Toolkit::AccessibilityFocusManager::OVERSHOT_NEXT)
{
}
- void Callback(Actor currentFocusedActor, Toolkit::FocusManager::FocusOvershotDirection direction)
+ void Callback(Actor currentFocusedActor, Toolkit::AccessibilityFocusManager::FocusOvershotDirection direction)
{
tet_infoline("Verifying FocusOvershotCallback()");
bool& mSignalVerified;
Actor mCurrentFocusedActor;
- Toolkit::FocusManager::FocusOvershotDirection mFocusOvershotDirection;
+ Toolkit::AccessibilityFocusManager::FocusOvershotDirection mFocusOvershotDirection;
};
// Functor to test whether focused actor activated signal is emitted.
} // namespace
-int UtcDaliFocusManagerGet(void)
+int UtcDaliAccessibilityFocusManagerGet(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerGet");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerGet");
- FocusManager manager;
+ AccessibilityFocusManager manager;
//Ensure object is created by checking if it's registered
ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
gObjectCreatedCallBackCalled = false;
registry.ObjectCreatedSignal().Connect( &TestCallback );
{
- manager = FocusManager::Get();
+ manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
}
DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
- FocusManager newManager = FocusManager::Get();
+ AccessibilityFocusManager newManager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(newManager);
// Check that focus manager is a singleton
END_TEST;
}
-int UtcDaliFocusManagerSetAndGetAccessibilityAttribute(void)
+int UtcDaliAccessibilityFocusManagerSetAndGetAccessibilityAttribute(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerSetAndGetAccessibilityAttribute");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerSetAndGetAccessibilityAttribute");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
Actor actor = Actor::New();
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(actor, FocusManager::ACCESSIBILITY_LABEL) == "");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(actor, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "");
- manager.SetAccessibilityAttribute(actor, FocusManager::ACCESSIBILITY_LABEL, "Description");
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(actor, FocusManager::ACCESSIBILITY_LABEL) == "Description");
+ manager.SetAccessibilityAttribute(actor, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "Description");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(actor, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "Description");
- manager.SetAccessibilityAttribute(actor, FocusManager::ACCESSIBILITY_LABEL, "New description");
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(actor, FocusManager::ACCESSIBILITY_LABEL) == "New description");
+ manager.SetAccessibilityAttribute(actor, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "New description");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(actor, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "New description");
END_TEST;
}
-int UtcDaliFocusManagerSetAndGetFocusOrder(void)
+int UtcDaliAccessibilityFocusManagerSetAndGetFocusOrder(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerSetAndGetFocusOrder");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerSetAndGetFocusOrder");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
Actor first = Actor::New();
// Set the focus order and description for the first actor
manager.SetFocusOrder(first, 1);
- manager.SetAccessibilityAttribute(first, FocusManager::ACCESSIBILITY_LABEL, "first");
+ manager.SetAccessibilityAttribute(first, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "first");
DALI_TEST_CHECK(manager.GetFocusOrder(first) == 1);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, FocusManager::ACCESSIBILITY_LABEL) == "first");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "first");
// Set the focus order and description for the second actor
manager.SetFocusOrder(second, 2);
- manager.SetAccessibilityAttribute(second, FocusManager::ACCESSIBILITY_LABEL, "second");
+ manager.SetAccessibilityAttribute(second, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "second");
DALI_TEST_CHECK(manager.GetFocusOrder(second) == 2);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, FocusManager::ACCESSIBILITY_LABEL) == "second");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "second");
// check that the focus order of the first actor is changed
manager.SetFocusOrder(first, 2);
DALI_TEST_CHECK(manager.GetFocusOrder(first) == 2);
// make sure the change of focus order doesn't affect the actor's description
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, FocusManager::ACCESSIBILITY_LABEL) == "first");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "first");
// check that the focus order of the second actor is increased to 3
DALI_TEST_CHECK(manager.GetFocusOrder(second) == 3);
// make sure the change of focus order doesn't affect the actor's description
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, FocusManager::ACCESSIBILITY_LABEL) == "second");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "second");
// check that the focus order of the second actor is changed to 1
manager.SetFocusOrder(second, 1);
DALI_TEST_CHECK(manager.GetFocusOrder(second) == 1);
// make sure the change of focus order doesn't affect the actor's description
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, FocusManager::ACCESSIBILITY_LABEL) == "second");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "second");
// Set the focus order and description for the third actor
Actor third = Actor::New();
manager.SetFocusOrder(third, 1);
- manager.SetAccessibilityAttribute(third, FocusManager::ACCESSIBILITY_LABEL, "third");
+ manager.SetAccessibilityAttribute(third, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "third");
DALI_TEST_CHECK(manager.GetFocusOrder(third) == 1);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(third, FocusManager::ACCESSIBILITY_LABEL) == "third");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(third, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "third");
// check that the focus order of the second actor is increased to 2.
DALI_TEST_CHECK(manager.GetFocusOrder(second) == 2);
// make sure the change of focus order doesn't affect the actor's description
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, FocusManager::ACCESSIBILITY_LABEL) == "second");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "second");
// check that the focus order of the first actor is increased to 3.
DALI_TEST_CHECK(manager.GetFocusOrder(first) == 3);
// make sure the change of focus order doesn't affect the actor's description
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, FocusManager::ACCESSIBILITY_LABEL) == "first");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "first");
END_TEST;
}
-int UtcDaliFocusManagerGenerateNewFocusOrder(void)
+int UtcDaliAccessibilityFocusManagerGenerateNewFocusOrder(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerGenerateNewFocusOrder");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerGenerateNewFocusOrder");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
DALI_TEST_CHECK(1 == manager.GenerateNewFocusOrder());
// Set the focus order for the first actor
manager.SetFocusOrder(first, 1);
- manager.SetAccessibilityAttribute(first, FocusManager::ACCESSIBILITY_LABEL, "first");
+ manager.SetAccessibilityAttribute(first, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "first");
DALI_TEST_CHECK(manager.GetFocusOrder(first) == 1);
//Test for new focus order
// Set the focus order for the first actor
manager.SetFocusOrder(second, 2);
- manager.SetAccessibilityAttribute(second, FocusManager::ACCESSIBILITY_LABEL, "first");
+ manager.SetAccessibilityAttribute(second, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "first");
DALI_TEST_CHECK(manager.GetFocusOrder(second) == 2);
END_TEST;
}
-int UtcDaliFocusManagerGetActorByFocusOrder(void)
+int UtcDaliAccessibilityFocusManagerGetActorByFocusOrder(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerGetActorByFocusOrder");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerGetActorByFocusOrder");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
// Create the actors and set their focus orders
END_TEST;
}
-int UtcDaliFocusManagerSetAndGetCurrentFocusActor(void)
+int UtcDaliAccessibilityFocusManagerSetAndGetCurrentFocusActor(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerSetAndGetCurrentFocusActor");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerSetAndGetCurrentFocusActor");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
// Create the first actor and add it to the stage
END_TEST;
}
-int UtcDaliFocusManagerGetCurrentFocusGroup(void)
+int UtcDaliAccessibilityFocusManagerGetCurrentFocusGroup(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerGetCurrentFocusGroup");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerGetCurrentFocusGroup");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
// Create an actor with two child actors and add it to the stage
END_TEST;
}
-int UtcDaliFocusManagerGetCurrentFocusOrder(void)
+int UtcDaliAccessibilityFocusManagerGetCurrentFocusOrder(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerGetCurrentFocusOrder");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerGetCurrentFocusOrder");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
Actor first = Actor::New();
// Set the focus order and description for the first actor
manager.SetFocusOrder(first, 1);
- manager.SetAccessibilityAttribute(first, FocusManager::ACCESSIBILITY_LABEL, "first");
+ manager.SetAccessibilityAttribute(first, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "first");
DALI_TEST_CHECK(manager.GetFocusOrder(first) == 1);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, FocusManager::ACCESSIBILITY_LABEL) == "first");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "first");
// Set the focus order and description for the second actor
manager.SetFocusOrder(second, 2);
- manager.SetAccessibilityAttribute(second, FocusManager::ACCESSIBILITY_LABEL, "second");
+ manager.SetAccessibilityAttribute(second, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "second");
DALI_TEST_CHECK(manager.GetFocusOrder(second) == 2);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, FocusManager::ACCESSIBILITY_LABEL) == "second");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "second");
// Set the focus order and description for the second actor
manager.SetFocusOrder(third, 3);
- manager.SetAccessibilityAttribute(third, FocusManager::ACCESSIBILITY_LABEL, "third");
+ manager.SetAccessibilityAttribute(third, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "third");
DALI_TEST_CHECK(manager.GetFocusOrder(third) == 3);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(third, FocusManager::ACCESSIBILITY_LABEL) == "third");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(third, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "third");
// Check that no actor is being focused yet.
DALI_TEST_CHECK(manager.GetCurrentFocusOrder() == 0);
END_TEST;
}
-int UtcDaliFocusManagerMoveFocusForward(void)
+int UtcDaliAccessibilityFocusManagerMoveFocusForward(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerMoveFocusForward");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerMoveFocusForward");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
Actor first = Actor::New();
// Set the focus order and description for the first actor
manager.SetFocusOrder(first, 1);
- manager.SetAccessibilityAttribute(first, FocusManager::ACCESSIBILITY_LABEL, "first");
+ manager.SetAccessibilityAttribute(first, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "first");
DALI_TEST_CHECK(manager.GetFocusOrder(first) == 1);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, FocusManager::ACCESSIBILITY_LABEL) == "first");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "first");
// Set the focus order and description for the second actor
manager.SetFocusOrder(second, 2);
- manager.SetAccessibilityAttribute(second, FocusManager::ACCESSIBILITY_LABEL, "second");
+ manager.SetAccessibilityAttribute(second, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "second");
DALI_TEST_CHECK(manager.GetFocusOrder(second) == 2);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, FocusManager::ACCESSIBILITY_LABEL) == "second");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "second");
// Set the focus order and description for the second actor
manager.SetFocusOrder(third, 3);
- manager.SetAccessibilityAttribute(third, FocusManager::ACCESSIBILITY_LABEL, "third");
+ manager.SetAccessibilityAttribute(third, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "third");
DALI_TEST_CHECK(manager.GetFocusOrder(third) == 3);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(third, FocusManager::ACCESSIBILITY_LABEL) == "third");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(third, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "third");
// Check that no actor is being focused yet.
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
// Set the focus on the first actor
DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "first");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "first");
// Test the non-wrapped move first
manager.SetWrapMode(false);
// Move the focus forward to the second actor
manager.MoveFocusForward();
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "second");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "second");
// Move the focus forward to the third actor
manager.MoveFocusForward();
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "third");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "third");
// Check that it will fail to move the focus forward again as the third actor is the last
// focusable actor in the focus chain
manager.MoveFocusForward();
// The focus should still be set on the third actor
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "third");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "third");
// Now test the wrapped move
manager.SetWrapMode(true);
// Move the focus forward recursively and this time the first actor should be focused
manager.MoveFocusForward();
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "first");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "first");
// Make the second actor not focusable
Property::Index propertyActorFocusable = second.GetPropertyIndex("focusable");
// the third actor should be focused now.
manager.MoveFocusForward();
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "third");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "third");
// Make the first actor invisible
first.SetVisible(false);
// so the focus will still be on the third actor
manager.MoveFocusForward();
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "third");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "third");
// Make the third actor invisible so that no actor can be focused.
third.SetVisible(false);
// Check that the focus move is failed as all the three actors can not be focused
manager.MoveFocusForward();
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "third");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "third");
END_TEST;
}
-int UtcDaliFocusManagerMoveFocusBackward(void)
+int UtcDaliAccessibilityFocusManagerMoveFocusBackward(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerMoveFocusBackward");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerMoveFocusBackward");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
Actor first = Actor::New();
// Set the focus order and description for the first actor
manager.SetFocusOrder(first, 1);
- manager.SetAccessibilityAttribute(first, FocusManager::ACCESSIBILITY_LABEL, "first");
+ manager.SetAccessibilityAttribute(first, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "first");
DALI_TEST_CHECK(manager.GetFocusOrder(first) == 1);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, FocusManager::ACCESSIBILITY_LABEL) == "first");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(first, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "first");
// Set the focus order and description for the second actor
manager.SetFocusOrder(second, 2);
- manager.SetAccessibilityAttribute(second, FocusManager::ACCESSIBILITY_LABEL, "second");
+ manager.SetAccessibilityAttribute(second, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "second");
DALI_TEST_CHECK(manager.GetFocusOrder(second) == 2);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, FocusManager::ACCESSIBILITY_LABEL) == "second");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(second, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "second");
// Set the focus order and description for the second actor
manager.SetFocusOrder(third, 3);
- manager.SetAccessibilityAttribute(third, FocusManager::ACCESSIBILITY_LABEL, "third");
+ manager.SetAccessibilityAttribute(third, AccessibilityFocusManager::ACCESSIBILITY_LABEL, "third");
DALI_TEST_CHECK(manager.GetFocusOrder(third) == 3);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(third, FocusManager::ACCESSIBILITY_LABEL) == "third");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(third, AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "third");
// Check that no actor is being focused yet.
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
// Set the focus on the third actor
DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == true);
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "third");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "third");
// Test the non-wrapped move first
manager.SetWrapMode(false);
// Move the focus backward to the second actor
manager.MoveFocusBackward();
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "second");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "second");
// Move the focus backward to the first actor
manager.MoveFocusBackward();
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "first");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "first");
// Check that it will fail to move the focus backward again as the first actor is the first
// focusable actor in the focus chain
manager.MoveFocusBackward();
// The focus should still be set on the first actor
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "first");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "first");
// Now test the wrapped move
manager.SetWrapMode(true);
// Move the focus backward recursively and this time the third actor should be focused
manager.MoveFocusBackward();
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "third");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "third");
// Make the second actor not focusable
Property::Index propertyActorFocusable = second.GetPropertyIndex("focusable");
// the first actor should be focused now.
manager.MoveFocusBackward();
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "first");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "first");
// Make the third actor invisible
third.SetVisible(false);
// so the focus will still be on the first actor
manager.MoveFocusBackward();
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "first");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "first");
// Make the first actor invisible so that no actor can be focused.
first.SetVisible(false);
// Check that the focus move is failed as all the three actors can not be focused
manager.MoveFocusBackward();
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
- DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), FocusManager::ACCESSIBILITY_LABEL) == "first");
+ DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityFocusManager::ACCESSIBILITY_LABEL) == "first");
END_TEST;
}
-int UtcDaliFocusManagerClearFocus(void)
+int UtcDaliAccessibilityFocusManagerClearFocus(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerClearFocus");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerClearFocus");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
// Create the first actor and add it to the stage
END_TEST;
}
-int UtcDaliFocusManagerReset(void)
+int UtcDaliAccessibilityFocusManagerReset(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerReset");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerReset");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
// Create the first actor and add it to the stage
END_TEST;
}
-int UtcDaliFocusManagerFocusGroup(void)
+int UtcDaliAccessibilityFocusManagerFocusGroup(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerFocusGroup");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerFocusGroup");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
// Create an actor with two child actors and add it to the stage
END_TEST;
}
-int UtcDaliFocusManagerSetAndGetFocusIndicator(void)
+int UtcDaliAccessibilityFocusManagerSetAndGetFocusIndicator(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerSetAndGetFocusIndicator");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerSetAndGetFocusIndicator");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
Actor defaultFocusIndicatorActor = manager.GetFocusIndicatorActor();
END_TEST;
}
-int UtcDaliFocusManagerSignalFocusChanged(void)
+int UtcDaliAccessibilityFocusManagerSignalFocusChanged(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerSignalFocusChanged");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerSignalFocusChanged");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
bool signalVerified = false;
END_TEST;
}
-int UtcDaliFocusManagerSignalFocusOvershot(void)
+int UtcDaliAccessibilityFocusManagerSignalFocusOvershot(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerSignalFocusOvershot");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerSignalFocusOvershot");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
bool signalVerified = false;
// Check that the forward focus movement is overshot.
callback.mCurrentFocusedActor = second;
- callback.mFocusOvershotDirection = Toolkit::FocusManager::OVERSHOT_NEXT;
+ callback.mFocusOvershotDirection = Toolkit::AccessibilityFocusManager::OVERSHOT_NEXT;
DALI_TEST_CHECK(manager.MoveFocusForward() == false);
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
DALI_TEST_CHECK(signalVerified);
// Check that the backward focus movement is overshot.
callback.mCurrentFocusedActor = first;
- callback.mFocusOvershotDirection = Toolkit::FocusManager::OVERSHOT_PREVIOUS;
+ callback.mFocusOvershotDirection = Toolkit::AccessibilityFocusManager::OVERSHOT_PREVIOUS;
DALI_TEST_CHECK(manager.MoveFocusBackward() == false);
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
DALI_TEST_CHECK(signalVerified);
END_TEST;
}
-int UtcDaliFocusManagerSignalFocusedActorActivated(void)
+int UtcDaliAccessibilityFocusManagerSignalFocusedActorActivated(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliFocusManagerSignalFocusedActorActivated");
+ tet_infoline(" UtcDaliAccessibilityFocusManagerSignalFocusedActorActivated");
- FocusManager manager = FocusManager::Get();
+ AccessibilityFocusManager manager = AccessibilityFocusManager::Get();
DALI_TEST_CHECK(manager);
FocusedActorActivatedCallback callback;
#include <dali.h>
#include <dali-toolkit/dali-toolkit.h>
#include <dali/integration-api/events/key-event-integ.h>
-#include <dali/integration-api/events/mouse-wheel-event-integ.h>
+#include <dali/integration-api/events/wheel-event-integ.h>
#include <dali/integration-api/events/long-press-gesture-event.h>
#include <dali/integration-api/events/pinch-gesture-event.h>
#include <dali/integration-api/events/pan-gesture-event.h>
TapGestureDetector tap = dummyImpl.GetTapGestureDetector();
LongPressGestureDetector longPress = dummyImpl.GetLongPressGestureDetector();
- DALI_TEST_EQUALS( pinch.GetAttachedActors().empty(), false, TEST_LOCATION );
- DALI_TEST_EQUALS( pan.GetAttachedActors().empty(), false, TEST_LOCATION );
- DALI_TEST_EQUALS( tap.GetAttachedActors().empty(), false, TEST_LOCATION );
- DALI_TEST_EQUALS( longPress.GetAttachedActors().empty(), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == pinch.GetAttachedActorCount(), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == pan.GetAttachedActorCount(), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == tap.GetAttachedActorCount(), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == longPress.GetAttachedActorCount(), false, TEST_LOCATION );
dummyImpl.DisableGestureDetection( Gesture::Type(Gesture::Pinch | Gesture::Pan | Gesture::Tap | Gesture::LongPress) );
- DALI_TEST_EQUALS( pinch.GetAttachedActors().empty(), true, TEST_LOCATION );
- DALI_TEST_EQUALS( pan.GetAttachedActors().empty(), true, TEST_LOCATION );
- DALI_TEST_EQUALS( tap.GetAttachedActors().empty(), true, TEST_LOCATION );
- DALI_TEST_EQUALS( longPress.GetAttachedActors().empty(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == pinch.GetAttachedActorCount(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == pan.GetAttachedActorCount(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == tap.GetAttachedActorCount(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0 == longPress.GetAttachedActorCount(), true, TEST_LOCATION );
}
END_TEST;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
namespace
{
-static bool MouseWheelEventCallback(Actor actor, const MouseWheelEvent& event)
+static bool WheelEventCallback(Actor actor, const WheelEvent& event)
{
return false;
}
}
-int UtcDaliControlImplMouseWheelEvent(void)
+int UtcDaliControlImplWheelEvent(void)
{
ToolkitTestApplication application;
dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
- dummy.MouseWheelEventSignal().Connect(&MouseWheelEventCallback);
+ dummy.WheelEventSignal().Connect(&WheelEventCallback);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS( dummyImpl.mouseWheelEventCalled, false, TEST_LOCATION );
+ DALI_TEST_EQUALS( dummyImpl.wheelEventCalled, false, TEST_LOCATION );
- // simulate a mouse wheel event
+ // simulate a wheel event
Vector2 screenCoordinates( 10.0f, 10.0f );
- Integration::MouseWheelEvent event(0, 0u, screenCoordinates, 1, 1000u);
- application.ProcessEvent(event);
- DALI_TEST_EQUALS( dummyImpl.mouseWheelEventCalled, true, TEST_LOCATION );
+ Integration::WheelEvent event( Integration::WheelEvent::MOUSE_WHEEL, 0, 0u, screenCoordinates, 1, 1000u );
+ application.ProcessEvent( event );
+ DALI_TEST_EQUALS( dummyImpl.wheelEventCalled, true, TEST_LOCATION );
Stage::GetCurrent().Remove(dummy);
}
dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
- dummy.MouseWheelEventSignal().Connect(&MouseWheelEventCallback);
+ dummy.WheelEventSignal().Connect(&WheelEventCallback);
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- // simulate a mouse wheel event
+ // simulate a wheel event
Vector2 screenCoordinates( 20.0f, 20.0f );
- Integration::MouseWheelEvent event(0, 0u, screenCoordinates, 1, 1000u);
- application.ProcessEvent(event);
+ Integration::WheelEvent event( Integration::WheelEvent::MOUSE_WHEEL, 0, 0u, screenCoordinates, 1, 1000u );
+ application.ProcessEvent( event );
Stage::GetCurrent().Remove(dummy);
}
BaseHandle handle = type.CreateInstance();
DALI_TEST_CHECK( handle );
- std::vector<Property::Value> attributes;
+ Property::Map attributes;
DALI_TEST_EQUALS( false, handle.DoAction("control-activated", attributes), TEST_LOCATION );
END_TEST;
Toolkit::Internal::Control& controlImpl = Toolkit::Internal::GetImplementation( dummy );
Actor currentFocusedActor;
- Actor result = controlImpl.GetNextKeyboardFocusableActor( currentFocusedActor, Control::Left, false );
+ Actor result = controlImpl.GetNextKeyboardFocusableActor( currentFocusedActor, Control::KeyboardFocus::LEFT, false );
DALI_TEST_EQUALS( result, currentFocusedActor, TEST_LOCATION );
DALI_TEST_EQUALS(position, 0.0f, TEST_LOCATION);
- int focusItem = layout->GetNextFocusItemID(0, TOTAL_ITEM_NUMBER, Control::Left, true);
+ int focusItem = layout->GetNextFocusItemID(0, TOTAL_ITEM_NUMBER, Control::KeyboardFocus::LEFT, true);
DALI_TEST_CHECK(focusItem != 0);
TestItemLayoutPtr layout = TestItemLayout::New();
DALI_TEST_CHECK( layout );
- DALI_TEST_EQUALS(layout->GetNextFocusItemID(0, 100, Control::Left, true), 99, TEST_LOCATION );
- DALI_TEST_EQUALS(layout->GetNextFocusItemID(110, 100, Control::Right, true), 0, TEST_LOCATION );
+ DALI_TEST_EQUALS(layout->GetNextFocusItemID(0, 100, Control::KeyboardFocus::LEFT, true), 99, TEST_LOCATION );
+ DALI_TEST_EQUALS(layout->GetNextFocusItemID(110, 100, Control::KeyboardFocus::RIGHT, true), 0, TEST_LOCATION );
END_TEST;
}
END_TEST;
}
-int UtcDaliItemViewSetAndGetMouseWheelScrollDistanceStep(void)
+int UtcDaliItemViewSetAndGetWheelScrollDistanceStep(void)
{
ToolkitTestApplication application;
TestItemFactory factory;
ItemView view = ItemView::New(factory);
- // Set the scroll distance step for the mouse wheel event to be 100.0f
- view.SetMouseWheelScrollDistanceStep(100.0f);
+ // Set the scroll distance step for the wheel event to be 100.0f
+ view.SetWheelScrollDistanceStep(100.0f);
// Check the scroll distance step is 100.0f
- DALI_TEST_EQUALS(view.GetMouseWheelScrollDistanceStep(), 100.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS(view.GetWheelScrollDistanceStep(), 100.0f, TEST_LOCATION );
END_TEST;
}
#include <dali-toolkit-test-suite-utils.h>
#include <dali-toolkit/dali-toolkit.h>
#include <dali/integration-api/events/key-event-integ.h>
+#include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
#include "dummy-control.h"
: mSignalVerified(signalReceived),
mCurrentFocusedActor(),
mProposedActorToFocus(),
- mDirection(Control::Left)
+ mDirection(Control::KeyboardFocus::LEFT)
{
}
- Actor Callback(Actor currentFocusedActor, Actor proposedActorToFocus, Control::KeyboardFocusNavigationDirection direction)
+ Actor Callback(Actor currentFocusedActor, Actor proposedActorToFocus, Control::KeyboardFocus::Direction direction)
{
tet_infoline("Verifying PreFocusChangeCallback()");
mSignalVerified = false;
mCurrentFocusedActor = Actor();
mProposedActorToFocus = Actor();
- mDirection = Control::Left;
+ mDirection = Control::KeyboardFocus::LEFT;
}
bool& mSignalVerified;
Actor mCurrentFocusedActor;
Actor mProposedActorToFocus;
- Control::KeyboardFocusNavigationDirection mDirection;
+ Control::KeyboardFocus::Direction mDirection;
};
// Functors to test whether focus changed signal is emitted when the keyboard focus is changed
Stage::GetCurrent().Add(second);
// Move the focus to the right
- DALI_TEST_CHECK(manager.MoveFocus(Control::Right) == false);
+ DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == false);
// Because no layout control in the stage and no actor is focused, it should emit the PreFocusChange signal
DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == Actor());
DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == Actor());
- DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::Right);
+ DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::RIGHT);
preFocusChangeCallback.Reset();
// Check that the focus is set on the first actor
focusChangedCallback.Reset();
// Move the focus towards right
- DALI_TEST_CHECK(manager.MoveFocus(Control::Right) == false);
+ DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == false);
// Because no layout control in the stage and the first actor is focused, it should emit the PreFocusChange signal
DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == first);
DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == Actor());
- DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::Right);
+ DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::RIGHT);
preFocusChangeCallback.Reset();
// Check that the focus is set on the second actor
focusChangedCallback.Reset();
// Move the focus towards up
- DALI_TEST_CHECK(manager.MoveFocus(Control::Up) == false);
+ DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::UP) == false);
// Because no layout control in the stage and no actor is focused, it should emit the PreFocusChange signal
DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == second);
DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == Actor());
- DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::Up);
+ DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::UP);
preFocusChangeCallback.Reset();
DALI_TEST_CHECK(!focusChangedCallback.mSignalVerified);
focusChangedCallback.Reset();
// Move the focus towards right
- DALI_TEST_CHECK(manager.MoveFocus(Control::Right) == true);
+ DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == true);
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == first);
focusChangedCallback.Reset();
// Move the focus towards down
- DALI_TEST_CHECK(manager.MoveFocus(Control::Down) == true);
+ DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::DOWN) == true);
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == fourth);
DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == second);
focusChangedCallback.Reset();
// Move the focus towards left
- DALI_TEST_CHECK(manager.MoveFocus(Control::Left) == true);
+ DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::LEFT) == true);
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == fourth);
focusChangedCallback.Reset();
// Move the focus towards up
- DALI_TEST_CHECK(manager.MoveFocus(Control::Up) == true);
+ DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::UP) == true);
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == third);
focusChangedCallback.Reset();
// Move the focus towards left. The focus move will fail as no way to move it upwards
- DALI_TEST_CHECK(manager.MoveFocus(Control::Left) == false);
+ DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::LEFT) == false);
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == first);
DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == Actor());
- DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::Left);
+ DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::LEFT);
preFocusChangeCallback.Reset();
DALI_TEST_CHECK(!focusChangedCallback.mSignalVerified);
DALI_TEST_CHECK(manager.GetFocusGroupLoop() == true);
// Move the focus towards left again. The focus should move to the fourth actor.
- DALI_TEST_CHECK(manager.MoveFocus(Control::Left) == true);
+ DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::LEFT) == true);
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == fourth);
DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == first);
END_TEST;
}
-int UtcDaliToolkitScrollViewSetMouseWheelScrollDistanceStepP(void)
+int UtcDaliToolkitScrollViewSetWheelScrollDistanceStepP(void)
{
ToolkitTestApplication application;
- tet_infoline(" UtcDaliToolkitScrollViewSetMouseWheelScrollDistanceStepP");
+ tet_infoline(" UtcDaliToolkitScrollViewSetWheelScrollDistanceStepP");
ScrollView scrollView = ScrollView::New();
// Disable Refresh signal (TET environment cannot use adaptor's Timer)
- scrollView.SetMouseWheelScrollDistanceStep(Vector2(30.0f, 15.0f));
- DALI_TEST_EQUALS( scrollView.GetMouseWheelScrollDistanceStep(), Vector2(30.0f, 15.0f), TEST_LOCATION );
- scrollView.SetMouseWheelScrollDistanceStep(Vector2(60.0f, 30.0f));
- DALI_TEST_EQUALS( scrollView.GetMouseWheelScrollDistanceStep(), Vector2(60.0f, 30.0f), TEST_LOCATION);
+ scrollView.SetWheelScrollDistanceStep(Vector2(30.0f, 15.0f));
+ DALI_TEST_EQUALS( scrollView.GetWheelScrollDistanceStep(), Vector2(30.0f, 15.0f), TEST_LOCATION );
+ scrollView.SetWheelScrollDistanceStep(Vector2(60.0f, 30.0f));
+ DALI_TEST_EQUALS( scrollView.GetWheelScrollDistanceStep(), Vector2(60.0f, 30.0f), TEST_LOCATION);
END_TEST;
}
@for i in `find $(COVERAGE_DIR) -name "libdali_toolkit_la-*.gcda" -o -name "libdali_toolkit_la-*.gcno"` ;\
do mv $$i `echo $$i | sed s/libdali_toolkit_la-//` ; echo $$i ; done
@cd $(COVERAGE_DIR) ; lcov $(LCOV_OPTS) --base-directory . --directory . -c -o dali.info
- @cd $(COVERAGE_DIR) ; lcov $(LCOV_OPTS) --remove dali.info "*boost*" "/usr/include/*" "*/dali-env/*" -o dali.info
+ @cd $(COVERAGE_DIR) ; lcov $(LCOV_OPTS) --remove dali.info "/usr/include/*" "*/dali-env/*" -o dali.info
@test -z $(COVERAGE_OUTPUT_DIR) || mkdir -p $(COVERAGE_OUTPUT_DIR)
coverage: cov_data
develapisliderdir = $(develapicontrolsdir)/slider
develapishadowviewdir = $(develapicontrolsdir)/shadow-view
develapisuperblurviewdir = $(develapicontrolsdir)/super-blur-view
+develapifocusmanagerdir = $(develapidir)/focus-manager
develapiscriptingdir = $(develapidir)/scripting
develapibubbleeffectdir = $(develapidir)/shader-effects/bubble-effect
develapishadereffectsdir = $(develapidir)/shader-effects
develapibubbleeffect_HEADERS = $(devel_api_bubble_effect_header_files)
develapibuilder_HEADERS = $(devel_api_builder_header_files)
develapieffectsview_HEADERS = $(devel_api_effects_view_header_files)
+develapifocusmanager_HEADERS = $(devel_api_focus_manager_header_files)
develapimagnifier_HEADERS = $(devel_api_magnifier_header_files)
develapipageturnview_HEADERS = $(devel_api_page_turn_view_header_files)
develapipopup_HEADERS = $(devel_api_popup_header_files)
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
-PROJECT_NAME = "Dali Internal Documentation"
+PROJECT_NAME = "DALi Internal Documentation"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = Dali
+PROJECT_NAME = DALi
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
text-align: left;
margin-left: 50px;
}
+
+div.image img {
+ max-width: 50em;
+}
#include <dali-toolkit/public-api/controls/table-view/table-view.h>
#include <dali-toolkit/public-api/controls/text-controls/text-field.h>
#include <dali-toolkit/public-api/controls/text-controls/text-label.h>
-#include <dali-toolkit/public-api/focus-manager/focus-manager.h>
+#include <dali-toolkit/public-api/focus-manager/accessibility-focus-manager.h>
#include <dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h>
-#include <dali-toolkit/public-api/focus-manager/keyinput-focus-manager.h>
#include <dali-toolkit/public-api/text/rendering-backend.h>
#include <dali-toolkit/public-api/dali-toolkit-version.h>
#include <dali-toolkit/public-api/enums.h>
$(devel_api_src_dir)/controls/super-blur-view/super-blur-view.cpp \
$(devel_api_src_dir)/controls/text-controls/text-selection-popup.cpp \
$(devel_api_src_dir)/controls/tool-bar/tool-bar.cpp \
+ $(devel_api_src_dir)/focus-manager/keyinput-focus-manager.cpp \
$(devel_api_src_dir)/styling/style-manager.cpp \
$(devel_api_src_dir)/scripting/script.cpp \
$(devel_api_src_dir)/shader-effects/bubble-effect/bubble-effect.cpp \
devel_api_slider_header_files = \
$(devel_api_src_dir)/controls/slider/slider.h
+devel_api_focus_manager_header_files = \
+ $(devel_api_src_dir)/focus-manager/keyinput-focus-manager.h
+
devel_api_styling_header_files = \
$(devel_api_src_dir)/styling/style-manager.h
// EXTERNAL INCLUDES
#include <sys/stat.h>
-#include <boost/function.hpp>
#include <sstream>
#include <dali/public-api/render-tasks/render-task-list.h>
#include <dali/public-api/object/type-info.h>
#include <dali/public-api/actors/image-actor.h>
#include <dali/public-api/actors/camera-actor.h>
#include <dali/devel-api/scripting/scripting.h>
+#include <dali/public-api/signals/functor-delegate.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
extern bool SetPropertyFromNode( const TreeNode& node, Property::Value& value, const Replacement& replacements );
extern bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value );
extern bool SetPropertyFromNode( const TreeNode& node, Property::Type type, Property::Value& value, const Replacement& replacements );
-extern Actor SetupSignalAction(ConnectionTracker* tracker, const TreeNode &root, const TreeNode &child, Actor actor, boost::function<void (void)> quitAction, Dali::Toolkit::Internal::Builder* const builder);
-extern Actor SetupPropertyNotification(ConnectionTracker* tracker, const TreeNode &root, const TreeNode &child, Actor actor, boost::function<void (void)> quitAction, Dali::Toolkit::Internal::Builder* const builder);
+extern Actor SetupSignalAction(ConnectionTracker* tracker, const TreeNode &root, const TreeNode &child, Actor actor, Dali::Toolkit::Internal::Builder* const builder);
+extern Actor SetupPropertyNotification(ConnectionTracker* tracker, const TreeNode &root, const TreeNode &child, Actor actor, Dali::Toolkit::Internal::Builder* const builder);
extern Actor SetupActor( const TreeNode& node, Actor& actor, const Replacement& constant );
#if defined(DEBUG_ENABLED)
}
}
-struct QuitAction
-{
-public:
- QuitAction( Builder& builder )
- : mBuilder( builder )
- {
- }
-
- void operator()(void)
- {
- mBuilder.EmitQuitSignal();
- }
-
-private:
- Builder& mBuilder;
-};
} // namespace anon
SetupActor( node, actor, constant );
// add signals
- QuitAction quitAction( *this );
- SetupSignalAction( mSlotDelegate.GetConnectionTracker(), root, node, actor, quitAction, this );
- SetupPropertyNotification( mSlotDelegate.GetConnectionTracker(), root, node, actor, quitAction, this );
+ SetupSignalAction( mSlotDelegate.GetConnectionTracker(), root, node, actor, this );
+ SetupPropertyNotification( mSlotDelegate.GetConnectionTracker(), root, node, actor, this );
}
}
else
*/
// EXTERNAL INCLUDES
-#include <boost/function.hpp>
#include <dali/public-api/actors/layer.h>
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/object/type-info.h>
#include <dali/public-api/object/property-notification.h>
+
#include <dali/integration-api/debug.h>
#include <limits>
std::string actorName;
std::string actionName;
std::string childName;
- PropertyValueContainer parameters;
+ Property::Map parameters;
void operator()(void)
{
{
std::string actorName;
std::string actionName;
- PropertyValueContainer parameters;
+ Property::Map parameters;
void operator()(void)
{
};
};
+struct QuitAction
+{
+ Dali::IntrusivePtr<Dali::Toolkit::Internal::Builder> builder;
+
+ void operator()(void)
+ {
+ builder->EmitQuitSignal();
+ }
+};
+
// Delay an animation play; ie wait as its not on stage yet
struct DelayedAnimationPlay
{
* Gets Parmeter list from child
* params is be cleared before insertion
*/
-void GetParameters(const TreeNode& child, PropertyValueContainer& params)
+void GetParameters(const TreeNode& child, Property::Map& params)
{
if( OptionalChild c = IsChild(child, "parameters") )
{
const TreeNode& node = *c;
- if(0 == node.Size())
- {
- GetPropertyValue(node);
- }
- else
- {
- params.clear();
- params.reserve(node.Size());
+ params.Clear();
- for(TreeNode::ConstIterator iter(node.CBegin()); iter != node.CEnd(); ++iter)
- {
- params.push_back( GetPropertyValue( (*iter).second ) );
- }
+ for(TreeNode::ConstIterator iter(node.CBegin()); iter != node.CEnd(); ++iter)
+ {
+ params[ (*iter).first ] = GetPropertyValue( (*iter).second );
}
}
}
-void DoNothing(void) {};
+// Shim for the property notifcation signal
+template <typename T>
+struct PropertyNotifcationSignalShim
+{
+ T mFunctor;
+
+ PropertyNotifcationSignalShim(T& functor) : mFunctor(functor) {}
+
+ void operator()(PropertyNotification& /* source */)
+ {
+ mFunctor();
+ }
+};
+
+// Specializations for the different signal connection calls between actor & PropertyNotification
+template <typename T>
+struct SignalConnector {};
+
+// Actor specialization
+template <>
+struct SignalConnector<Actor> {
+ Actor& mActor;
+ ConnectionTracker* mTracker;
+ const std::string& mName;
+
+ SignalConnector<Actor>(ConnectionTracker* tracker, Actor& actor, const std::string& name)
+ : mActor(actor), mTracker(tracker), mName(name) {}
+
+ template <typename T>
+ void Connect(T& functor)
+ {
+ mActor.ConnectSignal( mTracker, mName, functor);
+ }
+};
+
+// PropertyNotification specialization
+template <>
+struct SignalConnector<PropertyNotification>
+{
+ PropertyNotification& mNotification;
+ ConnectionTracker* mTracker;
+
+ SignalConnector<PropertyNotification>(ConnectionTracker* tracker, PropertyNotification ¬ification)
+ : mNotification(notification), mTracker(tracker) {}
+
+ template <typename T>
+ void Connect(T& functor)
+ {
+ mNotification.NotifySignal().Connect( mTracker, PropertyNotifcationSignalShim<T>(functor) );
+ }
+};
/**
- * Get an action as boost function callback
+ * Set an action functor on a signal
*/
-boost::function<void (void)> GetAction(const TreeNode &root, const TreeNode &child, Actor actor, boost::function<void (void)> quitAction, Dali::Toolkit::Internal::Builder* const builder)
+template <typename T>
+void SetActionOnSignal(const TreeNode &root, const TreeNode &child, Actor actor, Dali::Toolkit::Internal::Builder* const builder, SignalConnector<T>& connector)
{
OptionalString childActorName(IsString( IsChild(&child, "child-actor")) );
OptionalString actorName(IsString( IsChild(&child, "actor")) );
OptionalString actionName = IsString( IsChild(&child, "action") );
DALI_ASSERT_ALWAYS(actionName && "Signal must have an action");
- boost::function<void(void)> callback = DoNothing;
-
if(childActorName)
{
ChildActorAction action;
action.childName = *childActorName;
action.actionName = *actionName;
GetParameters(child, action.parameters);
- callback = action;
+ connector.Connect( action );
}
else if(actorName)
{
{
DALI_SCRIPT_WARNING("Cannot set property for set property action\n");
}
- callback = action;
+ connector.Connect( action );
}
else
{
action.actorName = *actorName;
action.actionName = *actionName;
GetParameters(child, action.parameters);
- callback = action;
+ connector.Connect( action );
}
}
else if("quit" == *actionName)
{
- callback = quitAction;
+ QuitAction action;
+ action.builder = builder;
+ connector.Connect( action );
}
else if("play" == *actionName)
{
action.animNode = animNode;
action.builder = builder;
// @todo; put constants into the map
- callback = action;
+ connector.Connect( action );
}
else
{
action.ranges.push_back(*range);
action.wrapRanges.push_back(wrap);
}
-
- callback = action;
+ connector.Connect(action);
}
}
-
-
}
else if("removeConstraints" == *actionName )
{
}
}
}
- callback = action;
+ connector.Connect(action);
}
}
else
action.actorName = actor.GetName();
action.actionName = *actionName;
GetParameters(child, action.parameters);
- callback = action;
+ connector.Connect( action );
}
-
- return callback;
}
/**
* Setup signals and actions on an actor
*/
-Actor SetupSignalAction(ConnectionTracker* tracker, const TreeNode &root, const TreeNode &child, Actor actor, boost::function<void (void)> quitAction, Dali::Toolkit::Internal::Builder* const builder )
+Actor SetupSignalAction(ConnectionTracker* tracker, const TreeNode &root, const TreeNode &child, Actor actor, Dali::Toolkit::Internal::Builder* const builder )
{
DALI_ASSERT_ALWAYS(actor);
OptionalString name( IsString( IsChild( key_child.second, "name")) );
DALI_ASSERT_ALWAYS(name && "Signal must have a name");
- boost::function<void (void)> callback = GetAction(root, key_child.second, actor, quitAction, builder );
-
- actor.ConnectSignal(tracker, *name, callback);
+ SignalConnector<Actor> connector(tracker, actor, *name);
+ SetActionOnSignal(root, key_child.second, actor, builder, connector);
}
}
/**
* Setup Property notifications for an actor
*/
-Actor SetupPropertyNotification(ConnectionTracker* tracker, const TreeNode &root, const TreeNode &child, Actor actor, boost::function<void (void)> quitAction, Dali::Toolkit::Internal::Builder* const builder )
+Actor SetupPropertyNotification(ConnectionTracker* tracker, const TreeNode &root, const TreeNode &child, Actor actor, Dali::Toolkit::Internal::Builder* const builder )
{
DALI_ASSERT_ALWAYS(actor);
{
const TreeNode::KeyNodePair& key_child = *iter;
- // Actor actions reference by pointer because of circular reference actor->signal
- // So this callback should only go onto the actor maintained list.
- boost::function<void (void)> callback = GetAction(root, key_child.second, actor, quitAction, builder );
-
OptionalString prop(IsString( IsChild(key_child.second, "property")) );
DALI_ASSERT_ALWAYS(prop && "Notification signal must specify a property");
{
PropertyNotification notification = actor.AddPropertyNotification( actor.GetPropertyIndex(*prop),
LessThanCondition(1.f) );
- notification.NotifySignal().Connect( tracker, FunctorDelegate::New(callback) );
+ SignalConnector<PropertyNotification> connector(tracker, notification);
+ SetActionOnSignal(root, key_child.second, actor, builder, connector);
}
else if("LessThan" == *cond)
{
PropertyNotification notification = actor.AddPropertyNotification( actor.GetPropertyIndex(*prop),
LessThanCondition(GetConditionArg0(key_child.second)) );
- notification.NotifySignal().Connect( tracker, FunctorDelegate::New(callback) );
+ SignalConnector<PropertyNotification> connector(tracker, notification);
+ SetActionOnSignal(root, key_child.second, actor, builder, connector);
}
else if("GreaterThan" == *cond)
{
PropertyNotification notification = actor.AddPropertyNotification( actor.GetPropertyIndex(*prop),
GreaterThanCondition(GetConditionArg0(key_child.second)) );
- notification.NotifySignal().Connect( tracker, FunctorDelegate::New(callback) );
+ SignalConnector<PropertyNotification> connector(tracker, notification);
+ SetActionOnSignal(root, key_child.second, actor, builder, connector);
}
else if("Inside" == *cond)
{
PropertyNotification notification = actor.AddPropertyNotification( actor.GetPropertyIndex(*prop),
InsideCondition(GetConditionArg0(key_child.second),
GetConditionArg1(key_child.second)) );
- notification.NotifySignal().Connect( tracker, FunctorDelegate::New(callback) );
+ SignalConnector<PropertyNotification> connector(tracker, notification);
+ SetActionOnSignal(root, key_child.second, actor, builder, connector);
}
else if("Outside" == *cond)
{
PropertyNotification notification = actor.AddPropertyNotification( actor.GetPropertyIndex(*prop),
OutsideCondition(GetConditionArg0(key_child.second),
GetConditionArg1(key_child.second)) );
- notification.NotifySignal().Connect( tracker, FunctorDelegate::New(callback) );
+ SignalConnector<PropertyNotification> connector(tracker, notification);
+ SetActionOnSignal(root, key_child.second, actor, builder, connector);
}
else
{
return mDisabledBackgroundContent;
}
-bool Button::DoAction( BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes )
+ bool Button::DoAction( BaseObject* object, const std::string& actionName, const Property::Map& attributes )
{
bool ret = false;
return ret;
}
-void Button::DoClickAction( const PropertyValueContainer& attributes )
+ void Button::DoClickAction( const Property::Map& attributes )
{
// Prevents the button signals from doing a recursive loop by sending an action
// and re-emitting the signals.
void Button::OnActivated()
{
// When the button is activated, it performs the click action
- PropertyValueContainer attributes;
+ Property::Map attributes;
DoClickAction( attributes );
}
* @param[in] attributes The attributes with which to perfrom this action.
* @return true if action has been accepted by this control
*/
- static bool DoAction( BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes );
+ static bool DoAction( BaseObject* object, const std::string& actionName, const Property::Map& attributes );
protected:
* Perform the click action to click the button.
* @param[in] attributes The attributes to perfrom this action.
*/
- void DoClickAction( const PropertyValueContainer& attributes );
+ void DoClickAction( const Property::Map& attributes );
/**
* This method is called after the button initialization.
#include <dali-toolkit/public-api/controls/buttons/button.h>
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
-#include <dali-toolkit/public-api/focus-manager/focus-manager.h>
+#include <dali-toolkit/public-api/focus-manager/accessibility-focus-manager.h>
#include <dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h>
#include <dali-toolkit/internal/controls/buttons/button-impl.h>
mLayer.Add( mBacking );
mBacking.SetOpacity(0.0f);
mBacking.TouchedSignal().Connect( this, &Popup::OnBackingTouched );
- mBacking.MouseWheelEventSignal().Connect(this, &Popup::OnBackingMouseWheelEvent);
+ mBacking.WheelEventSignal().Connect(this, &Popup::OnBackingWheelEvent);
}
void Popup::CreateDialog()
return true;
}
-bool Popup::OnBackingMouseWheelEvent(Actor actor, const MouseWheelEvent& event)
+bool Popup::OnBackingWheelEvent(Actor actor, const WheelEvent& event)
{
- // consume mouse wheel event in dimmed backing actor
+ // consume wheel event in dimmed backing actor
return true;
}
return GetNaturalSize().width;
}
-Actor Popup::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+Actor Popup::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled)
{
Actor nextFocusableActor( currentFocusedActor );
{
switch ( direction )
{
- case Toolkit::Control::Left:
+ case Toolkit::Control::KeyboardFocus::LEFT:
{
if ( iter == focusableActors.begin() )
{
}
break;
}
- case Toolkit::Control::Right:
+ case Toolkit::Control::KeyboardFocus::RIGHT:
{
if ( iter == focusableActors.end() - 1 )
{
break;
}
- case Toolkit::Control::Up:
+ case Toolkit::Control::KeyboardFocus::UP:
{
if ( *iter == mContent )
{
break;
}
- case Toolkit::Control::Down:
+ case Toolkit::Control::KeyboardFocus::DOWN:
{
if ( mContent && mContent.IsKeyboardFocusable() )
{
bool OnBackingTouched(Actor actor, const TouchEvent& event);
/**
- * Signal occurs when the mouse wheel event is occured on dimmed backing for the Popup.
- * @param[in] actor The Actor got mouse wheel
- * @param[in] event The Mouse Wheel Event.
+ * Signal occurs when the wheel event is occured on dimmed backing for the Popup.
+ * @param[in] actor The Actor got wheel
+ * @param[in] event The Wheel Event.
* @return Whether to consume event or not.
*/
- bool OnBackingMouseWheelEvent(Actor actor, const MouseWheelEvent& event);
+ bool OnBackingWheelEvent(Actor actor, const WheelEvent& event);
/**
* Signal occurs when the dialog has been touched.
/**
* @copydoc Control::GetNextKeyboardFocusableActor()
*/
- Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+ Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled);
/**
* Create the root actor for the footer
return scrollTo;
}
-int DepthLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+int DepthLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled)
{
switch( direction )
{
- case Toolkit::Control::Left:
+ case Toolkit::Control::KeyboardFocus::LEFT:
{
itemID--;
if( itemID < 0 )
}
break;
}
- case Toolkit::Control::Up:
+ case Toolkit::Control::KeyboardFocus::UP:
{
itemID += mImpl->mNumberOfColumns;
if( itemID >= maxItems )
}
break;
}
- case Toolkit::Control::Right:
+ case Toolkit::Control::KeyboardFocus::RIGHT:
{
itemID++;
if( itemID >= maxItems )
}
break;
}
- case Toolkit::Control::Down:
+ case Toolkit::Control::KeyboardFocus::DOWN:
{
itemID -= mImpl->mNumberOfColumns;
if( itemID < 0 )
/**
* @copydoc ItemLayout::GetNextFocusItemID()
*/
- virtual int GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+ virtual int GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled);
private:
return itemPosition;
}
-int GridLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+int GridLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled)
{
switch( direction )
{
- case Toolkit::Control::Left:
+ case Toolkit::Control::KeyboardFocus::LEFT:
{
itemID--;
if( itemID < 0 )
}
break;
}
- case Toolkit::Control::Up:
+ case Toolkit::Control::KeyboardFocus::UP:
{
itemID -= mImpl->mNumberOfColumns;
if( itemID < 0 )
}
break;
}
- case Toolkit::Control::Right:
+ case Toolkit::Control::KeyboardFocus::RIGHT:
{
itemID++;
if( itemID >= maxItems )
}
break;
}
- case Toolkit::Control::Down:
+ case Toolkit::Control::KeyboardFocus::DOWN:
{
itemID += mImpl->mNumberOfColumns;
if( itemID >= maxItems )
/**
* @copydoc ItemLayout::GetNextFocusItemID()
*/
- virtual int GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+ virtual int GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled);
private:
#include <dali/public-api/animation/constraints.h>
#include <dali/devel-api/common/set-wrapper.h>
#include <dali/public-api/common/stage.h>
-#include <dali/public-api/events/mouse-wheel-event.h>
+#include <dali/public-api/events/wheel-event.h>
#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/object/type-registry.h>
#include <dali/devel-api/object/type-registry-helper.h>
const float DEFAULT_MINIMUM_SWIPE_SPEED = 1.0f;
const float DEFAULT_MINIMUM_SWIPE_DISTANCE = 3.0f;
-const float DEFAULT_MOUSE_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION = 0.1f;
+const float DEFAULT_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION = 0.1f;
const float DEFAULT_MINIMUM_SWIPE_DURATION = 0.45f;
const float DEFAULT_MAXIMUM_SWIPE_DURATION = 2.6f;
const float DEFAULT_REFRESH_INTERVAL_LAYOUT_POSITIONS = 20.0f; // 1 updates per 20 items
-const int MOUSE_WHEEL_EVENT_FINISHED_TIME_OUT = 500; // 0.5 second
+const int WHEEL_EVENT_FINISHED_TIME_OUT = 500; // 0.5 second
const float DEFAULT_ANCHORING_DURATION = 1.0f; // 1 second
}
ItemView::ItemView(ItemFactory& factory)
-: Scrollable( ControlBehaviour( DISABLE_SIZE_NEGOTIATION | REQUIRES_MOUSE_WHEEL_EVENTS | REQUIRES_KEYBOARD_NAVIGATION_SUPPORT ) ),
+: Scrollable( ControlBehaviour( DISABLE_SIZE_NEGOTIATION | REQUIRES_WHEEL_EVENTS | REQUIRES_KEYBOARD_NAVIGATION_SUPPORT ) ),
mItemFactory(factory),
mActiveLayout(NULL),
mAnimatingOvershootOn(false),
mRefreshOrderHint(true/*Refresh item 0 first*/),
mMinimumSwipeSpeed(DEFAULT_MINIMUM_SWIPE_SPEED),
mMinimumSwipeDistance(DEFAULT_MINIMUM_SWIPE_DISTANCE),
- mMouseWheelScrollDistanceStep(0.0f),
+ mWheelScrollDistanceStep(0.0f),
mScrollDistance(0.0f),
mScrollSpeed(0.0f),
mTotalPanDisplacement(Vector2::ZERO),
SetOvershootEnabled(true);
Vector2 stageSize = Stage::GetCurrent().GetSize();
- mMouseWheelScrollDistanceStep = stageSize.y * DEFAULT_MOUSE_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION;
+ mWheelScrollDistanceStep = stageSize.y * DEFAULT_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION;
EnableGestureDetection(Gesture::Type(Gesture::Pan));
- mMouseWheelEventFinishedTimer = Timer::New( MOUSE_WHEEL_EVENT_FINISHED_TIME_OUT );
- mMouseWheelEventFinishedTimer.TickSignal().Connect( this, &ItemView::OnMouseWheelEventFinished );
+ mWheelEventFinishedTimer = Timer::New( WHEEL_EVENT_FINISHED_TIME_OUT );
+ mWheelEventFinishedTimer.TickSignal().Connect( this, &ItemView::OnWheelEventFinished );
SetRefreshInterval(DEFAULT_REFRESH_INTERVAL_LAYOUT_POSITIONS);
}
return mMinimumSwipeDistance;
}
-void ItemView::SetMouseWheelScrollDistanceStep(float step)
+void ItemView::SetWheelScrollDistanceStep(float step)
{
- mMouseWheelScrollDistanceStep = step;
+ mWheelScrollDistanceStep = step;
}
-float ItemView::GetMouseWheelScrollDistanceStep() const
+float ItemView::GetWheelScrollDistanceStep() const
{
- return mMouseWheelScrollDistanceStep;
+ return mWheelScrollDistanceStep;
}
void ItemView::SetAnchoring(bool enabled)
return true; // consume since we're potentially scrolling
}
-bool ItemView::OnMouseWheelEvent(const MouseWheelEvent& event)
+bool ItemView::OnWheelEvent(const WheelEvent& event)
{
- // Respond the mouse wheel event to scroll
+ // Respond the wheel event to scroll
if (mActiveLayout)
{
Actor self = Self();
const Vector3 layoutSize = Self().GetCurrentSize();
- float layoutPositionDelta = GetCurrentLayoutPosition(0) - (event.z * mMouseWheelScrollDistanceStep * mActiveLayout->GetScrollSpeedFactor());
+ float layoutPositionDelta = GetCurrentLayoutPosition(0) - (event.z * mWheelScrollDistanceStep * mActiveLayout->GetScrollSpeedFactor());
float firstItemScrollPosition = ClampFirstItemPosition(layoutPositionDelta, layoutSize, *mActiveLayout);
self.SetProperty(Toolkit::ItemView::Property::LAYOUT_POSITION, firstItemScrollPosition );
mRefreshEnabled = true;
}
- if (mMouseWheelEventFinishedTimer.IsRunning())
+ if (mWheelEventFinishedTimer.IsRunning())
{
- mMouseWheelEventFinishedTimer.Stop();
+ mWheelEventFinishedTimer.Stop();
}
- mMouseWheelEventFinishedTimer.Start();
+ mWheelEventFinishedTimer.Start();
return true;
}
-bool ItemView::OnMouseWheelEventFinished()
+bool ItemView::OnWheelEventFinished()
{
if (mActiveLayout)
{
RemoveAnimation(mScrollAnimation);
- // No more mouse wheel events coming. Do the anchoring if enabled.
+ // No more wheel events coming. Do the anchoring if enabled.
mScrollAnimation = DoAnchoring();
if (mScrollAnimation)
{
return true;
}
-Actor ItemView::GetNextKeyboardFocusableActor(Actor actor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+Actor ItemView::GetNextKeyboardFocusableActor(Actor actor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled)
{
Actor nextFocusActor;
if(mActiveLayout)
float GetMinimumSwipeDistance() const;
/**
- * @copydoc Toolkit::ItemView::SetMouseWheelScrollDistanceStep
+ * @copydoc Toolkit::ItemView::SetWheelScrollDistanceStep
*/
- void SetMouseWheelScrollDistanceStep(float step);
+ void SetWheelScrollDistanceStep(float step);
/**
- * @copydoc Toolkit::ItemView::GetMouseWheelScrollDistanceStep
+ * @copydoc Toolkit::ItemView::GetWheelScrollDistanceStep
*/
- float GetMouseWheelScrollDistanceStep() const;
+ float GetWheelScrollDistanceStep() const;
/**
* @copydoc Toolkit::ItemView::SetAnchoring
virtual bool OnTouchEvent(const TouchEvent& event);
/**
- * From CustomActorImpl; called after a mouse-wheel-event is received by the owning actor.
- * @param[in] event The mouse wheel event.
+ * From CustomActorImpl; called after a wheel-event is received by the owning actor.
+ * @param[in] event The wheel event.
* @return True if the event should be consumed.
*/
- virtual bool OnMouseWheelEvent(const MouseWheelEvent& event);
+ virtual bool OnWheelEvent(const WheelEvent& event);
private: // From Control
/**
* @copydoc Toolkit::Control::GetNextKeyboardFocusableActor()
*/
- virtual Actor GetNextKeyboardFocusableActor(Actor actor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+ virtual Actor GetNextKeyboardFocusableActor(Actor actor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled);
/**
* @copydoc Toolkit::Control::OnKeyboardFocusChangeCommitted()
void OnOvershootOnFinished(Animation& animation);
/**
- * This is called after a timeout when no new mouse wheel event is received for a certain period of time.
+ * This is called after a timeout when no new wheel event is received for a certain period of time.
* @return will return false; one-shot timer.
*/
- bool OnMouseWheelEventFinished();
+ bool OnWheelEventFinished();
/**
* Stops and removes animation if exists.
float mMinimumSwipeSpeed;
float mMinimumSwipeDistance;
- float mMouseWheelScrollDistanceStep; ///< The step of scroll distance in actor coordinates for each mouse wheel event received.
+ float mWheelScrollDistanceStep; ///< The step of scroll distance in actor coordinates for each wheel event received.
float mScrollDistance;
float mScrollSpeed;
float mScrollOvershoot;
bool mIsFlicking;
- Timer mMouseWheelEventFinishedTimer; ///< The timer to determine whether there is no mouse wheel event received for a certain period of time.
+ Timer mWheelEventFinishedTimer; ///< The timer to determine whether there is no wheel event received for a certain period of time.
Dali::Gesture::State mGestureState;
#include <cstring> // for strcmp
#include <dali/public-api/animation/constraints.h>
#include <dali/public-api/common/stage.h>
-#include <dali/public-api/events/mouse-wheel-event.h>
+#include <dali/public-api/events/wheel-event.h>
#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/object/type-registry.h>
#include <dali/devel-api/object/type-registry-helper.h>
const float FREE_FLICK_SPEED_THRESHOLD = 200.0f; ///< Free-Flick threshold in pixels/ms
const float AUTOLOCK_AXIS_MINIMUM_DISTANCE2 = 100.0f; ///< Auto-lock axis after minimum distance squared.
const float FLICK_ORTHO_ANGLE_RANGE = 75.0f; ///< degrees. (if >45, then supports diagonal flicking)
-const Vector2 DEFAULT_MOUSE_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION = Vector2(0.17f, 0.1f); ///< The step of horizontal scroll distance in the proportion of stage size for each mouse wheel event received.
+const Vector2 DEFAULT_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION = Vector2(0.17f, 0.1f); ///< The step of horizontal scroll distance in the proportion of stage size for each wheel event received.
const unsigned long MINIMUM_TIME_BETWEEN_DOWN_AND_UP_FOR_RESET( 150u );
const float TOUCH_DOWN_TIMER_INTERVAL = 100.0f;
const float DEFAULT_SCROLL_UPDATE_DISTANCE( 30.0f ); ///< Default distance to travel in pixels for scroll update signal
}
ScrollView::ScrollView()
-: ScrollBase( ControlBehaviour( REQUIRES_MOUSE_WHEEL_EVENTS ) ), // Enable size negotiation
+: ScrollBase( ControlBehaviour( REQUIRES_WHEEL_EVENTS ) ), // Enable size negotiation
mTouchDownTime(0u),
mGestureStackDepth(0),
mScrollStateFlags(0),
mFrictionCoefficient(DEFAULT_FRICTION_COEFFICIENT),
mFlickSpeedCoefficient(DEFAULT_FLICK_SPEED_COEFFICIENT),
mMaxFlickSpeed(DEFAULT_MAX_FLICK_SPEED),
- mMouseWheelScrollDistanceStep(Vector2::ZERO),
+ mWheelScrollDistanceStep(Vector2::ZERO),
mInAccessibilityPan(false),
mInitialized(false),
mScrolling(false),
mScrollPostPosition = mScrollPrePosition = Vector2::ZERO;
- mMouseWheelScrollDistanceStep = Stage::GetCurrent().GetSize() * DEFAULT_MOUSE_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION;
+ mWheelScrollDistanceStep = Stage::GetCurrent().GetSize() * DEFAULT_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION;
mInitialized = true;
mMaxFlickSpeed = speed;
}
-void ScrollView::SetMouseWheelScrollDistanceStep(Vector2 step)
+void ScrollView::SetWheelScrollDistanceStep(Vector2 step)
{
- mMouseWheelScrollDistanceStep = step;
+ mWheelScrollDistanceStep = step;
}
-Vector2 ScrollView::GetMouseWheelScrollDistanceStep() const
+Vector2 ScrollView::GetWheelScrollDistanceStep() const
{
- return mMouseWheelScrollDistanceStep;
+ return mWheelScrollDistanceStep;
}
unsigned int ScrollView::GetCurrentPage() const
return true;
}
-bool ScrollView::OnMouseWheelEvent(const MouseWheelEvent& event)
+bool ScrollView::OnWheelEvent(const WheelEvent& event)
{
if(!mSensitive)
{
- // Ignore this mouse wheel event, if scrollview is insensitive.
+ // Ignore this wheel event, if scrollview is insensitive.
return false;
}
if(mRulerX->GetType() == Ruler::Free)
{
// Free panning mode
- targetScrollPosition.x += event.z * mMouseWheelScrollDistanceStep.x;
+ targetScrollPosition.x += event.z * mWheelScrollDistanceStep.x;
ClampPosition(targetScrollPosition);
ScrollTo(-targetScrollPosition);
}
if(mRulerY->GetType() == Ruler::Free)
{
// Free panning mode
- targetScrollPosition.y += event.z * mMouseWheelScrollDistanceStep.y;
+ targetScrollPosition.y += event.z * mWheelScrollDistanceStep.y;
ClampPosition(targetScrollPosition);
ScrollTo(-targetScrollPosition);
}
void SetMaxFlickSpeed(float speed);
/**
- * @copydoc Toolkit::ScrollView::GetMouseWheelScrollDistanceStep
+ * @copydoc Toolkit::ScrollView::GetWheelScrollDistanceStep
*/
- Vector2 GetMouseWheelScrollDistanceStep() const;
+ Vector2 GetWheelScrollDistanceStep() const;
/**
- * @copydoc Toolkit::ScrollView::SetMouseWheelScrollDistanceStep
+ * @copydoc Toolkit::ScrollView::SetWheelScrollDistanceStep
*/
- void SetMouseWheelScrollDistanceStep(Vector2 step);
+ void SetWheelScrollDistanceStep(Vector2 step);
/**
* @copydoc Toolkit::ScrollView::GetCurrentPage
virtual bool OnTouchEvent(const TouchEvent& event);
/**
- * From CustomActorImpl; called after a mouse-wheel-event is received by the owning actor.
- * @param[in] event The mouse wheel event.
+ * From CustomActorImpl; called after a wheel-event is received by the owning actor.
+ * @param[in] event The wheel event.
* @return True if the event should be consumed.
*/
- virtual bool OnMouseWheelEvent(const MouseWheelEvent& event);
+ virtual bool OnWheelEvent(const WheelEvent& event);
/**
* @copydoc Toolkit::Control::OnInitialize()
float mFlickSpeedCoefficient; ///< Flick velocity coefficient. Input touch velocity is multiplied by this.
float mMaxFlickSpeed; ///< Maximum flick speed. Maximum speed of flick in stage.lengths/sec.
- Vector2 mMouseWheelScrollDistanceStep; ///< The step of scroll distance in actor coordinates in X and Y axes for each mouse wheel event received.
+ Vector2 mWheelScrollDistanceStep; ///< The step of scroll distance in actor coordinates in X and Y axes for each wheel event received.
//ScrollInternalConstraintsPtr mScrollInternalConstraints;
Constraint mScrollMainInternalPrePositionConstraint;
{
}
-void ShadowView::OnStageConnection()
-{
- // TODO: can't call this here, since SetImage() calls fail to connect images to stage, since parent chain not fully on stage yet
- // Need to fix the stage connection so this callback can be used arbitrarily. At that point we can simplify the API by removing the need for Activate() / Deactivate()
- //Activate();
-}
-
-void ShadowView::OnStageDisconnection()
-{
- // TODO: can't call this here, since SetImage() calls fails similarly to above
- // Need to fix the stage connection so this callback can be used arbitrarily. At that point we can simplify the API by removing the need for Activate() / Deactivate()
- //Deactivate();
-}
-
void ShadowView::ConstrainCamera()
{
if( mPointLight && mShadowPlane )
virtual void OnInitialize();
virtual void OnSizeSet(const Vector3& targetSize);
- virtual void OnStageConnection();
- virtual void OnStageDisconnection();
/**
* Constrain the camera actor to the position of the point light, pointing
// nothing to do
}
-Actor TableView::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+Actor TableView::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled)
{
Actor nextFocusableActor;
switch ( direction )
{
- case Toolkit::Control::Left:
+ case Toolkit::Control::KeyboardFocus::LEFT:
{
if(--currentColumn < 0)
{
}
break;
}
- case Toolkit::Control::Right:
+ case Toolkit::Control::KeyboardFocus::RIGHT:
{
if(++currentColumn > numberOfColumns - 1)
{
}
break;
}
- case Toolkit::Control::Up:
+ case Toolkit::Control::KeyboardFocus::UP:
{
if(--currentRow < 0)
{
}
break;
}
- case Toolkit::Control::Down:
+ case Toolkit::Control::KeyboardFocus::DOWN:
{
if(++currentRow > numberOfRows - 1)
/**
* @copydoc Control::GetNextKeyboardFocusableActor
*/
- virtual Actor GetNextKeyboardFocusableActor( Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled );
+ virtual Actor GetNextKeyboardFocusableActor( Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled );
/**
* @copydoc Control::GetNaturalSize()
{
impl.mRenderingBackend = backend;
impl.mRenderer.Reset();
+ impl.RequestTextRelayout();
}
break;
}
{
if( impl.mController )
{
- std::string text = value.Get< std::string >();
+ const std::string text = value.Get< std::string >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p TEXT %s\n", impl.mController.Get(), text.c_str() );
impl.mController->SetText( text );
{
if( impl.mController )
{
- std::string text = value.Get< std::string >();
+ const std::string text = value.Get< std::string >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p PLACEHOLDER_TEXT %s\n", impl.mController.Get(), text.c_str() );
impl.mController->SetPlaceholderText( PLACEHOLDER_TYPE_INACTIVE, text );
{
if( impl.mController )
{
- std::string text = value.Get< std::string >();
+ const std::string text = value.Get< std::string >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p PLACEHOLDER_TEXT_FOCUSED %s\n", impl.mController.Get(), text.c_str() );
impl.mController->SetPlaceholderText( PLACEHOLDER_TYPE_ACTIVE, text );
{
if( impl.mController )
{
- std::string fontFamily = value.Get< std::string >();
+ const std::string fontFamily = value.Get< std::string >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p FONT_FAMILY %s\n", impl.mController.Get(), fontFamily.c_str() );
if( impl.mController->GetDefaultFontFamily() != fontFamily )
{
impl.mController->SetDefaultFontFamily( fontFamily );
- impl.RequestTextRelayout();
}
}
break;
{
if( impl.mController )
{
- std::string fontStyle = value.Get< std::string >();
+ const std::string fontStyle = value.Get< std::string >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p FONT_STYLE %s\n", impl.mController.Get(), fontStyle.c_str() );
if( impl.mController->GetDefaultFontStyle() != fontStyle )
{
impl.mController->SetDefaultFontStyle( fontStyle );
- impl.RequestTextRelayout();
}
}
break;
{
if( impl.mController )
{
- float pointSize = value.Get< float >();
+ const float pointSize = value.Get< float >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p FONT_STYLE %f\n", impl.mController.Get(), pointSize );
if( !Equals( impl.mController->GetDefaultPointSize(), pointSize ) )
{
impl.mController->SetDefaultPointSize( pointSize );
- impl.RequestTextRelayout();
}
}
break;
{
if( impl.mController )
{
- std::string alignStr = value.Get< std::string >();
+ const std::string alignStr = value.Get< std::string >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p HORIZONTAL_ALIGNMENT %f\n", impl.mController.Get(), alignStr.c_str() );
- LayoutEngine& engine = impl.mController->GetLayoutEngine();
- LayoutEngine::HorizontalAlignment alignment = Scripting::GetEnumeration< LayoutEngine::HorizontalAlignment >( alignStr.c_str(),
+ const LayoutEngine::HorizontalAlignment alignment = Scripting::GetEnumeration< LayoutEngine::HorizontalAlignment >( alignStr.c_str(),
HORIZONTAL_ALIGNMENT_STRING_TABLE,
HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT );
- if( engine.GetHorizontalAlignment() != alignment )
- {
- engine.SetHorizontalAlignment( alignment );
- impl.RequestTextRelayout();
- }
+ impl.mController->SetHorizontalAlignment( alignment );
}
break;
}
{
if( impl.mController )
{
- std::string alignStr = value.Get< std::string >();
+ const std::string alignStr = value.Get< std::string >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p VERTICAL_ALIGNMENT %f\n", impl.mController.Get(), alignStr.c_str() );
- LayoutEngine& engine = impl.mController->GetLayoutEngine();
LayoutEngine::VerticalAlignment alignment = Scripting::GetEnumeration< LayoutEngine::VerticalAlignment >( alignStr.c_str(),
VERTICAL_ALIGNMENT_STRING_TABLE,
VERTICAL_ALIGNMENT_STRING_TABLE_COUNT );
- if( engine.GetVerticalAlignment() != alignment )
- {
- engine.SetVerticalAlignment( alignment );
- impl.RequestTextRelayout();
- }
+ impl.mController->SetVerticalAlignment( alignment );
}
break;
}
case Toolkit::TextField::Property::TEXT_COLOR:
{
- if ( impl.mController )
+ if( impl.mController )
{
- Vector4 textColor = value.Get< Vector4 >();
+ const Vector4 textColor = value.Get< Vector4 >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p TEXT_COLOR %f,%f,%f,%f\n", impl.mController.Get(), textColor.r, textColor.g, textColor.b, textColor.a );
- if ( impl.mController->GetTextColor() != textColor )
+ if( impl.mController->GetTextColor() != textColor )
{
impl.mController->SetTextColor( textColor );
- impl.RequestTextRelayout();
+ impl.mRenderer.Reset();
}
}
break;
}
case Toolkit::TextField::Property::PLACEHOLDER_TEXT_COLOR:
{
- if ( impl.mController )
+ if( impl.mController )
{
- Vector4 textColor = value.Get< Vector4 >();
+ const Vector4 textColor = value.Get< Vector4 >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p PLACEHOLDER_TEXT_COLOR %f,%f,%f,%f\n", impl.mController.Get(), textColor.r, textColor.g, textColor.b, textColor.a );
- if ( impl.mController->GetPlaceholderTextColor() != textColor )
+ if( impl.mController->GetPlaceholderTextColor() != textColor )
{
impl.mController->SetPlaceholderTextColor( textColor );
- impl.RequestTextRelayout();
+ impl.mRenderer.Reset();
}
}
break;
{
if( impl.mController )
{
- Vector2 shadowOffset = value.Get< Vector2 >();
+ const Vector2 shadowOffset = value.Get< Vector2 >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p SHADOW_OFFSET %f,%f\n", impl.mController.Get(), shadowOffset.x, shadowOffset.y );
if ( impl.mController->GetShadowOffset() != shadowOffset )
{
impl.mController->SetShadowOffset( shadowOffset );
- impl.RequestTextRelayout();
+ impl.mRenderer.Reset();
}
}
break;
{
if( impl.mController )
{
- Vector4 shadowColor = value.Get< Vector4 >();
+ const Vector4 shadowColor = value.Get< Vector4 >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p SHADOW_COLOR %f,%f,%f,%f\n", impl.mController.Get(), shadowColor.r, shadowColor.g, shadowColor.b, shadowColor.a );
if ( impl.mController->GetShadowColor() != shadowColor )
{
impl.mController->SetShadowColor( shadowColor );
- impl.RequestTextRelayout();
+ impl.mRenderer.Reset();
}
}
break;
{
if( impl.mDecorator )
{
- Vector4 color = value.Get< Vector4 >();
+ const Vector4 color = value.Get< Vector4 >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p PRIMARY_CURSOR_COLOR %f,%f\n", impl.mController.Get(), color.r, color.g, color.b, color.a );
impl.mDecorator->SetColor( PRIMARY_CURSOR, color );
+ impl.RequestTextRelayout();
}
break;
}
{
if( impl.mDecorator )
{
- Vector4 color = value.Get< Vector4 >();
+ const Vector4 color = value.Get< Vector4 >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p SECONDARY_CURSOR_COLOR %f,%f\n", impl.mController.Get(), color.r, color.g, color.b, color.a );
impl.mDecorator->SetColor( SECONDARY_CURSOR, color );
+ impl.RequestTextRelayout();
}
break;
}
{
if( impl.mController )
{
- bool enable = value.Get< bool >();
+ const bool enable = value.Get< bool >();
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p ENABLE_CURSOR_BLINK %d\n", impl.mController.Get(), enable );
impl.mController->SetEnableCursorBlink( enable );
+ impl.RequestTextRelayout();
}
break;
}
{
if( impl.mDecorator )
{
- float interval = value.Get< float >();
+ const float interval = value.Get< float >();
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p CURSOR_BLINK_INTERVAL %f\n", impl.mController.Get(), interval );
impl.mDecorator->SetCursorBlinkInterval( interval );
{
if( impl.mDecorator )
{
- float duration = value.Get< float >();
+ const float duration = value.Get< float >();
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p CURSOR_BLINK_INTERVAL %f\n", impl.mController.Get(), duration );
impl.mDecorator->SetCursorBlinkDuration( duration );
}
case Toolkit::TextField::Property::GRAB_HANDLE_IMAGE:
{
- ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+ const ResourceImage image = ResourceImage::New( value.Get< std::string >() );
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p GRAB_HANDLE_IMAGE %s\n", impl.mController.Get(), image.GetUrl().c_str() );
if( impl.mDecorator )
{
impl.mDecorator->SetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_RELEASED, image );
+ impl.RequestTextRelayout();
}
break;
}
case Toolkit::TextField::Property::GRAB_HANDLE_PRESSED_IMAGE:
{
- ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+ const ResourceImage image = ResourceImage::New( value.Get< std::string >() );
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p GRAB_HANDLE_PRESSED_IMAGE %s\n", impl.mController.Get(), image.GetUrl().c_str() );
if( impl.mDecorator )
{
impl.mDecorator->SetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_PRESSED, image );
+ impl.RequestTextRelayout();
}
break;
}
case Toolkit::TextField::Property::SCROLL_THRESHOLD:
{
- float threshold = value.Get< float >();
+ const float threshold = value.Get< float >();
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p SCROLL_THRESHOLD %f\n", impl.mController.Get(), threshold );
if( impl.mDecorator )
}
case Toolkit::TextField::Property::SCROLL_SPEED:
{
- float speed = value.Get< float >();
+ const float speed = value.Get< float >();
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p SCROLL_SPEED %f\n", impl.mController.Get(), speed );
if( impl.mDecorator )
}
case Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_LEFT:
{
- ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+ const ResourceImage image = ResourceImage::New( value.Get< std::string >() );
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p SELECTION_HANDLE_IMAGE_LEFT %f\n", impl.mController.Get(), image.GetUrl().c_str() );
if( impl.mDecorator )
{
impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE, HANDLE_IMAGE_RELEASED, image );
+ impl.RequestTextRelayout();
}
break;
}
case Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_RIGHT:
{
- ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+ const ResourceImage image = ResourceImage::New( value.Get< std::string >() );
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p SELECTION_HANDLE_IMAGE_RIGHT %f\n", impl.mController.Get(), image.GetUrl().c_str() );
if( impl.mDecorator )
{
impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE, HANDLE_IMAGE_RELEASED, image );
+ impl.RequestTextRelayout();
}
break;
}
case Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT:
{
- ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+ const ResourceImage image = ResourceImage::New( value.Get< std::string >() );
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p SELECTION_HANDLE_PRESSED_IMAGE_LEFT %f\n", impl.mController.Get(), image.GetUrl().c_str() );
if( impl.mDecorator )
{
impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE, HANDLE_IMAGE_PRESSED, image );
+ impl.RequestTextRelayout();
}
break;
}
case Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT:
{
- ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+ const ResourceImage image = ResourceImage::New( value.Get< std::string >() );
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p SELECTION_HANDLE_PRESSED_IMAGE_RIGHT %f\n", impl.mController.Get(), image.GetUrl().c_str() );
if( impl.mDecorator )
{
impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE, HANDLE_IMAGE_PRESSED, image );
+ impl.RequestTextRelayout();
}
break;
}
case Toolkit::TextField::Property::SELECTION_HIGHLIGHT_COLOR:
{
- Vector4 color = value.Get< Vector4 >();
+ const Vector4 color = value.Get< Vector4 >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p SELECTION_HIGHLIGHT_COLOR %f,%f\n", impl.mController.Get(), color.r, color.g, color.b, color.a );
if( impl.mDecorator )
{
impl.mDecorator->SetHighlightColor( color );
+ impl.RequestTextRelayout();
}
break;
}
{
if( impl.mDecorator )
{
- Rect<int> box = value.Get< Rect<int> >();
+ const Rect<int> box = value.Get< Rect<int> >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p DECORATION_BOUNDING_BOX %d,%d %dx%d\n", impl.mController.Get(), box.x, box.y, box.width, box.height );
impl.mDecorator->SetBoundingBox( box );
+ impl.RequestTextRelayout();
}
break;
}
{
if( impl.mController )
{
- int max = value.Get< int >();
+ const int max = value.Get< int >();
DALI_LOG_INFO( gLogFilter, Debug::General, "TextField %p MAX_LENGTH %d\n", impl.mController.Get(), max );
impl.mController->SetMaximumNumberOfCharacters( max );
}
case Toolkit::TextField::Property::INPUT_METHOD_SETTINGS:
{
- // Empty implementation for now.
- Property::Map map = value.Get<Property::Map>();
+ const Property::Map map = value.Get<Property::Map>();
VirtualKeyboard::ApplySettings( map );
break;
}
}
break;
}
+ case Toolkit::TextField::Property::FONT_FAMILY:
+ {
+ if( impl.mController )
+ {
+ value = impl.mController->GetDefaultFontFamily();
+ }
+ break;
+ }
+ case Toolkit::TextField::Property::FONT_STYLE:
+ {
+ if( impl.mController )
+ {
+ value = impl.mController->GetDefaultFontStyle();
+ }
+ break;
+ }
+ case Toolkit::TextField::Property::POINT_SIZE:
+ {
+ if( impl.mController )
+ {
+ value = impl.mController->GetDefaultPointSize();
+ }
+ break;
+ }
case Toolkit::TextField::Property::EXCEED_POLICY:
{
value = impl.mExceedPolicy;
GetTapGestureDetector().SetMaximumTapsRequired( 2 );
EnableGestureDetection(Gesture::Pan);
+ self.TouchedSignal().Connect( this, &TextField::OnTouched );
+
// Set BoundingBox to stage size if not already set.
if ( mDecorator->GetBoundingBox().IsEmpty() )
{
ImfManager::ImfCallbackData TextField::OnImfEvent( Dali::ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent )
{
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnImfEvent %p eventName %d\n", mController.Get(), imfEvent.eventName );
-
- bool update( false );
-
- std::string text;
- unsigned int cursorPosition( 0 );
-
- switch ( imfEvent.eventName )
- {
- case ImfManager::COMMIT:
- {
- mController->InsertText( imfEvent.predictiveString, Text::Controller::COMMIT );
- break;
- }
- case ImfManager::PREEDIT:
- {
- mController->InsertText( imfEvent.predictiveString, Text::Controller::PRE_EDIT );
- update = true;
- break;
- }
- case ImfManager::DELETESURROUNDING:
- {
- mController->RemoveText( imfEvent.cursorOffset, imfEvent.numberOfChars );
- break;
- }
- case ImfManager::GETSURROUNDING:
- {
- mController->GetText( text );
- cursorPosition = mController->GetLogicalCursorPosition();
-
- imfManager.SetSurroundingText( text );
- imfManager.SetCursorPosition( cursorPosition );
- break;
- }
- case ImfManager::VOID:
- {
- // do nothing
- break;
- }
- } // end switch
-
- if( ImfManager::GETSURROUNDING != imfEvent.eventName )
- {
- mController->GetText( text );
- cursorPosition = mController->GetLogicalCursorPosition();
- }
-
- ImfManager::ImfCallbackData callbackData( update, cursorPosition, text, false );
-
- return callbackData;
+ return mController->OnImfEvent( imfManager, imfEvent );
}
void TextField::RequestTextRelayout()
}
}
+bool TextField::OnTouched( Actor actor, const TouchEvent& event )
+{
+ return true;
+}
+
TextField::TextField()
: Control( ControlBehaviour( REQUIRES_STYLE_CHANGE_SIGNALS ) ),
mRenderingBackend( DEFAULT_RENDERING_BACKEND ),
*
*/
-// EXTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/imf-manager.h>
-
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/public-api/controls/text-controls/text-field.h>
virtual bool OnKeyEvent(const KeyEvent& event);
/**
- * @brief Event received from IMF manager
- *
- * @param[in] imfManager The IMF manager.
- * @param[in] imfEvent The event received.
- * @return A data struture indicating if update is needed, cursor position and current text.
+ * @copydoc Dali::Toolkit::Text::Controller::(ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent)
*/
ImfManager::ImfCallbackData OnImfEvent( ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent );
void KeyboardStatusChanged( bool keyboardShown );
/**
+ * @brief Callback when Textfield is touched
+ *
+ * @param[in] actor TextField touched
+ * @param[in] event TouchEvent information
+ */
+ bool OnTouched( Actor actor, const TouchEvent& event );
+
+ /**
* Construct a new TextField.
*/
TextField();
{
case Toolkit::TextLabel::Property::RENDERING_BACKEND:
{
- int backend = value.Get< int >();
+ const int backend = value.Get< int >();
if( impl.mRenderingBackend != backend )
{
if( impl.mController )
{
impl.mController->SetText( value.Get< std::string >() );
- impl.RequestTextRelayout();
}
break;
}
{
if( impl.mController )
{
- std::string fontFamily = value.Get< std::string >();
+ const std::string fontFamily = value.Get< std::string >();
if( impl.mController->GetDefaultFontFamily() != fontFamily )
{
impl.mController->SetDefaultFontFamily( fontFamily );
- impl.RequestTextRelayout();
}
}
break;
{
if( impl.mController )
{
- std::string fontStyle = value.Get< std::string >();
+ const std::string fontStyle = value.Get< std::string >();
if( impl.mController->GetDefaultFontStyle() != fontStyle )
{
impl.mController->SetDefaultFontStyle( fontStyle );
- impl.RequestTextRelayout();
}
}
break;
{
if( impl.mController )
{
- float pointSize = value.Get< float >();
+ const float pointSize = value.Get< float >();
if( !Equals( impl.mController->GetDefaultPointSize(), pointSize ) )
{
impl.mController->SetDefaultPointSize( pointSize );
- impl.RequestTextRelayout();
}
}
break;
{
if( impl.mController )
{
- LayoutEngine& engine = impl.mController->GetLayoutEngine();
- LayoutEngine::Layout layout = value.Get< bool >() ? LayoutEngine::MULTI_LINE_BOX : LayoutEngine::SINGLE_LINE_BOX;
-
- if( engine.GetLayout() != layout )
- {
- engine.SetLayout( layout );
- impl.RequestTextRelayout();
- }
+ impl.mController->SetMultiLineEnabled( value.Get< bool >() );
}
break;
}
case Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT:
{
- LayoutEngine& engine = impl.mController->GetLayoutEngine();
- const LayoutEngine::HorizontalAlignment alignment = Scripting::GetEnumeration< Toolkit::Text::LayoutEngine::HorizontalAlignment >( value.Get< std::string >().c_str(),
- HORIZONTAL_ALIGNMENT_STRING_TABLE,
- HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT );
-
- if( engine.GetHorizontalAlignment() != alignment )
+ if( impl.mController )
{
- engine.SetHorizontalAlignment( alignment );
- impl.RequestTextRelayout();
+ const LayoutEngine::HorizontalAlignment alignment = Scripting::GetEnumeration< Toolkit::Text::LayoutEngine::HorizontalAlignment >( value.Get< std::string >().c_str(),
+ HORIZONTAL_ALIGNMENT_STRING_TABLE,
+ HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT );
+
+ impl.mController->SetHorizontalAlignment( alignment );
}
break;
}
case Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT:
{
- LayoutEngine& engine = impl.mController->GetLayoutEngine();
- const LayoutEngine::VerticalAlignment alignment = Scripting::GetEnumeration< Toolkit::Text::LayoutEngine::VerticalAlignment >( value.Get< std::string >().c_str(),
- VERTICAL_ALIGNMENT_STRING_TABLE,
- VERTICAL_ALIGNMENT_STRING_TABLE_COUNT );
-
- if( engine.GetVerticalAlignment() != alignment )
+ if( impl.mController )
{
- engine.SetVerticalAlignment( alignment );
- impl.RequestTextRelayout();
+ const LayoutEngine::VerticalAlignment alignment = Scripting::GetEnumeration< Toolkit::Text::LayoutEngine::VerticalAlignment >( value.Get< std::string >().c_str(),
+ VERTICAL_ALIGNMENT_STRING_TABLE,
+ VERTICAL_ALIGNMENT_STRING_TABLE_COUNT );
+
+ impl.mController->SetVerticalAlignment( alignment );
}
break;
}
case Toolkit::TextLabel::Property::TEXT_COLOR:
{
- if ( impl.mController )
+ if( impl.mController )
{
- Vector4 textColor = value.Get< Vector4 >();
- if ( impl.mController->GetTextColor() != textColor )
+ const Vector4 textColor = value.Get< Vector4 >();
+ if( impl.mController->GetTextColor() != textColor )
{
impl.mController->SetTextColor( textColor );
- impl.RequestTextRelayout();
+ impl.mRenderer.Reset();
}
}
break;
{
if( impl.mController )
{
- Vector2 shadowOffset = value.Get< Vector2 >();
+ const Vector2 shadowOffset = value.Get< Vector2 >();
if ( impl.mController->GetShadowOffset() != shadowOffset )
{
impl.mController->SetShadowOffset( shadowOffset );
- impl.RequestTextRelayout();
+ impl.mRenderer.Reset();
}
}
break;
{
if( impl.mController )
{
- Vector4 shadowColor = value.Get< Vector4 >();
+ const Vector4 shadowColor = value.Get< Vector4 >();
if ( impl.mController->GetShadowColor() != shadowColor )
{
impl.mController->SetShadowColor( shadowColor );
- impl.RequestTextRelayout();
+ impl.mRenderer.Reset();
}
}
break;
{
if( impl.mController )
{
- Vector4 color = value.Get< Vector4 >();
+ const Vector4 color = value.Get< Vector4 >();
if ( impl.mController->GetUnderlineColor() != color )
{
impl.mController->SetUnderlineColor( color );
- impl.RequestTextRelayout();
+ impl.mRenderer.Reset();
}
}
break;
{
if( impl.mController )
{
- bool enabled = value.Get< bool >();
+ const bool enabled = value.Get< bool >();
if ( impl.mController->IsUnderlineEnabled() != enabled )
{
impl.mController->SetUnderlineEnabled( enabled );
- impl.RequestTextRelayout();
+ impl.mRenderer.Reset();
}
}
break;
if ( impl.mController->GetUnderlineHeight() != height )
{
impl.mController->SetUnderlineHeight( height );
- impl.RequestTextRelayout();
+ impl.mRenderer.Reset();
}
}
break;
}
break;
}
+ case Toolkit::TextLabel::Property::FONT_FAMILY:
+ {
+ if( impl.mController )
+ {
+ value = impl.mController->GetDefaultFontFamily();
+ }
+ break;
+ }
+ case Toolkit::TextLabel::Property::FONT_STYLE:
+ {
+ if( impl.mController )
+ {
+ value = impl.mController->GetDefaultFontStyle();
+ }
+ break;
+ }
+ case Toolkit::TextLabel::Property::POINT_SIZE:
+ {
+ if( impl.mController )
+ {
+ value = impl.mController->GetDefaultPointSize();
+ }
+ break;
+ }
case Toolkit::TextLabel::Property::MULTI_LINE:
{
if( impl.mController )
{
- value = static_cast<bool>( LayoutEngine::MULTI_LINE_BOX == impl.mController->GetLayoutEngine().GetLayout() );
+ value = impl.mController->IsMultiLineEnabled();
}
break;
}
{
if( impl.mController )
{
- value = std::string( Scripting::GetEnumerationName< Toolkit::Text::LayoutEngine::HorizontalAlignment >( impl.mController->GetLayoutEngine().GetHorizontalAlignment(),
+ value = std::string( Scripting::GetEnumerationName< Toolkit::Text::LayoutEngine::HorizontalAlignment >( impl.mController->GetHorizontalAlignment(),
HORIZONTAL_ALIGNMENT_STRING_TABLE,
HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT ) );
}
{
if( impl.mController )
{
- value = std::string( Scripting::GetEnumerationName< Toolkit::Text::LayoutEngine::VerticalAlignment >( impl.mController->GetLayoutEngine().GetVerticalAlignment(),
+ value = std::string( Scripting::GetEnumerationName< Toolkit::Text::LayoutEngine::VerticalAlignment >( impl.mController->GetVerticalAlignment(),
VERTICAL_ALIGNMENT_STRING_TABLE,
VERTICAL_ALIGNMENT_STRING_TABLE_COUNT ) );
}
$(toolkit_src_dir)/controls/text-controls/text-label-impl.cpp \
$(toolkit_src_dir)/controls/text-controls/text-selection-popup-impl.cpp \
$(toolkit_src_dir)/controls/tool-bar/tool-bar-impl.cpp \
- $(toolkit_src_dir)/focus-manager/focus-manager-impl.cpp \
+ $(toolkit_src_dir)/focus-manager/accessibility-focus-manager-impl.cpp \
$(toolkit_src_dir)/focus-manager/keyboard-focus-manager-impl.cpp \
$(toolkit_src_dir)/focus-manager/keyinput-focus-manager-impl.cpp \
$(toolkit_src_dir)/filters/blur-two-pass-filter.cpp \
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 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.
*/
// CLASS HEADER
-#include "focus-manager-impl.h"
+#include "accessibility-focus-manager-impl.h"
// EXTERNAL INCLUDES
#include <cstring> // for strcmp
}
-FocusManager::FocusManager()
+AccessibilityFocusManager::AccessibilityFocusManager()
: mIsWrapped(false),
mIsFocusWithinGroup(false),
mIsEndcapFeedbackEnabled(false),
ChangeAccessibilityStatus();
}
-FocusManager::~FocusManager()
+AccessibilityFocusManager::~AccessibilityFocusManager()
{
}
-FocusManager::ActorAdditionalInfo FocusManager::GetActorAdditionalInfo(const unsigned int actorID) const
+AccessibilityFocusManager::ActorAdditionalInfo AccessibilityFocusManager::GetActorAdditionalInfo(const unsigned int actorID) const
{
ActorAdditionalInfo data;
IDAdditionalInfoConstIter iter = mIDAdditionalInfoContainer.find(actorID);
return data;
}
-void FocusManager::SynchronizeActorAdditionalInfo(const unsigned int actorID, const unsigned int order)
+void AccessibilityFocusManager::SynchronizeActorAdditionalInfo(const unsigned int actorID, const unsigned int order)
{
ActorAdditionalInfo actorInfo = GetActorAdditionalInfo(actorID);
actorInfo.mFocusOrder = order;
mIDAdditionalInfoContainer.insert(IDAdditionalInfoPair(actorID, actorInfo));
}
-void FocusManager::SetAccessibilityAttribute(Actor actor, Toolkit::FocusManager::AccessibilityAttribute type, const std::string& text)
+void AccessibilityFocusManager::SetAccessibilityAttribute(Actor actor, Toolkit::AccessibilityFocusManager::AccessibilityAttribute type, const std::string& text)
{
if(actor)
{
}
}
-std::string FocusManager::GetAccessibilityAttribute(Actor actor, Toolkit::FocusManager::AccessibilityAttribute type) const
+std::string AccessibilityFocusManager::GetAccessibilityAttribute(Actor actor, Toolkit::AccessibilityFocusManager::AccessibilityAttribute type) const
{
std::string text;
return text;
}
-void FocusManager::SetFocusOrder(Actor actor, const unsigned int order)
+void AccessibilityFocusManager::SetFocusOrder(Actor actor, const unsigned int order)
{
// Do nothing if the focus order of the actor is not changed.
if(actor && GetFocusOrder(actor) != order)
}
}
-unsigned int FocusManager::GetFocusOrder(Actor actor) const
+unsigned int AccessibilityFocusManager::GetFocusOrder(Actor actor) const
{
unsigned int focusOrder = 0;
return focusOrder;
}
-unsigned int FocusManager::GenerateNewFocusOrder() const
+unsigned int AccessibilityFocusManager::GenerateNewFocusOrder() const
{
unsigned int order = 1;
FocusIDContainer::const_reverse_iterator iter = mFocusIDContainer.rbegin();
return order;
}
-Actor FocusManager::GetActorByFocusOrder(const unsigned int order)
+Actor AccessibilityFocusManager::GetActorByFocusOrder(const unsigned int order)
{
Actor actor = Actor();
return actor;
}
-bool FocusManager::SetCurrentFocusActor(Actor actor)
+bool AccessibilityFocusManager::SetCurrentFocusActor(Actor actor)
{
if(actor)
{
return false;
}
-bool FocusManager::DoSetCurrentFocusActor(const unsigned int actorID)
+bool AccessibilityFocusManager::DoSetCurrentFocusActor(const unsigned int actorID)
{
Actor rootActor = Stage::GetCurrent().GetRootLayer();
// Combine attribute texts to one text
std::string informationText;
- for(int i = 0; i < Toolkit::FocusManager::ACCESSIBILITY_ATTRIBUTE_NUM; i++)
+ for(int i = 0; i < Toolkit::AccessibilityFocusManager::ACCESSIBILITY_ATTRIBUTE_NUM; i++)
{
if(!GetActorAdditionalInfo(actorID).mAccessibilityAttributes[i].empty())
{
return false;
}
-Actor FocusManager::GetCurrentFocusActor()
+Actor AccessibilityFocusManager::GetCurrentFocusActor()
{
Actor rootActor = Stage::GetCurrent().GetRootLayer();
return rootActor.FindChildById(mCurrentFocusActor.second);
}
-Actor FocusManager::GetCurrentFocusGroup()
+Actor AccessibilityFocusManager::GetCurrentFocusGroup()
{
return GetFocusGroup(GetCurrentFocusActor());
}
-unsigned int FocusManager::GetCurrentFocusOrder()
+unsigned int AccessibilityFocusManager::GetCurrentFocusOrder()
{
return mCurrentFocusActor.first;
}
-bool FocusManager::MoveFocusForward()
+bool AccessibilityFocusManager::MoveFocusForward()
{
bool ret = false;
mRecursiveFocusMoveCounter = 0;
return ret;
}
-bool FocusManager::MoveFocusBackward()
+bool AccessibilityFocusManager::MoveFocusBackward()
{
bool ret = false;
mRecursiveFocusMoveCounter = 0;
return ret;
}
-void FocusManager::DoActivate(Actor actor)
+void AccessibilityFocusManager::DoActivate(Actor actor)
{
if(actor)
{
}
}
-void FocusManager::ClearFocus()
+void AccessibilityFocusManager::ClearFocus()
{
Actor actor = GetCurrentFocusActor();
if(actor)
}
}
-void FocusManager::Reset()
+void AccessibilityFocusManager::Reset()
{
ClearFocus();
mFocusIDContainer.clear();
mIDAdditionalInfoContainer.clear();
}
-void FocusManager::SetFocusGroup(Actor actor, bool isFocusGroup)
+void AccessibilityFocusManager::SetFocusGroup(Actor actor, bool isFocusGroup)
{
if(actor)
{
}
}
-bool FocusManager::IsFocusGroup(Actor actor) const
+bool AccessibilityFocusManager::IsFocusGroup(Actor actor) const
{
// Check whether the actor is a focus group
bool isFocusGroup = false;
return isFocusGroup;
}
-Actor FocusManager::GetFocusGroup(Actor actor)
+Actor AccessibilityFocusManager::GetFocusGroup(Actor actor)
{
// Go through the actor's hierarchy to check which focus group the actor belongs to
while (actor && !IsFocusGroup(actor))
return actor;
}
-void FocusManager::SetGroupMode(bool enabled)
+void AccessibilityFocusManager::SetGroupMode(bool enabled)
{
mIsFocusWithinGroup = enabled;
}
-bool FocusManager::GetGroupMode() const
+bool AccessibilityFocusManager::GetGroupMode() const
{
return mIsFocusWithinGroup;
}
-void FocusManager::SetWrapMode(bool wrapped)
+void AccessibilityFocusManager::SetWrapMode(bool wrapped)
{
mIsWrapped = wrapped;
}
-bool FocusManager::GetWrapMode() const
+bool AccessibilityFocusManager::GetWrapMode() const
{
return mIsWrapped;
}
-void FocusManager::SetFocusIndicatorActor(Actor indicator)
+void AccessibilityFocusManager::SetFocusIndicatorActor(Actor indicator)
{
mFocusIndicatorActor = indicator;
}
-Actor FocusManager::GetFocusIndicatorActor()
+Actor AccessibilityFocusManager::GetFocusIndicatorActor()
{
return mFocusIndicatorActor;
}
-bool FocusManager::DoMoveFocus(FocusIDIter focusIDIter, bool forward, bool wrapped)
+bool AccessibilityFocusManager::DoMoveFocus(FocusIDIter focusIDIter, bool forward, bool wrapped)
{
DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] %d focusable actors\n", __FUNCTION__, __LINE__, mFocusIDContainer.size());
DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] focus order : %d\n", __FUNCTION__, __LINE__, (*focusIDIter).first);
{
DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] Overshot\n", __FUNCTION__, __LINE__);
// Send notification for handling overshooted situation
- mFocusOvershotSignal.Emit(GetCurrentFocusActor(), forward ? Toolkit::FocusManager::OVERSHOT_NEXT : Toolkit::FocusManager::OVERSHOT_PREVIOUS);
+ mFocusOvershotSignal.Emit(GetCurrentFocusActor(), forward ? Toolkit::AccessibilityFocusManager::OVERSHOT_NEXT : Toolkit::AccessibilityFocusManager::OVERSHOT_PREVIOUS);
return false; // Try to move the focus out of the scope
}
return true;
}
-void FocusManager::SetFocusable(Actor actor, bool focusable)
+void AccessibilityFocusManager::SetFocusable(Actor actor, bool focusable)
{
if(actor)
{
}
}
-void FocusManager::CreateDefaultFocusIndicatorActor()
+void AccessibilityFocusManager::CreateDefaultFocusIndicatorActor()
{
// Create a focus indicator actor shared by all the focusable actors
Image borderImage = ResourceImage::New(FOCUS_BORDER_IMAGE_PATH);
SetFocusIndicatorActor(focusIndicator);
}
-bool FocusManager::ChangeAccessibilityStatus()
+bool AccessibilityFocusManager::ChangeAccessibilityStatus()
{
AccessibilityManager manager = AccessibilityManager::Get();
mIsAccessibilityTtsEnabled = manager.IsEnabled();
return true;
}
-bool FocusManager::AccessibilityActionNext(bool allowEndFeedback)
+bool AccessibilityFocusManager::AccessibilityActionNext(bool allowEndFeedback)
{
if(mIsAccessibilityTtsEnabled)
{
}
}
-bool FocusManager::AccessibilityActionPrevious(bool allowEndFeedback)
+bool AccessibilityFocusManager::AccessibilityActionPrevious(bool allowEndFeedback)
{
if(mIsAccessibilityTtsEnabled)
{
}
}
-bool FocusManager::AccessibilityActionActivate()
+bool AccessibilityFocusManager::AccessibilityActionActivate()
{
bool ret = false;
return ret;
}
-bool FocusManager::AccessibilityActionRead(bool allowReadAgain)
+bool AccessibilityFocusManager::AccessibilityActionRead(bool allowReadAgain)
{
bool ret = false;
return ret;
}
-bool FocusManager::AccessibilityActionReadNext(bool allowEndFeedback)
+bool AccessibilityFocusManager::AccessibilityActionReadNext(bool allowEndFeedback)
{
if(mIsAccessibilityTtsEnabled)
{
}
}
-bool FocusManager::AccessibilityActionReadPrevious(bool allowEndFeedback)
+bool AccessibilityFocusManager::AccessibilityActionReadPrevious(bool allowEndFeedback)
{
if(mIsAccessibilityTtsEnabled)
{
}
}
-bool FocusManager::AccessibilityActionUp()
+bool AccessibilityFocusManager::AccessibilityActionUp()
{
bool ret = false;
return ret;
}
-bool FocusManager::AccessibilityActionDown()
+bool AccessibilityFocusManager::AccessibilityActionDown()
{
bool ret = false;
return ret;
}
-bool FocusManager::ClearAccessibilityFocus()
+bool AccessibilityFocusManager::ClearAccessibilityFocus()
{
if(mIsAccessibilityTtsEnabled)
{
}
}
-bool FocusManager::AccessibilityActionBack()
+bool AccessibilityFocusManager::AccessibilityActionBack()
{
// TODO: Back to previous view
return mIsAccessibilityTtsEnabled;
}
-bool FocusManager::AccessibilityActionTouch(const TouchEvent& touchEvent)
+bool AccessibilityFocusManager::AccessibilityActionTouch(const TouchEvent& touchEvent)
{
bool handled = false;
return handled;
}
-bool FocusManager::HandlePanGesture(const Integration::PanGestureEvent& panEvent)
+bool AccessibilityFocusManager::HandlePanGesture(const Integration::PanGestureEvent& panEvent)
{
bool handled = false;
return handled;
}
-Toolkit::FocusManager::FocusChangedSignalType& FocusManager::FocusChangedSignal()
+Toolkit::AccessibilityFocusManager::FocusChangedSignalType& AccessibilityFocusManager::FocusChangedSignal()
{
return mFocusChangedSignal;
}
-Toolkit::FocusManager::FocusOvershotSignalType& FocusManager::FocusOvershotSignal()
+Toolkit::AccessibilityFocusManager::FocusOvershotSignalType& AccessibilityFocusManager::FocusOvershotSignal()
{
return mFocusOvershotSignal;
}
-Toolkit::FocusManager::FocusedActorActivatedSignalType& FocusManager::FocusedActorActivatedSignal()
+Toolkit::AccessibilityFocusManager::FocusedActorActivatedSignalType& AccessibilityFocusManager::FocusedActorActivatedSignal()
{
return mFocusedActorActivatedSignal;
}
-bool FocusManager::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
+bool AccessibilityFocusManager::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
{
Dali::BaseHandle handle( object );
bool connected( true );
- FocusManager* manager = dynamic_cast<FocusManager*>( object );
+ AccessibilityFocusManager* manager = dynamic_cast<AccessibilityFocusManager*>( object );
if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUS_CHANGED ) )
{
-#ifndef __DALI_TOOLKIT_INTERNAL_FOCUS_MANAGER_H__
-#define __DALI_TOOLKIT_INTERNAL_FOCUS_MANAGER_H__
+#ifndef __DALI_TOOLKIT_INTERNAL_ACCESSIBILITY_FOCUS_MANAGER_H__
+#define __DALI_TOOLKIT_INTERNAL_ACCESSIBILITY_FOCUS_MANAGER_H__
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 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.
#include <dali/integration-api/events/pan-gesture-event.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/focus-manager/focus-manager.h>
+#include <dali-toolkit/public-api/focus-manager/accessibility-focus-manager.h>
namespace Dali
{
namespace Internal
{
-class FocusManager;
+class AccessibilityFocusManager;
/**
- * @copydoc Toolkit::FocusManager
+ * @copydoc Toolkit::AccessibilityFocusManager
*/
-class FocusManager : public Dali::BaseObject, Dali::AccessibilityActionHandler, Dali::AccessibilityGestureHandler
+class AccessibilityFocusManager : public Dali::BaseObject, Dali::AccessibilityActionHandler, Dali::AccessibilityGestureHandler
{
public:
unsigned int mFocusOrder; ///< The focus order of the actor. It is undefined by default.
- std::string mAccessibilityAttributes[Toolkit::FocusManager::ACCESSIBILITY_ATTRIBUTE_NUM]; ///< The array of attribute texts
+ std::string mAccessibilityAttributes[Toolkit::AccessibilityFocusManager::ACCESSIBILITY_ATTRIBUTE_NUM]; ///< The array of attribute texts
};
typedef std::pair<unsigned int, unsigned int> FocusIDPair;
typedef IDAdditionalInfoContainer::const_iterator IDAdditionalInfoConstIter;
/**
- * Construct a new FocusManager.
+ * Construct a new AccessibilityFocusManager.
*/
- FocusManager();
+ AccessibilityFocusManager();
/**
- * @copydoc Toolkit::FocusManager::SetAccessibilityAttribute
+ * @copydoc Toolkit::AccessibilityFocusManager::SetAccessibilityAttribute
*/
- void SetAccessibilityAttribute(Actor actor, Toolkit::FocusManager::AccessibilityAttribute type, const std::string& text);
+ void SetAccessibilityAttribute(Actor actor, Toolkit::AccessibilityFocusManager::AccessibilityAttribute type, const std::string& text);
/**
- * @copydoc Toolkit::FocusManager::GetAccessibilityAttribute
+ * @copydoc Toolkit::AccessibilityFocusManager::GetAccessibilityAttribute
*/
- std::string GetAccessibilityAttribute(Actor actor, Toolkit::FocusManager::AccessibilityAttribute type) const;
+ std::string GetAccessibilityAttribute(Actor actor, Toolkit::AccessibilityFocusManager::AccessibilityAttribute type) const;
/**
- * @copydoc Toolkit::FocusManager::SetFocusOrder
+ * @copydoc Toolkit::AccessibilityFocusManager::SetFocusOrder
*/
void SetFocusOrder(Actor actor, const unsigned int order);
/**
- * @copydoc Toolkit::FocusManager::GetFocusOrder
+ * @copydoc Toolkit::AccessibilityFocusManager::GetFocusOrder
*/
unsigned int GetFocusOrder(Actor actor) const;
/**
- * @copydoc Toolkit::FocusManager::GenerateNewFocusOrder
+ * @copydoc Toolkit::AccessibilityFocusManager::GenerateNewFocusOrder
*/
unsigned int GenerateNewFocusOrder() const;
/**
- * @copydoc Toolkit::FocusManager::GetActorByFocusOrder
+ * @copydoc Toolkit::AccessibilityFocusManager::GetActorByFocusOrder
*/
Actor GetActorByFocusOrder(const unsigned int order);
/**
- * @copydoc Toolkit::FocusManager::SetCurrentFocusActor
+ * @copydoc Toolkit::AccessibilityFocusManager::SetCurrentFocusActor
*/
bool SetCurrentFocusActor(Actor actor);
/**
- * @copydoc Toolkit::FocusManager::GetCurrentFocusActor
+ * @copydoc Toolkit::AccessibilityFocusManager::GetCurrentFocusActor
*/
Actor GetCurrentFocusActor();
/**
- * @copydoc Toolkit::FocusManager::GetCurrentFocusGroup
+ * @copydoc Toolkit::AccessibilityFocusManager::GetCurrentFocusGroup
*/
Actor GetCurrentFocusGroup();
/**
- * @copydoc Toolkit::FocusManager::GetCurrentFocusOrder
+ * @copydoc Toolkit::AccessibilityFocusManager::GetCurrentFocusOrder
*/
unsigned int GetCurrentFocusOrder();
/**
- * @copydoc Toolkit::FocusManager::MoveFocusForward
+ * @copydoc Toolkit::AccessibilityFocusManager::MoveFocusForward
*/
bool MoveFocusForward();
/**
- * @copydoc Toolkit::FocusManager::MoveFocusBackward
+ * @copydoc Toolkit::AccessibilityFocusManager::MoveFocusBackward
*/
bool MoveFocusBackward();
/**
- * @copydoc Toolkit::FocusManager::ClearFocus
+ * @copydoc Toolkit::AccessibilityFocusManager::ClearFocus
*/
void ClearFocus();
/**
- * @copydoc Toolkit::FocusManager::Reset
+ * @copydoc Toolkit::AccessibilityFocusManager::Reset
*/
void Reset();
/**
- * @copydoc Toolkit::FocusManager::SetFocusGroup
+ * @copydoc Toolkit::AccessibilityFocusManager::SetFocusGroup
*/
void SetFocusGroup(Actor actor, bool isFocusGroup);
/**
- * @copydoc Toolkit::FocusManager::IsFocusGroup
+ * @copydoc Toolkit::AccessibilityFocusManager::IsFocusGroup
*/
bool IsFocusGroup(Actor actor) const;
/**
- * @copydoc Toolkit::FocusManager::SetGroupMode
+ * @copydoc Toolkit::AccessibilityFocusManager::SetGroupMode
*/
void SetGroupMode(bool enabled);
/**
- * @copydoc Toolkit::FocusManager::GetGroupMode
+ * @copydoc Toolkit::AccessibilityFocusManager::GetGroupMode
*/
bool GetGroupMode() const;
/**
- * @copydoc Toolkit::FocusManager::SetWrapMode
+ * @copydoc Toolkit::AccessibilityFocusManager::SetWrapMode
*/
void SetWrapMode(bool wrapped);
/**
- * @copydoc Toolkit::FocusManager::GetWrapMode
+ * @copydoc Toolkit::AccessibilityFocusManager::GetWrapMode
*/
bool GetWrapMode() const;
/**
- * @copydoc Toolkit::FocusManager::SetFocusIndicatorActor
+ * @copydoc Toolkit::AccessibilityFocusManager::SetFocusIndicatorActor
*/
void SetFocusIndicatorActor(Actor indicator);
/**
- * @copydoc Toolkit::FocusManager::GetFocusIndicatorActor
+ * @copydoc Toolkit::AccessibilityFocusManager::GetFocusIndicatorActor
*/
Actor GetFocusIndicatorActor();
/**
- * @copydoc Toolkit::FocusManager::GetFocusGroup
+ * @copydoc Toolkit::AccessibilityFocusManager::GetFocusGroup
*/
Actor GetFocusGroup(Actor actor);
public:
/**
- * @copydoc Toolkit::FocusManager::FocusChangedSignal()
+ * @copydoc Toolkit::AccessibilityFocusManager::FocusChangedSignal()
*/
- Toolkit::FocusManager::FocusChangedSignalType& FocusChangedSignal();
+ Toolkit::AccessibilityFocusManager::FocusChangedSignalType& FocusChangedSignal();
/**
- * @copydoc Toolkit::FocusManager::FocusOvershotSignal()
+ * @copydoc Toolkit::AccessibilityFocusManager::FocusOvershotSignal()
*/
- Toolkit::FocusManager::FocusOvershotSignalType& FocusOvershotSignal();
+ Toolkit::AccessibilityFocusManager::FocusOvershotSignalType& FocusOvershotSignal();
/**
- * @copydoc Toolkit::FocusManager::FocusedActorActivatedSignal()
+ * @copydoc Toolkit::AccessibilityFocusManager::FocusedActorActivatedSignal()
*/
- Toolkit::FocusManager::FocusedActorActivatedSignalType& FocusedActorActivatedSignal();
+ Toolkit::AccessibilityFocusManager::FocusedActorActivatedSignalType& FocusedActorActivatedSignal();
/**
* Connects a callback function with the object's signals.
/**
* Destructor
*/
- virtual ~FocusManager();
+ virtual ~AccessibilityFocusManager();
private:
private:
// Undefined
- FocusManager(const FocusManager&);
+ AccessibilityFocusManager(const AccessibilityFocusManager&);
- FocusManager& operator=(const FocusManager& rhs);
+ AccessibilityFocusManager& operator=(const AccessibilityFocusManager& rhs);
private:
- Toolkit::FocusManager::FocusChangedSignalType mFocusChangedSignal; ///< The signal to notify the focus change
- Toolkit::FocusManager::FocusOvershotSignalType mFocusOvershotSignal; ///< The signal to notify the focus overshooted
- Toolkit::FocusManager::FocusedActorActivatedSignalType mFocusedActorActivatedSignal; ///< The signal to notify the activation of focused actor
+ Toolkit::AccessibilityFocusManager::FocusChangedSignalType mFocusChangedSignal; ///< The signal to notify the focus change
+ Toolkit::AccessibilityFocusManager::FocusOvershotSignalType mFocusOvershotSignal; ///< The signal to notify the focus overshooted
+ Toolkit::AccessibilityFocusManager::FocusedActorActivatedSignalType mFocusedActorActivatedSignal; ///< The signal to notify the activation of focused actor
bool mIsWrapped; ///< Whether the focus movement is wrapped around or not
bool mIsFocusWithinGroup; ///< Whether the focus movement is limited to the current focus group or not
} // namespace Internal
-inline Internal::FocusManager& GetImpl(Dali::Toolkit::FocusManager& obj)
+inline Internal::AccessibilityFocusManager& GetImpl(Dali::Toolkit::AccessibilityFocusManager& obj)
{
DALI_ASSERT_ALWAYS(obj);
Dali::BaseObject& handle = obj.GetBaseObject();
- return static_cast<Internal::FocusManager&>(handle);
+ return static_cast<Internal::AccessibilityFocusManager&>(handle);
}
-inline const Internal::FocusManager& GetImpl(const Dali::Toolkit::FocusManager& obj)
+inline const Internal::AccessibilityFocusManager& GetImpl(const Dali::Toolkit::AccessibilityFocusManager& obj)
{
DALI_ASSERT_ALWAYS(obj);
const Dali::BaseObject& handle = obj.GetBaseObject();
- return static_cast<const Internal::FocusManager&>(handle);
+ return static_cast<const Internal::AccessibilityFocusManager&>(handle);
}
} // namespace Toolkit
} // namespace Dali
-#endif // __DALI_TOOLKIT_INTERNAL_FOCUS_MANAGER_H__
+#endif // __DALI_TOOLKIT_INTERNAL_ACCESSIBILITY_FOCUS_MANAGER_H__
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control.h>
#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/public-api/focus-manager/focus-manager.h>
-#include <dali-toolkit/public-api/focus-manager/keyinput-focus-manager.h>
+#include <dali-toolkit/public-api/focus-manager/accessibility-focus-manager.h>
+#include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
namespace Dali
{
// Save the current focused actor
mCurrentFocusActor = actorID;
- // Move the accessibility focus to the same actor
-// Toolkit::FocusManager focusManager = Toolkit::FocusManager::Get();
-// focusManager.SetCurrentFocusActor(actor);
-
DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] SUCCEED\n", __FUNCTION__, __LINE__);
return true;
}
return Toolkit::Control::DownCast(parent);
}
-bool KeyboardFocusManager::MoveFocus(Toolkit::Control::KeyboardFocusNavigationDirection direction)
+bool KeyboardFocusManager::MoveFocus(Toolkit::Control::KeyboardFocus::Direction direction)
{
Actor currentFocusActor = GetCurrentFocusActor();
return succeed;
}
-bool KeyboardFocusManager::DoMoveFocusWithinLayoutControl(Toolkit::Control control, Actor actor, Toolkit::Control::KeyboardFocusNavigationDirection direction)
+bool KeyboardFocusManager::DoMoveFocusWithinLayoutControl(Toolkit::Control control, Actor actor, Toolkit::Control::KeyboardFocus::Direction direction)
{
// Ask the control for the next actor to focus
Actor nextFocusableActor = GetImplementation( control ).GetNextKeyboardFocusableActor(actor, direction, mFocusGroupLoopEnabled);
{
// If the current focus group has a parent layout control, we can probably automatically
// move the focus to the next focus group in the forward or backward direction.
- Toolkit::Control::KeyboardFocusNavigationDirection direction = forward ? Toolkit::Control::Right : Toolkit::Control::Left;
+ Toolkit::Control::KeyboardFocus::Direction direction = forward ? Toolkit::Control::KeyboardFocus::RIGHT : Toolkit::Control::KeyboardFocus::LEFT;
succeed = DoMoveFocusWithinLayoutControl(parentLayoutControl, GetCurrentFocusActor(), direction);
parentLayoutControl = GetParentLayoutControl(parentLayoutControl);
}
AccessibilityManager accessibilityManager = AccessibilityManager::Get();
bool isAccessibilityEnabled = accessibilityManager.IsEnabled();
- Toolkit::FocusManager accessibilityFocusManager = Toolkit::FocusManager::Get();
+ Toolkit::AccessibilityFocusManager accessibilityFocusManager = Toolkit::AccessibilityFocusManager::Get();
std::string keyName = event.keyPressedName;
else
{
// Move the focus towards left
- MoveFocus(Toolkit::Control::Left);
+ MoveFocus(Toolkit::Control::KeyboardFocus::LEFT);
}
isFocusStartableKey = true;
else
{
// Move the focus towards right
- MoveFocus(Toolkit::Control::Right);
+ MoveFocus(Toolkit::Control::KeyboardFocus::RIGHT);
}
}
else
else
{
// Move the focus towards up
- MoveFocus(Toolkit::Control::Up);
+ MoveFocus(Toolkit::Control::KeyboardFocus::UP);
}
isFocusStartableKey = true;
else
{
// Move the focus towards down
- MoveFocus(Toolkit::Control::Down);
+ MoveFocus(Toolkit::Control::KeyboardFocus::DOWN);
}
isFocusStartableKey = true;
{
// No actor is focused but keyboard focus is activated by the key press
// Let's try to move the initial focus
- MoveFocus(Toolkit::Control::Right);
+ MoveFocus(Toolkit::Control::KeyboardFocus::RIGHT);
}
else if(mFocusIndicatorActor)
{
/**
* @copydoc Toolkit::KeyboardFocusManager::MoveFocus
*/
- bool MoveFocus(Toolkit::Control::KeyboardFocusNavigationDirection direction);
+ bool MoveFocus(Toolkit::Control::KeyboardFocus::Direction direction);
/**
* @copydoc Toolkit::KeyboardFocusManager::ClearFocus
* @param direction The direction of focus movement
* @return Whether the focus is successful or not
*/
- bool DoMoveFocusWithinLayoutControl(Toolkit::Control control, Actor actor, Toolkit::Control::KeyboardFocusNavigationDirection direction);
+ bool DoMoveFocusWithinLayoutControl(Toolkit::Control control, Actor actor, Toolkit::Control::KeyboardFocus::Direction direction);
/**
* Move the focus to the first focusable actor in the next focus group in the forward
#include <dali/public-api/object/object-registry.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/focus-manager/keyinput-focus-manager.h>
+#include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
#include <dali-toolkit/public-api/controls/control.h>
namespace Dali
// Remove the previously set text
ResetText();
- if( ! text.empty() )
+ if( !text.empty() )
{
// Convert text into UTF-32
Vector<Character>& utf32Characters = mImpl->mLogicalModel->mText;
// Update the rest of the model during size negotiation
mImpl->QueueModifyEvent( ModifyEvent::TEXT_REPLACED );
+
+ // The natural size needs to be re-calculated.
+ mImpl->mRecalculateNaturalSize = true;
+
+ // Apply modifications to the model
+ mImpl->mOperationsPending = ALL_OPERATIONS;
}
else
{
ShowPlaceholderText();
}
+ mImpl->RequestRelayout();
+
if( mImpl->mEventData )
{
// Cancel previously queued events
{
mImpl->mTextColor = textColor;
- if( ! mImpl->IsShowingPlaceholderText() )
+ if( !mImpl->IsShowingPlaceholderText() )
{
mImpl->mVisualModel->SetTextColor( textColor );
+
+ mImpl->RequestRelayout();
}
}
if( mImpl->IsShowingPlaceholderText() )
{
mImpl->mVisualModel->SetTextColor( textColor );
+ mImpl->RequestRelayout();
}
}
void Controller::SetShadowOffset( const Vector2& shadowOffset )
{
mImpl->mVisualModel->SetShadowOffset( shadowOffset );
+
+ mImpl->RequestRelayout();
}
const Vector2& Controller::GetShadowOffset() const
void Controller::SetShadowColor( const Vector4& shadowColor )
{
mImpl->mVisualModel->SetShadowColor( shadowColor );
+
+ mImpl->RequestRelayout();
}
const Vector4& Controller::GetShadowColor() const
void Controller::SetUnderlineColor( const Vector4& color )
{
mImpl->mVisualModel->SetUnderlineColor( color );
+
+ mImpl->RequestRelayout();
}
const Vector4& Controller::GetUnderlineColor() const
void Controller::SetUnderlineEnabled( bool enabled )
{
mImpl->mVisualModel->SetUnderlineEnabled( enabled );
+
+ mImpl->RequestRelayout();
}
bool Controller::IsUnderlineEnabled() const
void Controller::SetUnderlineHeight( float height )
{
mImpl->mVisualModel->SetUnderlineHeight( height );
+
+ mImpl->RequestRelayout();
}
float Controller::GetUnderlineHeight() const
}
} // REORDER
+ // TODO: I'm working on a patch that changes the LayoutEngine::Align() method.
+ // The layoutParameters is not needed and this call can be moved outside the if().
+ // Then there is no need to do the layout again to change the alignment.
if( ALIGN & operations )
{
mImpl->mLayoutEngine.Align( layoutParameters,
return viewUpdated;
}
+void Controller::SetMultiLineEnabled( bool enable )
+{
+ const LayoutEngine::Layout layout = enable ? LayoutEngine::MULTI_LINE_BOX : LayoutEngine::SINGLE_LINE_BOX;
+
+ if( layout != mImpl->mLayoutEngine.GetLayout() )
+ {
+ // Set the layout type.
+ mImpl->mLayoutEngine.SetLayout( layout );
+
+ // Set the flags to redo the layout operations
+ const OperationsMask layoutOperations = static_cast<OperationsMask>( LAYOUT |
+ UPDATE_ACTUAL_SIZE |
+ ALIGN |
+ REORDER );
+
+ mImpl->mOperationsPending = static_cast<OperationsMask>( mImpl->mOperationsPending | layoutOperations );
+
+ mImpl->RequestRelayout();
+ }
+}
+
+bool Controller::IsMultiLineEnabled() const
+{
+ return LayoutEngine::MULTI_LINE_BOX == mImpl->mLayoutEngine.GetLayout();
+}
+
+void Controller::SetHorizontalAlignment( LayoutEngine::HorizontalAlignment alignment )
+{
+ if( alignment != mImpl->mLayoutEngine.GetHorizontalAlignment() )
+ {
+ // Set the alignment.
+ mImpl->mLayoutEngine.SetHorizontalAlignment( alignment );
+
+ // Set the flag to redo the alignment operation.
+ // TODO : Is not needed re-layout and reorder again but with the current implementation it is.
+ // Im working on a different patch to fix an issue with the alignment. When that patch
+ // is in, this issue can be fixed.
+ const OperationsMask layoutOperations = static_cast<OperationsMask>( LAYOUT |
+ UPDATE_ACTUAL_SIZE |
+ ALIGN |
+ REORDER );
+
+ mImpl->mOperationsPending = static_cast<OperationsMask>( mImpl->mOperationsPending | layoutOperations );
+
+ mImpl->RequestRelayout();
+ }
+}
+
+LayoutEngine::HorizontalAlignment Controller::GetHorizontalAlignment() const
+{
+ return mImpl->mLayoutEngine.GetHorizontalAlignment();
+}
+
+void Controller::SetVerticalAlignment( LayoutEngine::VerticalAlignment alignment )
+{
+ if( alignment != mImpl->mLayoutEngine.GetVerticalAlignment() )
+ {
+ // Set the alignment.
+ mImpl->mLayoutEngine.SetVerticalAlignment( alignment );
+
+ // Set the flag to redo the alignment operation.
+ // TODO : Is not needed re-layout and reorder again but with the current implementation it is.
+ // Im working on a different patch to fix an issue with the alignment. When that patch
+ // is in, this issue can be fixed.
+ const OperationsMask layoutOperations = static_cast<OperationsMask>( LAYOUT |
+ UPDATE_ACTUAL_SIZE |
+ ALIGN |
+ REORDER );
+
+ mImpl->mOperationsPending = static_cast<OperationsMask>( mImpl->mOperationsPending | layoutOperations );
+
+ mImpl->RequestRelayout();
+ }
+}
+
+LayoutEngine::VerticalAlignment Controller::GetVerticalAlignment() const
+{
+ return mImpl->mLayoutEngine.GetVerticalAlignment();
+}
+
void Controller::CalculateTextAlignment( const Size& size )
{
// Get the direction of the first character.
}
}
+ImfManager::ImfCallbackData Controller::OnImfEvent( ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent )
+{
+ bool update( false );
+ bool requestRelayout = false;
+
+ std::string text;
+ unsigned int cursorPosition( 0 );
+
+ switch ( imfEvent.eventName )
+ {
+ case ImfManager::COMMIT:
+ {
+ InsertText( imfEvent.predictiveString, Text::Controller::COMMIT );
+ requestRelayout = true;
+ break;
+ }
+ case ImfManager::PREEDIT:
+ {
+ InsertText( imfEvent.predictiveString, Text::Controller::PRE_EDIT );
+ update = true;
+ requestRelayout = true;
+ break;
+ }
+ case ImfManager::DELETESURROUNDING:
+ {
+ RemoveText( imfEvent.cursorOffset, imfEvent.numberOfChars );
+ requestRelayout = true;
+ break;
+ }
+ case ImfManager::GETSURROUNDING:
+ {
+ GetText( text );
+ cursorPosition = GetLogicalCursorPosition();
+
+ imfManager.SetSurroundingText( text );
+ imfManager.SetCursorPosition( cursorPosition );
+ break;
+ }
+ case ImfManager::VOID:
+ {
+ // do nothing
+ break;
+ }
+ } // end switch
+
+ if( ImfManager::GETSURROUNDING != imfEvent.eventName )
+ {
+ GetText( text );
+ cursorPosition = GetLogicalCursorPosition();
+ }
+
+ if( requestRelayout )
+ {
+ mImpl->mOperationsPending = ALL_OPERATIONS;
+ mImpl->RequestRelayout();
+ }
+
+ ImfManager::ImfCallbackData callbackData( update, cursorPosition, text, false );
+
+ return callbackData;
+}
+
+
Controller::~Controller()
{
delete mImpl;
// Apply modifications to the model
mImpl->mOperationsPending = ALL_OPERATIONS;
+
+ // Update the rest of the model during size negotiation
mImpl->QueueModifyEvent( ModifyEvent::TEXT_REPLACED );
}
}
// EXTERNAL INCLUDES
#include <string>
+#include <dali/devel-api/adaptor-framework/imf-manager.h>
#include <dali/public-api/common/dali-vector.h>
#include <dali/public-api/common/intrusive-ptr.h>
#include <dali/public-api/events/gesture.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/text/decorator/text-decorator.h>
#include <dali-toolkit/internal/text/font-run.h>
+#include <dali-toolkit/internal/text/layouts/layout-engine.h>
#include <dali-toolkit/internal/text/text-control-interface.h>
#include <dali-toolkit/internal/text/text-view.h>
Size& layoutSize );
/**
+ * @brief Whether to enable the multi-line layout.
+ *
+ * @param[in] enable \e true enables the multi-line (by default)
+ */
+ void SetMultiLineEnabled( bool enable );
+
+ /**
+ * @return Whether the multi-line layout is enabled.
+ */
+ bool IsMultiLineEnabled() const;
+
+ /**
+ * @copydoc Dali::Toolkit::Text::LayoutEngine::SetHorizontalAlignment()
+ */
+ void SetHorizontalAlignment( LayoutEngine::HorizontalAlignment alignment );
+
+ /**
+ * @copydoc Dali::Toolkit::Text::LayoutEngine::GetHorizontalAlignment()
+ */
+ LayoutEngine::HorizontalAlignment GetHorizontalAlignment() const;
+
+ /**
+ * @copydoc Dali::Toolkit::Text::LayoutEngine::SetVerticalAlignment()
+ */
+ void SetVerticalAlignment( LayoutEngine::VerticalAlignment alignment );
+
+ /**
+ * @copydoc Dali::Toolkit::Text::LayoutEngine::GetVerticalAlignment()
+ */
+ LayoutEngine::VerticalAlignment GetVerticalAlignment() const;
+
+ /**
* @brief Calulates the alignment of the whole text inside the bounding box.
*
* @param[in] size The size of the bounding box.
*/
virtual void HandleEvent( HandleType handle, HandleState state, float x, float y );
+ /**
+ * @brief Event received from IMF manager
+ *
+ * @param[in] imfManager The IMF manager.
+ * @param[in] imfEvent The event received.
+ * @return A data struture indicating if update is needed, cursor position and current text.
+ */
+ ImfManager::ImfCallbackData OnImfEvent( ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent );
+
protected:
/**
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/focus-manager/keyinput-focus-manager.h>
+#include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
#include <dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h>
#include <dali-toolkit/public-api/controls/control.h>
#include <dali-toolkit/devel-api/styling/style-manager.h>
namespace
{
-const float BACKGROUND_ACTOR_Z_POSITION( -0.1f );
-
/**
* Creates control through type registry
*/
* @return true if action has been accepted by this control
*/
const char* ACTION_CONTROL_ACTIVATED = "control-activated";
-static bool DoAction( BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes )
+static bool DoAction( BaseObject* object, const std::string& actionName, const Property::Map& attributes )
{
bool ret = false;
actor.SetColor( color );
actor.SetPositionInheritanceMode( USE_PARENT_POSITION_PLUS_LOCAL_POSITION );
actor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
- actor.SetZ( BACKGROUND_ACTOR_Z_POSITION );
actor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
}
actor.SetColor( color );
actor.SetPositionInheritanceMode( USE_PARENT_POSITION_PLUS_LOCAL_POSITION );
actor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
- actor.SetZ( BACKGROUND_ACTOR_Z_POSITION );
Constraint constraint = Constraint::New<Vector3>( actor,
constrainingIndex,
mLongPressGestureDetector(),
mFlags( Control::ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) ),
mIsKeyboardNavigationSupported( false ),
- mIsKeyboardFocusGroup( false )
+ mIsKeyboardFocusGroup( false ),
+ mAddRemoveBackgroundChild( false )
{
}
ControlBehaviour mFlags :CONTROL_BEHAVIOUR_FLAG_COUNT; ///< Flags passed in from constructor.
bool mIsKeyboardNavigationSupported :1; ///< Stores whether keyboard navigation is supported by the control.
bool mIsKeyboardFocusGroup :1; ///< Stores whether the control is a focus group.
+ bool mAddRemoveBackgroundChild:1; ///< Flag to know when we are adding or removing our own actor to avoid call to OnControlChildAdd
// Properties - these need to be members of Internal::Control::Impl as they need to function within this class.
static PropertyRegistration PROPERTY_1;
SetupBackgroundActorConstrained( meshActor, Actor::Property::SCALE, color );
- // Set the background actor before adding so that we do not inform deriving classes
background.actor = meshActor;
- Self().Add( meshActor );
+ // Set the flag to avoid notifying children
+ mImpl->mAddRemoveBackgroundChild = true;
+ // use insert to guarantee its the first child (so that OVERLAY mode works)
+ Self().Insert( 0, meshActor );
+ mImpl->mAddRemoveBackgroundChild = false;
}
background.color = color;
if ( background.actor )
{
- // Remove Current actor, unset AFTER removal so that we do not inform deriving classes
+ // Remove Current actor, unset AFTER removal
+ mImpl->mAddRemoveBackgroundChild = true;
Self().Remove( background.actor );
+ mImpl->mAddRemoveBackgroundChild = false;
background.actor.Reset();
}
// Set the background actor before adding so that we do not inform derived classes
background.actor = imageActor;
- Self().Add( imageActor );
+ mImpl->mAddRemoveBackgroundChild = true;
+ // use insert to guarantee its the first child (so that OVERLAY mode works)
+ Self().Insert( 0, imageActor );
+ mImpl->mAddRemoveBackgroundChild = false;
}
void Control::ClearBackground()
if ( mImpl->mBackground )
{
Background& background( mImpl->GetBackground() );
+ mImpl->mAddRemoveBackgroundChild = true;
Self().Remove( background.actor );
+ mImpl->mAddRemoveBackgroundChild = false;
delete mImpl->mBackground;
mImpl->mBackground = NULL;
return false; // Accessibility value change action is not handled by default
}
-Actor Control::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+Actor Control::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled)
{
return Actor();
}
void Control::OnChildAdd(Actor& child)
{
- // If this is the background actor, then we do not want to relayout or inform deriving classes
- if ( mImpl->mBackground && ( child == mImpl->mBackground->actor ) )
+ // If this is the background actor, then we do not want to inform deriving classes
+ if ( mImpl->mAddRemoveBackgroundChild )
{
return;
}
void Control::OnChildRemove(Actor& child)
{
- // If this is the background actor, then we do not want to relayout or inform deriving classes
- if ( mImpl->mBackground && ( child == mImpl->mBackground->actor ) )
+ // If this is the background actor, then we do not want to inform deriving classes
+ if ( mImpl->mAddRemoveBackgroundChild )
{
return;
}
return false; // Do not consume
}
-bool Control::OnMouseWheelEvent(const MouseWheelEvent& event)
+bool Control::OnWheelEvent(const WheelEvent& event)
{
return false; // Do not consume
}
namespace Internal
{
-class FocusManager;
-class KeyboardFocusManager;
-class KeyInputFocusManager;
/**
* @brief This is the internal base class for all controls.
// Called by Focus Manager
/**
- * @brief Called by the focus manager and keyboard focus manager to Activate the Control
+ * @brief Called by the accessibility focus manager and keyboard focus manager to activate the Control
*/
DALI_INTERNAL void AccessibilityActivate();
virtual bool OnKeyEvent( const KeyEvent& event );
/**
- * @copydoc CustomActorImpl::OnMouseWheelEvent()
+ * @copydoc CustomActorImpl::OnWheelEvent()
*/
- virtual bool OnMouseWheelEvent( const MouseWheelEvent& event );
+ virtual bool OnWheelEvent( const WheelEvent& event );
/**
* @copydoc CustomActorImpl::OnRelayout()
* @param[in] loopEnabled Whether the focus movement should be looped within the control.
* @return the next keyboard focusable actor in this control or an empty handle if no actor can be focused.
*/
- virtual Actor GetNextKeyboardFocusableActor( Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled );
+ virtual Actor GetNextKeyboardFocusableActor( Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled );
/**
* @brief Informs this control that its chosen focusable actor will be focused.
/**
* @brief Describes the direction to move the keyboard focus towards.
*/
- enum KeyboardFocusNavigationDirection
+ struct KeyboardFocus
{
- Left, ///< Move keyboard focus towards the left direction
- Right, ///< Move keyboard focus towards the right direction
- Up, ///< Move keyboard focus towards the up direction
- Down ///< Move keyboard focus towards the down direction
+ enum Direction
+ {
+ LEFT, ///< Move keyboard focus towards the left direction
+ RIGHT, ///< Move keyboard focus towards the right direction
+ UP, ///< Move keyboard focus towards the up direction
+ DOWN ///< Move keyboard focus towards the down direction
+ };
};
// Typedefs
return currentLayoutPosition;
}
-int ItemLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled)
+int ItemLayout::GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled)
{
switch( direction )
{
- case Control::Left:
- case Control::Up:
+ case Control::KeyboardFocus::LEFT:
+ case Control::KeyboardFocus::UP:
{
itemID--;
if( itemID < 0 )
}
break;
}
- case Control::Right:
- case Control::Down:
+ case Control::KeyboardFocus::RIGHT:
+ case Control::KeyboardFocus::DOWN:
{
itemID++;
if( itemID >= maxItems )
* @param[in] loopEnabled Whether the KeyboardFocusManager is set to wrap around between first and last item
* @return The next item ID.
*/
- DALI_IMPORT_API virtual int GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+ DALI_IMPORT_API virtual int GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled);
/**
* @brief Query the flick speed factor of the layout while swipping.
return GetImpl(*this).GetMinimumSwipeDistance();
}
-void ItemView::SetMouseWheelScrollDistanceStep(float step)
+void ItemView::SetWheelScrollDistanceStep(float step)
{
- GetImpl(*this).SetMouseWheelScrollDistanceStep(step);
+ GetImpl(*this).SetWheelScrollDistanceStep(step);
}
-float ItemView::GetMouseWheelScrollDistanceStep() const
+float ItemView::GetWheelScrollDistanceStep() const
{
- return GetImpl(*this).GetMouseWheelScrollDistanceStep();
+ return GetImpl(*this).GetWheelScrollDistanceStep();
}
void ItemView::SetAnchoring(bool enabled)
float GetMinimumSwipeDistance() const;
/**
- * @brief Set the step of scroll distance in actor coordinates for each mouse wheel event received.
+ * @brief Set the step of scroll distance in actor coordinates for each wheel event received.
*
* @param[in] step The step of scroll distance(pixel).
*/
- void SetMouseWheelScrollDistanceStep(float step);
+ void SetWheelScrollDistanceStep(float step);
/**
- * @brief Get the step of scroll distance in actor coordinates for each mouse wheel event received.
+ * @brief Get the step of scroll distance in actor coordinates for each wheel event received.
*
* @return The step of scroll distance(pixel)
*/
- float GetMouseWheelScrollDistanceStep() const;
+ float GetWheelScrollDistanceStep() const;
/**
* @brief Set whether to enable the animation for the layout to
GetImpl(*this).SetMaxFlickSpeed(speed);
}
-Vector2 ScrollView::GetMouseWheelScrollDistanceStep() const
+Vector2 ScrollView::GetWheelScrollDistanceStep() const
{
- return GetImpl(*this).GetMouseWheelScrollDistanceStep();
+ return GetImpl(*this).GetWheelScrollDistanceStep();
}
-void ScrollView::SetMouseWheelScrollDistanceStep(Vector2 step)
+void ScrollView::SetWheelScrollDistanceStep(Vector2 step)
{
- GetImpl(*this).SetMouseWheelScrollDistanceStep(step);
+ GetImpl(*this).SetWheelScrollDistanceStep(step);
}
Vector2 ScrollView::GetCurrentScrollPosition() const
/**
* @brief Gets the step of scroll distance in actor coordinates for
- * each mouse wheel event received in free panning mode.
+ * each wheel event received in free panning mode.
*
* @return The step of scroll distance(pixel) in X and Y axes.
*/
- Vector2 GetMouseWheelScrollDistanceStep() const;
+ Vector2 GetWheelScrollDistanceStep() const;
/**
* @brief Sets the step of scroll distance in actor coordinates for
- * each mouse wheel event received in free panning mode.
+ * each wheel event received in free panning mode.
*
* @param[in] step The step of scroll distance(pixel) in X and Y axes.
*
* @note: If snap points are defined in the rulers, it will always
* scroll to the next snap point towards the scroll direction while
- * receiving the mouse wheel events.
+ * receiving the wheel events.
*
*/
- void SetMouseWheelScrollDistanceStep(Vector2 step);
+ void SetWheelScrollDistanceStep(Vector2 step);
/**
* @brief Retrieves current scroll position.
const unsigned int TOOLKIT_MAJOR_VERSION = 1;
const unsigned int TOOLKIT_MINOR_VERSION = 0;
-const unsigned int TOOLKIT_MICRO_VERSION = 42;
+const unsigned int TOOLKIT_MICRO_VERSION = 43;
const char * const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
$(public_api_src_dir)/controls/text-controls/text-label.cpp \
$(public_api_src_dir)/controls/text-controls/text-field.cpp \
$(public_api_src_dir)/controls/gaussian-blur-view/gaussian-blur-view.cpp \
- $(public_api_src_dir)/focus-manager/focus-manager.cpp \
+ $(public_api_src_dir)/focus-manager/accessibility-focus-manager.cpp \
$(public_api_src_dir)/focus-manager/keyboard-focus-manager.cpp \
- $(public_api_src_dir)/focus-manager/keyinput-focus-manager.cpp \
$(public_api_src_dir)/dali-toolkit-version.cpp \
$(public_api_src_dir)/enums.cpp
public_api_text_controls_header_files = \
$(public_api_src_dir)/controls/text-controls/text-label.h \
- $(public_api_src_dir)/controls/text-controls/text-field.h
+ $(public_api_src_dir)/controls/text-controls/text-field.h
public_api_focus_manager_header_files = \
- $(public_api_src_dir)/focus-manager/focus-manager.h \
- $(public_api_src_dir)/focus-manager/keyboard-focus-manager.h \
- $(public_api_src_dir)/focus-manager/keyinput-focus-manager.h
+ $(public_api_src_dir)/focus-manager/accessibility-focus-manager.h \
+ $(public_api_src_dir)/focus-manager/keyboard-focus-manager.h
public_api_rendering_backend_header_files = \
$(public_api_src_dir)/text/rendering-backend.h
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/public-api/focus-manager/accessibility-focus-manager.h>
+
+// EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/singleton-service.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/focus-manager/accessibility-focus-manager-impl.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+AccessibilityFocusManager::AccessibilityFocusManager()
+{
+}
+
+AccessibilityFocusManager::~AccessibilityFocusManager()
+{
+}
+
+AccessibilityFocusManager AccessibilityFocusManager::Get()
+{
+ AccessibilityFocusManager manager;
+
+ // Check whether the accessibility focus manager is already created
+ SingletonService singletonService( SingletonService::Get() );
+ if ( singletonService )
+ {
+ Dali::BaseHandle handle = singletonService.GetSingleton(typeid(AccessibilityFocusManager));
+ if(handle)
+ {
+ // If so, downcast the handle of singleton to focus manager
+ manager = AccessibilityFocusManager(dynamic_cast<Internal::AccessibilityFocusManager*>(handle.GetObjectPtr()));
+ }
+
+ if(!manager)
+ {
+ // If not, create the accessibility focus manager and register it as a singleton
+ manager = AccessibilityFocusManager(new Internal::AccessibilityFocusManager());
+ singletonService.Register(typeid(manager), manager);
+ }
+ }
+
+ return manager;
+}
+
+AccessibilityFocusManager::AccessibilityFocusManager(Internal::AccessibilityFocusManager *impl)
+ : BaseHandle(impl)
+{
+}
+
+void AccessibilityFocusManager::SetAccessibilityAttribute(Actor actor, AccessibilityAttribute type, const std::string& text)
+{
+ GetImpl(*this).SetAccessibilityAttribute(actor, type, text);
+}
+
+std::string AccessibilityFocusManager::GetAccessibilityAttribute(Actor actor, AccessibilityAttribute type) const
+{
+ return GetImpl(*this).GetAccessibilityAttribute(actor, type);
+}
+
+void AccessibilityFocusManager::SetFocusOrder(Actor actor, const unsigned int order)
+{
+ GetImpl(*this).SetFocusOrder(actor, order);
+}
+
+unsigned int AccessibilityFocusManager::GetFocusOrder(Actor actor) const
+{
+ return GetImpl(*this).GetFocusOrder(actor);
+}
+
+unsigned int AccessibilityFocusManager::GenerateNewFocusOrder() const
+{
+ return GetImpl(*this).GenerateNewFocusOrder();
+}
+
+Actor AccessibilityFocusManager::GetActorByFocusOrder(const unsigned int order)
+{
+ return GetImpl(*this).GetActorByFocusOrder(order);
+}
+
+bool AccessibilityFocusManager::SetCurrentFocusActor(Actor actor)
+{
+ return GetImpl(*this).SetCurrentFocusActor(actor);
+}
+
+Actor AccessibilityFocusManager::GetCurrentFocusActor()
+{
+ return GetImpl(*this).GetCurrentFocusActor();
+}
+
+Actor AccessibilityFocusManager::GetCurrentFocusGroup()
+{
+ return GetImpl(*this).GetCurrentFocusGroup();
+}
+
+unsigned int AccessibilityFocusManager::GetCurrentFocusOrder()
+{
+ return GetImpl(*this).GetCurrentFocusOrder();
+}
+
+bool AccessibilityFocusManager::MoveFocusForward()
+{
+ return GetImpl(*this).MoveFocusForward();
+}
+
+bool AccessibilityFocusManager::MoveFocusBackward()
+{
+ return GetImpl(*this).MoveFocusBackward();
+}
+
+void AccessibilityFocusManager::ClearFocus()
+{
+ GetImpl(*this).ClearFocus();
+}
+
+void AccessibilityFocusManager::Reset()
+{
+ GetImpl(*this).Reset();
+}
+
+void AccessibilityFocusManager::SetFocusGroup(Actor actor, bool isFocusGroup)
+{
+ GetImpl(*this).SetFocusGroup(actor, isFocusGroup);
+}
+
+bool AccessibilityFocusManager::IsFocusGroup(Actor actor) const
+{
+ return GetImpl(*this).IsFocusGroup(actor);
+}
+
+void AccessibilityFocusManager::SetGroupMode(bool enabled)
+{
+ GetImpl(*this).SetGroupMode(enabled);
+}
+
+bool AccessibilityFocusManager::GetGroupMode() const
+{
+ return GetImpl(*this).GetGroupMode();
+}
+
+void AccessibilityFocusManager::SetWrapMode(bool wrapped)
+{
+ GetImpl(*this).SetWrapMode(wrapped);
+}
+
+bool AccessibilityFocusManager::GetWrapMode() const
+{
+ return GetImpl(*this).GetWrapMode();
+}
+
+void AccessibilityFocusManager::SetFocusIndicatorActor(Actor indicator)
+{
+ GetImpl(*this).SetFocusIndicatorActor(indicator);
+}
+
+Actor AccessibilityFocusManager::GetFocusIndicatorActor()
+{
+ return GetImpl(*this).GetFocusIndicatorActor();
+}
+
+Actor AccessibilityFocusManager::GetFocusGroup(Actor actor)
+{
+ return GetImpl(*this).GetFocusGroup(actor);
+}
+
+AccessibilityFocusManager::FocusChangedSignalType& AccessibilityFocusManager::FocusChangedSignal()
+{
+ return GetImpl(*this).FocusChangedSignal();
+}
+
+AccessibilityFocusManager::FocusOvershotSignalType& AccessibilityFocusManager::FocusOvershotSignal()
+{
+ return GetImpl(*this).FocusOvershotSignal();
+}
+
+AccessibilityFocusManager::FocusedActorActivatedSignalType& AccessibilityFocusManager::FocusedActorActivatedSignal()
+{
+ return GetImpl(*this).FocusedActorActivatedSignal();
+}
+
+} // namespace Toolkit
+
+} // namespace Dali
-#ifndef __DALI_TOOLKIT_FOCUS_MANAGER_H__
-#define __DALI_TOOLKIT_FOCUS_MANAGER_H__
+#ifndef __DALI_TOOLKIT_ACCESSIBILITY_FOCUS_MANAGER_H__
+#define __DALI_TOOLKIT_ACCESSIBILITY_FOCUS_MANAGER_H__
/*
* Copyright (c) 2015 Samsung Electronics Co., Ltd.
namespace Internal DALI_INTERNAL
{
-class FocusManager;
+class AccessibilityFocusManager;
}
/**
- * @brief Manages registration of actors in a focus chain and changing the focused
- * actor within that chain.
+ * @brief Manages registration of actors in a accessibility focus chain and changing the
+ * focused actor within that chain.
*
* This class provides the functionality of registering the focus order and description
* of actors and maintaining the focus chain.
* | focus-overshot | @ref FocusOvershotSignal() |
* | focused-actor-activated | @ref FocusedActorActivatedSignal() |
*/
-class DALI_IMPORT_API FocusManager : public BaseHandle
+class DALI_IMPORT_API AccessibilityFocusManager : public BaseHandle
{
public:
typedef Signal< void ( Actor ) > FocusedActorActivatedSignalType;
/**
- * @brief Create a FocusManager handle; this can be initialised with FocusManager::New().
+ * @brief Create a AccessibilityFocusManager handle; this can be initialised with AccessibilityFocusManager::New().
*
* Calling member functions with an uninitialised handle is not allowed.
*/
- FocusManager();
+ AccessibilityFocusManager();
/**
* @brief Destructor
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
*/
- ~FocusManager();
+ ~AccessibilityFocusManager();
/**
- * @brief Get the singleton of FocusManager object.
+ * @brief Get the singleton of AccessibilityFocusManager object.
*
- * @return A handle to the FocusManager control.
+ * @return A handle to the AccessibilityFocusManager control.
*/
- static FocusManager Get();
+ static AccessibilityFocusManager Get();
/**
* @brief Set the information of the specified actor's accessibility attribute.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @pre The Actor has been initialized.
* @param actor The actor the text to be set with
* @param type The attribute type the text to be set with
/**
* @brief Get the text of the specified actor's accessibility attribute.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @pre The Actor has been initialized.
* @param actor The actor to be queried
* @param type The attribute type to be queried
* description but with no focus order being set yet) and therefore
* that actor is not focusable.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @pre The Actor has been initialized.
* @param actor The actor the focus order to be set with
* @param order The focus order of the actor
* When the focus order is 0, it means the focus order of the actor
* is undefined.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @pre The Actor has been initialized.
* @param actor The actor to be queried
* @return The focus order of the actor
* 1 where FOLast is the focus order of the very last control in the
* focus chain.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @return The focus order of the actor
*/
unsigned int GenerateNewFocusOrder() const;
* It will return an empty handle if the actor is not in the stage
* or has a focus order of 0.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @param order The focus order of the actor
*
* @return The actor that has the specified focus order or an empty
* have a defined focus order and must be focusable, visible and in
* the stage.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @pre The Actor has been initialized.
* @param actor The actor to be focused
* @return Whether the focus is successful or not
/**
* @brief Get the current focused actor.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @return A handle to the current focused actor or an empty handle if no actor is focused.
*/
Actor GetCurrentFocusActor();
/**
* @brief Get the focus group of current focused actor.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
*
* @return A handle to the immediate parent of the current focused
* actor which is also a focus group, or an empty handle if no actor
/**
* @brief Get the focus order of currently focused actor.
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
*
* @return The focus order of the currently focused actor or 0 if no
* actor is in focus.
* When the focus movement is wrapped around, the focus will be moved
* to the first focusable actor when it reaches the end of the focus chain.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @return true if the moving was successful
*/
bool MoveFocusForward();
* moved to the last focusable actor when it reaches the beginning
* of the focus chain.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @return true if the moving was successful
*/
bool MoveFocusBackward();
* that no actor is focused in the focus chain.
*
* It will emit focus changed signal without current focused actor
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
*/
void ClearFocus();
/**
* @brief Clear the every registered focusable actor from focus-manager.
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
*/
void Reset();
* @brief Set whether an actor is a focus group that can limit the
* scope of focus movement to its child actors in the focus chain.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @pre The Actor has been initialized.
* @param actor The actor to be set as a focus group.
* @param isFocusGroup Whether to set the actor to be a focus group or not.
/**
* @brief Check whether the actor is set as a focus group or not.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @pre The Actor has been initialized.
* @param actor The actor to be checked.
* @return Whether the actor is set as a focus group.
* When the group mode is enabled, the focus movement will be limited to the child actors
* of the current focus group including the current focus group itself. The current focus
* group is the closest ancestor of the current focused actor that set as a focus group.
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @param enabled Whether the group mode is enabled or not
*/
void SetGroupMode(bool enabled);
/**
* @brief Get whether the group mode is enabled or not.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @return Whether the group mode is enabled or not.
*/
bool GetGroupMode() const;
*
* When both the wrap mode and the group mode are enabled, focus will be
* wrapped within the current focus group. Focus will not be wrapped in default.
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @param wrapped Whether the focus movement is wrapped around or not
*/
void SetWrapMode(bool wrapped);
/**
* @brief Get whether the wrap mode is enabled or not.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @return Whether the wrap mode is enabled or not.
*/
bool GetWrapMode() const;
* @brief Set the focus indicator actor.
*
* This will replace the default focus indicator actor in
- * FocusManager and will be added to the focused actor as a
+ * AccessibilityFocusManager and will be added to the focused actor as a
* highlight.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @pre The indicator actor has been initialized.
* @param indicator The indicator actor to be added
*/
/**
* @brief Get the focus indicator actor.
*
- * @pre The FocusManager has been initialized.
+ * @pre The AccessibilityFocusManager has been initialized.
* @return A handle to the focus indicator actor
*/
Actor GetFocusIndicatorActor();
private:
- explicit DALI_INTERNAL FocusManager(Internal::FocusManager *impl);
+ explicit DALI_INTERNAL AccessibilityFocusManager(Internal::AccessibilityFocusManager *impl);
-}; // class FocusManager
+}; // class AccessibilityFocusManager
} // namespace Toolkit
+++ /dev/null
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include <dali-toolkit/public-api/focus-manager/focus-manager.h>
-
-// EXTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/singleton-service.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/internal/focus-manager/focus-manager-impl.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-FocusManager::FocusManager()
-{
-}
-
-FocusManager::~FocusManager()
-{
-}
-
-FocusManager FocusManager::Get()
-{
- FocusManager manager;
-
- // Check whether the focus manager is already created
- SingletonService singletonService( SingletonService::Get() );
- if ( singletonService )
- {
- Dali::BaseHandle handle = singletonService.GetSingleton(typeid(FocusManager));
- if(handle)
- {
- // If so, downcast the handle of singleton to focus manager
- manager = FocusManager(dynamic_cast<Internal::FocusManager*>(handle.GetObjectPtr()));
- }
-
- if(!manager)
- {
- // If not, create the focus manager and register it as a singleton
- manager = FocusManager(new Internal::FocusManager());
- singletonService.Register(typeid(manager), manager);
- }
- }
-
- return manager;
-}
-
-FocusManager::FocusManager(Internal::FocusManager *impl)
- : BaseHandle(impl)
-{
-}
-
-void FocusManager::SetAccessibilityAttribute(Actor actor, AccessibilityAttribute type, const std::string& text)
-{
- GetImpl(*this).SetAccessibilityAttribute(actor, type, text);
-}
-
-std::string FocusManager::GetAccessibilityAttribute(Actor actor, AccessibilityAttribute type) const
-{
- return GetImpl(*this).GetAccessibilityAttribute(actor, type);
-}
-
-void FocusManager::SetFocusOrder(Actor actor, const unsigned int order)
-{
- GetImpl(*this).SetFocusOrder(actor, order);
-}
-
-unsigned int FocusManager::GetFocusOrder(Actor actor) const
-{
- return GetImpl(*this).GetFocusOrder(actor);
-}
-
-unsigned int FocusManager::GenerateNewFocusOrder() const
-{
- return GetImpl(*this).GenerateNewFocusOrder();
-}
-
-Actor FocusManager::GetActorByFocusOrder(const unsigned int order)
-{
- return GetImpl(*this).GetActorByFocusOrder(order);
-}
-
-bool FocusManager::SetCurrentFocusActor(Actor actor)
-{
- return GetImpl(*this).SetCurrentFocusActor(actor);
-}
-
-Actor FocusManager::GetCurrentFocusActor()
-{
- return GetImpl(*this).GetCurrentFocusActor();
-}
-
-Actor FocusManager::GetCurrentFocusGroup()
-{
- return GetImpl(*this).GetCurrentFocusGroup();
-}
-
-unsigned int FocusManager::GetCurrentFocusOrder()
-{
- return GetImpl(*this).GetCurrentFocusOrder();
-}
-
-bool FocusManager::MoveFocusForward()
-{
- return GetImpl(*this).MoveFocusForward();
-}
-
-bool FocusManager::MoveFocusBackward()
-{
- return GetImpl(*this).MoveFocusBackward();
-}
-
-void FocusManager::ClearFocus()
-{
- GetImpl(*this).ClearFocus();
-}
-
-void FocusManager::Reset()
-{
- GetImpl(*this).Reset();
-}
-
-void FocusManager::SetFocusGroup(Actor actor, bool isFocusGroup)
-{
- GetImpl(*this).SetFocusGroup(actor, isFocusGroup);
-}
-
-bool FocusManager::IsFocusGroup(Actor actor) const
-{
- return GetImpl(*this).IsFocusGroup(actor);
-}
-
-void FocusManager::SetGroupMode(bool enabled)
-{
- GetImpl(*this).SetGroupMode(enabled);
-}
-
-bool FocusManager::GetGroupMode() const
-{
- return GetImpl(*this).GetGroupMode();
-}
-
-void FocusManager::SetWrapMode(bool wrapped)
-{
- GetImpl(*this).SetWrapMode(wrapped);
-}
-
-bool FocusManager::GetWrapMode() const
-{
- return GetImpl(*this).GetWrapMode();
-}
-
-void FocusManager::SetFocusIndicatorActor(Actor indicator)
-{
- GetImpl(*this).SetFocusIndicatorActor(indicator);
-}
-
-Actor FocusManager::GetFocusIndicatorActor()
-{
- return GetImpl(*this).GetFocusIndicatorActor();
-}
-
-Actor FocusManager::GetFocusGroup(Actor actor)
-{
- return GetImpl(*this).GetFocusGroup(actor);
-}
-
-FocusManager::FocusChangedSignalType& FocusManager::FocusChangedSignal()
-{
- return GetImpl(*this).FocusChangedSignal();
-}
-
-FocusManager::FocusOvershotSignalType& FocusManager::FocusOvershotSignal()
-{
- return GetImpl(*this).FocusOvershotSignal();
-}
-
-FocusManager::FocusedActorActivatedSignalType& FocusManager::FocusedActorActivatedSignal()
-{
- return GetImpl(*this).FocusedActorActivatedSignal();
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
return GetImpl(*this).GetCurrentFocusActor();
}
-bool KeyboardFocusManager::MoveFocus(Control::KeyboardFocusNavigationDirection direction)
+bool KeyboardFocusManager::MoveFocus(Control::KeyboardFocus::Direction direction)
{
return GetImpl(*this).MoveFocus(direction);
}
public:
/// @brief Pre focus change signal
- typedef Signal< Actor ( Actor, Actor, Control::KeyboardFocusNavigationDirection ) > PreFocusChangeSignalType;
+ typedef Signal< Actor ( Actor, Actor, Control::KeyboardFocus::Direction ) > PreFocusChangeSignalType;
/// @brief Focus changed signal
typedef Signal< void ( Actor, Actor ) > FocusChangedSignalType;
* @param direction The direction of focus movement
* @return true if the movement was successful
*/
- bool MoveFocus(Control::KeyboardFocusNavigationDirection direction);
+ bool MoveFocus(Control::KeyboardFocus::Direction direction);
/**
* @brief Clear the focus from the current focused actor if any, so
*
* A callback of the following type may be connected:
* @code
- * Actor YourCallbackName(Actor currentFocusedActor, Actor proposedActorToFocus, Control::KeyboardFocusNavigationDirection direction);
+ * Actor YourCallbackName(Actor currentFocusedActor, Actor proposedActorToFocus, Control::KeyboardFocus::Direction direction);
* @endcode
* @pre The Object has been initialized.
* @return The signal to connect to.
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1052.3622"
+ height="744.09448"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="concept-rectangles.svg"
+ inkscape:export-filename="/tmp/page.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="DotL"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="DotL"
+ style="overflow:visible">
+ <path
+ id="path4335"
+ d="M -2.5,-1.0 C -2.5,1.7600000 -4.7400000,4.0 -7.5,4.0 C -10.260000,4.0 -12.5,1.7600000 -12.5,-1.0 C -12.5,-3.7600000 -10.260000,-6.0 -7.5,-6.0 C -4.7400000,-6.0 -2.5,-3.7600000 -2.5,-1.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
+ transform="scale(0.8) translate(7.4, 1)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow2Mend"
+ style="overflow:visible;">
+ <path
+ id="path4301"
+ style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
+ d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
+ transform="scale(0.6) rotate(180) translate(0,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lend"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow2Lend"
+ style="overflow:visible;">
+ <path
+ id="path4295"
+ style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
+ d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
+ transform="scale(1.1) rotate(180) translate(1,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Lend"
+ style="overflow:visible;">
+ <path
+ id="path4277"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
+ transform="scale(0.8) rotate(180) translate(12.5,0)" />
+ </marker>
+ <linearGradient
+ id="linearGradient5404"
+ osb:paint="gradient">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop5406" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop5408" />
+ </linearGradient>
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Mend-0"
+ style="overflow:visible">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4301-1"
+ style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="scale(-0.6,-0.6)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Mend-1"
+ style="overflow:visible">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4301-7"
+ style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="scale(-0.6,-0.6)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Mend-2"
+ style="overflow:visible">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4301-75"
+ style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="scale(-0.6,-0.6)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Mend-08"
+ style="overflow:visible">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4301-71"
+ style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="scale(-0.6,-0.6)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Mend-5"
+ style="overflow:visible">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4301-6"
+ style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="scale(-0.6,-0.6)" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.45254834"
+ inkscape:cx="743.41974"
+ inkscape:cy="837.71772"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1158"
+ inkscape:window-x="1200"
+ inkscape:window-y="418"
+ inkscape:window-maximized="1"
+ objecttolerance="4"
+ gridtolerance="4">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3181"
+ empspacing="4"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ spacingx="32px"
+ spacingy="32px" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-308.2677)">
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/image-scaling/cards.jpg"
+ xlink:href="cards.jpg"
+ y="-387.63782"
+ x="160"
+ id="image4157"
+ height="256"
+ width="256"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-30"
+ width="128"
+ height="192.00003"
+ x="128"
+ y="636.36212"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-30-3"
+ width="1.0498172e-05"
+ height="192"
+ x="191.99998"
+ y="188.36218"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:3.63730645;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-30-0"
+ width="96.000015"
+ height="1.7800441e-05"
+ x="143.99998"
+ y="508.36218"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-30-31"
+ width="192"
+ height="192"
+ x="512"
+ y="188.36212"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:3.14999795;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-30-34"
+ width="95.999939"
+ height="95.999954"
+ x="560"
+ y="460.36221"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-30-4"
+ width="128"
+ height="192.00003"
+ x="544"
+ y="636.36212"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4.27617979;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow2Mend)"
+ d="m 224,284.36215 c 256,0 256,0 256,0"
+ id="path4268"
+ inkscape:connector-curvature="0"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow2Mend)"
+ d="m 288,732.36221 c 224,0 224,0 224,0"
+ id="path4268-0"
+ inkscape:connector-curvature="0"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow2Mend)"
+ d="m 280.67645,508.36215 c 224,0 247.40075,3e-5 247.40075,3e-5"
+ id="path4268-4"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4.19999981;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-mid:none;marker-end:none"
+ d="m 352,-99.6378 c 0,159.99998 0,383.99998 0,383.99998"
+ id="path5307"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4.19999981;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-mid:url(#DotL)"
+ d="m 320,-99.6378 0,607.99998"
+ id="path5879"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow2Mend)"
+ d="m 688.3995,508.36218 c 224,0 239.6005,0 239.6005,0"
+ id="path4268-4-4"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4.19999981;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 704,732.36218 96,0 0,-224"
+ id="path6099"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4.19999981;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 736,284.36218 64,0 0,224 0,0 0,0"
+ id="path6101"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-30-4-1"
+ width="96"
+ height="96"
+ x="960"
+ y="460.32184"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-30-31-3"
+ width="256"
+ height="256"
+ x="160"
+ y="-387.63782"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4.19999981;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 864,508.36218 c 0,-511.9999802 0,-735.99998 0,-735.99998 l -416,0"
+ id="path6157"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/image-scaling/cards.jpg"
+ xlink:href="cards.jpg"
+ y="636.36243"
+ x="1423.9999"
+ id="image4157-4-5"
+ height="96.000244"
+ width="96.000244"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4.19999981;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow2Mend)"
+ d="m 1088,508.36218 c 72.8302,0 192,0 192,0"
+ id="path4268-4-4-9"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot6201"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(128,1044.2677)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion6203"><rect
+ id="rect6205"
+ width="132.37465"
+ height="33.093662"
+ x="1085.7874"
+ y="-436.24619" /></flowRegion><flowPara
+ id="flowPara6207" /></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot6415"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(128,1044.2677)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion6417"><rect
+ id="rect6419"
+ width="129.22287"
+ height="96.129211"
+ x="-3.1517775"
+ y="-119.49255" /></flowRegion><flowPara
+ id="flowPara6421" /></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot6423"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(128,1044.2677)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion6425"><rect
+ id="rect6427"
+ width="129.22287"
+ height="111.8881"
+ x="0"
+ y="-117.91666" /></flowRegion><flowPara
+ id="flowPara6429"
+ style="font-weight:normal">Requested Size</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot6431"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(-44.87499,5.9402098)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion6433"><rect
+ id="rect6435"
+ width="168.25861"
+ height="49.914528"
+ x="193.83432"
+ y="-119.49255" /></flowRegion><flowPara
+ id="flowPara6437">Raw size (e.)</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot6439"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(128,1044.2677)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion6441"><rect
+ id="rect6443"
+ width="256"
+ height="89.944725"
+ x="352"
+ y="-119.90552"
+ ry="0" /></flowRegion><flowPara
+ id="flowPara6445">Target for fitting</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot6447"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(114.89062,696.48284)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion6449"><rect
+ id="rect6451"
+ width="130.3277"
+ height="34.676437"
+ x="830.49335"
+ y="-116.34077" /></flowRegion><flowPara
+ id="flowPara6453">Fitted Size</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot6455"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(285.45703,886.12794)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion6457"><rect
+ id="rect6459"
+ width="192"
+ height="52.511868"
+ x="1090.3438"
+ y="-113.69655" /></flowRegion><flowPara
+ id="flowPara6461">Scaled Pixels</flowPara></flowRoot> <rect
+ style="fill:none;stroke:#ff0000;stroke-width:6.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-30-3-0"
+ width="1.4271966"
+ height="8.0063074e-11"
+ x="192"
+ y="-3.6378176"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-30-31-3-4"
+ width="256"
+ height="256"
+ x="480"
+ y="-131.63782"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.35555581;stroke-dasharray:4.19999981, 12.59999943;stroke-dashoffset:0"
+ id="rect6501-6"
+ width="320"
+ height="1184"
+ x="448"
+ y="-163.63782"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:4.2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.35555581000000003;stroke-dasharray:4.2,12.6;stroke-dashoffset:0"
+ id="rect6501"
+ width="192"
+ height="1024"
+ x="96"
+ y="-35.637817"
+ ry="0"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot6521"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(128,1044.2677)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion6523"><rect
+ id="rect6525"
+ width="16.714825"
+ height="34.543972"
+ x="603.96234"
+ y="-92.761055" /></flowRegion><flowPara
+ id="flowPara6527" /></flowRoot> <path
+ style="fill:none;stroke:#000000;stroke-width:4.27617979;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow2Mend)"
+ d="m 224,-3.6378202 c 192,0 199.26801,0 199.26801,0"
+ id="path4268-1"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4.19999981;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-mid:none;marker-end:none"
+ d="m 384,-99.63782 c 0,95.9999998 0,95.9999998 0,95.9999998"
+ id="path5307-3"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cc"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4.19999981;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 800,284.36218 c 0,-287.9999802 0,-287.9999802 0,-287.9999802 l -32,0"
+ id="path6571"
+ inkscape:connector-curvature="0"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:4.19999981;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-mid:none;marker-end:none"
+ d="m 448,-291.6378 c 832,0 736,-2e-5 736,-2e-5 l 0,800"
+ id="path6573"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccc"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/image-scaling/cards.jpg"
+ xlink:href="cards.jpg"
+ y="444.36243"
+ x="1407.9999"
+ id="image4157-0"
+ height="128.00024"
+ width="128.00024"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/image-scaling/cards.jpg"
+ xlink:href="cards.jpg"
+ y="124.36218"
+ x="1344"
+ id="image4157-4"
+ height="256"
+ width="256"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot7007"
+ style="fill:black;stroke:none;stroke-opacity:1;stroke-width:1px;stroke-linejoin:miter;stroke-linecap:butt;fill-opacity:1;font-family:Sans;font-style:normal;font-weight:normal;font-size:24px;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;text-align:center"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion7009"><rect
+ id="rect7011"
+ width="14.182999"
+ height="64.611435"
+ x="1279.6217"
+ y="594.38507" /></flowRegion><flowPara
+ id="flowPara7013" /></flowRoot> <rect
+ style="fill:none;stroke:#000000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.35555581;stroke-dasharray:4.2, 12.6;stroke-dashoffset:0"
+ id="rect6501-6-0"
+ width="320"
+ height="736.00024"
+ x="1312"
+ y="92.362183"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot7035"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(-34.212099,300.28395)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion7037"><rect
+ id="rect7039"
+ width="128.02527"
+ height="133.95055"
+ x="1151.9747"
+ y="361.1535" /></flowRegion><flowPara
+ id="flowPara7041">SamplingMode</flowPara></flowRoot> <path
+ style="fill:none;stroke:#000000;stroke-width:4.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ d="m 1184,328.09448 c 0,-128 0,-128 0,-128"
+ id="path7439"
+ inkscape:connector-curvature="0"
+ transform="translate(0,308.2677)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot7035-9"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(-351.98437,301.85984)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion7037-2"><rect
+ id="rect7039-7"
+ width="128.02527"
+ height="133.95055"
+ x="1151.9747"
+ y="361.1535" /></flowRegion><flowPara
+ id="flowPara7041-2">Fitting Mode</flowPara></flowRoot> <path
+ style="fill:none;stroke:#000000;stroke-width:4.19999981;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ d="m 864,636.36218 c 0,-128 0,-128 0,-128"
+ id="path7439-2"
+ inkscape:connector-curvature="0"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.35555576;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect7524"
+ width="88.249771"
+ height="73.972183"
+ x="821.03802"
+ y="350.12228"
+ transform="translate(0,308.2677)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"
+ ry="20.057787" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.3555557;stroke-dasharray:none;stroke-dashoffset:0"
+ id="rect7526"
+ width="128"
+ height="77.123962"
+ x="1120"
+ y="346.97052"
+ transform="translate(0,308.2677)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"
+ ry="23.400755" />
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="1482.6659"
+ y="403.63452"
+ id="text7530"
+ sodipodi:linespacing="125%"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><tspan
+ sodipodi:role="line"
+ id="tspan7532"
+ x="1482.6659"
+ y="403.63452">k.</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="1472"
+ y="604.36218"
+ id="text7534"
+ sodipodi:linespacing="125%"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><tspan
+ sodipodi:role="line"
+ id="tspan7536"
+ x="1472"
+ y="604.36218">l.</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="1472"
+ y="753.48798"
+ id="text7538"
+ sodipodi:linespacing="125%"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><tspan
+ sodipodi:role="line"
+ id="tspan7540"
+ x="1472"
+ y="753.48798">m.</tspan></text>
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;stroke:none"
+ id="path7542"
+ sodipodi:cx="1424"
+ sodipodi:cy="-327.90552"
+ sodipodi:rx="16"
+ sodipodi:ry="16"
+ d="m 1440,-327.90552 c 0,8.83656 -7.1634,16 -16,16 -8.8366,0 -16,-7.16344 -16,-16 0,-8.83655 7.1634,-16 16,-16 8.8366,0 16,7.16345 16,16 z"
+ transform="matrix(0.5,0,0,0.5,472,672.43994)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;stroke:none"
+ id="path7542-2"
+ sodipodi:cx="1424"
+ sodipodi:cy="-327.90552"
+ sodipodi:rx="16"
+ sodipodi:ry="16"
+ d="m 1440,-327.90552 c 0,8.83656 -7.1634,16 -16,16 -8.8366,0 -16,-7.16344 -16,-16 0,-8.83655 7.1634,-16 16,-16 8.8366,0 16,7.16345 16,16 z"
+ transform="matrix(0.5,0,0,0.5,152,672.43994)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#000000;fill-opacity:1;stroke:none"
+ id="path7542-1"
+ sodipodi:cx="1424"
+ sodipodi:cy="-327.90552"
+ sodipodi:rx="16"
+ sodipodi:ry="16"
+ d="m 1440,-327.90552 c 0,8.83656 -7.1634,16 -16,16 -8.8366,0 -16,-7.16344 -16,-16 0,-8.83655 7.1634,-16 16,-16 8.8366,0 16,7.16345 16,16 z"
+ transform="matrix(0.5,0,0,0.5,88,672.51025)"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="192"
+ y="34.160557"
+ id="text7530-8"
+ sodipodi:linespacing="125%"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><tspan
+ sodipodi:role="line"
+ id="tspan7532-7"
+ x="192"
+ y="34.160557">a.</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="192"
+ y="414.78287"
+ id="text7530-8-1"
+ sodipodi:linespacing="125%"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><tspan
+ sodipodi:role="line"
+ id="tspan7532-7-2"
+ x="192"
+ y="414.78287">b.</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="192"
+ y="546.16058"
+ id="text7530-8-6"
+ sodipodi:linespacing="125%"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><tspan
+ sodipodi:role="line"
+ id="tspan7532-7-9"
+ x="192"
+ y="546.16058">c.</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="192"
+ y="866.16058"
+ id="text7530-8-7"
+ sodipodi:linespacing="125%"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><tspan
+ sodipodi:role="line"
+ id="tspan7532-7-4"
+ x="192"
+ y="866.16058">d.</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="608"
+ y="162.16058"
+ id="text7530-8-3"
+ sodipodi:linespacing="125%"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><tspan
+ sodipodi:role="line"
+ id="tspan7532-7-6"
+ x="608"
+ y="162.16058">f.</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="608"
+ y="418.16058"
+ id="text7530-8-33"
+ sodipodi:linespacing="125%"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><tspan
+ sodipodi:role="line"
+ id="tspan7532-7-48"
+ x="608"
+ y="418.16058">g.</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="608"
+ y="596.53143"
+ id="text7530-8-0"
+ sodipodi:linespacing="125%"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><tspan
+ sodipodi:role="line"
+ id="tspan7532-7-0"
+ x="608"
+ y="596.53143">h.</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="608"
+ y="866.16058"
+ id="text7530-8-68"
+ sodipodi:linespacing="125%"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><tspan
+ sodipodi:role="line"
+ id="tspan7532-7-66"
+ x="608"
+ y="866.16058">i.</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ x="1003.7878"
+ y="632.43921"
+ id="text7530-8-2"
+ sodipodi:linespacing="125%"
+ inkscape:export-filename="/tmp/concept-rectangles.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><tspan
+ sodipodi:role="line"
+ id="tspan7532-7-68"
+ x="1003.7878"
+ y="632.43921">j.</tspan></text>
+ </g>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1052.3622"
+ height="744.09448"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="example-fitting-mode-options.svg"
+ inkscape:export-filename="/tmp/1.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient5404"
+ osb:paint="gradient">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop5406" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop5408" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.63456256"
+ inkscape:cx="704.49723"
+ inkscape:cy="501.75416"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1158"
+ inkscape:window-x="1200"
+ inkscape:window-y="418"
+ inkscape:window-maximized="1"
+ objecttolerance="4"
+ gridtolerance="4">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3181"
+ empspacing="4"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ spacingx="32px"
+ spacingy="32px" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-308.2677)">
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/door.jpg"
+ xlink:href="door.jpg"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ width="256"
+ height="256"
+ id="image6106"
+ x="32"
+ y="92.362183" />
+ <g
+ id="g6199"
+ transform="matrix(0.75,0,0,0.75,158.83024,-448.90946)"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394">
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/door.jpg"
+ xlink:href="door.jpg"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/shared-javascript-and-cpp-documentation/door-scale-to-fill2.png"
+ y="764.36218"
+ x="512"
+ id="image6106-0"
+ height="256"
+ width="256" />
+ <rect
+ y="764.36218"
+ x="719.81006"
+ height="258.6265"
+ width="51.309372"
+ id="rect6179"
+ style="fill:#ffffff;fill-opacity:1;stroke:none"
+ inkscape:export-filename="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/shared-javascript-and-cpp-documentation/door-scale-to-fill.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ y="764.36218"
+ x="512"
+ height="259.15176"
+ width="48.189934"
+ id="rect6179-2"
+ style="fill:#ffffff;fill-opacity:1;stroke:none"
+ inkscape:export-filename="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/shared-javascript-and-cpp-documentation/door-scale-to-fill.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/shared-javascript-and-cpp-documentation/door-scale-to-fill2.png"
+ y="764.36218"
+ x="560"
+ height="256.00003"
+ width="160"
+ id="rect3183-1-9-1-6"
+ style="fill:none;stroke:#ff0000;stroke-width:4.28426027;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:3.21319532;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1"
+ width="120"
+ height="192.00003"
+ x="356"
+ y="124.36218"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/door.jpg"
+ xlink:href="door.jpg"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ width="120"
+ height="135.85014"
+ id="image6106-5"
+ x="804"
+ y="152.43707" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:3.21319532;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-4"
+ width="120"
+ height="192.00003"
+ x="804"
+ y="124.36212"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/door.jpg"
+ xlink:href="door.jpg"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ width="120"
+ height="135.85014"
+ id="image6106-5-3"
+ x="1030.3395"
+ y="152.43707" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:3.21319532;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-4-1"
+ width="120"
+ height="192.00003"
+ x="1030.3395"
+ y="124.36212"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/door.jpg"
+ xlink:href="door.jpg"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ width="192"
+ height="192"
+ id="image6106-4"
+ x="1218.3396"
+ y="124.36218" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:3.21319532;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-3"
+ width="120"
+ height="192.00003"
+ x="1254.3396"
+ y="124.36218"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/dog.jpg"
+ xlink:href="dog.jpg"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ width="256"
+ height="256"
+ id="image6359"
+ x="32"
+ y="412.36218" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:3.31857371;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-0"
+ width="128.00003"
+ height="192"
+ x="-604.36218"
+ y="320"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"
+ transform="matrix(0,-1,1,0,0,0)" />
+ <g
+ id="g6476"
+ transform="translate(-7.128906e-7,-384.82965)"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394">
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/dog.jpg"
+ xlink:href="dog.jpg"
+ y="829.19183"
+ x="544"
+ id="image6359-2"
+ height="192"
+ width="192" />
+ <rect
+ transform="translate(0,308.2677)"
+ y="520.09448"
+ x="544"
+ height="32"
+ width="192"
+ id="rect6470"
+ style="fill:#ffffff;fill-opacity:1;stroke:none" />
+ <rect
+ transform="translate(0,308.2677)"
+ y="680.09448"
+ x="541.66046"
+ height="33.94965"
+ width="196.67912"
+ id="rect6474"
+ style="fill:#ffffff;fill-opacity:1;stroke:none" />
+ <rect
+ transform="matrix(0,-1,1,0,0,0)"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/shared-javascript-and-cpp-documentation/example-scale-to-fill-sequence.png"
+ y="544"
+ x="-989.19183"
+ height="192"
+ width="128.00003"
+ id="rect3183-1-9-1-0-2"
+ style="fill:none;stroke:#ff0000;stroke-width:3.31857371;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/dog.jpg"
+ xlink:href="dog.jpg"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ width="192"
+ height="192"
+ id="image6359-2-2"
+ x="994.33954"
+ y="445.19183" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:3.31857371;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-0-4"
+ width="128.00003"
+ height="192"
+ x="-605.19183"
+ y="994.33954"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"
+ transform="matrix(0,-1,1,0,0,0)" />
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/dog.jpg"
+ xlink:href="dog.jpg"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ width="128"
+ height="128"
+ id="image6359-2-2-2"
+ x="1250.3396"
+ y="477.19183" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:3.31857371;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-0-0"
+ width="128.00003"
+ height="192"
+ x="-605.19183"
+ y="1218.3396"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"
+ transform="matrix(0,-1,1,0,0,0)" />
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/dog.jpg"
+ xlink:href="dog.jpg"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ width="128"
+ height="128"
+ id="image6359-2-2-2-1"
+ x="800"
+ y="476.36218" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:3.31857371;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9-1-0-0-6"
+ width="128.00003"
+ height="192"
+ x="-604.36218"
+ y="768"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"
+ transform="matrix(0,-1,1,0,0,0)" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot3024"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(0,244.2677)"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion3026"><rect
+ id="rect3028"
+ width="256.29398"
+ height="127.03266"
+ x="33.429649"
+ y="746.32312" /></flowRegion><flowPara
+ id="flowPara3030">Raw Image</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot3032"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(0,244.2677)"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion3034"><rect
+ id="rect3036"
+ width="192.25842"
+ height="96.91716"
+ x="318.32953"
+ y="744.09448" /></flowRegion><flowPara
+ id="flowPara3038">Fitting Target</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot3040"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(0,244.2677)"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion3042"><rect
+ id="rect3044"
+ width="192.25842"
+ height="91.40155"
+ x="542.89368"
+ y="744.88245" /></flowRegion><flowPara
+ id="flowPara3046">SCALE_TO_FILL</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot3048"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(0,244.2677)"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion3050"><rect
+ id="rect3052"
+ width="193.83432"
+ height="96.91716"
+ x="767.45782"
+ y="744.09448" /></flowRegion><flowPara
+ id="flowPara3054">SHRINK_TO_FIT</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot3056"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(0,244.2677)"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion3058"><rect
+ id="rect3060"
+ width="193.83432"
+ height="126.85905"
+ x="990.44611"
+ y="745.67035" /></flowRegion><flowPara
+ id="flowPara3062">FIT_WIDTH</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot3064"
+ style="font-size:24px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+ transform="translate(0,244.2677)"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394"><flowRegion
+ id="flowRegion3066"><rect
+ id="rect3068"
+ width="193.04637"
+ height="100.06894"
+ x="1215.7982"
+ y="744.88245" /></flowRegion><flowPara
+ id="flowPara3070">FIT_HEIGHT</flowPara></flowRoot> <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/liberty.jpg"
+ xlink:href="liberty.jpg"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ width="256"
+ height="256"
+ id="image3239"
+ x="32"
+ y="700.36218" />
+ <g
+ id="g4034"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394">
+ <rect
+ y="764.36218"
+ x="352"
+ height="128"
+ width="128"
+ id="rect3244"
+ style="fill:none;stroke:#ff0000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ inkscape:export-filename="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/shared-javascript-and-cpp-documentation/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ </g>
+ <g
+ transform="translate(224,-1.9531262e-7)"
+ id="g4034-5"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394">
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/liberty.jpg"
+ xlink:href="liberty.jpg"
+ y="764.36218"
+ x="352"
+ id="image3239-9-8"
+ height="128"
+ width="128" />
+ <rect
+ y="764.36218"
+ x="352"
+ height="128"
+ width="128"
+ id="rect3244-5"
+ style="fill:none;stroke:#ff0000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ <g
+ transform="translate(448,-1.9531262e-7)"
+ id="g4034-4"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394">
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/liberty.jpg"
+ xlink:href="liberty.jpg"
+ y="764.36218"
+ x="352"
+ id="image3239-9-88"
+ height="128"
+ width="128" />
+ <rect
+ y="764.36218"
+ x="352"
+ height="128"
+ width="128"
+ id="rect3244-9"
+ style="fill:none;stroke:#ff0000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ <g
+ transform="translate(672,-1.9531262e-7)"
+ id="g4034-3"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394">
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/liberty.jpg"
+ xlink:href="liberty.jpg"
+ y="764.36218"
+ x="352"
+ id="image3239-9-85"
+ height="128"
+ width="128" />
+ <rect
+ y="764.36218"
+ x="352"
+ height="128"
+ width="128"
+ id="rect3244-8"
+ style="fill:none;stroke:#ff0000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ <g
+ transform="translate(896,-1.9531262e-7)"
+ id="g4034-2"
+ inkscape:export-filename="/tmp/fitting-mode-options.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394">
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/liberty.jpg"
+ xlink:href="liberty.jpg"
+ y="764.36218"
+ x="352"
+ id="image3239-9-7"
+ height="128"
+ width="128" />
+ <rect
+ y="764.36218"
+ x="352"
+ height="128"
+ width="128"
+ id="rect3244-95"
+ style="fill:none;stroke:#ff0000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+ </g>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1052.3622"
+ height="744.09448"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="example-scale-to-fill-problem.svg"
+ inkscape:export-filename="/tmp/example-scale-to-fill-sequence.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient5404"
+ osb:paint="gradient">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop5406" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop5408" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.94173904"
+ inkscape:cx="330.62812"
+ inkscape:cy="291.60912"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1158"
+ inkscape:window-x="1200"
+ inkscape:window-y="418"
+ inkscape:window-maximized="1"
+ objecttolerance="4"
+ gridtolerance="4">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3181"
+ empspacing="4"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ spacingx="32px"
+ spacingy="32px" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-308.2677)">
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/phone.png"
+ xlink:href="phone.png"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/tmp/image3087.png"
+ width="187"
+ height="348"
+ id="image3087"
+ x="736"
+ y="608.36218" />
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/gallery-large-12.jpg"
+ xlink:href="gallery-large-12.jpg"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/tmp/image3087.png"
+ width="512"
+ height="512"
+ id="image3178"
+ x="32"
+ y="508.36218" />
+ <rect
+ style="fill:#ffffff;fill-opacity:1;stroke-width:4.19999980999999956;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke:#ff0000;stroke-opacity:1"
+ id="rect3183"
+ width="154.95831"
+ height="254.03409"
+ x="753.73383"
+ y="347.32999"
+ transform="translate(0,308.2677)"
+ inkscape:export-filename="/tmp/image3087.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:none;fill-opacity:1;stroke:#ff0000;stroke-width:4.19999980999999956;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3957"
+ width="512"
+ height="512"
+ x="32"
+ y="200.09448"
+ transform="translate(0,308.2677)"
+ ry="0"
+ inkscape:export-filename="/tmp/image3087.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#ff0000;stroke-width:4.2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ d="M 554.87974,200.09448 C 736,345.39199 736,346.14284 736,346.14284"
+ id="path5414"
+ inkscape:connector-curvature="0"
+ transform="translate(0,308.2677)"
+ inkscape:export-filename="/tmp/image3087.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <path
+ style="fill:none;stroke:#ff0000;stroke-width:4.20000000000000018;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ d="M 553.37804,712.09448 C 736,604.43598 736,604.43598 736,604.43598"
+ id="path5416"
+ inkscape:connector-curvature="0"
+ transform="translate(0,308.2677)"
+ inkscape:export-filename="/tmp/image3087.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ </g>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1052.3622"
+ height="744.09448"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="example-scale-to-fill-sequence.svg"
+ inkscape:export-filename="/tmp/example-scale-to-fill-problem.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient5404"
+ osb:paint="gradient">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop5406" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop5408" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.94173902"
+ inkscape:cx="676.6218"
+ inkscape:cy="430.48889"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1158"
+ inkscape:window-x="1200"
+ inkscape:window-y="418"
+ inkscape:window-maximized="1"
+ objecttolerance="4"
+ gridtolerance="4">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3181"
+ empspacing="4"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ spacingx="32px"
+ spacingy="32px" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-308.2677)">
+ <rect
+ style="fill:none;fill-opacity:1;stroke:#ff0000;stroke-width:4.19999980999999956;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3957"
+ width="512"
+ height="512"
+ x="32"
+ y="200.09448"
+ transform="translate(0,308.2677)"
+ ry="0"
+ inkscape:export-filename="/tmp/rect3957.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/gallery-large-12.jpg"
+ xlink:href="gallery-large-12.jpg"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/tmp/rect3957.png"
+ width="512"
+ height="512"
+ id="image3178"
+ x="32"
+ y="508.36218" />
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/gallery-large-12.jpg"
+ xlink:href="gallery-large-12.jpg"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/tmp/rect3957.png"
+ width="256"
+ height="256"
+ id="image3178-6"
+ x="640"
+ y="636.36218" />
+ <rect
+ style="fill:none;stroke:#ff0000;stroke-width:4.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect5513"
+ width="256"
+ height="256"
+ x="640"
+ y="636.36218"
+ inkscape:export-filename="/tmp/rect3957.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <image
+ sodipodi:absref="/home/SERILOCAL/andrew.cox/git/opendali-features/dali-toolkit/docs/content/figures/gallery-large-12.jpg"
+ xlink:href="gallery-large-12.jpg"
+ inkscape:export-ydpi="89.269394"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-filename="/tmp/rect3957.png"
+ width="256"
+ height="256"
+ id="image3178-6-5"
+ x="992"
+ y="636.36218" />
+ <rect
+ style="fill:#000000;fill-opacity:0.74666664;stroke:none"
+ id="rect5554"
+ width="50.182735"
+ height="256"
+ x="992"
+ y="328.09448"
+ transform="translate(0,308.2677)"
+ inkscape:export-filename="/tmp/rect3957.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:#000000;fill-opacity:0.74666628;stroke:none"
+ id="rect5554-1"
+ width="50.182735"
+ height="256"
+ x="1197.8173"
+ y="636.36218"
+ inkscape:export-filename="/tmp/rect3957.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ <rect
+ style="fill:none;fill-opacity:1;stroke:#ff0000;stroke-width:4.19999980999999956;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3183-1-9"
+ width="154.95831"
+ height="254.03409"
+ x="1043.3221"
+ y="637.48846"
+ inkscape:export-filename="/tmp/rect3957.png"
+ inkscape:export-xdpi="89.269394"
+ inkscape:export-ydpi="89.269394" />
+ </g>
+</svg>
+ [DALi Fundamentals](@ref fundamentals)
+ [Actors & Stage](@ref actors-and-stage)
+ [Coordinate System](@ref coordinate-system)
- + Units & the Default Camera (default unit 1 is 1 pixel with default camera)
+ + [Scene Graph](@ref scene-graph)
+ [Handle / Body Idiom](@ref handle-body-idiom)
- + Signals
+ + [Signals](@ref signals)
+ [Properties](@ref properties)
- + Actions
- + Tutorial
- + [Hello World](@ref hello-world)
+ + [Actions](@ref actions)
+ + [Tutorial: Hello World](@ref hello-world)
### Getting Started
- + How to build DALi on Ubuntu Desktop
+ + [How to build DALi on Ubuntu Desktop](@ref build-ubuntu)
### Programming Guide
+ [Programming Languages:](@ref programming-languages)
+ [JavaScript](@ref java-script-support)
+ [JSON](@ref json-support)
+ [Application](@ref dali-application)
- + Actors
+ + [Actors](@ref actors-and-stage)
+ [Positioning](@ref positioning-actors)
+ [Event Handling](@ref event-system)
+ [Layouting](@ref size-negotiation)
+ [Image Actor](@ref image-actor)
- + Animation
- + AnimateTo
- + AnimateBy
- + Key Frame Animations
- + Path Animations
+ + [Animation](@ref animation)
+ + [Basic Framework](@ref animation-basics)
+ + [Key Frame Animations](@ref animation-key-frame)
+ + [Path Animations](@ref animation-paths)
+ [Constraints](@ref constraints)
- + Equal To Constraint
- + Relative To Constraint
- + Linear Constrainer
- + Path Constrainer
+ + [Equal To Constraint](@ref constraints-equal-to)
+ + [Relative To Constraint](@ref constraints-relative-to)
+ [Multi-threading Notes](@ref animation-multi-threading-notes)
+ [Shader Animation](@ref animation-shader)
- + [Example and Usage](@ref animation-example)
- + [Rotation with quaternions](@ref animation-rotation)
### Resources
- + Resource Image
- + 9 Patch Image
- + Buffer Image
+ + [Resource Image](@ref resource-image)
+ + [9 Patch Image](@ref resource-9-patch)
+ + [Buffer Image](@ref resource-buffer)
### Control Base Class
+ [Background Feature](@ref background)
+ Keyboard Focus
+ Accessibility
-### UI Controls
+### UI Components
+ [Text Label](@ref text-label)
+ [Text Field](@ref text-field)
+ Buttons
+ Environment Variables
+ [Resource Tracking](@ref resourcetracking)
+ Logging
- + GUI Builder
+ [Stagehand - DALi Visual Debugger](@ref stagehand)
### Viewing Modes
### Extending DALi
+ Control Base Class Services
- + How to write Custom UI Controls
+ + How to write Custom UI Components
+ [Size Negotiation for Controls](@ref size-negotiation-controls)
+ [Type Registration](@ref type-registration)
+ How to make Controls Scriptable
### Application Optimization Guide
+ [Texture Atlases](@ref textureatlases)
+ [Texture Compression](@ref texturecompression)
+ + [Rescaling Images](@ref resourceimagescaling)
+ Performance & Debugging
+ [Performance Tips](@ref performancetips)
+ [Performance Profiling](@ref performanceprofiling)
+++ /dev/null
-/*! \page animation-example Example and Usage
-
- We will start by showing the steps for animating an actors position and opacity so the actor moves whilst the opacity changes.
-
- Next more interesting animations methods (effects) with individual timing will be explained.
-
- \section simple-anim Simple Animation moving an actor whilst altering opacity.
-
- We declare an animation called myAnimation
-
- @code
- Dali::Animation myAnimation
- @endcode
-
- A new animation instance is created with a specified duration. Here the duration of the animation will be 0.5 seconds.
- Some other settings are incorporated by default and will be explained later.
- @code
- myAnimation = Animation::New(0.5f);
- @endcode
-
- Here we add the animators, these are the building blocks (functions) of the animation and define what we want to see
- @code
- myAnimation.AnimateTo(Property(actor, Actor::Property::OPACITY), 1.0f);
- myAnimation.AnimateTo(Property(actor, Actor::Property::POSITION), Vector3(x, y, z));
- @endcode
-
- start animation, when this is called we want the animation to start playing so here the actor will move whilst the opacity changes.
- @code
- myAnimation.Play();
- @endcode
- \section advanced-anims Adding more advanced animators, if simply moving the actor is not enough we have further animations methods.
-
- AnimateBy and AnimateTo, method names are appended by 'By' or 'To' either animate to a supplied value or animate by a supplied value. For example an actor at (10,10,10) calling AnimateBy(Property(actor, Actor::Property::POSITION), 50,0,0) would mean its location is (60,0,0) whilst AnimateTo(Property(actor, Actor::Property::POSITION), 50,0,0) would result in a location (50,0,0).
-
- Dali::AlphaFunction can be used to give interesting effects to the animation, for example the MOVEment of an actor on screen can speed up and slow down following a sine curve by using the Dali::AlphaFunction::EASE_IN_OUT_SINE instead of AlphaFunction::LINEAR
-
- @code
- myAnimation.AnimateTo(Property(actor, Actor::Property::POSITION), Vector3(x, y, z), AlphaFunction::LINEAR, delay, ANIMATOR_DURATION);
- myAnimation.AnimateTo(Property(actor, Actor::Property::SIZE), actorSize, AlphaFunction::EASE_IN, delay, ANIMATOR_DURATION);
- @endcode
- \section playback-control Controlling a playing animation
-
- The 3 controls we have are start, pause and stop
- @code
- Dali::Animation::Play();
- Dali::Animation::Stop();
- Dali::Animation::Pause();
- @endcode
-
- \section default-settings Default settings
- The call Dali::Animation::New provides some default settings but each has a setter function if the defaults are not suitable. (Getters also exist)
- @code
- Dali::Animation::SetEndAction
- Dali::Animation::SetLooping
- Dali::Animation::SetDefaultAlphaFunction
- @endcode
-
- \section end-signal End Signal
- The following signal can be connected to if it is required to know when an animation is complete.
- /code Dali::Animation::SignalFinish(); /endcode
-
- */
-
<h2 class="pg">Multi-threaded Architecture</h2>
-Dali animations and rendering occur in a dedicated rendering thread. This allows animations to run smoothly, regardless of the time taken to process inputs events etc. in application code.
+DALi animations and rendering occur in a dedicated rendering thread. This allows animations to run smoothly, regardless of the time taken to process inputs events etc. in application code.
-Internally Dali contains a scene-graph, which mirrors the Actor hierachy. The scene-graph objects perform the actual animation & rendering, whilst Actors provide thread-safe access.
+Internally DALi contains a scene-graph, which mirrors the Actor hierachy. The scene-graph objects perform the actual animation & rendering, whilst Actors provide thread-safe access.
An example actor hierachy is shown below, in which one of the actors is being animated. The objects in green are created by the application code, whilst the private objects in blue are used in the dedicated rendering thread.
+++ /dev/null
-/*! \page animation-rotation Rotation with quaternions
- *
- * \ref Dali::Quaternion "Quaternions" are used to specify unique orientations on actors. They are also
- * very useful for calculating smooth transitions between orientations.
- *
- * The Dali::Actor class provides the ability to set the orientation
- * by both angle+axis and quaternion. It also allows you to rotate the
- * actor around another quaternion.
- *
- * @code
- * Dali::Actor actor;
- * actor.SetOrientation(Quaternion(Radian(Degree(45.0f)).value, Vector3::XAXIS)),
- *
- * Quaternion q(Radian(Degree(30.0f)).value, Vector3(1.0f, 1.0f, 0.0f));
- * actor.RotateBy(q);
- * @endcode
- *
- * The Dali::Animation class provides several AnimateTo methods that
- * use \ref Dali::Quaternion "Quaternions" directly to change the orientation.
- *
- * @code
- * mAnimation = Animation::New(5.0f); // 5 seconds
- * Quaternion q(Radian(Degree(45.0f)).value, Vector3::YAXIS);
- * Quaternion r(Radian(Degree(30.0f)).value, Vector3::ZAXIS);
- * q *= r;
- * mAnimation.AnimateTo(Property(mActor, Actor::Property::ORIENTATION), q, AlphaFunction::EASE_IN_OUT);
- * mAnimation.Play();
- * @endcode
- */
/*! \page constraints Constraints
*
-<h2 class="pg">Introduction</h2>
+<h1 class="pg">Introduction</h1>
Constraints are used to modify the property of an actor, based on other properties of the same actor; properties of the actor's parent; or properties of another actor altogether, when the modification needs to be at run-time.
Custom functions or functors can be supplied, where the desired value of the property can be calculated.
Not all properties can be used as a constraint input, please see Dali::Handle::IsPropertyAConstraintInput() for more details.
-<h2 class="pg">When to use a Constraint</h2>
+<h1 class="pg">When to use a Constraint</h1>
Constraints are designed as a way of modifying properties that cannot be modified by any existing built in functionality; Like Animations, Size negotiation or Parent anchor, origin settings.
As they provide the ability for the application developer to execute their own code within the update thread, DALi can no-longer guarantee the timeliness of this code, or how optimised it may be.
For most general cases, the position and size requirements of a child or parent actor (from it's child or parent) can be calculated with Size Negotiation.
-<h2 class="pg">Constraint Sources</h2>
+<h1 class="pg">Constraint Sources</h1>
These are properties of this (or another actor) that are used as inputs into the constraint.
The constraint will take these values, optionally perform a calculation on them (if using a custom functor) and write the result to the specified property of the target actor.
The source actor is specified as either the same actor, it's parent or another actor.
-<h3 class="pg">Local Source</h3>
+<h2 class="pg">Local Source</h2>
A local source is based on the local properties (i.e. size, position, scale, orientation, color) of an actor.
For example, the actor's orientation could be used as a constraint input source.
Dali::ConstraintSource source( Dali::LocalSource( Dali::Actor::Property::ORIENTATION ) );
@endcode
-<h3 class="pg">Parent Source</h3>
+<h2 class="pg">Parent Source</h2>
A parent source is based on properties of the actor's parent.
For example, a parent's position can be used as a constraint input source.
Dali::ConstraintSource source( Dali::ParentSource( Dali::Actor::Property::POSITION ) );
@endcode
-<h3 class="pg">Source</h3>
+<h2 class="pg">Source</h2>
Finally, you can base your source on the properties of another handle altogether.
For example, a sibling actor's color could be used as a constraint input source.
Dali::ConstraintSource source( Dali::Source( anotherHandle, Dali::Actor::Property::COLOR ) );
@endcode
-<h2 class="pg">The Constraint Function</h2>
+<h1 class="pg">The Constraint Function</h1>
The signature of the constraint function is:
const Dali::Vector3& parentSize( inputs[3]->GetVector3() );
@endcode
-<h2 class="pg">Creating a Constraint</h2>
+<h1 class="pg">Creating a Constraint</h1>
-<h3 class="pg">Using C Functions</h3>
+<h2 class="pg">Using C Functions</h2>
If you do not have any data that is changed at runtime, then C functions should be used.
For example, the color of an actor could be changed based on its position along the x-axis till a preset distance of 100, beyond which it is transparent.
Please have a look at Dali::Constraint::New() for more details.
-<h3 class="pg">Using Functors</h3>
+<h2 class="pg">Using Functors</h2>
If you need to store some data in a struct/class, then a functor can be used.
Reusing the last example, the color of an actor is changed based on its position along the x-axis, but the distance when it is transparent is different for each applied constraint.
Please have a look at Dali::Constraint::New(Handle, Property::Index, const T&) for more details.
Instead of using the default functor, another method can be declared in the class or struct and used as the constraint function.
-Please have a look at appropriate Dali::Constraint::New() method for more details.
+Please have a look at the appropriate Dali::Constraint::New() method for more details.
-<h2 class="pg">Removing Constraints</h2>
+<h1 class="pg">Removing Constraints</h1>
The actor's constraints can later be removed in several ways:
actor.RemoveConstraint( tag ); // All constraints with the tag are removed from the actor (tag can be set using SetTag)
@endcode
+\section constraints-equal-to Equal To Constraint
+
+The built in Dali::EqualToConstraint can be used if all that is required is setting a property equal to another property:
+@code
+Dali::Constraint constraint = Dali::Constraint::New< Vector3 >( actor, Dali::Actor::Property::POSITION, Dali::EqualToConstraint() );
+constraint.AddSource( Dali::Source( anotherActor, Dali::Actor::Property::POSITION ) );
+constraint.Apply();
+@endcode
+Here actor's position is set to equal the position of anotherActor.
+
+\section constraints-relative-to Relative To Constraint
+
+The built in Dali::RelativeToConstraint and Dali::RelativeToConstraintFloat can be used if all that is required is setting a property relative to another property:
+@code
+Dali::Constraint constraint = Dali::Constraint::New< Vector3 >( actor, Dali::Actor::Property::POSITION, Dali::RelativeToConstraint( 2.0f ) );
+constraint.AddSource( Dali::Source( anotherActor, Dali::Actor::Property::POSITION ) );
+constraint.Apply();
+@endcode
+Here actor's position is relative to the position of anotherActor, i.e., if anotherActor is at (10.0f, 20.0f, 30.0f), actor will be at (20.0f, 40.0f, 60.0f).
*
*/
*
<h2 class="pg">Creating an Application</h2>
-The Adaptor framework provides provides a Dali::Application class which initialises and sets up Dali appropriately so that the application writer does not have to.
+The Adaptor framework provides provides a Dali::Application class which initialises and sets up DALi appropriately so that the application writer does not have to.
This provides many platform related services.
Several signals can be connected to so that the application writer is informed when certain platform related activities occur.
@code
void CreateProgram(Application& app)
{
- // Create Dali components...
+ // Create DALi components...
Dali::Actor actor = Actor::New();
...
}
/*! \page event-system Event Handling
-Dali emits several signals to an application to inform it of user actions.
+DALi emits several signals to an application to inform it of user actions.
<h2 class="pg">Touch Events</h2>
-An application can be notified when a user interacts with the touch screen on the device by connecting to the touch signal provided by Dali::Actor. This signal will be emitted by Dali whenever the touch occurs within the connected actor's bounds.
+An application can be notified when a user interacts with the touch screen on the device by connecting to the touch signal provided by Dali::Actor. This signal will be emitted by DALi whenever the touch occurs within the connected actor's bounds.
Each point on the screen that is currently being touched or where touch has stopped is represented by a Dali::TouchPoint. This object stores information about the state of the touch point (down, up, motion etc.) and the co-ordinates of the touch.
/*! \page handle-body-idiom Handle – body
<h2 class="pg">What is the Handle/Body (Pimpl) pattern?</h2>
It is a technique for hiding implementation details in the header file.
-Dali achieves it by using "handles" in the public API. These handles internally contain a reference counted pointer to the concrete implementation.
+DALi achieves it by using "handles" in the public API. These handles internally contain a reference counted pointer to the concrete implementation.
<h2 class="pg">Why does Dali::Object use the Handle/Body (Pimpl) pattern?</h2>
It provides:
This way the danger of API/ABI breaks is also reduced since the implementation of a class can change without modifying the public API.
\par Easier memory management
-Dali objects have implicit smart-pointer semantics.
-Each Dali::Object contains a single reference counted object which can be intitialized with the static "New" methods in the Dali API.
+DALi objects have implicit smart-pointer semantics.
+Each Dali::Object contains a single reference counted object which can be intitialized with the static "New" methods in the DALi API.
This means that C++ new/delete operators do not have to be used (or paired) in the user code (RAII idiom).
Of course there's no way of stopping users from allocating heap memory, but calls to the new operator can be minimised.
<h2 class="pg">What does 'implicit smart-pointer semantics' mean in the case of Dali?</h2>
-Since Dali objects are just handles, they can be copied by value. When a Dali object is copied, both the copy and original will point to the same Dali resource.
-The internal Dali resources are reference counted; copying a Dali object will increase the reference count. A resource will not be deleted until all its Dali::Object handles are destroyed, or reset.
+Since DALi objects are just handles, they can be copied by value. When a DALi object is copied, both the copy and original will point to the same DALi resource.
+The internal DALi resources are reference counted; copying a DALi object will increase the reference count. A resource will not be deleted until all its Dali::Object handles are destroyed, or reset.
\code
class AnimationTest
The following steps are required for displaying the sentence 'Hello World' with Dali:
-- initialize the Dali library
+- initialize the DALi library
- create an Actor showing text
- add it to the Stage
-To understand the basic building blocks of the UI make sure to read the chapter on \link fundamentals Dali Fundamentals\endlink first.
+To understand the basic building blocks of the UI make sure to read the chapter on \link fundamentals DALi Fundamentals\endlink first.
Let's take a look at the code for this test application.
There are a couple of steps which are very important to understand.
- <h2 class="pg"> Initializing Dali </h2>
- The application should not use the Dali library until it has sent the init complete signal!
+ <h2 class="pg"> Initializing DALi </h2>
+ The application should not use the DALi library until it has sent the init complete signal!
That's why we connect our ExampleApp::Create callback to Dali::Application's SignalInit signal:
\code
...
<h2 class="pg"> Reference counting </h2>
The application should store Actors' and resources' handles.
- Dali objects are reference counted, which makes sure they exist only as long as they are needed.
+ DALi objects are reference counted, which makes sure they exist only as long as they are needed.
That's why we store the Actor's handle:
\code
...
* <h1 class="pg">Image Actor</h1>
*
* <h2 class="pg">Construction</h2>
- * The Image Actor is constructed by passing a Dali::Image object
+ * The Image Actor is constructed by passing a Dali::Image object.
+ * Dali::Image is an abstract base class with multiple derived classes.
+ * Dali::ResourceImage is used for the common case of loading an image
+ * from a file.
*
* @code
- * Dali::Image image = Image::New(myImageFilename);
- * Dali::ImageActor myImageActor = ImageActor::New(image);
+ * Dali::Image image = ResourceImage::New( myImageFilename );
+ * Dali::ImageActor myImageActor = ImageActor::New( image );
* @endcode
*
* <h3 class="pg">Resizing at Load Time</h3>
* An application loading images from an external source will often want to
* display those images at a lower resolution than their native ones.
- * To support this, %Dali can resize an image at load time so that its in-memory
- * copy uses less space and its visual quality benefits from being prefiltered.
+ * To support this, DALi can resize an image at load time so that its
+ * in-memory copy uses less space and its visual quality benefits from being
+ * prefiltered.
* There are four algorithms which can be used to fit an image to a desired
* rectangle, a desired width or a desired height
- * (see Dali::ImageAttributes::ScalingMode).
+ * (see Dali::FittingMode).
*
* Here is an example doing rescaling:
*
* @code
- * Dali::ImageAttributes attributes;
- * attributes.SetSize( 256, 192 );
- * attributes.SetScalingMode( Dali::ImageAttributes::ScaleToFill );
- * Dali::Image image = Dali::Image::New( filename, attributes );
+ * Dali::Image image = Dali::ResourceImage::New( filename, ImageDimensions( 240, 240 ), FittingMode::SCALE_TO_FILL );
* @endcode
*
- * This example sets the size and scaling mode appropriately for a large thumbnail
- * on an Dali::ImageAttributes instance and passes that to Dali::Image construction.
- * In general, to enable scaling on load, set-up a Dali::ImageAttributes object with
- * a non-zero width or height and one of the four scaling modes, and pass it into a
- * Dali::Image creator function as shown above.
+ * This example sets the size and fitting mode appropriately for a large thumbnail
+ * during Dali::ResourceImage construction.
+ * In general, to enable scaling on load, pass a non-zero width or height and
+ * one of the four fitting modes to the Dali::ResourceImage creator function
+ * as shown above.
*
- * The scaling modes and a suggested use-case for each are as follows:
+ * The fitting modes and a suggested use-case for each are as follows:
* <ol>
- * <li> Dali::ImageAttributes::ShrinkToFit Full-screen image display: Limit loaded image resolution to device resolution.
- * <li> Dali::ImageAttributes::ScaleToFill Thumbnail gallery grid: Limit loaded image resolution to screen tile.
- * <li> Dali::ImageAttributes::FitWidth Image columns: Limit loaded image resolution to column.
- * <li> Dali::ImageAttributes::FitHeight Image rows: Limit loaded image resolution to row height.
+ * <li> Dali::FittingMode::SHRINK_TO_FIT Full-screen image display: Limit loaded image resolution to device resolution but show all of image.
+ * <li> Dali::FittingMode::SCALE_TO_FILL Thumbnail gallery grid: Limit loaded image resolution to screen tile, filling whole tile but losing a few pixels to match the tile shape.
+ * <li> Dali::FittingMode::FIT_WIDTH Image columns: Limit loaded image resolution to column.
+ * <li> Dali::FittingMode::FIT_HEIGHT Image rows: Limit loaded image resolution to row height.
* </ol>
*
- * The dali-demo project contains a full example under <code>examples/image</code>.
+ * The dali-demo project contains a full example under
+ * <code>examples/image-scaling-and-filtering</code>
+ * and a specific sampling mode example under
+ * <code>examples/image-scaling-irregular-grid</code>.
+ *
+ * There are more details on this topic in the
+ * \link resourceimagescaling Rescaling Images \endlink
+ * section.
*
* <h2 class="pg">Style</h2>
* The Actor can render an image in two different ways.<br>
* @endcode
*
*/
-
@section what-is-a-property What is a property?
A property is a value used by an object that can be modified or read externally to that object.
-This could be from within Dali or externally by an application.
+This could be from within DALi or externally by an application.
<h2 class="pg">What is a property used for?</h2>
--- /dev/null
+<!--
+/**-->
+
+# Animation {#animation}
+
+DALi provides a rich and easy to use animation framework which allows the creation of visually rich applications.
+Dali::Animation can be used to animate the properties of any number of objects, typically Actors.
+
+## Creating a basic Animation {#animation-basics}
+
+Create an animation object that will take place over 3 seconds:
+~~~{.cpp}
+Dali::Animation animation = Animation::New( 3.0f );
+~~~
+
+### Animating Properties
+
+There are two distint ways in which properties can be animated within DALi:
+- **AnimateTo:** The property will animate **TO** the value in the given time.
+- **AnimateBy:** The property will animate **BY** the value in the given time.
+
+(Assume actor1 & actor2 are at position 10.0f, 10.0f, 0.0f at the start of the animation)
+~~~{.cpp}
+// Animate the position of actor1 TO 10.0f, 50.0f, 0.0f
+animation.AnimateTo( Property( actor1, Dali::Actor::Property::POSITION ), Vector3(10.0f, 50.0f, 0.0f) ); // End Position: 10.0f, 50.0f, 0.0f
+
+// Animate the position of actor2 BY 10.0f, 50.0f, 0.0f
+animation.AnimateBy( Property( actor2, Dali::Actor::Property::POSITION ), Vector3(10.0f, 50.0f, 0.0f) ); // End Position: 20.0f, 60.0f, 0.0f
+~~~
+
+### Playback Control
+
+When an animation is created, it can be played:
+~~~{.cpp}
+animation.Play();
+~~~
+
+Stop and Pause are also supported.
+~~~{.cpp}
+animation.Stop();
+animation.Pause();
+~~~
+
+### Notifications
+
+Using DALi's signal framework, applications can be notified when the animation finishes:
+
+~~~{.cpp}
+
+void ExampleCallback( Animation& source )
+{
+ std::cout << "Animation has finished" << std::endl;
+}
+...
+animation.FinishedSignal().Connect( ExampleCallback );
+~~~
+
+### Alpha Functions
+
+Alpha functions are used in animations to specify the rate of change of the animation parameter over time.
+The built in supported functions can be viewed in Dali::AlphaFunction::BuiltinFunction.
+
+It is possible to specify a different alpha function for each animator in an Animation object:
+~~~{.cpp}
+animation.AnimateTo( Property( actor1, Dali::Actor::Property::POSITION ), Vector3(10.0f, 50.0f, 0.0f), Dali::AlphaFunction::EASE_IN );
+~~~
+
+### Other Actions
+
+An animation can be looped:
+~~~{.cpp}
+animation.SetLooping( true );
+~~~
+
+By default, when an animation ends, the properties that it was animating are BAKED.
+However, the property changes can be **discarded** when the animation ends (or is stopped):
+~~~{.cpp}
+animation.SetEndAction( Animation::Discard );
+~~~
+
+## Key-Frame Animation {#animation-key-frame}
+
+DALi provides support for animating between several different values, i.e. key-frames.
+A key frame takes a progress value between 0.0f and 1.0f (0 and 100% respectively) and portrays the value of the property when the animation has progressed that much.
+You can create several key frames:
+~~~{.cpp}
+Dali::KeyFrames keyFrames = Dali::KeyFrames::New();
+keyFrames.Add( 0.0f, Vector3( 10.0f, 10.0f, 10.0f ) );
+keyFrames.Add( 0.7f, Vector3( 200.0f, 200.0f, 200.0f ) );
+keyFrames.Add( 1.0f, Vector3( 100.0f, 100.0f, 100.0f ) );
+~~~
+And then add them to your animation.
+~~~{.cpp}
+animation.AnimateBetween( Property( actor1, Dali::Actor::Property::POSITION ), keyFrames );
+~~~
+When you play the animation, DALi will animate the position of actor1 between the key-frames specified.
+'actor1' will animate from (10.0f, 10.0f, 10.0f) to (200.0f, 200.f, 200.0f) by 70% of the animation time,
+and then spend the remaining time animating back to (100.0f, 100.0f, 100.0f).
+
+The advantage of specifying a key-frame at 0% is that regardless of where 'actor1' is, it will start from position (10.0f, 10.0f, 10.0f).
+If AnimateTo was used, then the start position would have been actor1's current position.
+
+## Path Animations {#animation-paths}
+
+A Dali::Path can be used to animate the position and orientation of actors.
+
+![ ](animation/animated-path.png)
+
+The black points in the diagram are points where the DALi logo will travel to.
+The red points are the control points which express the curvature of the path on the black points.
+
+This, in code will be represented as follows:
+~~~{.cpp}
+Path path = Path::New();
+path.AddPoint( Vector3( 50.0f, 10.0f, 0.0f ));
+path.AddPoint( Vector3( 90.0f, 50.0f, 0.0f ));
+path.AddPoint( Vector3( 10.0f, 90.0f, 0.0f ));
+~~~
+The control points can be added manually using Dali::Path::AddControlPoint or Path can auto-generate them for you:
+~~~{.cpp}
+path.GenerateControlPoints(0.25f);
+~~~
+Here 0.25f represents the curvature of the path you require. Please see Dali::Path::GenerateControlPoints for more information.
+
+To animate actor1 along this path:
+~~~{.cpp}
+animation.Animate( actor1, path, Vector3::ZERO );
+~~~
+The third parameter is the forward vector (in local space coordinate system) that will be oriented with the path's tangent direction.
\ No newline at end of file
--- /dev/null
+<!--
+/**-->
+# Build Guide {#build-guide}
+
+## Ubuntu {#build-ubuntu}
+
+These instructions explain how to build the DALi library for the Ubuntu 14.04 desktop environment.
+
+### Minimum Requirements
+
++ Ubuntu 14.04
++ Ensure ALL sources are selected:
+ + Go to Ubuntu Settings and then to "Software & Updates".
+ + In the "Ubuntu Software" tab, ensure ALL software sources are ticked. (This is required because we install some community-maintained free & open-source software).
+
+### Creating a DALi environment
+
+DALi provides a script to set up your desktop environment. This script can be found in the dali-core repository.
+
++ Fetch ALL 4 repositories from tizen.org.
++ In the parent directory of these repositories, run the following command:
+ ~~~{.sh}
+ dali-core/build/scripts/dali_env -c
+ ~~~
+ This will also download any dependencies that the dali repositories require.
+
++ You can save the environment variables to a file:
+ ~~~{.sh}
+ dali-env/opt/bin/dali_env -s > setenv
+ ~~~
+
+The last few steps only need to be done once.
+
+You will have to source your environment variables every time you open up a new terminal (or you can add to .bashrc if you prefer).
+You can do this by sourcing the '''setenv''' script you created above:
+~~~{.sh}
+. setenv
+~~~
+
+### Building the repositories
+
+#### dali-core
+~~~{.sh}
+cd dali-core/build/tizen
+autoreconf --install
+./configure --prefix=$DESKTOP_PREFIX
+make install -j8
+~~~
+
+#### dali-adaptor
+~~~{.sh}
+cd dali-adaptor/build/tizen
+autoreconf --install
+./configure --prefix=$DESKTOP_PREFIX --enable-profile=UBUNTU --enable-gles=20
+make install -j8
+~~~
+
+#### dali-toolkit
+~~~{.sh}
+cd dali-toolkit/build/tizen
+autoreconf --install
+./configure --prefix=$DESKTOP_PREFIX
+make install -j8
+~~~
+
+#### dali-demo
+~~~{.sh}
+cd dali-demo/build/tizen
+cmake -DCMAKE_INSTALL_PREFIX=$DESKTOP_PREFIX .
+make install -j8
+~~~
+
+### Running dali-demo
+
+Ensure you have sourced your environment as mentioned above and then just run:
+~~~{.sh}
+dali-demo
+~~~
+
+*/
-/**
- *
+<!--
+/**-->
+
# DALi 3D ( Dynamic Animation Library ) {#dali-introduction}
DALi is a quick and easy way of allowing developers to create Rich UI Applications like:
-/**
- *
+<!--
+/**-->
# Writing documentation for the DALi programing guide {#documentationguide}
~~~
## Example
-![ ](../assets/img/example-documentation/example-code.png)
-![ ](example-code.png)
+Please have a look at the numerous markdown files to see the header and footer requirements.
+You can add tags to your headings as follows:
+~~~{.md}
+# MyChapter {#my-chapter}
+~~~
+Which will allow you to link to this section as follows:
+~~~{.md}
+[Go To MyChapter](@ref my-chapter)
+~~~
+
+Code blocks can be enclosed within 2 blocks of 3 tildas(~).
+
+You can even specify your language type, for example:
+~~~{.md}
+~~~{.cpp}
+...
+~~~{.js}
+~~~
#### Why use GitHub flavoured markdown?
- Table support is good and language specific code blocks are easier to define ( javascript/C++).
-/**
- *
-# Dali Fundamentals {#fundamentals}
+<!--
+/**-->
+
+# DALi Fundamentals {#fundamentals}
## Actors and the Stage {#actors-and-stage}
-A Dali application uses a hierachy of Dali::Actor objects to position visible content. An actor inherits a position relative to its parent, and can be moved relative to this point. UI controls can be built by combining multiple actors.
-
-To display the contents of an actor, it must be connected to the Dali::Stage. This provides an invisible root (top-level) actor, to which all other actors are added. A direct or indirect child of the root actor is considered "on-stage". Multi-touch events are received through signals emitted by on-stage actors.
-
+Actor is the primary object with which DALi applications interact.
+A DALi application uses a hierachy of Dali::Actor objects to position visible content.
+An actor inherits a position relative to its parent, and can be moved relative to this point.
+UI controls can be built by combining multiple actors.
+
+The Stage is a top-level object used for displaying a tree of Actors.
+To display the contents of an actor, it must be added to the Dali::Stage,
+
The following example shows how to connect a new actor to the stage:
~~~{.cpp}
## The Coordinate System {#coordinate-system}
-The Stage has a 2D size, which matches the size of the application window. The default coordinate system in Dali has the origin at the top-left corner, with positive X to right, and position Y going
-downwards. This is intended to be convenient when laying-out 2D views.
+The Stage has a 2D size, which matches the size of the application window.
+The default **unit 1 is 1 pixel with default camera and** the default coordinate system in DALi has the **origin at the top-left corner, with positive X to right, and position Y going
+downwards**. This is intended to be convenient when laying-out 2D views.
![ ](../assets/img/coordinate-system-and-stage.png)
![ ](coordinate-system-and-stage.png)
+
## Positioning Actors {#positioning-actors}
An actor inherits its parent's position. The relative position between the actor & parent is determined by 3 properties:
![ ](../assets/img/parent-origin.png)
![ ](parent-origin.png)
-The default is "top-left", which can be visualized in 2D as (0, 0), but is actually Vector3(0, 0, 0.5) in the 3D Dali world. The actor's position is relative to this point.
+The default is "top-left", which can be visualized in 2D as (0, 0), but is actually Vector3(0, 0, 0.5) in the 3D DALi world. The actor's position is relative to this point.
2) AnchorPoint. This Vector3 property defines a point within the child actor's area.
![ ](../assets/img/anchor-point.png)
![ ](anchor-point.png)
-The default is "center", which can be visualized in 2D as (0.5, 0.5), but is actually Vector3(0.5, 0.5, 0.5) in the 3D Dali world. The actor's position is also relative to this point.
+The default is "center", which can be visualized in 2D as (0.5, 0.5), but is actually Vector3(0.5, 0.5, 0.5) in the 3D DALi world. The actor's position is also relative to this point.
3) Position. This is the position vector between the parent-origin and anchor-point.
An actor added directly to the stage with position (X = stageWidth*0.5, Y = stageHeight*0.5), would appear in the center of the screen. Likewise an actor with position (X = actorWidth*0.5, Y = actorWidth*0.5), would appear at the top-left of the screen.
-Note that since Dali is a 3D toolkit, this behaviour is the result of a default perspective camera setup.
+Note that since DALi is a 3D toolkit, this behaviour is the result of a default perspective camera setup.
+
+## Scene Graph {#scene-graph}
+
+From wikipedia...
+
+A scene graph is a collection of nodes in a graph or tree structure.
+A node may have many children but often only a single parent,
+with the effect of a parent applied to all its child nodes;
+an operation performed on a group automatically propagates
+its effect to all of its members. In many programs, associating
+a geometrical transformation matrix (see also transformation and matrix)
+at each group level and concatenating such matrices together is an
+efficient and natural way to process such operations. A common feature,
+for instance, is the ability to group related shapes/objects into a
+compound object that can then be moved, transformed, selected,
+etc. as easily as a single object.
+
+### How does this relate to the DALi public API?
+
+Actors are effectively nodes that receive input (touch events) and act as a
+container for draw-able elements (which are also nodes) and other actors.
@class _Guide_DALi_Fundamentals
-/**
- *
+<!--
+/**-->
# High Level Design {#dali-hld}
+ **DALi Platform Abstraction:** Resource loading & decoding in multiple threads (part of dali-adaptor)
+ **DALi Toolkit:** Reusable UI Controls, Effects & Scripting Support
+![ ](../assets/img/architecture.png)
![ ](architecture.png)
## Main, Update & Render Threads {#dali-threads}
+ **Render Thread:** OpenGL drawing, texture and geometry uploading etc.
+ **Resource Threads:** Loads images and decodes into bitmaps etc.
+![ ](../assets/img/dali-threads.png)
![ ](dali-threads.png)
*/
-/**
- *
+<!--
+/**-->
+
# JavaScript wrapping guide {#javascriptwrapping}
This guide outlines what files to modify when the DALi C++ public API changes.
The wrapped object, then forwards the command to the real DALi object.
Whenever we want to access functions / properties of that wrapped object, we unwrap it
-to get access to the Dali object.
+to get access to the DALi object.
-Each wrapped object registers with Dali garbage collector so they can be deleted
-when Dali shuts down
+Each wrapped object registers with DALi garbage collector so they can be deleted
+when DALi shuts down
@class _Guide_JavaScript_Wrapping
+
*/
\ No newline at end of file
-/**
- *
+<!--
+/**-->
Multi-Touch Events
==================
touch signals are also emitted from the touch-down actor with an "Interrupted" state.
@class MultiTouch
-*
+
*/
-/**
- *
+<!--
+/**-->
# Performance Profiling {#performanceprofiling}
## Background
-The Dali rendering pipeline has 2 stages.
+The DALi rendering pipeline has 2 stages.
Each stage is typically run once per frame.
This will leave enough time for the output to be composited (if the system uses a compositor) and to avoid using
too much CPU power.
-The main Dali application thread which deals with event processing is independent of the update / render threads.
+The main DALi application thread which deals with event processing is independent of the update / render threads.
This means animations won't stop if the main thread decides to do a long operation like downloading a file from the internet.
| Marker | Description
|--------|-------------
-| V_SYNC.| The heart beat which represents Dali should start creating a new frame if anything has changed. Runs at display refresh rate, typically 60Hz |
-| UPDATE_START | Dali update task has started |
-| UPDATE_START | Dali update task has finished |
-| RENDER_START | Dali render task has started |
-| RENDER_END | Dali render task has finished |
-| PROCESS_EVENT_START | Dali main thread processing events (e.g. in response to a touch event or a timer) |
-| PROCESS_EVENT_START | Dali main thread processing events finished |
+| V_SYNC.| The heart beat which represents DALi should start creating a new frame if anything has changed. Runs at display refresh rate, typically 60Hz |
+| UPDATE_START | DALi update task has started |
+| UPDATE_START | DALi update task has finished |
+| RENDER_START | DALi render task has started |
+| RENDER_END | DALi render task has finished |
+| PROCESS_EVENT_START | DALi main thread processing events (e.g. in response to a touch event or a timer) |
+| PROCESS_EVENT_START | DALi main thread processing events finished |
| SWAP_START | glSwapBuffers started (todo) |
| SWAP_END | glSwapBuffers end (todo) |
| PAUSE | Application paused |
## Statistics logging
-Statistics logging uses Dali log output which on Tizen is dlog, but this can also be used on desktop by redirecting stderr to a file.
+Statistics logging uses DALi log output which on Tizen is dlog, but this can also be used on desktop by redirecting stderr to a file.
Setting DALI_LOG_PERFORMANCE_STATS environment variable will enable time stamps.
TableViewInit, min 76.55 ms, max 76.55 ms, total (0.1 secs), avg 76.55 ms, std dev 0.00 ms
~~~
-If nothing is animating Dali will enter a paused state to save power. At this
+If nothing is animating DALi will enter a paused state to save power. At this
point nothing will be logged.
### Custom statistics for application developers
## Application profiling
- The main application thread in Dali is used to process and respond to events such as touch, key, mouse, gestures and timers.
+ The main application thread in DALi is used to process and respond to events such as touch, key, mouse, gestures and timers.
Example:
~~~
~~~
Ftrace is a kernel tracer designed to help developers find out what is going on inside the kernel.
-It can be used for analysing how long Dali takes to perform different tasks and
-what Dali is doing in relation to other system processes / interrupts.
+It can be used for analysing how long DALi takes to perform different tasks and
+what DALi is doing in relation to other system processes / interrupts.
-On Tizen if the kernel has been built with ftrace enabled, then Dali can log out to ftrace.
+On Tizen if the kernel has been built with ftrace enabled, then DALi can log out to ftrace.
This gives exact time stamps of the main events in Dali.
Current markers that are logged:
If the message did not get added to the trace, then check the write permissions on trace_marker file. E.g.
$ chmod ugoa+w trace_marker
~~~
-To view Dali markers in trace file
+To view DALi markers in trace file
~~~
$ export DALI_LOG_PERFORMANCE=2
-/**
- *
+<!--
+/**-->
# Performance Tips {#performancetips}
-/**
- *
+<!--
+/**-->
+
# Programming Languages {#programming-languages}
DALi applications can be written in several different programming languages.
--- /dev/null
+<!--
+/**-->
+
+[TOC]
+
+# Resource Image Scaling {#resourceimagescaling}
+
+## Introduction
+
+While common uses of images in DALi applications involve fixed sized images
+under the developer's control, e.g. for button backgrounds, in other cases such as galleries and wallpapers an application must display a variety of images and adapt to different screen sizes and densities.
+For these situations, DALi provides a facility to scale a `ResourceImage` while it is being loaded.
+
+Look at the following example.
+Let's say we are writing a home-screen application for a smartphone.
+Here we have a large, square image that we want to set as the wallpaper on a tall and narrow phone screen.
+We want to fill the screen without distorting the image or having black borders, and wasting as few pixels from the source image as possible.
+
+![ ](../assets/img/image-scaling/example-scale-to-fill-problem.jpg)
+![ ](example-scale-to-fill-problem.jpg)
+
+DALi provides the concept of a `FittingMode` to specify how a source image is mapped into a target rectangle, and the one we need here is `FittingMode::SCALE_TO_FILL` as it will cover all of the pixels of the target.
+A second concept of a `SamplingMode` controls how source image pixels are combined during the scaling and allows the developer to trade speed for quality.
+Since our image is to be loaded once and reused, we should use `SamplingMode::BOX_THEN_LINEAR` which is the highest quality option.
+We can pass the stage dimensions to the `ResourceImage` creator function as the desired rectangle and ask it to map the image to the screen as follows:
+
+~~~{.cpp}
+// C++
+ResourceImage image = ResourceImage::New(
+ "gallery-large-12.jpg",
+ Dali::ImageDimensions( stage.GetSize().x, stage.GetSize().y ),
+ Dali::FittingMode::SCALE_TO_FILL,
+ Dali::SamplingMode::BOX_THEN_LINEAR );
+~~~
+~~~{.js}
+// JavaScript
+// First get stage dimensions into stageX and stageY ...
+var image = new dali.ResourceImage( {
+ url: "gallery-large-12.jpg",
+ width: stageX,
+ height: stageY,
+ fitting-mode: "SCALE_TO_FILL",
+ sampling-mode: "BOX_THEN_LINEAR"
+});
+~~~
+
+In this case, `SCALE_TO_FILL` will perform this sequence of operations:
+
+| SCALE_TO_FILL Example |
+| ------------ |
+| ![ ](../assets/img/image-scaling/example-scale-to-fill-sequence.jpg) ![ ](example-scale-to-fill-sequence.jpg) |
+| <sub> **1.** *The source image.* **2.** *The source scaled-down to match the screen size.* **3.** *The borders of the image are trimmed to match the shape of the screen.* **4.** *The image fits exactly on the phone screen with no scaling required while rendering.* </sub> |
+
+
+## API Details {#resourceimagescalingapidetails}
+
+The new function of `ResourceImage` has the following scaling-related parameters:
+* **path**: Identifier for the image (allows raw image width and height to be retrieved).
+* **requested dimensions**: These are either `(0,0)`, a width, a height, or a (width, height) pair and either directly, or after reading the image raw dimensions and doing some math, define a target rectangle to fit the image to.
+* **fitting mode**: one of four strategies for mapping images onto the target rectangle.
+* **sampling mode** Different quality options for the scaling.
+
+### Target dimensions for fitting {#resourceimagescalingtargetdimensions}
+
+An application has several options for specifying the target rectangle for the image to be fitted to.
+The application may request dimensions through `ResourceImage::New()`:
+
+ 1. `(0, 0)`, which is equivalent to not specifying any dimensions
+ 2. `(x != 0, 0)` or `(0, y != 0)`, i.e. just one dimension specified
+ 3. `(x != 0, y != 0)`, i.e. both dimensions specified
+
+In **case 1.** no scaling will be attempted.
+The image will be loaded at its raw dimensions.
+In **case 2.** the unspecified dimension will be derived from the specified one and the aspect ratio of the raw dimensions.
+This specified dimension and calculated dimension pair pass on as the target dimension for fitting.
+See more on this case [below](#resourceimagescalingzerodimensions).
+In **case 3.** the requested dimensions pass straight through to become the target for fitting.
+
+The result of this process is an `(x, y)` tuple defining a box to fit the image to in the next step.
+
+#### Examples {#resourceimagescalingtargetdimensionsexamples}
+If we have a `(320, 240)` image called "flower.jpg", we use these three options in code as below.
+
+**Case 1**:
+~~~{.cpp}
+// C++
+ResourceImage image1 = ResourceImage::New( "flower.png" );
+ResourceImage image2 = ResourceImage::New( "flower.png", ImageDimensions( 0, 0 ) );
+~~~
+~~~{.js}
+// JavaScript
+var image1 = new dali.ResourceImage( { url:"flower.png" } );
+var image2 = new dali.ResourceImage( { url:"flower.png", width:0, height:0 } );
+~~~
+In these two equivalent loads, the target dimensions will be `(320, 240)` so the image will be loaded at its raw dimensions without modification.
+
+**Case 2**:
+~~~{.cpp}
+// C++
+ResourceImage image1 = ResourceImage::New( "flower.png", ImageDimensions( 160, 0 ) );
+ResourceImage image2 = ResourceImage::New( "flower.png", ImageDimensions( 0, 120 ) );
+~~~
+~~~{.js}
+// JavaScript
+var image1 = new dali.ResourceImage( { url:"flower.png", width:160, height:0 } );
+var image2 = new dali.ResourceImage( { url:"flower.png", width:0, height:120 } );
+~~~
+In these loads, the target dimensions will be `(160, 120)` as the zero dimension is derived from the aspect ratio of the raw image.
+
+**Case 3**:
+~~~{.cpp}
+// C++
+ResourceImage image = ResourceImage::New( "flower.png", ImageDimensions( 111, 233 ) );
+~~~
+~~~{.js}
+// JavaScript
+var image = new dali.ResourceImage( { url:"flower.png", width:111, height:233 } );
+~~~
+In this load, the target dimensions will be `(111, 233)`.
+
+### Image Pixel Dimensions {#resourceimagescalingsamplingmodesdimensionflow}
+
+DALi derives the pixel width and height of loaded resource images from a sequence of calculations with four inputs:
+
+ 1. The dimensions requested via `ResourceImage` new function, either of which may be passed as zeros
+ 2. The dimensions of the raw image before loading
+ 3. The fitting mode requested
+ 4. The sampling mode requested
+
+The dimensions requested do not correspond 1:1 with the exact pixel width and height of the image once loaded: they are just one of the four inputs to the process which determines those dimensions.
+
+| Flow of image dimensions from API to loaded image |
+| ------------ |
+| ![ ](../assets/img/image-scaling/concept-rectangles.jpg) ![ ](concept-rectangles.jpg) |
+| <sub> *Image dimensions requested through the API are either absent (**a.**), a height (**b.**), a width (**c.**) or a full (width, height) pair (**d.**). In case **d.** this is the target for fitting (**i.**). In cases **a.**, **b.**, and **c.**, the raw image dimensions (**e.**) are also needed to define the target (examples: **f.**, **g.**, **h.**). This target, the **FittingMode**, and the raw size (**e.**), are used to derive the fitted size (**j.**). This is the size that a perfect scaling would achieve. This fitted size, the **Sampling Mode**, and the raw size (**e.**) are used to derive the final pixel width and height (**k.** **l.** **m.**, depending on **Sampling Mode**).* </sub> |
+
+The diagram above shows the key `(x,y)` image dimensions used by DALi in its load-time scaling pipeline visualized as rectangles.
+They are:
+
+ 1. **Requested**: The dimensions passed by the app.
+ 2. **Raw**: The dimensions stored in the resource.
+ 3. **Target**: The box to fit the image into derived from 1. and 2.
+ 4. **Fitted**: The ideal scaled-down size of the image.
+ 5. **Scaled Pixels** The final pixel width and height resulting from the (possibly approximate) scaling.
+
+This should help to understand how the parameters given to DALi influence the final image loaded. The (x, y) passed define a *target* to the fit the image to rather than a new size for the image directly.
+The fitting mode defines a strategy for fitting the raw image to the target.
+The sampling mode has two options which cause the fitted dimensions to be exceeded, while the others cause it to be matched exactly.
+
+The pipeline from the values passed from the application to the *natural size* of the image is different. If no dimension is passed, the raw image size is read from the image resource. If only one dimension is passed, the explicitly set dimension will be used for the **natural size** and the unspecified dimension will match the actual loaded pixel dimension. When both are specified that becomes the 'natural size' even if it differs from the actual pixel dimensions loaded. This [requires some care in rendering to avoid distortion](#resourceimagescalingsamplingmodesrendernaturalsize).
+
+### Fitting an image's dimensions to the target box {#resourceimagescalingfittingmodes}
+
+DALi provides a number of strategies for mapping the pixels of an image onto the target box derived above.
+It provides a `FittingMode` enumeration to the developer to select a mapping or fitting approach.
+These are `SCALE_TO_FILL`, `SHRINK_TO_FIT`, `FIT_WIDTH`, and `FIT_HEIGHT` and their effect is best appreciated visually:
+
+| FittingMode Options |
+| ------------------- |
+| ![ ](../assets/img/image-scaling/fitting-mode-options.jpg) ![ ](fitting-mode-options.jpg) |
+| <sub> **Fitting modes**: *The top row shows the effect of each mode when a tall target rectangle is applied to a square image. The middle row applies a wide target to a square raw image. The bottom row uses a target with the same aspect ratio as the raw image. These examples show that `SCALE_TO_FILL` is the only option for which the dimensions of the fitted image result exactly match the target. The others are larger or smaller, with a different aspect ratio. `SHRINK_TO_FIT` is always equal to one of `FIT_WIDTH` or `FIT_HEIGHT`: in each case it is the minimum of them. As a special case, where the aspect ratio of raw image and target match, all fitting modes generate an exact match final image and are equivalent to each other.* </sub> |
+
+The operation of each of these modes is as follows:
+
+| `FittingMode` | **Operation** |
+| ------------- | --------- |
+| `SCALE_TO_FILL` | Centers the image on the target box and uniformly scales it so that it matches the target in one dimension and extends outside the target in the other. Chooses the dimension to match that results in the fewest pixels outside the target. Trims away the parts of the image outside the target box so as to match it exactly. |
+| `SHRINK_TO_FIT` | Centers the image on the target box and uniformly scales it so that it matches the target in one dimension and fits inside it in the other. |
+| `FIT_WIDTH` | Centers the image on the target box and uniformly scales it so that it matches the target width without regard for the target height. |
+| `FIT_HEIGHT` | Centers the image on the target box and uniformly scales it so that it matches the target in height and ignores the target width. |
+
+These modes differ only when the target box has a different aspect ratio to the raw image. Using this, if the application knows a priori what the image dimensions are, it can scale down the image by requesting dimensions that have the same aspect ratio as the raw dimensions:
+~~~{.cpp}
+// C++
+// Image on 'disk' is 320x240.
+ResourceImage image = ResourceImage::New( "flower.png", ImageDimensions( 32, 24 ) );
+// Image will be loaded at (32, 24), regardless of fitting mode.
+~~~
+~~~{.js}
+// JavaScript
+// Image on 'disk' is 320x240.
+var image = new dali.ResourceImage( { url:"flower.png", width:32, height:24});
+// Image will be loaded at (32, 24), regardless of fitting mode.
+~~~
+
+
+### Quality Versus Speed and Memory Options {#resourceimagescalingsamplingmodes}
+
+The process of scaling an image can be expensive in CPU cycles and add latency to the loading of each resource.
+To allow the developer to trade-off speed against quality for different use cases, DALi provides the `SamplingMode` enum, which can be passed to `ResourceImage::New()`.
+Two of these modes produce bitmaps which differ from the dimensions calculated by the fitting algorithm and so have a memory trade-off as well. The full set of modes is explained below.
+
+| `SamplingMode` | **Operation** |
+| ------------- | --------- |
+| `NEAREST` | Use simple point sampling when scaling. For each pixel in output image, just one pixel is chosen from the input image. This is the fastest, crudest option but suffers the worst from aliasing artifacts so should only be used for fast previews, or where the source image is known to have very low-frequency features. |
+| `LINEAR` | Uses a weighted bilinear filter with a `(2,2)` footprint when scaling. For each output pixel, four input pixels are averaged from the input image. This is a good quality option, equivalent to the GPU's filtering and works well at least down to a `0.5` scaling. |
+| `BOX` | Uses an iterated `(2,2)` box filter to repeatedly halve the image in both dimensions, averaging adjacent pixels until the the result is approximately right for the fitting target rectangle. For each output pixel some number of pixels from the sequence `[4,16,64,256,1024,...]` are averaged from the input image, where the number averaged depends on the degree of scaling requested. This provides a very high quality result and is free from aliasing artifacts because of the iterated averaging. *The resulting bitmap will not exactly match the dimensions calculated by the fitting mode but it will be within a factor of two of it and have the same aspect ratio as it.* |
+| `BOX_THEN_NEAREST` | Applies the `BOX` mode to get within a factor of two of the fitted dimensions, and then finishes off with `NEAREST` to reach the exact dimensions. |
+| `BOX_THEN_LINEAR` | Applies the `BOX` mode to get within a factor of two of the fitted dimensions, and then finishes off with `LINEAR` to reach the exact dimensions. This is the slowest option and of equivalent quality to `BOX`. It is superior to `BOX` in that is uses an average of 62% of the memory and exactly matches the dimensions calculated by fitting. **This is the best mode for most use cases**. |
+| `NO_FILTER` | Disables scaling altogether. In conjunction with `SCALE_TO_FILL` mode this can be useful as the edge trimming of that fitting mode is still applied. An example would be a gallery application, where a database of prescaled thumbnails of approximately the correct size need to be displayed in a regular grid of equal-sized cells, while being loaded at maximum speed. |
+
+Here are all the modes applied to scaling-down a `(640,720)` line art and text JPEG image to a `(218, 227)` thumbnail:
+
+| | | |
+| ---- | ---- | --- |
+| ![ ](../assets/img/image-scaling/sampling_modes_no_filter.png) ![ ](sampling_modes_no_filter.png) | ![ ](../assets/img/image-scaling/sampling_modes_nearest.png) ![ ](sampling_modes_nearest.png) | ![ ](../assets/img/image-scaling/sampling_modes_linear.png) ![ ](sampling_modes_linear.png) |
+| **NO_FILTER** | **NEAREST** | **LINEAR** |
+| ![ ](../assets/img/image-scaling/sampling_modes_box.png) ![ ](sampling_modes_box.png) | ![ ](../assets/img/image-scaling/sampling_modes_box_then_nearest.png) ![ ](sampling_modes_box_then_nearest.png) | ![ ](../assets/img/image-scaling/sampling_modes_box_then_linear.png) ![ ](sampling_modes_box_then_linear.png) |
+| **BOX** | **BOX_THEN_NEAREST** | **BOX_THEN_LINEAR** |
+
+These are screenshots, showing how the images are rendered in a DALi demo.
+There is an additional level of GPU bilinear filtering happening at render time.
+The best way to get a feel for the best sampling mode for different image types is to play with the [examples](#resourceimagescalingsamplingmodesexamples).
+
+In the following code example the same image is loaded to be a thumbnail but with differing quality, speed, and memory implications.
+~~~{.cpp}
+// C++
+ResourceImage image1 = ResourceImage::New( "flower.png",
+ ImageDimensions( 240, 240 ), FittingMode::SCALE_TO_FILL, SamplingMode::NEAREST );
+
+ResourceImage image2 = ResourceImage::New( "flower.png",
+ ImageDimensions( 240, 240 ), FittingMode::SCALE_TO_FILL, SamplingMode::NO_FILTER );
+
+ResourceImage image3 = ResourceImage::New( "flower.png",
+ ImageDimensions( 240, 240 ), FittingMode::SCALE_TO_FILL, SamplingMode::BOX );
+
+ResourceImage image4 = ResourceImage::New( "flower.png",
+ ImageDimensions( 240, 240 ), FittingMode::SCALE_TO_FILL, SamplingMode::BOX_THEN_LINEAR );
+~~~
+~~~{.js}
+// JavaScript
+var image1 = new dali.ResourceImage( {
+ url:"flower.png", width:240, height:240,
+ fitting-mode:"SCALE_TO_FILL", sampling-mode:"NEAREST"
+} );
+
+var image2 = new dali.ResourceImage( {
+ url:"flower.png", width:240, height:240,
+ fitting-mode:"SCALE_TO_FILL", sampling-mode:"NO_FILTER"
+} );
+
+var image3 = new dali.ResourceImage( {
+ url:"flower.png", width:240, height:240,
+ fitting-mode:"SCALE_TO_FILL", sampling-mode:"BOX"
+} );
+
+var image4 = new dali.ResourceImage( {
+ url:"flower.png", width:240, height:240,
+ fitting-mode:"SCALE_TO_FILL", sampling-mode:"BOX_THEN_LINEAR"
+} );
+~~~
+
+If we imagine flower.jpg is a 560*512 photo with high frequency details, the results of this are:
+* `image1` loads fast, uses minimal space, has poor quality.
+* `image2` loads even faster, uses 4.6 * minimal space, has good quality.
+* `image3` loads moderately slow, uses 1.3 * minimal space, has good quality.
+* `image4` loads slowest, uses minimal space, has good quality.
+
+Note that `BOX`, `BOX_THEN_NEAREST` and `BOX_THEN_LINEAR` can work particularly well for JPEG images as they can use fast downscaling typically built-in to the JPEG codec on supported platforms on the fly while decoding. In this case the caveats about using them having a speed trade-off given above do not apply.
+
+## Passing a Zero Dimension {#resourceimagescalingzerodimensions}
+Passing in a single zero dimension is effectively a shortcut for specifying `FIT_WIDTH` or `FIT_HEIGHT` `FittingMode`s. When a non-zero width and zero height are specified, the fitting done will be identical to the result using `FittingMode` `FIT_WIDTH`. When passing a zero width and non-zero height, the effect of applying the chosen `FittingMode` to the calculated target dimensions is always identical to applying the `FIT_HEIGHT` mode.
+
+* `ResourceImage::New( ImageDimensions( x, 0 ), <ANY_FITTING_MODE> )` =
+ `ResourceImage::New( ImageDimensions( x, <ANYTHING> ), FittingMode::FIT_WIDTH )`
+* `ResourceImage::New( ImageDimensions( 0, y ), <ANY_FITTING_MODE> )` =
+ `ResourceImage::New( ImageDimensions( <ANYTHING>, y), FittingMode::FIT_HEIGHT )`
+
+This falls out of the the fact that the fitting modes modes are strategies for the case when the aspect ratio of the raw image differs from the aspect ratio of the target dimensions, but the zero dimension behavior always ensures that the target dimensions have the same aspect ratio as the raw image's so the fitting modes are all equivalent.
+
+Therefore, if `(x!=0, y=0)`, fittingMode = `FIT_WIDTH`,
+and if `(x=0, y=!0)`, fittingMode = `FIT_HEIGHT`, irrespective of fitting mode passed by the application (if any).
+This shortcut is provided as a convenience to the developer and allows FIT_WIDTH or FIT_HEIGHT to be specified compactly:
+~~~{.cpp}
+// C++
+// FIT_WIDTH:
+ResourceImage image = ResourceImage::New("flower.png", ImageDimensions(x, 0));
+// FIT_HEIGHT:
+ResourceImage image = ResourceImage::New("flower.png", ImageDimensions(0, y));
+~~~
+~~~{.js}
+// JavaScript
+// FIT_WIDTH:
+var image = new dali.ResourceImage( {
+ url: "flower.png",
+ width: x,
+ height: 0
+});
+// FIT_HEIGHT:
+var image = new dali.ResourceImage( {
+ url: "flower.png",
+ width: 0,
+ height: y
+});
+~~~
+
+## Upscaling
+
+DALi refuses to upscale images at load time in order to conserve memory.
+If the application requests a size for an image that is larger than its raw dimensions, DALi will instead return an image with the same aspect ratio but limited to the largest dimensions that do not exceed the raw ones.
+Upscaling can still be effected at render time by setting the size of an actor to the desired size.
+
+## Compressed Textures and Scaling
+
+Compressed textures cannot be scaled at load time as their formats are designed to be uploaded directly to GPU memory. To achieve scaling of compressed textures, set the desired size on the attached `ImageActor` for scaling at render time instead.
+
+## Compensation for Natural Size != Pixel Width / Height {#resourceimagescalingsamplingmodesrendernaturalsize}
+
+Because the *natural size* of an image is
+[taken from the requested dimensions](#resourceimagescalingsamplingmodesdimensionflow)
+passed to `ResourceImage::New()` rather than passing through the same calculations that result in the eventual pixel width and height loaded,
+the *natural size* and pixel dimensions of an image will differ when loaded with scaling.
+It is inherent in the definition of fitting modes other than `SCALE_TO_FILL` not to match the requested dimensions, so in general, images loaded with them must have this mismatch between *natural size* and actual pixel width.
+
+It is not possible in general to draw a scaled resource image using its natural size as the `ImageActor`'s size without it appearing stretched in one dimension.
+This is the case for example by default with size negotiation in effect or when an image is simply passed to an actor at creation time.
+
+There are circumstance, however, in which the the natural size of a resource image loaded will exactly match its post-load pixel dimensions:
+
+1. No scaling is requested.
+1. The application chooses a combination of requested dimensions, fitting mode, and sampling mode which the scaling sub-system can match exactly. This is the case:
+ * For all downscaling using `SCALE_TO_FILL` fitting mode and not using `BOX` or `NO_FILTER` sampling modes.
+ * The app uses `SHRINK_TO_FIT`, `FIT_WIDTH`, or `FIT_HEIGHT` and the requested dimensions passed-in are both smaller than the raw ones and have the same aspect ratio as them, and it is not using `BOX` or `NO_FILTER` sampling modes.
+
+In these cases the image may be used freely in layouts controlled by size negotiation.
+Additionally, if the requested size has the same aspect ratio as the eventual pixel array loaded, and the fitting mode is `SCALE_TO_FILL` or `BOX` and `NO_FILTER` sampling modes are avoided, even if they don't match in dimensions exactly, the eventual image will be drawn without aspect ratio distortion although it will be scaled at render time.
+
+The fitting and scaling modes [demo](#resourceimagescalingsamplingmodesexamples) allows this behavior to be be explored dynamically when the fitting mode is changed from `SCALE_TO_FILL`.
+
+The application can of course only pass dimensions which are just right if it happens to know the raw dimensions or if it accesses the the image resource and reads the raw dimensions from its header.
+
+The application can get a scaled resource image rendered correctly to screen with one of three strategies:
+
+ 1. Use one of the special cases above.
+ 2. Read the image header from disk, recreate the dimension deriving, fitting, and sampling logic described in this document, and use that to generate a pair of requested dimensions which match the eventual image dimensions.
+ 3. Use the requested dimensions it really wants to but then read the image header from disk, recreate the dimension deriving, fitting, and sampling logic described in this document, and set the size of an `ImageActor` to that size explicitly rather than relying on the *natural size* of the image.
+
+## Examples {#resourceimagescalingsamplingmodesexamples}
+Load time image scaling is spread throughout the DALi examples.
+Search for `"ImageDimensions"` in the dali-demo project to see it used.
+There is also a specific demo to show all of the fitting and scaling modes.
+which lives in the demo project at `examples/image-scaling-and-filtering`.
+
+![ ](../assets/img/image-scaling/demo-fitting-sampling.jpg) ![ ](./demo-fitting-sampling.jpg)
+
+Touch the arrows in the top corners to changes image.
+Drag the green button in the corner of the image to change the requested size and trigger an immediate image reload.
+Use the buttons at the bottom of the screen to select any of the fitting and sampling modes from the popups which appear.
+This demo does not take any of the special measures [described above](#resourceimagescalingsamplingmodesrendernaturalsize) to correct for the natural size != pixel dimensions discrepancy so all fitting modes other than `SCALE_TO_FILL` show distortion.
+
+A second specific demo shows the effect of a filter mode on a single image loaded into various requested rectangles side by side.
+It can be found under `examples/image-scaling-irregular-grid`.
+
+![ ](../assets/img/image-scaling/demo-sampling-modes.jpg) ![ ](./demo-sampling-modes.jpg)
+
+Touch the button at top-left to change image.
+The button at top-right changes sampling mode.
+You will see strong differences between sampling modes where the image contains high frequency details such as hair and in the large black and white image, but much less in some others such as the Statue of Liberty which is mostly covered by a smooth gradient.
+
+@class _Guide_Resource_Image_Scaling
+*/
-/**
- *
+<!--
+/**-->
+
# Resource Tracking {#resourcetracking}
## Enable Logging
-Setting DALI_ENABLE_LOG environment variable to RESOURCE_LOG will enable resource usage logging in Dali applications.
+Setting DALI_ENABLE_LOG environment variable to RESOURCE_LOG will enable resource usage logging in DALi applications.
On target resource logging utilizes dlog, but this can also be used on desktop by redirecting stderr to a file.
The generated information includes any image files that are loaded with their dimensions,
GPU memory consumption, CPU RAM used and details of texture atlases created.
## Viewing Resource Logs
-dalireslog.sh is installed as part of the dali-adaptor package and can be found in the adaptors/tizen/scripts folder.
+dalireslog.sh is installed as part of the DALi Adaptor package and can be found in the adaptors/tizen/scripts folder.
The script shows a summary of memory used by resources.
USAGE:
./dalireslog.sh [FILE]
--- /dev/null
+<!--
+/**-->
+# Resources {#resoources}
+
+## Resource Image {#resource-image}
+
+A resource image is an image that is loaded using a file path or a URL.
+
+To create a resource image:
+~~~{.cpp}
+Dali::ResourceImage image = Dali::ResourceImage::New( "/my-path/my-image.png" );
+~~~
+Which can then be used with actors (e.g. ImageActor).
+
+Resources are loaded in separate threads.
+The application can connect to the Dali::ResourceImage::LoadingFinishedSignal() to get notified when the image has loaded.
+
+By default, resource images start loading immediately and the data is released only when the ResourceImage handle is destroyed.
+To optimise an application's memory footprint, the application can ask resources to be only loaded when actually required and
+their data to be released automatically when they are no longer being used (not being used by Actors).
+~~~{.cpp}
+Dali::ResourceImage image = Dali::ResourceImage::New( "/my-path/my-image.png", Dali::ResourceImage::ON_DEMAND, Dali::Image::UNUSED );
+~~~
+If Dali::Image::UNUSED is used, then when the ResourceImage is used again, the resource data is reloaded automatically.
+
+If the application requires the image dimensions immediately, then they can be retrieved synchronously:
+~~~{.cpp}
+Dali::ImageDimensions dimensions = Dali::ResourceImage::GetImageSize( "/my-path/my-image.png" );
+~~~
+This is a disk read which can be slow and will block the event thread, so should only be used if absolutely necessary.
+
+## 9-Patch Image {#resource-9-patch}
+
+DALi has support for 9-patch images.
+These are stretchable, repeatable images which are reduced to their smallest size.
+Essentially, an image is sliced up into 9 squares and the four corners do not change size at all.
+The other 5 segments are stretched (or repeated) to allow the whole image to scale appropriately.
+
+DALi has inbuilt support for *.9.png, *.9.jpg etc. images as well.
+More information about these images can be found here: http://developer.android.com/tools/help/draw9patch.html
+
+The following is an example of a *.9.png image:
+![ ](resource/9-patch.png)
+
+Zoomed in, the red section shows the part that will be repeated.
+The four corners areas remain static.
+The one pixel border will also be stripped out.
+![ ](resource/9-patch-zoomed.png)
+
+And if the image is given a 200 by 200 size, it will look like the following:
+![ ](resource/9-patch-full.png)
+
+## Buffer Image {#resource-buffer}
+
+A BufferImage represents an image resource in the form of a pixel buffer data that can be provided by the application developer.
+The application can then write to this buffer as required and the image is updated on the screen.
+
+~~~{.cpp}
+Dali::BufferImage image = Dali::BufferImage::New( 200, 200 ); // Creates a 200 by 200 pixel buffer with a color-depth of 32-bits (with alpha)
+~~~
+
+*/
+++ /dev/null
-# Scene Graph
-## What is a scene graph?
-From wikipedia...
-
-A scene graph is a collection of nodes in a graph or tree structure.
-A node may have many children but often only a single parent,
-with the effect of a parent applied to all its child nodes;
-an operation performed on a group automatically propagates
-its effect to all of its members. In many programs, associating
-a geometrical transformation matrix (see also transformation and matrix)
-at each group level and concatenating such matrices together is an
-efficient and natural way to process such operations. A common feature,
-for instance, is the ability to group related shapes/objects into a
-compound object that can then be moved, transformed, selected,
-etc. as easily as a single object.
-
- ### How does this relate to the Dali public API?
-
- Actors are effectively nodes that receive input (touch events) and act as a
- container for draw-able elements (which are also nodes) and other actors.
\ No newline at end of file
-/**
- *
+<!--
+/**-->
+
# Hello World - JSON layout{#script-hello}
The following JSON code is the minimum required to put the sentence "Hello World" on the screen.
~~~
## Hello World - Javascript
- The Dali script application is needed to run the Javascript which provides a Javascript runtime and an interface to Dali.
+ The DALi script application is needed to run the Javascript which provides a Javascript runtime and an interface to Dali.
~~~
scripting.example hello-world.js
~~~
- The TextLabel control to display Hello World can be constructed using Javascript dot notation accessing Dali Actor Properties.
+ The TextLabel control to display Hello World can be constructed using Javascript dot notation accessing DALi Actor Properties.
~~~{.js}
// JavaScript
~~~
@class _Guide_Script_Hello_World
- */
\ No newline at end of file
+
+*/
\ No newline at end of file
-/**
- *
+<!--
+/**-->
+
[TOC]
# DALi JSON Specification {#script-json-specification}
## Overview {#overview}
-This document describes the Dali JSON specification.
+This document describes the DALi JSON specification.
The format is not yet formally versioned within the JSON.
# General format {#format}
Concrete Actors and Controls can be created from types registered in the
-Dali Type Registry.
+DALi Type Registry.
Template, style and scene sections all configure Actors and Controls via
-the Dali property system.
+the DALi property system.
The JSON format deviates from the formal JSON specification and allows C style comments.
"stage": // Stage section
[ //
{ // Actors|Controls to create on JSON file load
- "type": "basic-text", // A Dali Control or a template name
+ "type": "basic-text", // A DALi Control or a template name
"styles":["base-theme","light-theme"] // Style list to apply to this instance
} //
] //
}, //
... //
{ //
- "type":"ImageActor" // An Dali type or a template name
+ "type":"ImageActor" // An DALi type or a template name
"image": //
{ //
"filename":"{IMAGES}b.jpg" // Image filename substring replacement
{ //
"basic-text": // The template name
{ //
- "type":"ImageActor", // Concrete Dali Type/Class to create
+ "type":"ImageActor", // Concrete DALi Type/Class to create
"styles":["base-style"], // Style list to apply
"name":"image", // }
"image": // } property name : value
~~~
A template has a special 'type' property which must contain a concrete
-Dali Actor or Control type name.
+DALi Actor or Control type name.
A template has a special 'styles' property which contains a list of
styles to apply when creating using the template.
When applied to an actor tree the actors are referenced by name. Names
are not unique in Dali.
-When a style is applied in code Dali will perform a depth first search
+When a style is applied in code DALi will perform a depth first search
stopping with the first matching name.
Typically an application developer will apply the style to the template
{
"type": "TextView",
\\ The Type to create; this can be a
- ... \\ concrete Dali type (actor/control)
+ ... \\ concrete DALi type (actor/control)
\\ or a template name.
"styles": ["base-style"]
\\ A list of styles to apply to the
-/**
- *
+<!--
+/**-->
+
# Scripting Overview {#scriptoverview}
-Dali has:
+DALi has:
- JSON to support:
- layouting
- theme / styling
JSON support is built in to DALi.
-JavaScript support is via a plugin held in dali-toolkit, which builds automatically if Google's V8 engine is installed.
+JavaScript support is via a plugin held in DALi Toolkit, which builds automatically if Google's V8 engine is installed.
The V8 version required by DALi can be built and installed using dali-core/scripts/dali_env script.
Files can be loaded inside any DALi application, or from command line using the launcher ( part of dali-demo).
--- /dev/null
+<!--
+/**-->
+# Signals & Actions {#signals-actions}
+
+## Signals {#signals}
+
+Classes in DALi provide signals which are emitted whenever a certain action or event occurs.
+The application can connect to these signals using if it wishes to be informed of this occurrence.
+Standard C Style functions can be used to connect to these signals if no local data needs to be accessed, otherwise a class method can also be connected.
+
+Applications can manually disconnect from signals when required but DALi also provides safe signal disconnection.
+This means that when the connecting object is deleted, the signal is automatically disconnected.
+
+## Actions {#actions}
+
+Classes in DALi can perform a certain number of actions.
+For example, an animation provides the ability to "play" or "stop" using an action.
+DALi provides a framework which allows users to set up actions for their classes.
+This is particularly helpful when trying to invoke an action using scripting.
+
+*/
-/**
- *
+<!--
+/**-->
+
# Stagehand Visual Debugger for DALi {#stagehand}
![ ](../assets/img/stage-hand/blocks.png)
-/**
- *
+<!--
+/**-->
# Text Field {#text-field}
-/**
- *
+<!--
+/**-->
# Text Label {#text-label}
-/**
- *
+<!--
+/**-->
+
# Texture Atlases {#textureatlases}
## Example demo application
@class _Guide_TextureAtlases
-*
*/
\ No newline at end of file
-/**
- *
+<!--
+/**-->
# Texture Compression {#texturecompression}
Using compressing the textures will:
-- Speed up rendering in time the GPU == less power used due to less texture data being transferred.
+- Reduce memory bandwidth in rendering due to less texture data being transferred per frame.
+ - Reduces power consumption.
+ - Speeds up rendering.
- Reduce texture memory usage.
-- Speed up load times. Smaller files mean quicker load times.
-
+- Speed up load times. There is no CPU decoding step in loading: the file data can be copied directly to GPU memory.
+
DALi supports the KTX file format.
-
-You just load the compressed texture like you would any other image.
+
+You load the compressed texture just like you would any other image.
~~~{.cpp}
// C++
var image = new dali.ResourceImage( { url:"my_compressed_file.ktx"});
~~~
-
+
### ARMS texture compression tool
http://malideveloper.arm.com/develop-for-mali/tools/asset-creation/mali-gpu-texture-compression-tool/
-
+
Here is an example of using the ARM compression tool.
-
+
![ ](../assets/img/texture-atlas/compression-options.jpg)
![ ](compression-options.jpg)
-
+
![ ](../assets/img/texture-atlas/compression-example.jpg)
![ ](compression-example.jpg)
-
+
As shown above the ETC-1 compression format does not support alpha.
-
-As a work around the tool will export the alpha as a seperate compressed image.
+
+As a work around the tool will export the alpha as a separate compressed image.
In order to combine both the images you need to use a custom shader.
Here is an example shader:
-
+
~~~{.cpp}
// C++ Code
const char* const COMPRESSED_RGB_PLUS_SEPARATE_ALPHA_FRAGMENT_SOURCE =
imageActor.SetBlendMode(BlendingMode::ON);
~~~
-
+
~~~{.js}
// JavaScript code
var fragSource = " \
v4Color.a = texture2D(sEffect, vTexCoord ).r; \
gl_FragColor = v4Color; \
}";
-
+
var shaderEffect = new dali.ShaderEffect( "", fragSource);
-
+
var atlasImageRGB = new dali.ResourceImage( { url:"ATLAS_RGB_FILENAME.KTX"} );
-
+
var atlasImageAlpha = new dali.ResourceImage( { url:"ATLAS_ALPHA_FILENAME.KTX"} );
-
+
shaderEffect.setEffectImage( atlasImageAlpha );
-
+
// to create Image Actor
ImageActor imageActor = ImageActor::New( mAtlasImageRGB, GetImagePosition( info) );
-
+
imageActor.setShaderEffect( shaderEffect );
-
+
imageActor.setBlendMode( dali.BLENDING_ON );
~~~
*/
-
-
-Deep internal documentation for Dali Toolkit.
+Deep internal documentation for DALi Toolkit.
Generate the documentation here as follows:
# Start doxygen:
./build.sh
-Note, the doxfile assumes you have your Dali repositories checked-out
+Note, the doxfile assumes you have your DALi repositories checked-out
side by side with the following structure:
.
Name: dali-toolkit
Summary: The OpenGLES Canvas Core Library Toolkit
-Version: 1.0.42
+Version: 1.0.43
Release: 1
Group: System/Libraries
License: Apache-2.0
# Do NOT put an adaptor here - it is an application choice which adaptor to use
BuildRequires: pkgconfig
BuildRequires: pkgconfig(dlog)
-BuildRequires: boost-devel
BuildRequires: pkgconfig(dali)
BuildRequires: pkgconfig(dali-core)
Summary: Application development package for the OpenGLES Canvas toolkit
Group: Development/Building
Requires: %{name} = %{version}-%{release}
-Requires: boost-devel
%description devel
Application development package for the OpenGLES Canvas toolkit - headers and package config
return handleScope.Escape( hoverObject );
}
-v8::Handle<v8::Object> EventObjectGenerator::CreateMouseWheelEvent( v8::Isolate* isolate, const MouseWheelEvent& wheelEvent)
+v8::Handle<v8::Object> EventObjectGenerator::CreateWheelEvent( v8::Isolate* isolate, const WheelEvent& wheelEvent)
{
- // we are creating a mouse wheel event object that looks like this
+ // we are creating a wheel event object that looks like this
//
+ // event.type = "mouseWheel" or "customWheel" type of the wheel event
// event.direction = "vertical" or "horizontal" direction the wheel is being rolled
// event.shiftPressed = boolean, shift key is held
// event.ctrlPressed = boolean, ctrl key is held
// event.altPressed = boolean, alt key is held
// event.keyModifiers = bitmask of keys pressed
// event.point {x,y} = The co-ordinates of the mouse cursor relative to the top-left of the screen when the wheel is being rolled.
- // event.rolled = offset of mouse wheel rolling, positive = rolling down, negative = rolling up
+ // event.rolled = offset of wheel rolling, positive = rolling down or clockwise, negative = rolling up or counter-clockwise
// event.timestamp = The time (in ms) that the touch event occurred
v8::EscapableHandleScope handleScope( isolate );
v8::Local<v8::Object> wheelObject = v8::Object::New( isolate );
+ // Set the type
+ std::string type = wheelEvent.type ? "mouseWheel" : "customWheel";
+ wheelObject->Set( v8::String::NewFromUtf8( isolate, "type" ), v8::String::NewFromUtf8( isolate, type.c_str() ) );
+
// Set the direction
std::string direction = wheelEvent.direction ? "vertical" : "horizontal";
wheelObject->Set( v8::String::NewFromUtf8( isolate, "direction" ), v8::String::NewFromUtf8( isolate, direction.c_str() ) );
#include <v8.h>
#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/events/hover-event.h>
-#include <dali/public-api/events/mouse-wheel-event.h>
+#include <dali/public-api/events/wheel-event.h>
#include <dali/public-api/events/key-event.h>
#include <dali/public-api/events/pan-gesture.h>
v8::Handle<v8::Object> CreateTouchEvent( v8::Isolate* isolate, const TouchEvent& touchEvent);
v8::Handle<v8::Object> CreateHoverEvent( v8::Isolate* isolate, const HoverEvent& hoverEvent);
- v8::Handle<v8::Object> CreateMouseWheelEvent( v8::Isolate* isolate, const MouseWheelEvent& wheelEvent);
+ v8::Handle<v8::Object> CreateWheelEvent( v8::Isolate* isolate, const WheelEvent& wheelEvent);
v8::Handle<v8::Object> CreateKeyEvent( v8::Isolate* isolate, const KeyEvent& keyEvent);
v8::Handle<v8::Object> CreatePanGesture( v8::Isolate* isolate, const PanGesture& panGesture);
#include "resource-image-api.h"
// EXTERNAL INCLUDES
-#include <dali/devel-api/images/image-operations.h>
+#include <dali/public-api/images/image-operations.h>
// INTERNAL INCLUDES
#include <v8-utils.h>
{
returnValue = EventObjectGenerator::CreateHoverEvent( isolate, value.Get<HoverEvent>() );
}
- else if( typeInfo == typeid( Dali::MouseWheelEvent ) )
+ else if( typeInfo == typeid( Dali::WheelEvent ) )
{
- returnValue = EventObjectGenerator::CreateMouseWheelEvent( isolate, value.Get<MouseWheelEvent>() );
+ returnValue = EventObjectGenerator::CreateWheelEvent( isolate, value.Get<WheelEvent>() );
}
else if( typeInfo == typeid( Dali::KeyEvent ) )
{
#include <dali/public-api/images/image.h>
#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/events/hover-event.h>
-#include <dali/public-api/events/mouse-wheel-event.h>
+#include <dali/public-api/events/wheel-event.h>
#include <dali/public-api/events/key-event.h>
#include <dali/public-api/events/pan-gesture.h>
{
const char* const SIGNAL_TOUCHED = "touched";
const char* const SIGNAL_HOVERED = "hovered";
-const char* const SIGNAL_MOUSE_WHEEL_EVENT = "mouse-wheel-event";
+const char* const SIGNAL_WHEEL_EVENT = "wheel-event";
const char* const SIGNAL_ON_STAGE = "on-stage";
const char* const SIGNAL_OFF_STAGE = "off-stage";
const char* const ANIMATION_SIGNAL_FINISHED = "finished";
returnValue.Get(ret);
return ret;
}
- bool OnMouseWheel( Actor actor, const MouseWheelEvent& event)
+ bool OnWheel( Actor actor, const WheelEvent& event)
{
std::vector< Dali::Any > arguments;
Dali::Any returnValue(false);
Actor PreFocusChangeSignal(Actor currentFocusedActor,
Actor proposedActorToFocus,
- Toolkit::Control::KeyboardFocusNavigationDirection direction )
+ Toolkit::Control::KeyboardFocus::Direction direction )
{
std::vector< Dali::Any > arguments;
Dali::Any returnValue = Actor(); // we want an actor as a return value
{
actor.HoveredSignal().Connect( callback, &ActorCallback::OnHover );
}
- else if ( strcmp( signalName.c_str(), SIGNAL_MOUSE_WHEEL_EVENT ) == 0 )
+ else if ( strcmp( signalName.c_str(), SIGNAL_WHEEL_EVENT ) == 0 )
{
- actor.MouseWheelEventSignal().Connect( callback, &ActorCallback::OnMouseWheel );
+ actor.WheelEventSignal().Connect( callback, &ActorCallback::OnWheel );
}
else if ( strcmp( signalName.c_str(), SIGNAL_ON_STAGE ) == 0 )
{
{
-Toolkit::Control::KeyboardFocusNavigationDirection GetDirection( std::string name, v8::Isolate* isolate )
+Toolkit::Control::KeyboardFocus::Direction GetDirection( std::string name, v8::Isolate* isolate )
{
if( name == "left")
{
- return Dali::Toolkit::Control::Left;
+ return Dali::Toolkit::Control::KeyboardFocus::LEFT;
}
if( name == "right")
{
- return Dali::Toolkit::Control::Right;
+ return Dali::Toolkit::Control::KeyboardFocus::RIGHT;
}
if( name == "up")
{
- return Dali::Toolkit::Control::Up;
+ return Dali::Toolkit::Control::KeyboardFocus::UP;
}
if( name == "down")
{
- return Dali::Toolkit::Control::Down;
+ return Dali::Toolkit::Control::KeyboardFocus::DOWN;
}
DALI_SCRIPT_EXCEPTION( isolate, "direction not found ( wanted left,right,up,down)" );
- return Dali::Toolkit::Control::Up;
+ return Dali::Toolkit::Control::KeyboardFocus::UP;
}
}; //un-named namespace
return;
}
- Toolkit::Control::KeyboardFocusNavigationDirection dir = GetDirection( direction, isolate );
+ Toolkit::Control::KeyboardFocus::Direction dir = GetDirection( direction, isolate );
Toolkit::KeyboardFocusManager::Get().MoveFocus( dir );
}
}
-std::string KeyboardFocusManagerWrapper::GetDirectionName( Toolkit::Control::KeyboardFocusNavigationDirection dir )
+std::string KeyboardFocusManagerWrapper::GetDirectionName( Toolkit::Control::KeyboardFocus::Direction dir )
{
switch( dir )
{
- case Dali::Toolkit::Control::Left:
+ case Dali::Toolkit::Control::KeyboardFocus::LEFT:
{
return "left";
break;
}
- case Dali::Toolkit::Control::Right:
+ case Dali::Toolkit::Control::KeyboardFocus::RIGHT:
{
return "right";
break;
}
- case Dali::Toolkit::Control::Up:
+ case Dali::Toolkit::Control::KeyboardFocus::UP:
{
return "up";
break;
}
- case Dali::Toolkit::Control::Down:
+ case Dali::Toolkit::Control::KeyboardFocus::DOWN:
{
return "down";
break;
virtual SignalManager* GetSignalManager() { return &mSignalManager;}
- static std::string GetDirectionName( Toolkit::Control::KeyboardFocusNavigationDirection dir );
+ static std::string GetDirectionName( Toolkit::Control::KeyboardFocus::Direction dir );
private: