Home
last modified time | relevance | path

Searched refs:itemIdx (Results 1 – 24 of 24) sorted by relevance

/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/grid/irregular/
H A Dgrid_irregular_filler.cpp33 return info_->FindEndIdx(lineIdx - 1).itemIdx; in InitPos()
225 SetItemInfo(itemIdx, row, col, itemSize); in MeasureItem()
241 return res.itemIdx; in InitPosToLastItem()
312 for (const auto& [c, itemIdx] : it->second) { in MeasureLineWithIrregulars()
313 if (itemIdx == 0) { in MeasureLineWithIrregulars()
317 if (itemIdx < 0 && !visited.count(std::abs(itemIdx))) { in MeasureLineWithIrregulars()
320 visited.insert(std::abs(itemIdx)); in MeasureLineWithIrregulars()
337 const int32_t itemIdx = std::abs(colIt.second); in BackwardImpl() local
338 if (measured.count(itemIdx)) { in BackwardImpl()
343 MeasureItem(params, itemIdx, c, topRow, false); in BackwardImpl()
[all …]
H A Dgrid_layout_range_solver.cpp75 … return { res.row, res.idx, res.pos, jumpLineIdx, info_->FindEndIdx(jumpLineIdx).itemIdx }; in FindRangeOnJump()
118 return { it->first, info_->FindEndIdx(it->first).itemIdx }; in SolveForwardForEndIdx()
175 const int32_t itemIdx = std::abs(it->second); in CheckMultiRow() local
176 if (opts_->irregularIndexes.find(itemIdx) != opts_->irregularIndexes.end()) { in CheckMultiRow()
178 auto size = opts_->getSizeByIndex(itemIdx); in CheckMultiRow()
H A Dgrid_irregular_layout_algorithm.cpp427 for (const auto& [c, itemIdx] : row) { in LayoutChildren()
428 if (itemIdx < 0 || (itemIdx == 0 && (it->first > 0 || c > 0))) { in LayoutChildren()
432 auto child = wrapper_->GetChildByIndex(itemIdx, isCache); in LayoutChildren()
588 return std::max(0, info.FindEndIdx(line).itemIdx); in SkipLinesBackward()
649 const RefPtr<FrameNode>& host, int32_t itemIdx) { in PreloadItems() argument
657 const auto pos = info.GetItemPos(itemIdx); in PreloadItems()
660 itemIdx, pos.first, pos.second, true) in PreloadItems()
663 auto item = DynamicCast<FrameNode>(host->GetChildByIndex(itemIdx, true)); in PreloadItems()
H A Dgrid_irregular_filler.h137 const FillParameters& params, int32_t itemIdx, int32_t col, int32_t row, bool isCache);
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/waterflow/layout/
H A Dwater_flow_layout_info_base.cpp34 int32_t WaterFlowLayoutInfoBase::GetSegment(int32_t itemIdx) const in GetSegment()
36 if (segmentTails_.empty() || itemIdx < 0) { in GetSegment()
39 auto cache = segmentCache_.find(itemIdx); in GetSegment()
44 auto it = std::lower_bound(segmentTails_.begin(), segmentTails_.end(), itemIdx); in GetSegment()
49 segmentCache_[itemIdx] = idx; in GetSegment()
H A Dwater_flow_layout_algorithm_base.h39 virtual bool PreloadItem(LayoutWrapper* host, int32_t itemIdx, int64_t deadline) = 0;
63 virtual void SyncPreloadItem(LayoutWrapper* host, int32_t itemIdx) = 0;
H A Dwater_flow_layout_info_base.h157 int32_t GetSegment(int32_t itemIdx) const;
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/waterflow/layout/sliding_window/
H A Dwater_flow_layout_info_sw.cpp74 if (!ItemInView(itemIdx)) { in DistanceToTop()
77 const auto* lane = GetLane(itemIdx); in DistanceToTop()
81 if (item.idx == itemIdx) { in DistanceToTop()
91 if (!ItemInView(itemIdx)) { in DistanceToBottom()
94 const auto* lane = GetLane(itemIdx); in DistanceToBottom()
98 if (item->idx == itemIdx) { in DistanceToBottom()
782 Lane* WaterFlowLayoutInfoSW::GetMutableLane(int32_t itemIdx) in GetMutableLane() argument
784 return const_cast<Lane*>(GetLane(itemIdx)); in GetMutableLane()
789 if (!idxToLane_.count(itemIdx)) { in GetLane()
793 size_t laneIdx = idxToLane_.at(itemIdx); in GetLane()
[all …]
H A Dwater_flow_layout_sw.h40 bool PreloadItem(LayoutWrapper* host, int32_t itemIdx, int64_t deadline) override;
160 bool RecoverCachedHelper(int32_t itemIdx, bool front);
184 void SyncPreloadItem(LayoutWrapper* host, int32_t itemIdx) override;
189 bool PreloadItemImpl(int32_t itemIdx);
H A Dwater_flow_layout_sw.cpp775 bool WaterFlowLayoutSW::PreloadItem(LayoutWrapper* host, int32_t itemIdx, int64_t deadline) in PreloadItem() argument
782 return PreloadItemImpl(itemIdx); in PreloadItem()
785 void WaterFlowLayoutSW::SyncPreloadItem(LayoutWrapper* host, int32_t itemIdx) in SyncPreloadItem() argument
787 PreloadItemImpl(itemIdx); in SyncPreloadItem()
800 bool WaterFlowLayoutSW::PreloadItemImpl(int32_t itemIdx) in PreloadItemImpl() argument
804 if (itemIdx < start) { in PreloadItemImpl()
805 FillFront(-FLT_MAX, start - 1, itemIdx); in PreloadItemImpl()
806 } else if (itemIdx > end) { in PreloadItemImpl()
807 FillBack(FLT_MAX, end + 1, itemIdx); in PreloadItemImpl()
H A Dwater_flow_layout_info_sw.h212 const Lane* GetLane(int32_t itemIdx) const;
213 Lane* GetMutableLane(int32_t itemIdx);
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/waterflow/layout/top_down/
H A Dwater_flow_segmented_layout.cpp527 bool WaterFlowSegmentedLayout::PreloadItem(LayoutWrapper* host, int32_t itemIdx, int64_t deadline) in PreloadItem() argument
530 if (itemIdx < static_cast<int32_t>(info_->itemInfos_.size())) { in PreloadItem()
531 return host->GetOrCreateChildByIndex(itemIdx, false, true); in PreloadItem()
533 MeasureToTarget(itemIdx, deadline, true); in PreloadItem()
537 void WaterFlowSegmentedLayout::SyncPreloadItem(LayoutWrapper* host, int32_t itemIdx) in SyncPreloadItem() argument
539 if (itemIdx >= static_cast<int32_t>(info_->itemInfos_.size())) { in SyncPreloadItem()
540 MeasureToTarget(itemIdx, std::nullopt, true); in SyncPreloadItem()
542 int32_t seg = info_->GetSegment(itemIdx); in SyncPreloadItem()
544 itemIdx, info_->itemInfos_[itemIdx].crossIdx, in SyncPreloadItem()
545 WaterFlowLayoutUtils::GetUserDefHeight(sections_, seg, itemIdx), false); in SyncPreloadItem()
H A Dwater_flow_layout_algorithm.cpp438 bool WaterFlowLayoutAlgorithm::PreloadItem(LayoutWrapper* host, int32_t itemIdx, int64_t deadline) in PreloadItem() argument
441 if (itemIdx <= lastItem) { in PreloadItem()
442 return host->GetOrCreateChildByIndex(itemIdx, false, true); in PreloadItem()
445 layoutInfo_->targetIndex_ = itemIdx; in PreloadItem()
451 void WaterFlowLayoutAlgorithm::SyncPreloadItem(LayoutWrapper* host, int32_t itemIdx) in SyncPreloadItem() argument
454 if (itemIdx <= lastItem) { in SyncPreloadItem()
455 auto pos = GetItemPosition(itemIdx); in SyncPreloadItem()
456 auto item = host->GetOrCreateChildByIndex(GetChildIndexWithFooter(itemIdx)); in SyncPreloadItem()
465 layoutInfo_->targetIndex_ = itemIdx; in SyncPreloadItem()
H A Dwater_flow_layout_algorithm.h40 bool PreloadItem(LayoutWrapper* host, int32_t itemIdx, int64_t deadline) override;
56 void SyncPreloadItem(LayoutWrapper* host, int32_t itemIdx) override;
H A Dwater_flow_segmented_layout.h70 bool PreloadItem(LayoutWrapper* host, int32_t itemIdx, int64_t deadline) override;
164 void SyncPreloadItem(LayoutWrapper* host, int32_t itemIdx) override;
H A Dwater_flow_layout_info.cpp401 void WaterFlowLayoutInfo::SetNextSegmentStartPos(int32_t itemIdx) in SetNextSegmentStartPos() argument
403 auto segment = static_cast<size_t>(GetSegment(itemIdx)); in SetNextSegmentStartPos()
412 while (segment < segmentTails_.size() - 1 && itemIdx == segmentTails_[segment]) { in SetNextSegmentStartPos()
H A Dwater_flow_layout_info.h169 void SetNextSegmentStartPos(int32_t itemIdx);
/ohos5.0/foundation/arkui/ace_engine_lite/frameworks/src/core/components/
H A Dlist_adapter.cpp251 JSValue itemIdx = jerry_create_number(index - startIndex); in GetElement() local
253 JSValue args[argsLen] = {item, itemIdx}; in GetElement()
258 ReleaseJerryValue(item, itemIdx, renderPropValue, VA_ARG_END_FLAG); in GetElement()
264 ReleaseJerryValue(item, itemIdx, renderPropValue, nativeElement, VA_ARG_END_FLAG); in GetElement()
278 ReleaseJerryValue(item, itemIdx, renderPropValue, VA_ARG_END_FLAG); in GetElement()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/grid/
H A Dgrid_layout_info.cpp247 maxIdx = std::max(maxIdx, FindEndIdx(endLine).itemIdx); in FindItemCount()
409 …float itemRatio = static_cast<float>(FindEndIdx(lastKnownLine).itemIdx + 1) / static_cast<float>(c… in GetIrregularHeight()
534 int32_t itemIdx, int32_t height, float mainSize, float mainGap) const in TransformAutoScrollAlign() argument
536 if (itemIdx >= startIndex_ && itemIdx <= endIndex_) { in TransformAutoScrollAlign()
537 auto [line, _] = FindItemInRange(itemIdx); in TransformAutoScrollAlign()
553 if (itemIdx > endIndex_) { in TransformAutoScrollAlign()
728 std::pair<int32_t, int32_t> GridLayoutInfo::GetItemPos(int32_t itemIdx) const in GetItemPos()
730 auto it = FindInMatrix(itemIdx); in GetItemPos()
735 if (col.second == itemIdx) { in GetItemPos()
755 return { .itemIdx = cell->second, .y = rIt->first, .x = cell->first }; in FindEndIdx()
[all …]
H A Dgrid_layout_info.h53 using BuildGridItemCallback = std::function<bool(const RefPtr<FrameNode>& host, int32_t itemIdx)>;
158 int32_t itemIdx = -1; /**< Index of the last item. */ member
208 std::pair<int32_t, int32_t> GetItemPos(int32_t itemIdx) const;
335 …ScrollAlign TransformAutoScrollAlign(int32_t itemIdx, int32_t height, float mainSize, float mainGa…
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/waterflow/
H A Dwater_flow_pattern.cpp739 int32_t itemIdx = idx - footerOffset; in GetNextFocusNode() local
740 if (itemIdx >= layoutInfo_->endIndex_ || itemIdx <= layoutInfo_->startIndex_) { in GetNextFocusNode()
741 ScrollToIndex(itemIdx, false, ScrollAlign::AUTO); in GetNextFocusNode()
/ohos5.0/foundation/arkui/ace_engine/test/unittest/core/pattern/waterflow/
H A Dwater_flow_test_ng.cpp1807 for (auto&& itemIdx : preloadList) {
1809 if (!pattern_->preloadItems_.empty() && itemIdx == *pattern_->preloadItems_.begin()) {
1812 EXPECT_TRUE(GetChildFrameNode(frameNode_, itemIdx));
1813 EXPECT_EQ(GetChildHeight(frameNode_, itemIdx), itemIdx % 2 ? 100.0f : 200.0f);
1814 EXPECT_EQ(GetChildWidth(frameNode_, itemIdx), (WATER_FLOW_WIDTH - 10.0f) / 2.0f);
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/grid/grid_scroll/
H A Dgrid_scroll_layout_algorithm.h166 …static bool PredictBuildItem(FrameNode& host, int32_t itemIdx, const GridPredictLayoutParam& param…
H A Dgrid_scroll_layout_algorithm.cpp110 const RefPtr<FrameNode>& host, int32_t itemIdx) { in Measure() argument
112 return PredictBuildItem(*host, itemIdx, param); in Measure()
2082 bool GridScrollLayoutAlgorithm::PredictBuildItem(FrameNode& host, int32_t itemIdx, const GridPredic… in PredictBuildItem() argument
2085 auto wrapper = host.GetOrCreateChildByIndex(itemIdx, false, true); in PredictBuildItem()