1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxListCtrl class
4 // Author: Vadim Zeitlin
7 // Copyright: (c) wxWidgets team
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_LISTBASE_H_BASE_
12 #define _WX_LISTBASE_H_BASE_
14 #include "wx/colour.h"
16 #include "wx/gdicmn.h"
18 #include "wx/control.h"
20 class WXDLLIMPEXP_FWD_CORE wxImageList
;
22 // ----------------------------------------------------------------------------
24 // ----------------------------------------------------------------------------
26 // type of compare function for wxListCtrl sort operation
28 int (wxCALLBACK
*wxListCtrlCompare
)(wxIntPtr item1
, wxIntPtr item2
, wxIntPtr sortData
);
30 // ----------------------------------------------------------------------------
31 // wxListCtrl constants
32 // ----------------------------------------------------------------------------
35 #define wxLC_VRULES 0x0001
36 #define wxLC_HRULES 0x0002
38 #define wxLC_ICON 0x0004
39 #define wxLC_SMALL_ICON 0x0008
40 #define wxLC_LIST 0x0010
41 #define wxLC_REPORT 0x0020
43 #define wxLC_ALIGN_TOP 0x0040
44 #define wxLC_ALIGN_LEFT 0x0080
45 #define wxLC_AUTOARRANGE 0x0100
46 #define wxLC_VIRTUAL 0x0200
47 #define wxLC_EDIT_LABELS 0x0400
48 #define wxLC_NO_HEADER 0x0800
49 #define wxLC_NO_SORT_HEADER 0x1000
50 #define wxLC_SINGLE_SEL 0x2000
51 #define wxLC_SORT_ASCENDING 0x4000
52 #define wxLC_SORT_DESCENDING 0x8000
54 #define wxLC_MASK_TYPE (wxLC_ICON | wxLC_SMALL_ICON | wxLC_LIST | wxLC_REPORT)
55 #define wxLC_MASK_ALIGN (wxLC_ALIGN_TOP | wxLC_ALIGN_LEFT)
56 #define wxLC_MASK_SORT (wxLC_SORT_ASCENDING | wxLC_SORT_DESCENDING)
58 // for compatibility only
59 #define wxLC_USER_TEXT wxLC_VIRTUAL
62 // (a) too much detail
63 // (b) not enough style flags
64 // (c) not implemented anyhow in the generic version
66 // #define wxLC_NO_SCROLL
67 // #define wxLC_NO_LABEL_WRAP
68 // #define wxLC_OWNERDRAW_FIXED
69 // #define wxLC_SHOW_SEL_ALWAYS
71 // Mask flags to tell app/GUI what fields of wxListItem are valid
72 #define wxLIST_MASK_STATE 0x0001
73 #define wxLIST_MASK_TEXT 0x0002
74 #define wxLIST_MASK_IMAGE 0x0004
75 #define wxLIST_MASK_DATA 0x0008
76 #define wxLIST_SET_ITEM 0x0010
77 #define wxLIST_MASK_WIDTH 0x0020
78 #define wxLIST_MASK_FORMAT 0x0040
80 // State flags for indicating the state of an item
81 #define wxLIST_STATE_DONTCARE 0x0000
82 #define wxLIST_STATE_DROPHILITED 0x0001 // MSW only
83 #define wxLIST_STATE_FOCUSED 0x0002
84 #define wxLIST_STATE_SELECTED 0x0004
85 #define wxLIST_STATE_CUT 0x0008 // MSW only
86 #define wxLIST_STATE_DISABLED 0x0010 // OS2 only
87 #define wxLIST_STATE_FILTERED 0x0020 // OS2 only
88 #define wxLIST_STATE_INUSE 0x0040 // OS2 only
89 #define wxLIST_STATE_PICKED 0x0080 // OS2 only
90 #define wxLIST_STATE_SOURCE 0x0100 // OS2 only
92 // Hit test flags, used in HitTest
93 #define wxLIST_HITTEST_ABOVE 0x0001 // Above the client area.
94 #define wxLIST_HITTEST_BELOW 0x0002 // Below the client area.
95 #define wxLIST_HITTEST_NOWHERE 0x0004 // In the client area but below the last item.
96 #define wxLIST_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item.
97 #define wxLIST_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item.
98 #define wxLIST_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item.
99 #define wxLIST_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state.
100 #define wxLIST_HITTEST_TOLEFT 0x0400 // To the left of the client area.
101 #define wxLIST_HITTEST_TORIGHT 0x0800 // To the right of the client area.
103 #define wxLIST_HITTEST_ONITEM (wxLIST_HITTEST_ONITEMICON | wxLIST_HITTEST_ONITEMLABEL | wxLIST_HITTEST_ONITEMSTATEICON)
105 // GetSubItemRect constants
106 #define wxLIST_GETSUBITEMRECT_WHOLEITEM -1l
108 // Flags for GetNextItem (MSW only except wxLIST_NEXT_ALL)
111 wxLIST_NEXT_ABOVE
, // Searches for an item above the specified item
112 wxLIST_NEXT_ALL
, // Searches for subsequent item by index
113 wxLIST_NEXT_BELOW
, // Searches for an item below the specified item
114 wxLIST_NEXT_LEFT
, // Searches for an item to the left of the specified item
115 wxLIST_NEXT_RIGHT
// Searches for an item to the right of the specified item
118 // Alignment flags for Arrange (MSW only except wxLIST_ALIGN_LEFT)
121 wxLIST_ALIGN_DEFAULT
,
124 wxLIST_ALIGN_SNAP_TO_GRID
127 // Column format (MSW only except wxLIST_FORMAT_LEFT)
128 enum wxListColumnFormat
132 wxLIST_FORMAT_CENTRE
,
133 wxLIST_FORMAT_CENTER
= wxLIST_FORMAT_CENTRE
136 // Autosize values for SetColumnWidth
139 wxLIST_AUTOSIZE
= -1,
140 wxLIST_AUTOSIZE_USEHEADER
= -2 // partly supported by generic version
143 // Flag values for GetItemRect
151 // Flag values for FindItem (MSW only)
160 // ----------------------------------------------------------------------------
161 // wxListItemAttr: a structure containing the visual attributes of an item
162 // ----------------------------------------------------------------------------
164 // TODO: this should be renamed to wxItemAttr or something general like this
165 // and used as base class for wxTextAttr which duplicates this class
166 // entirely currently
167 class WXDLLIMPEXP_CORE wxListItemAttr
172 wxListItemAttr(const wxColour
& colText
,
173 const wxColour
& colBack
,
175 : m_colText(colText
), m_colBack(colBack
), m_font(font
)
179 // default copy ctor, assignment operator and dtor are ok
183 void SetTextColour(const wxColour
& colText
) { m_colText
= colText
; }
184 void SetBackgroundColour(const wxColour
& colBack
) { m_colBack
= colBack
; }
185 void SetFont(const wxFont
& font
) { m_font
= font
; }
188 bool HasTextColour() const { return m_colText
.IsOk(); }
189 bool HasBackgroundColour() const { return m_colBack
.IsOk(); }
190 bool HasFont() const { return m_font
.IsOk(); }
192 const wxColour
& GetTextColour() const { return m_colText
; }
193 const wxColour
& GetBackgroundColour() const { return m_colBack
; }
194 const wxFont
& GetFont() const { return m_font
; }
197 // this is almost like assignment operator except it doesn't overwrite the
198 // fields unset in the source attribute
199 void AssignFrom(const wxListItemAttr
& source
)
201 if ( source
.HasTextColour() )
202 SetTextColour(source
.GetTextColour());
203 if ( source
.HasBackgroundColour() )
204 SetBackgroundColour(source
.GetBackgroundColour());
205 if ( source
.HasFont() )
206 SetFont(source
.GetFont());
215 // ----------------------------------------------------------------------------
216 // wxListItem: the item or column info, used to exchange data with wxListCtrl
217 // ----------------------------------------------------------------------------
219 class WXDLLIMPEXP_CORE wxListItem
: public wxObject
222 wxListItem() { Init(); m_attr
= NULL
; }
223 wxListItem(const wxListItem
& item
)
226 m_itemId(item
.m_itemId
),
228 m_state(item
.m_state
),
229 m_stateMask(item
.m_stateMask
),
231 m_image(item
.m_image
),
233 m_format(item
.m_format
),
234 m_width(item
.m_width
),
237 // copy list item attributes
238 if ( item
.HasAttributes() )
239 m_attr
= new wxListItemAttr(*item
.GetAttributes());
242 wxListItem
& operator=(const wxListItem
& item
)
246 m_mask
= item
.m_mask
;
247 m_itemId
= item
.m_itemId
;
249 m_state
= item
.m_state
;
250 m_stateMask
= item
.m_stateMask
;
251 m_text
= item
.m_text
;
252 m_image
= item
.m_image
;
253 m_data
= item
.m_data
;
254 m_format
= item
.m_format
;
255 m_width
= item
.m_width
;
256 m_attr
= item
.m_attr
? new wxListItemAttr(*item
.m_attr
) : NULL
;
262 virtual ~wxListItem() { delete m_attr
; }
265 void Clear() { Init(); m_text
.clear(); ClearAttributes(); }
266 void ClearAttributes() { if ( m_attr
) { delete m_attr
; m_attr
= NULL
; } }
269 void SetMask(long mask
)
273 void SetColumn(int col
)
275 void SetState(long state
)
276 { m_mask
|= wxLIST_MASK_STATE
; m_state
= state
; m_stateMask
|= state
; }
277 void SetStateMask(long stateMask
)
278 { m_stateMask
= stateMask
; }
279 void SetText(const wxString
& text
)
280 { m_mask
|= wxLIST_MASK_TEXT
; m_text
= text
; }
281 void SetImage(int image
)
282 { m_mask
|= wxLIST_MASK_IMAGE
; m_image
= image
; }
283 void SetData(long data
)
284 { m_mask
|= wxLIST_MASK_DATA
; m_data
= data
; }
285 void SetData(void *data
)
286 { m_mask
|= wxLIST_MASK_DATA
; m_data
= wxPtrToUInt(data
); }
288 void SetWidth(int width
)
289 { m_mask
|= wxLIST_MASK_WIDTH
; m_width
= width
; }
290 void SetAlign(wxListColumnFormat align
)
291 { m_mask
|= wxLIST_MASK_FORMAT
; m_format
= align
; }
293 void SetTextColour(const wxColour
& colText
)
294 { Attributes().SetTextColour(colText
); }
295 void SetBackgroundColour(const wxColour
& colBack
)
296 { Attributes().SetBackgroundColour(colBack
); }
297 void SetFont(const wxFont
& font
)
298 { Attributes().SetFont(font
); }
301 long GetMask() const { return m_mask
; }
302 long GetId() const { return m_itemId
; }
303 int GetColumn() const { return m_col
; }
304 long GetState() const { return m_state
& m_stateMask
; }
305 const wxString
& GetText() const { return m_text
; }
306 int GetImage() const { return m_image
; }
307 wxUIntPtr
GetData() const { return m_data
; }
309 int GetWidth() const { return m_width
; }
310 wxListColumnFormat
GetAlign() const { return (wxListColumnFormat
)m_format
; }
312 wxListItemAttr
*GetAttributes() const { return m_attr
; }
313 bool HasAttributes() const { return m_attr
!= NULL
; }
315 wxColour
GetTextColour() const
316 { return HasAttributes() ? m_attr
->GetTextColour() : wxNullColour
; }
317 wxColour
GetBackgroundColour() const
318 { return HasAttributes() ? m_attr
->GetBackgroundColour()
320 wxFont
GetFont() const
321 { return HasAttributes() ? m_attr
->GetFont() : wxNullFont
; }
323 // this conversion is necessary to make old code using GetItem() to
325 operator long() const { return m_itemId
; }
327 // these members are public for compatibility
329 long m_mask
; // Indicates what fields are valid
330 long m_itemId
; // The zero-based item position
331 int m_col
; // Zero-based column, if in report mode
332 long m_state
; // The state of the item
333 long m_stateMask
;// Which flags of m_state are valid (uses same flags)
334 wxString m_text
; // The label/header text
335 int m_image
; // The zero-based index into an image list
336 wxUIntPtr m_data
; // App-defined data
339 int m_format
; // left, right, centre
340 int m_width
; // width of column
343 int m_miniImage
; // handle to the mini image for OS/2
347 // creates m_attr if we don't have it yet
348 wxListItemAttr
& Attributes()
351 m_attr
= new wxListItemAttr
;
366 m_format
= wxLIST_FORMAT_CENTRE
;
370 wxListItemAttr
*m_attr
; // optional pointer to the items style
373 DECLARE_DYNAMIC_CLASS(wxListItem
)
376 // ----------------------------------------------------------------------------
377 // wxListCtrlBase: the base class for the main control itself.
378 // ----------------------------------------------------------------------------
380 // Unlike other base classes, this class doesn't currently define the API of
381 // the real control class but is just used for implementation convenience. We
382 // should define the public class functions as pure virtual here in the future
384 class WXDLLIMPEXP_CORE wxListCtrlBase
: public wxControl
389 // Image list methods.
390 // -------------------
392 // Associate the given (possibly NULL to indicate that no images will be
393 // used) image list with the control. The ownership of the image list
394 // passes to the control, i.e. it will be deleted when the control itself
397 // The value of "which" must be one of wxIMAGE_LIST_{NORMAL,SMALL,STATE}.
398 virtual void AssignImageList(wxImageList
* imageList
, int which
) = 0;
400 // Same as AssignImageList() but the control does not delete the image list
401 // so it can be shared among several controls.
402 virtual void SetImageList(wxImageList
* imageList
, int which
) = 0;
404 // Return the currently used image list, may be NULL.
405 virtual wxImageList
* GetImageList(int which
) const = 0;
408 // Column-related methods.
409 // -----------------------
411 // All these methods can only be used in report view mode.
413 // Appends a new column.
415 // Returns the index of the newly inserted column or -1 on error.
416 long AppendColumn(const wxString
& heading
,
417 wxListColumnFormat format
= wxLIST_FORMAT_LEFT
,
420 // Add a new column to the control at the position "col".
422 // Returns the index of the newly inserted column or -1 on error.
423 long InsertColumn(long col
, const wxListItem
& info
);
424 long InsertColumn(long col
,
425 const wxString
& heading
,
426 int format
= wxLIST_FORMAT_LEFT
,
427 int width
= wxLIST_AUTOSIZE
);
429 // Delete the given or all columns.
430 virtual bool DeleteColumn(int col
) = 0;
431 virtual bool DeleteAllColumns() = 0;
433 // Return the current number of columns.
434 virtual int GetColumnCount() const = 0;
436 // Get or update information about the given column. Set item mask to
437 // indicate the fields to retrieve or change.
439 // Returns false on error, e.g. if the column index is invalid.
440 virtual bool GetColumn(int col
, wxListItem
& item
) const = 0;
441 virtual bool SetColumn(int col
, const wxListItem
& item
) = 0;
443 // Convenient wrappers for the above methods which get or update just the
445 virtual int GetColumnWidth(int col
) const = 0;
446 virtual bool SetColumnWidth(int col
, int width
) = 0;
448 // return the attribute for the item (may return NULL if none)
449 virtual wxListItemAttr
*OnGetItemAttr(long item
) const;
451 // Other miscellaneous accessors.
452 // ------------------------------
454 // Convenient functions for testing the list control mode:
455 bool InReportView() const { return HasFlag(wxLC_REPORT
); }
456 bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL
); }
458 // Enable or disable beep when incremental match doesn't find any item.
459 // Only implemented in the generic version currently.
460 virtual void EnableBellOnNoMatch(bool WXUNUSED(on
) = true) { }
462 void EnableAlternateRowColours(bool enable
= true);
463 void SetAlternateRowColour(const wxColour
& colour
);
466 // Real implementations methods to which our public forwards.
467 virtual long DoInsertColumn(long col
, const wxListItem
& info
) = 0;
469 // Overridden methods of the base class.
470 virtual wxSize
DoGetBestClientSize() const;
473 // user defined color to draw row lines, may be invalid
474 wxListItemAttr m_alternateRowColour
;
477 // ----------------------------------------------------------------------------
478 // wxListEvent - the event class for the wxListCtrl notifications
479 // ----------------------------------------------------------------------------
481 class WXDLLIMPEXP_CORE wxListEvent
: public wxNotifyEvent
484 wxListEvent(wxEventType commandType
= wxEVT_NULL
, int winid
= 0)
485 : wxNotifyEvent(commandType
, winid
)
492 , m_editCancelled(false)
495 wxListEvent(const wxListEvent
& event
)
496 : wxNotifyEvent(event
)
497 , m_code(event
.m_code
)
498 , m_oldItemIndex(event
.m_oldItemIndex
)
499 , m_itemIndex(event
.m_itemIndex
)
501 , m_pointDrag(event
.m_pointDrag
)
502 , m_item(event
.m_item
)
503 , m_editCancelled(event
.m_editCancelled
)
506 int GetKeyCode() const { return m_code
; }
507 long GetIndex() const { return m_itemIndex
; }
508 int GetColumn() const { return m_col
; }
509 wxPoint
GetPoint() const { return m_pointDrag
; }
510 const wxString
& GetLabel() const { return m_item
.m_text
; }
511 const wxString
& GetText() const { return m_item
.m_text
; }
512 int GetImage() const { return m_item
.m_image
; }
513 long GetData() const { return static_cast<long>(m_item
.m_data
); }
514 long GetMask() const { return m_item
.m_mask
; }
515 const wxListItem
& GetItem() const { return m_item
; }
517 // for wxEVT_LIST_CACHE_HINT only
518 long GetCacheFrom() const { return m_oldItemIndex
; }
519 long GetCacheTo() const { return m_itemIndex
; }
521 // was label editing canceled? (for wxEVT_LIST_END_LABEL_EDIT only)
522 bool IsEditCancelled() const { return m_editCancelled
; }
523 void SetEditCanceled(bool editCancelled
) { m_editCancelled
= editCancelled
; }
525 virtual wxEvent
*Clone() const { return new wxListEvent(*this); }
527 //protected: -- not for backwards compatibility
529 long m_oldItemIndex
; // only for wxEVT_LIST_CACHE_HINT
537 bool m_editCancelled
;
540 DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxListEvent
)
543 // ----------------------------------------------------------------------------
544 // wxListCtrl event macros
545 // ----------------------------------------------------------------------------
547 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_BEGIN_DRAG
, wxListEvent
);
548 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_BEGIN_RDRAG
, wxListEvent
);
549 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_BEGIN_LABEL_EDIT
, wxListEvent
);
550 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_END_LABEL_EDIT
, wxListEvent
);
551 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_DELETE_ITEM
, wxListEvent
);
552 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_DELETE_ALL_ITEMS
, wxListEvent
);
554 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_ITEM_SELECTED
, wxListEvent
);
555 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_ITEM_DESELECTED
, wxListEvent
);
556 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_KEY_DOWN
, wxListEvent
);
557 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_INSERT_ITEM
, wxListEvent
);
558 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_COL_CLICK
, wxListEvent
);
559 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_ITEM_RIGHT_CLICK
, wxListEvent
);
560 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_ITEM_MIDDLE_CLICK
, wxListEvent
);
561 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_ITEM_ACTIVATED
, wxListEvent
);
562 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_CACHE_HINT
, wxListEvent
);
563 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_COL_RIGHT_CLICK
, wxListEvent
);
564 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_COL_BEGIN_DRAG
, wxListEvent
);
565 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_COL_DRAGGING
, wxListEvent
);
566 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_COL_END_DRAG
, wxListEvent
);
567 wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE
, wxEVT_LIST_ITEM_FOCUSED
, wxListEvent
);
569 typedef void (wxEvtHandler::*wxListEventFunction
)(wxListEvent
&);
571 #define wxListEventHandler(func) \
572 wxEVENT_HANDLER_CAST(wxListEventFunction, func)
574 #define wx__DECLARE_LISTEVT(evt, id, fn) \
575 wx__DECLARE_EVT1(wxEVT_LIST_ ## evt, id, wxListEventHandler(fn))
577 #define EVT_LIST_BEGIN_DRAG(id, fn) wx__DECLARE_LISTEVT(BEGIN_DRAG, id, fn)
578 #define EVT_LIST_BEGIN_RDRAG(id, fn) wx__DECLARE_LISTEVT(BEGIN_RDRAG, id, fn)
579 #define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) wx__DECLARE_LISTEVT(BEGIN_LABEL_EDIT, id, fn)
580 #define EVT_LIST_END_LABEL_EDIT(id, fn) wx__DECLARE_LISTEVT(END_LABEL_EDIT, id, fn)
581 #define EVT_LIST_DELETE_ITEM(id, fn) wx__DECLARE_LISTEVT(DELETE_ITEM, id, fn)
582 #define EVT_LIST_DELETE_ALL_ITEMS(id, fn) wx__DECLARE_LISTEVT(DELETE_ALL_ITEMS, id, fn)
583 #define EVT_LIST_KEY_DOWN(id, fn) wx__DECLARE_LISTEVT(KEY_DOWN, id, fn)
584 #define EVT_LIST_INSERT_ITEM(id, fn) wx__DECLARE_LISTEVT(INSERT_ITEM, id, fn)
586 #define EVT_LIST_COL_CLICK(id, fn) wx__DECLARE_LISTEVT(COL_CLICK, id, fn)
587 #define EVT_LIST_COL_RIGHT_CLICK(id, fn) wx__DECLARE_LISTEVT(COL_RIGHT_CLICK, id, fn)
588 #define EVT_LIST_COL_BEGIN_DRAG(id, fn) wx__DECLARE_LISTEVT(COL_BEGIN_DRAG, id, fn)
589 #define EVT_LIST_COL_DRAGGING(id, fn) wx__DECLARE_LISTEVT(COL_DRAGGING, id, fn)
590 #define EVT_LIST_COL_END_DRAG(id, fn) wx__DECLARE_LISTEVT(COL_END_DRAG, id, fn)
592 #define EVT_LIST_ITEM_SELECTED(id, fn) wx__DECLARE_LISTEVT(ITEM_SELECTED, id, fn)
593 #define EVT_LIST_ITEM_DESELECTED(id, fn) wx__DECLARE_LISTEVT(ITEM_DESELECTED, id, fn)
594 #define EVT_LIST_ITEM_RIGHT_CLICK(id, fn) wx__DECLARE_LISTEVT(ITEM_RIGHT_CLICK, id, fn)
595 #define EVT_LIST_ITEM_MIDDLE_CLICK(id, fn) wx__DECLARE_LISTEVT(ITEM_MIDDLE_CLICK, id, fn)
596 #define EVT_LIST_ITEM_ACTIVATED(id, fn) wx__DECLARE_LISTEVT(ITEM_ACTIVATED, id, fn)
597 #define EVT_LIST_ITEM_FOCUSED(id, fn) wx__DECLARE_LISTEVT(ITEM_FOCUSED, id, fn)
599 #define EVT_LIST_CACHE_HINT(id, fn) wx__DECLARE_LISTEVT(CACHE_HINT, id, fn)
601 // old wxEVT_COMMAND_* constants
602 #define wxEVT_COMMAND_LIST_BEGIN_DRAG wxEVT_LIST_BEGIN_DRAG
603 #define wxEVT_COMMAND_LIST_BEGIN_RDRAG wxEVT_LIST_BEGIN_RDRAG
604 #define wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT wxEVT_LIST_BEGIN_LABEL_EDIT
605 #define wxEVT_COMMAND_LIST_END_LABEL_EDIT wxEVT_LIST_END_LABEL_EDIT
606 #define wxEVT_COMMAND_LIST_DELETE_ITEM wxEVT_LIST_DELETE_ITEM
607 #define wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS wxEVT_LIST_DELETE_ALL_ITEMS
608 #define wxEVT_COMMAND_LIST_ITEM_SELECTED wxEVT_LIST_ITEM_SELECTED
609 #define wxEVT_COMMAND_LIST_ITEM_DESELECTED wxEVT_LIST_ITEM_DESELECTED
610 #define wxEVT_COMMAND_LIST_KEY_DOWN wxEVT_LIST_KEY_DOWN
611 #define wxEVT_COMMAND_LIST_INSERT_ITEM wxEVT_LIST_INSERT_ITEM
612 #define wxEVT_COMMAND_LIST_COL_CLICK wxEVT_LIST_COL_CLICK
613 #define wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK wxEVT_LIST_ITEM_RIGHT_CLICK
614 #define wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK wxEVT_LIST_ITEM_MIDDLE_CLICK
615 #define wxEVT_COMMAND_LIST_ITEM_ACTIVATED wxEVT_LIST_ITEM_ACTIVATED
616 #define wxEVT_COMMAND_LIST_CACHE_HINT wxEVT_LIST_CACHE_HINT
617 #define wxEVT_COMMAND_LIST_COL_RIGHT_CLICK wxEVT_LIST_COL_RIGHT_CLICK
618 #define wxEVT_COMMAND_LIST_COL_BEGIN_DRAG wxEVT_LIST_COL_BEGIN_DRAG
619 #define wxEVT_COMMAND_LIST_COL_DRAGGING wxEVT_LIST_COL_DRAGGING
620 #define wxEVT_COMMAND_LIST_COL_END_DRAG wxEVT_LIST_COL_END_DRAG
621 #define wxEVT_COMMAND_LIST_ITEM_FOCUSED wxEVT_LIST_ITEM_FOCUSED
625 // _WX_LISTCTRL_H_BASE_