diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:02:17 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:02:17 +0200 |
commit | b9203ee84953006547f4afd58f405874c87bf0dc (patch) | |
tree | 9e41f1533f120e9268e86658c52458630ffd718a /ui/trayIcon.h | |
parent | 3.0 (diff) | |
download | FreeFileSync-b9203ee84953006547f4afd58f405874c87bf0dc.tar.gz FreeFileSync-b9203ee84953006547f4afd58f405874c87bf0dc.tar.bz2 FreeFileSync-b9203ee84953006547f4afd58f405874c87bf0dc.zip |
3.1
Diffstat (limited to 'ui/trayIcon.h')
-rw-r--r-- | ui/trayIcon.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ui/trayIcon.h b/ui/trayIcon.h new file mode 100644 index 00000000..370e85f3 --- /dev/null +++ b/ui/trayIcon.h @@ -0,0 +1,27 @@ +#ifndef TRAYICON_H_INCLUDED +#define TRAYICON_H_INCLUDED + +#include <wx/event.h> +#include <wx/toplevel.h> + + +class MinimizeToTray : private wxEvtHandler +{ +public: + MinimizeToTray(wxTopLevelWindow* callerWnd, wxWindow* secondWnd = NULL); //ensure callerWind has longer lifetime! + ~MinimizeToTray(); //show windows again + + void setToolTip(const wxString& toolTipText); + void keepHidden(); //do not show windows again: avoid window flashing shortly before it is destroyed +private: + void OnContextMenuSelection(wxCommandEvent& event); + void OnDoubleClick(wxCommandEvent& event); + void resumeFromTray(); + + wxTopLevelWindow* callerWnd_; + wxWindow* secondWnd_; + class TaskBarImpl; + TaskBarImpl* trayIcon; //actual tray icon (don't use inheritance to enable delayed deletion) +}; + +#endif // TRAYICON_H_INCLUDED |