pub struct IconDir { /* private fields */ }
Expand description
A collection of images; the contents of a single ICO or CUR file.
Implementations§
source§impl IconDir
impl IconDir
sourcepub fn new(resource_type: ResourceType) -> IconDir
pub fn new(resource_type: ResourceType) -> IconDir
Creates a new, empty collection of icons/cursors.
sourcepub fn resource_type(&self) -> ResourceType
pub fn resource_type(&self) -> ResourceType
Returns the type of resource stored in this collection, either icons or cursors.
sourcepub fn entries(&self) -> &[IconDirEntry]
pub fn entries(&self) -> &[IconDirEntry]
Returns the entries in this collection.
sourcepub fn add_entry(&mut self, entry: IconDirEntry)
pub fn add_entry(&mut self, entry: IconDirEntry)
Adds an entry to the collection. Panics if self.resource_type() != entry.resource_type()
.