AppView

AppView 是一个基本实现,提供了绘制有主见的 application view 的功能。继承 BoxView

AppView is a base implementation providing functionality to draw opinionated application view. Inherits BoxView.

通常 MenuBarViewStatusBarView 分别是菜单和状态视图的一般想法。主内容视图则是用户想要显示在其中的任何内容。

Generic idea is to have menu and status views which typically are MenuBarView and StatusBarView respectively. Main content view is then whatever user want to show in it.

┌──────────────────────────┐
│           Menu           │
├──────────────────────────┤
│                          │
│           Main           │
│                          │
├──────────────────────────┤
│          Status          │
└──────────────────────────┘

Key Handling

如果菜单有焦点,则在那里处理键处理,然后咨询主要内容来进行处理。最后,处理光标左右以调度 AppViewEvent

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

热键按 mainmenustatus 的顺序进行处理。

Hotkeys are processed in order of main, menu and status.

Events

Table 1. AppView Events
Event Description

AppViewEvent

Direction for a next selection.