/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text_field/ |
H A D | text_selector.h | 96 destinationOffset = destination; in Update() 111 destinationOffset = both; in Update() 116 if (baseOffset > destinationOffset) { in ReverseTextSelector() 123 return baseOffset == other.baseOffset && destinationOffset == other.destinationOffset; 148 return destinationOffset; in GetEnd() 163 destinationOffset = std::max(0, destinationOffset - 1); in MoveSelectionLeft() 164 return destinationOffset == baseOffset; in MoveSelectionLeft() 169 destinationOffset = std::min(charCount, destinationOffset + 1); in MoveSelectionRight() 170 return destinationOffset == baseOffset; in MoveSelectionRight() 185 return baseOffset > destinationOffset; in StartGreaterDest() [all …]
|
/ohos5.0/foundation/arkui/ace_engine/test/unittest/core/pattern/rich_editor/ |
H A D | rich_editor_click_test_ng.cpp | 93 richEditorPattern->textSelector_.destinationOffset = -1; 114 richEditorPattern->textSelector_.destinationOffset = 1; 248 richEditorPattern->textSelector_.destinationOffset = 4; 256 richEditorPattern->textSelector_.destinationOffset = 8; 297 richEditorPattern->textSelector_.destinationOffset = -1; 302 richEditorPattern->textSelector_.destinationOffset = 3; 307 richEditorPattern->textSelector_.destinationOffset = 9; 333 richEditorPattern->textSelector_.destinationOffset = -1; 342 richEditorPattern->textSelector_.destinationOffset = -1; 490 richEditorPattern->textSelector_.destinationOffset = 0; [all …]
|
H A D | rich_editor_overlay_test_ng.cpp | 188 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, 0); 206 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, 0); 224 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, -1); 234 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, 1); 242 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, -1); 250 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, 6); 277 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, 6); 285 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, 3); 293 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, 6); 309 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, 3); [all …]
|
H A D | rich_editor_test_ng.cpp | 1566 richEditorPattern->textSelector_.destinationOffset = 2; 1630 richEditorPattern->textSelector_.destinationOffset = 1; 1789 richEditorPattern->textSelector_.destinationOffset = 3; 1797 richEditorPattern->textSelector_.destinationOffset = 2; 1802 richEditorPattern->textSelector_.destinationOffset = 2; 1820 richEditorPattern->textSelector_.destinationOffset = 3; 1825 richEditorPattern->textSelector_.destinationOffset = 2; 1983 richEditorPattern->textSelector_.destinationOffset = 0; 1988 richEditorPattern->textSelector_.destinationOffset = 1; 2898 richEditorPattern->textSelector_.destinationOffset = 3; [all …]
|
H A D | rich_editor_edit_test_ng.cpp | 1020 richEditorPattern->textSelector_.destinationOffset = 1; 1022 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, 1); 1027 richEditorPattern->textSelector_.destinationOffset = 1; 1030 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, 1); 1065 richEditorPattern->textSelector_.destinationOffset = 1; 1107 richEditorPattern->textSelector_.destinationOffset = 1; 1146 richEditorPattern->textSelector_.destinationOffset = 1; 1185 richEditorPattern->textSelector_.destinationOffset = 1; 1427 richEditorPattern->textSelector_.destinationOffset = 3; 1435 richEditorPattern->textSelector_.destinationOffset = 2; [all …]
|
H A D | rich_editor_edit_testone_ng.cpp | 71 richEditorPattern->textSelector_.destinationOffset = 3; 76 richEditorPattern->textSelector_.destinationOffset = 2; 490 richEditorPattern->textSelector_.destinationOffset = 3; 583 richEditorPattern->textSelector_.destinationOffset = 1; 612 richEditorPattern->textSelector_.destinationOffset = 8; 618 richEditorPattern->textSelector_.destinationOffset = 1; 743 richEditorPattern->textSelector_.destinationOffset = 3; 1338 richEditorPattern->textSelector_.destinationOffset = -2; 1375 richEditorPattern->textSelector_.destinationOffset = 1;
|
H A D | rich_editor_keyboard_shortcut_test_ng.cpp | 519 EXPECT_TRUE(end == richEditorPattern->textSelector_.destinationOffset); 541 richEditorPattern->textSelector_.destinationOffset = 2; 544 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, -1); 753 richEditorPattern->textSelector_.destinationOffset = 1; 982 richEditorPattern->textSelector_.destinationOffset = 2; 1040 richEditorPattern->textSelector_.destinationOffset = -3; 1050 richEditorPattern->textSelector_.destinationOffset = 50; 1109 richEditorPattern->textSelector_.destinationOffset = 3;
|
H A D | rich_editor_pattern_test_ng.cpp | 432 richEditorPattern->textSelector_.destinationOffset = 1; 460 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, -1); 823 richEditorPattern->textSelector_.destinationOffset = 6; 922 richEditorPattern->textSelector_.destinationOffset = 6;
|
H A D | rich_editor_pattern_testfour_ng.cpp | 909 richEditorPattern->textSelector_.destinationOffset = 1; 1130 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, 0);
|
H A D | rich_editor_change_callback_test_ng.cpp | 447 richEditorPattern->textSelector_.destinationOffset = 2; 1597 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, -1); 1602 EXPECT_EQ(richEditorPattern->textSelector_.destinationOffset, -1);
|
H A D | rich_editor_base_testone_ng.cpp | 241 richEditorPattern->textSelector_.destinationOffset = 6; 267 richEditorPattern->textSelector_.destinationOffset = 6;
|
H A D | rich_editor_base_test_ng.cpp | 1047 richEditorPattern->textSelector_.destinationOffset = 2; 1052 richEditorPattern->textSelector_.destinationOffset = -1;
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/rich_editor/ |
H A D | rich_editor_select_overlay.cpp | 193 auto preHandleIndex = isFirst ? textSelector.baseOffset : textSelector.destinationOffset; in UpdateSelectorOnHandleMove() 221 auto selectStart = std::min(textSelector.baseOffset, textSelector.destinationOffset); in OnHandleMoveDone() 222 auto selectEnd = std::max(textSelector.baseOffset, textSelector.destinationOffset); in OnHandleMoveDone()
|
H A D | rich_editor_pattern.cpp | 3023 pattern->SetCaretPosition(pattern->textSelector_.destinationOffset); in ClickAISpan() 5602 textSelector_.Update(textSelector_.destinationOffset); in OnBackPressed() 6835 if (textSelector_.baseOffset != textSelector_.destinationOffset) { in OnBackPressed() 6875 auto selectStart = std::min(textSelector_.baseOffset, textSelector_.destinationOffset); in OnBackPressed() 6876 auto selectEnd = std::max(textSelector_.baseOffset, textSelector_.destinationOffset); in OnBackPressed() 6958 auto selectStart = std::min(textSelector_.baseOffset, textSelector_.destinationOffset); in OnBackPressed() 6959 auto selectEnd = std::max(textSelector_.baseOffset, textSelector_.destinationOffset); in OnBackPressed() 7530 int32_t destinationOffset = std::min(textSelector_.destinationOffset, GetTextContentLength()); in OnBackPressed() local 7546 … auto endOffset = CalcCursorOffsetByPosition(destinationOffset, endSelectHeight, false, false); in OnBackPressed()
|
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text/ |
H A D | text_pattern.cpp | 218 …CalcCaretMetricsByPosition(textSelector_.destinationOffset, secondHandleMetrics, TextAffinity::UPS… in CalculateHandleOffsetAndShowOverlay() 365 UpdateSelectionSpanType(std::min(textSelector_.baseOffset, textSelector_.destinationOffset), in HandleLongPress() 366 std::max(textSelector_.baseOffset, textSelector_.destinationOffset)); in HandleLongPress() 509 HandleSelectionChange(start, textSelector_.destinationOffset); in OnHandleMove() 1120 auto destinationOffset = textSelector_.destinationOffset; in ShowAIEntityMenu() local 1128 HandleSelectionChange(baseOffset, destinationOffset); in ShowAIEntityMenu() 1175 UpdateSelectionSpanType(std::min(textSelector_.baseOffset, textSelector_.destinationOffset), in HandleDoubleClickEvent() 1176 std::max(textSelector_.baseOffset, textSelector_.destinationOffset)); in HandleDoubleClickEvent() 1324 auto end = textSelector_.destinationOffset; in HandleMouseLeftReleaseAction() 3581 auto selectStart = std::min(textSelector.baseOffset, textSelector.destinationOffset); in CopyBindSelectionMenuParams() [all …]
|
H A D | text_select_overlay.cpp | 221 …ttern->HandleSelectionChange(currentHandleIndex, textPattern->GetTextSelector().destinationOffset); in UpdateSelectorOnHandleMove() 223 …->StartVibratorByIndexChange(currentHandleIndex, textPattern->GetTextSelector().destinationOffset); in UpdateSelectorOnHandleMove()
|
/ohos5.0/foundation/arkui/ace_engine/test/unittest/core/pattern/text/ |
H A D | text_testthree_ng.cpp | 973 int32_t secondIndex = pattern->GetTextSelector().destinationOffset; 985 secondIndex = pattern->GetTextSelector().destinationOffset;
|
H A D | text_testtwo_ng.cpp | 1858 EXPECT_EQ(textPattern->textSelector_.destinationOffset, TEXT_SIZE_INT);
|