- // 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;
- // equivalent to GetIcon( wxSize( size, size ) )
- const wxIcon& GetIcon( wxCoord size = -1 ) const
- { return GetIcon( wxSize( size, size ) ); }
+ // behavior is specified by the flags.
+ wxIcon GetIcon(const wxSize& size, int flags = FALLBACK_SYSTEM) const;
+
+ // equivalent to GetIcon(wxSize(size, size))
+ wxIcon GetIcon(wxCoord size = wxDefaultCoord,
+ int flags = FALLBACK_SYSTEM) const
+ { return GetIcon(wxSize(size, size), flags); }
+
+ // returns the icon exactly of the specified size or wxNullIcon if no icon
+ // of exactly given size are available
+ wxIcon GetIconOfExactSize(const wxSize& size) const;
+ wxIcon GetIconOfExactSize(wxCoord size) const
+ { return GetIconOfExactSize(wxSize(size, size)); }
+
+ // enumerate all icons in the bundle: don't use these functions if ti can
+ // be avoided, using GetIcon() directly is better
+
+ // return the number of available icons
+ size_t GetIconCount() const;
+
+ // return the icon at index (must be < GetIconCount())
+ wxIcon GetIconByIndex(size_t n) const;
+
+ // check if we have any icons at all
+ bool IsEmpty() const { return GetIconCount() == 0; }
+
+#if WXWIN_COMPATIBILITY_2_8
+#if wxUSE_STREAMS && wxUSE_IMAGE && (wxUSE_FFILE || wxUSE_FILE)
+ wxDEPRECATED( void AddIcon(const wxString& file, long type)
+ {
+ AddIcon(file, (wxBitmapType)type);
+ }
+ )
+
+ wxDEPRECATED_CONSTRUCTOR( wxIconBundle (const wxString& file, long type)
+ {
+ AddIcon(file, (wxBitmapType)type);
+ }
+ )
+#endif // wxUSE_STREAMS && wxUSE_IMAGE && (wxUSE_FFILE || wxUSE_FILE)
+#endif // WXWIN_COMPATIBILITY_2_8
+
+protected:
+ virtual wxGDIRefData *CreateGDIRefData() const;
+ virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
+