wxTaskBarIcon(3erl)
πΈ NAME πΈ
wxTaskBarIcon(3erl) β Functions for wxTaskBarIcon class Β· Erlang module definition
Okay bestie, welcome to the wxTaskBarIcon page. It's giving tiny-icon-in-the-corner energy, and we're gonna get through every detail together. π
β¨
β¨ DESCRIPTION β¨
This class represents a taskbar icon. A taskbar icon is an icon that appears in the 'system tray' and responds to mouse clicks, optionally with a tooltip above it to help provide information. Literally a little icon living its best life in the tray. π
This class is derived (and can use functions) from: wxEvtHandler
wxWidgets docs: wxTaskBarIcon
π₯οΈ X Window System Note π₯οΈ
Under X Window System, the window manager must support either the "System Tray Protocol" (see http://freedesktop.org/wiki/Specifications/systemtray-spec) by freedesktop.org (WMs used by modern desktop environments such as GNOME >= 2, KDE >= 3 and XFCE >= 4 all do) or the older methods used in GNOME 1.2 and KDE 1 and 2.
If it doesn't, the icon will appear as a toplevel window on user's desktop. Because not all window managers have system tray, there's no guarantee that wxTaskBarIcon will work correctly under X Window System and so the applications should use it only as an optional component of their user interface. The user should be required to explicitly enable the taskbar icon on Unix, it shouldn't be on by default.
π¨ Bestie, this is a real caveat: no cap, not every window manager has a system tray, so don't make this the main character of your whole UI with no fallback. On Unix, make the user explicitly enable it β it shouldn't be default. π
π₯ EVENTS π₯
Event types emitted from this class:
taskbar_movetaskbar_left_downtaskbar_left_uptaskbar_right_downtaskbar_right_uptaskbar_left_dclicktaskbar_right_dclick
π§Έ DATA TYPES π§Έ
wxTaskBarIcon() = wx:wx_object()
π EXPORTS π
π«Ά new(Options :: [Option]) -> wxTaskBarIcon()
Types:
Option =
{iconType, wx:wx_enum()} |
{createPopupMenu, fun(() -> wxMenu:wxMenu())}
Default constructor.
The iconType is only applicable on wxOSX/Cocoa.
π₯ destroy(This :: wxTaskBarIcon()) -> ok
Destroys the wxTaskBarIcon object, removing the icon if not already removed.
π popupMenu(This, Menu) -> boolean()
Types:
This = wxTaskBarIcon()
Menu = wxMenu:wxMenu()
Pops up a menu at the current mouse position.
The events can be handled by a class derived from wxTaskBarIcon.
π Note: It is recommended to overrideCreatePopupMenu()(not implemented in wx) callback instead of calling this method from event handler, because some ports (e.g. wxCocoa) may not implementpopupMenu/2and mouse click events at all.
π¦ removeIcon(This) -> boolean()
Types:
This = wxTaskBarIcon()
Removes the icon previously set with setIcon/3.
β setIcon(This, Icon) -> boolean()
Types:
This = wxTaskBarIcon()
Icon = wxIcon:wxIcon()
π setIcon(This, Icon, Options :: [Option]) -> boolean()
Types:
This = wxTaskBarIcon()
Icon = wxIcon:wxIcon()
Option = {tooltip, unicode:chardata()}
Sets the icon, and optional tooltip text.
That's the whole page, bestie β all the taskbar-icon lore, no details dropped. π From the footer, with love: wxWidgets team., wx 2.2.2.1, and wxTaskBarIcon(3erl) β that's the source/version/page sign-off. The footer doesn't hand over a separate date here, so I'm not gonna invent one β periodt. π«ΆπΈ
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms