PDFium Delphi Component Docs

GetFocusableAnnotationSubtypes 메서드

컴포넌트: TPdf  ·  유닛: PDFium
폼 작성 환경이 현재 포커스 가능으로 취급하는 주석 서브타입을 반환합니다

구문

function GetFocusableAnnotationSubtypes: TPdfAnnotationSubtypes;

ResultTPdfAnnotationSubtypes. 포커스 가능 서브타입의 동적 배열이며 목록이 비워진 경우에는 비어 있습니다

설명

폼 작성 환경이 유지하는 포커스 목록을 읽어옵니다. 이 목록은 어떤 주석이 키보드 포커스를 받을 수 있는지, 그리고 따라서 FocusFormField 같은 내비게이션 호출이 무엇을 순회하는지를 결정합니다

읽기는 두 번의 네이티브 왕복으로 이루어집니다. 먼저 개수(FPDFAnnot_GetFocusableSubtypesCount), 그다음 값(FPDFAnnot_GetFocusableSubtypes)을 가져오며 각 값은 TPdfAnnotationSubtype으로 다시 디코딩됩니다. 개수가 0이면 오류 대신 빈 배열이 반환됩니다

이 호출에는 로드된 문서와 초기화된 폼 작성 환경이 필요합니다. 폼이 초기화되지 않았으면 메시지 Form fill environment is not initialized와 함께 EPdfError가 발생하고, 네이티브 조회가 실패하면 Cannot retrieve focusable annotation subtypes가 발생합니다. 목록을 바꿀 때는 SetFocusableAnnotationSubtypes를 사용합니다

예제

var
  Subtypes: TPdfAnnotationSubtypes;
  Subtype: TPdfAnnotationSubtype;
begin
  Subtypes := Pdf1.GetFocusableAnnotationSubtypes;
  for Subtype in Subtypes do
    Memo1.Lines.Add(GetEnumName(TypeInfo(TPdfAnnotationSubtype),
      Ord(Subtype)));
end;

관련 항목

SetFocusableAnnotationSubtypes, FocusFormField, FocusedFormFieldIndex, FormField