diff options
| author | Pietro Gagliardi <[email protected]> | 2014-12-04 07:55:01 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-12-04 07:55:01 -0500 |
| commit | 74f9630bccc1cb9651c9cd3d1ae594d16d4a7823 (patch) | |
| tree | 79c98e5e4d7decb83772583742222447c0fe8469 | |
| parent | 5c22fceb9bce5fa3aad188f0c25cac9518c96834 (diff) | |
Started restructuring the Windows Table code; this creates stubs for coordinate system management.
| -rw-r--r-- | wintable/NEWcoord.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/wintable/NEWcoord.h b/wintable/NEWcoord.h new file mode 100644 index 0000000..6a0fb68 --- /dev/null +++ b/wintable/NEWcoord.h @@ -0,0 +1,32 @@ +// 4 december 2014 + +typedef struct rowcol rowcol; + +struct rowcol { + intptr_t row; + intptr_t column; +}; + +static rowcol clientCoordToRowColumn(struct table *t, POINT pt) +{ + // TODO +} + +// same as client coordinates, but stored in a lParam (like the various mouse messages provide) +// TODO should we use GetMessagePos() instead? +static rowcol lParamToRowColumn(struct table *t, LPARAM lParam) +{ + POINT pt; + + pt.x = GET_X_LPARAM(lParam); + pt.y = GET_Y_LPARAM(lParam); + return clientCoordToRowColumn(t, pt); +} + +// returns TRUE if the row is visible and thus has client coordinates; FALSE otherwise +static BOOL rowColumnToClientCoord(struct table *t, rowcol rc, struct POINT *pt) +{ + // TODO +} + +// TODO idealCoordToRowColumn/rowColumnToIdealCoord? |
