function HasSelection: Boolean;
Returns True if the viewer's internal selection model contains any non-empty range, otherwise False. This is lightweight (no PDFium round-trip), so it is safe to call from OnSelectionChange handlers, from a popup's OnPopup to enable / disable a Copy item, or from a paint loop
False on inactive views, when no document is assigned, and after every state-change clear (page navigate, document switch, deactivate, display mode change)CopyMenuItem.Enabled := PdfView1.HasSelection;