wxLIST_HITTEST_TORIGHT,
wxLIST_HITTEST_ONITEM,
-// GetSubItemRect constants
+// GetSubItemRect constants
wxLIST_GETSUBITEMRECT_WHOLEITEM,
};
void AssignFrom(const wxListItemAttr& source);
- %pythonAppend Destroy "args[0].thisown = 0"
+ %pythonPrepend Destroy "args[0].this.own(False)"
%extend { void Destroy() { delete self; } }
%property(BackgroundColour, GetBackgroundColour, SetBackgroundColour, doc="See `GetBackgroundColour` and `SetBackgroundColour`");
// wxListItem: the item or column info, used to exchange data with wxListCtrl
class wxListItem : public wxObject {
public:
+ // turn off this typemap
+ %typemap(out) wxListItem*;
+
wxListItem();
~wxListItem();
+ // Turn it back on again
+ %typemap(out) wxListItem* { $result = wxPyMake_wxObject($1, $owner); }
+
// resetting
void Clear();
void ClearAttributes();
%property(Mask, GetMask, doc="See `GetMask`");
%property(Point, GetPoint, doc="See `GetPoint`");
%property(Text, GetText, doc="See `GetText`");
-
+
};
/* List control event types */
IMP_PYCALLBACK_STRING_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemText);
IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr);
IMP_PYCALLBACK_INT_LONG_virtual(wxPyListCtrl, wxListCtrl, OnGetItemImage);
-IMP_PYCALLBACK_INT_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemColumnImage);
+IMP_PYCALLBACK_INT_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemColumnImage);
%}
-
+// NOTE: The following option is set in _settings.i
+// # Until the new native control for wxMac is up to par, still use the generic one.
+// SystemOptions.SetOptionInt("mac.listctrl.always_use_generic", 1)
MustHaveApp(wxPyListCtrl);
%rename(ListCtrl) wxPyListCtrl;
class wxPyListCtrl : public wxControl {
public:
+ // turn off this typemap
+ %typemap(out) wxPyListCtrl*;
- %pythonAppend wxPyListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl)"
+ %pythonAppend wxPyListCtrl "self._setOORInfo(self);" setCallbackInfo(ListCtrl)
%pythonAppend wxPyListCtrl() ""
wxPyListCtrl(wxWindow* parent, wxWindowID id = -1,
const wxString& name = wxPyListCtrlNameStr);
%RenameCtor(PreListCtrl, wxPyListCtrl());
+ // Turn it back on again
+ %typemap(out) wxPyListCtrl* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create(wxWindow* parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
return rect;
}
-// MSW only so far...
+// MSW only so far...
// wxRect GetSubItemRect(long item, long subItem, int code = wxLIST_RECT_BOUNDS) {
// wxRect rect;
// self->GetSubItemRect(item, subItem, rect, code);
any.", "",
HitTestSubItem);
-
+
// Inserts an item, returning the index of the new item if successful,
// -1 otherwise.
long InsertItem(wxListItem& info);
%extend {
wxWindow* GetMainWindow() {
- #ifdef __WXMSW__
+ #if defined(__WXMSW__) || defined(__WXMAC__)
return self;
#else
return (wxWindow*)self->m_mainWin;