wxIconBundle(3erl)

πŸ¦‹ wxIconBundle(3erl) β€” Erlang Module Definition πŸ¦‹

okay bestie, gather round β€” this is the manual page for wxIconBundle, and it's literally giving β€œicon closet with every size on deck” πŸ’…βœ¨. Let’s get into it.

🌸 NAME 🌸

wxIconBundle β€” Functions for wxIconBundle class.

✨ DESCRIPTION ✨

This class contains multiple copies of an icon in different sizes. It is typically used in wxDialog::SetIcons (not implemented in wx) and wxTopLevelWindow:setIcons/2.

Predefined objects (include wx.hrl): ?wxNullIconBundle

wxWidgets docs: wxIconBundle

🧚 DATA TYPES 🧚

wxIconBundle() = wx:wx_object()

πŸ”₯ EXPORTS πŸ”₯

πŸŽ€ new() -> wxIconBundle() πŸŽ€

Default ctor. Fresh bundle energy, no cap ✨.

πŸŽ€ new(Ic) -> wxIconBundle() πŸŽ€

The original page gives this one zero description β€” just the signature sitting there being mysterious πŸ’€.

πŸŽ€ new(File) -> wxIconBundle() πŸŽ€

Types:

File = unicode:chardata()

Initializes the bundle with the icon(s) found in the file. File-based icon haul, slay πŸ—‚οΈβœ¨.

πŸŽ€ new(File, Type) -> wxIconBundle() πŸŽ€

Types:

File = unicode:chardata()
Type = wx:wx_enum()

No extra description on this one β€” just types, periodt πŸ’….

πŸŽ€ destroy(This :: wxIconBundle()) -> ok πŸŽ€

Destructor. Yep, the destructor β€” clean up your faves 🧹.

πŸŽ€ addIcon(This, File) -> ok and addIcon(This, Icon) -> ok πŸŽ€

Types:

This = wxIconBundle()
Icon = wxIcon:wxIcon()

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.

πŸŽ€ addIcon(This, File, Type) -> ok πŸŽ€

Types:

This = wxIconBundle()
File = unicode:chardata()
Type = wx:wx_enum()

Again, no prose description β€” just the type block, and honestly same 🫢.

πŸŽ€ getIcon(This) -> wxIcon:wxIcon() πŸŽ€

Types:

This = wxIconBundle()

No description in the original β€” just the signature doing its thing.

πŸŽ€ getIcon(This, Size) -> wxIcon:wxIcon() πŸŽ€

No description, no types block β€” just a bare signature living its truth 🫢.

πŸŽ€ getIcon(This, Size :: [Option]) -> wxIcon:wxIcon() πŸŽ€

Types:

This = wxIconBundle()
Option = {size, integer()} | {flags, integer()}

The description is literally Same as. and then a lone . β€” that’s the entire note, bestie, cryptic icon behavior πŸ’€.

πŸŽ€ getIcon(This, Size, Options :: [Option]) -> wxIcon:wxIcon() πŸŽ€

Types:

This = wxIconBundle()
Size = {W :: integer(), H :: integer()}
Option = {flags, integer()}

Returns the icon with the given size.

If size is ?wxDefaultSize, it is interpreted as the standard system icon size, i.e. the size returned by wxSystemSettings:getMetric/2 for wxSYS_ICON_X and wxSYS_ICON_Y.

If the bundle contains an icon with exactly the requested size, it’s always returned. Otherwise, the behaviour depends on the flags. If only wxIconBundle::FALLBACK_NONE (not implemented in wx) is given, the function returns an invalid icon. If wxIconBundle::FALLBACK_SYSTEM (not implemented in wx) is given, it tries to find the icon of standard system size, regardless of the size passed as parameter. Otherwise, or if the icon system size is not found neither, but wxIconBundle::FALLBACK_NEAREST_LARGER (not implemented in wx) flag is specified, the function returns the smallest icon of the size larger than the requested one or, if this fails too, just the icon closest to the specified size.

The flags parameter is available only since wxWidgets 2.9.4.


That’s the whole page, bestie 🫢 β€” brought to you by the wxWidgets team, version wx 2.2.2.1, and this little manual moment is wxIconBundle(3erl). Mwah πŸ’‹

πŸ“¦ where this page comes from