1998-08-15 00:23:28 +00:00
|
|
|
#ifndef _WX_LISTCTRL_H_BASE_
|
|
|
|
#define _WX_LISTCTRL_H_BASE_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
1998-07-10 14:15:17 +00:00
|
|
|
#if defined(__WXMSW__)
|
1998-12-20 23:49:21 +00:00
|
|
|
#ifdef __WIN16__
|
|
|
|
#include "wx/generic/listctrl.h"
|
|
|
|
#else
|
1998-05-20 14:01:55 +00:00
|
|
|
#include "wx/msw/listctrl.h"
|
1998-12-20 23:49:21 +00:00
|
|
|
#endif
|
1998-07-10 14:15:17 +00:00
|
|
|
#elif defined(__WXMOTIF__)
|
1998-05-20 14:01:55 +00:00
|
|
|
#include "wx/generic/listctrl.h"
|
1998-07-10 14:15:17 +00:00
|
|
|
#elif defined(__WXGTK__)
|
1998-05-20 14:01:55 +00:00
|
|
|
#include "wx/generic/listctrl.h"
|
1998-08-07 20:23:17 +00:00
|
|
|
#elif defined(__WXQT__)
|
|
|
|
#include "wx/generic/listctrl.h"
|
1998-08-15 00:23:28 +00:00
|
|
|
#elif defined(__WXMAC__)
|
|
|
|
#include "wx/generic/listctrl.h"
|
1999-07-28 03:38:12 +00:00
|
|
|
#elif defined(__WXPM__)
|
|
|
|
#include "wx/generic/listctrl.h"
|
1998-08-15 00:23:28 +00:00
|
|
|
#elif defined(__WXSTUBS__)
|
|
|
|
#include "wx/generic/listctrl.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
|
|
|
|
1999-07-26 10:46:55 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxListEvent - the event class for the wxListCtrl notifications
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxListEvent : public wxNotifyEvent
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
|
|
|
|
|
|
|
int m_code;
|
|
|
|
long m_itemIndex;
|
|
|
|
long m_oldItemIndex;
|
|
|
|
int m_col;
|
|
|
|
bool m_cancelled;
|
|
|
|
wxPoint m_pointDrag;
|
|
|
|
|
|
|
|
wxListItem m_item;
|
1999-08-18 11:40:40 +00:00
|
|
|
|
|
|
|
inline int GetCode() { return m_code; }
|
|
|
|
inline long GetIndex() { return m_itemIndex; }
|
|
|
|
inline long GetOldIndex() { return m_oldItemIndex; }
|
|
|
|
inline long GetItem() { return m_itemIndex; }
|
|
|
|
inline long GetOldItem() { return m_oldItemIndex; }
|
|
|
|
inline int GetColumn() { return m_col; }
|
|
|
|
inline bool Cancelled() { return m_cancelled; }
|
|
|
|
inline wxPoint GetPoint() { return m_pointDrag; }
|
|
|
|
inline const wxString &GetLabel() const { return m_item.m_text; }
|
|
|
|
inline const wxString &GetText() const { return m_item.m_text; }
|
|
|
|
inline int GetImage() { return m_item.m_image; }
|
|
|
|
inline long GetData() { return m_item.m_data; }
|
|
|
|
inline long GetMask() { return m_item.m_mask; }
|
|
|
|
inline const wxListItem &GetItem() const { return m_item; }
|
1999-07-26 10:46:55 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxListEvent)
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
|
|
|
|
|
|
|
|
#define EVT_LIST_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
|
|
|
|
#define EVT_LIST_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
|
|
|
|
#define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
|
|
|
|
#define EVT_LIST_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
|
|
|
|
#define EVT_LIST_DELETE_ITEM(id, fn) { wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
|
|
|
|
#define EVT_LIST_DELETE_ALL_ITEMS(id, fn) { wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
|
|
|
|
#define EVT_LIST_GET_INFO(id, fn) { wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
|
|
|
|
#define EVT_LIST_SET_INFO(id, fn) { wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
|
|
|
|
#define EVT_LIST_ITEM_SELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
|
|
|
|
#define EVT_LIST_ITEM_DESELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
|
|
|
|
#define EVT_LIST_KEY_DOWN(id, fn) { wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
|
|
|
|
#define EVT_LIST_INSERT_ITEM(id, fn) { wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
|
|
|
|
#define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
|
|
|
|
#define EVT_LIST_ITEM_ACTIVATED(id, fn) { wxEVT_COMMAND_LIST_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
1998-08-15 00:23:28 +00:00
|
|
|
// _WX_LISTCTRL_H_BASE_
|