Macaw OS C reference

Function ui_dropdown

#include <macawui.h>
int ui_dropdown(
    const char *id,
    const char **items,
    int n,
    int *selected,
    int w
);

Shows a drop-down menu: a box with the picked item, which opens a list when it's clicked.

Parameters

idconst char *
A name you choose, different for each one.
itemsconst char **
An array of n strings, the choices. A NULL one shows as empty.
nint
How many items there are.
selectedint *
The address of an int of yours: the picked item, counting from 0, or -1 for none.
wint
Its width in pixels. 0 for the full width.

Returns int

1 in the frame another item is picked, 0 otherwise.

In Widgets, with ui_label, ui_heading, ui_separator, ui_button, ui_checkbox, ui_radio, ui_slider, ui_textbox, ui_textboxex, ui_listbox, ui_tabs, ui_progress, ui_swatches, ui_image.