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 | 2971d699423e2f28f2686b098cb5dbf9a705038e (patch) | |
| tree | 43abe71fbedd4a90527c26c68fcba73ab71f6519 /src/tui/document_view.hh | |
| parent | cb1f404cc6b8b9dce135efd26fa32dc0d6fd79c4 (diff) | |
| download | rwebbrowser-2971d699423e2f28f2686b098cb5dbf9a705038e.tar.gz rwebbrowser-2971d699423e2f28f2686b098cb5dbf9a705038e.tar.xz | |
feat(tui): add object focus traversal and link activation
Diffstat (limited to 'src/tui/document_view.hh')
| -rw-r--r-- | src/tui/document_view.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tui/document_view.hh b/src/tui/document_view.hh index 587f419..5f5e331 100644 --- a/src/tui/document_view.hh +++ b/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: |
