Controls
ModernUI controls are grouped by the job they do.
Use this section when you know what kind of interface element you need and want to find the right control or factory helper.
For normal EA panels, create controls normally, assign .Id(...) to interactive controls, and handle app-level behaviour with the Event Bus.
If you already know the class or helper name, use the Controls reference.
Control groups
| Guide | Use it for | API reference |
|---|---|---|
| Buttons | Actions, icon buttons, primary/ghost/danger buttons | Buttons |
| Icons and images | Built-in atlas icons, canvas fallback, image assets | MuiIcon |
| Labels, badges, and toasts | Text, status badges, alerts, progress, feedback | Display · Overlays (toast) |
| Text inputs | Text boxes and text areas (native hosts) | Inputs |
| Spin edit | Numeric min/max/step/digits | MuiSpinEditHost · Mui::LabeledSpinEdit |
| Combo and dropdown | Combo boxes and dropdown menus | MuiComboBoxHost · MuiDropdown |
| Checkbox, toggle, and slider | Boolean and range values | Inputs |
| Tabs and accordion | Page switching and collapsible sections | Navigation |
| Drawer, dialogs, and menus | Overlays, modals, side panels, context menus | Overlays · Navigation (menus) |
| Table, list, and tree | Data views, virtualized rows, sources | Data views |
| Charts and stat cards | Dashboard visuals and KPI cards | Charts · Display (stat card) |
Creating controls
Most controls can be created through Mui::... factory helpers.
MuiButtonAction *save=Mui::Button(parent,"Save");
save.Id(PANEL_ACTION_SAVE);
MuiLabel *title=Mui::Label(parent,"Status");
MuiSpinEditHost *risk=Mui::SpinEdit(parent,0.1,10.0,1.0,0.1,1,NULL,220.0,0.0);
risk.Id(PANEL_ACTION_RISK_CHANGED);
You can also instantiate lower-level controls directly when you need more control.
Factory helper pattern
ModernUI factory helpers usually follow this pattern:
parent first
then important content/value arguments
then optional advanced handler where applicable
then width/height
A width or height of 0.0 usually means use the control/theme default.
Common setter style
button.Id(PANEL_ACTION_SAVE);
button.Text("Save");
button.Pad(14.0,8.0);
button.Radius(10.0);
slider.Id(PANEL_ACTION_SLIDER_CHANGED);
slider.Value(0.35);
slider.AccentColor(0xFF3B82F6);
Choosing wrappers vs controls
Use fast wrappers when you want common panel structures.
Use controls directly when a wrapper hides something you need, the layout is specialised, data comes from a custom source, or you are building a reusable component.