/foundation/arkui/ace_engine/test/unittest/core/pattern/grid/ |
H A D | grid_layout_test_ng.cpp | 40 float itemWidth = 100.f; in HWTEST_F() local 47 CreateGridItems(10, itemWidth, ITEM_HEIGHT); in HWTEST_F() 54 int32_t colsNumber = 4; // 4 * 100(itemWidth) < 480(gridWidth) in HWTEST_F() 57 float offsetX = index % colsNumber * itemWidth; in HWTEST_F() 59 RectF expectRect = RectF(offsetX, offsetY, itemWidth, ITEM_HEIGHT); in HWTEST_F() 250 float itemWidth = 120.f; in HWTEST_F() local 255 CreateGridItems(12, itemWidth, ITEM_HEIGHT); in HWTEST_F() 258 int32_t colsNumber = 4; // 4 * 120(itemWidth) = 480(gridWidth) in HWTEST_F() 261 float offsetX = GRID_WIDTH - index % colsNumber * itemWidth - itemWidth; in HWTEST_F() 275 float itemWidth = 100.f; HWTEST_F() local 307 float itemWidth = 100.f; HWTEST_F() local 340 float itemWidth = 100.f; HWTEST_F() local 372 float itemWidth = 100.f; HWTEST_F() local 405 float itemWidth = 80.0f; HWTEST_F() local [all...] |
H A D | grid_cache_layout_test_ng.cpp | 120 float itemWidth = 160.f; in HWTEST_F() local 124 float offsetX = index % colsNumber * itemWidth; in HWTEST_F() 126 RectF expectRect = RectF(offsetX, offsetY, itemWidth, ITEM_HEIGHT); in HWTEST_F()
|
H A D | grid_scroll_layout_test_ng.cpp | 986 float itemWidth = 120.0f; in HWTEST_F() local 996 float offsetX = GRID_WIDTH - index % colsNumber * itemWidth - itemWidth; in HWTEST_F() 998 RectF expectRect = RectF(offsetX, offsetY, itemWidth, ITEM_HEIGHT); in HWTEST_F() 1010 float itemWidth = 120.0f; in HWTEST_F() local 1020 float offsetX = GRID_WIDTH - floor(index / rowsNumber) * itemWidth - itemWidth; in HWTEST_F() 1022 RectF expectRect = RectF(offsetX, offsetY, itemWidth, ITEM_HEIGHT); in HWTEST_F() 1116 float itemWidth = 80.0f; in HWTEST_F() local 1122 CreateGridItems(25, itemWidth, itemHeigh in HWTEST_F() 1145 float itemWidth = 80.0f; HWTEST_F() local [all...] |
H A D | grid_attr_test_ng.cpp | 333 float itemWidth = 90.f; in HWTEST_F() local 334 int32_t cols = floor(GRID_WIDTH / itemWidth); // 5 in HWTEST_F() 336 EXPECT_EQ(GetChildWidth(frameNode_, 0), itemWidth); in HWTEST_F() local 553 * @tc.cases: Set LayoutDirection ROW_REVERSE, set minCount maxCount, set bigger itemWidth in HWTEST_F() 557 float itemWidth = GRID_WIDTH / minCount + 100.f; // greater than half of GRID_WIDTH in HWTEST_F() local 563 CreateGridItems(10, itemWidth, ITEM_HEIGHT); in HWTEST_F()
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/tabs/ |
H A D | tab_bar_layout_test_ng.cpp | 974 auto itemWidth = (TABS_WIDTH - margin * 2) / TABCONTENT_NUMBER; in HWTEST_F() local 977 EXPECT_EQ(tabBarPattern_->visibleItemPosition_.begin()->second.endPos, margin + itemWidth); in HWTEST_F() 979 EXPECT_EQ(tabBarPattern_->visibleItemPosition_.rbegin()->second.startPos, TABS_WIDTH - margin - itemWidth); in HWTEST_F() 991 itemWidth = TABS_WIDTH / 2 / TABCONTENT_NUMBER; in HWTEST_F() 994 EXPECT_EQ(tabBarPattern_->visibleItemPosition_.begin()->second.endPos, TABS_WIDTH / TABCONTENT_NUMBER + itemWidth); in HWTEST_F() 997 TABS_WIDTH / TABCONTENT_NUMBER * 3 - itemWidth); in HWTEST_F() 1035 auto itemWidth = 200.0f; in HWTEST_F() local 1038 ViewAbstract::SetWidth(AceType::RawPtr(child), CalcLength(itemWidth)); in HWTEST_F() 1050 EXPECT_EQ(tabBarPattern_->visibleItemPosition_.rbegin()->second.endPos, margin + itemWidth * 3); in HWTEST_F() 1081 EXPECT_EQ(tabBarPattern_->visibleItemPosition_.rbegin()->second.endPos, itemWidth * in HWTEST_F() 1101 auto itemWidth = 300.0f; HWTEST_F() local 1155 auto itemWidth = 300.0f; HWTEST_F() local 1218 auto itemWidth = 300.0f; HWTEST_F() local 1286 auto itemWidth = 300.0f; HWTEST_F() local 1345 auto itemWidth = 800.0f; HWTEST_F() local 1498 auto itemWidth = TABS_WIDTH / 2 / childCount; HWTEST_F() local [all...] |
H A D | tabs_common_test_ng.cpp | 196 auto itemWidth = 200.0f; in HWTEST_F() local 199 ViewAbstract::SetWidth(AceType::RawPtr(child), CalcLength(itemWidth)); in HWTEST_F() 284 auto itemWidth = 200.0f; in HWTEST_F() local 287 ViewAbstract::SetWidth(AceType::RawPtr(child), CalcLength(itemWidth)); in HWTEST_F()
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/swiper/ |
H A D | swiper_common_test_ng.cpp | 698 const float itemWidth = (SWIPER_WIDTH - PRE_MARGIN - NEXT_MARGIN) / displayCount; in HWTEST_F() local 714 EXPECT_EQ(GetChildX(frameNode_, 1), itemWidth); in HWTEST_F() local 715 EXPECT_EQ(GetChildX(frameNode_, 2), itemWidth * 2); in HWTEST_F() 716 EXPECT_EQ(GetChildX(frameNode_, 3), itemWidth * 3); in HWTEST_F() 724 EXPECT_EQ(GetChildX(frameNode_, 0), PRE_MARGIN - itemWidth); in HWTEST_F() 726 EXPECT_EQ(GetChildX(frameNode_, 2), PRE_MARGIN + itemWidth); in HWTEST_F() local 727 EXPECT_EQ(GetChildX(frameNode_, 3), PRE_MARGIN + itemWidth * 2); in HWTEST_F() 728 EXPECT_EQ(GetChildX(frameNode_, 4), PRE_MARGIN + itemWidth * 3); in HWTEST_F() 736 EXPECT_EQ(GetChildX(frameNode_, 1), PRE_MARGIN + NEXT_MARGIN - itemWidth); in HWTEST_F() 738 EXPECT_EQ(GetChildX(frameNode_, 3), PRE_MARGIN + NEXT_MARGIN + itemWidth); in HWTEST_F() local 753 const float itemWidth = (SWIPER_WIDTH - PRE_MARGIN - NEXT_MARGIN) / displayCount; HWTEST_F() local [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/swiper_indicator/dot_indicator/ |
H A D | dot_indicator_paint_method.cpp | 156 auto itemWidth = static_cast<float>(paintProperty->GetItemWidthValue(swiperTheme->GetSize()).ConvertToPx()); in PaintHoverIndicator() local 164 itemHalfSizes.emplace_back(itemWidth * 0.5 * INDICATOR_ZOOM_IN_SCALE); in PaintHoverIndicator() 246 auto itemWidth = static_cast<float>(paintProperty->GetItemWidthValue(swiperTheme->GetSize()).ConvertToPx()); in PaintPressIndicator() local 253 auto itemHalfWidth = itemWidth * 0.5 * INDICATOR_ZOOM_IN_SCALE; in PaintPressIndicator() 280 auto itemWidth = itemHalfSizes[ITEM_HALF_WIDTH] * 2; in CalculateNormalMargin() local 284 auto allPointDiameterSum = itemWidth * static_cast<float>(displayCount + 1); in CalculateNormalMargin() 286 allPointDiameterSum = itemWidth * static_cast<float>(displayCount - 1) + selectedItemWidth; in CalculateNormalMargin() 319 auto itemWidth = itemHalfSizes[ITEM_HALF_WIDTH] * TWOFOLD; in CalculatePointCenterX() local 321 float allPointDiameterSum = itemWidth * static_cast<float>(itemCount_ + 1); in CalculatePointCenterX() 323 allPointDiameterSum = itemWidth * static_cas in CalculatePointCenterX() 347 auto itemWidth = static_cast<float>(paintProperty->GetItemWidthValue(swiperTheme->GetSize()).ConvertToPx()); CalculateLongPointCenterX() local 486 auto itemWidth = static_cast<float>(paintProperty->GetItemWidthValue(swiperTheme->GetSize()).ConvertToPx()); UpdateBackground() local 675 auto itemWidth = itemHalfSizes[ITEM_HALF_WIDTH] * TWOFOLD; ForwardCalculation() local 729 auto itemWidth = itemHalfSizes[ITEM_HALF_WIDTH] * TWOFOLD; BackwardCalculation() local [all...] |
H A D | overlength_dot_indicator_paint_method.cpp | 125 auto itemWidth = itemHalfSizes[ITEM_HALF_WIDTH] * TWOFOLD;
in CalculatePointCenterX() local 127 float allPointDiameterSum = itemWidth * static_cast<float>(itemCount_ + NUM_1);
in CalculatePointCenterX() 129 allPointDiameterSum = itemWidth * static_cast<float>(itemCount_ - NUM_1) + selectedItemWidth;
in CalculatePointCenterX() 153 auto itemWidth = static_cast<float>(paintProperty->GetItemWidthValue(swiperTheme->GetSize()).ConvertToPx());
in CalculateLongPointCenterX() local 167 itemHalfSizes.emplace_back(itemWidth * HALF_FLOAT);
in CalculateLongPointCenterX()
|
H A D | dot_indicator_modifier.h | 250 void SetItemWidth(const float itemWidth) in SetItemWidth() argument 252 itemWidth_ = itemWidth; in SetItemWidth()
|
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/ |
H A D | js_state_mgmt_profiler.cpp | 88 const int itemWidth = 14; in Report() local 94 ss << std::left << "Block name" << std::setw(nameWidth) << std::right << "#Calls" << std::setw(itemWidth) << "Self" in Report() 95 << std::setw(itemWidth) << "Total"; in Report()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/swiper_indicator/indicator_common/ |
H A D | swiper_indicator_pattern.cpp | 214 auto itemWidth = paintProperty->GetItemWidthValue(theme->GetSize()).ConvertToPx(); in HandleTouchClick() local 216 if (Negative(itemWidth) || Negative(selectedItemWidth)) { in HandleTouchClick() 217 itemWidth = theme->GetSize().ConvertToPx(); in HandleTouchClick() 224 (INDICATOR_ITEM_SPACE.ConvertToPx() + itemWidth) * currentIndex; in HandleTouchClick() 401 float itemWidth = itemWidthValue * INDICATOR_ZOOM_IN_SCALE; in GetMouseClickIndex() local 421 if (hoverPoint.GetX() >= centerX && hoverPoint.GetX() <= centerX + itemWidth && in GetMouseClickIndex() 426 centerX += itemWidth + space; in GetMouseClickIndex() 770 auto itemWidth = paintProperty->GetItemWidthValue(theme->GetSize()).ConvertToPx(); in HandleTouchClickMargin() local 772 if (Negative(itemWidth) || Negative(selectedItemWidth)) { in HandleTouchClickMargin() 773 itemWidth in HandleTouchClickMargin() [all...] |
H A D | indicator_pattern.cpp | 106 swiperParameters_->itemWidth = swiperIndicatorTheme->GetSize(); in GetSwiperParameters() 221 paintProperty->UpdateItemWidth(swiperParameters->itemWidth.value_or(swiperIndicatorTheme->GetSize())); in UpdatePaintProperty()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/list/ |
H A D | list_item_pattern.cpp | 467 float itemWidth = GetContentSize().CrossSize(axis_); in GetFriction() local 469 return CalculateFriction((curOffset_ - width) / (itemWidth - width)); in GetFriction() 473 float itemWidth = GetContentSize().CrossSize(axis_); in GetFriction() local 475 return CalculateFriction((-curOffset_ - width) / (itemWidth - width)); in GetFriction() 589 float itemWidth = GetContentSize().CrossSize(axis_); in HandleDragUpdate() local 593 maxDeleteArea = itemWidth - startNodeSize_; in HandleDragUpdate() 600 maxDeleteArea = itemWidth - endNodeSize_; in HandleDragUpdate() 673 float itemWidth = GetContentSize().CrossSize(axis_); in DoDeleteAnimation() local 681 curOffset_ = isStartDelete ? itemWidth : -itemWidth; in DoDeleteAnimation() [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/grid/irregular/ |
H A D | grid_irregular_filler.cpp | 79 int32_t GridIrregularFiller::FitItem(const decltype(GridLayoutInfo::gridMatrix_)::iterator& it, int32_t itemWidth) 86 if (static_cast<int32_t>(it->second.size()) + itemWidth > info_->crossCount_) { 91 for (int i = 0; i <= info_->crossCount_ - itemWidth; ++i) { 93 for (int j = 0; j < itemWidth; ++j) {
|
H A D | grid_irregular_filler.h | 196 * @param itemWidth The width of the item. 199 int32_t FitItem(const decltype(GridLayoutInfo::gridMatrix_)::iterator& it, int32_t itemWidth); member in OHOS::Ace::NG::GridIrregularFiller
|
/foundation/arkui/ace_engine/frameworks/core/components_v2/list/ |
H A D | render_list_item.cpp | 328 double itemWidth = GetCrossSize(child_->GetLayoutSize()); in GetFriction() local 330 return CalculateFriction((curOffset_ - width) / (itemWidth - width)); in GetFriction() 334 double itemWidth = GetCrossSize(child_->GetLayoutSize()); in GetFriction() local 336 return CalculateFriction((-curOffset_ - width) / (itemWidth - width)); in GetFriction()
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/grid/irregular/ |
H A D | grid_layout_range_solver_test.cpp | 606 constexpr float itemWidth = (GRID_WIDTH - 20.0f) / 3.0f; in HWTEST_F() local 609 EXPECT_EQ(GetChildWidth(frameNode_, i), itemWidth); in HWTEST_F() local 617 EXPECT_EQ(GetChildX(frameNode_, 13), itemWidth + 10.0f); in HWTEST_F() 618 EXPECT_EQ(GetChildX(frameNode_, 14), (itemWidth + 10.0f) * 2); in HWTEST_F() 620 EXPECT_EQ(GetChildX(frameNode_, 16), itemWidth + 10.0f); in HWTEST_F() 621 EXPECT_EQ(GetChildX(frameNode_, 17), (itemWidth + 10.0f) * 2); in HWTEST_F()
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/list/ |
H A D | list_group_algorithm_test_ng.cpp | 754 const float itemWidth = LIST_WIDTH - 100.f; in HWTEST_F() local 759 ViewAbstract::SetWidth(CalcLength(itemWidth)); in HWTEST_F() 769 EXPECT_EQ(GetChildX(groupNode, 0), (LIST_WIDTH - itemWidth) / 2); in HWTEST_F() 776 EXPECT_EQ(GetChildX(groupNode, 0), LIST_WIDTH - itemWidth); in HWTEST_F() 790 const float itemWidth = LIST_WIDTH - 100.f; in HWTEST_F() local 795 ViewAbstract::SetWidth(CalcLength(itemWidth)); in HWTEST_F() 798 EXPECT_EQ(GetChildX(groupNode, 0), LIST_WIDTH - itemWidth); in HWTEST_F() 805 EXPECT_EQ(GetChildX(groupNode, 0), (LIST_WIDTH - itemWidth) / 2); in HWTEST_F()
|
H A D | list_attr_test_ng.cpp | 749 const float itemWidth = LIST_WIDTH / 2; in HWTEST_F() local 752 ViewAbstract::SetWidth(CalcLength(itemWidth)); in HWTEST_F() 762 EXPECT_EQ(GetChildX(frameNode_, 0), (LIST_WIDTH - itemWidth) / 2); in HWTEST_F() 770 EXPECT_EQ(GetChildX(frameNode_, 0), LIST_WIDTH - itemWidth); in HWTEST_F() 785 const float itemWidth = LIST_WIDTH / 2; in HWTEST_F() local 788 ViewAbstract::SetWidth(CalcLength(itemWidth)); in HWTEST_F() 790 EXPECT_EQ(GetChildX(frameNode_, 0), LIST_WIDTH - itemWidth); in HWTEST_F() 798 EXPECT_EQ(GetChildX(frameNode_, 0), (LIST_WIDTH - itemWidth) / 2); in HWTEST_F()
|
/foundation/arkui/ace_engine/interfaces/native/node/ |
H A D | native_node_extented.cpp | 343 indicator->itemWidth = ArkUI_OptionalFloat { 0, 0.0f }; in OH_ArkUI_SwiperIndicator_Create() 417 indicator->itemWidth.isSet = 1; in OH_ArkUI_SwiperIndicator_SetItemWidth() 418 indicator->itemWidth.value = value; in OH_ArkUI_SwiperIndicator_SetItemWidth() 424 return indicator->itemWidth.value; in OH_ArkUI_SwiperIndicator_GetItemWidth()
|
H A D | node_extened.h | 110 ArkUI_OptionalFloat itemWidth; member
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/waterflow/ |
H A D | water_flow_test_ng.cpp | 1944 float itemWidth = WATER_FLOW_WIDTH / colNumber; in HWTEST_F() local 1945 EXPECT_TRUE(IsEqual(pattern_->GetItemRect(0), Rect(0, 0, itemWidth, ITEM_MAIN_SIZE))); in HWTEST_F() 1946 EXPECT_TRUE(IsEqual(pattern_->GetItemRect(5), Rect(itemWidth * 2, ITEM_MAIN_SIZE, itemWidth, BIG_ITEM_MAIN_SIZE))); in HWTEST_F() 1947 EXPECT_TRUE(IsEqual(pattern_->GetItemRect(10), Rect(itemWidth * 2, ITEM_MAIN_SIZE * 3, itemWidth, ITEM_MAIN_SIZE))); in HWTEST_F() 1973 float itemWidth = WATER_FLOW_WIDTH / colNumber; in HWTEST_F() local 1974 EXPECT_TRUE(IsEqual(pattern_->GetItemIndex(itemWidth / 2, ITEM_MAIN_SIZE / 2), 0)); in HWTEST_F()
|
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/models/ |
H A D | swiper_model_impl.cpp | 258 if (swiperParameters.itemWidth.has_value()) { in SetIndicatorStyle() 259 indicator->SetSize(swiperParameters.itemWidth.value()); in SetIndicatorStyle()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/swiper/ |
H A D | swiper_model.h | 41 std::optional<Dimension> itemWidth; member
|