Home
last modified time | relevance | path

Searched refs:itemIndex (Results 1 – 25 of 106) sorted by relevance

12345

/ohos5.0/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/ark_prefetcher/src/prefetcher/
H A DFetchingDriver.ts233 if (this.fetches.isFetchingItem(itemIndex) || this.fetchedRegistry.has(itemIndex)) {
240 this.logger.info('to prefetch ' + itemIndex);
260 const itemIndex = this.fetches.getItem(fetchId);
263 if (itemIndex === undefined) {
269 itemIndex,
276 const itemIndex = this.fetches.getItem(fetchId);
277 if (itemIndex !== undefined) {
287 toCancel.forEach((itemIndex) => {
292 this.fetches.deleteFetchByItem(itemIndex);
295 this.logger.info('to cancel ' + itemIndex);
[all …]
H A DFetchingRangeEvaluator.ts28 itemIndex: number;
37 itemIndex: number;
41 itemIndex: number;
62 this.onItemFetched(whatHappened.itemIndex, whatHappened.fetchDuration);
68 this.onItemAdded(whatHappened.itemIndex);
71 this.onItemDeleted(whatHappened.itemIndex);
166 private onItemDeleted(itemIndex: number): void {
171 this.fetchedRegistry.removeFetched(itemIndex);
177 this.fetchedRegistry.decrementFetchedGreaterThen(itemIndex, rangeToFetch);
180 private onItemAdded(itemIndex: number): void {
[all …]
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components/indexer/
H A Dindexer_item_component.cpp103 return itemIndex; in AddIndexKey()
123 itemIndex++; in AddIndexKey()
127 itemIndex++; in AddIndexKey()
133 itemIndex++; in AddIndexKey()
139 itemIndex--; in AddIndexKey()
142 return itemIndex; in AddIndexKey()
158 itemIndex++; in AddIndexKeyForSharp()
167 itemIndex++; in AddIndexKeyForSharp()
177 itemIndex++; in AddIndexKeyForSharp()
183 itemIndex--; in AddIndexKeyForSharp()
[all …]
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/grid/grid_scroll/
H A Dgrid_scroll_with_options_layout_algorithm.cpp35 auto result = GetCrossStartAndSpan(layoutWrapper, itemIndex); in AdjustRowColSpan()
124 LayoutWrapper* layoutWrapper, int32_t itemIndex) in GetCrossStartAndSpan() argument
130 return std::make_pair(itemIndex % crossCount_, 1); in GetCrossStartAndSpan()
134 if (itemIndex < firstIrregularIndex) { in GetCrossStartAndSpan()
135 return std::make_pair(itemIndex % crossCount_, 1); in GetCrossStartAndSpan()
144 auto iter = options.irregularIndexes.upper_bound(itemIndex); in GetCrossStartAndSpan()
150 crossStart = (itemIndex - (*(--iter) + 1)) % crossCount; in GetCrossStartAndSpan()
152 crossStart = itemIndex % crossCount; in GetCrossStartAndSpan()
223 if (index >= itemIndex) { in GetCrossStartAndSpanWithUserFunction()
243 sum += ((itemIndex > lastIndex) ? (itemIndex - lastIndex - 1) : 0); in GetCrossStartAndSpanWithUserFunction()
[all …]
H A Dgrid_scroll_with_options_layout_algorithm.h40 …efPtr<LayoutWrapper>& itemLayoutWrapper, LayoutWrapper* layoutWrapper, int32_t itemIndex) override;
42 … std::pair<int32_t, int32_t> GetCrossStartAndSpan(LayoutWrapper* layoutWrapper, int32_t itemIndex);
45 int32_t itemIndex, const GridLayoutOptions& options, int32_t firstIrregularIndex);
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/list/
H A Dlist_event_hub.h125 RefPtr<UINode> FireOnItemDragStart(const ItemDragInfo& dragInfo, int32_t itemIndex) const in FireOnItemDragStart() argument
128 return AceType::DynamicCast<UINode>(onItemDragStartEvent_(dragInfo, itemIndex)); in FireOnItemDragStart()
140 …void FireOnItemDragMove(const ItemDragInfo& dragInfo, int32_t itemIndex, int32_t insertIndex) const in FireOnItemDragMove() argument
143 onItemDragMoveEvent_(dragInfo, itemIndex, insertIndex); in FireOnItemDragMove()
147 void FireOnItemDragLeave(const ItemDragInfo& dragInfo, int32_t itemIndex) const in FireOnItemDragLeave() argument
150 onItemDragLeaveEvent_(dragInfo, itemIndex); in FireOnItemDragLeave()
154 …bool FireOnItemDrop(const ItemDragInfo& dragInfo, int32_t itemIndex, int32_t insertIndex, bool isS… in FireOnItemDrop() argument
157 if (onItemMoveEvent_ && itemIndex >= 0 && insertIndex >= 0) { in FireOnItemDrop()
158 isSuccess = onItemMoveEvent_(itemIndex, insertIndex); in FireOnItemDrop()
160 onItemDropEvent_(dragInfo, itemIndex, insertIndex, isSuccess); in FireOnItemDrop()
H A Dlist_position_controller.cpp38 auto itemIndex = listPattern->GetItemIndexInGroup(x, y); in GetItemIndexInGroup() local
40 itemGroupIndex.index = itemIndex.index; in GetItemIndexInGroup()
41 itemGroupIndex.area = itemIndex.area; in GetItemIndexInGroup()
42 itemGroupIndex.indexInGroup = itemIndex.indexInGroup; in GetItemIndexInGroup()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/grid/
H A Dgrid_event_hub.cpp284 void GridEventHub::FireOnItemDragLeave(const ItemDragInfo& dragInfo, int32_t itemIndex) in FireOnItemDragLeave() argument
286 if (itemIndex == -1) { in FireOnItemDragLeave()
292 MoveItems(itemIndex, insertIndex); in FireOnItemDragLeave()
296 onItemDragLeave_(dragInfo, itemIndex); in FireOnItemDragLeave()
302 …TAG_LOGI(AceLogTag::ACE_GRID, "itemIndex:%{public}d, insertIndex:%{public}d", itemIndex, insertInd… in FireOnItemDrop()
308 … insertIndex = (itemIndex == -1 || insertIndex == -1) ? insertIndex : pattern->GetOriginalIndex(); in FireOnItemDrop()
313 onItemDrop_(dragInfo, itemIndex, insertIndex, isSuccess); in FireOnItemDrop()
323 MoveItems(itemIndex, insertIndex); in FireOnItemDragMove()
333 onItemDragMove_(dragInfo, itemIndex, insertIndex); in FireOnItemDragMove()
337 void GridEventHub::MoveItems(int32_t itemIndex, int32_t insertIndex) const in MoveItems() argument
[all …]
H A Dgrid_event_hub.h110 RefPtr<UINode> FireOnItemDragStart(const ItemDragInfo& dragInfo, int32_t itemIndex) const in FireOnItemDragStart() argument
113 return onItemDragStart_(dragInfo, itemIndex); in FireOnItemDragStart()
120 …void FireOnItemDragMove(const ItemDragInfo& dragInfo, int32_t itemIndex, int32_t insertIndex) cons…
122 void FireOnItemDragLeave(const ItemDragInfo& dragInfo, int32_t itemIndex);
124 …bool FireOnItemDrop(const ItemDragInfo& dragInfo, int32_t itemIndex, int32_t insertIndex, bool isS…
148 void MoveItems(int32_t itemIndex, int32_t insertIndex) const;
H A Dgrid_layout_info.cpp32 int32_t GridLayoutInfo::GetPositionByItemIndex(int32_t itemIndex) in GetPositionByItemIndex() argument
34 auto position = itemIndex; in GetPositionByItemIndex()
36 [itemIndex](const std::pair<int32_t, int32_t>& item) { return item.second == itemIndex; }); in GetPositionByItemIndex()
58 auto lastItemIndex = itemIndex; in MoveItemsBack()
66 gridMatrix_[mainIndex][crossIndex] = itemIndex; in MoveItemsBack()
74 positionItemIndexMap_[from] = itemIndex; in MoveItemsBack()
88 gridMatrix_[mainIndex][crossIndex] = itemIndex; in MoveItemsForward()
95 positionItemIndexMap_[to] = itemIndex; in MoveItemsForward()
99 void GridLayoutInfo::SwapItems(int32_t itemIndex, int32_t insertIndex) in SwapItems() argument
104 if (itemIndex == -1) { in SwapItems()
[all …]
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components/list/
H A Dlist_watch_layout_manager.cpp40 int32_t itemIndex = GetIndexByPosition(head_); in PerformLayout() local
41 renderList_.RecycleHead(itemIndex - 1); // Recycle head items. in PerformLayout()
42 double curMainSize = GetItemPosition(itemIndex); in PerformLayout()
44 auto itemChild = renderList_.GetChildByIndex(itemIndex); in PerformLayout()
45 int32_t firstIndex = itemIndex; in PerformLayout()
49 if (itemIndex == ZERO_INDEX) { in PerformLayout()
54 SetChildPosition(itemChild, itemIndex, curMainSize); in PerformLayout()
55 itemPosition_[itemIndex] = curMainSize; in PerformLayout()
61 itemChild = renderList_.GetChildByIndex(++itemIndex); in PerformLayout()
63 RequestMoreItemsIfNeeded(firstIndex, itemIndex); in PerformLayout()
[all …]
H A Dgrid_layout_manager.cpp279 int32_t itemIndex = GetIndexByPosition(head_); in PerformLayout() local
280 int32_t firstIndex = itemIndex; in PerformLayout()
282 double curMainSize = GetItemPosition(itemIndex); in PerformLayout()
286 curMainSize = GetItemPosition(itemIndex); in PerformLayout()
287 ++itemIndex; in PerformLayout()
289 int32_t curGrid = GetItemGrid(itemIndex); in PerformLayout()
301 itemGrid_[itemIndex] = curGrid; in PerformLayout()
302 itemPosition_[itemIndex] = curMainSize; in PerformLayout()
316 RequestMoreItemsIfNeeded(firstIndex, itemIndex); in PerformLayout()
322 if (itemCountOfPage_ != (itemIndex - firstIndex)) { in PerformLayout()
[all …]
H A Dlist_layout_manager.cpp410 int32_t firstIndex = itemIndex; in PerformLayout()
412 double curMainSize = GetItemPosition(itemIndex); in PerformLayout()
415 auto itemChild = renderList_.GetChildByIndex(itemIndex); in PerformLayout()
417 itemChild = renderList_.GetChildByIndex(itemIndex); in PerformLayout()
418 curMainSize = GetItemPosition(itemIndex); in PerformLayout()
420 ++itemIndex; in PerformLayout()
425 if (enableChain_ && firstIndex != itemIndex) { in PerformLayout()
428 itemPosition_[itemIndex] = curMainSize; in PerformLayout()
429 SetChildPosition(itemChild, itemIndex, curMainSize); in PerformLayout()
442 RequestMoreItemsIfNeeded(firstIndex, itemIndex); in PerformLayout()
[all …]
H A Dlist_item_group_element.cpp66 int32_t itemIndex = 0; in PerformBuild() local
71 … primary != *listItemIter ? itemElement->SetIndex(++itemIndex) : itemElement->SetIndex(0); in PerformBuild()
80 … primary != *listItemIter ? itemElement->SetIndex(++itemIndex) : itemElement->SetIndex(0); in PerformBuild()
319 void ListItemGroupElement::ItemFocus(int32_t itemIndex) in ItemFocus() argument
322 if (focusIndex == itemIndex) { in ItemFocus()
331 AddItemGroupFocusIndex(itemIndex); in ItemFocus()
/ohos5.0/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/
H A DjsPrefetcher.js191 this.fetching.forEach((fetchId, itemIndex) => set.add(itemIndex));
528 onItemDeleted(itemIndex) { argument
533 this.fetchedRegistry.removeFetched(itemIndex);
538 onItemAdded(itemIndex) { argument
748 this.singleFetch = (itemIndex) => {
749 if (this.fetches.isFetchingItem(itemIndex) || this.fetchedRegistry.has(itemIndex)) {
927 if (itemIndex === undefined) {
932 itemIndex,
939 if (itemIndex !== undefined) {
948 toCancel.forEach((itemIndex) => {
[all …]
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/waterflow/layout/top_down/
H A Dwater_flow_layout_info.cpp27 if (static_cast<size_t>(itemIndex) < itemInfos_.size()) { in GetCrossIndex()
28 return itemInfos_[itemIndex].crossIdx; in GetCrossIndex()
31 auto iter = crossItems.second.find(itemIndex); in GetCrossIndex()
121 …if (static_cast<size_t>(itemIndex) < itemInfos_.size() && itemInfos_[itemIndex].crossIdx == crossI… in GetMainHeight()
122 return itemInfos_[itemIndex].mainOffset + itemInfos_[itemIndex].mainSize; in GetMainHeight()
124 auto seg = GetSegment(itemIndex); in GetMainHeight()
131 auto item = cross->second.find(itemIndex); in GetMainHeight()
141 …if (static_cast<size_t>(itemIndex) < itemInfos_.size() && itemInfos_[itemIndex].crossIdx == crossI… in GetStartMainPos()
142 return itemInfos_[itemIndex].mainOffset; in GetStartMainPos()
146 if (cross == items_[GetSegment(itemIndex)].end()) { in GetStartMainPos()
[all …]
/ohos5.0/docs/zh-cn/third-party-cases/
H A Dgriditem-drag-and-drop.md52 .onItemDragStart((event: ItemDragInfo, itemIndex: number) => {
95 … .onItemDrop((event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => {
97 this.changeIndex(itemIndex, insertIndex)
176 .onItemDragStart((event: ItemDragInfo, itemIndex: number) => {
181 //itemIndex为拖拽起始位置,insertIndex为拖拽插入位置
182 … .onItemDrop((event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => {
185 this.changeIndex(itemIndex, insertIndex)
H A DEditing-with-the-navigation-bar.md160 .onItemDragStart((event:ItemDragInfo,itemIndex:number)=>{
161 this.text = this.items[itemIndex]
164 .onItemDrop((event:ItemDragInfo,itemIndex:number,insertIndex:number,isSuccess:boolean)=>{
166 this.changeIndex(itemIndex,insertIndex)
343 .onItemDragStart((event:ItemDragInfo,itemIndex:number)=>{
344 this.text = this.items[itemIndex]
347 .onItemDrop((event:ItemDragInfo,itemIndex:number,insertIndex:number,isSuccess:boolean)=>{
349 this.changeIndex(itemIndex,insertIndex)
H A Dinteract-lists.md116 let itemIndex = this.findItemIndex(index)
117 console.log("移动元素:" + itemIndex)
118 this.scroller.scrollToIndex(itemIndex)
188 let itemIndex = this.findItemIndex(index)
189 console.log("移动元素:" + itemIndex)
190 this.scroller.scrollToIndex(itemIndex)
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/grid/grid_layout/
H A Dgrid_layout_algorithm.cpp276 int32_t itemIndex = 0; in Measure() local
302 CheckGridPlaced(itemIndex, itemRowStart, itemColStart, itemRowSpan, itemColSpan)) { in Measure()
308 while (!CheckGridPlaced(itemIndex, rowIndex, colIndex, itemRowSpan, itemColSpan)) { in Measure()
322 … PrintConflictingPositionLog(itemIndex, rect, rowIndex, colIndex, itemRowSpan, itemColSpan); in Measure()
330 ++itemIndex; in Measure()
332 gridLayoutInfo_.endIndex_ = itemIndex - 1; in Measure()
361 int32_t itemIndex = -1; in Layout() local
364 if (itemIndex == crossLine.second) { in Layout()
367 itemIndex = crossLine.second; in Layout()
368 auto wrapper = layoutWrapper->GetOrCreateChildByIndex(itemIndex); in Layout()
[all …]
/ohos5.0/base/hiviewdfx/hidumper/frameworks/native/src/executor/
H A Dlist_dumper.cpp96 for (size_t itemIndex = 0; itemIndex < line.size(); itemIndex++) { in AfterExecute() local
97 std::string item = line[itemIndex]; in AfterExecute()
99 lineIndex, itemIndex, item.c_str()); in AfterExecute()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/waterflow/layout/
H A Dwater_flow_layout_utils.cpp54 auto itemIndex = info->GetCrossIndexForNextItem(segment); in GetItemPosition() local
58 return { itemIndex.crossIndex, 0.0f }; in GetItemPosition()
60 if (itemIndex.lastItemIndex < 0) { in GetItemPosition()
61 return { itemIndex.crossIndex, info->segmentStartPos_[segment] }; in GetItemPosition()
63 auto mainHeight = info->GetMainHeight(itemIndex.crossIndex, itemIndex.lastItemIndex); in GetItemPosition()
64 return { itemIndex.crossIndex, mainHeight + mainGap }; in GetItemPosition()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_v2/grid/
H A Drender_grid_scroll.cpp842 if (itemIndex == -1) { in Rank()
854 if (itemIndex == -1) { in Rank()
881 itemIndex++; in Rank()
895 itemIndex++; in Rank()
1420 while (itemIndex <= end) { in BuildItemsBackwardByRange()
1422 ++itemIndex; in BuildItemsBackwardByRange()
1433 itemIndex++; in BuildItemsBackwardByRange()
1449 itemIndex++; in BuildItemsBackwardByRange()
1482 --itemIndex; in BuildItemsForwardByRange()
1493 --itemIndex; in BuildItemsForwardByRange()
[all …]
/ohos5.0/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/functions/
H A Djs_drag_function.h34 JSRef<JSVal> ItemDragStartExecute(const ItemDragInfo& info, int32_t itemIndex);
36 void ItemDragMoveExecute(const ItemDragInfo& info, int32_t itemIndex, int32_t insertIndex);
37 void ItemDragLeaveExecute(const ItemDragInfo& info, int32_t itemIndex);
38 …void ItemDropExecute(const ItemDragInfo& info, int32_t itemIndex, int32_t insertIndex, bool isSucc…
/ohos5.0/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/ark_component/src/
H A DArkList.ts442 class ListOnItemDragStartModifier extends ModifierWithKey<(event: ItemDragInfo, itemIndex: number) …
443 constructor(value: (event: ItemDragInfo, itemIndex: number) => void | (() => any)) {
470 class ListOnItemDragMoveModifier extends ModifierWithKey<(event: ItemDragInfo, itemIndex: number, i…
471 constructor(value: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void) {
484 class ListOnItemDragLeaveModifier extends ModifierWithKey<(event: ItemDragInfo, itemIndex: number) …
485 constructor(value: (event: ItemDragInfo, itemIndex: number) => void) {
499 …constructor(value: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolea…
789 onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => void | (() => any)): this {
797 …onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): this…
801 onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): this {
[all …]

12345