PDFium Component Docs

OnMouseDown event

この API エントリでは識別子、シグネチャ、コードブロック、PDF 用語を元の表記のまま保持します。
コンポーネント: TPdfView  ·  ユニット: PDFium
Fired when the user presses a mouse button over the view.

構文

property OnMouseDown: TMouseEvent;

説明

Fired when the user presses a mouse button over the view. The Sender parameter references the TPdfView イベントを発生させた instance です。そのため、単一のハンドラで複数のビューを扱う場合は Sender.

典型的な用途には、カスタム選択ボックスの開始、パンの開始、「この注釈へ移動」機能用の座標取得などがあります。ハンドラーは VCL メインスレッド上で実行されるため、フォームコントロールを更新し、他の VCL API を直接呼び出せます

ハンドラーはすばやく戻る必要があります — PDFium のレンダリングとフォーム入力は同じスレッドで行われるため、ここでの遅延は次のページ再描画を遅らせます

備考

procedure TForm1.PdfViewOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  // begin a custom selection box, start panning, or capture coordinates for a "go to this annotation" feature
  Caption := Format('OnMouseDown on page %d', [PdfView1.PageNumber]);
end;

関連項目

OnClick, OnPageChange, PageNumber