PDFium Delphi Component Docs

OnFormCursor Evento

Componente: TPdf  ·  Unità: PDFium
Si attiva quando il layer dei moduli richiede una forma di cursore per il campo sotto il puntatore

Syntax

property OnFormCursor: TPdfFormCursorEvent read FOnFormCursor write FOnFormCursor;

Description

OnFormCursor si attiva quando il layer dei moduli interattivi chiede quale cursore mostrare. Il gestore riceve il Cursor decodificato di tipo TPdfFormCursor (pfcUnknown, pfcArrow, pfcSizeNESW, pfcSizeNWSE, pfcVerticalBeam, pfcHorizontalBeam, pfcHand), il codice grezzo NativeCursorType e un flag var Handled

Impostare Handled = True per applicare un cursore specifico dell'host; quando nessun gestore è assegnato o Handled resta False, il componente mappa il valore decodificato sul cursore VCL corrispondente

Remarks

    • Firma del gestore: procedure(Sender: TObject; Cursor: TPdfFormCursor; NativeCursorType: Integer; var Handled: Boolean) of object
    • Richiede che le callback host dei moduli siano complete; controllare FormHostCallbacksComplete quando l'evento non si attiva mai

Example

procedure TMain.Pdf1FormCursor(Sender: TObject; Cursor: TPdfFormCursor; NativeCursorType: Integer; var Handled: Boolean);
begin
  if Cursor= pfcVerticalBeam then begin
    Screen.Cursor := crIBeam;
    Handled := True;
  end;
end;

See Also