/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/waterflow/layout/top_down/ |
H A D | water_flow_layout_algorithm.cpp | 124 if (layoutInfo_->targetIndex_.has_value()) { in Measure() 154 layoutInfo_->targetIndex_.reset(); in MeasureToTarget() 160 if (layoutInfo_->targetIndex_.value() == LAST_ITEM) { in MeasureToTarget() 163 … while (layoutInfo_->targetIndex_.has_value() && (startFrom < layoutInfo_->targetIndex_.value())) { in MeasureToTarget() 167 layoutInfo_->targetIndex_.reset(); in MeasureToTarget() 194 layoutInfo_->targetIndex_.reset(); in MeasureToTarget() 444 const auto sub = layoutInfo_->targetIndex_; in PreloadItem() 445 layoutInfo_->targetIndex_ = itemIdx; in PreloadItem() 447 layoutInfo_->targetIndex_ = sub; in PreloadItem() 465 layoutInfo_->targetIndex_ = itemIdx; in SyncPreloadItem() [all …]
|
H A D | water_flow_segmented_layout.cpp | 66 } else if (info_->targetIndex_) { in Measure() 67 MeasureToTarget(*info_->targetIndex_, std::nullopt); in Measure() 68 info_->targetIndex_.reset(); in Measure()
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/swiper/ |
H A D | swiper_layout_algorithm.cpp | 462 targetIndex_ = GetLoopIndex(targetIndex_.value()); in MeasureSwiper() 501 if ((targetIndex_.has_value() && targetIndex_.value() >= startIndexInVisibleWindow) in MeasureSwiper() 517 targetIndex_ = in MeasureSwiper() 527 targetIndex_ = in MeasureSwiper() 641 if (targetIndex_ && currentIndex == targetIndex_.value()) { in LayoutBackwardItem() 709 if (targetIndex_) { in LayoutForward() 738 if (targetIndex_ && currentIndex >= targetIndex_.value()) { in LayoutForward() 740 targetIndex_.reset(); in LayoutForward() 743 || (targetIndex_ && currentIndex < targetIndex_.value())); in LayoutForward() 841 if (targetIndex_) { in LayoutBackward() [all …]
|
H A D | swiper_pattern.cpp | 178 } else if (targetIndex_) { in CreateLayoutAlgorithm() 529 targetIndex_.reset(); in BeforeCreateLayoutWrapper() 995 if (!targetIndex_) { in OnDirtyLayoutWrapperSwap() 1059 } else if (targetIndex_) { in OnDirtyLayoutWrapperSwap() 1658 targetIndex_ = targetIndex; in SwipeTo() 1834 if (targetIndex_.has_value() && targetIndex_.value() == targetIndex) { in ChangeIndex() 2447 targetIndex_.reset(); in SpringOverScroll() 3090 if (targetIndex_) { in PlayPropertyTranslateAnimation() 3230 targetIndex_.reset(); in OnPropertyTranslateAnimationFinish() 3278 targetIndex_.reset(); in StopPropertyTranslateAnimation() [all …]
|
H A D | swiper_layout_algorithm.h | 136 targetIndex_ = targetIndex; in SetTargetIndex() 388 std::optional<int32_t> targetIndex_; variable
|
/ohos5.0/foundation/arkui/ace_engine/test/unittest/core/pattern/swiper/ |
H A D | swiper_layout_test_ng.cpp | 348 pattern_->targetIndex_ = 1; 449 swiperLayoutAlgorithm->targetIndex_ = 1; 483 swiperLayoutAlgorithm->targetIndex_ = 1; 566 swiperLayoutAlgorithm->targetIndex_ = 1; 627 swiperLayoutAlgorithm->targetIndex_ = 1; 1002 swiperLayoutAlgorithm->targetIndex_ = 1; 1020 pattern_->targetIndex_ = 1; 1144 swiperLayoutAlgorithm->targetIndex_ = 1; 1222 swiperLayoutAlgorithm->targetIndex_ = 1; 1270 swiperLayoutAlgorithm->targetIndex_ = 1; [all …]
|
H A D | swiper_event_test_ng.cpp | 142 EXPECT_EQ(pattern_->targetIndex_, 0); 349 EXPECT_FALSE(pattern_->targetIndex_.has_value()); 384 EXPECT_FALSE(pattern_->targetIndex_.has_value()); 678 pattern_->targetIndex_ = 1; 682 pattern_->targetIndex_.reset(); 779 EXPECT_EQ(pattern_->targetIndex_, 0); 1112 pattern_->targetIndex_ = 1;
|
H A D | swiper_test_ng.cpp | 232 pattern_->targetIndex_ = 1; 506 EXPECT_EQ(pattern_->targetIndex_, 1); 530 EXPECT_EQ(pattern_->targetIndex_, 3); 538 EXPECT_FALSE(pattern_->targetIndex_.has_value()); 551 EXPECT_FALSE(pattern_->targetIndex_.has_value()); 555 EXPECT_FALSE(pattern_->targetIndex_.has_value());
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/list/ |
H A D | list_layout_algorithm.cpp | 771 if (targetIndex_) { in MeasureList() 774 } else if ((targetIndex_.value() < 0) || (targetIndex_.value() >= totalItemCount_)) { in MeasureList() 775 targetIndex_.reset(); in MeasureList() 777 targetIndexStaged_ = targetIndex_; in MeasureList() 835 } else if (targetIndex_.has_value()) { in MeasureList() 1039 if (forwardFeature_ && targetIndex_ && NonNegative(targetIndex_.value())) { in LayoutForward() 1056 if (forwardFeature_ && targetIndex_ && currentIndex >= targetIndex_.value()) { in LayoutForward() 1126 if (backwardFeature_ && targetIndex_ && NonNegative(targetIndex_.value())) { in LayoutBackward() 1142 if (backwardFeature_ && targetIndex_ && LessOrEqual(currentIndex, targetIndex_.value())) { in LayoutBackward() 1668 if (groupNeedAllLayout || (targetIndex_ && targetIndex_.value() == index) || in SetListItemGroupParam() [all …]
|
H A D | list_pattern.cpp | 158 if (targetIndex_) { in OnDirtyLayoutWrapperSwap() 159 AnimateToTarget(targetIndex_.value(), targetIndexInGroup_, scrollAlign_); in OnDirtyLayoutWrapperSwap() 162 targetIndex_.reset(); in OnDirtyLayoutWrapperSwap() 591 if (targetIndex_) { in CreateLayoutAlgorithm() 592 listLayoutAlgorithm->SetTargetIndex(targetIndex_.value()); in CreateLayoutAlgorithm() 1320 targetIndex_.reset(); in ScrollTo() 1339 targetIndex_ = index; in ScrollToIndex() 1388 targetIndex_ = index; in ScrollToItemInGroup() 1473 if (targetIndex_.has_value()) { in GetListItemGroupAnimatePosWithoutIndexInGroup() 2495 if (targetIndex_.has_value()) { in DumpAdvanceInfo() [all …]
|
H A D | list_item_group_layout_algorithm.h | 200 targetIndex_ = index; in SetTargetIndex() 463 std::optional<int32_t> targetIndex_; variable
|
H A D | list_item_group_layout_algorithm.cpp | 462 if (targetIndex_) { in MeasureListItem() 876 if (targetIndex_ && GreatOrEqual(startIndex, targetIndex_.value())) { in MeasureForward() 879 targetIndex_.reset(); in MeasureForward() 915 if (targetIndex_ && LessOrEqual(endIndex, targetIndex_.value())) { in MeasureBackward() 918 targetIndex_.reset(); in MeasureBackward()
|
H A D | list_layout_algorithm.h | 137 targetIndex_ = index; in SetTargetIndex() 531 std::optional<int32_t> targetIndex_; variable
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/waterflow/ |
H A D | water_flow_pattern.cpp | 161 if (targetIndex_.has_value()) { in CreateLayoutAlgorithm() 162 layoutInfo_->targetIndex_ = targetIndex_; in CreateLayoutAlgorithm() 312 if (targetIndex_.has_value()) { in OnDirtyLayoutWrapperSwap() 313 ScrollToTargetIndex(targetIndex_.value()); in OnDirtyLayoutWrapperSwap() 314 targetIndex_.reset(); in OnDirtyLayoutWrapperSwap() 319 layoutInfo_->targetIndex_.reset(); in OnDirtyLayoutWrapperSwap() 534 targetIndex_ = index; in ScrollToIndex()
|
H A D | water_flow_pattern.h | 236 std::optional<int32_t> targetIndex_; variable
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/tabs/ |
H A D | tab_bar_layout_algorithm.cpp | 353 if (targetIndex_) { in MeasureVisibleItems() 354 targetIndex_ = targetIndex_.value() % childCount_; in MeasureVisibleItems() 372 if (GreatOrEqual(visibleItemLength_[targetIndex_.value()], endMainPos_ - startMainPos_)) { in MeasureTargetIndex() 379 auto iter = visibleItemPosition_.find(targetIndex_.value()); in MeasureTargetIndex() 383 auto space = ((endMainPos_ - startMainPos_) - visibleItemLength_[targetIndex_.value()]) / TWO; in MeasureTargetIndex() 483 (targetIndex_ && endIndex <= targetIndex_.value()))) { in LayoutForward() 492 !targetIndex_.has_value()) { in LayoutForward() 508 isBarAdaptiveHeight_ || (targetIndex_ && startIndex >= targetIndex_.value()))) { in LayoutBackward() 517 !targetIndex_.has_value()) { in LayoutBackward()
|
H A D | tab_bar_layout_algorithm.h | 70 targetIndex_ = targetIndex; in SetTargetIndex() 139 std::optional<int32_t> targetIndex_; variable
|
H A D | tab_bar_pattern.h | 152 if (targetIndex_) { in CreateLayoutAlgorithm() 153 layoutAlgorithm->SetTargetIndex(targetIndex_); in CreateLayoutAlgorithm() 646 std::optional<int32_t> targetIndex_; variable
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components/swiper/ |
H A D | render_swiper.cpp | 1099 targetIndex_ = toIndex; in MoveItems() 1100 nextIndex_ = targetIndex_; in MoveItems() 1109 targetIndex_ = toIndex; in MoveItems() 1110 nextIndex_ = targetIndex_; in MoveItems() 1273 targetIndex_ = toIndex; in AddSwipeToTranslateListener() 1326 targetIndex_ = toIndex; in AddSwipeToIndicatorListener() 1426 if (toIndex == targetIndex_) { in RedoSwipeToAnimation() 1627 targetIndex_ = toIndex; in UpdateScrollPosition() 2494 targetIndex_ = toIndex; in MoveIndicator() 2797 currentIndex_ = targetIndex_; in FinishAllSwipeAnimation() [all …]
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/grid/irregular/ |
H A D | grid_irregular_layout_algorithm.cpp | 43 if (info_.targetIndex_) { in Measure() 45 info_.targetIndex_.reset(); in Measure() 595 if (info_.targetIndex_ < info_.startIndex_) { in MeasureToTarget() 596 auto it = info_.FindInMatrix(*info_.targetIndex_); in MeasureToTarget() 599 filler.FillToTarget(param, *info_.targetIndex_, info_.startMainLineIndex_); in MeasureToTarget()
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_v2/list/ |
H A D | render_list.cpp | 857 if (beforeSelectedItem && targetIndex_ == index) { in SetItemsPositionForLaneList() 865 targetIndex_ = beforeSelectedItem ? index : index - 1; in SetItemsPositionForLaneList() 873 targetIndex_ = beforeSelectedItem ? index + 1 : index; in SetItemsPositionForLaneList() 976 if (beforeSelectedItem && targetIndex_ == index) { in SetItemsPosition() 984 targetIndex_ = beforeSelectedItem ? index : index - 1; in SetItemsPosition() 992 targetIndex_ = beforeSelectedItem ? index + 1 : index; in SetItemsPosition() 1700 targetIndex_ = GetIndexByListItem(item); in OnItemSelect() 1701 selectedItemIndex_ = targetIndex_; in OnItemSelect() 2387 if (!canceled && targetIndex_ != selectedItemIndex_) { in OnSelectedItemStopMoving() 2389 auto to = static_cast<int32_t>(targetIndex_); in OnSelectedItemStopMoving() [all …]
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_v2/water_flow/ |
H A D | render_water_flow.cpp | 479 if (targetIndex_ >= 0 && static_cast<size_t>(targetIndex_) == startIndex) { in SupplyItems() 484 targetIndex_ = -1; in SupplyItems() 820 targetIndex_ = index; in ScrollToIndex() 1248 if (targetIndex_ >= 0) { in GetTargetPos() 1249 auto iter = flowMatrix_.find(targetIndex_); in GetTargetPos()
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/waterflow/layout/ |
H A D | water_flow_layout_info_base.h | 202 std::optional<int32_t> targetIndex_; variable
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/grid/ |
H A D | grid_pattern.cpp | 67 if (targetIndex_.has_value()) { in CreateLayoutAlgorithm() 68 gridLayoutInfo_.targetIndex_ = targetIndex_; in CreateLayoutAlgorithm() 1945 targetIndex_ = index; in ScrollToIndex() 1972 if (targetIndex_.has_value()) { in AnimateToTarget() 1974 targetIndex_.reset(); in AnimateToTarget() 1990 auto size = GridLayoutUtils::GetItemSize(&gridLayoutInfo_, RawPtr(host), *targetIndex_); in AnimateToTargetImpl() 1991 … targetPos = gridLayoutInfo_.GetAnimatePosIrregular(*targetIndex_, size.rows, align, mainGap); in AnimateToTargetImpl() 2000 gridLayoutInfo_, *targetIndex_, align, mainGap, targetPos); in AnimateToTargetImpl()
|
H A D | grid_layout_info.h | 407 std::optional<int32_t> targetIndex_; member
|