Better wrapper for wxListCtrl.GetColumn, and some other cleanup

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-02-21 00:54:23 +00:00
parent c921c2cd3a
commit 14afa2cbca
5 changed files with 37 additions and 19 deletions

View File

@@ -421,7 +421,22 @@ public:
bool SetBackgroundColour(const wxColour& col);
// Gets information about this column
bool GetColumn(int col, wxListItem& item) const;
// bool GetColumn(int col, wxListItem& item) const;
%addmethods {
%new wxListItem* GetColumn(int col) {
wxListItem item;
if (self->GetColumn(col, item))
return new wxListItem(item);
else
return NULL;
}
} // The OOR typemaps don't know what to do with the %new, so fix it up.
%pragma(python) addtoclass = "
def GetItem(self, *_args, **_kwargs):
val = apply(controls2c.wxListCtrl_GetColumn,(self,) + _args, _kwargs)
if val is not None: val.thisown = 1
return val
"
// Sets information about this column
bool SetColumn(int col, wxListItem& item) ;