ref: d92a4578490a554a34b3e81dd16129c6c96f3dcc
dir: /ui.h/
typedef struct Meta Meta;
typedef struct UI UI;
struct Meta {
const char *k;
const char *v;
};
struct UI {
int type;
const char *label;
float *zone;
float init;
float min;
float max;
float step;
Meta *meta;
int nummeta;
int autovoice;
int crossvoice;
/* optional */
char *(*readstr)(UI *ui, int auxtype, char *s, int sz);
int (*writestr)(UI *ui, int auxtype, char *s);
void *userdata;
};
char *ui_readstr(UI *ui, int auxtype, char *s, int sz);
int ui_writestr(UI *ui, int auxtype, char *s);
void ui_tgroup(const char *label);
void ui_hgroup(const char *label);
void ui_vgroup(const char *label);
void ui_endgroup(void);
UI *ui_button(const char *label, float *zone);
UI *ui_checkbox(const char *label, float *zone);
UI *ui_vslider(const char *label, float *zone, float init, float min, float max, float step);
UI *ui_hslider(const char *label, float *zone, float init, float min, float max, float step);
UI *ui_nentry(const char *label, float *zone, float init, float min, float max, float step);
UI *ui_hbargraph(const char *label, float *zone, float min, float max);
UI *ui_vbargraph(const char *label, float *zone, float min, float max);
void ui_declare(float *zone, const char *key, const char *value);