summaryrefslogtreecommitdiff
path: root/ui/custom_grid.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui/custom_grid.h')
-rw-r--r--ui/custom_grid.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/custom_grid.h b/ui/custom_grid.h
index b5a4cce1..6381c8c0 100644
--- a/ui/custom_grid.h
+++ b/ui/custom_grid.h
@@ -48,22 +48,22 @@ extern const wxEventType EVENT_GRID_SYNC_DIRECTION;
struct CheckRowsEvent : public wxCommandEvent
{
- CheckRowsEvent(ptrdiff_t rowFrom, ptrdiff_t rowTo, bool setIncluded) : wxCommandEvent(EVENT_GRID_CHECK_ROWS), rowFrom_(rowFrom), rowTo_(rowTo), setIncluded_(setIncluded) {}
+ CheckRowsEvent(size_t rowFirst, size_t rowLast, bool setIncluded) : wxCommandEvent(EVENT_GRID_CHECK_ROWS), rowFirst_(rowFirst), rowLast_(rowLast), setIncluded_(setIncluded) { assert(rowFirst <= rowLast); }
virtual wxEvent* Clone() const { return new CheckRowsEvent(*this); }
- const ptrdiff_t rowFrom_;
- const ptrdiff_t rowTo_;
+ const size_t rowFirst_; //selected range: [rowFirst_, rowLast_)
+ const size_t rowLast_; //range is empty when clearing selection
const bool setIncluded_;
};
struct SyncDirectionEvent : public wxCommandEvent
{
- SyncDirectionEvent(ptrdiff_t rowFrom, ptrdiff_t rowTo, SyncDirection direction) : wxCommandEvent(EVENT_GRID_SYNC_DIRECTION), rowFrom_(rowFrom), rowTo_(rowTo), direction_(direction) {}
+ SyncDirectionEvent(size_t rowFirst, size_t rowLast, SyncDirection direction) : wxCommandEvent(EVENT_GRID_SYNC_DIRECTION), rowFirst_(rowFirst), rowLast_(rowLast), direction_(direction) { assert(rowFirst <= rowLast); }
virtual wxEvent* Clone() const { return new SyncDirectionEvent(*this); }
- const ptrdiff_t rowFrom_;
- const ptrdiff_t rowTo_;
+ const size_t rowFirst_; //see CheckRowsEvent
+ const size_t rowLast_; //
const SyncDirection direction_;
};
bgstack15