macro to create a list of options ( UIoptionBox) with labels in a panel
macro UIoptionBoxLabel {
ilink parent;
imlink labels;
string title => name_of(<-);
int visible= 1;
int selectedItems[];
int max;
label_cmd label_cmd {
labels => <-.labels;
int+read+nonotify+opt inItem[] => <-.selectedItems;
int+write+nonotify+opt outItem[];
};
int x = 0; // input
int y = 0; // input
int width = 200;
int height => .UIoptionBox.y + .UIoptionBox.height;
UIpanel UIpanel {
parent => <-.parent;
x => <-.x;
y => <-.y;
width => <-.width;
height => <-.height;
};
UIlabel UIlabel {
parent => <-.UIpanel;
label => <-.title;
alignment = 1;
y = 0;
width => <-.UIpanel.width;
};
UIoptionBox UIoptionBox {
parent => <-.UIpanel;
max => <-.max;
cmdList => <-.label_cmd.cmd;
selectedItems => <-.label_cmd.outItem;
visible => <-.visible;
y => <-.UIlabel.y + UIlabel.height + 4;
width => <-.UIpanel.width;
};
};
UIoptionBoxLabel creates a UIoptionList of toggles in a window. You can choose more than one option at one time. This macro differs from UIoptionBox in that it already includes an enclosing UIpanel, a UIlabel, and a reference to a list of per-toggle labels.
This input should connect to the UIpanel that contains the UIoptionBox widget.
This input should connect to an array of strings. The strings are the labels on the buttons in the UIoptionBox.
String. The title that appears, naming the widget.
Main.Filters.combine_vect (and many others in Main)
v/modules.v