Files
spring-shell/spring-shell-docs/modules/ROOT/pages/tui/views/menubar.adoc
Janne Valkealahti 90df641750 Update hotkey docs
- Relates #826
2023-12-10 09:53:20 +00:00

54 lines
1.1 KiB
Plaintext

[[tui-views-menubar]]
= MenuBarView
:page-section-summary-toc: 1
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
_MenuBarView_ is a base implementation providing functionality to draw a menu bar.
Inherits xref:tui/views/box.adoc[].
[source, text]
----
┌─────────────────────────────┐
│ File Help │
└─────────────────────────────┘
----
_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:
.Key
|===
|Command |Description
|CursorLeft
|Move selection left
|CursorRight
|Move selection right
|===
Default _mouse bindigs_ are:
.Mouse
|===
|Command |Description
|Released \| Button1
|Choose item
|===
== Events
Does not have any events.