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
Merge "DALi Version 1.1.42" into devel/master
[platform/core/uifw/dali-demo.git]
/
demo
/
dali-table-view.cpp
diff --git
a/demo/dali-table-view.cpp
b/demo/dali-table-view.cpp
index
7f60345
..
daebe61
100644
(file)
--- a/
demo/dali-table-view.cpp
+++ b/
demo/dali-table-view.cpp
@@
-241,7
+241,7
@@
void DaliTableView::Initialize( Application& application )
mScrollView.SetAxisAutoLock( true );
mScrollView.ScrollCompletedSignal().Connect( this, &DaliTableView::OnScrollComplete );
mScrollView.ScrollStartedSignal().Connect( this, &DaliTableView::OnScrollStart );
mScrollView.SetAxisAutoLock( true );
mScrollView.ScrollCompletedSignal().Connect( this, &DaliTableView::OnScrollComplete );
mScrollView.ScrollStartedSignal().Connect( this, &DaliTableView::OnScrollStart );
- mScrollView.Touch
ed
Signal().Connect( this, &DaliTableView::OnScrollTouched );
+ mScrollView.TouchSignal().Connect( this, &DaliTableView::OnScrollTouched );
mScrollViewLayer = Layer::New();
mScrollViewLayer = Layer::New();
@@
-299,8
+299,6
@@
void DaliTableView::Initialize( Application& application )
unsigned int degrees = 0;
Rotate( degrees );
unsigned int degrees = 0;
Rotate( degrees );
- //orientation.ChangedSignal().Connect( this, &DaliTableView::OrientationChanged );
-
winHandle.ShowIndicator( Dali::Window::INVISIBLE );
// Background animation
winHandle.ShowIndicator( Dali::Window::INVISIBLE );
// Background animation
@@
-415,11
+413,6
@@
void DaliTableView::Populate()
mScrollView.SetRulerY( mScrollRulerY );
}
mScrollView.SetRulerY( mScrollRulerY );
}
-void DaliTableView::OrientationChanged( Orientation orientation )
-{
- // TODO: Implement if orientation change required
-}
-
void DaliTableView::Rotate( unsigned int degrees )
{
// Resize the root actor
void DaliTableView::Rotate( unsigned int degrees )
{
// Resize the root actor
@@
-483,7
+476,7
@@
Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit
content.SetKeyboardFocusable(true);
// connect to the touch events
content.SetKeyboardFocusable(true);
// connect to the touch events
- content.Touch
ed
Signal().Connect( this, &DaliTableView::OnTilePressed );
+ content.TouchSignal().Connect( this, &DaliTableView::OnTilePressed );
content.HoveredSignal().Connect( this, &DaliTableView::OnTileHovered );
return content;
content.HoveredSignal().Connect( this, &DaliTableView::OnTileHovered );
return content;
@@
-492,7
+485,6
@@
Actor DaliTableView::CreateTile( const std::string& name, const std::string& tit
Toolkit::ImageView DaliTableView::NewStencilImage()
{
Toolkit::ImageView stencil = ImageView::New( TILE_BACKGROUND_ALPHA );
Toolkit::ImageView DaliTableView::NewStencilImage()
{
Toolkit::ImageView stencil = ImageView::New( TILE_BACKGROUND_ALPHA );
-
stencil.SetParentOrigin( ParentOrigin::CENTER );
stencil.SetAnchorPoint( AnchorPoint::CENTER );
stencil.SetDrawMode( DrawMode::STENCIL );
stencil.SetParentOrigin( ParentOrigin::CENTER );
stencil.SetAnchorPoint( AnchorPoint::CENTER );
stencil.SetDrawMode( DrawMode::STENCIL );
@@
-503,12
+495,16
@@
Toolkit::ImageView DaliTableView::NewStencilImage()
return stencil;
}
return stencil;
}
-bool DaliTableView::OnTilePressed( Actor actor, const TouchEvent& event )
+bool DaliTableView::OnTilePressed( Actor actor, const TouchData& event )
+{
+ return DoTilePress( actor, event.GetState( 0 ) );
+}
+
+bool DaliTableView::DoTilePress( Actor actor, PointState::Type pointState )
{
bool consumed = false;
{
bool consumed = false;
- const TouchPoint& point = event.GetPoint( 0 );
- if( TouchPoint::Down == point.state )
+ if( PointState::DOWN == pointState )
{
mPressedActor = actor;
consumed = true;
{
mPressedActor = actor;
consumed = true;
@@
-516,7
+512,7
@@
bool DaliTableView::OnTilePressed( Actor actor, const TouchEvent& event )
// A button press is only valid if the Down & Up events
// both occurred within the button.
// A button press is only valid if the Down & Up events
// both occurred within the button.
- if( (
TouchPoint::Up == point.s
tate ) &&
+ if( (
PointState::UP == pointS
tate ) &&
( mPressedActor == actor ) )
{
// ignore Example button presses when scrolling or button animating.
( mPressedActor == actor ) )
{
// ignore Example button presses when scrolling or button animating.
@@
-588,10
+584,9
@@
void DaliTableView::OnScrollComplete( const Dali::Vector2& position )
accessibilityManager.SetCurrentFocusActor(mPages[mScrollView.GetCurrentPage()].GetChildAt(0) );
}
accessibilityManager.SetCurrentFocusActor(mPages[mScrollView.GetCurrentPage()].GetChildAt(0) );
}
-bool DaliTableView::OnScrollTouched( Actor actor, const Touch
Event
& event )
+bool DaliTableView::OnScrollTouched( Actor actor, const Touch
Data
& event )
{
{
- const TouchPoint& point = event.GetPoint( 0 );
- if( TouchPoint::Down == point.state )
+ if( PointState::DOWN == event.GetState( 0 ) )
{
mPressedActor = actor;
}
{
mPressedActor = actor;
}
@@
-721,6
+716,7
@@
void DaliTableView::AddBackgroundActors( Actor layer, int count, BufferImage dis
Dali::Property::Map effect = Toolkit::CreateDistanceFieldEffect();
dfActor.SetProperty( Toolkit::ImageView::Property::IMAGE, effect );
dfActor.SetColor( BUBBLE_COLOR[ i%NUMBER_OF_BUBBLE_COLOR ] );
Dali::Property::Map effect = Toolkit::CreateDistanceFieldEffect();
dfActor.SetProperty( Toolkit::ImageView::Property::IMAGE, effect );
dfActor.SetColor( BUBBLE_COLOR[ i%NUMBER_OF_BUBBLE_COLOR ] );
+
layer.Add( dfActor );
}
layer.Add( dfActor );
}
@@
-794,8
+790,7
@@
void DaliTableView::GenerateCircle( const Size& size, std::vector< unsigned char
ImageView DaliTableView::CreateLogo( std::string imagePath )
{
ImageView DaliTableView::CreateLogo( std::string imagePath )
{
- Image image = ResourceImage::New( imagePath );
- ImageView logo = ImageView::New( image );
+ ImageView logo = ImageView::New( imagePath );
logo.SetAnchorPoint( AnchorPoint::CENTER );
logo.SetParentOrigin( ParentOrigin::CENTER );
logo.SetAnchorPoint( AnchorPoint::CENTER );
logo.SetParentOrigin( ParentOrigin::CENTER );
@@
-908,9
+903,7
@@
void DaliTableView::OnFocusedActorActivated( Dali::Actor activatedActor )
mPressedActor = activatedActor;
// Activate the current focused actor;
mPressedActor = activatedActor;
// Activate the current focused actor;
- TouchEvent touchEventUp;
- touchEventUp.points.push_back( TouchPoint ( 0, TouchPoint::Up, 0.0f, 0.0f ) );
- OnTilePressed(mPressedActor, touchEventUp);
+ DoTilePress( mPressedActor, PointState::UP );
}
}
}
}