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__
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
)(const long item1
, const 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(WXTYPE commandType
= 0, 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( const int image
);
256 void SetData( const long data
);
257 void SetPosition( const int x
, const int y
);
258 void SetSize( const int width
, const int height
);
259 void SetColour( wxColour
*col
);
260 bool HasImage(void) const;
261 bool HasText(void) const;
262 bool IsHit( const int x
, const 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( const int x
, const int y
);
295 void SetWidth( const int w
);
296 void SetFormat( const int format
);
297 void SetHeight( const int h
);
298 bool HasImage(void) const;
299 bool HasText(void) const;
300 bool IsHit( const int x
, const 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
, const bool hilight
, const bool paintBG
);
331 wxListLineData( void ) {};
332 wxListLineData( wxListMainWindow
*owner
, const int mode
, wxBrush
*hilightBrush
);
333 void CalculateSize( wxPaintDC
*dc
, const int spacing
);
334 void SetPosition( wxPaintDC
*dc
, const int x
, const int y
, const int window_width
);
335 void SetColumnPosition( const int index
, const 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( const int x
, const int y
);
340 void InitItems( const int num
);
341 void SetItem( const int index
, const wxListItem
&info
);
342 void GetItem( const int index
, wxListItem
&info
);
343 void GetText( const int index
, wxString
&s
);
344 void SetText( const int index
, const wxString s
);
345 int GetImage( const int index
);
346 void GetRect( wxRectangle
&rect
);
347 void Hilight( const bool on
);
348 void ReverseHilight( void );
349 void DrawRubberBand( wxPaintDC
*dc
, const bool on
);
350 void Draw( wxPaintDC
*dc
);
351 bool IsInRect( const int x
, const int y
, const wxRectangle
&rect
);
352 bool IsHilighted( void );
353 void AssignRect( wxRectangle
&dest
, const int x
, const int y
, const int width
, const 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
, const wxWindowID id
, wxListMainWindow
*owner
,
373 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
374 const 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
, const wxWindowID id
,
491 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
492 const long style
= 0, const wxString
&name
= "listctrl" );
493 ~wxListMainWindow(void);
494 void RefreshLine( wxListLineData
*line
);
495 void OnPaint( wxPaintEvent
&event
);
496 void HilightAll( const bool on
);
497 void ActivateLine( wxListLineData
*line
);
498 void SendNotify( wxListLineData
*line
, long 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
, const int which
);
521 void SetItemSpacing( const int spacing
, const bool isSmall
= FALSE
);
522 int GetItemSpacing( const bool isSmall
= FALSE
);
523 void SetColumn( const int col
, wxListItem
&item
);
524 void SetColumnWidth( const int col
, const int width
);
525 void GetColumn( const int col
, wxListItem
&item
);
526 int GetColumnWidth( const int vol
);
527 int GetColumnCount( void );
528 int GetCountPerPage( void );
529 void SetItem( wxListItem
&item
);
530 void GetItem( wxListItem
&item
);
531 void SetItemState( const long item
, const long state
, const long stateMask
);
532 int GetItemState( const long item
, const long stateMask
);
533 int GetItemCount( void );
534 void GetItemRect( const long index
, wxRectangle
&rect
);
535 int GetSelectedItemCount( void );
536 void SetMode( const long mode
);
537 long GetMode( void ) const;
538 void CalculatePositions( void );
539 void RealizeChanges(void);
540 long GetNextItem( const long item
, int geometry
, int state
);
541 void DeleteItem( const long index
);
542 void DeleteAllItems( void );
543 void DeleteColumn( const int col
);
544 void DeleteEverything( void );
545 void EnsureVisible( const long index
);
546 long FindItem(const long start
, const wxString
& str
, const bool partial
= FALSE
);
547 long FindItem(const long start
, const long data
);
548 long HitTest( const int x
, const int y
, int &flags
);
549 void InsertItem( wxListItem
&item
);
550 void InsertColumn( const 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
, const wxWindowID id
,
569 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
570 const long style
= 0, const wxString
&name
= "listctrl" );
572 bool Create( wxWindow
*parent
, const wxWindowID id
,
573 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
574 const long style
= 0, const wxString
&name
= "listctrl" );
575 void OnSize( wxSizeEvent
&event
);
576 void SetBackgroundColour( const wxColour
& col
);
577 bool GetColumn( const int col
, wxListItem
& item
);
578 bool SetColumn( const int col
, wxListItem
& item
);
579 int GetColumnWidth( const int col
);
580 bool SetColumnWidth( const int col
, const 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( const long index
, const int col
, const wxString
& label
, const int imageId
= -1 );
586 int GetItemState( const long item
, const long stateMask
);
587 bool SetItemState( const long item
, const long state
, const long stateMask
);
588 bool SetItemImage( const long item
, const int image
, const int selImage
);
589 wxString
GetItemText( const long item
);
590 void SetItemText( const long item
, const wxString
& str
);
591 long GetItemData( const long item
);
592 bool SetItemData( const long item
, long data
);
593 bool GetItemRect( const long item
, wxRectangle
& rect
, const int code
= wxLIST_RECT_BOUNDS
); // not supported in wxGLC
594 bool GetItemPosition( const long item
, wxPoint
& pos
) const; // not supported in wxGLC
595 bool SetItemPosition( const long item
, const wxPoint
& pos
); // not supported in wxGLC
596 int GetItemCount(void);
597 int GetItemSpacing( bool isSmall
);
598 int GetSelectedItemCount(void);
599 // wxColour GetTextColour(void) const; // wxGLC has colours for every Item (see wxListItem)
600 // void SetTextColour(const wxColour& col);
601 long GetTopItem(void);
602 void SetSingleStyle( const long style
, const bool add
= TRUE
) ;
603 void SetWindowStyleFlag(const long style
);
604 void RecreateWindow(void) {};
605 long GetNextItem(const long item
, int geometry
= wxLIST_NEXT_ALL
, int state
= wxLIST_STATE_DONTCARE
);
606 wxImageList
*GetImageList(const int which
);
607 void SetImageList(wxImageList
*imageList
, const int which
) ;
608 bool Arrange( const int flag
= wxLIST_ALIGN_DEFAULT
); // always wxLIST_ALIGN_LEFT in wxGLC
609 bool DeleteItem( const long item
);
610 bool DeleteAllItems(void) ;
611 bool DeleteColumn( const int col
);
612 // wxText& Edit(const long item) ; // not supported in wxGLC
613 bool EnsureVisible( const long item
);
614 long FindItem(const long start
, const wxString
& str
, const bool partial
= FALSE
);
615 long FindItem(const long start
, const long data
);
616 long FindItem(const long start
, const wxPoint
& pt
, const int direction
); // not supported in wxGLC
617 long HitTest(const wxPoint
& point
, int& flags
);
618 long InsertItem(wxListItem
& info
);
619 long InsertItem(const long index
, const wxString
& label
);
620 long InsertItem(const long index
, const int imageIndex
);
621 long InsertItem(const long index
, const wxString
& label
, const int imageIndex
);
622 long InsertColumn(const long col
, wxListItem
& info
);
623 long InsertColumn(const long col
, const wxString
& heading
, const int format
= wxLIST_FORMAT_LEFT
,
624 const int width
= -1);
625 bool ScrollList(const int dx
, const int dy
);
626 bool SortItems(wxListCtrlCompare fn
, long data
);
627 bool Update(const long item
);
628 virtual bool OnListNotify(wxListEvent
& WXUNUSED(event
)) { return FALSE
; }
629 void SetDropTarget( wxDropTarget
*dropTarget
)
630 { m_mainWin
->SetDropTarget( dropTarget
); };
631 wxDropTarget
*GetDropTarget() const
632 { return m_mainWin
->GetDropTarget(); };
634 void OnIdle( wxIdleEvent
&event
);
638 // wxListTextCtrl m_textCtrl;
639 wxImageList
*m_imageListNormal
;
640 wxImageList
*m_imageListSmall
;
641 wxImageList
*m_imageListState
; // what's that ?
642 wxListHeaderWindow
*m_headerWin
;
643 wxListMainWindow
*m_mainWin
;
645 DECLARE_EVENT_TABLE()
650 #endif // __LISTCTRLH_G__