]> git.saurik.com Git - wxWidgets.git/blame - include/wx/listctrl.h
wxHtmlWidgetCells now destroys window correctly
[wxWidgets.git] / include / wx / listctrl.h
CommitLineData
34138703
JS
1#ifndef _WX_LISTCTRL_H_BASE_
2#define _WX_LISTCTRL_H_BASE_
c801d85f 3
2049ba38 4#if defined(__WXMSW__)
1e6d9499
JS
5#ifdef __WIN16__
6#include "wx/generic/listctrl.h"
7#else
c801d85f 8#include "wx/msw/listctrl.h"
1e6d9499 9#endif
2049ba38 10#elif defined(__WXMOTIF__)
c801d85f 11#include "wx/generic/listctrl.h"
2049ba38 12#elif defined(__WXGTK__)
c801d85f 13#include "wx/generic/listctrl.h"
b4e76e0d
RR
14#elif defined(__WXQT__)
15#include "wx/generic/listctrl.h"
34138703
JS
16#elif defined(__WXMAC__)
17#include "wx/generic/listctrl.h"
1777b9bb
DW
18#elif defined(__WXPM__)
19#include "wx/generic/listctrl.h"
34138703
JS
20#elif defined(__WXSTUBS__)
21#include "wx/generic/listctrl.h"
c801d85f
KB
22#endif
23
86f975a8
VZ
24// ----------------------------------------------------------------------------
25// wxListEvent - the event class for the wxListCtrl notifications
26// ----------------------------------------------------------------------------
27
28class WXDLLEXPORT wxListEvent : public wxNotifyEvent
29{
30public:
31 wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
32
33 int m_code;
34 long m_itemIndex;
35 long m_oldItemIndex;
36 int m_col;
37 bool m_cancelled;
38 wxPoint m_pointDrag;
39
40 wxListItem m_item;
41
42private:
43 DECLARE_DYNAMIC_CLASS(wxListEvent)
44};
45
46typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
47
48#define EVT_LIST_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
49#define EVT_LIST_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
50#define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
51#define EVT_LIST_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
52#define EVT_LIST_DELETE_ITEM(id, fn) { wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
53#define EVT_LIST_DELETE_ALL_ITEMS(id, fn) { wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
54#define EVT_LIST_GET_INFO(id, fn) { wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
55#define EVT_LIST_SET_INFO(id, fn) { wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
56#define EVT_LIST_ITEM_SELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
57#define EVT_LIST_ITEM_DESELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
58#define EVT_LIST_KEY_DOWN(id, fn) { wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
59#define EVT_LIST_INSERT_ITEM(id, fn) { wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
60#define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
61#define EVT_LIST_ITEM_ACTIVATED(id, fn) { wxEVT_COMMAND_LIST_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL },
62
c801d85f 63#endif
34138703 64 // _WX_LISTCTRL_H_BASE_