GUI¶
GUI controls¶
dvz_gui()
¶
Create a new GUI dialog.
DvzGui* dvz_gui(DvzCanvas* canvas, const char* title, int flags);
Parameter | Type | Description |
---|---|---|
canvas |
DvzCanvas* |
the canvas |
title |
char* |
the GUI title |
flags |
int |
optional flags |
returns |
DvzGui* |
GUI |
dvz_gui_checkbox()
¶
Add a checkbox control.
DvzGuiControl* dvz_gui_checkbox(DvzGui* gui, const char* name, bool value);
Parameter | Type | Description |
---|---|---|
gui |
DvzGui* |
the GUI |
name |
char* |
the control label |
value |
bool |
whether the checkbox is initially checked |
returns |
DvzGuiControl* |
control |
dvz_gui_slider_float()
¶
Add a slider for float number input.
DvzGuiControl* dvz_gui_slider_float(
DvzGui* gui, const char* name, float vmin, float vmax, float value);
Parameter | Type | Description |
---|---|---|
gui |
DvzGui* |
the GUI |
name |
char* |
the control label |
vmin |
float |
the minimum value |
vmax |
float |
the maximum value |
value |
float |
the initial value |
returns |
DvzGuiControl* |
control |
dvz_gui_slider_int()
¶
Add a slider for integer input.
DvzGuiControl* dvz_gui_slider_int(
DvzGui* gui, const char* name, int vmin, int vmax, int value);
Parameter | Type | Description |
---|---|---|
gui |
DvzGui* |
the GUI |
name |
char* |
the control label |
vmin |
int |
the minimum value |
vmax |
int |
the maximum value |
value |
int |
the initial value |
returns |
DvzGuiControl* |
control |
dvz_gui_label()
¶
Add a static, non-modifiable label.
DvzGuiControl* dvz_gui_label(DvzGui* gui, const char* name, char* text);
Parameter | Type | Description |
---|---|---|
gui |
DvzGui* |
the GUI |
name |
char* |
the control label |
text |
char* |
the control text |
returns |
DvzGuiControl* |
control |
dvz_gui_textbox()
¶
Add a textbox control for text input.
DvzGuiControl* dvz_gui_textbox(DvzGui* gui, const char* name, char* text);
Parameter | Type | Description |
---|---|---|
gui |
DvzGui* |
the GUI |
name |
char* |
the control label |
value |
None |
the initial text |
returns |
DvzGuiControl* |
control |
dvz_gui_button()
¶
Add a button.
DvzGuiControl* dvz_gui_button(DvzGui* gui, const char* name, int flags);
Parameter | Type | Description |
---|---|---|
gui |
DvzGui* |
the GUI |
name |
char* |
the control label |
flags |
int |
optional flags |
returns |
DvzGuiControl* |
control |
dvz_gui_colormap()
¶
Add a colormap image.
DvzGuiControl* dvz_gui_colormap(DvzGui* gui, DvzColormap cmap);
Parameter | Type | Description |
---|---|---|
gui |
DvzGui* |
the GUI |
cmap |
DvzColormap |
the colormap |
returns |
DvzGuiControl* |
control |
dvz_gui_destroy()
¶
Destroy a GUI.
void dvz_gui_destroy(DvzGui* gui);
Parameter | Type | Description |
---|---|---|
gui |
DvzGui* |
the GUI |