1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface file for wxListCtrl and related classes
7 // Created: 10-June-1998
9 // Copyright: (c) 2002 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
19 #include <wx/listctrl.h>
22 MAKE_CONST_WXSTRING2(ListCtrlNameStr, _T("wxListCtrl"));
24 //---------------------------------------------------------------------------
55 // Mask flags to tell app/GUI what fields of wxListItem are valid
64 // State flags for indicating the state of an item
65 wxLIST_STATE_DONTCARE,
66 wxLIST_STATE_DROPHILITED,
68 wxLIST_STATE_SELECTED,
70 wxLIST_STATE_DISABLED,
71 wxLIST_STATE_FILTERED,
76 // Hit test flags, used in HitTest
79 wxLIST_HITTEST_NOWHERE,
80 wxLIST_HITTEST_ONITEMICON,
81 wxLIST_HITTEST_ONITEMLABEL,
82 wxLIST_HITTEST_ONITEMRIGHT,
83 wxLIST_HITTEST_ONITEMSTATEICON,
84 wxLIST_HITTEST_TOLEFT,
85 wxLIST_HITTEST_TORIGHT,
86 wxLIST_HITTEST_ONITEM,
90 // Flags for GetNextItem (MSW only except wxLIST_NEXT_ALL)
93 wxLIST_NEXT_ABOVE, // Searches for an item above the specified item
94 wxLIST_NEXT_ALL, // Searches for subsequent item by index
95 wxLIST_NEXT_BELOW, // Searches for an item below the specified item
96 wxLIST_NEXT_LEFT, // Searches for an item to the left of the specified item
97 wxLIST_NEXT_RIGHT // Searches for an item to the right of the specified item
100 // Alignment flags for Arrange (MSW only except wxLIST_ALIGN_LEFT)
103 wxLIST_ALIGN_DEFAULT,
106 wxLIST_ALIGN_SNAP_TO_GRID
109 // Column format (MSW only except wxLIST_FORMAT_LEFT)
110 enum wxListColumnFormat
114 wxLIST_FORMAT_CENTRE,
115 wxLIST_FORMAT_CENTER = wxLIST_FORMAT_CENTRE
118 // Autosize values for SetColumnWidth
121 wxLIST_AUTOSIZE = -1,
122 wxLIST_AUTOSIZE_USEHEADER = -2 // partly supported by generic version
125 // Flag values for GetItemRect
133 // Flag values for FindItem (MSW only)
144 //---------------------------------------------------------------------------
147 // wxListItemAttr: a structure containing the visual attributes of an item
153 wxListItemAttr(const wxColour& colText = wxNullColour,
154 const wxColour& colBack = wxNullColour,
155 const wxFont& font = wxNullFont);
159 void SetTextColour(const wxColour& colText);
160 void SetBackgroundColour(const wxColour& colBack);
161 void SetFont(const wxFont& font);
164 bool HasTextColour();
165 bool HasBackgroundColour();
168 wxColour GetTextColour();
169 wxColour GetBackgroundColour();
172 %extend { void Destroy() { delete self; } }
178 //---------------------------------------------------------------------------
182 // wxListItem: the item or column info, used to exchange data with wxListCtrl
183 class wxListItem : public wxObject {
190 void ClearAttributes();
193 void SetMask(long mask);
195 void SetColumn(int col);
196 void SetState(long state);
197 void SetStateMask(long stateMask);
198 void SetText(const wxString& text);
199 void SetImage(int image);
200 void SetData(long data);
202 void SetWidth(int width);
203 void SetAlign(wxListColumnFormat align);
205 void SetTextColour(const wxColour& colText);
206 void SetBackgroundColour(const wxColour& colBack);
207 void SetFont(const wxFont& font);
214 const wxString& GetText();
219 wxListColumnFormat GetAlign();
221 wxListItemAttr *GetAttributes();
222 bool HasAttributes();
224 wxColour GetTextColour() const;
225 wxColour GetBackgroundColour() const;
226 wxFont GetFont() const;
228 // these members are public for compatibility
229 long m_mask; // Indicates what fields are valid
230 long m_itemId; // The zero-based item position
231 int m_col; // Zero-based column, if in report mode
232 long m_state; // The state of the item
233 long m_stateMask;// Which flags of m_state are valid (uses same flags)
234 wxString m_text; // The label/header text
235 int m_image; // The zero-based index into an image list
236 long m_data; // App-defined data
239 int m_format; // left, right, centre
240 int m_width; // width of column
245 //---------------------------------------------------------------------------
249 // wxListEvent - the event class for the wxListCtrl notifications
250 class wxListEvent: public wxNotifyEvent {
252 wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
264 %pythoncode { GetCode = GetKeyCode }
268 %pythoncode { GetPosition = GetPoint }
269 const wxString& GetLabel();
270 const wxString& GetText();
274 const wxListItem& GetItem();
279 // was label editing canceled? (for wxEVT_COMMAND_LIST_END_LABEL_EDIT only)
280 bool IsEditCancelled() const;
281 void SetEditCanceled(bool editCancelled);
284 /* List control event types */
285 %constant wxEventType wxEVT_COMMAND_LIST_BEGIN_DRAG;
286 %constant wxEventType wxEVT_COMMAND_LIST_BEGIN_RDRAG;
287 %constant wxEventType wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT;
288 %constant wxEventType wxEVT_COMMAND_LIST_END_LABEL_EDIT;
289 %constant wxEventType wxEVT_COMMAND_LIST_DELETE_ITEM;
290 %constant wxEventType wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS;
291 %constant wxEventType wxEVT_COMMAND_LIST_GET_INFO;
292 %constant wxEventType wxEVT_COMMAND_LIST_SET_INFO;
293 %constant wxEventType wxEVT_COMMAND_LIST_ITEM_SELECTED;
294 %constant wxEventType wxEVT_COMMAND_LIST_ITEM_DESELECTED;
295 %constant wxEventType wxEVT_COMMAND_LIST_KEY_DOWN;
296 %constant wxEventType wxEVT_COMMAND_LIST_INSERT_ITEM;
297 %constant wxEventType wxEVT_COMMAND_LIST_COL_CLICK;
298 %constant wxEventType wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK;
299 %constant wxEventType wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK;
300 %constant wxEventType wxEVT_COMMAND_LIST_ITEM_ACTIVATED;
301 %constant wxEventType wxEVT_COMMAND_LIST_CACHE_HINT;
302 %constant wxEventType wxEVT_COMMAND_LIST_COL_RIGHT_CLICK;
303 %constant wxEventType wxEVT_COMMAND_LIST_COL_BEGIN_DRAG;
304 %constant wxEventType wxEVT_COMMAND_LIST_COL_DRAGGING;
305 %constant wxEventType wxEVT_COMMAND_LIST_COL_END_DRAG;
306 %constant wxEventType wxEVT_COMMAND_LIST_ITEM_FOCUSED;
312 EVT_LIST_BEGIN_DRAG = wx.PyEventBinder(wxEVT_COMMAND_LIST_BEGIN_DRAG , 1)
313 EVT_LIST_BEGIN_RDRAG = wx.PyEventBinder(wxEVT_COMMAND_LIST_BEGIN_RDRAG , 1)
314 EVT_LIST_BEGIN_LABEL_EDIT = wx.PyEventBinder(wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT , 1)
315 EVT_LIST_END_LABEL_EDIT = wx.PyEventBinder(wxEVT_COMMAND_LIST_END_LABEL_EDIT , 1)
316 EVT_LIST_DELETE_ITEM = wx.PyEventBinder(wxEVT_COMMAND_LIST_DELETE_ITEM , 1)
317 EVT_LIST_DELETE_ALL_ITEMS = wx.PyEventBinder(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS , 1)
318 EVT_LIST_GET_INFO = wx.PyEventBinder(wxEVT_COMMAND_LIST_GET_INFO , 1)
319 EVT_LIST_SET_INFO = wx.PyEventBinder(wxEVT_COMMAND_LIST_SET_INFO , 1)
320 EVT_LIST_ITEM_SELECTED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_SELECTED , 1)
321 EVT_LIST_ITEM_DESELECTED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_DESELECTED , 1)
322 EVT_LIST_KEY_DOWN = wx.PyEventBinder(wxEVT_COMMAND_LIST_KEY_DOWN , 1)
323 EVT_LIST_INSERT_ITEM = wx.PyEventBinder(wxEVT_COMMAND_LIST_INSERT_ITEM , 1)
324 EVT_LIST_COL_CLICK = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_CLICK , 1)
325 EVT_LIST_ITEM_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK , 1)
326 EVT_LIST_ITEM_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, 1)
327 EVT_LIST_ITEM_ACTIVATED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_ACTIVATED , 1)
328 EVT_LIST_CACHE_HINT = wx.PyEventBinder(wxEVT_COMMAND_LIST_CACHE_HINT , 1)
329 EVT_LIST_COL_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_RIGHT_CLICK , 1)
330 EVT_LIST_COL_BEGIN_DRAG = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_BEGIN_DRAG , 1)
331 EVT_LIST_COL_DRAGGING = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_DRAGGING , 1)
332 EVT_LIST_COL_END_DRAG = wx.PyEventBinder(wxEVT_COMMAND_LIST_COL_END_DRAG , 1)
333 EVT_LIST_ITEM_FOCUSED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_FOCUSED , 1)
335 EVT_LIST_GET_INFO = wx._deprecated(EVT_LIST_GET_INFO)
336 EVT_LIST_SET_INFO = wx._deprecated(EVT_LIST_SET_INFO)
339 //---------------------------------------------------------------------------
343 %{ // Python aware sorting function for wxPyListCtrl
344 static int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) {
346 PyObject* func = (PyObject*)funcPtr;
347 bool blocked = wxPyBeginBlockThreads();
349 PyObject* args = Py_BuildValue("(ii)", item1, item2);
350 PyObject* result = PyEval_CallObject(func, args);
353 retval = PyInt_AsLong(result);
357 wxPyEndBlockThreads(blocked);
364 %{ // C++ Version of a Python aware class
365 class wxPyListCtrl : public wxListCtrl {
366 DECLARE_ABSTRACT_CLASS(wxPyListCtrl);
368 wxPyListCtrl() : wxListCtrl() {}
369 wxPyListCtrl(wxWindow* parent, wxWindowID id,
373 const wxValidator& validator,
374 const wxString& name) :
375 wxListCtrl(parent, id, pos, size, style, validator, name) {}
377 bool Create(wxWindow* parent, wxWindowID id,
381 const wxValidator& validator,
382 const wxString& name) {
383 return wxListCtrl::Create(parent, id, pos, size, style, validator, name);
386 DEC_PYCALLBACK_STRING_LONGLONG(OnGetItemText);
387 DEC_PYCALLBACK_LISTATTR_LONG(OnGetItemAttr);
389 // use the virtual version to avoid a confusing assert in the base class
390 DEC_PYCALLBACK_INT_LONG_virtual(OnGetItemImage);
395 IMPLEMENT_ABSTRACT_CLASS(wxPyListCtrl, wxListCtrl);
397 IMP_PYCALLBACK_STRING_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemText);
398 IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr);
399 IMP_PYCALLBACK_INT_LONG_virtual(wxPyListCtrl, wxListCtrl, OnGetItemImage);
407 MustHaveApp(wxPyListCtrl);
409 %rename(ListCtrl) wxPyListCtrl;
410 class wxPyListCtrl : public wxControl {
413 %pythonAppend wxPyListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl)"
414 %pythonAppend wxPyListCtrl() ""
416 wxPyListCtrl(wxWindow* parent, wxWindowID id = -1,
417 const wxPoint& pos = wxDefaultPosition,
418 const wxSize& size = wxDefaultSize,
419 long style = wxLC_ICON,
420 const wxValidator& validator = wxDefaultValidator,
421 const wxString& name = wxPyListCtrlNameStr);
422 %RenameCtor(PreListCtrl, wxPyListCtrl());
424 bool Create(wxWindow* parent, wxWindowID id = -1,
425 const wxPoint& pos = wxDefaultPosition,
426 const wxSize& size = wxDefaultSize,
427 long style = wxLC_ICON,
428 const wxValidator& validator = wxDefaultValidator,
429 const wxString& name = wxPyListCtrlNameStr);
431 void _setCallbackInfo(PyObject* self, PyObject* _class);
434 // Set the control colours
435 bool SetForegroundColour(const wxColour& col);
436 bool SetBackgroundColour(const wxColour& col);
438 // Gets information about this column
439 %pythonAppend GetColumn "if val is not None: val.thisown = 1"; // %newobject doesn't work with OOR typemap
441 wxListItem* GetColumn(int col) {
443 item.SetMask( wxLIST_MASK_STATE |
451 if (self->GetColumn(col, item))
452 return new wxListItem(item);
458 // Sets information about this column
459 bool SetColumn(int col, wxListItem& item) ;
461 // Gets the column width
462 int GetColumnWidth(int col) const;
464 // Sets the column width
465 bool SetColumnWidth(int col, int width) ;
467 // Gets the number of items that can fit vertically in the
468 // visible area of the list control (list or report view)
469 // or the total number of items in the list control (icon
470 // or small icon view)
471 int GetCountPerPage() const;
473 // return the total area occupied by all the items (icon/small icon only)
474 wxRect GetViewRect() const;
477 // Gets the edit control for editing labels.
478 wxTextCtrl* GetEditControl() const;
481 // Gets information about the item
482 %pythonAppend GetItem "if val is not None: val.thisown = 1"; // %newobject doesn't work with OOR typemap
484 wxListItem* GetItem(long itemId, int col=0) {
485 wxListItem* info = new wxListItem;
486 info->m_itemId = itemId;
488 info->m_mask = 0xFFFF;
489 self->GetItem(*info);
494 // Sets information about the item
495 bool SetItem(wxListItem& info) ;
497 // Sets a string field at a particular column
498 %Rename(SetStringItem, long, SetItem(long index, int col, const wxString& label, int imageId = -1));
500 // Gets the item state
501 int GetItemState(long item, long stateMask) const ;
503 // Sets the item state
504 bool SetItemState(long item, long state, long stateMask) ;
506 // Sets the item image
507 bool SetItemImage(long item, int image, int selImage=-1) ;
509 // Gets the item text
510 wxString GetItemText(long item) const ;
512 // Sets the item text
513 void SetItemText(long item, const wxString& str) ;
515 // Gets the item data
516 long GetItemData(long item) const ;
518 // Sets the item data
519 bool SetItemData(long item, long data) ;
522 //bool GetItemRect(long item, wxRect& rect, int code = wxLIST_RECT_BOUNDS) const ;
523 //bool GetItemPosition(long item, wxPoint& pos) const ;
525 // Gets the item position
527 wxPoint GetItemPosition(long item) {
529 self->GetItemPosition(item, pos);
532 // Gets the item rectangle
533 wxRect GetItemRect(long item, int code = wxLIST_RECT_BOUNDS) {
535 self->GetItemRect(item, rect, code);
541 // Sets the item position
542 bool SetItemPosition(long item, const wxPoint& pos) ;
544 // Gets the number of items in the list control
545 int GetItemCount() const;
547 // Gets the number of columns in the list control
548 int GetColumnCount() const;
550 // get the horizontal and vertical components of the item spacing
551 wxSize GetItemSpacing() const;
554 void SetItemSpacing( int spacing, bool isSmall = false );
557 // Gets the number of selected items in the list control
558 int GetSelectedItemCount() const;
560 // Gets the text colour of the listview
561 wxColour GetTextColour() const;
563 // Sets the text colour of the listview
564 void SetTextColour(const wxColour& col);
566 // Gets the index of the topmost visible item when in
567 // list or report view
568 long GetTopItem() const ;
570 // Add or remove a single window style
571 void SetSingleStyle(long style, bool add = true) ;
573 // Set the whole window style
574 void SetWindowStyleFlag(long style) ;
576 // Searches for an item, starting from 'item'.
577 // item can be -1 to find the first item that matches the
579 // Returns the item or -1 if unsuccessful.
580 long GetNextItem(long item, int geometry = wxLIST_NEXT_ALL, int state = wxLIST_STATE_DONTCARE) const ;
582 // Gets one of the three image lists
583 wxImageList *GetImageList(int which) const ;
585 // Sets the image list
586 void SetImageList(wxImageList *imageList, int which);
588 // is there a way to tell SWIG to disown this???
590 %apply SWIGTYPE *DISOWN { wxImageList *imageList };
591 void AssignImageList(wxImageList *imageList, int which);
592 %clear wxImageList *imageList;
594 // are we in report mode?
595 bool InReportView() const;
597 // returns True if it is a virtual list control
598 bool IsVirtual() const;
600 // refresh items selectively (only useful for virtual list controls)
601 void RefreshItem(long item);
602 void RefreshItems(long itemFrom, long itemTo);
604 // Arranges the items
605 bool Arrange(int flag = wxLIST_ALIGN_DEFAULT);
608 bool DeleteItem(long item);
611 bool DeleteAllItems() ;
614 bool DeleteColumn(int col);
616 // Deletes all columns
617 bool DeleteAllColumns();
619 // Clears items, and columns if there are any.
624 wxTextCtrl* EditLabel(long item /*, wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl)*/);
626 // End label editing, optionally cancelling the edit
627 bool EndEditLabel(bool cancel);
629 void EditLabel(long item);
632 // Ensures this item is visible
633 bool EnsureVisible(long item) ;
635 // Find an item whose label matches this string, starting from the item after 'start'
636 // or the beginning if 'start' is -1.
637 long FindItem(long start, const wxString& str, bool partial = false);
639 // Find an item whose data matches this data, starting from the item after 'start'
640 // or the beginning if 'start' is -1.
641 %Rename(FindItemData, long, FindItem(long start, long data));
643 // Find an item nearest this position in the specified direction, starting from
644 // the item after 'start' or the beginning if 'start' is -1.
645 %Rename(FindItemAtPos, long, FindItem(long start, const wxPoint& pt, int direction));
649 long, HitTest(const wxPoint& point, int& OUTPUT),
650 "HitTest(Point point) -> (item, where)",
651 "Determines which item (if any) is at the specified point, giving
652 details in the second return value (see wxLIST_HITTEST_... flags.)", "");
654 // Inserts an item, returning the index of the new item if successful,
656 long InsertItem(wxListItem& info);
658 // Insert a string item
659 %Rename(InsertStringItem, long, InsertItem(long index, const wxString& label));
661 // Insert an image item
662 %Rename(InsertImageItem, long, InsertItem(long index, int imageIndex));
664 // Insert an image/string item
665 %Rename(InsertImageStringItem, long, InsertItem(long index, const wxString& label, int imageIndex));
667 // For list view mode (only), inserts a column.
668 %Rename(InsertColumnInfo, long, InsertColumn(long col, wxListItem& info));
670 long InsertColumn(long col,
671 const wxString& heading,
672 int format = wxLIST_FORMAT_LEFT,
675 // set the number of items in a virtual list control
676 void SetItemCount(long count);
678 // Scrolls the list control. If in icon, small icon or report view mode,
679 // x specifies the number of pixels to scroll. If in list view mode, x
680 // specifies the number of columns to scroll.
681 // If in icon, small icon or list view mode, y specifies the number of pixels
682 // to scroll. If in report view mode, y specifies the number of lines to scroll.
683 bool ScrollList(int dx, int dy);
685 void SetItemTextColour( long item, const wxColour& col);
686 wxColour GetItemTextColour( long item ) const;
687 void SetItemBackgroundColour( long item, const wxColour &col);
688 wxColour GetItemBackgroundColour( long item ) const;
694 def Select(self, idx, on=1):
695 '''[de]select an item'''
696 if on: state = wx.LIST_STATE_SELECTED
698 self.SetItemState(idx, state, wx.LIST_STATE_SELECTED)
700 def Focus(self, idx):
701 '''Focus and show the given item'''
702 self.SetItemState(idx, wx.LIST_STATE_FOCUSED, wx.LIST_STATE_FOCUSED)
703 self.EnsureVisible(idx)
705 def GetFocusedItem(self):
706 '''get the currently focused item or -1 if none'''
707 return self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_FOCUSED)
709 def GetFirstSelected(self, *args):
710 '''return first selected item, or -1 when none'''
711 return self.GetNextSelected(-1)
713 def GetNextSelected(self, item):
714 '''return subsequent selected items, or -1 when no more'''
715 return self.GetNextItem(item, wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED)
717 def IsSelected(self, idx):
718 '''return True if the item is selected'''
719 return self.GetItemState(idx, wx.LIST_STATE_SELECTED) != 0
721 def SetColumnImage(self, col, image):
722 item = self.GetColumn(col)
723 %# preserve all other attributes too
724 item.SetMask( wx.LIST_MASK_STATE |
730 wx.LIST_MASK_FORMAT )
732 self.SetColumn(col, item)
734 def ClearColumnImage(self, col):
735 self.SetColumnImage(col, -1)
737 def Append(self, entry):
738 '''Append an item to the list control. The entry parameter should be a
739 sequence with an item for each column'''
745 pos = self.GetItemCount()
746 self.InsertStringItem(pos, cvtfunc(entry[0]))
747 for i in range(1, len(entry)):
748 self.SetStringItem(pos, i, cvtfunc(entry[i]))
753 // bool SortItems(wxListCtrlCompare fn, long data);
756 // func is a function which takes 2 long arguments: item1, item2.
757 // item1 is the long data associated with a first item (NOT the index).
758 // item2 is the long data associated with a second item (NOT the index).
759 // The return value is a negative number if the first item should precede the second
760 // item, a positive number of the second item should precede the first,
761 // or zero if the two items are equivalent.
762 bool SortItems(PyObject* func) {
763 if (!PyCallable_Check(func))
765 return self->SortItems((wxListCtrlCompare)wxPyListCtrl_SortItems, (long)func);
771 wxWindow* GetMainWindow() {
775 return (wxWindow*)self->m_mainWin;
780 static wxVisualAttributes
781 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
786 //---------------------------------------------------------------------------
790 MustHaveApp(wxListView);
792 // wxListView: a class which provides a little better API for list control
793 class wxListView : public wxPyListCtrl
796 %pythonAppend wxListView "self._setOORInfo(self)"
797 %pythonAppend wxListView() ""
799 wxListView( wxWindow *parent,
801 const wxPoint& pos = wxDefaultPosition,
802 const wxSize& size = wxDefaultSize,
803 long style = wxLC_REPORT,
804 const wxValidator& validator = wxDefaultValidator,
805 const wxString& name = wxPyListCtrlNameStr);
806 %RenameCtor(PreListView, wxListView());
808 bool Create( wxWindow *parent,
810 const wxPoint& pos = wxDefaultPosition,
811 const wxSize& size = wxDefaultSize,
812 long style = wxLC_REPORT,
813 const wxValidator& validator = wxDefaultValidator,
814 const wxString& name = wxPyListCtrlNameStr);
816 // [de]select an item
817 void Select(long n, bool on = true);
819 // focus and show the given item
820 void Focus(long index);
822 // get the currently focused item or -1 if none
823 long GetFocusedItem() const;
825 // get first and subsequent selected items, return -1 when no more
826 long GetNextSelected(long item) const;
827 long GetFirstSelected() const;
829 // return True if the item is selected
830 bool IsSelected(long index);
832 void SetColumnImage(int col, int image);
833 void ClearColumnImage(int col);
838 //---------------------------------------------------------------------------
841 // Map renamed classes back to their common name for OOR
842 wxPyPtrTypeMap_Add("wxListCtrl", "wxPyListCtrl");
845 //---------------------------------------------------------------------------