X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..4f84bfb64f80c03c8779a102ec9c87b9f3cc44ea:/wxPython/src/_imaglist.i diff --git a/wxPython/src/_imaglist.i b/wxPython/src/_imaglist.i index f436666cb8..9a63bb10b8 100644 --- a/wxPython/src/_imaglist.i +++ b/wxPython/src/_imaglist.i @@ -33,6 +33,8 @@ enum { }; +MustHaveApp(wxImageList); + // wxImageList is used for wxListCtrl, wxTreeCtrl. These controls refer to // images for their items by an index into an image list. @@ -41,27 +43,37 @@ enum { // two bitmaps, or an icon. class wxImageList : public wxObject { public: - wxImageList(int width, int height, int mask=TRUE, int initialCount=1); + // turn off this typemap + %typemap(out) wxImageList*; + + wxImageList(int width, int height, int mask=true, int initialCount=1); ~wxImageList(); + + // Turn it back on again + %typemap(out) wxImageList* { $result = wxPyMake_wxObject($1, $owner); } int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); - %name(AddWithColourMask)int Add(const wxBitmap& bitmap, const wxColour& maskColour); - %name(AddIcon)int Add(const wxIcon& icon); -#ifdef __WXMSW__ + %Rename(AddWithColourMask,int, Add(const wxBitmap& bitmap, const wxColour& maskColour)); + %Rename(AddIcon,int, Add(const wxIcon& icon)); + + wxBitmap GetBitmap(int index) const; + wxIcon GetIcon(int index) const; + bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap); -#else -// %name(ReplaceIcon)bool Replace(int index, const wxIcon& icon); -// int Add(const wxBitmap& bitmap); - bool Replace(int index, const wxBitmap& bitmap); -#endif bool Draw(int index, wxDC& dc, int x, int x, int flags = wxIMAGELIST_DRAW_NORMAL, - const bool solidBackground = FALSE); + const bool solidBackground = false); int GetImageCount(); bool Remove(int index); bool RemoveAll(); - void GetSize(int index, int& OUTPUT, int& OUTPUT); + + DocDeclA( + void, GetSize(int index, int& OUTPUT, int& OUTPUT), + "GetSize(index) -> (width,height)"); + + %property(ImageCount, GetImageCount, doc="See `GetImageCount`"); + %property(Size, GetSize, doc="See `GetSize`"); }; //---------------------------------------------------------------------------