diff options
| author | Pietro Gagliardi <[email protected]> | 2015-01-08 01:55:45 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-01-08 01:55:45 -0500 |
| commit | ce64650aadf1f7dd751a1f753dff920ba1652edf (patch) | |
| tree | a4fdecd9310e2a74ab54cc53eef3cfc308d7efaa /wintable/update.h | |
| parent | 592ae7a987d2b795c5f508a17520b313f8d17481 (diff) | |
Added updateAll() and resolved WM_SETFONT to begin the final reasoning-through of update().
Diffstat (limited to 'wintable/update.h')
| -rw-r--r-- | wintable/update.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/wintable/update.h b/wintable/update.h index b04f445..edf4b40 100644 --- a/wintable/update.h +++ b/wintable/update.h @@ -3,6 +3,8 @@ // Whenever a number of things in the Table changes, the update() function needs to be called to update any metrics and scrolling positions. // The control font changing is the big one, as that comes with a flag that decides whether or not to redraw everything. We'll need to respect that here. +// For my personal convenience, each invocation of update() and updateAll() will be suffixed with a DONE comment once I have reasoned that the chosen function is correct and that no additional redrawing is necessary. + // TODO actually use redraw here static void update(struct table *t, BOOL redraw) { @@ -39,6 +41,13 @@ static void update(struct table *t, BOOL redraw) t->vpagesize = height / rowht(t); // and do a dummy vertical scroll to apply that vscrollby(t, 0); +} - // TODO invalidate /everything/? +// this is the same as update(), but also redraws /everything/ +// as such, redraw is TRUE +static void updateAll(struct table *t) +{ + update(t, TRUE); + if (InvalidateRect(t, NULL, TRUE) == 0) + panic("error queueing all of Table for redraw in updateAll()"); } |
