Skip to content
realonepiecefreak edited this page Nov 1, 2024 · 8 revisions

MenuBar

A simple menu bar.

Properties

  • Items: A list of MenuBarItem
  • Font: The font used for all texts in this menu bar; Can be overwritten in certain MenuBarItem
  • Height: The absolute height in pixels for this menu bar

Methods

  • Update: Updates and renders the menu bar each frame

MenuBarItem

A single item in a menu bar, ContextMenu, or MenuBarMenu.

Has to be derived from, to create an item with content.

Properties

  • Id: Protected; The unique ID of the menu bar item; Is used directly in Dear ImGui, where applicable
  • Height: Abstract; The absolute height in pixels for this menu bar item
  • Enabled: Virtual; If the menu bar item is active and processes events

Methods

  • Update: Updates and renders the menu bar item each frame
  • UpdateInternal: Protected; Abstract; Renders the menu bar item on every frame
  • UpdateEventsInternal: Protected; Abstract; Executes key command events on every frame
  • ApplyStyles: Protected; Virtual; Pushes Dear ImGui styles, colors, and fonts for the menu bar item; Is called directly before UpdateInternal
  • RemoveStyles: Protected; Virtual; Pops Dear ImGui styles, colors, and fonts for the menu bar item; Is called directly after UpdateInternal

MainMenuBar

A menu bar at the top of the application.

MenuBarButton

A menu bar item representing a button.

menubarbutton_hover menubarbutton

Properties

  • Text: The localizable text on the button
  • Font: The font for the localizable text
  • KeyAction: The KeyCommand to invoke the Clicked event

Events

  • Clicked: For when the button was clicked

MenuBarCheckBox

A menu bar item representing a checkbox with right-side text.

menubarcheckbox_sub menubarcheckbox

Properties

  • Text: The localizable text on the checkbox
  • Font: The font for the localizable text
  • Checked: If the checkbox is checked; Invokes the CheckChanged event

Events

  • CheckChanged: For when the checkbox was changed

MenuBarMenu

A menu bar item representing a sub menu bar.

menubarmenu

Properties

  • Text: The localizable text on the sub menu bar
  • Font: The font used for all texts in this sub menu bar; Can be overwritten in certain MenuBarItem
  • Padding: the padding between the sub menu bar border and localizable text
  • Items: A list of MenuBarItem

MenuBarRadio

A menu bar item representing a radio button menu.

menubarradio

Properties

  • Text: The localizable text on the radio button menu
  • Font: The font for the localizable text
  • CheckItems: A list of MenuBarCheckBox representing the radio options
  • SelectedItem: The currently selected item, or null;

Events

  • SelectedItemChanged: For when an item was selected

MenuBarSplitter

A menu bar item representing a splitter.

menubarsplitter_vertical menubarsplitter_horizontal

ContextMenu

A context menu on some components.
Opens on right-click.

contextmenu

Properties

  • Items: A list of MenuBarItem