1 ///////////////////////////////////////////////////////////////////////////// 
   3 // Purpose:     interface of wxIconBundle 
   4 // Author:      wxWidgets team 
   6 // Licence:     wxWindows license 
   7 ///////////////////////////////////////////////////////////////////////////// 
  12     This class contains multiple copies of an icon in different sizes. 
  13     It is typically used in wxDialog::SetIcons and wxTopLevelWindow::SetIcons. 
  21 class wxIconBundle 
: public wxGDIObject
 
  30         Initializes the bundle with the icon(s) found in the file. 
  32     wxIconBundle(const wxString
& file
, wxBitmapType type
); 
  35         Initializes the bundle with a single icon. 
  37     wxIconBundle(const wxIcon
& icon
); 
  42     wxIconBundle(const wxIconBundle
& ic
); 
  47     virtual ~wxIconBundle(); 
  50         Adds all the icons contained in the file to the bundle; if the collection 
  51         already contains icons with the same width and height, they are replaced 
  54     void AddIcon(const wxString
& file
, wxBitmapType type
); 
  57         Adds the icon to the collection; if the collection already 
  58         contains an icon with the same width and height, it is 
  59         replaced by the new one. 
  61     void AddIcon(const wxIcon
& icon
); 
  64         Returns the icon with the given size; if no such icon exists, returns 
  65         the icon with size @c wxSYS_ICON_X and @c wxSYS_ICON_Y; if no such icon 
  66         exists, returns the first icon in the bundle. 
  68         If size = wxDefaultSize, returns the icon with size @c wxSYS_ICON_X and 
  71     wxIcon 
GetIcon(const wxSize
& size
) const; 
  74         Same as @code GetIcon( wxSize( size, size ) ) @endcode. 
  76     wxIcon 
GetIcon(wxCoord size 
= wxDefaultCoord
) const; 
  79         Returns the icon with exactly the given size or ::wxNullIcon if this 
  80         size is not available. 
  82     wxIcon 
GetIconOfExactSize(const wxSize
& size
) const; 
  85         Returns @true if the bundle doesn't contain any icons, @false otherwise 
  86         (in which case a call to GetIcon() with default parameter should return 
  92         Assignment operator, using @ref overview_refcount "reference counting". 
  94     wxIconBundle
& operator=(const wxIconBundle
& ic
); 
  97         Equality operator. This returns @true if two icon bundles are equal. 
  99     bool operator ==(const wxIconBundle
& ic
); 
 102         Inequality operator. This returns true if two icon bundles are not equal. 
 104     bool operator !=(const wxIconBundle
& ic
); 
 109     An empty wxIconBundle. 
 111 wxIconBundle wxNullIconBundle
;