Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::SystemTrayIcon Class Reference

System tray icon (macOS NSStatusItem, Windows Shell_NotifyIcon). More...

#include <code_editor.hpp>

Public Member Functions

 SystemTrayIcon ()=default
 ~SystemTrayIcon ()
void set_icon (std::string_view icon_path)
 Set the tray icon image (path to PNG or system icon name).
void set_tooltip (std::string_view text)
 Set the tooltip text.
void show ()
 Show the tray icon.
void hide ()
 Hide the tray icon.

Public Attributes

std::function< void()> on_click
 Called when the icon is clicked.
std::function< void()> on_right_click
 Called when the icon is right-clicked (for context menu).

Detailed Description

System tray icon (macOS NSStatusItem, Windows Shell_NotifyIcon).

Constructor & Destructor Documentation

◆ SystemTrayIcon()

pulp::view::SystemTrayIcon::SystemTrayIcon ( )
default

◆ ~SystemTrayIcon()

pulp::view::SystemTrayIcon::~SystemTrayIcon ( )

Member Function Documentation

◆ hide()

void pulp::view::SystemTrayIcon::hide ( )

Hide the tray icon.

◆ set_icon()

void pulp::view::SystemTrayIcon::set_icon ( std::string_view icon_path)

Set the tray icon image (path to PNG or system icon name).

◆ set_tooltip()

void pulp::view::SystemTrayIcon::set_tooltip ( std::string_view text)

Set the tooltip text.

◆ show()

void pulp::view::SystemTrayIcon::show ( )

Show the tray icon.

Member Data Documentation

◆ on_click

std::function<void()> pulp::view::SystemTrayIcon::on_click

Called when the icon is clicked.

◆ on_right_click

std::function<void()> pulp::view::SystemTrayIcon::on_right_click

Called when the icon is right-clicked (for context menu).


The documentation for this class was generated from the following file: