Fast Wrapper Types
Fast wrappers often return small structs or helper classes instead of hiding everything behind one pointer.
This keeps creation fast while preserving access to the real controls.
App window
MuiAppWindow app=Mui::AppWindow(g_ui,"Panel",20,40,340,430,true);
Fields:
| Field | Meaning |
|---|---|
window |
Created MuiWindow |
content |
Inner body container |
Use content for sections and controls.
Mui::Section(app.content,"Settings","");
Section
MuiSection section=Mui::Section(parent,"Order","Execution setup");
Fields:
| Field | Meaning |
|---|---|
panel |
Outer MuiPanel |
title |
Title label |
subtitle |
Subtitle label or NULL |
body |
Body container |
Add controls to section.body.
Labeled field
MuiLabeledField field=Mui::LabeledField(parent,"Action",control,"Optional hint");
Fields:
| Field | Meaning |
|---|---|
root |
Field container |
label |
Caption label |
control |
Wrapped control |
hint |
Hint label or NULL |
Labeled input types
Single-line labelled inputs follow the same pattern.
Examples:
MuiLabeledTextBoxMuiLabeledSpinEditMuiLabeledComboMuiLabeledCheckboxMuiLabeledSliderMuiLabeledTextAreaMuiLabeledDatePickerMuiLabeledColorPicker
Common fields:
| Field | Meaning |
|---|---|
root |
Field container |
label |
Caption label |
control |
Actual input/control |
hint |
Hint label or NULL |
The field name is control, not input, because input is reserved in MQL5.
ButtonRow
MuiButtonRow row=Mui::ButtonRow(parent,labels,0.0,0.0,true);
Important members:
| Member | Meaning |
|---|---|
root |
Row container |
buttons[] |
Internal button pointer array |
Count() |
Number of buttons |
Button(index) |
Bounds-checked button access |
Use Button(index) for safer access.
if(row.Button(0)!=NULL)
row.Button(0).Id(PANEL_ACTION_SAVE);
ButtonGroup
MuiButtonGroup group=Mui::ButtonGroup(parent,labels,0,0.0,0.0,true);
Important members:
| Member | Meaning |
|---|---|
root |
Row container |
buttons[] |
Button pointer array |
model |
Internal selection model |
Count() |
Number of buttons |
Button(index) |
Bounds-checked button access |
Selected() |
Current selected index |
Selected(index) |
Update selected index |
For normal EA actions, prefer assigning IDs and routing through OnMuiEvent(...).
ListBox
MuiListBox list=Mui::ListBox(parent,items,0,0.0,0.0);
Important members:
| Member | Meaning |
|---|---|
list |
Created MuiListView |
source |
Backing string source |
Count() |
Row count |
SetItem(index,value) |
Update one item |
Item(index) |
Read one item |
Refresh() |
Notify the source/view |
Keep the wrapper or source pointer available while updating rows.
SimpleTable
MuiSimpleTable table=Mui::SimpleTable(parent,headers,4,0.0,180.0,true,true);
Important members:
| Member | Meaning |
|---|---|
table |
Created MuiTableView |
source |
Backing simple table source |
Rows() |
Data row count |
Cols() / Columns() |
Column count |
SetCell(row,col,value) |
Write a cell |
Cell(row,col) |
Read a cell |
SetRow(row,values[]) |
Write a row |
Clear() |
Clear data rows |
Refresh() |
Notify after direct source changes |
TabsBundle
MuiTabsBundle tabs=Mui::TabsFromNames(parent,names,0);
Important members:
| Member | Meaning |
|---|---|
tabs |
Created MuiTabs |
bodies[] |
Body containers for each tab |
Count() |
Number of tabs |
Body(index) |
Body container or NULL |
Selected() |
Current selected index |
Selected(root,index) |
Change tab |
Do not delete tab bodies. They are owned by MuiTabs.
Safe empty results
Most composite wrappers return safe empty values when called with invalid input such as parent == NULL.
Typical empty result:
- root/control pointers are
NULL - count methods return
0 - bounds-checked access returns
NULL - no crash
Related pages
- Factory helpers (reference) —
AppWindow,Section,LabeledSpinEdit,ButtonRow,SimpleTable, and more - Controls reference
- Fast wrappers overview
- Factory helpers guide
- Ownership and lifetime