Macaw OS C reference

Function ui_textbox

#include <macawui.h>
int ui_textbox(const char *id, char *buf, int size);

Shows a box to type text in. Ctrl+C, Ctrl+X and Ctrl+V copy, cut and paste.

Parameters

idconst char *
A name you choose, different for each box, so it remembers where its cursor is.
bufchar *
Your buffer with the text, which typing changes.
sizeint
How many bytes buf holds, with its 0 at the end. Typing that won't fit isn't taken.

Returns int

1 in the frame Enter is pressed in it, 0 otherwise.

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