From 2fab4c4fc12692be64279688595c6478bfcbeea9 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 3 Aug 2016 16:38:32 -0700 Subject: [PATCH] Add setter methods to wxListEvent --- include/wx/listbase.h | 8 ++++++++ interface/wx/listctrl.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/include/wx/listbase.h b/include/wx/listbase.h index 6a3bcf6016..4309817822 100644 --- a/include/wx/listbase.h +++ b/include/wx/listbase.h @@ -472,9 +472,17 @@ public: long GetMask() const { return m_item.m_mask; } const wxListItem& GetItem() const { return m_item; } + void SetKeyCode(int code) { m_code = code; } + void SetIndex(long index) { m_itemIndex = index; } + void SetColumn(int col) { m_col = col; } + void SetPoint(const wxPoint& point) { m_pointDrag = point; } + void SetItem(const wxListItem& item) { m_item = item; } + // for wxEVT_LIST_CACHE_HINT only long GetCacheFrom() const { return m_oldItemIndex; } long GetCacheTo() const { return m_itemIndex; } + void SetCacheFrom(long cacheFrom) { m_oldItemIndex = cacheFrom; } + void SetCacheTo(long cacheTo) { m_itemIndex = cacheTo; } // was label editing canceled? (for wxEVT_LIST_END_LABEL_EDIT only) bool IsEditCancelled() const { return m_editCancelled; } diff --git a/interface/wx/listctrl.h b/interface/wx/listctrl.h index 14fffe2f0e..ea71e997df 100644 --- a/interface/wx/listctrl.h +++ b/interface/wx/listctrl.h @@ -1505,6 +1505,44 @@ public: admittedly rare case when the user wants to rename it to an empty string). */ bool IsEditCancelled() const; + + + /** + @see GetKeyCode() + */ + void SetKeyCode(int code); + + /** + @see GetIndex() + */ + void SetIndex(long index); + + /** + @see GetColumn() + */ + void SetColumn(int col); + + /** + @see GetPoint() + */ + void SetPoint(const wxPoint& point); + + /** + @see GetItem() + */ + void SetItem(const wxListItem& item); + + + /** + @see GetCacheFrom() + */ + void SetCacheFrom(long cacheFrom); + + /** + @see GetCacheTo() + */ + void SetCacheTo(long cacheTo); + };