diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-10-26 20:38:32 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-10-26 20:38:32 +0800 |
| commit | 032b82c13e157a048ac13a540dfd18be9667fe49 (patch) | |
| tree | d8bec1f88fcd529a300bb71316c18ecaf0806b63 /ricochet/src/tui/document_view.hh | |
| parent | 2e6dc81391c5dbb787cfd793ad5823904b3b9c94 (diff) | |
| download | rcc-project-032b82c13e157a048ac13a540dfd18be9667fe49.tar.gz rcc-project-032b82c13e157a048ac13a540dfd18be9667fe49.tar.xz | |
feat(tui): add object focus traversal and link activation
Diffstat (limited to 'ricochet/src/tui/document_view.hh')
| -rw-r--r-- | ricochet/src/tui/document_view.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ricochet/src/tui/document_view.hh b/ricochet/src/tui/document_view.hh index 587f419..5f5e331 100644 --- a/ricochet/src/tui/document_view.hh +++ b/ricochet/src/tui/document_view.hh @@ -46,6 +46,13 @@ enum class ViewMotion : std::uint8_t PanRight }; +enum class FocusResult : std::uint8_t +{ + Empty, + Moved, + Wrapped +}; + // One tab's reading state. It owns the logical snapshot; screen rows are caches. // Keyboard, mouse and host navigation all use the same layout/source mappings. class DocumentView @@ -70,6 +77,9 @@ public: void wheel( int steps ); bool locate( const DocumentPoint& point ); std::optional<HitTarget> focused_target() const; + // Browse/field-editor routing owns mode eligibility; this follows the shared order. + FocusResult focus( bool backward ); + const Link* focused_link() const; void draw( Frame& frame, CellPoint origin ) const; private: |
