wxTaskBarIcon(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– wxTaskBarIcon(3) πŸ’–

okay bestie, welcome to the Erlang Module Definition for wxTaskBarIcon β€” yes, the whole manual page, and yes, it's giving "tiny icon in your system tray that runs the whole vibe" ✨


🌸 NAME 🌸

wxTaskBarIcon β€” this class represents a taskbar icon. that's it, that's the girl πŸ’…


✨ DESCRIPTION ✨

So a taskbar icon is, like, an icon that shows up in the 'system tray' and reacts to mouse clicks, and it can optionally have a tooltip hovering above it to help hand out info. main character energy, lowkey πŸŽ€

πŸͺŸ X Window System Note πŸͺŸ

Under X Window System, the window manager must support either the "System Tray Protocol" (check it at http://freedesktop.org/wiki/Specifications/systemtray-spec) from freedesktop.org β€” and WMs used by modern desktop environments like GNOME >= 2, KDE >= 3 and XFCE >= 4 all do, periodt β€” or the older methods used in GNOME 1.2 and KDE 1 and 2.

If it doesn't support that? 😭 then the icon will just appear as a toplevel window on the user's desktop. and because not all window managers have a system tray, there's literally no guarantee that wxTaskBarIcon will work correctly under X Window System, so apps 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. no cap, fr fr πŸ™ˆ

This class is derived, and can use functions, from:

  • wxEvtHandler

wxWidgets docs: wxTaskBarIcon

🌈 Events 🌈

Event types emitted from this class:

  • taskbar_move
  • taskbar_left_down
  • taskbar_left_up
  • taskbar_right_down
  • taskbar_right_up
  • taskbar_left_dclick
  • taskbar_right_dclick

πŸ’œ DATA TYPES πŸ’œ

wxTaskBarIcon() :: wx:wx_object().

πŸ¦‹ FUNCTIONS πŸ¦‹

  • destroy(This :: wxTaskBarIcon()) -> ok. β€” destroys the object πŸ’€
  • popupMenu(This, Menu) -> boolean() with when 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 override CreatePopupMenu() (not implemented in wx) callback instead of calling this method from an event handler, because some ports (e.g. wxCocoa) may not implement popupMenu/2 and mouse click events at all. πŸ‘€ like, some ports just said "not today".
  • removeIcon(This) -> boolean() when This :: wxTaskBarIcon(). β€” removes the icon previously set with setIcon/3 🧚
  • setIcon(This, Icon, [Option]) -> boolean() with:
when
    This :: wxTaskBarIcon(),
    Icon :: wxIcon:wxIcon(),
    Option :: {tooltip, unicode:chardata()}.

Sets the icon, and optional tooltip text. slay πŸ’…βœ¨


okay that's the whole thing bestie, you ate that 🫢 shoutout to Ericsson AB for this one, it's from wx 2.6 ⭐ and yeah, that's wxTaskBarIcon(3) β€” go make an icon, it's iconic. πŸ’–πŸŒΈπŸ’œ

πŸ“¦ where this page comes from