Files
spring-shell/spring-shell-docs/modules/ROOT/pages/tui/views/app.adoc
Janne Valkealahti bba7a82ab4 Make StatusBarView work with hotkeys
- StatusItem can now define a hotkey which is then
  bound to its action.
- In catalog app replace use of raw key event to
  item's hotkey for status bar visibility.
- Various doc updates.
- Relates #826
2023-10-30 09:31:03 +00:00

42 lines
1.3 KiB
Plaintext

= AppView
:page-section-summary-toc: 1
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
_AppView_ is a base implementation providing functionality to draw opinionated _application view_.
Inherits xref:tui/views/box.adoc[].
Generic idea is to have menu and status views which typically are xref:tui/views/menubar.adoc[] and
xref:tui/views/statusbar.adoc[] respectively. Main content view is then whatever user want to show
in it.
[source, text]
----
┌──────────────────────────┐
│ Menu │
├──────────────────────────┤
│ │
│ Main │
│ │
├──────────────────────────┤
│ Status │
└──────────────────────────┘
----
== Key Handling
If menu has a focus key handling is processed there, then main is consulted for handling.
Lastly cursor left/right are processed to dispatch _AppViewEvent_.
== HotKey Handling
Hotkeys are processed in order of _main_, _menu_ and _status_.
== Events
.AppView Events
|===
|Event |Description
|AppViewEvent
|Direction for a next selection.
|===