From b9203ee84953006547f4afd58f405874c87bf0dc Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:02:17 +0200 Subject: 3.1 --- ui/trayIcon.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 ui/trayIcon.h (limited to 'ui/trayIcon.h') 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 +#include + + +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 -- cgit