summaryrefslogtreecommitdiff
path: root/wintable/api.h
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2015-02-19 23:25:51 -0500
committerPietro Gagliardi <[email protected]>2015-02-19 23:25:51 -0500
commit924352d76a2bdc54415c18246a57bf29322f7344 (patch)
tree68bb16c9ca35986e10fbcd7d41886f361e29ce42 /wintable/api.h
parentcab2d934495949cadf5345f910339054f426ccea (diff)
Added tableSetSelection to the new Windows Table and hooked it up to the package ui Table.
Diffstat (limited to 'wintable/api.h')
-rw-r--r--wintable/api.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/wintable/api.h b/wintable/api.h
index 78bf514..5016710 100644
--- a/wintable/api.h
+++ b/wintable/api.h
@@ -38,6 +38,7 @@ static void setRowCount(struct table *t, intptr_t rc)
HANDLER(apiHandlers)
{
intptr_t *rcp;
+ intptr_t row;
switch (uMsg) {
case WM_SETFONT:
@@ -72,6 +73,20 @@ HANDLER(apiHandlers)
*rcp = t->selectedColumn;
*lResult = 0;
return TRUE;
+ case tableSetSelection:
+ // TODO does doselect() do validation?
+ rcp = (intptr_t *) wParam;
+ row = *rcp;
+ rcp = (intptr_t *) lParam;
+ if (rcp == NULL)
+ if (row == -1)
+ doselect(t, -1, -1);
+ else // select column 0, just like keyboard selections; TODO what if there aren't any columns?
+ doselect(t, row, 0);
+ else
+ doselect(t, row, *rcp);
+ *lResult = 0;
+ return TRUE;
}
return FALSE;
}