Components / Developer tools
Problems panel
Compiler and linter output grouped by file, with each file's count.
Functions: cui_problems

Usage
cui_problems_result r = cui_problems(ui, "problems", diags, diag_count, .height = 300);
if (r.activated >= 0)
open_file_at(diags[r.activated].file, diags[r.activated].line, diags[r.activated].column);
Toggles above it filter by severity and show the count of each, and the field filters by text in the message, file, source or code. A file's header folds its group. Up and Down move the selection, Left and Right fold and unfold (swapped in a right-to-left interface), and Enter or a double click reports activated. A hover shows the whole message and its position. Below 520 points the source and code are left out. Twenty thousand diagnostics take about a millisecond a frame.
Keyboard
- Up and Down move the selection, Left and Right fold and unfold (swapped in a right-to-left interface), and Enter or a double click reports
activated.
Options of cui_problems
| Option | Type | Default | Description |
|---|---|---|---|
.width | cui_size | Width: CUI_FILL, CUI_FIT, CUI_PX(n) or CUI_PCT(n); unset uses the component's own. | |
.height | float | Height in points; 0 uses the component's own. | |
.no_toolbar | bool | hides the severity toggles and the filter field above the list |
cui_diagnostic
| Field | Type | Description |
|---|---|---|
severity | cui_severity | One of CUI_SEVERITY_ERROR, CUI_SEVERITY_WARNING, CUI_SEVERITY_INFO or CUI_SEVERITY_HINT. |
message | const char * | the text of the row; the whole message shows on hover |
file | const char * | groups the rows; NULL or "" groups as "No file" |
line | int | 1 based; 0 leaves it out |
column | int | 1 based; 0 leaves it out |
source | const char * | "gcc", "clang-tidy"... (may be NULL) |
code | const char * | "-Wunused-variable"... (may be NULL) |
cui_severity: CUI_SEVERITY_ERROR, CUI_SEVERITY_WARNING, CUI_SEVERITY_INFO, CUI_SEVERITY_HINT
cui_problems_result
| Field | Type | Description |
|---|---|---|
selected | int | diagnostic selected, or -1 |
activated | int | diagnostic opened this frame (Enter, double-click), or -1 |
shown | int | diagnostics that pass the filters |
Related
- Pipeline: A CI or CD run: each stage is a column of its jobs with their status and duration, and connectors run between the stages.
- Key-value editor: Rows of key and value fields for HTTP headers, query parameters or environment variables.
- Query builder: A filter built from conditions joined by all or any, in groups that nest.
- Schedule picker: A cron schedule edited through plain choices instead of the expression, with the next runs listed.