Trait IconBundleMethods

Source
pub trait IconBundleMethods: GDIObjectMethods {
    // Provided methods
    fn add_icon<I: IconMethods>(&self, icon: &I) { ... }
    fn get_icon_size<S: SizeMethods>(&self, size: &S, flags: c_int) -> Icon { ... }
    fn get_icon_coord(&self, size: c_int, flags: c_int) -> Icon { ... }
    fn get_icon_of_exact_size<S: SizeMethods>(&self, size: &S) -> Icon { ... }
    fn get_icon_count(&self) -> usize { ... }
    fn get_icon_by_index(&self, n: usize) -> Icon { ... }
    fn is_empty(&self) -> bool { ... }
}
Expand description

This trait represents C++ wxIconBundle class’s methods and inheritance.

See IconBundleIsOwned documentation for the class usage.

Provided Methods§

Source

fn add_icon<I: IconMethods>(&self, icon: &I)

Adds the icon to the collection; if the collection already contains an icon with the same width and height, it is replaced by the new one.

See C++ wxIconBundle::AddIcon()’s documentation.

Source

fn get_icon_size<S: SizeMethods>(&self, size: &S, flags: c_int) -> Icon

Returns the icon with the given size.

See C++ wxIconBundle::GetIcon()’s documentation.

Source

fn get_icon_coord(&self, size: c_int, flags: c_int) -> Icon

Source

fn get_icon_of_exact_size<S: SizeMethods>(&self, size: &S) -> Icon

Returns the icon with exactly the given size or wxNullIcon if this size is not available.

See C++ wxIconBundle::GetIconOfExactSize()’s documentation.

Source

fn get_icon_count(&self) -> usize

return the number of available icons

See C++ wxIconBundle::GetIconCount()’s documentation.

Source

fn get_icon_by_index(&self, n: usize) -> Icon

return the icon at index (must be < GetIconCount())

See C++ wxIconBundle::GetIconByIndex()’s documentation.

Source

fn is_empty(&self) -> bool

Returns true if the bundle doesn’t contain any icons, false otherwise (in which case a call to GetIcon() with default parameter should return a valid icon).

See C++ wxIconBundle::IsEmpty()’s documentation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<const OWNED: bool> IconBundleMethods for IconBundleIsOwned<OWNED>