Terminal.Gui.MenuBar.html 86 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749
  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class MenuBar
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class MenuBar
  11. ">
  12. <link rel="shortcut icon" href="../../favicon.ico">
  13. <link rel="stylesheet" href="../../styles/docfx.vendor.min.css">
  14. <link rel="stylesheet" href="../../styles/docfx.css">
  15. <link rel="stylesheet" href="../../styles/main.css">
  16. <meta property="docfx:navrel" content="../../toc.html">
  17. <meta property="docfx:tocrel" content="toc.html">
  18. <meta property="docfx:rel" content="../../">
  19. </head>
  20. <body data-spy="scroll" data-target="#affix" data-offset="120">
  21. <div id="wrapper">
  22. <header>
  23. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  24. <div class="container">
  25. <div class="navbar-header">
  26. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  27. <span class="sr-only">Toggle navigation</span>
  28. <span class="icon-bar"></span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. </button>
  32. <a class="navbar-brand" href="../../index.html">
  33. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  34. </a>
  35. </div>
  36. <div class="collapse navbar-collapse" id="navbar">
  37. <form class="navbar-form navbar-right" role="search" id="search">
  38. <div class="form-group">
  39. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  40. </div>
  41. </form>
  42. </div>
  43. </div>
  44. </nav>
  45. <div class="subnav navbar navbar-default">
  46. <div class="container hide-when-search" id="breadcrumb">
  47. <ul class="breadcrumb">
  48. <li></li>
  49. </ul>
  50. </div>
  51. </div>
  52. </header>
  53. <div class="container body-content">
  54. <div id="search-results">
  55. <div class="search-list">Search Results for <span></span></div>
  56. <div class="sr-items">
  57. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  58. </div>
  59. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  60. </div>
  61. </div>
  62. <div role="main" class="container body-content hide-when-search">
  63. <div class="sidenav hide-when-search">
  64. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  65. <div class="sidetoggle collapse" id="sidetoggle">
  66. <div id="sidetoc"></div>
  67. </div>
  68. </div>
  69. <div class="article row grid-right">
  70. <div class="col-md-10">
  71. <article class="content wrap" id="_content" data-uid="Terminal.Gui.MenuBar">
  72. <h1 id="Terminal_Gui_MenuBar" data-uid="Terminal.Gui.MenuBar" class="text-break">Class MenuBar
  73. </h1>
  74. <div class="markdown level0 summary"><p>
  75. Provides a menu bar that spans the top of a <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> View with drop-down and cascading menus.
  76. </p>
  77. <p>
  78. By default, any sub-sub-menus (sub-menus of the <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>s added to <a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a>s)
  79. are displayed in a cascading manner, where each sub-sub-menu pops out of the sub-menu frame
  80. (either to the right or left, depending on where the sub-menu is relative to the edge of the screen). By setting
  81. <a class="xref" href="Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_UseSubMenusSingleFrame">UseSubMenusSingleFrame</a> to <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>, this behavior can be changed such that all sub-sub-menus are
  82. drawn within a single frame below the MenuBar.
  83. </p></div>
  84. <div class="markdown level0 conceptual"></div>
  85. <div class="inheritance">
  86. <h5>Inheritance</h5>
  87. <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
  88. <div class="level1"><a class="xref" href="Terminal.Gui.Responder.html">Responder</a></div>
  89. <div class="level2"><a class="xref" href="Terminal.Gui.View.html">View</a></div>
  90. <div class="level3"><span class="xref">MenuBar</span></div>
  91. </div>
  92. <div class="implements">
  93. <h5>Implements</h5>
  94. <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
  95. <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.isupportinitializenotification">ISupportInitializeNotification</a></div>
  96. <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.isupportinitialize">ISupportInitialize</a></div>
  97. </div>
  98. <div class="inheritedMembers">
  99. <h5>Inherited Members</h5>
  100. <div>
  101. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Added">View.Added</a>
  102. </div>
  103. <div>
  104. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Removed">View.Removed</a>
  105. </div>
  106. <div>
  107. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Enter">View.Enter</a>
  108. </div>
  109. <div>
  110. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Leave">View.Leave</a>
  111. </div>
  112. <div>
  113. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MouseEnter">View.MouseEnter</a>
  114. </div>
  115. <div>
  116. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MouseLeave">View.MouseLeave</a>
  117. </div>
  118. <div>
  119. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MouseClick">View.MouseClick</a>
  120. </div>
  121. <div>
  122. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_CanFocusChanged">View.CanFocusChanged</a>
  123. </div>
  124. <div>
  125. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_EnabledChanged">View.EnabledChanged</a>
  126. </div>
  127. <div>
  128. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_VisibleChanged">View.VisibleChanged</a>
  129. </div>
  130. <div>
  131. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_HotKeyChanged">View.HotKeyChanged</a>
  132. </div>
  133. <div>
  134. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_HotKey">View.HotKey</a>
  135. </div>
  136. <div>
  137. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Shortcut">View.Shortcut</a>
  138. </div>
  139. <div>
  140. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ShortcutTag">View.ShortcutTag</a>
  141. </div>
  142. <div>
  143. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ShortcutAction">View.ShortcutAction</a>
  144. </div>
  145. <div>
  146. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Data">View.Data</a>
  147. </div>
  148. <div>
  149. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Driver">View.Driver</a>
  150. </div>
  151. <div>
  152. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Subviews">View.Subviews</a>
  153. </div>
  154. <div>
  155. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_TabIndexes">View.TabIndexes</a>
  156. </div>
  157. <div>
  158. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_TabIndex">View.TabIndex</a>
  159. </div>
  160. <div>
  161. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_TabStop">View.TabStop</a>
  162. </div>
  163. <div>
  164. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_CanFocus">View.CanFocus</a>
  165. </div>
  166. <div>
  167. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Id">View.Id</a>
  168. </div>
  169. <div>
  170. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_IsCurrentTop">View.IsCurrentTop</a>
  171. </div>
  172. <div>
  173. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_WantMousePositionReports">View.WantMousePositionReports</a>
  174. </div>
  175. <div>
  176. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_WantContinuousButtonPressed">View.WantContinuousButtonPressed</a>
  177. </div>
  178. <div>
  179. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Frame">View.Frame</a>
  180. </div>
  181. <div>
  182. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutStyle">View.LayoutStyle</a>
  183. </div>
  184. <div>
  185. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Bounds">View.Bounds</a>
  186. </div>
  187. <div>
  188. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_X">View.X</a>
  189. </div>
  190. <div>
  191. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Y">View.Y</a>
  192. </div>
  193. <div>
  194. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Width">View.Width</a>
  195. </div>
  196. <div>
  197. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Height">View.Height</a>
  198. </div>
  199. <div>
  200. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ForceValidatePosDim">View.ForceValidatePosDim</a>
  201. </div>
  202. <div>
  203. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_GetMinWidthHeight_Terminal_Gui_Size__">View.GetMinWidthHeight(out Size)</a>
  204. </div>
  205. <div>
  206. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetMinWidthHeight">View.SetMinWidthHeight()</a>
  207. </div>
  208. <div>
  209. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_TextFormatter">View.TextFormatter</a>
  210. </div>
  211. <div>
  212. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SuperView">View.SuperView</a>
  213. </div>
  214. <div>
  215. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_UpdateTextFormatterText">View.UpdateTextFormatterText()</a>
  216. </div>
  217. <div>
  218. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ProcessResizeView">View.ProcessResizeView()</a>
  219. </div>
  220. <div>
  221. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetNeedsDisplay">View.SetNeedsDisplay()</a>
  222. </div>
  223. <div>
  224. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClearLayoutNeeded">View.ClearLayoutNeeded()</a>
  225. </div>
  226. <div>
  227. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetNeedsDisplay_Terminal_Gui_Rect_">View.SetNeedsDisplay(Rect)</a>
  228. </div>
  229. <div>
  230. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetChildNeedsDisplay">View.SetChildNeedsDisplay()</a>
  231. </div>
  232. <div>
  233. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View_">View.Add(View)</a>
  234. </div>
  235. <div>
  236. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View___">View.Add(params View[])</a>
  237. </div>
  238. <div>
  239. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_RemoveAll">View.RemoveAll()</a>
  240. </div>
  241. <div>
  242. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Remove_Terminal_Gui_View_">View.Remove(View)</a>
  243. </div>
  244. <div>
  245. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_BringSubviewToFront_Terminal_Gui_View_">View.BringSubviewToFront(View)</a>
  246. </div>
  247. <div>
  248. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SendSubviewToBack_Terminal_Gui_View_">View.SendSubviewToBack(View)</a>
  249. </div>
  250. <div>
  251. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SendSubviewBackwards_Terminal_Gui_View_">View.SendSubviewBackwards(View)</a>
  252. </div>
  253. <div>
  254. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_BringSubviewForward_Terminal_Gui_View_">View.BringSubviewForward(View)</a>
  255. </div>
  256. <div>
  257. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Clear">View.Clear()</a>
  258. </div>
  259. <div>
  260. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Clear_Terminal_Gui_Rect_">View.Clear(Rect)</a>
  261. </div>
  262. <div>
  263. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ScreenToView_System_Int32_System_Int32_">View.ScreenToView(int, int)</a>
  264. </div>
  265. <div>
  266. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClipToBounds">View.ClipToBounds()</a>
  267. </div>
  268. <div>
  269. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetClip_Terminal_Gui_Rect_">View.SetClip(Rect)</a>
  270. </div>
  271. <div>
  272. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_DrawFrame_Terminal_Gui_Rect_System_Int32_System_Boolean_">View.DrawFrame(Rect, int, bool)</a>
  273. </div>
  274. <div>
  275. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_DrawHotString_NStack_ustring_Terminal_Gui_Attribute_Terminal_Gui_Attribute_">View.DrawHotString(ustring, Attribute, Attribute)</a>
  276. </div>
  277. <div>
  278. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_DrawHotString_NStack_ustring_System_Boolean_Terminal_Gui_ColorScheme_">View.DrawHotString(ustring, bool, ColorScheme)</a>
  279. </div>
  280. <div>
  281. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Move_System_Int32_System_Int32_System_Boolean_">View.Move(int, int, bool)</a>
  282. </div>
  283. <div>
  284. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_HasFocus">View.HasFocus</a>
  285. </div>
  286. <div>
  287. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnAdded_Terminal_Gui_View_">View.OnAdded(View)</a>
  288. </div>
  289. <div>
  290. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnRemoved_Terminal_Gui_View_">View.OnRemoved(View)</a>
  291. </div>
  292. <div>
  293. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Focused">View.Focused</a>
  294. </div>
  295. <div>
  296. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_MostFocused">View.MostFocused</a>
  297. </div>
  298. <div>
  299. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ColorScheme">View.ColorScheme</a>
  300. </div>
  301. <div>
  302. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_AddRune_System_Int32_System_Int32_System_Rune_">View.AddRune(int, int, Rune)</a>
  303. </div>
  304. <div>
  305. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClearNeedsDisplay">View.ClearNeedsDisplay()</a>
  306. </div>
  307. <div>
  308. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_DrawContent">View.DrawContent</a>
  309. </div>
  310. <div>
  311. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnDrawContent_Terminal_Gui_Rect_">View.OnDrawContent(Rect)</a>
  312. </div>
  313. <div>
  314. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_DrawContentComplete">View.DrawContentComplete</a>
  315. </div>
  316. <div>
  317. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnDrawContentComplete_Terminal_Gui_Rect_">View.OnDrawContentComplete(Rect)</a>
  318. </div>
  319. <div>
  320. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetFocus">View.SetFocus()</a>
  321. </div>
  322. <div>
  323. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_KeyPress">View.KeyPress</a>
  324. </div>
  325. <div>
  326. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_InvokeKeybindings_Terminal_Gui_KeyEvent_">View.InvokeKeybindings(KeyEvent)</a>
  327. </div>
  328. <div>
  329. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_AddKeyBinding_Terminal_Gui_Key_Terminal_Gui_Command___">View.AddKeyBinding(Key, params Command[])</a>
  330. </div>
  331. <div>
  332. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ReplaceKeyBinding_Terminal_Gui_Key_Terminal_Gui_Key_">View.ReplaceKeyBinding(Key, Key)</a>
  333. </div>
  334. <div>
  335. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ContainsKeyBinding_Terminal_Gui_Key_">View.ContainsKeyBinding(Key)</a>
  336. </div>
  337. <div>
  338. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClearKeybindings">View.ClearKeybindings()</a>
  339. </div>
  340. <div>
  341. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClearKeybinding_Terminal_Gui_Key_">View.ClearKeybinding(Key)</a>
  342. </div>
  343. <div>
  344. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClearKeybinding_Terminal_Gui_Command___">View.ClearKeybinding(params Command[])</a>
  345. </div>
  346. <div>
  347. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_AddCommand_Terminal_Gui_Command_System_Func_System_Nullable_System_Boolean___">View.AddCommand(Command, Func&lt;bool?&gt;)</a>
  348. </div>
  349. <div>
  350. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_GetSupportedCommands">View.GetSupportedCommands()</a>
  351. </div>
  352. <div>
  353. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_GetKeyFromCommand_Terminal_Gui_Command___">View.GetKeyFromCommand(params Command[])</a>
  354. </div>
  355. <div>
  356. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_KeyDown">View.KeyDown</a>
  357. </div>
  358. <div>
  359. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_KeyUp">View.KeyUp</a>
  360. </div>
  361. <div>
  362. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_EnsureFocus">View.EnsureFocus()</a>
  363. </div>
  364. <div>
  365. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusFirst">View.FocusFirst()</a>
  366. </div>
  367. <div>
  368. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusLast">View.FocusLast()</a>
  369. </div>
  370. <div>
  371. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusPrev">View.FocusPrev()</a>
  372. </div>
  373. <div>
  374. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_FocusNext">View.FocusNext()</a>
  375. </div>
  376. <div>
  377. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutStarted">View.LayoutStarted</a>
  378. </div>
  379. <div>
  380. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutComplete">View.LayoutComplete</a>
  381. </div>
  382. <div>
  383. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Initialized">View.Initialized</a>
  384. </div>
  385. <div>
  386. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_LayoutSubviews">View.LayoutSubviews()</a>
  387. </div>
  388. <div>
  389. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Text">View.Text</a>
  390. </div>
  391. <div>
  392. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_AutoSize">View.AutoSize</a>
  393. </div>
  394. <div>
  395. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_PreserveTrailingSpaces">View.PreserveTrailingSpaces</a>
  396. </div>
  397. <div>
  398. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_TextAlignment">View.TextAlignment</a>
  399. </div>
  400. <div>
  401. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_VerticalTextAlignment">View.VerticalTextAlignment</a>
  402. </div>
  403. <div>
  404. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_TextDirection">View.TextDirection</a>
  405. </div>
  406. <div>
  407. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_IsInitialized">View.IsInitialized</a>
  408. </div>
  409. <div>
  410. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_IsAdded">View.IsAdded</a>
  411. </div>
  412. <div>
  413. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Enabled">View.Enabled</a>
  414. </div>
  415. <div>
  416. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ClearOnVisibleFalse">View.ClearOnVisibleFalse</a>
  417. </div>
  418. <div>
  419. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Border">View.Border</a>
  420. </div>
  421. <div>
  422. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_IgnoreBorderPropertyOnRedraw">View.IgnoreBorderPropertyOnRedraw</a>
  423. </div>
  424. <div>
  425. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ToString">View.ToString()</a>
  426. </div>
  427. <div>
  428. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_GetAutoSize">View.GetAutoSize()</a>
  429. </div>
  430. <div>
  431. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_GetHotKeySpecifierLength_System_Boolean_">View.GetHotKeySpecifierLength(bool)</a>
  432. </div>
  433. <div>
  434. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_GetTextFormatterBoundsSize">View.GetTextFormatterBoundsSize()</a>
  435. </div>
  436. <div>
  437. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_GetBoundsTextFormatterSize">View.GetBoundsTextFormatterSize()</a>
  438. </div>
  439. <div>
  440. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseEnter_Terminal_Gui_MouseEvent_">View.OnMouseEnter(MouseEvent)</a>
  441. </div>
  442. <div>
  443. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseLeave_Terminal_Gui_MouseEvent_">View.OnMouseLeave(MouseEvent)</a>
  444. </div>
  445. <div>
  446. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseEvent_Terminal_Gui_MouseEvent_">View.OnMouseEvent(MouseEvent)</a>
  447. </div>
  448. <div>
  449. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnMouseClick_Terminal_Gui_View_MouseEventArgs_">View.OnMouseClick(View.MouseEventArgs)</a>
  450. </div>
  451. <div>
  452. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnCanFocusChanged">View.OnCanFocusChanged()</a>
  453. </div>
  454. <div>
  455. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnEnabledChanged">View.OnEnabledChanged()</a>
  456. </div>
  457. <div>
  458. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnVisibleChanged">View.OnVisibleChanged()</a>
  459. </div>
  460. <div>
  461. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Dispose_System_Boolean_">View.Dispose(bool)</a>
  462. </div>
  463. <div>
  464. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_BeginInit">View.BeginInit()</a>
  465. </div>
  466. <div>
  467. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_EndInit">View.EndInit()</a>
  468. </div>
  469. <div>
  470. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetWidth_System_Int32_System_Int32__">View.SetWidth(int, out int)</a>
  471. </div>
  472. <div>
  473. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_SetHeight_System_Int32_System_Int32__">View.SetHeight(int, out int)</a>
  474. </div>
  475. <div>
  476. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_GetCurrentWidth_System_Int32__">View.GetCurrentWidth(out int)</a>
  477. </div>
  478. <div>
  479. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_GetCurrentHeight_System_Int32__">View.GetCurrentHeight(out int)</a>
  480. </div>
  481. <div>
  482. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_GetNormalColor">View.GetNormalColor()</a>
  483. </div>
  484. <div>
  485. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_GetFocusColor">View.GetFocusColor()</a>
  486. </div>
  487. <div>
  488. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_GetHotNormalColor">View.GetHotNormalColor()</a>
  489. </div>
  490. <div>
  491. <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_GetTopSuperView">View.GetTopSuperView()</a>
  492. </div>
  493. <div>
  494. <a class="xref" href="Terminal.Gui.Responder.html#Terminal_Gui_Responder_Dispose">Responder.Dispose()</a>
  495. </div>
  496. <div>
  497. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
  498. </div>
  499. <div>
  500. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
  501. </div>
  502. <div>
  503. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
  504. </div>
  505. <div>
  506. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
  507. </div>
  508. <div>
  509. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
  510. </div>
  511. <div>
  512. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
  513. </div>
  514. </div>
  515. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.html">Terminal</a>.<a class="xref" href="Terminal.Gui.html">Gui</a></h6>
  516. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  517. <h5 id="Terminal_Gui_MenuBar_syntax">Syntax</h5>
  518. <div class="codewrapper">
  519. <pre><code class="lang-csharp hljs">public class MenuBar : View, IDisposable, ISupportInitializeNotification, ISupportInitialize</code></pre>
  520. </div>
  521. <h5 id="Terminal_Gui_MenuBar_remarks"><strong>Remarks</strong></h5>
  522. <div class="markdown level0 remarks"><p>
  523. The <a class="xref" href="Terminal.Gui.MenuBar.html">MenuBar</a> appears on the first row of the parent <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> View and uses the full width.
  524. </p>
  525. <p>
  526. The <a class="xref" href="Terminal.Gui.MenuBar.html">MenuBar</a> provides global hotkeys for the application. See <a class="xref" href="Terminal.Gui.MenuItem.html#Terminal_Gui_MenuItem_HotKey">HotKey</a>.
  527. </p>
  528. <p>
  529. See also: <a class="xref" href="Terminal.Gui.ContextMenu.html">ContextMenu</a>
  530. </p></div>
  531. <h3 id="constructors">Constructors
  532. </h3>
  533. <span class="small pull-right mobile-hide">
  534. <span class="divider">|</span>
  535. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar__ctor.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.%23ctor%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  536. </span>
  537. <span class="small pull-right mobile-hide">
  538. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L960">View Source</a>
  539. </span>
  540. <a id="Terminal_Gui_MenuBar__ctor_" data-uid="Terminal.Gui.MenuBar.#ctor*"></a>
  541. <h4 id="Terminal_Gui_MenuBar__ctor" data-uid="Terminal.Gui.MenuBar.#ctor">MenuBar()</h4>
  542. <div class="markdown level1 summary">Initializes a new instance of the <a class="xref" href="Terminal.Gui.MenuBar.html">MenuBar</a>.</div>
  543. <div class="markdown level1 conceptual"></div>
  544. <h5 class="declaration">Declaration</h5>
  545. <div class="codewrapper">
  546. <pre><code class="lang-csharp hljs">public MenuBar()</code></pre>
  547. </div>
  548. <span class="small pull-right mobile-hide">
  549. <span class="divider">|</span>
  550. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar__ctor_Terminal_Gui_MenuBarItem___.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.%23ctor(Terminal.Gui.MenuBarItem%5B%5D)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  551. </span>
  552. <span class="small pull-right mobile-hide">
  553. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L966">View Source</a>
  554. </span>
  555. <a id="Terminal_Gui_MenuBar__ctor_" data-uid="Terminal.Gui.MenuBar.#ctor*"></a>
  556. <h4 id="Terminal_Gui_MenuBar__ctor_Terminal_Gui_MenuBarItem___" data-uid="Terminal.Gui.MenuBar.#ctor(Terminal.Gui.MenuBarItem[])">MenuBar(MenuBarItem[])</h4>
  557. <div class="markdown level1 summary">Initializes a new instance of the <a class="xref" href="Terminal.Gui.MenuBar.html">MenuBar</a> class with the specified set of toplevel menu items.</div>
  558. <div class="markdown level1 conceptual"></div>
  559. <h5 class="declaration">Declaration</h5>
  560. <div class="codewrapper">
  561. <pre><code class="lang-csharp hljs">public MenuBar(MenuBarItem[] menus)</code></pre>
  562. </div>
  563. <h5 class="parameters">Parameters</h5>
  564. <table class="table table-bordered table-condensed">
  565. <thead>
  566. <tr>
  567. <th>Type</th>
  568. <th>Name</th>
  569. <th>Description</th>
  570. </tr>
  571. </thead>
  572. <tbody>
  573. <tr>
  574. <td><a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a>[]</td>
  575. <td><span class="parametername">menus</span></td>
  576. <td>Individual menu items; a null item will result in a separator being drawn.</td>
  577. </tr>
  578. </tbody>
  579. </table>
  580. <h3 id="properties">Properties
  581. </h3>
  582. <span class="small pull-right mobile-hide">
  583. <span class="divider">|</span>
  584. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_HotKeySpecifier.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.HotKeySpecifier%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  585. </span>
  586. <span class="small pull-right mobile-hide">
  587. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L916">View Source</a>
  588. </span>
  589. <a id="Terminal_Gui_MenuBar_HotKeySpecifier_" data-uid="Terminal.Gui.MenuBar.HotKeySpecifier*"></a>
  590. <h4 id="Terminal_Gui_MenuBar_HotKeySpecifier" data-uid="Terminal.Gui.MenuBar.HotKeySpecifier">HotKeySpecifier</h4>
  591. <div class="markdown level1 summary">The specifier character for the hotkey to all menus.</div>
  592. <div class="markdown level1 conceptual"></div>
  593. <h5 class="declaration">Declaration</h5>
  594. <div class="codewrapper">
  595. <pre><code class="lang-csharp hljs">public static Rune HotKeySpecifier { get; }</code></pre>
  596. </div>
  597. <h5 class="propertyValue">Property Value</h5>
  598. <table class="table table-bordered table-condensed">
  599. <thead>
  600. <tr>
  601. <th>Type</th>
  602. <th>Description</th>
  603. </tr>
  604. </thead>
  605. <tbody>
  606. <tr>
  607. <td><span class="xref">Rune</span></td>
  608. <td></td>
  609. </tr>
  610. </tbody>
  611. </table>
  612. <span class="small pull-right mobile-hide">
  613. <span class="divider">|</span>
  614. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_IsMenuOpen.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.IsMenuOpen%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  615. </span>
  616. <span class="small pull-right mobile-hide">
  617. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1195">View Source</a>
  618. </span>
  619. <a id="Terminal_Gui_MenuBar_IsMenuOpen_" data-uid="Terminal.Gui.MenuBar.IsMenuOpen*"></a>
  620. <h4 id="Terminal_Gui_MenuBar_IsMenuOpen" data-uid="Terminal.Gui.MenuBar.IsMenuOpen">IsMenuOpen</h4>
  621. <div class="markdown level1 summary"><a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> if the menu is open; otherwise <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>.</div>
  622. <div class="markdown level1 conceptual"></div>
  623. <h5 class="declaration">Declaration</h5>
  624. <div class="codewrapper">
  625. <pre><code class="lang-csharp hljs">public bool IsMenuOpen { get; protected set; }</code></pre>
  626. </div>
  627. <h5 class="propertyValue">Property Value</h5>
  628. <table class="table table-bordered table-condensed">
  629. <thead>
  630. <tr>
  631. <th>Type</th>
  632. <th>Description</th>
  633. </tr>
  634. </thead>
  635. <tbody>
  636. <tr>
  637. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  638. <td></td>
  639. </tr>
  640. </tbody>
  641. </table>
  642. <span class="small pull-right mobile-hide">
  643. <span class="divider">|</span>
  644. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_Key.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.Key%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  645. </span>
  646. <span class="small pull-right mobile-hide">
  647. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L944">View Source</a>
  648. </span>
  649. <a id="Terminal_Gui_MenuBar_Key_" data-uid="Terminal.Gui.MenuBar.Key*"></a>
  650. <h4 id="Terminal_Gui_MenuBar_Key" data-uid="Terminal.Gui.MenuBar.Key">Key</h4>
  651. <div class="markdown level1 summary">The <a class="xref" href="Terminal.Gui.Key.html">Key</a> used to activate the menu bar by keyboard.</div>
  652. <div class="markdown level1 conceptual"></div>
  653. <h5 class="declaration">Declaration</h5>
  654. <div class="codewrapper">
  655. <pre><code class="lang-csharp hljs">public Key Key { get; set; }</code></pre>
  656. </div>
  657. <h5 class="propertyValue">Property Value</h5>
  658. <table class="table table-bordered table-condensed">
  659. <thead>
  660. <tr>
  661. <th>Type</th>
  662. <th>Description</th>
  663. </tr>
  664. </thead>
  665. <tbody>
  666. <tr>
  667. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  668. <td></td>
  669. </tr>
  670. </tbody>
  671. </table>
  672. <span class="small pull-right mobile-hide">
  673. <span class="divider">|</span>
  674. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_LastFocused.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.LastFocused%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  675. </span>
  676. <span class="small pull-right mobile-hide">
  677. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1253">View Source</a>
  678. </span>
  679. <a id="Terminal_Gui_MenuBar_LastFocused_" data-uid="Terminal.Gui.MenuBar.LastFocused*"></a>
  680. <h4 id="Terminal_Gui_MenuBar_LastFocused" data-uid="Terminal.Gui.MenuBar.LastFocused">LastFocused</h4>
  681. <div class="markdown level1 summary">Gets the view that was last focused before opening the menu.</div>
  682. <div class="markdown level1 conceptual"></div>
  683. <h5 class="declaration">Declaration</h5>
  684. <div class="codewrapper">
  685. <pre><code class="lang-csharp hljs">public View LastFocused { get; }</code></pre>
  686. </div>
  687. <h5 class="propertyValue">Property Value</h5>
  688. <table class="table table-bordered table-condensed">
  689. <thead>
  690. <tr>
  691. <th>Type</th>
  692. <th>Description</th>
  693. </tr>
  694. </thead>
  695. <tbody>
  696. <tr>
  697. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  698. <td></td>
  699. </tr>
  700. </tbody>
  701. </table>
  702. <span class="small pull-right mobile-hide">
  703. <span class="divider">|</span>
  704. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_Menus.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.Menus%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  705. </span>
  706. <span class="small pull-right mobile-hide">
  707. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L882">View Source</a>
  708. </span>
  709. <a id="Terminal_Gui_MenuBar_Menus_" data-uid="Terminal.Gui.MenuBar.Menus*"></a>
  710. <h4 id="Terminal_Gui_MenuBar_Menus" data-uid="Terminal.Gui.MenuBar.Menus">Menus</h4>
  711. <div class="markdown level1 summary">Gets or sets the array of <a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a>s for the menu. Only set this after the <a class="xref" href="Terminal.Gui.MenuBar.html">MenuBar</a> is visible.</div>
  712. <div class="markdown level1 conceptual"></div>
  713. <h5 class="declaration">Declaration</h5>
  714. <div class="codewrapper">
  715. <pre><code class="lang-csharp hljs">public MenuBarItem[] Menus { get; set; }</code></pre>
  716. </div>
  717. <h5 class="propertyValue">Property Value</h5>
  718. <table class="table table-bordered table-condensed">
  719. <thead>
  720. <tr>
  721. <th>Type</th>
  722. <th>Description</th>
  723. </tr>
  724. </thead>
  725. <tbody>
  726. <tr>
  727. <td><a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a>[]</td>
  728. <td>The menu array.</td>
  729. </tr>
  730. </tbody>
  731. </table>
  732. <span class="small pull-right mobile-hide">
  733. <span class="divider">|</span>
  734. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_ShortcutDelimiter.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.ShortcutDelimiter%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  735. </span>
  736. <span class="small pull-right mobile-hide">
  737. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L904">View Source</a>
  738. </span>
  739. <a id="Terminal_Gui_MenuBar_ShortcutDelimiter_" data-uid="Terminal.Gui.MenuBar.ShortcutDelimiter*"></a>
  740. <h4 id="Terminal_Gui_MenuBar_ShortcutDelimiter" data-uid="Terminal.Gui.MenuBar.ShortcutDelimiter">ShortcutDelimiter</h4>
  741. <div class="markdown level1 summary">Sets or gets the shortcut delimiter separator. The default is "+".</div>
  742. <div class="markdown level1 conceptual"></div>
  743. <h5 class="declaration">Declaration</h5>
  744. <div class="codewrapper">
  745. <pre><code class="lang-csharp hljs">public static ustring ShortcutDelimiter { get; set; }</code></pre>
  746. </div>
  747. <h5 class="propertyValue">Property Value</h5>
  748. <table class="table table-bordered table-condensed">
  749. <thead>
  750. <tr>
  751. <th>Type</th>
  752. <th>Description</th>
  753. </tr>
  754. </thead>
  755. <tbody>
  756. <tr>
  757. <td><span class="xref">ustring</span></td>
  758. <td></td>
  759. </tr>
  760. </tbody>
  761. </table>
  762. <span class="small pull-right mobile-hide">
  763. <span class="divider">|</span>
  764. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_UseKeysUpDownAsKeysLeftRight.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.UseKeysUpDownAsKeysLeftRight%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  765. </span>
  766. <span class="small pull-right mobile-hide">
  767. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L889">View Source</a>
  768. </span>
  769. <a id="Terminal_Gui_MenuBar_UseKeysUpDownAsKeysLeftRight_" data-uid="Terminal.Gui.MenuBar.UseKeysUpDownAsKeysLeftRight*"></a>
  770. <h4 id="Terminal_Gui_MenuBar_UseKeysUpDownAsKeysLeftRight" data-uid="Terminal.Gui.MenuBar.UseKeysUpDownAsKeysLeftRight">UseKeysUpDownAsKeysLeftRight</h4>
  771. <div class="markdown level1 summary">Used for change the navigation key style.</div>
  772. <div class="markdown level1 conceptual"></div>
  773. <h5 class="declaration">Declaration</h5>
  774. <div class="codewrapper">
  775. <pre><code class="lang-csharp hljs">public bool UseKeysUpDownAsKeysLeftRight { get; set; }</code></pre>
  776. </div>
  777. <h5 class="propertyValue">Property Value</h5>
  778. <table class="table table-bordered table-condensed">
  779. <thead>
  780. <tr>
  781. <th>Type</th>
  782. <th>Description</th>
  783. </tr>
  784. </thead>
  785. <tbody>
  786. <tr>
  787. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  788. <td></td>
  789. </tr>
  790. </tbody>
  791. </table>
  792. <span class="small pull-right mobile-hide">
  793. <span class="divider">|</span>
  794. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_UseSubMenusSingleFrame.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.UseSubMenusSingleFrame%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  795. </span>
  796. <span class="small pull-right mobile-hide">
  797. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L930">View Source</a>
  798. </span>
  799. <a id="Terminal_Gui_MenuBar_UseSubMenusSingleFrame_" data-uid="Terminal.Gui.MenuBar.UseSubMenusSingleFrame*"></a>
  800. <h4 id="Terminal_Gui_MenuBar_UseSubMenusSingleFrame" data-uid="Terminal.Gui.MenuBar.UseSubMenusSingleFrame">UseSubMenusSingleFrame</h4>
  801. <div class="markdown level1 summary">Gets or sets if the sub-menus must be displayed in a single or multiple frames.
  802. <p>
  803. By default any sub-sub-menus (sub-menus of the main <a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>s) are displayed in a cascading manner,
  804. where each sub-sub-menu pops out of the sub-menu frame
  805. (either to the right or left, depending on where the sub-menu is relative to the edge of the screen). By setting
  806. <a class="xref" href="Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_UseSubMenusSingleFrame">UseSubMenusSingleFrame</a> to <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>, this behavior can be changed such that all sub-sub-menus are
  807. drawn within a single frame below the MenuBar.
  808. </p></div>
  809. <div class="markdown level1 conceptual"></div>
  810. <h5 class="declaration">Declaration</h5>
  811. <div class="codewrapper">
  812. <pre><code class="lang-csharp hljs">public bool UseSubMenusSingleFrame { get; set; }</code></pre>
  813. </div>
  814. <h5 class="propertyValue">Property Value</h5>
  815. <table class="table table-bordered table-condensed">
  816. <thead>
  817. <tr>
  818. <th>Type</th>
  819. <th>Description</th>
  820. </tr>
  821. </thead>
  822. <tbody>
  823. <tr>
  824. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  825. <td></td>
  826. </tr>
  827. </tbody>
  828. </table>
  829. <span class="small pull-right mobile-hide">
  830. <span class="divider">|</span>
  831. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_Visible.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.Visible%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  832. </span>
  833. <span class="small pull-right mobile-hide">
  834. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L947">View Source</a>
  835. </span>
  836. <a id="Terminal_Gui_MenuBar_Visible_" data-uid="Terminal.Gui.MenuBar.Visible*"></a>
  837. <h4 id="Terminal_Gui_MenuBar_Visible" data-uid="Terminal.Gui.MenuBar.Visible">Visible</h4>
  838. <div class="markdown level1 summary">Gets or sets a value indicating whether this <a class="xref" href="Terminal.Gui.Responder.html">Responder</a> and all its child controls are displayed.</div>
  839. <div class="markdown level1 conceptual"></div>
  840. <h5 class="declaration">Declaration</h5>
  841. <div class="codewrapper">
  842. <pre><code class="lang-csharp hljs">public override bool Visible { get; set; }</code></pre>
  843. </div>
  844. <h5 class="propertyValue">Property Value</h5>
  845. <table class="table table-bordered table-condensed">
  846. <thead>
  847. <tr>
  848. <th>Type</th>
  849. <th>Description</th>
  850. </tr>
  851. </thead>
  852. <tbody>
  853. <tr>
  854. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  855. <td></td>
  856. </tr>
  857. </tbody>
  858. </table>
  859. <h5 class="overrides">Overrides</h5>
  860. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Visible">View.Visible</a></div>
  861. <h3 id="methods">Methods
  862. </h3>
  863. <span class="small pull-right mobile-hide">
  864. <span class="divider">|</span>
  865. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_CloseMenu_System_Boolean_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.CloseMenu(System.Boolean)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  866. </span>
  867. <span class="small pull-right mobile-hide">
  868. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1423">View Source</a>
  869. </span>
  870. <a id="Terminal_Gui_MenuBar_CloseMenu_" data-uid="Terminal.Gui.MenuBar.CloseMenu*"></a>
  871. <h4 id="Terminal_Gui_MenuBar_CloseMenu_System_Boolean_" data-uid="Terminal.Gui.MenuBar.CloseMenu(System.Boolean)">CloseMenu(bool)</h4>
  872. <div class="markdown level1 summary">Closes the Menu programmatically if open and not canceled (as though F9 were pressed).</div>
  873. <div class="markdown level1 conceptual"></div>
  874. <h5 class="declaration">Declaration</h5>
  875. <div class="codewrapper">
  876. <pre><code class="lang-csharp hljs">public bool CloseMenu(bool ignoreUseSubMenusSingleFrame = false)</code></pre>
  877. </div>
  878. <h5 class="parameters">Parameters</h5>
  879. <table class="table table-bordered table-condensed">
  880. <thead>
  881. <tr>
  882. <th>Type</th>
  883. <th>Name</th>
  884. <th>Description</th>
  885. </tr>
  886. </thead>
  887. <tbody>
  888. <tr>
  889. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  890. <td><span class="parametername">ignoreUseSubMenusSingleFrame</span></td>
  891. <td></td>
  892. </tr>
  893. </tbody>
  894. </table>
  895. <h5 class="returns">Returns</h5>
  896. <table class="table table-bordered table-condensed">
  897. <thead>
  898. <tr>
  899. <th>Type</th>
  900. <th>Description</th>
  901. </tr>
  902. </thead>
  903. <tbody>
  904. <tr>
  905. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  906. <td></td>
  907. </tr>
  908. </tbody>
  909. </table>
  910. <span class="small pull-right mobile-hide">
  911. <span class="divider">|</span>
  912. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_MouseEvent_Terminal_Gui_MouseEvent_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.MouseEvent(Terminal.Gui.MouseEvent)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  913. </span>
  914. <span class="small pull-right mobile-hide">
  915. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1853">View Source</a>
  916. </span>
  917. <a id="Terminal_Gui_MenuBar_MouseEvent_" data-uid="Terminal.Gui.MenuBar.MouseEvent*"></a>
  918. <h4 id="Terminal_Gui_MenuBar_MouseEvent_Terminal_Gui_MouseEvent_" data-uid="Terminal.Gui.MenuBar.MouseEvent(Terminal.Gui.MouseEvent)">MouseEvent(MouseEvent)</h4>
  919. <div class="markdown level1 summary">Method invoked when a mouse event is generated</div>
  920. <div class="markdown level1 conceptual"></div>
  921. <h5 class="declaration">Declaration</h5>
  922. <div class="codewrapper">
  923. <pre><code class="lang-csharp hljs">public override bool MouseEvent(MouseEvent me)</code></pre>
  924. </div>
  925. <h5 class="parameters">Parameters</h5>
  926. <table class="table table-bordered table-condensed">
  927. <thead>
  928. <tr>
  929. <th>Type</th>
  930. <th>Name</th>
  931. <th>Description</th>
  932. </tr>
  933. </thead>
  934. <tbody>
  935. <tr>
  936. <td><a class="xref" href="Terminal.Gui.MouseEvent.html">MouseEvent</a></td>
  937. <td><span class="parametername">me</span></td>
  938. <td></td>
  939. </tr>
  940. </tbody>
  941. </table>
  942. <h5 class="returns">Returns</h5>
  943. <table class="table table-bordered table-condensed">
  944. <thead>
  945. <tr>
  946. <th>Type</th>
  947. <th>Description</th>
  948. </tr>
  949. </thead>
  950. <tbody>
  951. <tr>
  952. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  953. <td><code>true</code>, if the event was handled, <code>false</code> otherwise.</td>
  954. </tr>
  955. </tbody>
  956. </table>
  957. <h5 class="overrides">Overrides</h5>
  958. <div><a class="xref" href="Terminal.Gui.Responder.html#Terminal_Gui_Responder_MouseEvent_Terminal_Gui_MouseEvent_">Responder.MouseEvent(MouseEvent)</a></div>
  959. <span class="small pull-right mobile-hide">
  960. <span class="divider">|</span>
  961. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_OnEnter_Terminal_Gui_View_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.OnEnter(Terminal.Gui.View)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  962. </span>
  963. <span class="small pull-right mobile-hide">
  964. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1999">View Source</a>
  965. </span>
  966. <a id="Terminal_Gui_MenuBar_OnEnter_" data-uid="Terminal.Gui.MenuBar.OnEnter*"></a>
  967. <h4 id="Terminal_Gui_MenuBar_OnEnter_Terminal_Gui_View_" data-uid="Terminal.Gui.MenuBar.OnEnter(Terminal.Gui.View)">OnEnter(View)</h4>
  968. <div class="markdown level1 summary">Method invoked when a view gets focus.</div>
  969. <div class="markdown level1 conceptual"></div>
  970. <h5 class="declaration">Declaration</h5>
  971. <div class="codewrapper">
  972. <pre><code class="lang-csharp hljs">public override bool OnEnter(View view)</code></pre>
  973. </div>
  974. <h5 class="parameters">Parameters</h5>
  975. <table class="table table-bordered table-condensed">
  976. <thead>
  977. <tr>
  978. <th>Type</th>
  979. <th>Name</th>
  980. <th>Description</th>
  981. </tr>
  982. </thead>
  983. <tbody>
  984. <tr>
  985. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  986. <td><span class="parametername">view</span></td>
  987. <td>The view that is losing focus.</td>
  988. </tr>
  989. </tbody>
  990. </table>
  991. <h5 class="returns">Returns</h5>
  992. <table class="table table-bordered table-condensed">
  993. <thead>
  994. <tr>
  995. <th>Type</th>
  996. <th>Description</th>
  997. </tr>
  998. </thead>
  999. <tbody>
  1000. <tr>
  1001. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  1002. <td><code>true</code>, if the event was handled, <code>false</code> otherwise.</td>
  1003. </tr>
  1004. </tbody>
  1005. </table>
  1006. <h5 class="overrides">Overrides</h5>
  1007. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnEnter_Terminal_Gui_View_">View.OnEnter(View)</a></div>
  1008. <span class="small pull-right mobile-hide">
  1009. <span class="divider">|</span>
  1010. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_OnKeyDown_Terminal_Gui_KeyEvent_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.OnKeyDown(Terminal.Gui.KeyEvent)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1011. </span>
  1012. <span class="small pull-right mobile-hide">
  1013. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1010">View Source</a>
  1014. </span>
  1015. <a id="Terminal_Gui_MenuBar_OnKeyDown_" data-uid="Terminal.Gui.MenuBar.OnKeyDown*"></a>
  1016. <h4 id="Terminal_Gui_MenuBar_OnKeyDown_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.MenuBar.OnKeyDown(Terminal.Gui.KeyEvent)">OnKeyDown(KeyEvent)</h4>
  1017. <div class="markdown level1 summary">Method invoked when a key is pressed.</div>
  1018. <div class="markdown level1 conceptual"></div>
  1019. <h5 class="declaration">Declaration</h5>
  1020. <div class="codewrapper">
  1021. <pre><code class="lang-csharp hljs">public override bool OnKeyDown(KeyEvent keyEvent)</code></pre>
  1022. </div>
  1023. <h5 class="parameters">Parameters</h5>
  1024. <table class="table table-bordered table-condensed">
  1025. <thead>
  1026. <tr>
  1027. <th>Type</th>
  1028. <th>Name</th>
  1029. <th>Description</th>
  1030. </tr>
  1031. </thead>
  1032. <tbody>
  1033. <tr>
  1034. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  1035. <td><span class="parametername">keyEvent</span></td>
  1036. <td>Contains the details about the key that produced the event.</td>
  1037. </tr>
  1038. </tbody>
  1039. </table>
  1040. <h5 class="returns">Returns</h5>
  1041. <table class="table table-bordered table-condensed">
  1042. <thead>
  1043. <tr>
  1044. <th>Type</th>
  1045. <th>Description</th>
  1046. </tr>
  1047. </thead>
  1048. <tbody>
  1049. <tr>
  1050. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  1051. <td>true if the event was handled</td>
  1052. </tr>
  1053. </tbody>
  1054. </table>
  1055. <h5 class="overrides">Overrides</h5>
  1056. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnKeyDown_Terminal_Gui_KeyEvent_">View.OnKeyDown(KeyEvent)</a></div>
  1057. <span class="small pull-right mobile-hide">
  1058. <span class="divider">|</span>
  1059. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_OnKeyUp_Terminal_Gui_KeyEvent_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.OnKeyUp(Terminal.Gui.KeyEvent)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1060. </span>
  1061. <span class="small pull-right mobile-hide">
  1062. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1021">View Source</a>
  1063. </span>
  1064. <a id="Terminal_Gui_MenuBar_OnKeyUp_" data-uid="Terminal.Gui.MenuBar.OnKeyUp*"></a>
  1065. <h4 id="Terminal_Gui_MenuBar_OnKeyUp_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.MenuBar.OnKeyUp(Terminal.Gui.KeyEvent)">OnKeyUp(KeyEvent)</h4>
  1066. <div class="markdown level1 summary">Method invoked when a key is released.</div>
  1067. <div class="markdown level1 conceptual"></div>
  1068. <h5 class="declaration">Declaration</h5>
  1069. <div class="codewrapper">
  1070. <pre><code class="lang-csharp hljs">public override bool OnKeyUp(KeyEvent keyEvent)</code></pre>
  1071. </div>
  1072. <h5 class="parameters">Parameters</h5>
  1073. <table class="table table-bordered table-condensed">
  1074. <thead>
  1075. <tr>
  1076. <th>Type</th>
  1077. <th>Name</th>
  1078. <th>Description</th>
  1079. </tr>
  1080. </thead>
  1081. <tbody>
  1082. <tr>
  1083. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  1084. <td><span class="parametername">keyEvent</span></td>
  1085. <td>Contains the details about the key that produced the event.</td>
  1086. </tr>
  1087. </tbody>
  1088. </table>
  1089. <h5 class="returns">Returns</h5>
  1090. <table class="table table-bordered table-condensed">
  1091. <thead>
  1092. <tr>
  1093. <th>Type</th>
  1094. <th>Description</th>
  1095. </tr>
  1096. </thead>
  1097. <tbody>
  1098. <tr>
  1099. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  1100. <td>true if the event was handled</td>
  1101. </tr>
  1102. </tbody>
  1103. </table>
  1104. <h5 class="overrides">Overrides</h5>
  1105. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnKeyUp_Terminal_Gui_KeyEvent_">View.OnKeyUp(KeyEvent)</a></div>
  1106. <span class="small pull-right mobile-hide">
  1107. <span class="divider">|</span>
  1108. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_OnLeave_Terminal_Gui_View_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.OnLeave(Terminal.Gui.View)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1109. </span>
  1110. <span class="small pull-right mobile-hide">
  1111. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1000">View Source</a>
  1112. </span>
  1113. <a id="Terminal_Gui_MenuBar_OnLeave_" data-uid="Terminal.Gui.MenuBar.OnLeave*"></a>
  1114. <h4 id="Terminal_Gui_MenuBar_OnLeave_Terminal_Gui_View_" data-uid="Terminal.Gui.MenuBar.OnLeave(Terminal.Gui.View)">OnLeave(View)</h4>
  1115. <div class="markdown level1 summary">Method invoked when a view loses focus.</div>
  1116. <div class="markdown level1 conceptual"></div>
  1117. <h5 class="declaration">Declaration</h5>
  1118. <div class="codewrapper">
  1119. <pre><code class="lang-csharp hljs">public override bool OnLeave(View view)</code></pre>
  1120. </div>
  1121. <h5 class="parameters">Parameters</h5>
  1122. <table class="table table-bordered table-condensed">
  1123. <thead>
  1124. <tr>
  1125. <th>Type</th>
  1126. <th>Name</th>
  1127. <th>Description</th>
  1128. </tr>
  1129. </thead>
  1130. <tbody>
  1131. <tr>
  1132. <td><a class="xref" href="Terminal.Gui.View.html">View</a></td>
  1133. <td><span class="parametername">view</span></td>
  1134. <td>The view that is getting focus.</td>
  1135. </tr>
  1136. </tbody>
  1137. </table>
  1138. <h5 class="returns">Returns</h5>
  1139. <table class="table table-bordered table-condensed">
  1140. <thead>
  1141. <tr>
  1142. <th>Type</th>
  1143. <th>Description</th>
  1144. </tr>
  1145. </thead>
  1146. <tbody>
  1147. <tr>
  1148. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  1149. <td><code>true</code>, if the event was handled, <code>false</code> otherwise.</td>
  1150. </tr>
  1151. </tbody>
  1152. </table>
  1153. <h5 class="overrides">Overrides</h5>
  1154. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_OnLeave_Terminal_Gui_View_">View.OnLeave(View)</a></div>
  1155. <span class="small pull-right mobile-hide">
  1156. <span class="divider">|</span>
  1157. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_OnMenuAllClosed.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.OnMenuAllClosed%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1158. </span>
  1159. <span class="small pull-right mobile-hide">
  1160. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1243">View Source</a>
  1161. </span>
  1162. <a id="Terminal_Gui_MenuBar_OnMenuAllClosed_" data-uid="Terminal.Gui.MenuBar.OnMenuAllClosed*"></a>
  1163. <h4 id="Terminal_Gui_MenuBar_OnMenuAllClosed" data-uid="Terminal.Gui.MenuBar.OnMenuAllClosed">OnMenuAllClosed()</h4>
  1164. <div class="markdown level1 summary">Virtual method that will invoke the <a class="xref" href="Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_MenuAllClosed">MenuAllClosed</a>.</div>
  1165. <div class="markdown level1 conceptual"></div>
  1166. <h5 class="declaration">Declaration</h5>
  1167. <div class="codewrapper">
  1168. <pre><code class="lang-csharp hljs">public virtual void OnMenuAllClosed()</code></pre>
  1169. </div>
  1170. <span class="small pull-right mobile-hide">
  1171. <span class="divider">|</span>
  1172. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_OnMenuClosing_Terminal_Gui_MenuBarItem_System_Boolean_System_Boolean_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.OnMenuClosing(Terminal.Gui.MenuBarItem%2CSystem.Boolean%2CSystem.Boolean)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1173. </span>
  1174. <span class="small pull-right mobile-hide">
  1175. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1233">View Source</a>
  1176. </span>
  1177. <a id="Terminal_Gui_MenuBar_OnMenuClosing_" data-uid="Terminal.Gui.MenuBar.OnMenuClosing*"></a>
  1178. <h4 id="Terminal_Gui_MenuBar_OnMenuClosing_Terminal_Gui_MenuBarItem_System_Boolean_System_Boolean_" data-uid="Terminal.Gui.MenuBar.OnMenuClosing(Terminal.Gui.MenuBarItem,System.Boolean,System.Boolean)">OnMenuClosing(MenuBarItem, bool, bool)</h4>
  1179. <div class="markdown level1 summary">Virtual method that will invoke the <a class="xref" href="Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_MenuClosing">MenuClosing</a>.</div>
  1180. <div class="markdown level1 conceptual"></div>
  1181. <h5 class="declaration">Declaration</h5>
  1182. <div class="codewrapper">
  1183. <pre><code class="lang-csharp hljs">public virtual MenuClosingEventArgs OnMenuClosing(MenuBarItem currentMenu, bool reopen, bool isSubMenu)</code></pre>
  1184. </div>
  1185. <h5 class="parameters">Parameters</h5>
  1186. <table class="table table-bordered table-condensed">
  1187. <thead>
  1188. <tr>
  1189. <th>Type</th>
  1190. <th>Name</th>
  1191. <th>Description</th>
  1192. </tr>
  1193. </thead>
  1194. <tbody>
  1195. <tr>
  1196. <td><a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a></td>
  1197. <td><span class="parametername">currentMenu</span></td>
  1198. <td>The current menu to be closed.</td>
  1199. </tr>
  1200. <tr>
  1201. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  1202. <td><span class="parametername">reopen</span></td>
  1203. <td>Whether the current menu will be reopen.</td>
  1204. </tr>
  1205. <tr>
  1206. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  1207. <td><span class="parametername">isSubMenu</span></td>
  1208. <td>Whether is a sub-menu or not.</td>
  1209. </tr>
  1210. </tbody>
  1211. </table>
  1212. <h5 class="returns">Returns</h5>
  1213. <table class="table table-bordered table-condensed">
  1214. <thead>
  1215. <tr>
  1216. <th>Type</th>
  1217. <th>Description</th>
  1218. </tr>
  1219. </thead>
  1220. <tbody>
  1221. <tr>
  1222. <td><a class="xref" href="Terminal.Gui.MenuClosingEventArgs.html">MenuClosingEventArgs</a></td>
  1223. <td></td>
  1224. </tr>
  1225. </tbody>
  1226. </table>
  1227. <span class="small pull-right mobile-hide">
  1228. <span class="divider">|</span>
  1229. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_OnMenuOpened.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.OnMenuOpened%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1230. </span>
  1231. <span class="small pull-right mobile-hide">
  1232. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1212">View Source</a>
  1233. </span>
  1234. <a id="Terminal_Gui_MenuBar_OnMenuOpened_" data-uid="Terminal.Gui.MenuBar.OnMenuOpened*"></a>
  1235. <h4 id="Terminal_Gui_MenuBar_OnMenuOpened" data-uid="Terminal.Gui.MenuBar.OnMenuOpened">OnMenuOpened()</h4>
  1236. <div class="markdown level1 summary">Virtual method that will invoke the <a class="xref" href="Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_MenuOpened">MenuOpened</a> event if it's defined.</div>
  1237. <div class="markdown level1 conceptual"></div>
  1238. <h5 class="declaration">Declaration</h5>
  1239. <div class="codewrapper">
  1240. <pre><code class="lang-csharp hljs">public virtual void OnMenuOpened()</code></pre>
  1241. </div>
  1242. <span class="small pull-right mobile-hide">
  1243. <span class="divider">|</span>
  1244. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_OnMenuOpening_Terminal_Gui_MenuBarItem_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.OnMenuOpening(Terminal.Gui.MenuBarItem)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1245. </span>
  1246. <span class="small pull-right mobile-hide">
  1247. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1202">View Source</a>
  1248. </span>
  1249. <a id="Terminal_Gui_MenuBar_OnMenuOpening_" data-uid="Terminal.Gui.MenuBar.OnMenuOpening*"></a>
  1250. <h4 id="Terminal_Gui_MenuBar_OnMenuOpening_Terminal_Gui_MenuBarItem_" data-uid="Terminal.Gui.MenuBar.OnMenuOpening(Terminal.Gui.MenuBarItem)">OnMenuOpening(MenuBarItem)</h4>
  1251. <div class="markdown level1 summary">Virtual method that will invoke the <a class="xref" href="Terminal.Gui.MenuBar.html#Terminal_Gui_MenuBar_MenuOpening">MenuOpening</a> event if it's defined.</div>
  1252. <div class="markdown level1 conceptual"></div>
  1253. <h5 class="declaration">Declaration</h5>
  1254. <div class="codewrapper">
  1255. <pre><code class="lang-csharp hljs">public virtual MenuOpeningEventArgs OnMenuOpening(MenuBarItem currentMenu)</code></pre>
  1256. </div>
  1257. <h5 class="parameters">Parameters</h5>
  1258. <table class="table table-bordered table-condensed">
  1259. <thead>
  1260. <tr>
  1261. <th>Type</th>
  1262. <th>Name</th>
  1263. <th>Description</th>
  1264. </tr>
  1265. </thead>
  1266. <tbody>
  1267. <tr>
  1268. <td><a class="xref" href="Terminal.Gui.MenuBarItem.html">MenuBarItem</a></td>
  1269. <td><span class="parametername">currentMenu</span></td>
  1270. <td>The current menu to be replaced.</td>
  1271. </tr>
  1272. </tbody>
  1273. </table>
  1274. <h5 class="returns">Returns</h5>
  1275. <table class="table table-bordered table-condensed">
  1276. <thead>
  1277. <tr>
  1278. <th>Type</th>
  1279. <th>Description</th>
  1280. </tr>
  1281. </thead>
  1282. <tbody>
  1283. <tr>
  1284. <td><a class="xref" href="Terminal.Gui.MenuOpeningEventArgs.html">MenuOpeningEventArgs</a></td>
  1285. <td>Returns the <a class="xref" href="Terminal.Gui.MenuOpeningEventArgs.html">MenuOpeningEventArgs</a></td>
  1286. </tr>
  1287. </tbody>
  1288. </table>
  1289. <span class="small pull-right mobile-hide">
  1290. <span class="divider">|</span>
  1291. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_OpenMenu.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.OpenMenu%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1292. </span>
  1293. <span class="small pull-right mobile-hide">
  1294. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1341">View Source</a>
  1295. </span>
  1296. <a id="Terminal_Gui_MenuBar_OpenMenu_" data-uid="Terminal.Gui.MenuBar.OpenMenu*"></a>
  1297. <h4 id="Terminal_Gui_MenuBar_OpenMenu" data-uid="Terminal.Gui.MenuBar.OpenMenu">OpenMenu()</h4>
  1298. <div class="markdown level1 summary">Opens the Menu programatically, as though the F9 key were pressed.</div>
  1299. <div class="markdown level1 conceptual"></div>
  1300. <h5 class="declaration">Declaration</h5>
  1301. <div class="codewrapper">
  1302. <pre><code class="lang-csharp hljs">public void OpenMenu()</code></pre>
  1303. </div>
  1304. <span class="small pull-right mobile-hide">
  1305. <span class="divider">|</span>
  1306. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_PositionCursor.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.PositionCursor%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1307. </span>
  1308. <span class="small pull-right mobile-hide">
  1309. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1114">View Source</a>
  1310. </span>
  1311. <a id="Terminal_Gui_MenuBar_PositionCursor_" data-uid="Terminal.Gui.MenuBar.PositionCursor*"></a>
  1312. <h4 id="Terminal_Gui_MenuBar_PositionCursor" data-uid="Terminal.Gui.MenuBar.PositionCursor">PositionCursor()</h4>
  1313. <div class="markdown level1 summary">Positions the cursor in the right position based on the currently focused view in the chain.</div>
  1314. <div class="markdown level1 conceptual"></div>
  1315. <h5 class="declaration">Declaration</h5>
  1316. <div class="codewrapper">
  1317. <pre><code class="lang-csharp hljs">public override void PositionCursor()</code></pre>
  1318. </div>
  1319. <h5 class="overrides">Overrides</h5>
  1320. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_PositionCursor">View.PositionCursor()</a></div>
  1321. <span class="small pull-right mobile-hide">
  1322. <span class="divider">|</span>
  1323. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_ProcessColdKey_Terminal_Gui_KeyEvent_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.ProcessColdKey(Terminal.Gui.KeyEvent)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1324. </span>
  1325. <span class="small pull-right mobile-hide">
  1326. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1847">View Source</a>
  1327. </span>
  1328. <a id="Terminal_Gui_MenuBar_ProcessColdKey_" data-uid="Terminal.Gui.MenuBar.ProcessColdKey*"></a>
  1329. <h4 id="Terminal_Gui_MenuBar_ProcessColdKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.MenuBar.ProcessColdKey(Terminal.Gui.KeyEvent)">ProcessColdKey(KeyEvent)</h4>
  1330. <div class="markdown level1 summary">This method can be overwritten by views that
  1331. want to provide accelerator functionality
  1332. (Alt-key for example), but without
  1333. interefering with normal ProcessKey behavior.</div>
  1334. <div class="markdown level1 conceptual"></div>
  1335. <h5 class="declaration">Declaration</h5>
  1336. <div class="codewrapper">
  1337. <pre><code class="lang-csharp hljs">public override bool ProcessColdKey(KeyEvent kb)</code></pre>
  1338. </div>
  1339. <h5 class="parameters">Parameters</h5>
  1340. <table class="table table-bordered table-condensed">
  1341. <thead>
  1342. <tr>
  1343. <th>Type</th>
  1344. <th>Name</th>
  1345. <th>Description</th>
  1346. </tr>
  1347. </thead>
  1348. <tbody>
  1349. <tr>
  1350. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  1351. <td><span class="parametername">kb</span></td>
  1352. <td></td>
  1353. </tr>
  1354. </tbody>
  1355. </table>
  1356. <h5 class="returns">Returns</h5>
  1357. <table class="table table-bordered table-condensed">
  1358. <thead>
  1359. <tr>
  1360. <th>Type</th>
  1361. <th>Description</th>
  1362. </tr>
  1363. </thead>
  1364. <tbody>
  1365. <tr>
  1366. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  1367. <td></td>
  1368. </tr>
  1369. </tbody>
  1370. </table>
  1371. <h5 class="overrides">Overrides</h5>
  1372. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ProcessColdKey_Terminal_Gui_KeyEvent_">View.ProcessColdKey(KeyEvent)</a></div>
  1373. <h5 id="Terminal_Gui_MenuBar_ProcessColdKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
  1374. <div class="markdown level1 remarks"><p>
  1375. After keys are sent to the subviews on the
  1376. current view, all the view are
  1377. processed and the key is passed to the views
  1378. to allow some of them to process the keystroke
  1379. as a cold-key. </p>
  1380. <p>
  1381. This functionality is used, for example, by
  1382. default buttons to act on the enter key.
  1383. Processing this as a hot-key would prevent
  1384. non-default buttons from consuming the enter
  1385. keypress when they have the focus.
  1386. </p></div>
  1387. <span class="small pull-right mobile-hide">
  1388. <span class="divider">|</span>
  1389. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_ProcessHotKey_Terminal_Gui_KeyEvent_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.ProcessHotKey(Terminal.Gui.KeyEvent)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1390. </span>
  1391. <span class="small pull-right mobile-hide">
  1392. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1765">View Source</a>
  1393. </span>
  1394. <a id="Terminal_Gui_MenuBar_ProcessHotKey_" data-uid="Terminal.Gui.MenuBar.ProcessHotKey*"></a>
  1395. <h4 id="Terminal_Gui_MenuBar_ProcessHotKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.MenuBar.ProcessHotKey(Terminal.Gui.KeyEvent)">ProcessHotKey(KeyEvent)</h4>
  1396. <div class="markdown level1 summary">This method can be overwritten by view that
  1397. want to provide accelerator functionality
  1398. (Alt-key for example).</div>
  1399. <div class="markdown level1 conceptual"></div>
  1400. <h5 class="declaration">Declaration</h5>
  1401. <div class="codewrapper">
  1402. <pre><code class="lang-csharp hljs">public override bool ProcessHotKey(KeyEvent kb)</code></pre>
  1403. </div>
  1404. <h5 class="parameters">Parameters</h5>
  1405. <table class="table table-bordered table-condensed">
  1406. <thead>
  1407. <tr>
  1408. <th>Type</th>
  1409. <th>Name</th>
  1410. <th>Description</th>
  1411. </tr>
  1412. </thead>
  1413. <tbody>
  1414. <tr>
  1415. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  1416. <td><span class="parametername">kb</span></td>
  1417. <td></td>
  1418. </tr>
  1419. </tbody>
  1420. </table>
  1421. <h5 class="returns">Returns</h5>
  1422. <table class="table table-bordered table-condensed">
  1423. <thead>
  1424. <tr>
  1425. <th>Type</th>
  1426. <th>Description</th>
  1427. </tr>
  1428. </thead>
  1429. <tbody>
  1430. <tr>
  1431. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  1432. <td></td>
  1433. </tr>
  1434. </tbody>
  1435. </table>
  1436. <h5 class="overrides">Overrides</h5>
  1437. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ProcessHotKey_Terminal_Gui_KeyEvent_">View.ProcessHotKey(KeyEvent)</a></div>
  1438. <h5 id="Terminal_Gui_MenuBar_ProcessHotKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
  1439. <div class="markdown level1 remarks"><p>
  1440. Before keys are sent to the subview on the
  1441. current view, all the views are
  1442. processed and the key is passed to the widgets
  1443. to allow some of them to process the keystroke
  1444. as a hot-key. </p>
  1445. <p>
  1446. For example, if you implement a button that
  1447. has a hotkey ok "o", you would catch the
  1448. combination Alt-o here. If the event is
  1449. caught, you must return true to stop the
  1450. keystroke from being dispatched to other
  1451. views.
  1452. </p></div>
  1453. <span class="small pull-right mobile-hide">
  1454. <span class="divider">|</span>
  1455. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_ProcessKey_Terminal_Gui_KeyEvent_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.ProcessKey(Terminal.Gui.KeyEvent)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1456. </span>
  1457. <span class="small pull-right mobile-hide">
  1458. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1791">View Source</a>
  1459. </span>
  1460. <a id="Terminal_Gui_MenuBar_ProcessKey_" data-uid="Terminal.Gui.MenuBar.ProcessKey*"></a>
  1461. <h4 id="Terminal_Gui_MenuBar_ProcessKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.MenuBar.ProcessKey(Terminal.Gui.KeyEvent)">ProcessKey(KeyEvent)</h4>
  1462. <div class="markdown level1 summary">If the view is focused, gives the view a
  1463. chance to process the keystroke.</div>
  1464. <div class="markdown level1 conceptual"></div>
  1465. <h5 class="declaration">Declaration</h5>
  1466. <div class="codewrapper">
  1467. <pre><code class="lang-csharp hljs">public override bool ProcessKey(KeyEvent kb)</code></pre>
  1468. </div>
  1469. <h5 class="parameters">Parameters</h5>
  1470. <table class="table table-bordered table-condensed">
  1471. <thead>
  1472. <tr>
  1473. <th>Type</th>
  1474. <th>Name</th>
  1475. <th>Description</th>
  1476. </tr>
  1477. </thead>
  1478. <tbody>
  1479. <tr>
  1480. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  1481. <td><span class="parametername">kb</span></td>
  1482. <td></td>
  1483. </tr>
  1484. </tbody>
  1485. </table>
  1486. <h5 class="returns">Returns</h5>
  1487. <table class="table table-bordered table-condensed">
  1488. <thead>
  1489. <tr>
  1490. <th>Type</th>
  1491. <th>Description</th>
  1492. </tr>
  1493. </thead>
  1494. <tbody>
  1495. <tr>
  1496. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
  1497. <td></td>
  1498. </tr>
  1499. </tbody>
  1500. </table>
  1501. <h5 class="overrides">Overrides</h5>
  1502. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_ProcessKey_Terminal_Gui_KeyEvent_">View.ProcessKey(KeyEvent)</a></div>
  1503. <h5 id="Terminal_Gui_MenuBar_ProcessKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
  1504. <div class="markdown level1 remarks"><p>
  1505. Views can override this method if they are
  1506. interested in processing the given keystroke.
  1507. If they consume the keystroke, they must
  1508. return true to stop the keystroke from being
  1509. processed by other widgets or consumed by the
  1510. widget engine. If they return false, the
  1511. keystroke will be passed using the ProcessColdKey
  1512. method to other views to process.
  1513. </p>
  1514. <p>
  1515. The View implementation does nothing but return false,
  1516. so it is not necessary to call base.ProcessKey if you
  1517. derive directly from View, but you should if you derive
  1518. other View subclasses.
  1519. </p></div>
  1520. <span class="small pull-right mobile-hide">
  1521. <span class="divider">|</span>
  1522. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_Redraw_Terminal_Gui_Rect_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.Redraw(Terminal.Gui.Rect)%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1523. </span>
  1524. <span class="small pull-right mobile-hide">
  1525. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1085">View Source</a>
  1526. </span>
  1527. <a id="Terminal_Gui_MenuBar_Redraw_" data-uid="Terminal.Gui.MenuBar.Redraw*"></a>
  1528. <h4 id="Terminal_Gui_MenuBar_Redraw_Terminal_Gui_Rect_" data-uid="Terminal.Gui.MenuBar.Redraw(Terminal.Gui.Rect)">Redraw(Rect)</h4>
  1529. <div class="markdown level1 summary">Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.</div>
  1530. <div class="markdown level1 conceptual"></div>
  1531. <h5 class="declaration">Declaration</h5>
  1532. <div class="codewrapper">
  1533. <pre><code class="lang-csharp hljs">public override void Redraw(Rect bounds)</code></pre>
  1534. </div>
  1535. <h5 class="parameters">Parameters</h5>
  1536. <table class="table table-bordered table-condensed">
  1537. <thead>
  1538. <tr>
  1539. <th>Type</th>
  1540. <th>Name</th>
  1541. <th>Description</th>
  1542. </tr>
  1543. </thead>
  1544. <tbody>
  1545. <tr>
  1546. <td><a class="xref" href="Terminal.Gui.Rect.html">Rect</a></td>
  1547. <td><span class="parametername">bounds</span></td>
  1548. <td>The bounds (view-relative region) to redraw.</td>
  1549. </tr>
  1550. </tbody>
  1551. </table>
  1552. <h5 class="overrides">Overrides</h5>
  1553. <div><a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Redraw_Terminal_Gui_Rect_">View.Redraw(Rect)</a></div>
  1554. <h5 id="Terminal_Gui_MenuBar_Redraw_Terminal_Gui_Rect__remarks">Remarks</h5>
  1555. <div class="markdown level1 remarks"><p>
  1556. Always use <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Bounds">Bounds</a> (view-relative) when calling <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Redraw_Terminal_Gui_Rect_">Redraw(Rect)</a>, NOT <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Frame">Frame</a> (superview-relative).
  1557. </p>
  1558. <p>
  1559. Views should set the color that they want to use on entry, as otherwise this will inherit
  1560. the last color that was set globally on the driver.
  1561. </p>
  1562. <p>
  1563. Overrides of <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Redraw_Terminal_Gui_Rect_">Redraw(Rect)</a> must ensure they do not set <code>Driver.Clip</code> to a clip region
  1564. larger than the <ref name="bounds"></ref> parameter, as this will cause the driver to clip the entire region.
  1565. </p></div>
  1566. <h3 id="events">Events
  1567. </h3>
  1568. <span class="small pull-right mobile-hide">
  1569. <span class="divider">|</span>
  1570. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_MenuAllClosed.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.MenuAllClosed%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1571. </span>
  1572. <span class="small pull-right mobile-hide">
  1573. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1172">View Source</a>
  1574. </span>
  1575. <h4 id="Terminal_Gui_MenuBar_MenuAllClosed" data-uid="Terminal.Gui.MenuBar.MenuAllClosed">MenuAllClosed</h4>
  1576. <div class="markdown level1 summary">Raised when all the menu is closed.</div>
  1577. <div class="markdown level1 conceptual"></div>
  1578. <h5 class="declaration">Declaration</h5>
  1579. <div class="codewrapper">
  1580. <pre><code class="lang-csharp hljs">public event Action MenuAllClosed</code></pre>
  1581. </div>
  1582. <h5 class="eventType">Event Type</h5>
  1583. <table class="table table-bordered table-condensed">
  1584. <thead>
  1585. <tr>
  1586. <th>Type</th>
  1587. <th>Description</th>
  1588. </tr>
  1589. </thead>
  1590. <tbody>
  1591. <tr>
  1592. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action">Action</a></td>
  1593. <td></td>
  1594. </tr>
  1595. </tbody>
  1596. </table>
  1597. <span class="small pull-right mobile-hide">
  1598. <span class="divider">|</span>
  1599. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_MenuClosing.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.MenuClosing%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1600. </span>
  1601. <span class="small pull-right mobile-hide">
  1602. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1167">View Source</a>
  1603. </span>
  1604. <h4 id="Terminal_Gui_MenuBar_MenuClosing" data-uid="Terminal.Gui.MenuBar.MenuClosing">MenuClosing</h4>
  1605. <div class="markdown level1 summary">Raised when a menu is closing passing <a class="xref" href="Terminal.Gui.MenuClosingEventArgs.html">MenuClosingEventArgs</a>.</div>
  1606. <div class="markdown level1 conceptual"></div>
  1607. <h5 class="declaration">Declaration</h5>
  1608. <div class="codewrapper">
  1609. <pre><code class="lang-csharp hljs">public event Action&lt;MenuClosingEventArgs&gt; MenuClosing</code></pre>
  1610. </div>
  1611. <h5 class="eventType">Event Type</h5>
  1612. <table class="table table-bordered table-condensed">
  1613. <thead>
  1614. <tr>
  1615. <th>Type</th>
  1616. <th>Description</th>
  1617. </tr>
  1618. </thead>
  1619. <tbody>
  1620. <tr>
  1621. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Terminal.Gui.MenuClosingEventArgs.html">MenuClosingEventArgs</a>&gt;</td>
  1622. <td></td>
  1623. </tr>
  1624. </tbody>
  1625. </table>
  1626. <span class="small pull-right mobile-hide">
  1627. <span class="divider">|</span>
  1628. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_MenuOpened.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.MenuOpened%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1629. </span>
  1630. <span class="small pull-right mobile-hide">
  1631. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1162">View Source</a>
  1632. </span>
  1633. <h4 id="Terminal_Gui_MenuBar_MenuOpened" data-uid="Terminal.Gui.MenuBar.MenuOpened">MenuOpened</h4>
  1634. <div class="markdown level1 summary">Raised when a menu is opened.</div>
  1635. <div class="markdown level1 conceptual"></div>
  1636. <h5 class="declaration">Declaration</h5>
  1637. <div class="codewrapper">
  1638. <pre><code class="lang-csharp hljs">public event Action&lt;MenuItem&gt; MenuOpened</code></pre>
  1639. </div>
  1640. <h5 class="eventType">Event Type</h5>
  1641. <table class="table table-bordered table-condensed">
  1642. <thead>
  1643. <tr>
  1644. <th>Type</th>
  1645. <th>Description</th>
  1646. </tr>
  1647. </thead>
  1648. <tbody>
  1649. <tr>
  1650. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Terminal.Gui.MenuItem.html">MenuItem</a>&gt;</td>
  1651. <td></td>
  1652. </tr>
  1653. </tbody>
  1654. </table>
  1655. <span class="small pull-right mobile-hide">
  1656. <span class="divider">|</span>
  1657. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar_MenuOpening.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar.MenuOpening%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a>
  1658. </span>
  1659. <span class="small pull-right mobile-hide">
  1660. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L1157">View Source</a>
  1661. </span>
  1662. <h4 id="Terminal_Gui_MenuBar_MenuOpening" data-uid="Terminal.Gui.MenuBar.MenuOpening">MenuOpening</h4>
  1663. <div class="markdown level1 summary">Raised as a menu is opening.</div>
  1664. <div class="markdown level1 conceptual"></div>
  1665. <h5 class="declaration">Declaration</h5>
  1666. <div class="codewrapper">
  1667. <pre><code class="lang-csharp hljs">public event Action&lt;MenuOpeningEventArgs&gt; MenuOpening</code></pre>
  1668. </div>
  1669. <h5 class="eventType">Event Type</h5>
  1670. <table class="table table-bordered table-condensed">
  1671. <thead>
  1672. <tr>
  1673. <th>Type</th>
  1674. <th>Description</th>
  1675. </tr>
  1676. </thead>
  1677. <tbody>
  1678. <tr>
  1679. <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action-1">Action</a>&lt;<a class="xref" href="Terminal.Gui.MenuOpeningEventArgs.html">MenuOpeningEventArgs</a>&gt;</td>
  1680. <td></td>
  1681. </tr>
  1682. </tbody>
  1683. </table>
  1684. <h3 id="implements">Implements</h3>
  1685. <div>
  1686. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a>
  1687. </div>
  1688. <div>
  1689. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.isupportinitializenotification">ISupportInitializeNotification</a>
  1690. </div>
  1691. <div>
  1692. <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.isupportinitialize">ISupportInitialize</a>
  1693. </div>
  1694. </article>
  1695. </div>
  1696. <div class="hidden-sm col-md-2" role="complementary">
  1697. <div class="sideaffix">
  1698. <div class="contribution">
  1699. <ul class="nav">
  1700. <li>
  1701. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/docfx/overrides/new?filename=Terminal_Gui_MenuBar.md&amp;value=---%0Auid%3A%20Terminal.Gui.MenuBar%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Edit this page</a>
  1702. </li>
  1703. <li>
  1704. <a href="tig:tig/Terminal.Gui/blob/v2_develop/Terminal.Gui/Views/Menu.cs/#L874" class="contribution-link">View Source</a>
  1705. </li>
  1706. </ul>
  1707. </div>
  1708. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  1709. <h5>In this article</h5>
  1710. <div></div>
  1711. </nav>
  1712. </div>
  1713. </div>
  1714. </div>
  1715. </div>
  1716. <footer>
  1717. <div class="grad-bottom"></div>
  1718. <div class="footer">
  1719. <div class="container">
  1720. <span class="pull-right">
  1721. <a href="#top">Back to top</a>
  1722. </span>
  1723. <span>Generated by <strong>DocFX</strong></span>
  1724. </div>
  1725. </div>
  1726. </footer>
  1727. </div>
  1728. <script type="text/javascript" src="../../styles/docfx.vendor.min.js"></script>
  1729. <script type="text/javascript" src="../../styles/docfx.js"></script>
  1730. <script type="text/javascript" src="../../styles/main.js"></script>
  1731. </body>
  1732. </html>