+
+
+
+
1278 const std::string& font_name=
"") {
+
1279 NONCLIENTMETRICSW metrics ;
+
1280 metrics.cbSize =
sizeof(metrics) ;
+
+
1282 if(!SystemParametersInfoW(
+
1283 SPI_GETNONCLIENTMETRICS,
+
1284 metrics.cbSize, &metrics, 0)) {
+
+
+
+
1288 auto& logfont = metrics.lfCaptionFont ;
+
1289 if(font_size != 0) {
+
1290 logfont.lfHeight = font_size ;
-
-
1293 auto& logfont = metrics.lfCaptionFont ;
-
1294 if(font_size != 0) {
-
1295 logfont.lfHeight = font_size ;
-
-
-
1298 logfont.lfHeight = 20 ;
-
-
1300 if(font_weight != 0) {
-
1301 logfont.lfWeight = font_weight ;
-
-
-
1304 logfont.lfWeight = FW_MEDIUM ;
-
-
-
1307 if(!font_name.empty()) {
-
1308 std::wstring font_name_wide ;
-
-
-
-
1312 auto& dst = logfont.lfFaceName ;
-
-
1314 if(font_name_wide.size() < LF_FACESIZE) {
+
+
1293 logfont.lfHeight = 20 ;
+
+
1295 if(font_weight != 0) {
+
1296 logfont.lfWeight = font_weight ;
+
+
+
1299 logfont.lfWeight = FW_MEDIUM ;
+
+
+
1302 if(!font_name.empty()) {
+
1303 std::wstring font_name_wide ;
+
+
+
+
1307 auto& dst = logfont.lfFaceName ;
+
+
1309 if(font_name_wide.size() < LF_FACESIZE) {
+
+
1311 dst, font_name_wide.c_str(), font_name_wide.length()) ;
+
1312 dst[font_name_wide.size()] = L
'\0' ;
+
+
-
1316 dst, font_name_wide.c_str(), font_name_wide.length()) ;
-
1317 dst[font_name_wide.size()] = L
'\0' ;
+
1316 dst, font_name_wide.c_str(), LF_FACESIZE - 1) ;
+
1317 dst[LF_FACESIZE - 1] = L
'\0' ;
-
-
-
1321 dst, font_name_wide.c_str(), LF_FACESIZE - 1) ;
-
1322 dst[LF_FACESIZE - 1] = L
'\0' ;
-
+
+
+
1321 auto font = CreateFontIndirectW(&logfont) ;
+
+
-
-
1326 auto font = CreateFontIndirectW(&logfont) ;
-
-
-
-
-
1331 menu_font_size_ = std::abs(logfont.lfHeight) ;
-
-
-
+
+
1326 menu_font_size_ = std::abs(logfont.lfHeight) ;
+
+
+
-
-
1344 COLORREF text_color=CLR_INVALID,
-
1345 COLORREF back_color=CLR_INVALID,
-
1346 COLORREF border_color=CLR_INVALID) {
-
1347 if(back_color != CLR_INVALID) {
-
1348 back_color_ = back_color ;
-
1349 if(!update_background_brush()) {
-
-
-
-
1353 if(text_color != CLR_INVALID) {
-
1354 text_color_ = text_color ;
-
-
1356 if(border_color != CLR_INVALID) {
-
1357 border_color_ = border_color ;
-
-
-
+
+
+
+
1339 COLORREF text_color=CLR_INVALID,
+
1340 COLORREF back_color=CLR_INVALID,
+
1341 COLORREF border_color=CLR_INVALID) {
+
1342 if(back_color != CLR_INVALID) {
+
1343 back_color_ = back_color ;
+
1344 if(!update_background_brush()) {
+
+
+
+
1348 if(text_color != CLR_INVALID) {
+
1349 text_color_ = text_color ;
+
+
1351 if(border_color != CLR_INVALID) {
+
1352 border_color_ = border_color ;
+
+
+
-
-
-
-
1367 if(icon_data_.cbSize > 0) {
-
1368 if(!Shell_NotifyIconW(NIM_DELETE, &icon_data_)) {
-
-
-
-
-
1373 ZeroMemory(&icon_data_,
sizeof(icon_data_)) ;
+
+
+
+
1362 if(icon_data_.cbSize > 0) {
+
1363 if(!Shell_NotifyIconW(NIM_DELETE, &icon_data_)) {
+
+
+
+
+
1368 ZeroMemory(&icon_data_,
sizeof(icon_data_)) ;
+
+
1370 if(icon_path.empty()) {
+
1371 icon_data_.cbSize = 0 ;
+
+
-
1375 if(icon_path.empty()) {
-
1376 icon_data_.cbSize = 0 ;
-
+
1375 std::wstring icon_path_wide ;
+
+
-
1380 std::wstring icon_path_wide ;
-
-
-
-
-
-
-
-
-
1389 icon_data_.cbSize =
sizeof(icon_data_) ;
-
1390 icon_data_.hWnd = hwnd_ ;
-
1391 icon_data_.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP ;
-
1392 icon_data_.uCallbackMessage = message_id_ ;
-
1393 icon_data_.hIcon =
static_cast<HICON
>(
-
-
1395 NULL, icon_path_wide.c_str(),
-
1396 IMAGE_ICON, 0, 0, LR_LOADFROMFILE)) ;
-
1397 wcscpy_s(icon_data_.szTip, app_name_.c_str()) ;
-
1398 icon_data_.dwState = NIS_SHAREDICON ;
-
1399 icon_data_.dwStateMask = NIS_SHAREDICON ;
+
+
+
+
+
1384 icon_data_.cbSize =
sizeof(icon_data_) ;
+
1385 icon_data_.hWnd = hwnd_ ;
+
1386 icon_data_.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP ;
+
1387 icon_data_.uCallbackMessage = message_id_ ;
+
1388 icon_data_.hIcon =
static_cast<HICON
>(
+
+
1390 NULL, icon_path_wide.c_str(),
+
1391 IMAGE_ICON, 0, 0, LR_LOADFROMFILE)) ;
+
1392 wcscpy_s(icon_data_.szTip, app_name_.c_str()) ;
+
1393 icon_data_.dwState = NIS_SHAREDICON ;
+
1394 icon_data_.dwStateMask = NIS_SHAREDICON ;
+
+
1396 if(!Shell_NotifyIconW(NIM_ADD, &icon_data_)) {
+
+
+
-
1401 if(!Shell_NotifyIconW(NIM_ADD, &icon_data_)) {
-
-
-
-
-
-
+
+
-
-
-
1410 static LRESULT CALLBACK callback(
-
-
-
-
-
1415 auto get_instance = [hwnd]() ->
FluentTray* {
-
1416 auto upper_addr = GetWindowLongW(hwnd, 0) ;
-
+
+
+
1405 static LRESULT CALLBACK callback(
+
+
+
+
+
1410 auto get_instance = [hwnd]() ->
FluentTray* {
+
1411 auto upper_addr = GetWindowLongW(hwnd, 0) ;
+
+
+
+
+
1416 auto lower_addr = GetWindowLongW(hwnd,
sizeof(LONG)) ;
+
-
1421 auto lower_addr = GetWindowLongW(hwnd,
sizeof(LONG)) ;
-
-
-
+
+
+
+
-
-
-
-
-
-
1431 if(msg == WM_DESTROY || msg == WM_QUIT || msg == WM_CLOSE) {
-
1432 if(
auto self = get_instance()) {
-
-
-
-
-
1437 else if(msg == WM_ACTIVATE && wparam == WA_INACTIVE) {
-
1438 if(
auto self = get_instance()) {
-
1439 if(!self->hide_menu_window()) {
-
-
-
-
-
-
1445 else if(msg == WM_DRAWITEM) {
-
1446 if(
auto self = get_instance()) {
-
1447 auto item =
reinterpret_cast<LPDRAWITEMSTRUCT
>(lparam) ;
-
1448 auto menu_idx = self->get_menu_index_from_window(item->hwndItem) ;
-
+
1426 if(msg == WM_DESTROY || msg == WM_QUIT || msg == WM_CLOSE) {
+
1427 if(
auto self = get_instance()) {
+
+
+
+
+
1432 else if(msg == WM_ACTIVATE && wparam == WA_INACTIVE) {
+
1433 if(
auto self = get_instance()) {
+
1434 if(!self->hide_menu_window()) {
+
+
+
+
+
+
1440 else if(msg == WM_DRAWITEM) {
+
1441 if(
auto self = get_instance()) {
+
1442 auto item =
reinterpret_cast<LPDRAWITEMSTRUCT
>(lparam) ;
+
1443 auto menu_idx = self->get_menu_index_from_window(item->hwndItem) ;
+
+
+
+
1447 auto& menu = self->menus_[menu_idx] ;
+
1448 if(!menu.draw_menu(item, self->font_)) {
+
-
1452 auto& menu = self->menus_[menu_idx] ;
-
1453 if(!menu.draw_menu(item, self->font_)) {
-
-
-
-
-
-
-
1460 else if(msg == WM_CTLCOLORBTN) {
-
1461 if(
auto self = get_instance()) {
-
1462 auto menu_idx = self->get_menu_index_from_window(
reinterpret_cast<HWND
>(lparam)) ;
-
-
1464 return DefWindowProc(hwnd, msg, wparam, lparam) ;
-
-
1466 auto& menu = self->menus_[menu_idx] ;
-
1467 return reinterpret_cast<LRESULT
>(menu.background_brush()) ;
-
-
-
1470 else if(msg == WM_COMMAND) {
-
1471 if(
auto self = get_instance()) {
-
1472 auto menu_idx = self->get_menu_index_from_id(LOWORD(wparam)) ;
-
+
+
+
+
1455 else if(msg == WM_CTLCOLORBTN) {
+
1456 if(
auto self = get_instance()) {
+
1457 auto menu_idx = self->get_menu_index_from_window(
reinterpret_cast<HWND
>(lparam)) ;
+
+
1459 return DefWindowProc(hwnd, msg, wparam, lparam) ;
+
+
1461 auto& menu = self->menus_[menu_idx] ;
+
1462 return reinterpret_cast<LRESULT
>(menu.background_brush()) ;
+
+
+
1465 else if(msg == WM_COMMAND) {
+
1466 if(
auto self = get_instance()) {
+
1467 auto menu_idx = self->get_menu_index_from_id(LOWORD(wparam)) ;
+
+
+
+
1471 auto& menu = self->menus_[menu_idx] ;
+
1472 if(!menu.process_click_event()) {
+
-
1476 auto& menu = self->menus_[menu_idx] ;
-
1477 if(!menu.process_click_event()) {
-
-
-
-
1481 if(menu.is_toggleable()) {
-
-
1483 if(!InvalidateRect(menu.window_handle(), NULL, TRUE)) {
+
1476 if(menu.is_toggleable()) {
+
+
1478 if(!InvalidateRect(menu.window_handle(), NULL, TRUE)) {
+
+
+
+
+
1483 if(!self->hide_menu_window()) {
-
-
1488 if(!self->hide_menu_window()) {
-
-
-
-
-
-
-
1495 else if(msg == message_id_) {
-
1496 if(
auto self = get_instance()) {
-
1497 if(lparam == WM_LBUTTONUP || lparam == WM_RBUTTONUP) {
-
1498 self->show_menu_window() ;
-
-
-
-
-
-
1504 return DefWindowProc(hwnd, msg, wparam, lparam) ;
-
-
-
1507 int get_menu_index_from_window(HWND hwnd) {
-
-
1509 for(
auto& m : menus_) {
-
1510 if(m.window_handle() == hwnd) {
-
-
-
-
-
-
-
-
1518 int get_menu_index_from_id(WORD
id) {
-
-
1520 for(
auto& m : menus_) {
-
1521 if(m.id() ==
static_cast<std::size_t
>(
id)) {
-
-
-
-
-
-
-
-
1529 void get_message(MSG& message) {
-
1530 if(PeekMessage(&message, hwnd_, 0, 0, PM_REMOVE)) {
-
1531 DispatchMessage(&message) ;
-
-
-
-
1535 void fail() noexcept {
-
-
-
-
1539 bool change_menu_back_color(FluentMenu& menu, COLORREF new_color) {
-
-
1541 text_color_, new_color, border_color_)) {
-
-
-
-
1545 if(!InvalidateRect(menu.window_handle(), NULL, TRUE)) {
-
-
-
-
-
-
1551 COLORREF extract_taskbar_color()
const {
-
-
-
1554 abd.cbSize =
sizeof(abd) ;
-
1555 if(!SHAppBarMessage(ABM_GETTASKBARPOS, &abd)) {
-
1556 return CLR_INVALID ;
-
-
-
1559 COLORREF color = CLR_INVALID ;
-
1560 if(
auto dc = GetDC(NULL)) {
-
-
-
-
1564 abd.rc.left + autocolorpick_offset_,
-
1565 abd.rc.top + autocolorpick_offset_) ;
-
1566 if(color == CLR_INVALID) {
-
-
1568 color = GetSysColor(COLOR_WINDOW) ;
-
-
1570 if(!ReleaseDC(NULL, dc)) {
-
1571 return CLR_INVALID ;
-
-
-
-
+
+
+
+
1490 else if(msg == message_id_) {
+
1491 if(
auto self = get_instance()) {
+
1492 if(lparam == WM_LBUTTONUP || lparam == WM_RBUTTONUP) {
+
1493 self->show_menu_window() ;
+
+
+
+
+
+
1499 return DefWindowProc(hwnd, msg, wparam, lparam) ;
+
+
+
1502 int get_menu_index_from_window(HWND hwnd) {
+
+
1504 for(
auto& m : menus_) {
+
1505 if(m.window_handle() == hwnd) {
+
+
+
+
+
+
+
+
1513 int get_menu_index_from_id(WORD
id) {
+
+
1515 for(
auto& m : menus_) {
+
1516 if(m.id() ==
static_cast<std::size_t
>(
id)) {
+
+
+
+
+
+
+
+
1524 void get_message(MSG& message) {
+
1525 if(PeekMessage(&message, hwnd_, 0, 0, PM_REMOVE)) {
+
1526 DispatchMessage(&message) ;
+
+
+
+
1530 void fail() noexcept {
+
+
+
+
1534 bool change_menu_back_color(FluentMenu& menu, COLORREF new_color) {
+
+
1536 text_color_, new_color, border_color_)) {
+
+
+
+
1540 if(!InvalidateRect(menu.window_handle(), NULL, TRUE)) {
+
+
+
+
+
+
1546 COLORREF extract_taskbar_color()
const {
+
+
+
1549 abd.cbSize =
sizeof(abd) ;
+
1550 if(!SHAppBarMessage(ABM_GETTASKBARPOS, &abd)) {
+
1551 return CLR_INVALID ;
+
+
+
1554 COLORREF color = CLR_INVALID ;
+
1555 if(
auto dc = GetDC(NULL)) {
+
+
+
+
1559 abd.rc.left + autocolorpick_offset_,
+
1560 abd.rc.top + autocolorpick_offset_) ;
+
1561 if(color == CLR_INVALID) {
+
+
1563 color = GetSysColor(COLOR_WINDOW) ;
+
+
1565 if(!ReleaseDC(NULL, dc)) {
+
1566 return CLR_INVALID ;
+
+
+
+
+
+
1572 static COLORREF calculate_faded_color_(
+
1573 COLORREF back_color,
+
1574 unsigned char color_decay=10) {
+
-
1577 static COLORREF calculate_faded_color_(
-
1578 COLORREF back_color,
-
1579 unsigned char color_decay=10) {
-
-
-
1582 unsigned char ash_value = back_gray_color ;
-
1583 if(back_gray_color < 128) {
-
1584 ash_value =
static_cast<decltype(ash_value)
>(
-
1585 (std::min)(ash_value + color_decay, 255)) ;
-
-
-
1588 ash_value =
static_cast<decltype(ash_value)
>(
-
1589 (std::max)(ash_value - color_decay, 0)) ;
-
-
1591 return RGB(ash_value, ash_value, ash_value) ;
-
-
-
1594 static COLORREF calculate_text_color_(COLORREF back_color) {
-
-
-
1597 auto text_color = GetSysColor(COLOR_WINDOWTEXT) ;
-
1598 if(back_gray_color < 128) {
-
-
1600 text_color = 0x00FFFFFF & ~text_color ;
-
-
-
-
-
1605 bool update_background_brush() {
-
-
-
1608 if(!DeleteObject(back_brush_)) {
-
-
-
-
1612 back_brush_ = CreateSolidBrush(back_color_) ;
-
1613 if(back_brush_ == NULL) {
-
-
-
-
1617 if(!SetClassLongPtr(
-
1618 hwnd_, GCLP_HBRBACKGROUND,
-
1619 reinterpret_cast<LONG_PTR
>(back_brush_))) {
-
-
-
-
-
-
+
1577 unsigned char ash_value = back_gray_color ;
+
1578 if(back_gray_color < 128) {
+
1579 ash_value =
static_cast<decltype(ash_value)
>(
+
1580 (std::min)(ash_value + color_decay, 255)) ;
+
+
+
1583 ash_value =
static_cast<decltype(ash_value)
>(
+
1584 (std::max)(ash_value - color_decay, 0)) ;
+
+
1586 return RGB(ash_value, ash_value, ash_value) ;
+
+
+
1589 static COLORREF calculate_text_color_(COLORREF back_color) {
+
+
+
1592 auto text_color = GetSysColor(COLOR_WINDOWTEXT) ;
+
1593 if(back_gray_color < 128) {
+
+
1595 text_color = 0x00FFFFFF & ~text_color ;
+
+
+
+
+
1600 bool update_background_brush() {
+
+
+
1603 if(!DeleteObject(back_brush_)) {
+
+
+
+
1607 back_brush_ = CreateSolidBrush(back_color_) ;
+
1608 if(back_brush_ == NULL) {
+
+
+
+
1612 if(!SetClassLongPtr(
+
1613 hwnd_, GCLP_HBRBACKGROUND,
+
1614 reinterpret_cast<LONG_PTR
>(back_brush_))) {
+
+
+
+
+
+
-
-
1627 unsigned int FluentTray::message_id_ ;
-
-
-
+
+
1622 unsigned int FluentTray::message_id_ ;
+
+
+
@@ -1563,35 +1558,35 @@
Class with information on the entire tray.
Definition fluent_tray.hpp:672
-
bool show_balloon_tip(const std::string &title, const std::string &message)
Shows a balloon tip that is placed in the notification area.
Definition fluent_tray.hpp:1153
-
virtual ~FluentTray() noexcept
Definition fluent_tray.hpp:750
-
bool set_color(COLORREF text_color=CLR_INVALID, COLORREF back_color=CLR_INVALID, COLORREF border_color=CLR_INVALID)
Set colors to draw menus.
Definition fluent_tray.hpp:1343
-
std::vector< FluentMenu >::iterator end() noexcept
Returns an iterator to the end of menus.
Definition fluent_tray.hpp:1212
+
bool show_balloon_tip(const std::string &title, const std::string &message)
Shows a balloon tip that is placed in the notification area.
Definition fluent_tray.hpp:1148
+
virtual ~FluentTray() noexcept
Definition fluent_tray.hpp:758
+
bool set_color(COLORREF text_color=CLR_INVALID, COLORREF back_color=CLR_INVALID, COLORREF border_color=CLR_INVALID)
Set colors to draw menus.
Definition fluent_tray.hpp:1338
+
std::vector< FluentMenu >::iterator end() noexcept
Returns an iterator to the end of menus.
Definition fluent_tray.hpp:1207
FluentTray & operator=(const FluentTray &)=delete
-
bool create_tray(const std::string &app_name, const std::string &icon_path="", LONG menu_x_margin=5, LONG menu_y_margin=5, LONG menu_x_pad=10, LONG menu_y_pad=5, unsigned char opacity=255, bool round_corner=true)
Initialize tray and create icon on tray.
Definition fluent_tray.hpp:771
-
bool show_menu_window()
Show the menu window above the tray icon.
Definition fluent_tray.hpp:1008
-
void stop() noexcept
Exit the tray successfully.
Definition fluent_tray.hpp:1196
+
bool show_menu_window()
Show the menu window above the tray icon.
Definition fluent_tray.hpp:1003
+
void stop() noexcept
Exit the tray successfully.
Definition fluent_tray.hpp:1191
FluentTray & operator=(FluentTray &&)=default
-
bool add_menu(const std::string &label_text="", const std::string &icon_path="", bool toggleable=false, const std::string &checkmark="✓", const std::function< bool(void)> &callback=[] {return true ;}, const std::function< bool(void)> &unchecked_callback=[] {return true ;})
Add a menu in order from the top.
Definition fluent_tray.hpp:900
-
bool set_font(LONG font_size=0, LONG font_weight=0, const std::string &font_name="")
Set font information to draw menus.
Definition fluent_tray.hpp:1280
-
TrayStatus status() const noexcept
Get the current status of tray.
Definition fluent_tray.hpp:1189
-
FluentTray(int message_id_offset=25, int autocolorpick_offset=5, unsigned char autofadedborder_from_backcolor=10)
Create tray object.
Definition fluent_tray.hpp:713
-
const FluentMenu & back() const
Returns the const reference to the last of menus.
Definition fluent_tray.hpp:1260
-
bool change_icon(const std::string &icon_path)
Load the image file and change the icon.
Definition fluent_tray.hpp:1366
-
std::size_t count_menus() const noexcept
Returns the number of menus.
Definition fluent_tray.hpp:1268
-
bool update_with_loop(std::chrono::milliseconds sleep_time=std::chrono::milliseconds(1))
Create a message loop to update the tray.
Definition fluent_tray.hpp:978
-
std::vector< FluentMenu >::const_iterator cbegin() const noexcept
Returns a constant iterator to the beginning of menus.
Definition fluent_tray.hpp:1220
-
std::vector< FluentMenu >::const_iterator cend() const noexcept
Returns a constant iterator to the end of menus.
Definition fluent_tray.hpp:1228
-
const FluentMenu & front() const
Returns the const reference to the beginning of menus.
Definition fluent_tray.hpp:1244
-
void add_separator()
Add a separator line under the last menu item added.
Definition fluent_tray.hpp:923
-
bool hide_menu_window()
Hide the menu window above the tray icon.
Definition fluent_tray.hpp:1139
+
bool add_menu(const std::string &label_text="", const std::string &icon_path="", bool toggleable=false, const std::string &checkmark="✓", const std::function< bool(void)> &callback=[] {return true ;}, const std::function< bool(void)> &unchecked_callback=[] {return true ;})
Add a menu in order from the top.
Definition fluent_tray.hpp:895
+
bool set_font(LONG font_size=0, LONG font_weight=0, const std::string &font_name="")
Set font information to draw menus.
Definition fluent_tray.hpp:1275
+
TrayStatus status() const noexcept
Get the current status of tray.
Definition fluent_tray.hpp:1184
+
const FluentMenu & back() const
Returns the const reference to the last of menus.
Definition fluent_tray.hpp:1255
+
bool change_icon(const std::string &icon_path)
Load the image file and change the icon.
Definition fluent_tray.hpp:1361
+
std::size_t count_menus() const noexcept
Returns the number of menus.
Definition fluent_tray.hpp:1263
+
bool update_with_loop(std::chrono::milliseconds sleep_time=std::chrono::milliseconds(1))
Create a message loop to update the tray.
Definition fluent_tray.hpp:973
+
std::vector< FluentMenu >::const_iterator cbegin() const noexcept
Returns a constant iterator to the beginning of menus.
Definition fluent_tray.hpp:1215
+
std::vector< FluentMenu >::const_iterator cend() const noexcept
Returns a constant iterator to the end of menus.
Definition fluent_tray.hpp:1223
+
const FluentMenu & front() const
Returns the const reference to the beginning of menus.
Definition fluent_tray.hpp:1239
+
void add_separator()
Add a separator line under the last menu item added.
Definition fluent_tray.hpp:918
+
bool hide_menu_window()
Hide the menu window above the tray icon.
Definition fluent_tray.hpp:1134
FluentTray(const FluentTray &)=delete
-
FluentMenu & front()
Returns the reference to the beginning of menus.
Definition fluent_tray.hpp:1236
+
FluentMenu & front()
Returns the reference to the beginning of menus.
Definition fluent_tray.hpp:1231
FluentTray(FluentTray &&)=default
-
HWND window_handle() const noexcept
Refer to the handle of menu window.
Definition fluent_tray.hpp:1000
-
std::vector< FluentMenu >::iterator begin() noexcept
Returns an iterator to the beginning of menus.
Definition fluent_tray.hpp:1204
-
bool update()
Get window message and update tray.
Definition fluent_tray.hpp:933
-
FluentMenu & back()
Returns the reference to the last of menus.
Definition fluent_tray.hpp:1252
+
HWND window_handle() const noexcept
Refer to the handle of menu window.
Definition fluent_tray.hpp:995
+
std::vector< FluentMenu >::iterator begin() noexcept
Returns an iterator to the beginning of menus.
Definition fluent_tray.hpp:1199
+
bool update()
Get window message and update tray.
Definition fluent_tray.hpp:928
+
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:775
+
FluentTray(LONG menu_x_margin=5, LONG menu_y_margin=5, LONG menu_x_pad=10, LONG menu_y_pad=5, unsigned char autofadedborder_from_backcolor=10, int autocolorpick_offset=5, int message_id_offset=25)
Create tray object.
Definition fluent_tray.hpp:717
+
FluentMenu & back()
Returns the reference to the last of menus.
Definition fluent_tray.hpp:1247
bool exists(const std::wstring &path)
Checks if the file exists.
Definition fluent_tray.hpp:223
constexpr std::size_t bit2mask(std::size_t bits) noexcept
Generates a mask with the specified number of lower bits set to 1.
Definition fluent_tray.hpp:160
bool wstring2string(const std::wstring &wstr, std::string &str)
Converts a wide string to a UTF-8 encoded string.
Definition fluent_tray.hpp:129
diff --git a/docs/functions.html b/docs/functions.html
index a2f4223..a2f0679 100644
--- a/docs/functions.html
+++ b/docs/functions.html
@@ -97,7 +97,7 @@
- c -
@@ -113,7 +113,7 @@
- e -
- f -
diff --git a/docs/functions_func.html b/docs/functions_func.html
index a766b94..b31fbdf 100644
--- a/docs/functions_func.html
+++ b/docs/functions_func.html
@@ -97,7 +97,7 @@ - c -
@@ -113,7 +113,7 @@ - e -