wxIcon(3)
πΈ wxIcon πΈ
okay bestie, welcome to wxIcon(3) β this is the Erlang Module Definition for the wxIcon module, and honestly? it's giving tiny-but-mighty. an icon is a small rectangular bitmap, usually used for denoting a minimized application. that's the whole vibe. let's get into it π
β¨ NAME β¨
wxIcon β an icon is a small rectangular bitmap usually used for denoting a minimized application. short king energy, but it does SO much.
π DESCRIPTION π
so here's the tea: a wxIcon differs from a wxBitmap in that it always has a mask associated with it, for transparent drawing. periodt. π
on some platforms, icons and bitmaps are implemented identically β because there's genuinely no real distinction between a wxBitmap with a mask and an icon, and some platforms just don't have a specific icon format at all (X-based applications usually standardize on XPMs for small bitmaps and icons, iykyk). but some platforms (looking at you, Windows) DO make the distinction, so a separate class is provided. slay.
Remark: it's usually desirable to associate a pertinent icon with a frame πΌοΈ. Icons can also be used for other purposes, for example withwxTreeCtrlandwxListCtrl. Icons have different formats on different platforms, therefore separate icons will usually be created for the different environments. Platform-specific methods for creating awxIconstructure are catered for, and this is an occasion where conditional compilation will probably be required. Note that a new icon must be created every time the icon is to be used for a new window π. In Windows, the icon will not be reloaded if it has already been used. An icon allocated to a frame will be deleted when the frame is deleted. For more information please seeoverview_bitmap.
Predefined objects (include wx.hrl): ?wxNullIcon π
See:
- Overview bitmap
- Overview bitmap
wxIconBundlewxDC:drawIcon/3wxCursor
This class is derived, and can use functions, from:
wxBitmap
wxWidgets docs: wxIcon
π DATA TYPES π
wxIcon() :: wx:wx_object().
that's it. that's the type. cute, right? π¦
π«Ά FUNCTIONS π«Ά
π copyFromBitmap(This, Bmp) -> ok π
copyFromBitmap(This, Bmp) -> ok
when
This :: wxIcon(), Bmp :: wxBitmap:wxBitmap().
Copies bmp bitmap to this icon. β¨
Under MS Windows the bitmap must have mask colour set.
See: wxBitmap:loadFile/3
π destroy(This :: wxIcon()) -> ok π
Destroys the object π. it's gone. say bye.
π new() -> wxIcon() π
Default ctor.
Constructs an icon object with no data π; an assignment or another member function such as wxBitmap:loadFile/3 must be called subsequently. no cap, it's empty until you fill it in.
π new(Name) -> wxIcon() when Name :: unicode:chardata(); (Icon) -> wxIcon() when Icon :: wxIcon() π
new(Name) -> wxIcon() when Name :: unicode:chardata();
(Icon) -> wxIcon() when Icon :: wxIcon().
Copy ctor. π
π new(Name, [Option]) -> wxIcon() π
new(Name, [Option]) -> wxIcon()
when
Name :: unicode:chardata(),
Option ::
{type, wx:wx_enum()} |
{desiredWidth, integer()} |
{desiredHeight, integer()}.
Loads an icon from a file or resource. π₯
See: wxBitmap:loadFile/3
lowkey obsessed with how much power lives in such a small rectangle. go forth and icon-ify, bestie π
that's the whole page, fr fr. this one came to you from Ericsson AB, wx 2.6, docs date wxIcon(3) β mwah π
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms