106bool drawTextFitted(ImDrawList* drawList, ImVec2 position, ImU32 color,
107 std::string_view text,
float maxWidth);
113void textFitted(std::string_view text,
float maxWidth,
const ImVec4& color);
116void pageHeader(
const char* title,
const char* subtitle =
nullptr);
128void beginCard(
const char*
id,
const char* title, ImVec2 size,
129 bool scroll =
false);
141void statTile(
const char*
id,
const char* caption,
const char* value,
142 const char* footnote,
const ImVec4& valueColor,
float width);
151 explicit TileRow(
int count,
float minimumWidth = 175.0f);
171 float maxValue = 100.0f,
float width = 0.0f);
174void meter(
const char*
label,
float fraction,
float labelWidth,
175 const ImVec4& color,
const char* valueText);
181void badge(
const char* text,
const ImVec4& color);
188void clubBadge(
const char* code, uint32_t primary, uint32_t secondary,
192void drawClubBadge(ImDrawList* drawList, ImVec2 min,
float height,
193 const char* code, uint32_t primary, uint32_t secondary);
196void formStrip(std::span<const Outcome> outcomes);
199void emptyState(
const char* title,
const char* body);
206 const char* confirmLabel,
const char* cancelLabel);
209void sparkline(
const char*
id, std::span<const float> values, ImVec2 size,
210 const ImVec4& color);
213void deltaBars(
const char*
id, std::span<const float> values, ImVec2 size);
216void barChart(
const char*
id, std::span<const BarDatum> bars,
float width,
224bool beginDataTable(
const char*
id,
int columns, ImGuiTableFlags flags,
225 float minWidth, ImVec2 size,
int freezeColumns = 1);
276 std::span<const MoneyChip>
chips = {};
287bool moneyInput(
const char*
id, int64_t& value,
294int64_t
stepMoney(int64_t value,
bool up,
double fraction);
300bool parseMoney(std::string_view text, int64_t& value);
325bool segmented(
const char*
id,
int& selected,
326 std::span<const char* const>
labels,
float width = 0.0f);
333 const ImVec4* valueColor =
nullptr,
bool emphasis =
false);
340 const char* reasonWhenNegative =
nullptr);
348 ImGuiTableColumnFlags
flags = ImGuiTableColumnFlags_None;
363 float stretchMinimum = 160.0f,
ColumnMask hidden = 0);
372 std::span<const Column> columns);
403 ImVec2 size = ImVec2(0, 0));
409bool link(
const char*
label,
const char*
id);
412void keyValue(
const char*
key,
const char* value,
float keyWidth);
435 if constexpr (std::is_same_v<T, bool>)
437 if (left == right)
return 0;
438 return left ? 1 : -1;
442 if (left < right)
return -1;
443 if (right < left)
return 1;
Lays out a row of equal tiles that wraps onto more lines when the region is too narrow for them all (...
Definition widgets.h:149
float width() const
Width for each tile.
Definition widgets.h:153
void next()
Call before each tile; keeps it on the row or wraps.
Definition widgets.cpp:182
int index
Definition widgets.h:159
float tile_width
Definition widgets.h:160
int per_row
Definition widgets.h:158
Definition match_tracking.h:25
constexpr float BUTTON_MIN_WIDTH
Definition widgets.h:239
constexpr float BUTTON_COMPACT
Definition widgets.h:237
constexpr float BUTTON_PADDING_X
Definition widgets.h:238
constexpr float BUTTON
Definition widgets.h:236
Small vector icons drawn with ImDrawList (no icon font needed).
Definition icons.cpp:33
float statTileHeight()
Height used by statTile(), for layout calculations.
Definition widgets.cpp:188
void deltaBars(const char *id, std::span< const float > values, ImVec2 size)
Bars above/below a zero line (positive green, negative red).
Definition widgets.cpp:542
bool beginResponsiveTable(const char *id, std::span< const Column > columns, ColumnMask mask, ImGuiTableFlags flags, TableHeader header, ImVec2 size)
BeginTable + setup of the visible columns and the header row. Pair with ImGui::EndTable() when it ret...
Definition widgets.cpp:1168
ColumnMask fitColumns(std::span< const Column > columns, float availableWidth, float stretchMinimum, ColumnMask hidden)
Chooses the columns that fit the available width, dropping the highest priority numbers first (never ...
Definition widgets.cpp:1037
bool secondaryButton(const char *label, ImVec2 size, ButtonSize buttonSize)
Neutral button for secondary actions.
Definition widgets.cpp:722
void clubBadge(const char *code, uint32_t primary, uint32_t secondary, float height)
Two-colour club shield (kit colours 0xRRGGBB) with the short code drawn inside when the shield is tal...
Definition widgets.cpp:397
bool parseMoney(std::string_view text, int64_t &value)
Parses "14.4M", "1,5M", "850k", "€1,200,000", "€ 2,25 mln" (false when invalid or ambiguous; see Numb...
Definition widgets.cpp:734
float buttonHeight(ButtonSize buttonSize)
Scaled height of a button class.
Definition widgets.cpp:709
void staticHeadersRow()
Header row of a non-sortable table: plain labels without the hover highlight that suggests a clickabl...
Definition widgets.cpp:627
Outcome
Match outcome for form strips.
Definition widgets.h:87
bool columnPicker(std::string_view table, std::span< const Column > columns, ColumnMask fitted)
"Columns" button opening a checklist of the table's columns; the choice is saved in the settings at o...
Definition widgets.cpp:1095
void drawClubBadge(ImDrawList *drawList, ImVec2 min, float height, const char *code, uint32_t primary, uint32_t secondary)
clubBadge() drawn at a position (height in pixels), no layout.
Definition widgets.cpp:350
bool moneyInput(const char *id, int64_t &value, const MoneyInputOptions &options)
Currency field showing the full amount; typing accepts plain numbers, either decimal mark and k/M/B (...
Definition widgets.cpp:758
void formStrip(std::span< const Outcome > outcomes)
Row of W/D/L markers (latest last).
Definition widgets.cpp:406
float buttonWidth(const char *label, ButtonSize buttonSize)
Width of a button with this label (at least the minimum width).
Definition widgets.cpp:1271
bool drawTextFitted(ImDrawList *drawList, ImVec2 position, ImU32 color, std::string_view text, float maxWidth)
Draws text cut to maxWidth with a trailing ellipsis when needed.
Definition widgets.cpp:46
void textRightColored(const ImVec4 &color, const char *text)
Coloured text right-aligned in the current cell.
Definition widgets.cpp:1289
bool cell(ColumnMask mask, int index)
Moves to the next cell when column index is visible.
Definition widgets.cpp:1204
DialogResult
Result of a modal confirmation dialog.
Definition widgets.h:79
void textFitted(std::string_view text, float maxWidth, const ImVec4 &color)
Text item limited to maxWidth; shows the full text as a tooltip when it had to be shortened.
Definition widgets.cpp:87
MoneyPreview moneyPreview(std::string_view text, const MoneyInputOptions &options)
What moneyInput() shows for the typed text.
Definition widgets.cpp:742
bool link(const char *label, const char *id)
Selectable text that looks like a link; returns true on click.
Definition widgets.cpp:1212
int64_t stepMoney(int64_t value, bool up, double fraction)
Next value of a money input's -/+ button: fraction up or down, rounded to three significant figures,...
Definition widgets.cpp:698
void ratingChip(double rating)
Rounded rating chip, coloured by the rating scale.
Definition widgets.cpp:311
bool toggleButton(const char *label, bool active, ImVec2 size, ButtonSize buttonSize)
Filter/tab button: neutral when off, selection fill with an accent underline when on (one segment of ...
Definition widgets.cpp:899
void sectionLabel(const char *text)
Small uppercase section label.
Definition widgets.cpp:121
void pageHeader(const char *title, const char *subtitle)
Large page title with an optional muted subtitle.
Definition widgets.cpp:105
bool beginDataTable(const char *id, int columns, ImGuiTableFlags flags, float minWidth, ImVec2 size, int freezeColumns)
Begins a data table that scrolls horizontally only when the region is narrower than minWidth,...
Definition widgets.cpp:613
TableHeader
Header row emitted by beginResponsiveTable().
Definition widgets.h:388
bool sameLineIfFits(float nextWidth, float spacing)
SameLine() only when an item of the given width still fits.
Definition widgets.cpp:1261
DialogResult confirmDialog(const char *id, const char *title, const char *body, const char *confirmLabel, const char *cancelLabel)
Modal confirmation. Open with ImGui::OpenPopup(id) beforehand.
Definition widgets.cpp:476
void beginCard(const char *id, const char *title, ImVec2 size, bool scroll)
Starts a bordered card. Always pair with endCard().
Definition widgets.cpp:152
void sparkline(const char *id, std::span< const float > values, ImVec2 size, const ImVec4 &color)
Line chart of a series in a fixed box.
Definition widgets.cpp:514
uint32_t ColumnMask
Visible-column mask produced by fitColumns().
Definition widgets.h:353
ButtonSize
Button height class.
Definition widgets.h:244
void meter(const char *label, float fraction, float labelWidth, const ImVec4 &color, const char *valueText)
Labelled bar with an explicit colour and value text (0-1).
Definition widgets.cpp:305
void statTile(const char *id, const char *caption, const char *value, const char *footnote, const ImVec4 &valueColor, float width)
Figure tile: caption, big value and an optional footnote.
Definition widgets.cpp:200
int compare(const T &left, const T &right)
Strictly-weak three-way comparison helper for table sorting.
Definition widgets.h:433
void barChart(const char *id, std::span< const BarDatum > bars, float width, float labelWidth)
Horizontal bars with labels and values, scaled to the maximum.
Definition widgets.cpp:571
void budgetImpact(const char *label, int64_t current, int64_t after, const char *reasonWhenNegative)
Budget before/after bar: "€20.0M -> €5.6M" (drawn arrow). The after part turns red below zero and the...
Definition widgets.cpp:974
void emptyState(const char *title, const char *body)
Muted placeholder shown when a list has nothing to display.
Definition widgets.cpp:448
void beginAutoHeightCard(const char *id, const char *title, float width)
Starts a card that grows to fit its content (never scrolls).
Definition widgets.cpp:160
void summaryRow(const char *label, const char *value, const ImVec4 *valueColor, bool emphasis)
Label on the left, value right-aligned; emphasis draws a rule above and a larger value (totals).
Definition widgets.cpp:952
void endCard()
Ends a card started with beginCard() or beginAutoHeightCard().
Definition widgets.cpp:166
bool segmented(const char *id, int &selected, std::span< const char *const > labels, float width)
Segmented control for small enumerations (joined buttons).
Definition widgets.cpp:919
void textRight(const char *text)
Text right-aligned in the current table cell or content region.
Definition widgets.cpp:1280
void keyValue(const char *key, const char *value, float keyWidth)
Muted key on the left, value on the right of the current row.
Definition widgets.cpp:1235
bool primaryButton(const char *label, ImVec2 size, ButtonSize buttonSize)
Accent-filled call-to-action button.
Definition widgets.cpp:715
void attributeBar(const char *label, float value, float labelWidth, float maxValue, float width)
Labelled horizontal bar coloured with the rating scale.
Definition widgets.cpp:292
ColumnMask hiddenColumns(std::string_view table, std::span< const Column > columns)
Columns the user hid in a table, saved in the settings per table.
Definition widgets.cpp:1080
bool dangerButton(const char *label, ImVec2 size, ButtonSize buttonSize)
Red button for destructive actions (release, cancel contract).
Definition widgets.cpp:728
void badge(const char *text, const ImVec4 &color)
Small coloured badge with text.
Definition widgets.cpp:334
int index
Definition runtime_editor.cpp:94
std::string_view table
Definition runtime_editor_validation.cpp:44
One bar in a horizontal bar chart.
Definition widgets.h:95
std::string_view label
Definition widgets.h:96
float value
Definition widgets.h:97
ImVec4 color
Definition widgets.h:98
std::string_view valueText
Definition widgets.h:99
One column of a responsive table.
Definition widgets.h:344
ImGuiTableColumnFlags flags
Definition widgets.h:348
float width
Definition widgets.h:346
const char * label
Definition widgets.h:345
ImGuiID user_id
Definition widgets.h:349
int priority
Definition widgets.h:347
A quick-pick value offered under a money input.
Definition widgets.h:266
const char * label
Definition widgets.h:267
int64_t value
Definition widgets.h:268
Line shown under a money input while typing.
Definition widgets.h:304
std::string text
Definition widgets.h:305
bool error
Definition widgets.h:306
std::array< const char *, 6 > labels
Definition transfer_terms_editor.cpp:77