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/dcclient.h"
24 #include "wx/scrolwin.h"
25 #include "wx/settings.h"
27 //-----------------------------------------------------------------------------
29 //-----------------------------------------------------------------------------
35 //-----------------------------------------------------------------------------
37 //-----------------------------------------------------------------------------
39 class wxListHeaderData
;
43 class wxListHeaderWindow
;
44 class wxListMainWindow
;
46 class wxListRenameTimer
;
47 //class wxListTextCtrl;
49 //-----------------------------------------------------------------------------
51 //-----------------------------------------------------------------------------
53 // type of compare function for wxListCtrl sort operation
54 typedef int (*wxListCtrlCompare
)(long item1
, long item2
, long sortData
);
56 //-----------------------------------------------------------------------------
58 //-----------------------------------------------------------------------------
60 #define wxLC_ICON 0x0004
61 #define wxLC_SMALL_ICON 0x0008
62 #define wxLC_LIST 0x0010
63 #define wxLC_REPORT 0x0020
64 #define wxLC_ALIGN_TOP 0x0040
65 #define wxLC_ALIGN_LEFT 0x0080
66 #define wxLC_AUTOARRANGE 0x0100 // not supported in wxGLC
67 #define wxLC_USER_TEXT 0x0200 // not supported in wxGLC (how does it work?)
68 #define wxLC_EDIT_LABELS 0x0400
69 #define wxLC_NO_HEADER 0x0800 // not supported in wxGLC
70 #define wxLC_NO_SORT_HEADER 0x1000 // not supported in wxGLC
71 #define wxLC_SINGLE_SEL 0x2000
72 #define wxLC_SORT_ASCENDING 0x4000
73 #define wxLC_SORT_DESCENDING 0x8000 // not supported in wxGLC
75 #define wxLC_MASK_TYPE (wxLC_ICON | wxLC_SMALL_ICON | wxLC_LIST | wxLC_REPORT)
76 #define wxLC_MASK_ALIGN (wxLC_ALIGN_TOP | wxLC_ALIGN_LEFT)
77 #define wxLC_MASK_SORT (wxLC_SORT_ASCENDING | wxLC_SORT_DESCENDING)
79 // Omitted because (a) too much detail (b) not enough style flags
80 // #define wxLC_NO_SCROLL
81 // #define wxLC_NO_LABEL_WRAP
82 // #define wxLC_OWNERDRAW_FIXED
83 // #define wxLC_SHOW_SEL_ALWAYS
85 // Mask flags to tell app/GUI what fields of wxListItem are valid
86 #define wxLIST_MASK_STATE 0x0001
87 #define wxLIST_MASK_TEXT 0x0002
88 #define wxLIST_MASK_IMAGE 0x0004
89 #define wxLIST_MASK_DATA 0x0008
90 #define wxLIST_SET_ITEM 0x0010
91 #define wxLIST_MASK_WIDTH 0x0020
92 #define wxLIST_MASK_FORMAT 0x0040
94 // State flags for indicating the state of an item
95 #define wxLIST_STATE_DONTCARE 0x0000
96 #define wxLIST_STATE_DROPHILITED 0x0001 // not supported in wxGLC
97 #define wxLIST_STATE_FOCUSED 0x0002
98 #define wxLIST_STATE_SELECTED 0x0004
99 #define wxLIST_STATE_CUT 0x0008 // not supported in wxGLC
101 // Hit test flags, used in HitTest // wxGLC suppots 20 and 80
102 #define wxLIST_HITTEST_ABOVE 0x0001 // Above the client area.
103 #define wxLIST_HITTEST_BELOW 0x0002 // Below the client area.
104 #define wxLIST_HITTEST_NOWHERE 0x0004 // In the client area but below the last item.
105 #define wxLIST_HITTEST_ONITEMICON 0x0020 // On the bitmap associated with an item.
106 #define wxLIST_HITTEST_ONITEMLABEL 0x0080 // On the label (string) associated with an item.
107 #define wxLIST_HITTEST_ONITEMRIGHT 0x0100 // In the area to the right of an item.
108 #define wxLIST_HITTEST_ONITEMSTATEICON 0x0200 // On the state icon for a tree view item that is in a user-defined state.
109 #define wxLIST_HITTEST_TOLEFT 0x0400 // To the right of the client area.
110 #define wxLIST_HITTEST_TORIGHT 0x0800 // To the left of the client area.
112 #define wxLIST_HITTEST_ONITEM (wxLIST_HITTEST_ONITEMICON | wxLIST_HITTEST_ONITEMLABEL | wxLIST_HITTEST_ONITEMSTATEICON)
116 // Flags for GetNextItem // always wxLIST_NEXT_ALL in wxGLC
118 wxLIST_NEXT_ABOVE
, // Searches for an item above the specified item
119 wxLIST_NEXT_ALL
, // Searches for subsequent item by index
120 wxLIST_NEXT_BELOW
, // Searches for an item below the specified item
121 wxLIST_NEXT_LEFT
, // Searches for an item to the left of the specified item
122 wxLIST_NEXT_RIGHT
, // Searches for an item to the right of the specified item
125 // Alignment flags for Arrange // always wxLIST_ALIGN_LEFT in wxGLC
127 wxLIST_ALIGN_DEFAULT
,
130 wxLIST_ALIGN_SNAP_TO_GRID
133 // Column format // always wxLIST_FORMAT_LEFT in wxGLC
137 wxLIST_FORMAT_CENTRE
,
138 wxLIST_FORMAT_CENTER
= wxLIST_FORMAT_CENTRE
141 // Autosize values for SetColumnWidth
143 wxLIST_AUTOSIZE
= -1, // always 80 in wxGLC (what else?)
144 wxLIST_AUTOSIZE_USEHEADER
= -2
147 // Flag values for GetItemRect
154 // Flag values for FindItem // not supported by wxGLC
162 // Flag values for Set/GetImageList
164 wxIMAGE_LIST_NORMAL
, // Normal icons
165 wxIMAGE_LIST_SMALL
, // Small icons
166 wxIMAGE_LIST_STATE
// State icons: unimplemented (see WIN32 documentation)
167 // not implemented in wxGLC (see non-existing documentation..)
170 //-----------------------------------------------------------------------------
172 //-----------------------------------------------------------------------------
174 class wxListItem
: public wxObject
176 DECLARE_DYNAMIC_CLASS(wxListItem
)
179 long m_mask
; // Indicates what fields are valid
180 long m_itemId
; // The zero-based item position
181 int m_col
; // Zero-based column, if in report mode
182 long m_state
; // The state of the item
183 long m_stateMask
; // Which flags of m_state are valid (uses same flags)
184 wxString m_text
; // The label/header text
185 int m_image
; // The zero-based index into an image list
186 long m_data
; // App-defined data
187 wxColour
*m_colour
; // only wxGLC, not supported by Windows ;->
190 int m_format
; // left, right, centre
191 int m_width
; // width of column
196 //-----------------------------------------------------------------------------
198 //-----------------------------------------------------------------------------
200 class WXDLLEXPORT wxListEvent
: public wxCommandEvent
202 DECLARE_DYNAMIC_CLASS(wxListEvent
)
205 wxListEvent(wxEventType commandType
= wxEVT_NULL
, int id
= 0);
217 typedef void (wxEvtHandler::*wxListEventFunction
)(wxListEvent
&);
219 #define EVT_LIST_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
220 #define EVT_LIST_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
221 #define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
222 #define EVT_LIST_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
223 #define EVT_LIST_DELETE_ITEM(id, fn) { wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
224 #define EVT_LIST_DELETE_ALL_ITEMS(id, fn) { wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
225 #define EVT_LIST_GET_INFO(id, fn) { wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
226 #define EVT_LIST_SET_INFO(id, fn) { wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
227 #define EVT_LIST_ITEM_SELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
228 #define EVT_LIST_ITEM_DESELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
229 #define EVT_LIST_KEY_DOWN(id, fn) { wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
230 #define EVT_LIST_INSERT_ITEM(id, fn) { wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
231 #define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL },
234 //-----------------------------------------------------------------------------
235 // wxListItemData (internal)
236 //-----------------------------------------------------------------------------
238 class wxListItemData
: public wxObject
240 DECLARE_DYNAMIC_CLASS(wxListItemData
);
247 int m_width
,m_height
;
251 wxListItemData(void);
252 wxListItemData( const wxListItem
&info
);
253 void SetItem( const wxListItem
&info
);
254 void SetText( const wxString
&s
);
255 void SetImage( int image
);
256 void SetData( long data
);
257 void SetPosition( int x
, int y
);
258 void SetSize( int width
, int height
);
259 void SetColour( wxColour
*col
);
260 bool HasImage(void) const;
261 bool HasText(void) const;
262 bool IsHit( int x
, int y
) const;
263 void GetText( wxString
&s
);
264 int GetX( void ) const;
265 int GetY( void ) const;
266 int GetWidth(void) const;
267 int GetHeight(void) const;
268 int GetImage(void) const;
269 void GetItem( wxListItem
&info
);
270 wxColour
*GetColour(void);
273 //-----------------------------------------------------------------------------
274 // wxListHeaderData (internal)
275 //-----------------------------------------------------------------------------
277 class wxListHeaderData
: public wxObject
279 DECLARE_DYNAMIC_CLASS(wxListHeaderData
);
291 wxListHeaderData(void);
292 wxListHeaderData( const wxListItem
&info
);
293 void SetItem( const wxListItem
&item
);
294 void SetPosition( int x
, int y
);
295 void SetWidth( int w
);
296 void SetFormat( int format
);
297 void SetHeight( int h
);
298 bool HasImage(void) const;
299 bool HasText(void) const;
300 bool IsHit( int x
, int y
) const;
301 void GetItem( wxListItem
&item
);
302 void GetText( wxString
&s
);
303 int GetImage(void) const;
304 int GetWidth(void) const;
305 int GetFormat(void) const;
308 //-----------------------------------------------------------------------------
309 // wxListLineData (internal)
310 //-----------------------------------------------------------------------------
312 class wxListLineData
: public wxObject
314 DECLARE_DYNAMIC_CLASS(wxListLineData
);
318 wxRectangle m_bound_all
;
319 wxRectangle m_bound_label
;
320 wxRectangle m_bound_icon
;
321 wxRectangle m_bound_hilight
;
324 wxBrush
*m_hilightBrush
;
326 wxListMainWindow
*m_owner
;
328 void DoDraw( wxPaintDC
*dc
, bool hilight
, bool paintBG
);
331 wxListLineData( void ) {};
332 wxListLineData( wxListMainWindow
*owner
, int mode
, wxBrush
*hilightBrush
);
333 void CalculateSize( wxPaintDC
*dc
, int spacing
);
334 void SetPosition( wxPaintDC
*dc
, int x
, int y
, int window_width
);
335 void SetColumnPosition( int index
, int x
);
336 void GetSize( int &width
, int &height
);
337 void GetExtent( int &x
, int &y
, int &width
, int &height
);
338 void GetLabelExtent( int &x
, int &y
, int &width
, int &height
);
339 long IsHit( int x
, int y
);
340 void InitItems( int num
);
341 void SetItem( int index
, const wxListItem
&info
);
342 void GetItem( int index
, wxListItem
&info
);
343 void GetText( int index
, wxString
&s
);
344 void SetText( int index
, const wxString s
);
345 int GetImage( int index
);
346 void GetRect( wxRectangle
&rect
);
347 void Hilight( bool on
);
348 void ReverseHilight( void );
349 void DrawRubberBand( wxPaintDC
*dc
, bool on
);
350 void Draw( wxPaintDC
*dc
);
351 bool IsInRect( int x
, int y
, const wxRectangle
&rect
);
352 bool IsHilighted( void );
353 void AssignRect( wxRectangle
&dest
, int x
, int y
, int width
, int height
);
354 void AssignRect( wxRectangle
&dest
, const wxRectangle
&source
);
357 //-----------------------------------------------------------------------------
358 // wxListHeaderWindow (internal)
359 //-----------------------------------------------------------------------------
361 class wxListHeaderWindow
: public wxWindow
363 DECLARE_DYNAMIC_CLASS(wxListHeaderWindow
)
366 wxListMainWindow
*m_owner
;
367 wxCursor
*m_currentCursor
;
368 wxCursor
*m_resizeCursor
;
371 wxListHeaderWindow( void );
372 wxListHeaderWindow( wxWindow
*win
, wxWindowID id
, wxListMainWindow
*owner
,
373 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
374 long style
= 0, const wxString
&name
= "columntitles" );
375 void DoDrawRect( wxPaintDC
*dc
, int x
, int y
, int w
, int h
);
376 void OnPaint( wxPaintEvent
&event
);
377 void OnMouse( wxMouseEvent
&event
);
378 void OnSetFocus( wxFocusEvent
&event
);
380 DECLARE_EVENT_TABLE()
383 //-----------------------------------------------------------------------------
384 // wxListRenameTimer (internal)
385 //-----------------------------------------------------------------------------
387 class wxListRenameTimer
: public wxTimer
390 wxListMainWindow
*m_owner
;
393 wxListRenameTimer( wxListMainWindow
*owner
);
399 //-----------------------------------------------------------------------------
400 // wxListTextCtrl (internal)
401 //-----------------------------------------------------------------------------
403 class wxListTextCtrl: public wxTextCtrl
405 DECLARE_DYNAMIC_CLASS(wxListTextCtrl);
410 wxListMainWindow *m_owner;
413 wxListTextCtrl(void) : wxTextCtrl() {};
414 wxListTextCtrl( wxWindow *parent, const char *value = "",
415 bool *accept, wxString *res, wxListMainWindow *owner,
416 int x = -1, int y = -1, int w = -1, int h = -1, int style = 0, char *name = "rawtext" ) :
417 wxTextCtrl( parent, value, x, y, w, h, style, name )
423 void OnChar( wxKeyEvent &event )
425 if (event.keyCode == WXK_RETURN)
428 (*m_res) = GetValue();
429 m_owner->OnRenameAccept();
434 if (event.keyCode == WXK_ESCAPE)
443 void OnKillFocus(void)
455 //-----------------------------------------------------------------------------
456 // wxListMainWindow (internal)
457 //-----------------------------------------------------------------------------
459 class wxListMainWindow
: public wxScrolledWindow
461 DECLARE_DYNAMIC_CLASS(wxListMainWindow
);
467 wxListLineData
*m_current
;
469 wxBrush
*m_hilightBrush
;
470 wxColour
*m_hilightColour
;
472 int m_xScroll
,m_yScroll
;
474 wxImageList
*m_small_image_list
;
475 wxImageList
*m_normal_image_list
;
477 int m_normal_spacing
;
481 wxTimer
*m_renameTimer
;
482 // wxListTextCtrl *m_text;
484 wxString m_renameRes
;
489 wxListMainWindow(void);
490 wxListMainWindow( wxWindow
*parent
, wxWindowID id
,
491 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
492 long style
= 0, const wxString
&name
= "listctrl" );
493 ~wxListMainWindow(void);
494 void RefreshLine( wxListLineData
*line
);
495 void OnPaint( wxPaintEvent
&event
);
496 void HilightAll( bool on
);
497 void ActivateLine( wxListLineData
*line
);
498 void SendNotify( wxListLineData
*line
, wxEventType command
);
499 void FocusLine( wxListLineData
*line
);
500 void UnfocusLine( wxListLineData
*line
);
501 void SelectLine( wxListLineData
*line
);
502 void DeselectLine( wxListLineData
*line
);
503 void DeleteLine( wxListLineData
*line
);
504 void RenameLine( wxListLineData
*line
, const wxString
&newName
);
505 void OnRenameTimer(void);
506 void OnRenameAccept(void);
507 void OnMouse( wxMouseEvent
&event
);
508 void MoveToFocus( void );
509 void OnArrowChar( wxListLineData
*newCurrent
, bool shiftDown
);
510 void OnChar( wxKeyEvent
&event
);
511 void OnSetFocus( wxFocusEvent
&event
);
512 void OnKillFocus( wxFocusEvent
&event
);
513 void OnSize( wxSizeEvent
&event
);
514 wxFont
*GetMyFont( void );
515 void DrawImage( int index
, wxPaintDC
*dc
, int x
, int y
);
516 void GetImageSize( int index
, int &width
, int &height
);
517 int GetIndexOfLine( const wxListLineData
*line
);
518 int GetTextLength( wxString
&s
); // should be const
520 void SetImageList( wxImageList
*imageList
, int which
);
521 void SetItemSpacing( int spacing
, bool isSmall
= FALSE
);
522 int GetItemSpacing( bool isSmall
= FALSE
);
523 void SetColumn( int col
, wxListItem
&item
);
524 void SetColumnWidth( int col
, int width
);
525 void GetColumn( int col
, wxListItem
&item
);
526 int GetColumnWidth( int vol
);
527 int GetColumnCount( void );
528 int GetCountPerPage( void );
529 void SetItem( wxListItem
&item
);
530 void GetItem( wxListItem
&item
);
531 void SetItemState( long item
, long state
, long stateMask
);
532 int GetItemState( long item
, long stateMask
);
533 int GetItemCount( void );
534 void GetItemRect( long index
, wxRectangle
&rect
);
535 int GetSelectedItemCount( void );
536 void SetMode( long mode
);
537 long GetMode( void ) const;
538 void CalculatePositions( void );
539 void RealizeChanges(void);
540 long GetNextItem( long item
, int geometry
, int state
);
541 void DeleteItem( long index
);
542 void DeleteAllItems( void );
543 void DeleteColumn( int col
);
544 void DeleteEverything( void );
545 void EnsureVisible( long index
);
546 long FindItem(long start
, const wxString
& str
, bool partial
= FALSE
);
547 long FindItem(long start
, long data
);
548 long HitTest( int x
, int y
, int &flags
);
549 void InsertItem( wxListItem
&item
);
550 void InsertColumn( long col
, wxListItem
&item
);
551 void SortItems( wxListCtrlCompare fn
, long data
);
552 virtual bool OnListNotify( wxListEvent
&event
);
554 DECLARE_EVENT_TABLE()
557 //-----------------------------------------------------------------------------
559 //-----------------------------------------------------------------------------
561 class wxListCtrl
: public wxControl
563 DECLARE_DYNAMIC_CLASS(wxListCtrl
);
568 wxListCtrl( wxWindow
*parent
, wxWindowID id
,
569 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
570 long style
= 0, const wxString
&name
= "listctrl" );
572 bool Create( wxWindow
*parent
, wxWindowID id
,
573 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
574 long style
= 0, const wxString
&name
= "listctrl" );
575 void OnSize( wxSizeEvent
&event
);
576 void SetBackgroundColour( const wxColour
& col
);
577 bool GetColumn( int col
, wxListItem
& item
);
578 bool SetColumn( int col
, wxListItem
& item
);
579 int GetColumnWidth( int col
);
580 bool SetColumnWidth( int col
, int width
);
581 int GetCountPerPage(void); // not the same in wxGLC as in Windows, I think
582 // wxText& GetEditControl(void) const; // not supported in wxGLC
583 bool GetItem( wxListItem
& info
);
584 bool SetItem( wxListItem
& info
) ;
585 long SetItem( long index
, int col
, const wxString
& label
, int imageId
= -1 );
586 int GetItemState( long item
, long stateMask
);
587 bool SetItemState( long item
, long state
, long stateMask
);
588 bool SetItemImage( long item
, int image
, int selImage
);
589 wxString
GetItemText( long item
);
590 void SetItemText( long item
, const wxString
& str
);
591 long GetItemData( long item
);
592 bool SetItemData( long item
, long data
);
593 bool GetItemRect( long item
, wxRectangle
& rect
, int code
= wxLIST_RECT_BOUNDS
); // not supported in wxGLC
594 bool GetItemPosition( long item
, wxPoint
& pos
) const; // not supported in wxGLC
595 bool SetItemPosition( long item
, const wxPoint
& pos
); // not supported in wxGLC
596 int GetItemCount(void);
597 void SetItemSpacing( int spacing
, bool isSmall
= FALSE
);
598 int GetItemSpacing( bool isSmall
);
599 int GetSelectedItemCount(void);
600 // wxColour GetTextColour(void) const; // wxGLC has colours for every Item (see wxListItem)
601 // void SetTextColour(const wxColour& col);
602 long GetTopItem(void);
603 void SetSingleStyle( long style
, bool add
= TRUE
) ;
604 void SetWindowStyleFlag(long style
);
605 void RecreateWindow(void) {};
606 long GetNextItem(long item
, int geometry
= wxLIST_NEXT_ALL
, int state
= wxLIST_STATE_DONTCARE
);
607 wxImageList
*GetImageList(int which
);
608 void SetImageList(wxImageList
*imageList
, int which
) ;
609 bool Arrange( int flag
= wxLIST_ALIGN_DEFAULT
); // always wxLIST_ALIGN_LEFT in wxGLC
610 bool DeleteItem( long item
);
611 bool DeleteAllItems(void) ;
612 bool DeleteColumn( int col
);
613 // wxText& Edit(long item) ; // not supported in wxGLC
614 bool EnsureVisible( long item
);
615 long FindItem(long start
, const wxString
& str
, bool partial
= FALSE
);
616 long FindItem(long start
, long data
);
617 long FindItem(long start
, const wxPoint
& pt
, int direction
); // not supported in wxGLC
618 long HitTest(const wxPoint
& point
, int& flags
);
619 long InsertItem(wxListItem
& info
);
620 long InsertItem(long index
, const wxString
& label
);
621 long InsertItem(long index
, int imageIndex
);
622 long InsertItem(long index
, const wxString
& label
, int imageIndex
);
623 long InsertColumn(long col
, wxListItem
& info
);
624 long InsertColumn(long col
, const wxString
& heading
, int format
= wxLIST_FORMAT_LEFT
,
626 bool ScrollList(int dx
, int dy
);
627 bool SortItems(wxListCtrlCompare fn
, long data
);
628 bool Update(long item
);
629 virtual bool OnListNotify(wxListEvent
& WXUNUSED(event
)) { return FALSE
; }
630 void SetDropTarget( wxDropTarget
*dropTarget
)
631 { m_mainWin
->SetDropTarget( dropTarget
); };
632 wxDropTarget
*GetDropTarget() const
633 { return m_mainWin
->GetDropTarget(); };
635 void OnIdle( wxIdleEvent
&event
);
639 // wxListTextCtrl m_textCtrl;
640 wxImageList
*m_imageListNormal
;
641 wxImageList
*m_imageListSmall
;
642 wxImageList
*m_imageListState
; // what's that ?
643 wxListHeaderWindow
*m_headerWin
;
644 wxListMainWindow
*m_mainWin
;
646 DECLARE_EVENT_TABLE()
651 #endif // __LISTCTRLH_G__