@@ -5,6 +5,7 @@
|
||||
While a _view_ just need to implement `View` it's usually convenient to just
|
||||
use `BoxView` as a parent.
|
||||
|
||||
[[register-bindings]]
|
||||
== Register Bindings
|
||||
|
||||
In an `AbstractView` use variants of _registerKeyBinding_, _registerHotKeyBinding_
|
||||
|
||||
@@ -15,3 +15,7 @@ include::{snippets}/KeyHandlingSnippets.java[tag=sample]
|
||||
|
||||
`KeyEvent` is a record containing info about a binding coming out
|
||||
from a terminal.
|
||||
|
||||
Some views allow you to register hot keys which are processed before
|
||||
normal key handling. More about this can be found from
|
||||
xref:appendices/tui/viewdev.adoc#register-bindings[Register Bindings].
|
||||
|
||||
@@ -14,6 +14,15 @@ Inherits xref:tui/views/box.adoc[].
|
||||
└─────────────────────────────┘
|
||||
----
|
||||
|
||||
_MenuBarView_ is constructed with instances of _MenuBarItem_. _MenuBarItem_ itself
|
||||
takes instances of _MenuItem_. _MenuItem_ can define its style and action.
|
||||
_MenuBarItem_ can also define a hot key which is used to active particular menu.
|
||||
|
||||
[source, java, indent=0]
|
||||
----
|
||||
include::{snippets}/MenuBarViewSnippets.java[tag=snippet1]
|
||||
----
|
||||
|
||||
== Default Bindings
|
||||
Default _key bindigs_ are:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user