Files
Nexus.Reader/src/.documentation/published/v5/files/NexusReader.UI.Shared/Services/IReaderInteractionService.md
T
2026-05-25 14:02:56 +02:00

5.0 KiB

IReaderInteractionService

  • File ID: file:1szg1zb:ireaderinteractionservice-cs
  • Path: NexusReader.UI.Shared/Services/IReaderInteractionService.cs
  • Role: service
  • Layer: frontend

Purpose

Defines an interface for UI-level reader interactions (node/block selection, scrolling, highlighting, and text selection) and a small DTO for selection coordinates used across UI clients.

Key Details

This file is an interface used by UI components to publish and consume reader-related events; implementations will orchestrate raising events and forwarding requests between UI parts.

Symbols

  • IReaderInteractionService: Defines an interface for UI-level reader interactions (node/block selection, scrolling, highlighting, and text selection) and a small DTO for selection coordinates used across UI clients.
  • OnNodeSelected(): Event fired when a node is selected; subscribers receive the selected nodeId.
  • OnScrollToBlockRequested(): Event fired to request scrolling to a specific blockId.
  • OnHighlightBlockRequested(): Event fired to request highlighting of a specific blockId.
  • OnTextSelected(): Event fired when text is selected; subscribers receive the text, blockId, and coordinates.
  • NotifyNodeSelected(): Declares an async method to notify that a node was selected (intended to trigger or forward OnNodeSelected).
  • RequestScrollToBlock(): Declares an async request to scroll the UI to a block (intended to trigger OnScrollToBlockRequested).
  • RequestHighlightBlock(): Declares an async request to highlight a block (intended to trigger OnHighlightBlockRequested).
  • NotifyTextSelected(): Declares an async method to notify that text was selected, providing text, block context, and coordinates.
  • SelectionCoordinates: Represents the coordinates (top, left) and width of a text selection in UI units.

Dependencies

  • No resolved dependencies.

Calls

  • No resolved calls.

Coverage

  • Symbols: 10
  • Executable symbols: 8
  • Executable symbols with control flow: 8
  • Grounded edges: 10
  • Unresolved references: 0
  • Control-flow fragments: 8
  • Unresolved jumps: 0
  • Unsupported constructs: 0
  • Control-flow coverage: 100%
  • Required diagrams: 2
  • Generated diagrams: 2

Control Flow Fragments

  • OnNodeSelected: 3 nodes, 2 edges, 0 jumps, 0 unsupported constructs
  • OnScrollToBlockRequested: 3 nodes, 2 edges, 0 jumps, 0 unsupported constructs
  • OnHighlightBlockRequested: 3 nodes, 2 edges, 0 jumps, 0 unsupported constructs
  • OnTextSelected: 3 nodes, 2 edges, 0 jumps, 0 unsupported constructs
  • NotifyNodeSelected: 4 nodes, 3 edges, 0 jumps, 0 unsupported constructs
  • RequestScrollToBlock: 3 nodes, 2 edges, 0 jumps, 0 unsupported constructs
  • RequestHighlightBlock: 3 nodes, 2 edges, 0 jumps, 0 unsupported constructs
  • NotifyTextSelected: 4 nodes, 3 edges, 0 jumps, 0 unsupported constructs

Diagrams

IReaderInteractionService Neighborhood

flowchart LR
    class_w9vxji_ireaderinteractionservice("IReaderInteractionService")
    file_1szg1zb_ireaderinteractionservice_cs("IReaderInteractionService")
    method_15b21oe_onhighlightblockrequested[["OnHighlightBlockRequested()"]]
    method_18zc3my_ontextselected[["OnTextSelected()"]]
    method_1lb2q26_requesthighlightblock[["RequestHighlightBlock()"]]
    method_1r1tcl2_notifynodeselected[["NotifyNodeSelected()"]]
    method_ecn87d_onscrolltoblockrequested[["OnScrollToBlockRequested()"]]
    method_iyd7fv_requestscrolltoblock[["RequestScrollToBlock()"]]
    method_mhcg2e_onnodeselected[["OnNodeSelected()"]]
    method_p2mw02_notifytextselected[["NotifyTextSelected()"]]
    type_14glqwn_selectioncoordinates[/"SelectionCoordinates"/]

IReaderInteractionService Execution Overview

flowchart TD
    class_w9vxji_ireaderinteractionservice("IReaderInteractionService")
    method_15b21oe_onhighlightblockrequested[["OnHighlightBlockRequested()"]]
    method_18zc3my_ontextselected[["OnTextSelected()"]]
    method_1lb2q26_requesthighlightblock[["RequestHighlightBlock()"]]
    method_1r1tcl2_notifynodeselected[["NotifyNodeSelected()"]]
    method_ecn87d_onscrolltoblockrequested[["OnScrollToBlockRequested()"]]
    method_iyd7fv_requestscrolltoblock[["RequestScrollToBlock()"]]
    method_mhcg2e_onnodeselected[["OnNodeSelected()"]]
    method_p2mw02_notifytextselected[["NotifyTextSelected()"]]
    class_w9vxji_ireaderinteractionservice -->|contains| method_15b21oe_onhighlightblockrequested
    class_w9vxji_ireaderinteractionservice -->|contains| method_18zc3my_ontextselected
    class_w9vxji_ireaderinteractionservice -->|contains| method_1lb2q26_requesthighlightblock
    class_w9vxji_ireaderinteractionservice -->|contains| method_1r1tcl2_notifynodeselected
    class_w9vxji_ireaderinteractionservice -->|contains| method_ecn87d_onscrolltoblockrequested
    class_w9vxji_ireaderinteractionservice -->|contains| method_iyd7fv_requestscrolltoblock
    class_w9vxji_ireaderinteractionservice -->|contains| method_mhcg2e_onnodeselected
    class_w9vxji_ireaderinteractionservice -->|contains| method_p2mw02_notifytextselected

Diagram Validation

  • Status: pass