projects
/
platform
/
core
/
uifw
/
dali-demo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[Tizen] Update demo to use LinearLayout.
[platform/core/uifw/dali-demo.git]
/
examples
/
text-label-multi-language
/
text-label-multi-language-example.cpp
diff --git
a/examples/text-label-multi-language/text-label-multi-language-example.cpp
b/examples/text-label-multi-language/text-label-multi-language-example.cpp
index
95ebacf
..
ba54b57
100644
(file)
--- a/
examples/text-label-multi-language/text-label-multi-language-example.cpp
+++ b/
examples/text-label-multi-language/text-label-multi-language-example.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 201
5
Samsung Electronics Co., Ltd.
+ * Copyright (c) 201
7
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-66,7
+66,7
@@
public:
mTableView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
mTableView.SetParentOrigin( ParentOrigin::TOP_LEFT );
mTableView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
mTableView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
mTableView.SetParentOrigin( ParentOrigin::TOP_LEFT );
mTableView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- mTableView.Touch
edSignal().Connect( this, &TextLabelMultiLanguageExample::OnTouchEvent
);
+ mTableView.Touch
Signal().Connect( this, &TextLabelMultiLanguageExample::OnTouch
);
stage.Add( mTableView );
for( unsigned int index = 0u; index < NUMBER_OF_LANGUAGES; ++index )
stage.Add( mTableView );
for( unsigned int index = 0u; index < NUMBER_OF_LANGUAGES; ++index )
@@
-84,21
+84,21
@@
public:
}
}
}
}
- bool OnTouch
Event( Actor actor, const TouchEvent
& event )
+ bool OnTouch
( Actor actor, const TouchData
& event )
{
if( 1u == event.GetPointCount() )
{
{
if( 1u == event.GetPointCount() )
{
- const
TouchPoint::State state = event.GetPoint(0u).state
;
+ const
PointState::Type state = event.GetState( 0 )
;
// Clamp to integer values; this is to reduce flicking due to pixel misalignment
// Clamp to integer values; this is to reduce flicking due to pixel misalignment
- const float localPoint = static_cast<float>( static_cast<int>( event.Get
Point( 0 ).local
.y ) );
+ const float localPoint = static_cast<float>( static_cast<int>( event.Get
LocalPosition( 0 )
.y ) );
- if(
TouchPoint::Down
== state )
+ if(
PointState::DOWN
== state )
{
mLastPoint = localPoint;
mAnimation = Animation::New( 0.25f );
}
{
mLastPoint = localPoint;
mAnimation = Animation::New( 0.25f );
}
- else if(
TouchPoint::Motion
== state )
+ else if(
PointState::MOTION
== state )
{
if( mAnimation )
{
{
if( mAnimation )
{
@@
-134,19
+134,10
@@
private:
float mLastPoint;
};
float mLastPoint;
};
-void RunTest( Application& application )
-{
- TextLabelMultiLanguageExample test( application );
-
- application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
int DALI_EXPORT_API main( int argc, char **argv )
{
Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
int DALI_EXPORT_API main( int argc, char **argv )
{
Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
- RunTest( application );
-
+ TextLabelMultiLanguageExample test( application );
+ application.MainLoop();
return 0;
}
return 0;
}