From 68a3532728b55b73d8bcadb8ccfc1d9396346cd2 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 13 Jul 2024 11:44:32 -0700 Subject: Basic table scrollbar rendering. --- src/widget/widget.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/widget') diff --git a/src/widget/widget.h b/src/widget/widget.h index a2c96bc..c75bd65 100644 --- a/src/widget/widget.h +++ b/src/widget/widget.h @@ -54,10 +54,12 @@ typedef struct uiTable { uiWidget widget; int rows; int cols; - int* widths; // Width, in pixels, for each column. - uiCell* header; // If non-null, row of 'cols' header cells. - uiCell** cells; // Array of 'rows' rows, each of 'cols' cells. - int offset; // Offset into the rows of the table. Units: rows. + int height; // Height in pixels. + int* widths; // Width, in pixels, for each column. + uiCell* header; // If non-null, row of 'cols' header cells. + uiCell** cells; // Array of 'rows' rows, each of 'cols' cells. + int offset; // Offset into the rows of the table. Units: rows. + int num_visible_rows; // The number of rows that are visible at once. struct { bool vertical_overflow : 1; // True if contents overflow vertically. } flags; -- cgit v1.2.3