This page documents every enum, struct, and typedef thatDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/The-Young-Maker/OpenMenuOS/llms.txt
Use this file to discover all available pages before exploring further.
OpenMenuOS.h exposes to your sketch. These types are the building blocks you pass to constructors and methods across the library. Understanding the defaults here lets you customize the look and behavior of your menu system with minimal boilerplate.
PopupType
Controls the color scheme, default icon, and default title of a popup. Pass one of these values toPopupConfig::type, or rely on the matching PopupManager::show*() convenience method which sets the type automatically.
Blue header. Used for neutral informational messages. Default title:
"Information". Requires manual dismissal.Green header. Used to confirm a completed action. Default title:
"Success". Auto-closes by default when called via PopupManager::showSuccess().Orange header. Used to alert the user before a potentially risky action. Default title:
"Warning". Requires manual dismissal.Red header. Used to report a failure. Default title:
"Error". Requires manual dismissal.Cyan header. Renders Yes and No buttons. Default title:
"Question". Returns PopupResult::OK (Yes) or PopupResult::CANCEL (No).PopupResult
Returned byPopupManager::update() and by all show* methods (immediately returning NONE on the call that opens the popup). Poll update() in loop() to detect when the user acts.
The popup is still open and the user has not interacted yet. This is also what every
show* method returns on the frame it is called.The user pressed the OK or Yes button, or the popup was dismissed by auto-close.
The user pressed the Cancel or No button.
Alias for
OK. Provided for readability in question-dialog branches.Alias for
CANCEL. Provided for readability in question-dialog branches.PopupConfig
A plain struct that describes everything about a popup before it is shown. Pass a configured instance toPopupManager::show() when the showInfo() / showWarning() / etc. convenience methods do not give you enough control.
Header title text. When
nullptr, a type-appropriate default is used ("Information", "Success", "Warning", "Error", or "Question").Required. Main body text. Long strings are word-wrapped automatically.
Selects the built-in color scheme and default icon. See
PopupType above.When
true, action buttons are rendered. Set to false for a purely informational overlay that relies on autoClose.When
true, a Cancel/No button is shown alongside OK. Automatically true for PopupType::QUESTION.When
true, the popup closes automatically after autoCloseDelay milliseconds without user interaction.Milliseconds before auto-close fires. Only relevant when
autoClose is true.RGB565 header color override. When
0, the color defined by type is used.Pointer to raw RGB565 image data used as the popup icon. When
nullptr, the built-in icon for the selected type is used.Width in pixels of the
customIcon bitmap.Height in pixels of the
customIcon bitmap.ScreenConfig
A global configuration struct that controls the visual appearance and behavior of all screens managed by OpenMenuOS. Access it viaScreen::config. Color values use 16-bit RGB565 format, matching the TFT_eSPI convention.
Color fields
RGB565 color of the scrollbar track and thumb.
RGB565 border color of the selection rectangle drawn around the active menu item.
RGB565 fill color inside the selection rectangle.
RGB565 text color used for the currently selected menu item label.
Feature toggles
Show or hide the scrollbar when menu items overflow the screen.
Animate the selection rectangle when the user presses a button.
Enable horizontal text scrolling for menu item labels that are wider than the available area.
Render images (icons) associated with menu items via
addItem(..., image).Master switch for all general animations including transitions and easing.
Style fields
Visual style of the selection rectangle.
0 = outlined, 1 = filled.Scrollbar appearance variant.
0 = default, 1 = modern.Vertical pixel offset applied to menu item text for optical centering.
Layout ratio fields
These fields areconst — they define proportions relative to screen dimensions and cannot be changed at runtime.
Height of the selection rectangle as a fraction of the screen height (30%).
Horizontal text margin as a fraction of the screen width (5%).
Vertical cleaning margin as a fraction of the screen height (1%).
Toggle switch height as a fraction of the screen height (26%).
Icon size as a fraction of the screen height (6%).
Setting::Type
Defines the kind of interactive control rendered for a setting inside aSettingsScreen. The type determines both how the value is displayed and how the user edits it.
Renders an animated toggle switch. The value is
true (on) or false (off). Create with SettingsScreen::addBooleanSetting().Renders a numeric range control. The value is a
uint8_t between min and max. Supports an optional unit label (e.g. "%", "dB"). Create with SettingsScreen::addRangeSetting().Renders a selection list. The value is the index of the selected option string. Create with
SettingsScreen::addOptionSetting().Navigates to a linked
Screen when selected. Use for nested settings menus. Create with SettingsScreen::addSubscreenSetting().MenuItem
A plain struct that holds the data for one entry in aMenuScreen. Items are added via MenuScreen::addItem() — direct construction of MenuItem is not normally needed.
Text shown for this menu entry. When
addItem(Screen* nextScreen) is used, label is set to the title returned by nextScreen->getTitle().Pointer to the screen that is pushed onto the navigation stack when this item is selected. Set to
nullptr if the item only triggers an action.A
void(*)() callback invoked when this item is selected. Set to nullptr when nextScreen handles the interaction. See ActionCallback.Pointer to raw RGB565 bitmap data used as an icon. Only rendered when
ScreenConfig::showImages is true. Set to nullptr for no icon.ActionCallback
A typedef for a plain function pointer with no parameters and no return value. Used as theaction field in MenuItem and as the action argument to MenuScreen::addItem().
ActionCallback is a bare function pointer. Lambda expressions that capture variables cannot be assigned to it. For stateless lambdas (no captures) the compiler can convert them implicitly, but a named free function is the most portable option.