using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using PdfSharpCore.Pdf;
namespace MmdPdf.Controls
{
///
/// The viewer's outward surface: what the window still calls into.
///
/// WHY A FACADE RATHER THAN WIDENING. Roughly 55 of these are private members of the seven
/// moved files. Making them internal in place would mean 55 edits scattered through code that
/// is otherwise VERBATIM - and "verbatim" is the property that makes the move reviewable by
/// diff. This file is part of the same partial class, so it can see those privates and
/// re-expose them without touching a line of the moved code.
///
/// The `Ext` suffix exists only because a wrapper cannot share a name with the member it wraps
/// inside one class. Members that were already internal (RenderAllAnnotations, ClearSelection,
/// ClearTextSelection, AccentBrush) are absent here - the window calls those directly.
///
/// Every entry is one call site away from deletion: when a caller moves into the viewer, its
/// line here goes with it.
///
public partial class PdfViewer
{
// ── Annotations: selection, hit-testing, geometry ────────────────────────────────────
internal void AddAnnotationExt(PageAnnotation a) => AddAnnotation(a);
internal Rect AnnotBoundsExt(PageAnnotation a) => AnnotBounds(a);
internal static Point AnnotGetPosExt(PageAnnotation a) => AnnotGetPos(a);
internal static void AnnotSetPosExt(PageAnnotation a, Point pos) => AnnotSetPos(a, pos);
internal Point ClampAnnotPosExt(PageAnnotation a) => ClampAnnotPos(a);
internal bool HitTestAnnotationExt(PageAnnotation a, Point pos, out Rect bounds)
=> HitTestAnnotation(a, pos, out bounds);
internal static bool IsDraggableExt(PageAnnotation a) => IsDraggable(a);
internal void SelectAnnotationExt(PageAnnotation a, Rect bounds) => SelectAnnotation(a, bounds);
internal void ToggleMultiSelectExt(PageAnnotation a, Rect bounds, Canvas canvas)
=> ToggleMultiSelect(a, bounds, canvas);
internal void SelectGroupExt(PageAnnotation lead) => SelectGroup(lead);
internal PageAnnotation? SelectedPairedExt() => SelectedPaired();
internal int SelectionCountExt() => SelectionCount();
internal void ReattachSelectionVisualsExt() => ReattachSelectionVisuals();
internal void UnpairSelectedExt() => UnpairSelected();
internal void GroupSelectedExt() => GroupSelected();
internal void UngroupAnnotationExt(PageAnnotation a) => UngroupAnnotation(a);
internal void RemoveFromGroupExt(PageAnnotation a) => RemoveFromGroup(a);
internal void DeleteSelectedExt() => DeleteSelected();
internal bool SelectAllAnnotationsExt() => SelectAllAnnotations();
internal void HideBrushPreviewExt() => HideBrushPreview();
internal void FinishStuckGestureExt() => FinishStuckGesture();
internal void RefreshSelectionAccentExt() => RefreshSelectionAccent();
// ── Page canvases ────────────────────────────────────────────────────────────────────
internal Canvas CanvasForPageExt(int page) => CanvasForPage(page);
internal Canvas? VisibleCanvasForPageExt(int page) => VisibleCanvasForPage(page);
internal IEnumerable