From: Xiangyin Ma Date: Tue, 4 Nov 2014 17:47:42 +0000 (+0000) Subject: Scrollable: Klocwork issues fix X-Git-Tag: dali_1.0.17~5 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=98e004e02ba280e3353acaf249f9860bad354d28 Scrollable: Klocwork issues fix [Problem] Klocwork issues [Cause] 1. data members are not initialized in constructor 2. constant condition in conditional expression 3. Iterator is dereferenced when it can be invalid [Solution] Change-Id: I9940d3945526a84d338523d0ac1d123ce3799544 --- diff --git a/automated-tests/src/dali-toolkit-unmanaged/CMakeLists.txt b/automated-tests/src/dali-toolkit-unmanaged/CMakeLists.txt index c58d7f2..457b71b 100644 --- a/automated-tests/src/dali-toolkit-unmanaged/CMakeLists.txt +++ b/automated-tests/src/dali-toolkit-unmanaged/CMakeLists.txt @@ -7,7 +7,6 @@ SET(CAPI_LIB "dali-toolkit-unmanaged") # List of test case sources (Only these get parsed for test cases) SET(TC_SOURCES - utc-Dali-AlbumLayout.cpp utc-Dali-BendyEffect.cpp utc-Dali-BlindEffect.cpp utc-Dali-BloomView.cpp diff --git a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-AlbumLayout.cpp b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-AlbumLayout.cpp deleted file mode 100644 index f902dbb..0000000 --- a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-AlbumLayout.cpp +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Copyright (c) 2014 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. - * - */ - -#include -#include -#include -#include - -using namespace Dali; - -using namespace Toolkit; - -using namespace std; - - -namespace -{ - -Vector3 AlbumLayoutItemSizeFunction(const Vector3& layoutSize) -{ - float width = layoutSize.width * 0.2f; - return Vector3(width, width, width); -} - -float AlbumLayoutAlbumRadiusFunction(const Vector3& layoutSize) -{ - return layoutSize.width * 0.5f; -} -} // namespace - - -void album_layout_startup(void) -{ - test_return_value = TET_UNDEF; -} - -void album_layout_cleanup(void) -{ - test_return_value = TET_PASS; -} - -int UtcDaliAlbumLayoutNew(void) -{ - ToolkitTestApplication application; - - // Create a album layout - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - DALI_TEST_CHECK(albumLayout); - END_TEST; -} - -int UtcDaliAlbumSetAndGetItemSizeFunction(void) -{ - ToolkitTestApplication application; - - // Create a album layout - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - // Set the item size function - albumLayout->SetItemSizeFunction(AlbumLayoutItemSizeFunction); - - // Check whether we get the correct item size function - DALI_TEST_CHECK(albumLayout->GetItemSizeFunction() == AlbumLayoutItemSizeFunction); - END_TEST; -} - -int UtcDaliAlbumSetAndGetScrollSpeedFactor(void) -{ - ToolkitTestApplication application; - - // Create a album layout - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - // Set the scroll speed factor - albumLayout->SetScrollSpeedFactor(0.05f); - - // Check whether we get the correct scroll speed factor - DALI_TEST_EQUALS( albumLayout->GetScrollSpeedFactor(), 0.05f, TEST_LOCATION ); - END_TEST; -} - -int UtcDaliAlbumSetAndGetMaximumSwipeSpeed(void) -{ - ToolkitTestApplication application; - - // Create a album layout - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - // Set the maximum swipe speed - albumLayout->SetMaximumSwipeSpeed(50.0f); - - // Check whether we get the correct maximum swipe speed - DALI_TEST_EQUALS( albumLayout->GetMaximumSwipeSpeed(), 50.0f, TEST_LOCATION ); - END_TEST; -} - -int UtcDaliAlbumLayoutSetAndGetItemFlickAnimationDuration(void) -{ - ToolkitTestApplication application; - - // Create a album layout - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - // Set the flick animaiton duration - albumLayout->SetItemFlickAnimationDuration(0.35f); - - // Check whether we get the correct flick animaiton duration - DALI_TEST_EQUALS( albumLayout->GetItemFlickAnimationDuration(), 0.35f, TEST_LOCATION ); - END_TEST; -} - -int UtcDaliAlbumSetNumOfItems(void) -{ - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - albumLayout->SetNumOfItems(15); - - DALI_TEST_CHECK(albumLayout->GetNumOfItems() == 15); - END_TEST; -} - -int UtcDaliAlbumSetStackNum(void) -{ - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - albumLayout->SetStackNum(30); - - DALI_TEST_CHECK(albumLayout->GetStackNum() == 30); - END_TEST; -} - -int UtcDaliAlbumSetPosition(void) -{ - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - std::vector position_list; - - /*(0.0f)*/ - Vector3 pos = Vector3(850.0f,-250.0f,0.0); - position_list.push_back(pos); - - /*(1.0f)*/ - pos = Vector3(700.0f,50.0f,0.0); - position_list.push_back(pos); - - /*(2.0f)*/ - pos = Vector3(440.0f,227.0f,0.0); - position_list.push_back(pos); - - /*(4.0f)*/ - pos = Vector3(-440.0f,227.0f,0.0); - position_list.push_back(pos); - - /*(5.0f)*/ - pos = Vector3(-700.0f,50.0f,0.0); - position_list.push_back(pos); - - /*(6.0f)*/ - pos = Vector3(-850.0f,-250.0f,0.0); - position_list.push_back(pos); - - albumLayout->SetPosition(position_list); - - DALI_TEST_CHECK(albumLayout->GetPosition() == position_list); - END_TEST; -} - -int UtcDaliAlbumSetRotationX(void) -{ - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - albumLayout->SetRotationX(Math::PI/4.0f); - - DALI_TEST_CHECK(albumLayout->GetRotationX() == Math::PI/4.0f); - END_TEST; -} - -int UtcDaliAlbumSetRotationZ(void) -{ - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - std::vector rotation_list; - - /*(0.0f)*/ - float rotate = Math::PI/6.0f; - rotation_list.push_back(rotate); - - /*(1.0f)*/ - rotate = 0.0f; - rotation_list.push_back(rotate); - - /*(2.0f)*/ - rotate = Math::PI/6.0f; - rotation_list.push_back(rotate); - - /*(4.0f)*/ - rotate = -Math::PI/6.0f; - rotation_list.push_back(rotate); - - /*(5.0f)*/ - rotate = 0.0f; - rotation_list.push_back(rotate); - - /*(6.0f)*/ - rotate = -Math::PI/6.0f; - rotation_list.push_back(rotate); - - albumLayout->SetRotationZ(rotation_list); - - DALI_TEST_CHECK(albumLayout->GetRotationZ() == rotation_list); - END_TEST; -} - -int UtcDaliAlbumSetScale(void) -{ - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - std::vector scale_list; - - /*(0.0f)*/ - float scale = 1.0f; - scale_list.push_back(scale); - - /*(1.0f)*/ - scale = 0.0f; - scale_list.push_back(scale); - - /*(2.0f)*/ - scale = Math::PI/6.0f; - scale_list.push_back(scale); - - /*(4.0f)*/ - scale = -Math::PI/6.0f; - scale_list.push_back(scale); - - /*(5.0f)*/ - scale = 0.0f; - scale_list.push_back(scale); - - /*(6.0f)*/ - scale = -Math::PI/6.0f; - scale_list.push_back(scale); - - albumLayout->SetScale(scale_list); - - DALI_TEST_CHECK(albumLayout->GetScale() == scale_list); - END_TEST; -} - -int UtcDaliAlbumSetColor(void) -{ - // Create a album layout - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - std::vector color_list; - - /*(0.0f)*/ - Vector2 color = Vector2(1.0f,1.0f); - color_list.push_back(color); - - /*(1.0f)*/ - color = Vector2(1.0f,1.0f); - color_list.push_back(color); - - /*(2.0f)*/ - color = Vector2(1.0f,1.0f); - color_list.push_back(color); - - /*(4.0f)*/ - color = Vector2(1.0f,1.0f); - color_list.push_back(color); - - /*(5.0f)*/ - color = Vector2(1.0f,1.0f); - color_list.push_back(color); - - /*(6.0f)*/ - color = Vector2(1.0f,1.0f); - color_list.push_back(color); - - albumLayout->SetColor(color_list); - - DALI_TEST_CHECK(albumLayout->GetColor() == color_list); - END_TEST; -} - -int UtcDaliAlbumSetCenterPosition(void) -{ - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - albumLayout->SetCenterPosition(Vector3( 0.0f,-80.0f,100.0f)); - - DALI_TEST_CHECK(albumLayout->GetCenterPosition() == Vector3( 0.0f,-80.0f,100.0f)); - END_TEST; -} - -int UtcDaliAlbumSetSetCenterScale(void) -{ - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - albumLayout->SetCenterScale(1.75f); - - DALI_TEST_CHECK(albumLayout->GetCenterScale() == 1.75f); - END_TEST; -} - -int UtcDaliAlbumSetSetCenterColor(void) -{ - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - albumLayout->SetCenterColor(Vector2(1.0f,1.0f)); - - DALI_TEST_CHECK(albumLayout->GetCenterColor() == Vector2(1.0f,1.0f)); - END_TEST; -} - -int UtcDaliAlbumSetStackPosition(void) -{ - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - albumLayout->SetStackPosition(Vector3(750.0f,-500.0f,0.0f),Vector3(-750.0f,-500.0f,0.0f)); - - DALI_TEST_CHECK(albumLayout->GetRightStackPosition() == Vector3(750.0f,-500.0f,0.0f) && albumLayout->GetLeftStackPosition() == Vector3(-750.0f,-500.0f,0.0f)); - END_TEST; -} - -int UtcDaliAlbumSetSetStackScale(void) -{ - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - albumLayout->SetStackScale(1.0f,1.0f); - - DALI_TEST_CHECK(albumLayout->GetRightStackScale() == 1.0f && albumLayout->GetLeftStackScale() == 1.0f); - END_TEST; -} - -int UtcDaliAlbumSetStackColor(void) -{ - AlbumLayoutPtr albumLayout = AlbumLayout::New(); - - albumLayout->SetStackColor(Vector2(1.0f,1.0f),Vector2(1.0f,1.0f)); - - DALI_TEST_CHECK(albumLayout->GetRightStackColor() == Vector2(1.0f,1.0f) && albumLayout->GetLeftStackColor() == Vector2(1.0f,1.0f)); - END_TEST; -} diff --git a/base/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp b/base/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp index c7d99ce..1191db6 100755 --- a/base/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp +++ b/base/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp @@ -155,7 +155,8 @@ ScrollBar::ScrollBar() mIsPanning(false), mCurrentScrollPosition(0.0f), mIndicatorHeightPolicy(Toolkit::ScrollBar::Variable), - mIndicatorFixedHeight(DEFAULT_INDICATOR_FIXED_HEIGHT) + mIndicatorFixedHeight(DEFAULT_INDICATOR_FIXED_HEIGHT), + mPropertyIndicatorPosition(Property::INVALID_INDEX) { } diff --git a/base/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp b/base/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp index 0011dff..633a1d2 100644 --- a/base/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp +++ b/base/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp @@ -337,6 +337,7 @@ ItemView::ItemView(ItemFactory& factory) mRefreshOrderHint(true/*Refresh item 0 first*/), mMinimumSwipeSpeed(DEFAULT_MINIMUM_SWIPE_SPEED), mMinimumSwipeDistance(DEFAULT_MINIMUM_SWIPE_DISTANCE), + mMouseWheelScrollDistanceStep(0.0f), mScrollDistance(0.0f), mScrollSpeed(0.0f), mTotalPanDisplacement(Vector2::ZERO), @@ -344,6 +345,9 @@ ItemView::ItemView(ItemFactory& factory) mIsFlicking(false), mGestureState(Gesture::Clear), mAddingItems(false), + mPropertyPosition(Property::INVALID_INDEX), + mPropertyMinimumLayoutPosition(Property::INVALID_INDEX), + mPropertyScrollSpeed(Property::INVALID_INDEX), mRefreshEnabled(true), mItemsParentOrigin( ParentOrigin::CENTER), mItemsAnchorPoint( AnchorPoint::CENTER) @@ -626,7 +630,7 @@ float ItemView::GetAnchoringDuration() const void ItemView::SetRefreshInterval(float intervalLayoutPositions) { - if(mRefreshIntervalLayoutPositions != intervalLayoutPositions) + if( !Equals(mRefreshIntervalLayoutPositions, intervalLayoutPositions) ) { mRefreshIntervalLayoutPositions = intervalLayoutPositions; @@ -1643,8 +1647,16 @@ Vector3 ItemView::GetItemsAnchorPoint() const void ItemView::GetItemsRange(ItemRange& range) { - range.begin = mItemPool.begin()->first; - range.end = mItemPool.rbegin()->first + 1; + if( !mItemPool.empty() ) + { + range.begin = mItemPool.begin()->first; + range.end = mItemPool.rbegin()->first + 1; + } + else + { + range.begin = 0; + range.end = 0; + } } void ItemView::OnScrollPositionChanged( float position ) diff --git a/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-custom-effect-impl.cpp b/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-custom-effect-impl.cpp index a6d1cde..91966bf 100644 --- a/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-custom-effect-impl.cpp +++ b/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-custom-effect-impl.cpp @@ -88,16 +88,23 @@ public: mSwingAnchorAlphaFunctionIn(swingAnchorAlphaFunctionIn), mSwingAnchorAlphaFunctionOut(swingAnchorAlphaFunctionOut), mTranslateAlphaFunctionIn(translateAlphaFunctionIn), mTranslateAlphaFunctionOut(translateAlphaFunctionOut), mOpacityAlphaFunctionIn(opacityAlphaFunctionIn), mOpacityAlphaFunctionOut(opacityAlphaFunctionOut), + mWrap(false), mPanning(false), mScrolling(false), mWasOutsideView(true), + mIsStraightOnView(false), + mWasStraightOnView(false), mWrapped(false), mWasWrapped(false), + mCanChangeDirection(false), mSkipConstraints(false), mPassedCentreThisFrame(false), mForceDirectionUpdate(true), + mDirectionChanged(false), mDirectionFlags(0), mLastDirectionFlags(0), + mCurrentSwingAngle(0.f), + mCurrentOpacity(0.f), mCurrentOpacityAlphaFunction(NULL) { } diff --git a/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-depth-effect-impl.cpp b/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-depth-effect-impl.cpp index 9c63f2c..f48e4c2 100644 --- a/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-depth-effect-impl.cpp +++ b/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-depth-effect-impl.cpp @@ -116,25 +116,22 @@ struct ScrollDepthScaleConstraint } const Vector3& pageSize = pageSizeProperty.GetVector3(); + // Don't have enough parameters, to provide Wrap mode (need a way of having 'uniforms' instead of scrollWrap.GetBoolean()) - const bool wrap = true; - if(wrap) - { - const Vector3& min = scrollPositionMin.GetVector3(); - const Vector3& max = scrollPositionMax.GetVector3(); + const Vector3& min = scrollPositionMin.GetVector3(); + const Vector3& max = scrollPositionMax.GetVector3(); - if(fabsf(min.x - max.x) > Math::MACHINE_EPSILON_1) - { - // WRAP X (based on the position of the right side) - position.x = WrapInDomain(position.x + pageSize.x, min.x, max.x) - pageSize.x; - } + if(fabsf(min.x - max.x) > Math::MACHINE_EPSILON_1) + { + // WRAP X (based on the position of the right side) + position.x = WrapInDomain(position.x + pageSize.x, min.x, max.x) - pageSize.x; + } - if(fabsf(min.y - max.y) > Math::MACHINE_EPSILON_1) - { - // WRAP Y (based on the position of the bottom side) - position.y = WrapInDomain(position.y + pageSize.y, min.y, max.y) - pageSize.y; - } + if(fabsf(min.y - max.y) > Math::MACHINE_EPSILON_1) + { + // WRAP Y (based on the position of the bottom side) + position.y = WrapInDomain(position.y + pageSize.y, min.y, max.y) - pageSize.y; } // short circuit: for pages outside of view. diff --git a/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-slide-effect-impl.cpp b/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-slide-effect-impl.cpp index 32f3bca..c8a9c32 100644 --- a/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-slide-effect-impl.cpp +++ b/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-slide-effect-impl.cpp @@ -62,6 +62,8 @@ public: * Constructor */ ScrollSlideInfo() + : mScrollWrap(false), + mVertical(false) { } diff --git a/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-wobble-effect-impl.cpp b/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-wobble-effect-impl.cpp index a4f21c0..faa2275 100644 --- a/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-wobble-effect-impl.cpp +++ b/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-wobble-effect-impl.cpp @@ -175,9 +175,10 @@ struct ScrollViewWobbleEffectConstraint }; ScrollViewWobbleEffect::ScrollViewWobbleEffect() -: mPropertyTime(Property::INVALID_INDEX) +: mPropertyTime(Property::INVALID_INDEX), + mStableCurrent(0), + mAnimationCycleId(0) { - } ScrollViewWobbleEffect::~ScrollViewWobbleEffect() diff --git a/base/dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp b/base/dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp index 95d22b5..27bd343 100644 --- a/base/dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp +++ b/base/dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp @@ -277,9 +277,10 @@ Toolkit::ScrollComponent Scrollable::NewScrollComponent(Toolkit::Scrollable& scr instance = static_cast(Toolkit::ScrollBarInternal::New(scrollable, false)); break; } - default: + case Toolkit::Scrollable::OvershootIndicator: { - DALI_ASSERT_ALWAYS(true && "Unrecognized component type"); + DALI_ASSERT_ALWAYS(!"Unrecognized component type"); + break; } } diff --git a/base/dali-toolkit/public-api/controls/scrollable/item-view/album-layout.cpp b/base/dali-toolkit/public-api/controls/scrollable/item-view/album-layout.cpp deleted file mode 100755 index c89ff91..0000000 --- a/base/dali-toolkit/public-api/controls/scrollable/item-view/album-layout.cpp +++ /dev/null @@ -1,1399 +0,0 @@ -/* - * Copyright (c) 2014 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 - -// EXTERNAL INCLUDES -#include -#include -#include - -using namespace Dali; -using namespace Dali::Toolkit; -using namespace std; - -namespace // unnamed namespace -{ -const float DEFAULT_SCROLL_SPEED_FACTOR = 0.005f; -const float DEFAULT_MAXIMUM_SWIPE_SPEED = 3.0f; -const float DEFAULT_ITEM_FLICK_ANIMATION_DURATION = 0.25f; - -const float SELECTED_RIGHT = 2.5f; -const float SELECTED_LEFT = 3.5f; -const float SELECTED_CENTER = 3.0f; - -const float LAYOUT_POSITION_NAGATIVE_1 = -1.0f; -const float LAYOUT_POSITION_0 = 0.0f; -const float LAYOUT_POSITION_2 = 2.0f; -const float LAYOUT_POSITION_3 = 3.0f; -const float LAYOUT_POSITION_4 = 4.0f; -const float LAYOUT_POSITION_6 = 6.0f; -const float LAYOUT_POSITION_7 = 7.0f; - -const Vector3 POSITION_0 = Vector3(850.0f,-250.0f,0.0f); -const Vector3 POSITION_1 = Vector3(700.0f,50.0f,0.0f); -const Vector3 POSITION_2 = Vector3(440.0f,227.0f,0.0f); -const Vector3 POSITION_4 = Vector3(-440.0f,227.0f,0.0f); -const Vector3 POSITION_5 = Vector3(-700.0f,50.0f,0.0f); -const Vector3 POSITION_6 = Vector3(-850.0f,-250.0f,0.0f); - -const float ROTATION_0 = Math::PI/6.0f; -const float ROTATION_1 = 0.0f; -const float ROTATION_2 = Math::PI/6.0f; -const float ROTATION_4 = -Math::PI/6.0f; -const float ROTATION_5 = 0.0f; -const float ROTATION_6 = -Math::PI/6.0f; - -const float SCALE = 1.0f; - -const Vector2 COLOR = Vector2(1.0f,1.0f); - -const Vector3 SELECTED_ITEM_POSITION = Vector3( 0.0f,-80.0f,140.0f); -const float SELECETED_ITEM_SCALE = 1.72f; -const Vector2 SELECTED_ITEM_COLOR = Vector2(1.0f,1.0f); -const Vector3 VIRTUAL_ITEM_POSITION_RIGHT = Vector3( 280.0f,130.0f,130.0f); -const Vector3 VIRTUAL_ITEM_POSITION_LEFT = Vector3( -280.0f,130.0f,130.0f); -const float ROTATION_X = Math::PI/4.0f; -const float SCALE_RIGHT = 1.0f; -const float SCALE_LEFT = 1.0f; -const Vector2 COLOR_RIGHT = Vector2(1.0f,1.0f); -const Vector2 COLOR_LEFT = Vector2(1.0f,1.0f); -const Vector3 POSITION_RIGHT = Vector3(710.0f,-450.0f,0.0f); -const Vector3 POSITION_LEFT = Vector3(-710.0f,-450.0f,0.0f); -const float ROTATION_RIGHT = -Math::PI / 6.0f; -const float ROTATION_LEFT = Math::PI / 6.0f; - -const float ALBUM_HIGHT = 7.0f; -const float ALPHA = 1.1f; -const float ALPHA_OF_SIZE = 0.35f; -const float LINE_OF_BOTTOM = 360.0f; - -const float CHANCE_OF_RANDOM_ROTATION_OF_STACK = 0.5f; -const float RANGE_OF_RANDOM_ROTATION_OF_STACK = 0.5f; - -const float THRESHHOLD_OF_MOVING = 0.02f; -const int NUM_OF_FRAME_FILTERED = 5; - -const unsigned int SPREAD_ITEM_NUM = 6; - -typedef enum -{ - SCROLL_LEFT = 1, - SCROLL_NONE = 0, - SCROLL_RIGHT = -1 -}ScrollDirection; - -struct DefaultItemSizeFunction -{ - Vector3 operator()(const Vector3& layoutSize) - { - float width = layoutSize.height * ALPHA_OF_SIZE; - return Vector3(width, width, width); - } -}; - -struct AlbumScaleConstraint -{ - AlbumScaleConstraint(const float scaleRight, const float scaleLeft, const float selectedItemScale, vector scaleSpread) - { - mScaleRight = scaleRight; - mScaleLeft = scaleLeft; - mSelectedItemScale = selectedItemScale; - - if(scaleSpread.size() == SPREAD_ITEM_NUM) - { - mScaleVecSpread = scaleSpread; - } - } - - Vector3 operator()(const Vector3& current, const float& layoutPosition, const float& scrollSpeed, const Vector3& layoutSize) - { - int begin = 0; - int end = 0; - float beginScale = 0.0f; - float endScale = 0.0f; - float scale = 0.0f; - float pos = layoutPosition + SELECTED_CENTER; - - if(pos <= LAYOUT_POSITION_NAGATIVE_1)/*items of right stack*/ - { - scale = mScaleRight; - } - else if(pos > LAYOUT_POSITION_NAGATIVE_1 && pos < LAYOUT_POSITION_0)/*items between -1.0f and 0.0f*/ - { - beginScale = mScaleVecSpread.at(0); - endScale = mScaleRight; - - scale = (endScale - beginScale) * fabs(pos) + beginScale; - } - else if(pos >= LAYOUT_POSITION_0 && pos < SELECTED_RIGHT)/*items between 0.0f and center*/ - { - if(int(pos) < pos) - { - begin = int(pos); - end = int(pos) + 1; - - beginScale = mScaleVecSpread.at(begin); - endScale = mScaleVecSpread.at(end); - - scale = (endScale - beginScale) * fabs(pos - int(pos)) + beginScale; - } - else - { - scale = mScaleVecSpread.at(int(pos)); - } - } - else if(pos >= SELECTED_RIGHT && pos <= SELECTED_LEFT)/*items of center*/ - { - scale = mSelectedItemScale; - } - else if(pos > SELECTED_LEFT && pos <= LAYOUT_POSITION_6)/*items between center and 6.0f*/ - { - if(int(pos) < pos) - { - begin = int(pos)-1; - end = int(pos); - - beginScale = mScaleVecSpread.at(begin); - endScale = mScaleVecSpread.at(end); - - scale = (endScale - beginScale) * fabs(pos - int(pos)) + beginScale; - } - else - { - scale = mScaleVecSpread.at(int(pos)-1); - } - } - else if(pos > LAYOUT_POSITION_6 && pos < LAYOUT_POSITION_7)/*items between 6.0f and 7.0f*/ - { - beginScale = mScaleVecSpread.at(5); - endScale = mScaleLeft; - - scale = (endScale - beginScale) * fabs(pos - int(pos)) + beginScale; - } - else if(pos >= LAYOUT_POSITION_7)/*items of left stack*/ - { - scale = mScaleLeft; - } - else - { - scale = 1.0f; - } - - return Vector3(scale,scale,1.0f); - } - - float mScaleRight; - float mScaleLeft; - float mSelectedItemScale; - vector mScaleVecSpread; -}; - -Vector3 CalculatePosition(Vector3 pos, float rotateX) -{ - pos.z = pos.z - fabs(pos.y - LINE_OF_BOTTOM) * sinf(rotateX) / cosf(rotateX); - return pos; -} - -Vector3 CalculateStackPosition(Vector3 pos, float rotateX, int num, bool left) -{ - pos.z = pos.z - fabs(pos.y - LINE_OF_BOTTOM) * sinf(rotateX) / cosf(rotateX); - - if(left) - { - pos.x = pos.x + num * ALPHA; - } - else - { - pos.x = pos.x - num * ALPHA; - } - - pos.y -= num * ALBUM_HIGHT * sinf(rotateX); - pos.z += num * ALBUM_HIGHT * cosf(rotateX); - - return pos; -} - -Vector3 GetPosition(float layoutPos, Vector3 posRight, Vector3 posLeft, Vector3 posSelectedItem, vector posVecSpread, float rotateX) -{ - int begin =0; - int end = 0; - - float alpha = 0.0f; - - Vector3 beginPos = Vector3::ZERO; - Vector3 endPos = Vector3::ZERO; - - Vector3 pos = Vector3::ZERO; - - if(layoutPos <= LAYOUT_POSITION_NAGATIVE_1)/*items of right stack*/ - { - if(int(layoutPos) > layoutPos) - { - begin = int(layoutPos); - end = int(layoutPos)-1; - - beginPos = CalculateStackPosition(posRight, rotateX, int(LAYOUT_POSITION_NAGATIVE_1) - int(layoutPos),false); - - endPos = CalculateStackPosition(posRight, rotateX, - int(layoutPos),false); - - alpha = fabs(layoutPos - int(layoutPos)); - - pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x; - pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y; - pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z; - - return pos; - } - else - { - return CalculateStackPosition(posRight,rotateX,int(LAYOUT_POSITION_NAGATIVE_1) - int(layoutPos),false); - } - } - else if(layoutPos < LAYOUT_POSITION_0 && layoutPos > LAYOUT_POSITION_NAGATIVE_1)/*items between -1.0f and 0.0f*/ - { - beginPos = CalculatePosition(posVecSpread.at(int(LAYOUT_POSITION_0)),rotateX); - endPos = CalculateStackPosition(posRight, rotateX, int(layoutPos),false); - - alpha = -layoutPos; - - pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x; - pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y; - pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z; - - return pos; - } - else if(layoutPos >= LAYOUT_POSITION_0 && layoutPos <= LAYOUT_POSITION_2)/*items between 0.0f and 2.0f*/ - { - if(int(layoutPos) < layoutPos) - { - begin = int(layoutPos); - end = int(layoutPos) + 1; - - beginPos = posVecSpread.at(begin); - endPos = posVecSpread.at(end); - - alpha = fabs(layoutPos - int(layoutPos)); - - pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x; - pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y; - pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z; - } - else - { - pos = posVecSpread.at(int(layoutPos)); - } - } - else if(layoutPos >LAYOUT_POSITION_2 && layoutPos SELECTED_LEFT && layoutPos < LAYOUT_POSITION_4)/*items between center and 4.0f*/ - { - beginPos = posVecSpread.at(int(LAYOUT_POSITION_3)); - endPos = VIRTUAL_ITEM_POSITION_LEFT; - - alpha = (LAYOUT_POSITION_4 - layoutPos) / (LAYOUT_POSITION_4 - SELECTED_LEFT); - - pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x; - pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y; - pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z; - } - else if(layoutPos >= LAYOUT_POSITION_4 && layoutPos <= LAYOUT_POSITION_6)/*items between 4.0f and 6.0f*/ - { - if(int(layoutPos) < layoutPos) - { - begin = int(layoutPos); - end = int(layoutPos) + 1; - - beginPos = posVecSpread.at(begin - 1); - endPos = posVecSpread.at(end - 1); - - alpha = fabs(layoutPos - int(layoutPos)); - - pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x; - pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y; - pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z; - } - else - { - pos = posVecSpread.at(int(layoutPos) -1); - } - } - else if(layoutPos > LAYOUT_POSITION_6 && layoutPos < LAYOUT_POSITION_7)/*items between 6.0f and 7.0f*/ - { - beginPos = CalculatePosition(posVecSpread.at(int(LAYOUT_POSITION_6) - 1),rotateX); - endPos = CalculateStackPosition(posLeft, rotateX, int(layoutPos) + 1 - int(LAYOUT_POSITION_7),true); - - alpha = fabs(layoutPos - int(layoutPos)); - - pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x; - pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y; - pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z; - - return pos; - } - else if(layoutPos >= LAYOUT_POSITION_7)/*items of left stack*/ - { - if(int(layoutPos) < layoutPos) - { - begin = int(layoutPos); - end = int(layoutPos) + 1; - - beginPos = CalculateStackPosition(posLeft, rotateX, int(layoutPos) - int(LAYOUT_POSITION_7),true); - - endPos = CalculateStackPosition(posLeft, rotateX, int(layoutPos) + 1 - int(LAYOUT_POSITION_7),true); - - alpha = fabs(layoutPos - int(layoutPos)); - - pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x; - pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y; - pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z; - - return pos; - } - else - { - return CalculateStackPosition(posLeft, rotateX, int(layoutPos) - int(LAYOUT_POSITION_7),true); - } - } - - return CalculatePosition(pos,rotateX); -} - -struct AlbumPositionConstraint -{ - AlbumPositionConstraint(const Vector3 posRight, const Vector3 posLeft, const Vector3 posSelectedItem, const vector posVecSpread, float rotateX) - { - mPositionRight = posRight; - mPositionLeft = posLeft; - mSelectedItemPosition = posSelectedItem; - mRotationX = rotateX; - - if(posVecSpread.size() == SPREAD_ITEM_NUM) - { - mPositionVecSpread = posVecSpread; - } - } - - Vector3 operator()(const Vector3& current, const float& layoutPosition, const float& scrollSpeed, const Vector3& layoutSize) - { - float pos = layoutPosition + SELECTED_CENTER; - - /*handle if the item is selected item(in the center)*/ - if(pos >= SELECTED_RIGHT && pos <= SELECTED_LEFT) - { - return SELECTED_ITEM_POSITION; - } - - /*get the spread items position*/ - return GetPosition(pos,mPositionRight,mPositionLeft,mSelectedItemPosition,mPositionVecSpread,mRotationX); - } - - Vector3 mPositionRight; - Vector3 mPositionLeft; - Vector3 mSelectedItemPosition; - vector mPositionVecSpread; - float mRotationX; - }; - -Quaternion GetRotation(float layoutPos, vector rotateVecStack, vector rotateVecSpread, float rotateX) -{ - int begin =0; - int end = 0; - - float alpha = 0.0f; - - float beginRotation = 0.0f; - float endRotation = 0.0f; - - float rotation = 0.0f; - if(layoutPos <= LAYOUT_POSITION_NAGATIVE_1)/*items of right stack*/ - { - if(int(layoutPos) > layoutPos) - { - begin = int(layoutPos) + 1; - end = int(layoutPos); - - begin *= -1; - end *= -1; - - beginRotation = rotateVecStack.at(begin); - endRotation = rotateVecStack.at(end); - - alpha = fabs(layoutPos - int(layoutPos)); - - rotation = (endRotation - beginRotation) * alpha + beginRotation; - } - else - { - rotation = rotateVecStack.at(-int(layoutPos)-1); - } - } - else if(layoutPos > LAYOUT_POSITION_NAGATIVE_1 && layoutPos < LAYOUT_POSITION_0)/*items between -1.0f and 0.0f*/ - { - begin = 0; - end = 0; - - beginRotation = rotateVecSpread.at(begin); - endRotation = rotateVecStack.at(end); - - alpha = fabs(layoutPos); - - rotation = (endRotation - beginRotation) * alpha + beginRotation; - } - else if(layoutPos >= LAYOUT_POSITION_0 && layoutPos < LAYOUT_POSITION_3) - { - if(int(layoutPos) < layoutPos) - { - begin = int(layoutPos); - end = int(layoutPos) + 1; - - beginRotation = rotateVecSpread.at(begin); - endRotation = rotateVecSpread.at(end); - - alpha = fabs(layoutPos - int(layoutPos)); - - rotation = (endRotation - beginRotation) * alpha + beginRotation; - } - else - { - rotation = rotateVecSpread.at(int(layoutPos)); - } - } - else if(layoutPos > LAYOUT_POSITION_3 && layoutPos <= LAYOUT_POSITION_6) - { - if(int(layoutPos) < layoutPos) - { - begin = int(layoutPos) - 1; - end = int(layoutPos); - - beginRotation = rotateVecSpread.at(begin); - endRotation = rotateVecSpread.at(end); - - alpha = fabs(layoutPos - int(layoutPos)); - - rotation = (endRotation - beginRotation) * alpha + beginRotation; - } - else - { - rotation = rotateVecSpread.at(int(layoutPos)-1); - } - } - else if(layoutPos > LAYOUT_POSITION_6 && layoutPos < LAYOUT_POSITION_7) - { - begin = 5; - end = 0; - - beginRotation = rotateVecSpread.at(begin); - endRotation = rotateVecStack.at(end); - - alpha = fabs(layoutPos - int(LAYOUT_POSITION_6)); - - rotation = (endRotation - beginRotation) * alpha + beginRotation; - } - else if(layoutPos >= LAYOUT_POSITION_7) - { - if(int(layoutPos) < layoutPos) - { - begin = int(layoutPos) - int(LAYOUT_POSITION_7); - end = int(layoutPos) - int(LAYOUT_POSITION_7) + 1; - - beginRotation = rotateVecStack.at(begin); - endRotation = rotateVecStack.at(end); - - alpha = fabs(layoutPos - int(layoutPos)); - - rotation = (endRotation - beginRotation) * alpha + beginRotation; - } - else - { - rotation = rotateVecStack.at(int(layoutPos)-int(LAYOUT_POSITION_7)); - } - } - - return Quaternion(rotateX, Vector3::XAXIS) * Quaternion(rotation, Vector3::ZAXIS); -} - -struct AlbumRotationConstraint -{ - AlbumRotationConstraint(const vector rotatVecSpread, const vector rotatVecStack, const float rotateX, int num) - { - mRotationX = rotateX; - mNumOfItems = num; - mIndex = 0; - mLastIndex = 0; - mLeft = SCROLL_NONE; - mLastPosition = 0.0f; - mTimes = 0; - - if(rotatVecSpread.size() == SPREAD_ITEM_NUM) - { - mRotationVecSpread = rotatVecSpread; - } - - mRotationVecStack = rotatVecStack; - } - - Quaternion operator()(const Quaternion& current, const float& layoutPosition, const float& scrollSpeed, const Vector3& layoutSize) - { - float pos = layoutPosition + SELECTED_CENTER; - - if(mIndex == mNumOfItems) - { - mIndex = 0; - } - - mIndex ++; - - if(mLastIndex != mIndex) - { - mLastIndex = mIndex; - - if(mLeft == SCROLL_RIGHT) - { - if(pos > mLastPosition + THRESHHOLD_OF_MOVING) - { - mTimes = 0; - mLeft = SCROLL_LEFT; - } - else if(pos < mLastPosition) - { - mTimes = 0; - mLeft = SCROLL_RIGHT; - } - else - { - mTimes++; - if(mTimes > NUM_OF_FRAME_FILTERED) - { - mTimes = 0; - mLeft = SCROLL_NONE; - } - } - } - else if(mLeft == SCROLL_LEFT) - { - if(pos > mLastPosition) - { - mTimes = 0; - mLeft = SCROLL_LEFT; - } - else if(pos < mLastPosition - THRESHHOLD_OF_MOVING) - { - mTimes = 0; - mLeft = SCROLL_RIGHT; - } - else - { - mTimes++; - if(mTimes > NUM_OF_FRAME_FILTERED) - { - mTimes = 0; - mLeft = SCROLL_NONE; - } - } - } - else - { - if(pos < mLastPosition) - { - mLeft = SCROLL_RIGHT; - } - else if(pos > mLastPosition) - { - mLeft = SCROLL_LEFT; - } - else - { - mLeft = SCROLL_NONE; - } - } - - mLastPosition = pos; - - /*rotation for the selected item(center)*/ - if(pos >= SELECTED_RIGHT && pos < SELECTED_LEFT) - { - if(mLeft == SCROLL_LEFT) - { - return Quaternion(-fabs(SELECTED_CENTER - pos), Vector3::YAXIS); - } - else if(mLeft == SCROLL_RIGHT) - { - return Quaternion(fabs(pos - SELECTED_CENTER), Vector3::YAXIS); - } - else - { - return Quaternion(0.0f, Vector3::YAXIS); - } - } - } - - /*rotation for the spread item*/ - return GetRotation(pos,mRotationVecStack,mRotationVecSpread,mRotationX); - } - - vector mRotationVecSpread; - vector mRotationVecStack; - float mRotationX; - Actor mScrollDirectionActor; - int mLastIndex; - int mIndex; - int mNumOfItems; - int mTimes; - ScrollDirection mLeft; - float mLastPosition; -}; - -struct AlbumColorConstraint -{ - AlbumColorConstraint(const Vector2 colorRight, const Vector2 colorLeft, const Vector2 colorSelectedItem, const vector spreadVecColor, const int stackNum) - { - mColorRight = colorRight; - mColorLeft = colorLeft; - mSelectedItemColor = colorSelectedItem; - mStackNum = stackNum; - - if(spreadVecColor.size() == SPREAD_ITEM_NUM) - { - mColorVecSpread = spreadVecColor; - } - } - - Vector4 operator()(const Vector4& current, const float& layoutPosition, const float& scrollSpeed, const Vector3& layoutSize) - { - float black = 1.0f; - Vector4 color = current; - float pos = layoutPosition + SELECTED_CENTER; - Vector2 temp = Vector2(0.0f,0.0f); - - int begin = 0; - int end = 0; - - Vector2 beginColor = Vector2(0.0f,0.0f); - Vector2 endColor = Vector2(0.0f,0.0f); - - if(pos <= -mStackNum-1) - { - color.w = 0.0f; - black = 0.0f; - } - else if(pos > -mStackNum-1 && pos < -mStackNum) - { - beginColor = mColorRight; - endColor = Vector2(0.0f,0.0f); - - color.w = (endColor.x - beginColor.x) * fabs(pos - int(pos)) + beginColor.x; - black = (endColor.y - beginColor.y) * fabs(pos - int(pos)) + beginColor.y; - } - else if(pos <= LAYOUT_POSITION_NAGATIVE_1 && pos >= -mStackNum) - { - color.w = mColorRight.x; - black = mColorRight.y; - } - else if(pos > LAYOUT_POSITION_NAGATIVE_1 && pos < LAYOUT_POSITION_0) - { - beginColor = mColorVecSpread.at(int(LAYOUT_POSITION_0)); - endColor = mColorRight; - - color.w = (endColor.x - beginColor.x) * fabs(pos) + beginColor.x; - black = (endColor.y - beginColor.y) * fabs(pos) + beginColor.y; - } - else if(pos >= LAYOUT_POSITION_0 && pos <= LAYOUT_POSITION_2) - { - if(int(pos) < pos) - { - begin = int(pos); - end = int(pos) + 1; - - beginColor = mColorVecSpread.at(begin); - endColor = mColorVecSpread.at(end); - - temp = (endColor - beginColor) * fabs(pos - int(pos)) + beginColor; - - color.w = temp.x; - black = temp.y; - } - else - { - beginColor = mColorVecSpread.at(int(pos)); - - color.w = beginColor.x; - black = beginColor.y; - } - } - else if(pos > LAYOUT_POSITION_2 && pos < SELECTED_RIGHT)/*items between 2.0f and center*/ - { - beginColor = mColorVecSpread.at(int(LAYOUT_POSITION_2)); - endColor = Vector2(0.0f,0.0f); - - temp = (endColor - beginColor) * (pos - LAYOUT_POSITION_2)/(SELECTED_RIGHT - LAYOUT_POSITION_2) + beginColor; - - color.w = temp.x; - black = temp.y; - } - else if(pos >= SELECTED_RIGHT && pos <= SELECTED_LEFT)/*items of center*/ - { - color.w = mSelectedItemColor.x; - black = mSelectedItemColor.y; - } - else if(pos > SELECTED_LEFT && pos < LAYOUT_POSITION_4)/*items between center and 4.0f*/ - { - beginColor = Vector2(0.0f,0.0f); - endColor = mColorVecSpread.at(int(LAYOUT_POSITION_3)); - - temp = (endColor - beginColor) * (pos - SELECTED_LEFT)/(LAYOUT_POSITION_4 - SELECTED_LEFT) + beginColor; - - color.w = temp.x; - black = temp.y; - } - else if(pos >= LAYOUT_POSITION_4 && pos <= LAYOUT_POSITION_6)/*items between 4.0f and 6.0f*/ - { - if(int(pos) < pos) - { - begin = int(pos) - 1; - end = int(pos); - - beginColor = mColorVecSpread.at(begin); - endColor = mColorVecSpread.at(end); - - temp = (endColor - beginColor) * fabs(pos - int(pos)) + beginColor; - - color.w = temp.x; - black = temp.y; - } - else - { - beginColor = mColorVecSpread.at(int(pos) - 1); - - color.w = beginColor.x; - black = beginColor.y; - } - } - else if(pos > LAYOUT_POSITION_6 && pos < LAYOUT_POSITION_7)/*items between 6.0f and 7.0f*/ - { - beginColor = mColorVecSpread.at(int(LAYOUT_POSITION_6) - 1); - endColor = mColorLeft; - - color.w = (endColor.x - beginColor.x) * fabs(pos - int(pos)) + beginColor.x; - black = (endColor.y - beginColor.y) * fabs(pos - int(pos)) + beginColor.y; - } - else if(pos >= LAYOUT_POSITION_7 && pos <= mStackNum + int(LAYOUT_POSITION_7))/*items of left stack*/ - { - color.w = mColorLeft.x; - black = mColorLeft.y; - } - else if(pos > mStackNum + int(LAYOUT_POSITION_7) && pos < mStackNum + int(LAYOUT_POSITION_7) + 1) - { - beginColor = mColorLeft; - endColor = Vector2(0.0f,0.0f); - - color.w = (endColor.x - beginColor.x) * fabs(pos - int(pos)) + beginColor.x; - black = (endColor.y - beginColor.y) * fabs(pos - int(pos)) + beginColor.y; - } - else if(pos >= mStackNum + int(LAYOUT_POSITION_7) +1) - { - color.w = 0.0f; - black = 0.0f; - } - - color.r = color.r * black; - color.g = color.g * black; - color.b = color.b * black; - - return color; - } - - int mStackNum; - Vector2 mColorRight; - Vector2 mColorLeft; - Vector2 mSelectedItemColor; - vector mColorVecSpread; -}; - -struct AlbumVisibilityConstraintPortrait -{ - AlbumVisibilityConstraintPortrait() - { - } - - bool operator()(const bool& current, const float& layoutPosition, const float& scrollSpeed, const Vector3& layoutSize) - { - return true; - } -}; - -} // unnamed namespace - -namespace Dali -{ - -namespace Toolkit -{ - -struct AlbumLayout::Impl -{ - Impl() - : mItemSizeFunction(DefaultItemSizeFunction()), - mScrollSpeedFactor(DEFAULT_SCROLL_SPEED_FACTOR), - mMaximumSwipeSpeed(DEFAULT_MAXIMUM_SWIPE_SPEED), - mItemFlickAnimationDuration(DEFAULT_ITEM_FLICK_ANIMATION_DURATION), - mNumOfItems(0) - { - /*Initialize the variables*/ - mSelectedItemScale = SELECETED_ITEM_SCALE; - mRotationX = ROTATION_X; - mScaleRight = SCALE_RIGHT; - mScaleLeft = SCALE_LEFT; - mRotationRight = ROTATION_RIGHT; - mRotationLeft = ROTATION_LEFT; - mSelectedItemColor = SELECTED_ITEM_COLOR; - mSelectedItemPosition = SELECTED_ITEM_POSITION; - mColorRight = COLOR_RIGHT; - mColorLeft = COLOR_LEFT; - mPositionRight = POSITION_RIGHT; - mPositionLeft = POSITION_LEFT; - mStackNum = 50; - - /*Initialize the position of spread items*/ - mPositionVecSpread.push_back(POSITION_0); - mPositionVecSpread.push_back(POSITION_1); - mPositionVecSpread.push_back(POSITION_2); - mPositionVecSpread.push_back(POSITION_4); - mPositionVecSpread.push_back(POSITION_5); - mPositionVecSpread.push_back(POSITION_6); - - /*Initialize the rotation of spread items*/ - mRotationVecSpread.push_back(ROTATION_0); - mRotationVecSpread.push_back(ROTATION_1); - mRotationVecSpread.push_back(ROTATION_2); - mRotationVecSpread.push_back(ROTATION_4); - mRotationVecSpread.push_back(ROTATION_5); - mRotationVecSpread.push_back(ROTATION_6); - - /*Initialize the scale of spread items*/ - for(unsigned int i=0; i positionList) - { - if(positionList.size() == SPREAD_ITEM_NUM) - { - mPositionVecSpread = positionList; - } - } - - vector GetPosition() const - { - return mPositionVecSpread; - } - - void SetColor(vector colorList) - { - if(colorList.size() == SPREAD_ITEM_NUM) - { - mColorVecSpread = colorList; - } - } - - vector GetColor() const - { - return mColorVecSpread; - } - - void SetScale(vector scaleList) - { - if(scaleList.size() == SPREAD_ITEM_NUM) - { - mScaleVecSpread = scaleList; - } - } - - vector GetScale() const - { - return mScaleVecSpread; - } - - void SetRotationX(float rotat_x) - { - mRotationX = rotat_x; - } - - float GetRotationX() const - { - return mRotationX; - } - - void SetRotationZ(vector rotationList) - { - if(rotationList.size() == SPREAD_ITEM_NUM) - { - mRotationVecSpread = rotationList; - } - } - - vector GetRotationZ() const - { - return mRotationVecSpread; - } - - void SetCenterPosition(Vector3 pos) - { - mSelectedItemPosition = pos; - } - - Vector3 GetCenterPosition() const - { - return mSelectedItemPosition; - } - - void SetCenterScale(float scale) - { - mSelectedItemScale = scale; - } - - float GetCenterScale() const - { - return mSelectedItemScale; - } - - void SetCenterColor(Vector2 color) - { - mSelectedItemColor = color; - } - - Vector2 GetCenterColor() const - { - return mSelectedItemColor; - } - - void SetStackPosition(Vector3 rightPos, Vector3 leftPos) - { - mPositionRight = rightPos; - mPositionLeft = leftPos; - } - - Vector3 GetRightStackPosition() const - { - return mPositionRight; - } - - Vector3 GetLeftStackPosition() const - { - return mPositionLeft; - } - - void SetStackScale(float rightScale, float leftScale) - { - mScaleRight = rightScale; - mScaleLeft = leftScale; - } - - float GetRightStackScale() const - { - return mScaleRight; - } - - float GetLeftStackScale() const - { - return mScaleLeft; - } - - void SetStackColor(Vector2 rightColor, Vector2 leftColor) - { - mColorRight = rightColor; - mColorLeft = leftColor; - } - - Vector2 GetRightStackColor() const - { - return mColorRight; - } - - Vector2 GetLeftStackColor() const - { - return mColorLeft; - } - - void SetNumOfItems(int num) - { - mNumOfItems = num; - - /*Initialize the rotation of stack items*/ - for(int i=0; i mPositionVecSpread;/*positions of the spread items*/ - vector mRotationVecSpread;/*rotations of the spread items*/ - vector mScaleVecSpread;/*scales of the spread items*/ - vector mColorVecSpread;/*colors of the spread items*/ - - vector mRotationVecStack;/*rotations of the stack items*/ - - float mRotationRight;/*rotation of right album stack*/ - float mRotationLeft;/*rotation of left album stack*/ - - float mScaleRight;/*scale of right album stack*/ - float mScaleLeft;/*scale of left album stack*/ - - Vector2 mColorRight;/*color of right album stack*/ - Vector2 mColorLeft;/*color of left album stack*/ - - Vector3 mPositionRight;/*position of right album stack*/ - Vector3 mPositionLeft;/*position of left album stack*/ - - int mNumOfItems;/*num of items*/ - int mStackNum;/*num of items of stack*/ -}; - -AlbumLayoutPtr AlbumLayout::New() -{ - return AlbumLayoutPtr(new AlbumLayout()); -} - -AlbumLayout::~AlbumLayout() -{ - delete mImpl; -} - -void AlbumLayout::SetItemSizeFunction(ItemSizeFunction function) -{ - mImpl->mItemSizeFunction = function; -} - -AlbumLayout::ItemSizeFunction AlbumLayout::GetItemSizeFunction() const -{ - return mImpl->mItemSizeFunction; -} - -void AlbumLayout::SetScrollSpeedFactor(float scrollSpeed) -{ - mImpl->mScrollSpeedFactor = scrollSpeed; -} - -void AlbumLayout::SetMaximumSwipeSpeed(float speed) -{ - mImpl->mMaximumSwipeSpeed = speed; -} - -void AlbumLayout::SetItemFlickAnimationDuration(float durationSeconds) -{ - mImpl->mItemFlickAnimationDuration = durationSeconds; -} - -float AlbumLayout::GetScrollSpeedFactor() const -{ - return mImpl->mScrollSpeedFactor; -} - -float AlbumLayout::GetMaximumSwipeSpeed() const -{ - return mImpl->mMaximumSwipeSpeed; -} - -float AlbumLayout::GetItemFlickAnimationDuration() const -{ - return mImpl->mItemFlickAnimationDuration; -} - -float AlbumLayout::GetMinimumLayoutPosition(unsigned int numberOfItems, Vector3 layoutSize) const -{ - return - static_cast(numberOfItems) + 1; -} - -float AlbumLayout::GetClosestAnchorPosition(float layoutPosition) const -{ - return round(layoutPosition); -} - -float AlbumLayout::GetItemScrollToPosition(unsigned int itemId) const -{ - return -(static_cast(itemId)); -} - -ItemRange AlbumLayout::GetItemsWithinArea(float firstItemPosition, Vector3 layoutSize) const -{ - return ItemRange(0, mImpl->mNumOfItems); -} - -unsigned int AlbumLayout::GetReserveItemCount(Vector3 layoutSize) const -{ - return 0; -} - -bool AlbumLayout::GetItemSize(unsigned int itemId, Vector3 layoutSize, Vector3& itemSize) const -{ - itemSize = mImpl->mItemSizeFunction(layoutSize); - return true; -} - -void AlbumLayout::GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const -{ - if(animation) - { - animation.Resize(actor, size); - } -} - -bool AlbumLayout::GetPositionConstraint(unsigned int itemId, ItemLayout::Vector3Function& constraint) const -{ - constraint = AlbumPositionConstraint(mImpl->mPositionRight,mImpl->mPositionLeft,mImpl->mSelectedItemPosition,mImpl->mPositionVecSpread,mImpl->mRotationX); - return true; -} - -bool AlbumLayout::GetRotationConstraint(unsigned int itemId, ItemLayout::QuaternionFunction& constraint) const -{ - constraint = AlbumRotationConstraint(mImpl->mRotationVecSpread,mImpl->mRotationVecStack,mImpl->mRotationX,mImpl->mNumOfItems); - return true; -} - -bool AlbumLayout::GetScaleConstraint(unsigned int itemId, ItemLayout::Vector3Function& constraint) const -{ - constraint = AlbumScaleConstraint(mImpl->mScaleRight,mImpl->mScaleLeft,mImpl->mSelectedItemScale,mImpl->mScaleVecSpread); - return true; -} - -bool AlbumLayout::GetColorConstraint(unsigned int itemId, ItemLayout::Vector4Function& constraint) const -{ - constraint = AlbumColorConstraint(mImpl->mColorRight,mImpl->mColorLeft,mImpl->mSelectedItemColor,mImpl->mColorVecSpread,mImpl->mStackNum); - return true; -} - -bool AlbumLayout::GetVisibilityConstraint(unsigned int itemId, ItemLayout::BoolFunction& constraint) const -{ - constraint = AlbumVisibilityConstraintPortrait(); - return true; -} - -Degree AlbumLayout::GetScrollDirection() const -{ - Degree scrollDirection(0); - - scrollDirection = -90.0f; - - return scrollDirection; -} - -void AlbumLayout::SetNumOfItems(int num) -{ - mImpl->SetNumOfItems(num); -} - -int AlbumLayout::GetNumOfItems() const -{ - return mImpl->GetNumOfItems(); -} - -void AlbumLayout::SetStackNum(int num) -{ - mImpl->SetStackNum(num); -} - -int AlbumLayout::GetStackNum() const -{ - return mImpl->GetStackNum(); -} - -void AlbumLayout::SetPosition(vector positionList) -{ - mImpl->SetPosition(positionList); -} - -vector AlbumLayout::GetPosition() const -{ - return mImpl->GetPosition(); -} - -void AlbumLayout::SetScale(vector scaleList) -{ - mImpl->SetScale(scaleList); -} - -vector AlbumLayout::GetScale() const -{ - return mImpl->GetScale(); -} - -void AlbumLayout::SetColor(vector colorList) -{ - mImpl->SetColor(colorList); -} - -vector AlbumLayout::GetColor() const -{ - return mImpl->GetColor(); -} - -void AlbumLayout::SetRotationX(float rotation) -{ - mImpl->SetRotationX(rotation); -} - -float AlbumLayout::GetRotationX() const -{ - return mImpl->GetRotationX(); -} - -void AlbumLayout::SetRotationZ(vector rotationList) -{ - mImpl->SetRotationZ(rotationList); -} - -vector AlbumLayout::GetRotationZ() const -{ - return mImpl->GetRotationZ(); -} - -void AlbumLayout::SetCenterPosition(Vector3 pos) -{ - mImpl->SetCenterPosition(pos); -} - -Vector3 AlbumLayout::GetCenterPosition() const -{ - return mImpl->GetCenterPosition(); -} - -void AlbumLayout::SetCenterScale(float scale) -{ - mImpl->SetCenterScale(scale); -} - -float AlbumLayout::GetCenterScale() const -{ - return mImpl->GetCenterScale(); -} - -void AlbumLayout::SetCenterColor(Vector2 color) -{ - mImpl->SetCenterColor(color); -} - -Vector2 AlbumLayout::GetCenterColor() const -{ - return mImpl->GetCenterColor(); -} - -void AlbumLayout::SetStackPosition(Vector3 rightPos, Vector3 leftPos) -{ - mImpl->SetStackPosition(rightPos, leftPos); -} - -Vector3 AlbumLayout::GetRightStackPosition() const -{ - return mImpl->GetRightStackPosition(); -} - -Vector3 AlbumLayout::GetLeftStackPosition() const -{ - return mImpl->GetLeftStackPosition(); -} - -void AlbumLayout::SetStackScale(float rightScale, float leftScale) -{ - mImpl->SetStackScale(rightScale,leftScale); -} - -float AlbumLayout::GetRightStackScale() const -{ - return mImpl->GetRightStackScale(); -} - -float AlbumLayout::GetLeftStackScale() const -{ - return mImpl->GetLeftStackScale(); -} - -void AlbumLayout::SetStackColor(Vector2 rightColor, Vector2 leftColor) -{ - mImpl->SetStackColor(rightColor, leftColor); -} - -Vector2 AlbumLayout::GetRightStackColor() const -{ - return mImpl->GetRightStackColor(); -} - -Vector2 AlbumLayout::GetLeftStackColor() const -{ - return mImpl->GetLeftStackColor(); -} - -AlbumLayout::AlbumLayout() -: mImpl(NULL) -{ - mImpl = new Impl(); -} - -} // namespace Toolkit - -} // namespace Dali diff --git a/base/dali-toolkit/public-api/controls/scrollable/item-view/album-layout.h b/base/dali-toolkit/public-api/controls/scrollable/item-view/album-layout.h deleted file mode 100755 index a7ca49b..0000000 --- a/base/dali-toolkit/public-api/controls/scrollable/item-view/album-layout.h +++ /dev/null @@ -1,370 +0,0 @@ -#ifndef __DALI_TOOLKIT_ALBUM_LAYOUT_H__ -#define __DALI_TOOLKIT_ALBUM_LAYOUT_H__ - -/* - * Copyright (c) 2014 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. - * - */ - -/* -Note:This layout is customized for music player application, so there are some limitations: -1.This layout can only be used with 1280x720 mode (not 720x1280); -2.Need promram in application layer to support it(EX.SetNum). -*/ - -// EXTERNAL INCLUDES -#include -#include - -// INTERNAL INCLUDES -#include - -namespace Dali -{ - -namespace Toolkit -{ - -class AlbumLayout; - -typedef IntrusivePtr AlbumLayoutPtr; - -/** - * An ItemView layout which arranges items in a album. - */ -class DALI_IMPORT_API AlbumLayout : public ItemLayout -{ -public: - - typedef boost::function ItemSizeFunction; - typedef boost::function AlbumRadiusFunction; - - /** - * Create a new album layout - */ - static AlbumLayoutPtr New(); - - /** - * Virtual destructor. - */ - virtual ~AlbumLayout(); - - /** - * Set the function used to calculate the item-size, for a given layout-size. - * @param[in] function The item-size function. - */ - void SetItemSizeFunction(ItemSizeFunction function); - - /** - * Get the function used to calculate the item-size - * @return The item-size function. - */ - ItemSizeFunction GetItemSizeFunction() const; - - /** - * Set the function used to calculate the album radius, for a given layout-size. - * @param[in] function The spiral-radius function. - */ - void SetAlbumRadiusFunction(AlbumRadiusFunction function); - - /** - * Get the function used to calculate the album radius. - * @return The album-radius function. - */ - AlbumRadiusFunction GetAlbumRadiusFunction() const; - - /** - * Set the factor used to customise the scroll speed while dragging and swiping the layout. - * @param[in] scrollSpeed The scroll speed factor. - */ - void SetScrollSpeedFactor(float scrollSpeed); - - /** - * Set the maximum swipe speed in pixels per second. - * @param[in] speed The maximum swipe speed. - */ - void SetMaximumSwipeSpeed(float speed); - - /** - * Set the duration of the flick animation in second. This is the time taken to animate each - * item to its next layout position (e.g. from 1.0 to 2.0) when a flick animation is triggered - * by a swipe gesture. - * @pre durationSeconds must be greater than zero. - * @param[in] durationSeconds The duration of flick animation in seconds. - */ - void SetItemFlickAnimationDuration(float durationSeconds); - - /** - * @copydoc ItemLayout::GetScrollSpeedFactor() - */ - virtual float GetScrollSpeedFactor() const; - - /** - * @copydoc ItemLayout::GetMaximumSwipeSpeed() - */ - virtual float GetMaximumSwipeSpeed() const; - - /** - * @copydoc ItemLayout::GetItemFlickAnimationDuration() - */ - virtual float GetItemFlickAnimationDuration() const; - - /** - * Set the num of items. - * @param[in] num The number of items. - */ - void SetNumOfItems(int num); - - /** - * Get the num of items. - */ - int GetNumOfItems() const; - - /** - * Set the items num of stack. - * @param[in] num The number of items on the stack. - */ - void SetStackNum(int num); - - /** - * Get the items num of stack. - */ - int GetStackNum() const; - - /** - * Set the position of each item. - * @param[in] positionList The vector which contains the position for each item. - */ - void SetPosition(std::vector positionList); - - /** - * Get the position of each item. - */ - std::vector GetPosition() const; - - /** - * Set the rotation of each item. - * @param[in] rotation around X, the vector which contains the rotation for each item. - */ - void SetRotationX(float rotation); - - /** - * Set the rotation of each item. - */ - float GetRotationX() const; - - /** - * Set the rotation of each item. - * @param[in] rotationList around Z, the vector which contains the rotation for each item. - */ - void SetRotationZ(std::vector rotationList); - - /** - * Get the rotation of each item. - */ - std::vector GetRotationZ() const; - - /** - * Set the scale of each item. - * @param[in] scaleList The vector which contains the scale for each item. - */ - void SetScale(std::vector scaleList); - - /** - * Get the scale of each item. - */ - std::vector GetScale() const; - - /** - * Set the color of each item. - * @param[in] colorList The vector which contains the color for each item. - */ - void SetColor(std::vector colorList); - - /** - * Get the color of each item. - */ - std::vector GetColor() const; - - /** - * Set the position of center(selected) item. - * @param[in] pos The positon to set. - */ - void SetCenterPosition(Vector3 pos); - - - /** - * Get the position of center(selected) item. - */ - Vector3 GetCenterPosition() const; - - /** - * Set the scale of center(selected) item. - * @param[in] scale The scale to set. - */ - void SetCenterScale(float scale); - - /** - * Get the scale of center(selected) item. - */ - float GetCenterScale() const; - - /** - * Set the color of center(selected) item. - * @param[in] color The color to set. - */ - void SetCenterColor(Vector2 color); - - /** - * Get the color of center(selected) item. - */ - Vector2 GetCenterColor() const; - - /** - * Set the postion of stack item(right stack and left stack). - * @param[in] rightPos The position of right stack. - * @param[in] leftPos The position of left stack,. - */ - void SetStackPosition(Vector3 rightPos, Vector3 leftPos); - - /** - * Get the postion of right stack . - */ - Vector3 GetRightStackPosition() const; - - /** - * Get the postion of left stack . - */ - Vector3 GetLeftStackPosition() const; - - /** - * Set the scale of stack item(right stack and left stack). - * @param[in] rightScale The scale of right stack. - * @param[in] leftScale The scale of left stack,. - */ - void SetStackScale(float rightScale, float leftScale); - - /** - * Get the scale of right stack. - */ - float GetRightStackScale() const; - - /** - * Get the scale of left stack. - */ - float GetLeftStackScale() const; - - /** - * Set the color of stack item(right stack and left stack). - * @param[in] rightColor The color of right stack. - * @param[in] leftColor The color of left stack. - */ - void SetStackColor(Vector2 rightColor, Vector2 leftColor); - - /** - * Get the color of right stack. - */ - Vector2 GetRightStackColor() const; - - /** - * Get the color of left stack. - */ - Vector2 GetLeftStackColor() const; - -private: - - /** - * @copydoc ItemLayout::GetMinimumLayoutPosition() - */ - virtual float GetMinimumLayoutPosition(unsigned int numberOfItems, Vector3 layoutSize) const; - - /** - * @copydoc ItemLayout::GetClosestAnchorPosition() - */ - virtual float GetClosestAnchorPosition(float layoutPosition) const; - - /** - * @copydoc ItemLayout::GetItemScrollToPosition() - */ - virtual float GetItemScrollToPosition(unsigned int itemId) const; - - /** - * @copydoc ItemLayout::GetItemsWithinArea() - */ - virtual ItemRange GetItemsWithinArea(float firstItemPosition, Vector3 layoutSize) const; - - /** - * @copydoc ItemLayout::GetReserveItemCount() - */ - virtual unsigned int GetReserveItemCount(Vector3 layoutSize) const; - - /** - * @copydoc ItemLayout::GetItemSize() - */ - virtual bool GetItemSize(unsigned int itemId, Vector3 layoutSize, Vector3& itemSize) const; - - /** - * @copydoc ItemLayout::GetResizeAnimation() - */ - virtual void GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const; - - /** - * @copydoc ItemLayout::GetPositionConstraint() - */ - virtual bool GetPositionConstraint(unsigned int itemId, ItemLayout::Vector3Function& constraint) const; - - /** - * @copydoc ItemLayout::GetRotationConstraint() - */ - virtual bool GetRotationConstraint(unsigned int itemId, ItemLayout::QuaternionFunction& constraint) const; - - /** - * @copydoc ItemLayout::GetScaleConstraint() - */ - virtual bool GetScaleConstraint(unsigned int itemId, ItemLayout::Vector3Function& constraint) const; - - /** - * @copydoc ItemLayout::GetColorConstraint() - */ - virtual bool GetColorConstraint(unsigned int itemId, ItemLayout::Vector4Function& constraint) const; - - /** - * @copydoc ItemLayout::GetVisibilityConstraint() - */ - virtual bool GetVisibilityConstraint(unsigned int itemId, ItemLayout::BoolFunction& constraint) const; - - /** - * @copydoc ItemLayout::GetScrollDirection() - */ - virtual Degree GetScrollDirection() const; - -protected: - - /** - * Protected constructor; see also AlbumLayout::New() - */ - AlbumLayout(); - -private: - - struct Impl; - Impl* mImpl; -}; - -} // namespace Toolkit - -} // namespace Dali - -#endif // __DALI_TOOLKIT_ALBUM_LAYOUT_H__ diff --git a/base/dali-toolkit/public-api/controls/scrollable/item-view/grid-layout.cpp b/base/dali-toolkit/public-api/controls/scrollable/item-view/grid-layout.cpp index 2bb91e9..cd36304 100644 --- a/base/dali-toolkit/public-api/controls/scrollable/item-view/grid-layout.cpp +++ b/base/dali-toolkit/public-api/controls/scrollable/item-view/grid-layout.cpp @@ -311,6 +311,7 @@ struct GridLayout::Impl mTopMargin(DEFAULT_TOP_MARGIN), mBottomMargin(DEFAULT_BOTTOM_MARGIN), mSideMargin(DEFAULT_SIDE_MARGIN), + mZGap(0.f), mScrollSpeedFactor(DEFAULT_SCROLL_SPEED_FACTOR), mMaximumSwipeSpeed(DEFAULT_MAXIMUM_SWIPE_SPEED), mItemFlickAnimationDuration(DEFAULT_ITEM_FLICK_ANIMATION_DURATION), diff --git a/base/dali-toolkit/public-api/file.list b/base/dali-toolkit/public-api/file.list index 44ee7aa..60c1699 100755 --- a/base/dali-toolkit/public-api/file.list +++ b/base/dali-toolkit/public-api/file.list @@ -22,7 +22,6 @@ public_api_base_src_files = \ $(public_api_base_src_dir)/controls/scrollable/item-view/navigation-layout.cpp \ $(public_api_base_src_dir)/controls/scrollable/item-view/roll-layout.cpp \ $(public_api_base_src_dir)/controls/scrollable/item-view/spiral-layout.cpp \ - $(public_api_base_src_dir)/controls/scrollable/item-view/album-layout.cpp \ $(public_api_base_src_dir)/controls/scrollable/scrollable.cpp \ $(public_api_base_src_dir)/controls/scrollable/scroll-connector.cpp \ $(public_api_base_src_dir)/controls/scrollable/scroll-component-impl.cpp \ @@ -81,12 +80,11 @@ public_api_base_item_view_header_files = \ $(public_api_base_src_dir)/controls/scrollable/item-view/roll-layout.h \ $(public_api_base_src_dir)/controls/scrollable/item-view/spiral-layout.h \ $(public_api_base_src_dir)/controls/scrollable/item-view/navigation-layout.h \ - $(public_api_base_src_dir)/controls/scrollable/item-view/album-layout.h \ $(public_api_base_src_dir)/controls/scrollable/item-view/grid-layout.h \ $(public_api_base_src_dir)/controls/scrollable/item-view/item-factory.h \ $(public_api_base_src_dir)/controls/scrollable/item-view/item-layout.h \ $(public_api_base_src_dir)/controls/scrollable/item-view/item-view.h \ - $(public_api_base_src_dir)/controls/scrollable/item-view/item-view-declarations.h + $(public_api_base_src_dir)/controls/scrollable/item-view/item-view-declarations.h public_api_base_popup_header_files = \ $(public_api_base_src_dir)/controls/popup/popup.h diff --git a/optional/dali-toolkit/dali-toolkit.h b/optional/dali-toolkit/dali-toolkit.h index 75931b3..b0a7a40 100644 --- a/optional/dali-toolkit/dali-toolkit.h +++ b/optional/dali-toolkit/dali-toolkit.h @@ -84,7 +84,6 @@ #include #include #include -#include #include #include #include