1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Generic list control
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __LISTCTRLH_G__
12 #define __LISTCTRLH_G__
15 #pragma interface "listctrl.h"
19 #include "wx/object.h"
20 #include "wx/imaglist.h"
21 #include "wx/control.h"
23 #include "wx/textctrl.h"
24 #include "wx/dcclient.h"
25 #include "wx/scrolwin.h"
26 #include "wx/settings.h"
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 class wxListHeaderData
;
44 class wxListHeaderWindow
;
45 class wxListMainWindow
;
47 class wxListRenameTimer
;
48 //class wxListTextCtrl;
50 //-----------------------------------------------------------------------------
52 //-----------------------------------------------------------------------------
54 // type of compare function for wxListCtrl sort operation
55 typedef int (*wxListCtrlCompare
)(long item1
, long item2
, long sortData
);
57 //-----------------------------------------------------------------------------
59 //-----------------------------------------------------------------------------
61 #define wxLC_ICON 0x0004
62 #define wxLC_SMALL_ICON 0x0008
63 #define wxLC_LIST 0x0010
64 #define wxLC_REPORT 0x0020
65 #define wxLC_ALIGN_TOP 0x0040
66 #define wxLC_ALIGN_LEFT 0x0080
67 #define wxLC_AUTOARRANGE 0x0100 // not supported in wxGLC
68 #define wxLC_USER_TEXT 0x0200 // not supported in wxGLC (how does it work?)
69 #define wxLC_EDIT_LABELS 0x0400
70 #define wxLC_NO_HEADER 0x0800 // not supported in wxGLC
71 #define wxLC_NO_SORT_HEADER 0x1000 // not supported in wxGLC
72 #define wxLC_SINGLE_SEL 0x2000
73 #define wxLC_SORT_ASCENDING 0x4000
74 #define wxLC_SORT_DESCENDING 0x8000 // not supported in wxGLC
76 #define wxLC_MASK_TYPE (wxLC_ICON | wxLC_SMALL_ICON | wxLC_LIST | wxLC_REPORT)
77 #define wxLC_MASK_ALIGN (wxLC_ALIGN_TOP | wxLC_ALIGN_LEFT)
78 #define wxLC_MASK_SORT (wxLC_SORT_ASCENDING | wxLC_SORT_DESCENDING)
80 // Omitted because (a) too much detail (b) not enough style flags
81 // #define wxLC_NO_SCROLL
82 // #define wxLC_NO_LABEL_WRAP
83 // #define wxLC_OWNERDRAW_FIXED
84 // #define wxLC_SHOW_SEL_ALWAYS
86 // Mask flags to tell app/GUI what fields of wxListItem are valid
87 #define wxLIST_MASK_STATE 0x0001
88 #define wxLIST_MASK_TEXT 0x0002
89 #define wxLIST_MASK_IMAGE 0x0004
90 #define wxLIST_MASK_DATA 0x0008
91 #define wxLIST_SET_ITEM 0x0010
92 #define wxLIST_MASK_WIDTH 0x0020
93 #define wxLIST_MASK_FORMAT 0x0040
95 // State flags for indicating the state of an item
96 #define wxLIST_STATE_DONTCARE 0x0000
97 #define wxLIST_STATE_DROPHILITED 0x0001 // not supported in wxGLC
98 #define wxLIST_STATE_FOCUSED 0x0002
99 #define wxLIST_STATE_SELECTED 0x0004
100 #define wxLIST_STATE_CUT 0x0008 // not supported in wxGLC
102 // Hit test flags, used in HitTest // wxGLC suppots 20 and 80
103 #define wxLIST_HITTEST_ABOVE 0x0001 // Above the client area.
104 #define wxLIST_HITTEST_BELOW 0x0002 // Below the client area.
105 #define wxLIST_HITTEST_NOWHERE 0x0004 // In the client area but below the last item.
106 #define wxLIST_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item.
107 #define wxLIST_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item.
108 #define wxLIST_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item.
109 #define wxLIST_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state.
110 #define wxLIST_HITTEST_TOLEFT 0x0400 // To the right of the client area.
111 #define wxLIST_HITTEST_TORIGHT 0x0800 // To the left of the client area.
113 #define wxLIST_HITTEST_ONITEM (wxLIST_HITTEST_ONITEMICON | wxLIST_HITTEST_ONITEMLABEL | wxLIST_HITTEST_ONITEMSTATEICON)
117 // Flags for GetNextItem // always wxLIST_NEXT_ALL in wxGLC
119 wxLIST_NEXT_ABOVE
, // Searches for an item above the specified item
120 wxLIST_NEXT_ALL
, // Searches for subsequent item by index
121 wxLIST_NEXT_BELOW
, // Searches for an item below the specified item
122 wxLIST_NEXT_LEFT
, // Searches for an item to the left of the specified item
123 wxLIST_NEXT_RIGHT
// Searches for an item to the right of the specified item
126 // Alignment flags for Arrange // always wxLIST_ALIGN_LEFT in wxGLC
128 wxLIST_ALIGN_DEFAULT
,
131 wxLIST_ALIGN_SNAP_TO_GRID
134 // Column format // always wxLIST_FORMAT_LEFT in wxGLC
138 wxLIST_FORMAT_CENTRE
,
139 wxLIST_FORMAT_CENTER
= wxLIST_FORMAT_CENTRE
142 // Autosize values for SetColumnWidth
144 wxLIST_AUTOSIZE
= -1, // always 80 in wxGLC (what else?)
145 wxLIST_AUTOSIZE_USEHEADER
= -2
148 // Flag values for GetItemRect
155 // Flag values for FindItem // not supported by wxGLC
163 //-----------------------------------------------------------------------------
165 //-----------------------------------------------------------------------------
167 class wxListItem
: public wxObject
169 DECLARE_DYNAMIC_CLASS(wxListItem
)
172 long m_mask
; // Indicates what fields are valid
173 long m_itemId
; // The zero-based item position
174 int m_col
; // Zero-based column, if in report mode
175 long m_state
; // The state of the item
176 long m_stateMask
; // Which flags of m_state are valid (uses same flags)
177 wxString m_text
; // The label/header text
178 int m_image
; // The zero-based index into an image list
179 long m_data
; // App-defined data
180 wxColour
*m_colour
; // only wxGLC, not supported by Windows ;->
183 int m_format
; // left, right, centre
184 int m_width
; // width of column
189 //-----------------------------------------------------------------------------
191 //-----------------------------------------------------------------------------
193 class WXDLLEXPORT wxListEvent
: public wxCommandEvent
195 DECLARE_DYNAMIC_CLASS(wxListEvent
)
198 wxListEvent(wxEventType commandType
= wxEVT_NULL
, int id
= 0);
210 typedef void (wxEvtHandler::*wxListEventFunction
)(wxListEvent
&);
212 #define EVT_LIST_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
213 #define EVT_LIST_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
214 #define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
215 #define EVT_LIST_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
216 #define EVT_LIST_DELETE_ITEM(id, fn) { wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
217 #define EVT_LIST_DELETE_ALL_ITEMS(id, fn) { wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
218 #define EVT_LIST_GET_INFO(id, fn) { wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
219 #define EVT_LIST_SET_INFO(id, fn) { wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
220 #define EVT_LIST_ITEM_SELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
221 #define EVT_LIST_ITEM_DESELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
222 #define EVT_LIST_KEY_DOWN(id, fn) { wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
223 #define EVT_LIST_INSERT_ITEM(id, fn) { wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
224 #define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
227 //-----------------------------------------------------------------------------
228 // wxListItemData (internal)
229 //-----------------------------------------------------------------------------
231 class wxListItemData
: public wxObject
233 DECLARE_DYNAMIC_CLASS(wxListItemData
);
240 int m_width
,m_height
;
244 wxListItemData(void);
245 wxListItemData( const wxListItem
&info
);
246 void SetItem( const wxListItem
&info
);
247 void SetText( const wxString
&s
);
248 void SetImage( int image
);
249 void SetData( long data
);
250 void SetPosition( int x
, int y
);
251 void SetSize( int width
, int height
);
252 void SetColour( wxColour
*col
);
253 bool HasImage(void) const;
254 bool HasText(void) const;
255 bool IsHit( int x
, int y
) const;
256 void GetText( wxString
&s
);
257 int GetX( void ) const;
258 int GetY( void ) const;
259 int GetWidth(void) const;
260 int GetHeight(void) const;
261 int GetImage(void) const;
262 void GetItem( wxListItem
&info
);
263 wxColour
*GetColour(void);
266 //-----------------------------------------------------------------------------
267 // wxListHeaderData (internal)
268 //-----------------------------------------------------------------------------
270 class wxListHeaderData
: public wxObject
272 DECLARE_DYNAMIC_CLASS(wxListHeaderData
);
284 wxListHeaderData(void);
285 wxListHeaderData( const wxListItem
&info
);
286 void SetItem( const wxListItem
&item
);
287 void SetPosition( int x
, int y
);
288 void SetWidth( int w
);
289 void SetFormat( int format
);
290 void SetHeight( int h
);
291 bool HasImage(void) const;
292 bool HasText(void) const;
293 bool IsHit( int x
, int y
) const;
294 void GetItem( wxListItem
&item
);
295 void GetText( wxString
&s
);
296 int GetImage(void) const;
297 int GetWidth(void) const;
298 int GetFormat(void) const;
301 //-----------------------------------------------------------------------------
302 // wxListLineData (internal)
303 //-----------------------------------------------------------------------------
305 class wxListLineData
: public wxObject
307 DECLARE_DYNAMIC_CLASS(wxListLineData
);
311 wxRectangle m_bound_all
;
312 wxRectangle m_bound_label
;
313 wxRectangle m_bound_icon
;
314 wxRectangle m_bound_hilight
;
317 wxBrush
*m_hilightBrush
;
319 wxListMainWindow
*m_owner
;
321 void DoDraw( wxPaintDC
*dc
, bool hilight
, bool paintBG
);
324 wxListLineData( void ) {};
325 wxListLineData( wxListMainWindow
*owner
, int mode
, wxBrush
*hilightBrush
);
326 void CalculateSize( wxPaintDC
*dc
, int spacing
);
327 void SetPosition( wxPaintDC
*dc
, int x
, int y
, int window_width
);
328 void SetColumnPosition( int index
, int x
);
329 void GetSize( int &width
, int &height
);
330 void GetExtent( int &x
, int &y
, int &width
, int &height
);
331 void GetLabelExtent( int &x
, int &y
, int &width
, int &height
);
332 long IsHit( int x
, int y
);
333 void InitItems( int num
);
334 void SetItem( int index
, const wxListItem
&info
);
335 void GetItem( int index
, wxListItem
&info
);
336 void GetText( int index
, wxString
&s
);
337 void SetText( int index
, const wxString s
);
338 int GetImage( int index
);
339 void GetRect( wxRectangle
&rect
);
340 void Hilight( bool on
);
341 void ReverseHilight( void );
342 void DrawRubberBand( wxPaintDC
*dc
, bool on
);
343 void Draw( wxPaintDC
*dc
);
344 bool IsInRect( int x
, int y
, const wxRectangle
&rect
);
345 bool IsHilighted( void );
346 void AssignRect( wxRectangle
&dest
, int x
, int y
, int width
, int height
);
347 void AssignRect( wxRectangle
&dest
, const wxRectangle
&source
);
350 //-----------------------------------------------------------------------------
351 // wxListHeaderWindow (internal)
352 //-----------------------------------------------------------------------------
354 class wxListHeaderWindow
: public wxWindow
356 DECLARE_DYNAMIC_CLASS(wxListHeaderWindow
)
359 wxListMainWindow
*m_owner
;
360 wxCursor
*m_currentCursor
;
361 wxCursor
*m_resizeCursor
;
364 wxListHeaderWindow( void );
365 wxListHeaderWindow( wxWindow
*win
, wxWindowID id
, wxListMainWindow
*owner
,
366 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
367 long style
= 0, const wxString
&name
= "columntitles" );
368 void DoDrawRect( wxPaintDC
*dc
, int x
, int y
, int w
, int h
);
369 void OnPaint( wxPaintEvent
&event
);
370 void OnMouse( wxMouseEvent
&event
);
371 void OnSetFocus( wxFocusEvent
&event
);
373 DECLARE_EVENT_TABLE()
376 //-----------------------------------------------------------------------------
377 // wxListRenameTimer (internal)
378 //-----------------------------------------------------------------------------
380 class wxListRenameTimer
: public wxTimer
383 wxListMainWindow
*m_owner
;
386 wxListRenameTimer( wxListMainWindow
*owner
);
390 //-----------------------------------------------------------------------------
391 // wxListTextCtrl (internal)
392 //-----------------------------------------------------------------------------
394 class wxListTextCtrl
: public wxTextCtrl
396 DECLARE_DYNAMIC_CLASS(wxListTextCtrl
);
401 wxListMainWindow
*m_owner
;
404 wxListTextCtrl(void) {};
405 wxListTextCtrl( wxWindow
*parent
, const wxWindowID id
,
406 bool *accept
, wxString
*res
, wxListMainWindow
*owner
,
407 const wxString
&value
= "",
408 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
409 int style
= 0, const wxValidator
& validator
= wxDefaultValidator
,
410 const wxString
&name
= "wxListTextCtrlText" );
411 void OnChar( wxKeyEvent
&event
);
412 void OnKillFocus( wxFocusEvent
&event
);
414 DECLARE_EVENT_TABLE()
417 //-----------------------------------------------------------------------------
418 // wxListMainWindow (internal)
419 //-----------------------------------------------------------------------------
421 class wxListMainWindow
: public wxScrolledWindow
423 DECLARE_DYNAMIC_CLASS(wxListMainWindow
);
429 wxListLineData
*m_current
;
431 wxBrush
*m_hilightBrush
;
432 wxColour
*m_hilightColour
;
434 int m_xScroll
,m_yScroll
;
436 wxImageList
*m_small_image_list
;
437 wxImageList
*m_normal_image_list
;
439 int m_normal_spacing
;
443 wxTimer
*m_renameTimer
;
444 // wxListTextCtrl *m_text;
446 wxString m_renameRes
;
451 wxListMainWindow(void);
452 wxListMainWindow( wxWindow
*parent
, wxWindowID id
,
453 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
454 long style
= 0, const wxString
&name
= "listctrl" );
455 ~wxListMainWindow(void);
456 void RefreshLine( wxListLineData
*line
);
457 void OnPaint( wxPaintEvent
&event
);
458 void HilightAll( bool on
);
459 void ActivateLine( wxListLineData
*line
);
460 void SendNotify( wxListLineData
*line
, wxEventType command
);
461 void FocusLine( wxListLineData
*line
);
462 void UnfocusLine( wxListLineData
*line
);
463 void SelectLine( wxListLineData
*line
);
464 void DeselectLine( wxListLineData
*line
);
465 void DeleteLine( wxListLineData
*line
);
466 void RenameLine( wxListLineData
*line
, const wxString
&newName
);
467 void StartLabelEdit( wxListLineData
*line
);
468 void OnRenameTimer(void);
469 void OnRenameAccept(void);
470 void OnMouse( wxMouseEvent
&event
);
471 void MoveToFocus( void );
472 void OnArrowChar( wxListLineData
*newCurrent
, bool shiftDown
);
473 void OnChar( wxKeyEvent
&event
);
474 void OnSetFocus( wxFocusEvent
&event
);
475 void OnKillFocus( wxFocusEvent
&event
);
476 void OnSize( wxSizeEvent
&event
);
477 wxFont
*GetMyFont( void );
478 void DrawImage( int index
, wxPaintDC
*dc
, int x
, int y
);
479 void GetImageSize( int index
, int &width
, int &height
);
480 int GetIndexOfLine( const wxListLineData
*line
);
481 int GetTextLength( wxString
&s
); // should be const
483 void SetImageList( wxImageList
*imageList
, int which
);
484 void SetItemSpacing( int spacing
, bool isSmall
= FALSE
);
485 int GetItemSpacing( bool isSmall
= FALSE
);
486 void SetColumn( int col
, wxListItem
&item
);
487 void SetColumnWidth( int col
, int width
);
488 void GetColumn( int col
, wxListItem
&item
);
489 int GetColumnWidth( int vol
);
490 int GetColumnCount( void );
491 int GetCountPerPage( void );
492 void SetItem( wxListItem
&item
);
493 void GetItem( wxListItem
&item
);
494 void SetItemState( long item
, long state
, long stateMask
);
495 int GetItemState( long item
, long stateMask
);
496 int GetItemCount( void );
497 void GetItemRect( long index
, wxRectangle
&rect
);
498 bool GetItemPosition(long item
, wxPoint
& pos
);
499 int GetSelectedItemCount( void );
500 void SetMode( long mode
);
501 long GetMode( void ) const;
502 void CalculatePositions( void );
503 void RealizeChanges(void);
504 long GetNextItem( long item
, int geometry
, int state
);
505 void DeleteItem( long index
);
506 void DeleteAllItems( void );
507 void DeleteColumn( int col
);
508 void DeleteEverything( void );
509 void EnsureVisible( long index
);
510 long FindItem(long start
, const wxString
& str
, bool partial
= FALSE
);
511 long FindItem(long start
, long data
);
512 long HitTest( int x
, int y
, int &flags
);
513 void InsertItem( wxListItem
&item
);
514 // void AddItem( wxListItem &item );
515 void InsertColumn( long col
, wxListItem
&item
);
516 // void AddColumn( wxListItem &item );
517 void SortItems( wxListCtrlCompare fn
, long data
);
518 virtual bool OnListNotify( wxListEvent
&event
);
520 DECLARE_EVENT_TABLE()
523 //-----------------------------------------------------------------------------
525 //-----------------------------------------------------------------------------
527 class wxListCtrl
: public wxControl
529 DECLARE_DYNAMIC_CLASS(wxListCtrl
);
534 wxListCtrl( wxWindow
*parent
, wxWindowID id
,
535 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
536 long style
= 0, const wxString
&name
= "listctrl" );
538 bool Create( wxWindow
*parent
, wxWindowID id
,
539 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
540 long style
= 0, const wxString
&name
= "listctrl" );
541 void OnSize( wxSizeEvent
&event
);
542 void SetBackgroundColour( const wxColour
& col
);
543 bool GetColumn( int col
, wxListItem
& item
);
544 bool SetColumn( int col
, wxListItem
& item
);
545 int GetColumnWidth( int col
);
546 bool SetColumnWidth( int col
, int width
);
547 int GetCountPerPage(void); // not the same in wxGLC as in Windows, I think
548 // wxText& GetEditControl(void) const; // not supported in wxGLC
549 bool GetItem( wxListItem
& info
);
550 bool SetItem( wxListItem
& info
) ;
551 long SetItem( long index
, int col
, const wxString
& label
, int imageId
= -1 );
552 int GetItemState( long item
, long stateMask
);
553 bool SetItemState( long item
, long state
, long stateMask
);
554 bool SetItemImage( long item
, int image
, int selImage
);
555 wxString
GetItemText( long item
);
556 void SetItemText( long item
, const wxString
& str
);
557 long GetItemData( long item
);
558 bool SetItemData( long item
, long data
);
559 bool GetItemRect( long item
, wxRectangle
& rect
, int code
= wxLIST_RECT_BOUNDS
);
560 bool GetItemPosition( long item
, wxPoint
& pos
);
561 bool SetItemPosition( long item
, const wxPoint
& pos
); // not supported in wxGLC
562 int GetItemCount(void);
563 void SetItemSpacing( int spacing
, bool isSmall
= FALSE
);
564 int GetItemSpacing( bool isSmall
);
565 int GetSelectedItemCount(void);
566 // wxColour GetTextColour(void) const; // wxGLC has colours for every Item (see wxListItem)
567 // void SetTextColour(const wxColour& col);
568 long GetTopItem(void);
569 void SetSingleStyle( long style
, bool add
= TRUE
) ;
570 void SetWindowStyleFlag(long style
);
571 void RecreateWindow(void) {};
572 long GetNextItem(long item
, int geometry
= wxLIST_NEXT_ALL
, int state
= wxLIST_STATE_DONTCARE
) const;
573 wxImageList
*GetImageList(int which
);
574 void SetImageList(wxImageList
*imageList
, int which
) ;
575 bool Arrange( int flag
= wxLIST_ALIGN_DEFAULT
); // always wxLIST_ALIGN_LEFT in wxGLC
576 bool DeleteItem( long item
);
577 bool DeleteAllItems(void) ;
578 bool DeleteColumn( int col
);
579 // wxText& Edit(long item) ; // not supported in wxGLC
580 bool EnsureVisible( long item
);
581 long FindItem(long start
, const wxString
& str
, bool partial
= FALSE
);
582 long FindItem(long start
, long data
);
583 long FindItem(long start
, const wxPoint
& pt
, int direction
); // not supported in wxGLC
584 long HitTest(const wxPoint
& point
, int& flags
);
585 long InsertItem(wxListItem
& info
);
586 long InsertItem(long index
, const wxString
& label
);
587 long InsertItem(long index
, int imageIndex
);
588 long InsertItem(long index
, const wxString
& label
, int imageIndex
);
589 long InsertColumn(long col
, wxListItem
& info
);
590 long InsertColumn(long col
, const wxString
& heading
, int format
= wxLIST_FORMAT_LEFT
,
592 bool ScrollList(int dx
, int dy
);
593 bool SortItems(wxListCtrlCompare fn
, long data
);
594 bool Update(long item
);
595 virtual bool OnListNotify(wxListEvent
& WXUNUSED(event
)) { return FALSE
; }
596 void SetDropTarget( wxDropTarget
*dropTarget
)
597 { m_mainWin
->SetDropTarget( dropTarget
); };
598 wxDropTarget
*GetDropTarget() const
599 { return m_mainWin
->GetDropTarget(); };
601 void OnIdle( wxIdleEvent
&event
);
605 // wxListTextCtrl m_textCtrl;
606 wxImageList
*m_imageListNormal
;
607 wxImageList
*m_imageListSmall
;
608 wxImageList
*m_imageListState
; // what's that ?
609 wxListHeaderWindow
*m_headerWin
;
610 wxListMainWindow
*m_mainWin
;
612 DECLARE_EVENT_TABLE()
617 #endif // __LISTCTRLH_G__