ValidSelectionUnit

Forms, interaction, unicode

Description

TPDFlibFormSelectionUnit

SetSelectionRange value lies between the low and high bounds of the declared enumeration The check guards the selection APIs against out-of-range values that can reach the session as untyped data, and GetSelectionRange, GetVisualCaretOrder and

Declaration

function ValidSelectionUnit(
  IndexUnit: TPDFlibFormSelectionUnit): Boolean;

Parameters

IndexUnitSelection unit value to validate

Return value

Returns True when the value is one of fsuUTF16CodeUnit, fsuUnicodeCodePoint or fsuGraphemeCluster, otherwise False

See also

TPDFlibFormSelectionUnit, SetSelectionRange, GetSelectionRange, SelectionUnitToUTF16, ValidField