static const wxString wxPyEmptyString(wxT(""));
%}
+
+%{
+ static const long longzero = 0;
+%}
+
//----------------------------------------------------------------------
enum {
public:
wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
+%readonly
int m_code;
long m_oldItemIndex;
long m_itemIndex;
int m_col;
wxPoint m_pointDrag;
wxListItem m_item;
+%readwrite
int GetCode();
long GetIndex();
// to scroll. If in report view mode, y specifies the number of lines to scroll.
bool ScrollList(int dx, int dy);
- // bool SortItems(wxListCtrlCompare fn, long data);
- %addmethods {
- // Sort items.
- // func is a function which takes 2 long arguments: item1, item2.
- // item1 is the long data associated with a first item (NOT the index).
- // item2 is the long data associated with a second item (NOT the index).
- // The return value is a negative number if the first item should precede the second
- // item, a positive number of the second item should precede the first,
- // or zero if the two items are equivalent.
- bool SortItems(PyObject* func) {
- if (!PyCallable_Check(func))
- return FALSE;
- return self->SortItems(wxPyListCtrl_SortItems, (long)func);
- }
- }
+ void SetItemTextColour( long item, const wxColour& col);
+ wxColour GetItemTextColour( long item ) const;
+ void SetItemBackgroundColour( long item, const wxColour &col);
+ wxColour GetItemBackgroundColour( long item ) const;
+
%pragma(python) addtoclass = "
# Some helpers...
self.SetStringItem(pos, i, str(entry[i]))
return pos
"
+
+
+ // bool SortItems(wxListCtrlCompare fn, long data);
+ %addmethods {
+ // Sort items.
+ // func is a function which takes 2 long arguments: item1, item2.
+ // item1 is the long data associated with a first item (NOT the index).
+ // item2 is the long data associated with a second item (NOT the index).
+ // The return value is a negative number if the first item should precede the second
+ // item, a positive number of the second item should precede the first,
+ // or zero if the two items are equivalent.
+ bool SortItems(PyObject* func) {
+ if (!PyCallable_Check(func))
+ return FALSE;
+ return self->SortItems(wxPyListCtrl_SortItems, (long)func);
+ }
+ }
};
size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = TRUE);
- wxTreeItemId GetFirstChild(const wxTreeItemId& item, long& INOUT);
+ wxTreeItemId GetFirstChild(const wxTreeItemId& item, long& INOUT = longzero);
wxTreeItemId GetNextChild(const wxTreeItemId& item, long& INOUT);
wxTreeItemId GetNextSibling(const wxTreeItemId& item);
wxTreeItemId GetPrevSibling(const wxTreeItemId& item);
wxDIRCTRL_SELECT_FIRST,
wxDIRCTRL_SHOW_FILTERS,
wxDIRCTRL_3D_INTERNAL,
- wxDIRCTRL_EDITABLE,
+ wxDIRCTRL_EDIT_LABELS,
wxID_TREECTRL,
wxID_FILTERLISTCTRL,