ModernUI showcase demo
ModernUI_Showcase_Demo.mq5 is the full control catalog demo: most input, navigation, display, chart, and overlay types in one window, organized in tabs with scrollable pages.
Routing lives in Demos/_showcase_onmui.mqh. UI construction is split across _showcase_impl.mqh and adapters.
This demo is UI-only.
File paths
Experts/ModernUI/Examples/Demos/ModernUI_Showcase_Demo.mq5
Experts/ModernUI/Examples/Demos/_showcase_onmui.mqh
Experts/ModernUI/Examples/Demos/_showcase_impl.mqh
What this demonstrates
- Chart-hosted window with header/status chrome
- Tab pages built from
MuiScrollView+Mui::Columnstacks Mui::FormRowandMui::Panelsection helpers for grouped galleries- Inputs: text, spin, combo, checkbox, toggle, slider, date, color, radio
- Navigation samples: tabs, menus, toolbars (where enabled in build)
- Display: labels, badges, icons, progress, cards
- Charts and stat visuals on dedicated tabs
- Overlays:
Mui::Drawer(theme settings),MuiDialog, toasts MuiEventSink+.Id(...)on interactive controls
Event-bus structure
// _showcase_onmui.mqh — route by event.EventId() and event.ControlId()
if(eventId==MUI_EVENT_CLICK) { ... }
if(eventId==MUI_EVENT_VALUE_CHANGED) { ... }
if(eventId==MUI_EVENT_CHECK_CHANGED) { ... }
if(eventId==MUI_EVENT_DIALOG_RESULT && controlId==SC_ACTION_DIALOG_RESULT) { ... }
if(eventId==MUI_EVENT_CONFIRM && controlId==SC_ACTION_DIALOG_RESULT) { ... }
if(eventId==MUI_EVENT_DRAWER_STATE && controlId==SC_ACTION_DRAWER_STATE) { ... }
Controls and API reference
Use the category pages — the demo touches most public controls:
| Family | API reference |
|---|---|
| Buttons, icon buttons | Buttons |
| Text, spin, combo, checkbox, toggle, slider, date, color | Inputs |
| Tabs, accordion, toolbar, menu | Navigation |
| Labels, badges, icons, progress, cards | Display |
| Sparkline, line, bar, donut, gauge | Charts |
| Panel, scroll, form row, grid | Layout |
| Drawer, dialog, toast | Overlays |
Mui::AppWindow, labeled fields, toasts |
Factory helpers (reference) |
Event IDs and MuiEventData fields: Event Bus.
How to run it
- Open
ModernUI_Showcase_Demo.mq5in MetaEditor. - Compile (includes
_showcase_*.mqhfrom the same folder). - Attach to a chart and explore each tab.