54 lines
1.1 KiB
Plaintext
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.
|