CUI

Components / Developer tools

Problems panel

Compiler and linter output grouped by file, with each file's count.

Functions: cui_problems

Problems panel

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

OptionTypeDefaultDescription
.widthcui_sizeWidth: CUI_FILL, CUI_FIT, CUI_PX(n) or CUI_PCT(n); unset uses the component's own.
.heightfloatHeight in points; 0 uses the component's own.
.no_toolbarboolhides the severity toggles and the filter field above the list

cui_diagnostic

FieldTypeDescription
severitycui_severityOne of CUI_SEVERITY_ERROR, CUI_SEVERITY_WARNING, CUI_SEVERITY_INFO or CUI_SEVERITY_HINT.
messageconst char *the text of the row; the whole message shows on hover
fileconst char *groups the rows; NULL or "" groups as "No file"
lineint1 based; 0 leaves it out
columnint1 based; 0 leaves it out
sourceconst char *"gcc", "clang-tidy"... (may be NULL)
codeconst char *"-Wunused-variable"... (may be NULL)

cui_severity: CUI_SEVERITY_ERROR, CUI_SEVERITY_WARNING, CUI_SEVERITY_INFO, CUI_SEVERITY_HINT

cui_problems_result

FieldTypeDescription
selectedintdiagnostic selected, or -1
activatedintdiagnostic opened this frame (Enter, double-click), or -1
shownintdiagnostics 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.