fluent-tray
Fluent Design-based GUI Library for System Tray Applications
Loading...
Searching...
No Matches
fluent-tray

fluent-tray

Fluent Design-based GUI Library for System Tray Applications

Coveralls

Coverity Scan Build Status



Concept

fluent-tray provides a simple system tray icon and menu to easily create resident applications that do not require complex windows.
All you have to do is include a single header file since only the native API is used.
Currently, only Windows is supported.

Demo

Code

Simply create a FluentTray object and add a menu with .add_menu().

#include "fluent_tray.hpp"
int main()
{
using namespace fluent_tray ;
FluentTray tray{} ;
// Initialize the tray icon.
tray.create_tray("demo", "demo/assets/icon.ico") ;
// Add menus in order from the top.
tray.add_menu("Home", "demo/assets/fa-home.ico") ;
tray.add_separator() ;
tray.add_menu("Download", "demo/assets/fa-download.ico") ;
tray.add_menu("Insight", "demo/assets/fa-line-chart.ico") ;
tray.add_separator() ;
tray.add_menu("Coffee", "demo/assets/fa-coffee.ico", true) ;
tray.add_menu("Desktop", "demo/assets/fa-desktop.ico", true) ;
tray.add_separator() ;
tray.add_menu("Exit", "demo/assets/fa-sign-out.ico") ;
// Start message loop
tray.update_with_loop() ;
return 0 ;
}
Class with information on the entire tray.
Definition fluent_tray.hpp:664
bool create_tray(const std::string &app_name, const std::string &icon_path="", unsigned char opacity=255, bool round_corner=true)
Initialize tray and create icon on tray.
Definition fluent_tray.hpp:771
Fluent Design-based GUI Library for System Tray Applications.
Base namespace.

Build

You can build this demo using cmake as follows.

$ cmake -B build demo
$ cmake --build build
$ ./build/Debug/fluent-tray-demo.exe

Test

$ cmake -B build_test tests
$ cmake --build build_test
$ ctest -C Debug --test-dir build_test --output-on-failure

License

This library is provided by pit-ray under the MIT License.