]> git.saurik.com Git - wxWidgets.git/blob - include/wx/listctrl.h
added default parameter values to the overloaded Show() and Enable() versions
[wxWidgets.git] / include / wx / listctrl.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/listctrl.h
3 // Purpose: wxListCtrl class
4 // Author: Vadim Zeitlin
5 // Modified by:
6 // Created: 04.12.99
7 // RCS-ID: $Id$
8 // Copyright: (c) wxWindows team
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_LISTCTRL_H_BASE_
13 #define _WX_LISTCTRL_H_BASE_
14
15 #ifdef __GNUG__
16 #pragma interface "listctrlbase.h"
17 #endif
18
19 #if wxUSE_LISTCTRL
20
21 // ----------------------------------------------------------------------------
22 // types
23 // ----------------------------------------------------------------------------
24
25 // type of compare function for wxListCtrl sort operation
26 typedef int (wxCALLBACK *wxListCtrlCompare)(long item1, long item2, long sortData);
27
28 // ----------------------------------------------------------------------------
29 // wxListCtrl constants
30 // ----------------------------------------------------------------------------
31
32 // style flags
33 #define wxLC_VRULES 0x0001
34 #define wxLC_HRULES 0x0002
35
36 #define wxLC_ICON 0x0004
37 #define wxLC_SMALL_ICON 0x0008
38 #define wxLC_LIST 0x0010
39 #define wxLC_REPORT 0x0020
40
41 #define wxLC_ALIGN_TOP 0x0040
42 #define wxLC_ALIGN_LEFT 0x0080
43 #define wxLC_AUTOARRANGE 0x0100
44 #define wxLC_VIRTUAL 0x0200
45 #define wxLC_EDIT_LABELS 0x0400
46 #define wxLC_NO_HEADER 0x0800
47 #define wxLC_NO_SORT_HEADER 0x1000
48 #define wxLC_SINGLE_SEL 0x2000
49 #define wxLC_SORT_ASCENDING 0x4000
50 #define wxLC_SORT_DESCENDING 0x8000
51
52 #define wxLC_MASK_TYPE (wxLC_ICON | wxLC_SMALL_ICON | wxLC_LIST | wxLC_REPORT)
53 #define wxLC_MASK_ALIGN (wxLC_ALIGN_TOP | wxLC_ALIGN_LEFT)
54 #define wxLC_MASK_SORT (wxLC_SORT_ASCENDING | wxLC_SORT_DESCENDING)
55
56 // for compatibility only
57 #define wxLC_USER_TEXT wxLC_VIRTUAL
58
59 // Omitted because
60 // (a) too much detail
61 // (b) not enough style flags
62 // (c) not implemented anyhow in the generic version
63 //
64 // #define wxLC_NO_SCROLL
65 // #define wxLC_NO_LABEL_WRAP
66 // #define wxLC_OWNERDRAW_FIXED
67 // #define wxLC_SHOW_SEL_ALWAYS
68
69 // Mask flags to tell app/GUI what fields of wxListItem are valid
70 #define wxLIST_MASK_STATE 0x0001
71 #define wxLIST_MASK_TEXT 0x0002
72 #define wxLIST_MASK_IMAGE 0x0004
73 #define wxLIST_MASK_DATA 0x0008
74 #define wxLIST_SET_ITEM 0x0010
75 #define wxLIST_MASK_WIDTH 0x0020
76 #define wxLIST_MASK_FORMAT 0x0040
77
78 // State flags for indicating the state of an item
79 #define wxLIST_STATE_DONTCARE 0x0000
80 #define wxLIST_STATE_DROPHILITED 0x0001 // MSW only
81 #define wxLIST_STATE_FOCUSED 0x0002
82 #define wxLIST_STATE_SELECTED 0x0004
83 #define wxLIST_STATE_CUT 0x0008 // MSW only
84
85 // Hit test flags, used in HitTest
86 #define wxLIST_HITTEST_ABOVE 0x0001 // Above the client area.
87 #define wxLIST_HITTEST_BELOW 0x0002 // Below the client area.
88 #define wxLIST_HITTEST_NOWHERE 0x0004 // In the client area but below the last item.
89 #define wxLIST_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item.
90 #define wxLIST_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item.
91 #define wxLIST_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item.
92 #define wxLIST_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state.
93 #define wxLIST_HITTEST_TOLEFT 0x0400 // To the left of the client area.
94 #define wxLIST_HITTEST_TORIGHT 0x0800 // To the right of the client area.
95
96 #define wxLIST_HITTEST_ONITEM (wxLIST_HITTEST_ONITEMICON | wxLIST_HITTEST_ONITEMLABEL | wxLIST_HITTEST_ONITEMSTATEICON)
97
98 // Flags for GetNextItem (MSW only except wxLIST_NEXT_ALL)
99 enum
100 {
101 wxLIST_NEXT_ABOVE, // Searches for an item above the specified item
102 wxLIST_NEXT_ALL, // Searches for subsequent item by index
103 wxLIST_NEXT_BELOW, // Searches for an item below the specified item
104 wxLIST_NEXT_LEFT, // Searches for an item to the left of the specified item
105 wxLIST_NEXT_RIGHT // Searches for an item to the right of the specified item
106 };
107
108 // Alignment flags for Arrange (MSW only except wxLIST_ALIGN_LEFT)
109 enum
110 {
111 wxLIST_ALIGN_DEFAULT,
112 wxLIST_ALIGN_LEFT,
113 wxLIST_ALIGN_TOP,
114 wxLIST_ALIGN_SNAP_TO_GRID
115 };
116
117 // Column format (MSW only except wxLIST_FORMAT_LEFT)
118 enum wxListColumnFormat
119 {
120 wxLIST_FORMAT_LEFT,
121 wxLIST_FORMAT_RIGHT,
122 wxLIST_FORMAT_CENTRE,
123 wxLIST_FORMAT_CENTER = wxLIST_FORMAT_CENTRE
124 };
125
126 // Autosize values for SetColumnWidth
127 enum
128 {
129 wxLIST_AUTOSIZE = -1,
130 wxLIST_AUTOSIZE_USEHEADER = -2 // partly supported by generic version
131 };
132
133 // Flag values for GetItemRect
134 enum
135 {
136 wxLIST_RECT_BOUNDS,
137 wxLIST_RECT_ICON,
138 wxLIST_RECT_LABEL
139 };
140
141 // Flag values for FindItem (MSW only)
142 enum
143 {
144 wxLIST_FIND_UP,
145 wxLIST_FIND_DOWN,
146 wxLIST_FIND_LEFT,
147 wxLIST_FIND_RIGHT
148 };
149
150 // ----------------------------------------------------------------------------
151 // wxListItemAttr: a structure containing the visual attributes of an item
152 // ----------------------------------------------------------------------------
153
154 class WXDLLEXPORT wxListItemAttr
155 {
156 public:
157 // ctors
158 wxListItemAttr() { }
159 wxListItemAttr(const wxColour& colText,
160 const wxColour& colBack,
161 const wxFont& font)
162 : m_colText(colText), m_colBack(colBack), m_font(font) { }
163
164 // setters
165 void SetTextColour(const wxColour& colText) { m_colText = colText; }
166 void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; }
167 void SetFont(const wxFont& font) { m_font = font; }
168
169 // accessors
170 bool HasTextColour() const { return m_colText.Ok(); }
171 bool HasBackgroundColour() const { return m_colBack.Ok(); }
172 bool HasFont() const { return m_font.Ok(); }
173
174 const wxColour& GetTextColour() const { return m_colText; }
175 const wxColour& GetBackgroundColour() const { return m_colBack; }
176 const wxFont& GetFont() const { return m_font; }
177
178 private:
179 wxColour m_colText,
180 m_colBack;
181 wxFont m_font;
182 };
183
184 // ----------------------------------------------------------------------------
185 // wxListItem: the item or column info, used to exchange data with wxListCtrl
186 // ----------------------------------------------------------------------------
187
188 class WXDLLEXPORT wxListItem : public wxObject
189 {
190 public:
191 wxListItem() { Init(); m_attr = NULL; }
192 wxListItem(const wxListItem& item)
193 : wxObject(),
194 m_mask(item.m_mask),
195 m_itemId(item.m_itemId),
196 m_col(item.m_col),
197 m_state(item.m_state),
198 m_stateMask(item.m_stateMask),
199 m_text(item.m_text),
200 m_image(item.m_image),
201 m_data(item.m_data),
202 m_format(item.m_format),
203 m_width(item.m_width),
204 m_attr(NULL)
205 {
206 // copy list item attributes
207 m_attr = new wxListItemAttr(*item.GetAttributes());
208 }
209 virtual ~wxListItem() { delete m_attr; }
210
211 // resetting
212 void Clear() { Init(); m_text.clear(); ClearAttributes(); }
213 void ClearAttributes() { if ( m_attr ) { delete m_attr; m_attr = NULL; } }
214
215 // setters
216 void SetMask(long mask) { m_mask = mask; }
217 void SetId(long id) { m_itemId = id; }
218 void SetColumn(int col) { m_col = col; }
219 void SetState(long state) { m_state = state; m_stateMask |= state; }
220 void SetStateMask(long stateMask) { m_stateMask = stateMask; }
221 void SetText(const wxString& text) { m_text = text; }
222 void SetImage(int image) { m_image = image; }
223 void SetData(long data) { m_data = data; }
224 void SetData(void *data) { m_data = (long)data; }
225
226 void SetWidth(int width) { m_width = width; }
227 void SetAlign(wxListColumnFormat align) { m_format = align; }
228
229 void SetTextColour(const wxColour& colText)
230 { Attributes().SetTextColour(colText); }
231 void SetBackgroundColour(const wxColour& colBack)
232 { Attributes().SetBackgroundColour(colBack); }
233 void SetFont(const wxFont& font)
234 { Attributes().SetFont(font); }
235
236 // accessors
237 long GetMask() const { return m_mask; }
238 long GetId() const { return m_itemId; }
239 int GetColumn() const { return m_col; }
240 long GetState() const { return m_state & m_stateMask; }
241 const wxString& GetText() const { return m_text; }
242 int GetImage() const { return m_image; }
243 long GetData() const { return m_data; }
244
245 int GetWidth() const { return m_width; }
246 wxListColumnFormat GetAlign() const { return (wxListColumnFormat)m_format; }
247
248 wxListItemAttr *GetAttributes() const { return m_attr; }
249 bool HasAttributes() const { return m_attr != NULL; }
250
251 wxColour GetTextColour() const
252 { return HasAttributes() ? m_attr->GetTextColour() : wxNullColour; }
253 wxColour GetBackgroundColour() const
254 { return HasAttributes() ? m_attr->GetBackgroundColour()
255 : wxNullColour; }
256 wxFont GetFont() const
257 { return HasAttributes() ? m_attr->GetFont() : wxNullFont; }
258
259 // this conversion is necessary to make old code using GetItem() to
260 // compile
261 operator long() const { return m_itemId; }
262
263 // these members are public for compatibility
264
265 long m_mask; // Indicates what fields are valid
266 long m_itemId; // The zero-based item position
267 int m_col; // Zero-based column, if in report mode
268 long m_state; // The state of the item
269 long m_stateMask;// Which flags of m_state are valid (uses same flags)
270 wxString m_text; // The label/header text
271 int m_image; // The zero-based index into an image list
272 long m_data; // App-defined data
273
274 // For columns only
275 int m_format; // left, right, centre
276 int m_width; // width of column
277
278 protected:
279 // creates m_attr if we don't have it yet
280 wxListItemAttr& Attributes()
281 {
282 if ( !m_attr )
283 m_attr = new wxListItemAttr;
284
285 return *m_attr;
286 }
287
288 void Init()
289 {
290 m_mask = 0;
291 m_itemId = 0;
292 m_col = 0;
293 m_state = 0;
294 m_stateMask = 0;
295 m_image = 0;
296 m_data = 0;
297
298 m_format = wxLIST_FORMAT_CENTRE;
299 m_width = 0;
300 }
301
302 wxListItemAttr *m_attr; // optional pointer to the items style
303
304 private:
305 // VZ: this is strange, we have a copy ctor but not operator=(), why?
306 wxListItem& operator=(const wxListItem& item);
307
308 DECLARE_DYNAMIC_CLASS(wxListItem)
309 };
310
311 // ----------------------------------------------------------------------------
312 // include the wxListCtrl class declaration
313 // ----------------------------------------------------------------------------
314
315 #if defined(__WIN32__) && !defined(__WXUNIVERSAL__)
316 #include "wx/msw/listctrl.h"
317 #else
318 #include "wx/generic/listctrl.h"
319 #endif
320
321 // ----------------------------------------------------------------------------
322 // wxListView: a class which provides a better API for list control
323 // ----------------------------------------------------------------------------
324
325 class WXDLLEXPORT wxListView : public wxListCtrl
326 {
327 public:
328 wxListView() { }
329 wxListView( wxWindow *parent,
330 wxWindowID id = -1,
331 const wxPoint& pos = wxDefaultPosition,
332 const wxSize& size = wxDefaultSize,
333 long style = wxLC_REPORT,
334 const wxValidator& validator = wxDefaultValidator,
335 const wxString &name = "listctrl" )
336 {
337 Create(parent, id, pos, size, style, validator, name);
338 }
339
340 // focus/selection stuff
341 // ---------------------
342
343 // [de]select an item
344 void Select(long n, bool on = TRUE)
345 {
346 SetItemState(n, on ? wxLIST_STATE_SELECTED : 0, wxLIST_STATE_SELECTED);
347 }
348
349 // focus and show the given item
350 void Focus(long index)
351 {
352 SetItemState(index, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED);
353 EnsureVisible(index);
354 }
355
356 // get the currently focused item or -1 if none
357 long GetFocusedItem() const
358 {
359 return GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_FOCUSED);
360 }
361
362 // get first and subsequent selected items, return -1 when no more
363 long GetNextSelected(long item) const
364 { return GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); }
365 long GetFirstSelected() const
366 { return GetNextSelected(-1); }
367
368 // return TRUE if the item is selected
369 bool IsSelected(long index)
370 { return GetItemState(index, wxLIST_STATE_SELECTED) != 0; }
371
372 // columns
373 // -------
374
375 void SetColumnImage(int col, int image)
376 {
377 wxListItem item;
378 item.SetMask(wxLIST_MASK_IMAGE);
379 item.SetImage(image);
380 SetColumn(col, item);
381 }
382
383 void ClearColumnImage(int col) { SetColumnImage(col, -1); }
384
385 private:
386 DECLARE_DYNAMIC_CLASS(wxListView)
387 };
388
389 // ----------------------------------------------------------------------------
390 // wxListEvent - the event class for the wxListCtrl notifications
391 // ----------------------------------------------------------------------------
392
393 class WXDLLEXPORT wxListEvent : public wxNotifyEvent
394 {
395 public:
396 wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
397 : wxNotifyEvent(commandType, id)
398 , m_code(0)
399 , m_oldItemIndex(0)
400 , m_itemIndex(0)
401 , m_col(0)
402 , m_pointDrag()
403 , m_item()
404 { }
405
406 wxListEvent(const wxListEvent& event)
407 : wxNotifyEvent(event)
408 , m_code(event.m_code)
409 , m_oldItemIndex(event.m_oldItemIndex)
410 , m_itemIndex(event.m_itemIndex)
411 , m_col(event.m_col)
412 , m_pointDrag(event.m_pointDrag)
413 , m_item(event.m_item)
414 { }
415
416 int GetCode() const { return m_code; }
417 long GetIndex() const { return m_itemIndex; }
418 int GetColumn() const { return m_col; }
419 wxPoint GetPoint() const { return m_pointDrag; }
420 const wxString& GetLabel() const { return m_item.m_text; }
421 const wxString& GetText() const { return m_item.m_text; }
422 int GetImage() const { return m_item.m_image; }
423 long GetData() const { return m_item.m_data; }
424 long GetMask() const { return m_item.m_mask; }
425 const wxListItem& GetItem() const { return m_item; }
426
427 // for wxEVT_COMMAND_LIST_CACHE_HINT only
428 long GetCacheFrom() const { return m_oldItemIndex; }
429 long GetCacheTo() const { return m_itemIndex; }
430
431 // these methods don't do anything at all
432 #if WXWIN_COMPATIBILITY_2_2
433 long GetOldIndex() const { return 0; }
434 long GetOldItem() const { return 0; }
435 #endif // WXWIN_COMPATIBILITY_2_2
436
437 virtual wxEvent *Clone() const { return new wxListEvent(*this); }
438
439 //protected: -- not for backwards compatibility
440 int m_code;
441 long m_oldItemIndex; // only for wxEVT_COMMAND_LIST_CACHE_HINT
442 long m_itemIndex;
443 int m_col;
444 wxPoint m_pointDrag;
445
446 wxListItem m_item;
447
448 private:
449 DECLARE_DYNAMIC_CLASS(wxListEvent)
450 };
451
452 // ----------------------------------------------------------------------------
453 // wxListCtrl event macros
454 // ----------------------------------------------------------------------------
455
456 BEGIN_DECLARE_EVENT_TYPES()
457 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_DRAG, 700)
458 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_RDRAG, 701)
459 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, 702)
460 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_END_LABEL_EDIT, 703)
461 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ITEM, 704)
462 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, 705)
463 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_GET_INFO, 706)
464 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_SET_INFO, 707)
465 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_SELECTED, 708)
466 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_DESELECTED, 709)
467 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_KEY_DOWN, 710)
468 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_INSERT_ITEM, 711)
469 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_CLICK, 712)
470 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, 713)
471 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, 714)
472 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, 715)
473 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_CACHE_HINT, 716)
474 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_RIGHT_CLICK, 717)
475 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, 718)
476 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_DRAGGING, 719)
477 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_COL_END_DRAG, 720)
478 DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_FOCUSED, 721)
479 END_DECLARE_EVENT_TYPES()
480
481 typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
482
483 #define EVT_LIST_BEGIN_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
484 #define EVT_LIST_BEGIN_RDRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
485 #define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
486 #define EVT_LIST_END_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
487 #define EVT_LIST_DELETE_ITEM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
488 #define EVT_LIST_DELETE_ALL_ITEMS(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
489 #define EVT_LIST_GET_INFO(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
490 #define EVT_LIST_SET_INFO(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
491 #define EVT_LIST_KEY_DOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
492 #define EVT_LIST_INSERT_ITEM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
493
494 #define EVT_LIST_COL_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
495 #define EVT_LIST_COL_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
496 #define EVT_LIST_COL_BEGIN_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
497 #define EVT_LIST_COL_DRAGGING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_DRAGGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
498 #define EVT_LIST_COL_END_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_COL_END_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
499
500 #define EVT_LIST_ITEM_SELECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
501 #define EVT_LIST_ITEM_DESELECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL ),
502 #define EVT_LIST_ITEM_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL ),
503 #define EVT_LIST_ITEM_MIDDLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL ),
504 #define EVT_LIST_ITEM_ACTIVATED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL ),
505 #define EVT_LIST_ITEM_FOCUSED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_ITEM_FOCUSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL ),
506
507 #define EVT_LIST_CACHE_HINT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_LIST_CACHE_HINT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL ),
508
509 #endif // wxUSE_LISTCTRL
510
511 #endif
512 // _WX_LISTCTRL_H_BASE_