From cab2d934495949cadf5345f910339054f426ccea Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 19 Feb 2015 22:58:17 -0500 Subject: Added tableGetSelection to the new Windows Table and hooked it up to package ui's Table. --- wintable/api.h | 9 +++++++++ wintable/includethis.h | 5 +++++ 2 files changed, 14 insertions(+) (limited to 'wintable') diff --git a/wintable/api.h b/wintable/api.h index 04c7561..78bf514 100644 --- a/wintable/api.h +++ b/wintable/api.h @@ -63,6 +63,15 @@ HANDLER(apiHandlers) setRowCount(t, *rcp); *lResult = 0; return TRUE; + case tableGetSelection: + rcp = (intptr_t *) wParam; + if (rcp != NULL) + *rcp = t->selectedRow; + rcp = (intptr_t *) lParam; + if (rcp != NULL) + *rcp = t->selectedColumn; + *lResult = 0; + return TRUE; } return FALSE; } diff --git a/wintable/includethis.h b/wintable/includethis.h index 4c7ee2a..f40c6f3 100644 --- a/wintable/includethis.h +++ b/wintable/includethis.h @@ -14,6 +14,11 @@ enum { // wParam - 0 // lParam - pointer to intptr_t containing new count tableSetRowCount, + // wParam - pointer to intptr_t where selected row will be stored + // lParam - pointer to intptr_t where selected column will be stored + // both will be -1 for no selection + // if either is NULL, that value is not written + tableGetSelection, }; enum { -- cgit v1.2.3