ReactOS  0.4.12-dev-75-g00dd17e
NotifyArea Struct Reference

tray notification area aka "tray" More...

#include <traynotify.h>

Inheritance diagram for NotifyArea:
Collaboration diagram for NotifyArea:

Public Types

typedef Window super
 
- Public Types inherited from Window
typedef map< HWND, Window * > WindowMap
 
typedef Window *(* CREATORFUNC) (HWND)
 
typedef Window *(* CREATORFUNC_INFO) (HWND, const void *)
 

Public Member Functions

 NotifyArea (HWND hwnd)
 
 ~NotifyArea ()
 
LRESULT ProcessTrayNotification (int notify_code, NOTIFYICONDATA *pnid)
 
- Public Member Functions inherited from Window
 Window (HWND hwnd)
 
virtual ~Window ()
 
LRESULT SendParent (UINT nmsg, WPARAM wparam=0, LPARAM lparam=0)
 
LRESULT PostParent (UINT nmsg, WPARAM wparam=0, LPARAM lparam=0)
 

Static Public Member Functions

static HWND Create (HWND hwndParent)
 
- Static Public Member Functions inherited from Window
static HWND Create (CREATORFUNC creator, DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int w, int h, HWND hwndParent=0, HMENU hMenu=0)
 
static HWND Create (CREATORFUNC_INFO creator, const void *info, DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int w, int h, HWND hwndParent=0, HMENU hMenu=0)
 
static Windowcreate_mdi_child (const ChildWndInfo &info, const MDICREATESTRUCT &mcs, CREATORFUNC_INFO creator)
 
static LRESULT CALLBACK WindowWndProc (HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
 
static INT_PTR CALLBACK DialogProc (HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
 
static Windowget_window (HWND hwnd)
 get window controller from window handle More...
 
template<typename CLASS >
static CLASS * get_window (HWND hwnd)
 
static void register_pretranslate (HWND hwnd)
 
static void unregister_pretranslate (HWND hwnd)
 
static BOOL pretranslate_msg (LPMSG pmsg)
 
static void register_dialog (HWND hwnd)
 
static void unregister_dialog (HWND hwnd)
 
static BOOL dispatch_dialog_msg (LPMSG pmsg)
 
static int MessageLoop ()
 
static void CancelModes ()
 

Protected Member Functions

LRESULT Init (LPCREATESTRUCT pcs)
 
LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
 
int Command (int id, int code)
 
int Notify (int id, NMHDR *pnmh)
 
void UpdateIcons ()
 
void Paint ()
 
void Refresh (bool do_refresh=false)
 
void CancelModes ()
 
NotifyIconSet::iterator IconHitTest (const POINT &pos)
 search for a icon at a given client coordinate position More...
 
bool DetermineHideState (NotifyInfo &entry)
 
void read_config ()
 
void write_config ()
 
void show_clock (bool flag)
 

Protected Attributes

WindowHandle _hwndClock
 
int _clock_width
 
ToolTip _tooltip
 
NotifyHook _hook
 
bool _show_hidden
 
bool _hide_inactive
 
bool _show_button
 
NotifyIconCfgList _cfg
 
map< HWND, String_window_modules
 
NotifyIconMap _icon_map
 
NotifyIconSet _sorted_icons
 
int _next_idx
 
size_t _last_icon_count
 

Friends

struct TrayNotifyDlg
 

Additional Inherited Members

- Public Attributes inherited from Window
IAccessible IAccessible_iface
 
IOleWindow IOleWindow_iface
 
IEnumVARIANT IEnumVARIANT_iface
 
LONG ref
 
- Static Protected Member Functions inherited from Window
static Windowcreate_controller (HWND hwnd)
 create controller for a new window More...
 
static StaticWindowDataGetStaticWindowData ()
 
static LRESULT CALLBACK MDICBTHookProc (int code, WPARAM wparam, LPARAM lparam)
 
static LRESULT CALLBACK PropSheetCBTHookProc (int code, WPARAM wparam, LPARAM lparam)
 
- Static Protected Attributes inherited from Window
static WindowMap s_wnd_map
 
static const voids_new_info = NULL
 
static CREATORFUNC s_window_creator = NULL
 
static HHOOK s_hcbtHook = 0
 
static WindowSet s_pretranslate_windows
 
static WindowSet s_dialogs
 

Detailed Description

tray notification area aka "tray"

Definition at line 130 of file traynotify.h.

Member Typedef Documentation

◆ super

Definition at line 132 of file traynotify.h.

Constructor & Destructor Documentation

◆ NotifyArea()

NotifyArea::NotifyArea ( HWND  hwnd)

Definition at line 204 of file traynotify.cpp.

205  : super(hwnd),
206  _tooltip(hwnd)
207 {
208  _next_idx = 0;
209  _clock_width = 0;
210  _last_icon_count = 0;
211  _show_hidden = false;
212  _hide_inactive = true;
213  _show_button = true;
214 }
ToolTip _tooltip
Definition: traynotify.h:145
int _clock_width
Definition: traynotify.h:143
bool _show_button
Definition: traynotify.h:150
Window super
Definition: traynotify.h:132
bool _show_hidden
Definition: traynotify.h:148
size_t _last_icon_count
Definition: traynotify.h:177
int _next_idx
Definition: traynotify.h:176
bool _hide_inactive
Definition: traynotify.h:149

◆ ~NotifyArea()

NotifyArea::~NotifyArea ( )

Definition at line 216 of file traynotify.cpp.

217 {
218  KillTimer(_hwnd, 0);
219 
220  write_config();
221 }
void write_config()
Definition: traynotify.cpp:294
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)

Member Function Documentation

◆ CancelModes()

void NotifyArea::CancelModes ( )
protected

Definition at line 572 of file traynotify.cpp.

Referenced by WndProc().

573 {
575 
577  PostMessage(it->_hWnd, WM_CANCELMODE, 0, 0);
578 }
NotifyIconSet _sorted_icons
Definition: traynotify.h:175
#define PostMessage
Definition: winuser.h:5698
#define WM_CANCELMODE
Definition: winuser.h:1617
iterator begin()
Definition: _set.h:151
iterator end()
Definition: _set.h:152
_Rep_type::const_iterator const_iterator
Definition: _set.h:74
#define HWND_BROADCAST
Definition: winuser.h:1190

◆ Command()

int NotifyArea::Command ( int  id,
int  code 
)
protectedvirtual

Reimplemented from Window.

Definition at line 511 of file traynotify.cpp.

512 {
513  switch(id) {
516  UpdateIcons();
517  break;
518 
519  case ID_SHOW_ICON_BUTTON:
521  UpdateIcons();
522  break;
523 
526  break;
527 
528  case ID_CONFIG_TIME:
529  launch_cpanel(_hwnd, TEXT("timedate.cpl"));
530  break;
531 
532  default:
534  }
535 
536  return 0;
537 }
#define ID_CONFIG_TIME
Definition: resource.h:219
#define WINDOW_CREATOR(WND_CLASS)
Definition: window.h:202
#define ID_SHOW_HIDDEN_ICONS
Definition: resource.h:217
bool _show_button
Definition: traynotify.h:150
void UpdateIcons()
Definition: traynotify.cpp:646
#define ID_CONFIG_NOTIFYAREA
Definition: resource.h:218
#define IDD_NOTIFYAREA
Definition: resource.h:103
bool _show_hidden
Definition: traynotify.h:148
BOOL launch_cpanel(HWND hwnd, LPCTSTR applet)
Definition: utility.cpp:383
#define MAKELONG(a, b)
Definition: typedefs.h:248
#define WM_COMMAND
Definition: winuser.h:1716
HWND WINAPI GetParent(_In_ HWND)
#define TEXT(s)
Definition: k32.h:26
static int DoModal(UINT nid, CREATORFUNC creator, HWND hwndParent=0)
Definition: window.cpp:701
LRESULT SendParent(UINT nmsg, WPARAM wparam=0, LPARAM lparam=0)
Definition: window.cpp:657
#define ID_SHOW_ICON_BUTTON
Definition: resource.h:223
configuration dialog for notification icons
Definition: traynotify.h:198

◆ Create()

HWND NotifyArea::Create ( HWND  hwndParent)
static

Definition at line 367 of file traynotify.cpp.

Referenced by DesktopBar::Init().

368 {
369  static BtnWindowClass wcTrayNotify(CLASSNAME_TRAYNOTIFY, CS_DBLCLKS);
370 
371  ClientRect clnt(hwndParent);
372 
375  clnt.right-(NOTIFYAREA_WIDTH_DEF+1), 1, NOTIFYAREA_WIDTH_DEF, clnt.bottom-2, hwndParent);
376 }
#define WINDOW_CREATOR(WND_CLASS)
Definition: window.h:202
#define WS_CHILD
Definition: pedump.c:617
#define WS_CLIPCHILDREN
Definition: pedump.c:619
static HWND Create(CREATORFUNC creator, DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int w, int h, HWND hwndParent=0, HMENU hMenu=0)
Definition: window.cpp:87
window class with gray background color
Definition: window.h:248
tray notification area aka "tray"
Definition: traynotify.h:130
#define CS_DBLCLKS
Definition: winuser.h:646
#define TITLE_TRAYNOTIFY
Definition: traynotify.h:30
#define CLASSNAME_TRAYNOTIFY
Definition: traynotify.h:29
#define NOTIFYAREA_WIDTH_DEF
Definition: traynotify.h:34
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_EX_STATICEDGE
Definition: winuser.h:403

◆ DetermineHideState()

bool NotifyArea::DetermineHideState ( NotifyInfo entry)
protected

Definition at line 837 of file traynotify.cpp.

Referenced by ProcessTrayNotification(), and Refresh().

838 {
839  if (entry._modulePath.empty()) {
840  const String& modulePath = _window_modules[entry._hWnd];
841 
842  // request module path for new windows (We will get an asynchronous answer by a WM_COPYDATA message.)
843  if (!modulePath.empty())
844  entry._modulePath = modulePath;
845  else
846  _hook.GetModulePath(entry._hWnd, _hwnd);
847  }
848 
849  for(NotifyIconCfgList::const_iterator it=_cfg.begin(); it!=_cfg.end(); ++it) {
850  const NotifyIconConfig& cfg = *it;
851 
852  if (cfg.match(entry)) {
853  entry._mode = cfg._mode;
854  return true;
855  }
856  }
857 
858  return false;
859 }
iterator begin()
Definition: _list.h:367
bool match(const NotifyIconConfig &props) const
Definition: traynotify.cpp:820
NOTIFYICONMODE _mode
Definition: traynotify.h:83
void GetModulePath(HWND hwnd, HWND hwndCallback)
Definition: traynotify.cpp:45
static WCHAR String[]
Definition: stringtable.c:55
NotifyIconCfgList _cfg
Definition: traynotify.h:170
configuration for the display mode of a notification icon
Definition: traynotify.h:71
map< HWND, String > _window_modules
Definition: traynotify.h:172
_STLP_PRIV _List_iterator< NotifyIconConfig, _Const_traits< NotifyIconConfig > > const_iterator
Definition: _list.h:276
iterator end()
Definition: _list.h:370
String _modulePath
Definition: traynotify.h:81
NotifyHook _hook
Definition: traynotify.h:146

◆ IconHitTest()

NotifyIconSet::iterator NotifyArea::IconHitTest ( const POINT pos)
protected

search for a icon at a given client coordinate position

Definition at line 789 of file traynotify.cpp.

Referenced by Notify(), and WndProc().

790 {
791  if (pos.y<NOTIFYICON_Y || pos.y>=NOTIFYICON_Y+NOTIFYICON_SIZE)
792  return _sorted_icons.end();
793 
795 
796  int x = NOTIFYICON_X;
797 
798  if (_show_button)
799  x += NOTIFYICON_DIST;
800 
801  for(; it!=_sorted_icons.end(); ++it) {
802  //NotifyInfo& entry = const_cast<NotifyInfo&>(*it); // Why does GCC 3.3 need this additional const_cast ?!
803 
804  if (pos.x>=x && pos.x<x+NOTIFYICON_SIZE)
805  break;
806 
807  x += NOTIFYICON_DIST;
808  }
809 
810  return it;
811 }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
bool _show_button
Definition: traynotify.h:150
NotifyIconSet _sorted_icons
Definition: traynotify.h:175
#define NOTIFYICON_Y
Definition: traynotify.h:39
_Rep_type::iterator iterator
Definition: _set.h:73
#define NOTIFYICON_SIZE
Definition: traynotify.h:37
#define NOTIFYICON_DIST
Definition: traynotify.h:35
iterator begin()
Definition: _set.h:151
INT x
Definition: msvc.h:62
#define NOTIFYICON_X
Definition: traynotify.h:38
iterator end()
Definition: _set.h:152

◆ Init()

LRESULT NotifyArea::Init ( LPCREATESTRUCT  pcs)
protectedvirtual

Reimplemented from Window.

Definition at line 355 of file traynotify.cpp.

356 {
357  if (super::Init(pcs))
358  return 1;
359 
360  read_config();
361 
362  SetTimer(_hwnd, 0, 1000, NULL);
363 
364  return 0;
365 }
virtual LRESULT Init(LPCREATESTRUCT pcs)
Definition: window.cpp:241
void read_config()
Definition: traynotify.cpp:243
smooth NULL
Definition: ftsmooth.c:416
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)

◆ Notify()

int NotifyArea::Notify ( int  id,
NMHDR pnmh 
)
protectedvirtual

Reimplemented from Window.

Definition at line 539 of file traynotify.cpp.

540 {
541  if (pnmh->code == TTN_GETDISPINFO) {
543 
545  ScreenToClient(_hwnd, &pt);
546 
547  if (_show_button &&
550  {
551  static ResString sShowIcons(IDS_SHOW_HIDDEN_ICONS);
552  static ResString sHideIcons(IDS_HIDE_ICONS);
553 
554  pdi->lpszText = (_show_hidden? sHideIcons: sShowIcons).str();
555  } else {
557 
558  if (found != _sorted_icons.end()) {
559  NotifyInfo& entry = const_cast<NotifyInfo&>(*found); // Why does GCC 3.3 need this additional const_cast ?!
560 
561  // enable multiline tooltips (break at CR/LF and for very long one-line strings)
562  SendMessage(pnmh->hwndFrom, TTM_SETMAXTIPWIDTH, 0, 400);
563 
564  pdi->lpszText = entry._tipText.str();
565  }
566  }
567  }
568 
569  return 0;
570 }
#define IDS_SHOW_HIDDEN_ICONS
Definition: resource.h:47
bool _show_button
Definition: traynotify.h:150
#define pt(x, y)
Definition: drawing.c:79
uint8_t entry
Definition: isohybrid.c:63
#define IDS_HIDE_ICONS
Definition: resource.h:48
DWORD WINAPI GetMessagePos(void)
Definition: message.c:1326
bool _show_hidden
Definition: traynotify.h:148
NotifyIconSet::iterator IconHitTest(const POINT &pos)
search for a icon at a given client coordinate position
Definition: traynotify.cpp:789
UINT code
Definition: winuser.h:3112
NotifyIconSet _sorted_icons
Definition: traynotify.h:175
#define TTN_GETDISPINFO
Definition: commctrl.h:1848
const WCHAR * str
#define NOTIFYICON_Y
Definition: traynotify.h:39
_Rep_type::iterator iterator
Definition: _set.h:73
#define NOTIFYICON_SIZE
Definition: traynotify.h:37
#define TTM_SETMAXTIPWIDTH
Definition: commctrl.h:1789
structure for maintaining informations about one notification icon
Definition: traynotify.h:93
HWND hwndFrom
Definition: winuser.h:3110
#define NOTIFYICON_X
Definition: traynotify.h:38
#define LPNMTTDISPINFO
Definition: commctrl.h:1885
#define SendMessage
Definition: winuser.h:5709
iterator end()
Definition: _set.h:152
convenient loading of string resources
Definition: globals.h:303
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO * pdi
Definition: winddi.h:3553

◆ Paint()

void NotifyArea::Paint ( )
protected

Definition at line 697 of file traynotify.cpp.

Referenced by WndProc().

698 {
699  BufferedPaintCanvas canvas(_hwnd);
700 
701  // first fill with the background color
702  FillRect(canvas, &canvas.rcPaint, GetSysColorBrush(COLOR_BTNFACE));
703 
704  // draw icons
705  int x = NOTIFYICON_X;
706  int y = NOTIFYICON_Y;
707 
708  if (_show_button) {
709  static SmallIcon leftArrowIcon(IDI_NOTIFY_L);
710  static SmallIcon rightArrowIcon(IDI_NOTIFY_R);
711 
712  DrawIconEx(canvas, x, y, _show_hidden?rightArrowIcon:leftArrowIcon, NOTIFYICON_SIZE, NOTIFYICON_SIZE, 0, 0, DI_NORMAL);
713  x += NOTIFYICON_DIST;
714  }
715 
716 #ifndef _NO_ALPHABLEND
717  MemCanvas mem_dc;
718  SelectedBitmap bmp(mem_dc, CreateCompatibleBitmap(canvas, NOTIFYICON_SIZE, NOTIFYICON_SIZE));
720  BLENDFUNCTION blend = {AC_SRC_OVER, 0, 128, 0}; // 50 % visible
721 #endif
722 
724 #ifndef _NO_ALPHABLEND
725  if (it->_dwState & NIS_HIDDEN) {
726  FillRect(mem_dc, &rect, GetSysColorBrush(COLOR_BTNFACE));
727  DrawIconEx(mem_dc, 0, 0, it->_hIcon, NOTIFYICON_SIZE, NOTIFYICON_SIZE, 0, 0, DI_NORMAL);
728  AlphaBlend(canvas, x, y, NOTIFYICON_SIZE, NOTIFYICON_SIZE, mem_dc, 0, 0, NOTIFYICON_SIZE, NOTIFYICON_SIZE, blend);
729  } else
730 #endif
731  DrawIconEx(canvas, x, y, it->_hIcon, NOTIFYICON_SIZE, NOTIFYICON_SIZE, 0, 0, DI_NORMAL);
732 
733  x += NOTIFYICON_DIST;
734  }
735 }
bool _show_button
Definition: traynotify.h:150
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
#define IDI_NOTIFY_L
Definition: resource.h:120
& rect
Definition: startmenu.cpp:1413
bool _show_hidden
Definition: traynotify.h:148
INT INT y
Definition: msvc.h:62
#define IDI_NOTIFY_R
Definition: resource.h:121
NotifyIconSet _sorted_icons
Definition: traynotify.h:175
#define NOTIFYICON_Y
Definition: traynotify.h:39
convenient loading of small (16x16) icon resources
Definition: globals.h:320
BOOL WINAPI DrawIconEx(_In_ HDC, _In_ int, _In_ int, _In_ HICON, _In_ int, _In_ int, _In_ UINT, _In_opt_ HBRUSH, _In_ UINT)
Definition: cursoricon.c:1997
#define NOTIFYICON_SIZE
Definition: traynotify.h:37
BITMAP bmp
Definition: alphablend.c:62
#define NOTIFYICON_DIST
Definition: traynotify.h:35
#define AC_SRC_OVER
Definition: wingdi.h:1350
#define COLOR_BTNFACE
Definition: winuser.h:918
#define DI_NORMAL
Definition: wingdi.h:72
iterator begin()
Definition: _set.h:151
INT x
Definition: msvc.h:62
#define NOTIFYICON_X
Definition: traynotify.h:38
#define AlphaBlend
Definition: misc.c:293
iterator end()
Definition: _set.h:152
_Rep_type::const_iterator const_iterator
Definition: _set.h:74
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI GetSysColorBrush(_In_ int)

◆ ProcessTrayNotification()

LRESULT NotifyArea::ProcessTrayNotification ( int  notify_code,
NOTIFYICONDATA pnid 
)
Todo:
This is a fix for Windows Task Manager.
Todo:
call only if really changes occurred

Definition at line 580 of file traynotify.cpp.

581 {
582  switch(notify_code) {
583  case NIM_ADD:
584  case NIM_MODIFY:
585  if ((int)pnid->uID >= 0) {
586  NotifyInfo& entry = _icon_map[pnid];
587 
588  // a new entry?
589  if (entry._idx == -1)
590  entry._idx = ++_next_idx;
591  /* equivalent code using iterator::find();
592  NotifyIconMap::iterator found = _icon_map.find(pnid);
593  NotifyInfo* pentry;
594  // a new entry?
595  if (found == _icon_map.end()) {
596  pentry = &_icon_map[pnid];
597  pentry->_idx = ++_next_idx;
598  } else {
599  pentry = &found->second;
600  }
601  NotifyInfo& entry = *pentry;
602  */
603  bool changes = entry.modify(pnid);
604 
605  if (DetermineHideState(entry) && entry._mode==NIM_HIDE) {
606  entry._dwState |= NIS_HIDDEN;
607  changes = true;
608  }
609 
610  if (changes)
611  UpdateIcons();
612 
613  return TRUE;
614  }
615  break;
616 
617  case NIM_DELETE: {
618  NotifyIconMap::iterator found = _icon_map.find(pnid);
619 
620  if (found != _icon_map.end()) {
621  if (found->second._hIcon)
622  DestroyIcon(found->second._hIcon);
623  _icon_map.erase(found);
624  UpdateIcons();
625  return TRUE;
626  }
627  break;}
628 
629  case NIM_SETFOCUS:
630  SetForegroundWindow(_hwnd);
631  return TRUE;
632 
633  case NIM_SETVERSION:
634  NotifyIconMap::iterator found = _icon_map.find(pnid);
635 
636  if (found != _icon_map.end()) {
637  found->second._version = pnid->UNION_MEMBER(uVersion);
638  return TRUE;
639  } else
640  return FALSE;
641  }
642 
643  return FALSE;
644 }
DWORD _dwState
Definition: traynotify.h:105
#define TRUE
Definition: types.h:120
static CHANGE * changes
Definition: io.c:49
NOTIFYICONMODE _mode
Definition: traynotify.h:83
void UpdateIcons()
Definition: traynotify.cpp:646
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
uint8_t entry
Definition: isohybrid.c:63
NotifyIconMap _icon_map
Definition: traynotify.h:174
int _next_idx
Definition: traynotify.h:176
void erase(iterator __pos)
Definition: _map.h:203
structure for maintaining informations about one notification icon
Definition: traynotify.h:93
#define NIM_DELETE
Definition: shellapi.h:93
_STLP_TEMPLATE_FOR_CONT_EXT iterator find(const _KT &__x)
Definition: _map.h:210
bool modify(NOTIFYICONDATA *pnid)
Definition: traynotify.cpp:104
bool DetermineHideState(NotifyInfo &entry)
Definition: traynotify.cpp:837
#define NIM_ADD
Definition: shellapi.h:91
BOOL WINAPI SetForegroundWindow(_In_ HWND)
#define NIM_MODIFY
Definition: shellapi.h:92
_Rep_type::iterator iterator
Definition: _map.h:85
iterator end()
Definition: _map.h:165

◆ read_config()

void NotifyArea::read_config ( )
protected
Todo:
read default setting from registry
Todo:
read default setting from registry

Definition at line 243 of file traynotify.cpp.

Referenced by Init(), and WndProc().

244 {
245  bool clock_visible = true;
246 
247  // read notification icon settings from XML configuration
248  XMLPos cfg_pos = g_Globals.get_cfg();
249 
250  if (!g_Globals._SHRestricted || !SHRestricted(REST_HIDECLOCK))
251  {
252  if (cfg_pos.go_down("desktopbar")) {
253  clock_visible = XMLBoolRef(XMLPos(cfg_pos,"options"), "show-clock", !get_hide_clock_from_registry());
254  cfg_pos.back();
255  }
256  }
257 
258  if (cfg_pos.go_down("notify-icons")) {
259  XMLPos options(cfg_pos, "options");
260 
261  _hide_inactive = XMLBool(options, "hide-inactive", true);
262  _show_hidden = XMLBool(options, "show-hidden", false);
263  _show_button = XMLBool(options, "show-button", true);
264 
265  XMLChildrenFilter icons(cfg_pos, "icon");
266 
267  for(XMLChildrenFilter::iterator it=icons.begin(); it!=icons.end(); ++it) {
268  const XMLNode& node = **it;
269 
270  NotifyIconConfig cfg;
271 
272  cfg._name = node.get("name").c_str();
273  cfg._tipText = node.get("text").c_str();
274  cfg._windowTitle = node.get("window").c_str();
275  cfg._modulePath = node.get("module").c_str();
276  const string& mode = node.get("show");
277 
278  if (mode == "show")
279  cfg._mode = NIM_SHOW;
280  else if (mode == "hide")
281  cfg._mode = NIM_HIDE;
282  else //if (mode == "auto")
283  cfg._mode = NIM_HIDE;
284 
285  _cfg.push_back(cfg);
286  }
287 
288  cfg_pos.back();
289  }
290 
291  show_clock(clock_visible);
292 }
void push_back(const_reference __x)
Definition: _list.h:509
Definition: graphics.c:170
NOTIFYICONMODE _mode
Definition: traynotify.h:83
bool _show_button
Definition: traynotify.h:150
NotifyIconCfgList _cfg
Definition: traynotify.h:170
void show_clock(bool flag)
Definition: traynotify.cpp:332
bool _show_hidden
Definition: traynotify.h:148
configuration for the display mode of a notification icon
Definition: traynotify.h:71
int options
Definition: main.c:106
String _windowTitle
Definition: traynotify.h:80
static bool get_hide_clock_from_registry()
Definition: traynotify.cpp:223
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
bool _hide_inactive
Definition: traynotify.h:149
XMLPos get_cfg()
Definition: explorer.cpp:119
String _modulePath
Definition: traynotify.h:81
DWORD WINAPI SHRestricted(RESTRICTIONS policy)
Definition: shpolicy.c:825

◆ Refresh()

void NotifyArea::Refresh ( bool  do_refresh = false)
protected

Definition at line 737 of file traynotify.cpp.

Referenced by WndProc().

738 {
739  // Look for task icons without valid owner window.
740  // This is an extended feature missing in MS Windows.
742  const NotifyInfo& entry = *it;
743 
744  if (!IsWindow(entry._hWnd))
745  if (_icon_map.erase(entry)) // delete icons without valid owner window
746  ++update;
747  }
748 
749  DWORD now = GetTickCount();
750 
751  // handle icon hiding
752  for(NotifyIconMap::iterator it=_icon_map.begin(); it!=_icon_map.end(); ++it) {
753  NotifyInfo& entry = it->second;
754 
755  DetermineHideState(entry);
756 
757  switch(entry._mode) {
758  case NIM_HIDE:
759  if (!(entry._dwState & NIS_HIDDEN)) {
760  entry._dwState |= NIS_HIDDEN;
761  ++update;
762  }
763  break;
764 
765  case NIM_SHOW:
766  if (entry._dwState&NIS_HIDDEN) {
767  entry._dwState &= ~NIS_HIDDEN;
768  ++update;
769  }
770  break;
771 
772  case NIM_AUTO:
773  // automatically hide icons after long periods of inactivity
774  if (_hide_inactive)
775  if (!(entry._dwState & NIS_HIDDEN))
776  if (now-entry._lastChange > ICON_AUTOHIDE_SECONDS*1000) {
777  entry._dwState |= NIS_HIDDEN;
778  ++update;
779  }
780  break;
781  }
782  }
783 
784  if (update)
785  UpdateIcons();
786 }
DWORD _dwState
Definition: traynotify.h:105
BOOL WINAPI IsWindow(_In_opt_ HWND)
NOTIFYICONMODE _mode
Definition: traynotify.h:83
void UpdateIcons()
Definition: traynotify.cpp:646
uint8_t entry
Definition: isohybrid.c:63
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:445
NotifyIconMap _icon_map
Definition: traynotify.h:174
time_t now
Definition: finger.c:65
DWORD _lastChange
Definition: traynotify.h:109
NotifyIconSet _sorted_icons
Definition: traynotify.h:175
void erase(iterator __pos)
Definition: _map.h:203
#define ICON_AUTOHIDE_SECONDS
Definition: traynotify.h:41
unsigned long DWORD
Definition: ntddk_ex.h:95
structure for maintaining informations about one notification icon
Definition: traynotify.h:93
iterator begin()
Definition: _set.h:151
bool DetermineHideState(NotifyInfo &entry)
Definition: traynotify.cpp:837
bool _hide_inactive
Definition: traynotify.h:149
iterator end()
Definition: _set.h:152
_Rep_type::const_iterator const_iterator
Definition: _set.h:74
iterator begin()
Definition: _map.h:163
_Rep_type::iterator iterator
Definition: _map.h:85
iterator end()
Definition: _map.h:165

◆ show_clock()

void NotifyArea::show_clock ( bool  flag)
protected

Definition at line 332 of file traynotify.cpp.

Referenced by read_config().

333 {
334  bool vis = _hwndClock!=0;
335 
336  if (vis != flag) {
337  if (flag) {
338  // create clock window
340 
341  if (_hwndClock) {
342  ClientRect clock_size(_hwndClock);
343  _clock_width = clock_size.right;
344  }
345  } else {
347  _hwndClock = 0;
348  _clock_width = 0;
349  }
350 
352  }
353 }
int _clock_width
Definition: traynotify.h:143
WindowHandle _hwndClock
Definition: traynotify.h:142
BOOL WINAPI DestroyWindow(_In_ HWND)
static HWND Create(HWND hwndParent)
#define PM_RESIZE_CHILDREN
Definition: explorer.h:66
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean flag
Definition: glfuncs.h:72
HWND WINAPI GetParent(_In_ HWND)
#define SendMessage
Definition: winuser.h:5709

◆ UpdateIcons()

void NotifyArea::UpdateIcons ( )
protected

Definition at line 646 of file traynotify.cpp.

Referenced by Command(), ProcessTrayNotification(), Refresh(), and WndProc().

647 {
649 
650  // sort icon infos by display index
652  const NotifyInfo& entry = it->second;
653 
654  if (_show_hidden || !(entry._dwState & NIS_HIDDEN))
655  _sorted_icons.insert(entry);
656  }
657 
658  // sync tooltip areas to current icon number
660  RECT rect = {NOTIFYICON_X, NOTIFYICON_Y, NOTIFYICON_X+NOTIFYICON_SIZE, NOTIFYICON_Y+NOTIFYICON_SIZE};
661 
662  size_t tt_idx = 0;
663 
664  if (_show_button) {
665  _tooltip.add(_hwnd, tt_idx++, rect);
666 
667  rect.left += NOTIFYICON_DIST;
668  rect.right += NOTIFYICON_DIST;
669  }
670 
671  size_t icon_cnt = _sorted_icons.size();
672  while(tt_idx < icon_cnt) {
673  _tooltip.add(_hwnd, tt_idx++, rect);
674 
675  rect.left += NOTIFYICON_DIST;
676  rect.right += NOTIFYICON_DIST;
677  }
678 
679  while(tt_idx < _last_icon_count)
680  _tooltip.remove(_hwnd, tt_idx++);
681 
683  }
684 
686 
687  InvalidateRect(_hwnd, NULL, FALSE); // refresh icon display
688  UpdateWindow(_hwnd);
689 }
DWORD _dwState
Definition: traynotify.h:105
ToolTip _tooltip
Definition: traynotify.h:145
bool _show_button
Definition: traynotify.h:150
uint8_t entry
Definition: isohybrid.c:63
BOOL WINAPI UpdateWindow(_In_ HWND)
NotifyIconMap _icon_map
Definition: traynotify.h:174
LONG left
Definition: windef.h:296
LONG right
Definition: windef.h:298
_Rep_type::const_iterator const_iterator
Definition: _map.h:86
& rect
Definition: startmenu.cpp:1413
bool _show_hidden
Definition: traynotify.h:148
void clear()
Definition: _set.h:185
size_t _last_icon_count
Definition: traynotify.h:177
NotifyIconSet _sorted_icons
Definition: traynotify.h:175
smooth NULL
Definition: ftsmooth.c:416
#define NOTIFYICON_Y
Definition: traynotify.h:39
pair< iterator, bool > insert(const value_type &__x)
Definition: _set.h:168
void remove(HWND hparent, HWND htool)
Definition: window.h:893
#define PM_RESIZE_CHILDREN
Definition: explorer.h:66
#define NOTIFYICON_SIZE
Definition: traynotify.h:37
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
structure for maintaining informations about one notification icon
Definition: traynotify.h:93
#define NOTIFYICON_DIST
Definition: traynotify.h:35
void add(HWND hparent, HWND htool, LPCTSTR txt=LPSTR_TEXTCALLBACK, LPARAM lparam=0)
Definition: window.h:861
size_type size() const
Definition: _set.h:160
HWND WINAPI GetParent(_In_ HWND)
#define NOTIFYICON_X
Definition: traynotify.h:38
#define SendMessage
Definition: winuser.h:5709
iterator begin()
Definition: _map.h:163
iterator end()
Definition: _map.h:165

◆ WndProc()

LRESULT NotifyArea::WndProc ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
)
protectedvirtual

Reimplemented from Window.

Definition at line 378 of file traynotify.cpp.

379 {
380  switch(nmsg) {
381  case WM_PAINT:
382  Paint();
383  break;
384 
385  case WM_TIMER: {
386  Refresh();
387 
388  ClockWindow* clock_window = GET_WINDOW(ClockWindow, _hwndClock);
389 
390  if (clock_window)
391  clock_window->TimerTick();
392  break;}
393 
394  case PM_REFRESH:
395  Refresh(true);
396  break;
397 
398  case WM_SIZE: {
399  int cx = LOWORD(lparam);
401  break;}
402 
403  case PM_GET_WIDTH: {
405  if (_show_button)
406  w += NOTIFYICON_DIST;
407  return w;}
408 
409  case PM_REFRESH_CONFIG:
410  read_config();
411  break;
412 
413  case WM_CONTEXTMENU: {
414  Point pt(lparam);
415  POINTS p;
416  p.x = (SHORT) pt.x;
417  p.y = (SHORT) pt.y;
418  ScreenToClient(_hwnd, &pt);
419 
420  if (IconHitTest(pt) == _sorted_icons.end()) { // display menu only when no icon clicked
421  PopupMenu menu(IDM_NOTIFYAREA);
425  menu.TrackPopupMenu(_hwnd, p);
426  }
427  break;}
428 
429  case WM_COPYDATA: { // receive NotifyHook answers
430  String path;
431  HWND hwnd;
432 
433  if (_hook.ModulePathCopyData(lparam, &hwnd, path))
434  _window_modules[hwnd] = path;
435  break;}
436 
437  default:
438  if (nmsg>=WM_MOUSEFIRST && nmsg<=WM_MOUSELAST) {
439  // close startup menu and other popup menus
440  // This functionality is missing in MS Windows.
441  if (nmsg==WM_LBUTTONDOWN || nmsg==WM_MBUTTONDOWN || nmsg==WM_RBUTTONDOWN
442 #ifdef WM_XBUTTONDOWN
443  || nmsg==WM_XBUTTONDOWN
444 #endif
445  )
446 
447  CancelModes();
448 
449  Point pt(lparam);
451 
452  if (found != _sorted_icons.end()) {
453  const NotifyInfo& entry = const_cast<NotifyInfo&>(*found); // Why does GCC 3.3 need this additional const_cast ?!
454 
455  // set activation time stamp
456  if (nmsg == WM_LBUTTONDOWN || // Some programs need PostMessage() instead of SendMessage().
457  nmsg == WM_MBUTTONDOWN || // So call SendMessage() only for BUTTONUP and BLCLK messages
458 #ifdef WM_XBUTTONDOWN
459  nmsg == WM_XBUTTONDOWN ||
460 #endif
461  nmsg == WM_RBUTTONDOWN) {
462  _icon_map[entry]._lastChange = GetTickCount();
463  }
464 
465  // Notify the message if the owner is still alive
466  if (IsWindow(entry._hWnd)) {
467  if (nmsg == WM_MOUSEMOVE || // avoid to call blocking SendMessage() for merely moving the mouse over icons
468  nmsg == WM_LBUTTONDOWN || // Some programs need PostMessage() instead of SendMessage().
469  nmsg == WM_MBUTTONDOWN || // So call SendMessage() only for BUTTONUP and BLCLK messages
470 #ifdef WM_XBUTTONDOWN
471  nmsg == WM_XBUTTONDOWN ||
472 #endif
473  nmsg == WM_RBUTTONDOWN)
474  PostMessage(entry._hWnd, entry._uCallbackMessage, entry._uID, nmsg);
475  else {
476  // allow SetForegroundWindow() in client process
477  DWORD pid;
478 
479  if (GetWindowThreadProcessId(entry._hWnd, &pid)) {
480  // bind dynamically to AllowSetForegroundWindow() to be compatible to WIN98
481  static DynamicFct<BOOL(WINAPI*)(DWORD)> AllowSetForegroundWindow(TEXT("USER32"), "AllowSetForegroundWindow");
482 
484  (*AllowSetForegroundWindow)(pid);
485  }
486 
487  // use PostMessage() for notifcation icons of Shell Service Objects in the own process
488  if (pid == GetCurrentProcessId())
489  PostMessage(entry._hWnd, entry._uCallbackMessage, entry._uID, nmsg);
490  else
491  SendMessage(entry._hWnd, entry._uCallbackMessage, entry._uID, nmsg);
492  }
493  }
494  else if (_icon_map.erase(entry)) // delete icons without valid owner window
495  UpdateIcons();
496  } else
497  // handle clicks on notification area button "show hidden icons"
498  if (_show_button)
499  if (nmsg == WM_LBUTTONDOWN)
503  }
504 
505  return super::WndProc(nmsg, wparam, lparam);
506  }
507 
508  return 0;
509 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3835
#define MAKEWPARAM(l, h)
Definition: winuser.h:3916
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
#define WM_MOUSEFIRST
Definition: winuser.h:1750
#define MF_BYCOMMAND
Definition: winuser.h:202
#define WM_CONTEXTMENU
Definition: richedit.h:64
#define WM_LBUTTONDOWN
Definition: winuser.h:1752
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define ID_SHOW_HIDDEN_ICONS
Definition: resource.h:217
int _clock_width
Definition: traynotify.h:143
bool _show_button
Definition: traynotify.h:150
void UpdateIcons()
Definition: traynotify.cpp:646
#define pt(x, y)
Definition: drawing.c:79
GLsizei const GLchar ** path
Definition: glext.h:7234
WindowHandle _hwndClock
Definition: traynotify.h:142
uint8_t entry
Definition: isohybrid.c:63
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:445
#define PM_REFRESH_CONFIG
Definition: explorer.h:70
NotifyIconMap _icon_map
Definition: traynotify.h:174
#define PM_GET_WIDTH
Definition: explorer.h:67
static WCHAR String[]
Definition: stringtable.c:55
#define SWP_NOZORDER
Definition: winuser.h:1232
void TimerTick()
BOOL WINAPI AllowSetForegroundWindow(DWORD dwProcessId)
Definition: window.c:49
void read_config()
Definition: traynotify.cpp:243
bool _show_hidden
Definition: traynotify.h:148
NotifyIconSet::iterator IconHitTest(const POINT &pos)
search for a icon at a given client coordinate position
Definition: traynotify.cpp:789
#define IDM_NOTIFYAREA
Definition: resource.h:97
short SHORT
Definition: pedump.c:59
#define MF_BYPOSITION
Definition: winuser.h:203
NotifyIconSet _sorted_icons
Definition: traynotify.h:175
void CancelModes()
Definition: traynotify.cpp:572
DWORD WINAPI GetWindowThreadProcessId(HWND, PDWORD)
#define NOTIFYICON_Y
Definition: traynotify.h:39
map< HWND, String > _window_modules
Definition: traynotify.h:172
SHORT x
Definition: windef.h:332
window for displaying the time in the tray notification area
Definition: traynotify.h:238
#define WM_RBUTTONDOWN
Definition: winuser.h:1755
#define PostMessage
Definition: winuser.h:5698
void erase(iterator __pos)
Definition: _map.h:203
#define MF_CHECKED
Definition: winuser.h:132
#define WM_COPYDATA
Definition: winuser.h:1646
#define WM_SIZE
Definition: winuser.h:1593
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define NOTIFYICON_SIZE
Definition: traynotify.h:37
#define WM_TIMER
Definition: winuser.h:1718
#define WM_MOUSELAST
Definition: winuser.h:1777
unsigned long DWORD
Definition: ntddk_ex.h:95
structure for maintaining informations about one notification icon
Definition: traynotify.h:93
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define WM_PAINT
Definition: winuser.h:1602
#define NOTIFYICON_DIST
Definition: traynotify.h:35
virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: window.cpp:280
size_type size() const
Definition: _set.h:160
#define WM_COMMAND
Definition: winuser.h:1716
#define MF_UNCHECKED
Definition: winuser.h:204
UINT WPARAM LPARAM lparam
Definition: msvc.h:92
#define SWP_NOSIZE
Definition: winuser.h:1230
SHORT y
Definition: windef.h:333
#define TEXT(s)
Definition: k32.h:26
#define GET_WINDOW(CLASS, hwnd)
Definition: window.h:88
void Paint()
Definition: traynotify.cpp:697
#define NOTIFYICON_X
Definition: traynotify.h:38
#define WM_MBUTTONDOWN
Definition: winuser.h:1758
#define PM_REFRESH
Definition: explorer.h:69
#define WM_MOUSEMOVE
Definition: winuser.h:1751
BOOL WINAPI SetMenuDefaultItem(_In_ HMENU, _In_ UINT, _In_ UINT)
_Out_opt_ int * cx
Definition: commctrl.h:570
#define SendMessage
Definition: winuser.h:5709
iterator end()
Definition: _set.h:152
_Rep_type::const_iterator const_iterator
Definition: _set.h:74
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
NotifyHook _hook
Definition: traynotify.h:146
bool ModulePathCopyData(LPARAM lparam, HWND *phwnd, String &path)
Definition: traynotify.cpp:50
GLfloat GLfloat p
Definition: glext.h:8902
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
#define ID_SHOW_ICON_BUTTON
Definition: resource.h:223
void Refresh(bool do_refresh=false)
Definition: traynotify.cpp:737
#define NOTIFYAREA_SPACE
Definition: traynotify.h:36
#define LOWORD(l)
Definition: pedump.c:82
DWORD WINAPI GetCurrentProcessId(VOID)
Definition: proc.c:1188
UINT _uCallbackMessage
Definition: traynotify.h:106
UINT WPARAM wparam
Definition: msvc.h:92

◆ write_config()

void NotifyArea::write_config ( )
protected

Definition at line 294 of file traynotify.cpp.

Referenced by ~NotifyArea().

295 {
296  // write notification icon settings to XML configuration file
297  XMLPos cfg_pos = g_Globals.get_cfg();
298 
299  cfg_pos.smart_create("desktopbar");
300  XMLBoolRef boolRef(XMLPos(cfg_pos,"options"), "show-clock");
301  boolRef = _hwndClock!=0;
302  cfg_pos.back();
303 
304  cfg_pos.smart_create("notify-icons");
305 
306  XMLPos options(cfg_pos, "options");
307  XMLBoolRef(options, "hide-inactive") = _hide_inactive;
308  XMLBoolRef(options, "show-hidden") = _show_hidden;
309  XMLBoolRef(options, "show-button") = _show_button;
310 
311  for(NotifyIconCfgList::iterator it=_cfg.begin(); it!=_cfg.end(); ++it) {
312  NotifyIconConfig& cfg = *it;
313 
314  // search for the corresponding node using the original name
315  cfg_pos.smart_create("icon", "name", cfg._name);
316 
317  // refresh unique name
318  cfg.create_name();
319 
320  cfg_pos["name"] = cfg._name.c_str();
321  cfg_pos["text"] = cfg._tipText.c_str();
322  cfg_pos["window"] = cfg._windowTitle.c_str();
323  cfg_pos["module"] = cfg._modulePath.c_str();
324  cfg_pos["show"] = string_from_mode(cfg._mode).c_str();
325 
326  cfg_pos.back();
327  }
328 
329  cfg_pos.back(); // smart_create
330 }
iterator begin()
Definition: _list.h:367
NOTIFYICONMODE _mode
Definition: traynotify.h:83
bool _show_button
Definition: traynotify.h:150
WindowHandle _hwndClock
Definition: traynotify.h:142
String string_from_mode(NOTIFYICONMODE mode)
Definition: traynotify.cpp:863
NotifyIconCfgList _cfg
Definition: traynotify.h:170
bool _show_hidden
Definition: traynotify.h:148
configuration for the display mode of a notification icon
Definition: traynotify.h:71
int options
Definition: main.c:106
String _windowTitle
Definition: traynotify.h:80
_STLP_PRIV _List_iterator< NotifyIconConfig, _Nonconst_traits< NotifyIconConfig > > iterator
Definition: _list.h:275
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
bool _hide_inactive
Definition: traynotify.h:149
iterator end()
Definition: _list.h:370
XMLPos get_cfg()
Definition: explorer.cpp:119
String _modulePath
Definition: traynotify.h:81

Friends And Related Function Documentation

◆ TrayNotifyDlg

friend struct TrayNotifyDlg
friend

Definition at line 168 of file traynotify.h.

Member Data Documentation

◆ _cfg

◆ _clock_width

int NotifyArea::_clock_width
protected

Definition at line 143 of file traynotify.h.

Referenced by NotifyArea(), show_clock(), and WndProc().

◆ _hide_inactive

bool NotifyArea::_hide_inactive
protected

Definition at line 149 of file traynotify.h.

Referenced by NotifyArea(), read_config(), Refresh(), and write_config().

◆ _hook

NotifyHook NotifyArea::_hook
protected

Definition at line 146 of file traynotify.h.

Referenced by DetermineHideState(), and WndProc().

◆ _hwndClock

WindowHandle NotifyArea::_hwndClock
protected

Definition at line 142 of file traynotify.h.

Referenced by show_clock(), WndProc(), and write_config().

◆ _icon_map

◆ _last_icon_count

size_t NotifyArea::_last_icon_count
protected

Definition at line 177 of file traynotify.h.

Referenced by NotifyArea(), and UpdateIcons().

◆ _next_idx

int NotifyArea::_next_idx
protected

Definition at line 176 of file traynotify.h.

Referenced by NotifyArea(), and ProcessTrayNotification().

◆ _show_button

bool NotifyArea::_show_button
protected

◆ _show_hidden

◆ _sorted_icons

NotifyIconSet NotifyArea::_sorted_icons
protected

Definition at line 175 of file traynotify.h.

Referenced by CancelModes(), IconHitTest(), Notify(), Paint(), Refresh(), UpdateIcons(), and WndProc().

◆ _tooltip

ToolTip NotifyArea::_tooltip
protected

Definition at line 145 of file traynotify.h.

Referenced by UpdateIcons().

◆ _window_modules

map<HWND, String> NotifyArea::_window_modules
protected

Definition at line 172 of file traynotify.h.

Referenced by DetermineHideState(), and WndProc().


The documentation for this struct was generated from the following files: