Add setter methods to wxListEvent

This commit is contained in:
Robin Dunn 2016-08-03 16:38:32 -07:00
parent 5301cbd845
commit 2fab4c4fc1
2 changed files with 46 additions and 0 deletions

View File

@ -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; }

View File

@ -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);
};