X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b8c7ba607a15a2ff8a04448138df9ffff7df6c5..fe45b493dcc42fea4ad4f781a4fb7844d2e95fd0:/wxPython/src/_icon.i diff --git a/wxPython/src/_icon.i b/wxPython/src/_icon.i index d117a99ff6..072b8119a9 100644 --- a/wxPython/src/_icon.i +++ b/wxPython/src/_icon.i @@ -65,7 +65,8 @@ public: void SetHandle(long handle) { self->SetHandle((WXHANDLE)handle); } } #endif - bool Ok(); + bool IsOk(); + %pythoncode { Ok = IsOk } int GetWidth(); int GetHeight(); int GetDepth(); @@ -77,7 +78,12 @@ public: #endif void CopyFromBitmap(const wxBitmap& bmp); - %pythoncode { def __nonzero__(self): return self.Ok() } + %pythoncode { def __nonzero__(self): return self.IsOk() } + + %property(Depth, GetDepth, SetDepth, doc="See `GetDepth` and `SetDepth`"); + %property(Height, GetHeight, SetHeight, doc="See `GetHeight` and `SetHeight`"); + %property(Width, GetWidth, SetWidth, doc="See `GetWidth` and `SetWidth`"); + }; //--------------------------------------------------------------------------- @@ -101,7 +107,7 @@ public: // returns True if this object is valid/initialized bool IsOk() const; - %pythoncode { def __nonzero__(self): return self.Ok() } + %pythoncode { def __nonzero__(self): return self.IsOk() } // set/get the icon file name void SetFileName(const wxString& filename); @@ -124,6 +130,10 @@ public: #endif } } + + %property(FileName, GetFileName, SetFileName, doc="See `GetFileName` and `SetFileName`"); + %property(Index, GetIndex, SetIndex, doc="See `GetIndex` and `SetIndex`"); + }; @@ -145,20 +155,53 @@ public: ~wxIconBundle(); - // adds the icon to the collection, if the collection already - // contains an icon with the same width and height, it is - // replaced - void AddIcon( const wxIcon& icon ); + virtual bool IsOk() const; + %pythoncode { def __nonzero__(self): return self.IsOk() } + + + DocDeclStr( + void , AddIcon( const wxIcon& icon ), + "Adds the icon to the collection, if the collection already contains an +icon with the same width and height, it is replaced", ""); + + + DocDeclStrName( + void , AddIcon( const wxString& file, long type ), + "Adds all the icons contained in the file to the collection, if the +collection already contains icons with the same width and height, they +are replaced", "", + AddIconFromFile); + + + DocDeclStr( + const wxIcon& , GetIcon( const wxSize& size ) const, + "Returns the icon with the given size; if no such icon exists, returns +the icon with size wxSYS_ICON_[XY]; if no such icon exists, returns +the first icon in the bundle", ""); + + + + DocDeclStr( + wxIcon , GetIconOfExactSize(const wxSize& size) const, + "Returns the icon exactly of the specified size or wxNullIcon if no +icon of exactly given size are available.", ""); + + + + DocDeclStr( + size_t , GetIconCount() const, + "return the number of available icons", ""); + + + DocDeclStr( + wxIcon , GetIconByIndex(size_t n) const, + "Return the icon at index (must be < GetIconCount())", ""); + - // adds all the icons contained in the file to the collection, - // if the collection already contains icons with the same - // width and height, they are replaced - %Rename(AddIconFromFile,void, AddIcon( const wxString& file, long type )); + DocDeclStr( + bool , IsEmpty() const, + "Check if we have any icons at all", ""); - // returns the icon with the given size; if no such icon exists, - // returns the icon with size wxSYS_ICON_[XY]; if no such icon exists, - // returns the first icon in the bundle - const wxIcon& GetIcon( const wxSize& size ) const; }; //---------------------------------------------------------------------------