diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:13:13 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:13:13 +0200 |
commit | 7f23ee90fd545995a29e2175f15e8b97e59ca67a (patch) | |
tree | f8d0afac51995032e58b9a475ccbbc73ba207baf /ui/tray_icon.h | |
parent | 3.19 (diff) | |
download | FreeFileSync-7f23ee90fd545995a29e2175f15e8b97e59ca67a.tar.gz FreeFileSync-7f23ee90fd545995a29e2175f15e8b97e59ca67a.tar.bz2 FreeFileSync-7f23ee90fd545995a29e2175f15e8b97e59ca67a.zip |
3.20
Diffstat (limited to 'ui/tray_icon.h')
-rw-r--r-- | ui/tray_icon.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ui/tray_icon.h b/ui/tray_icon.h index 8b5b5851..a615c091 100644 --- a/ui/tray_icon.h +++ b/ui/tray_icon.h @@ -3,30 +3,31 @@ // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * // * Copyright (C) 2008-2011 ZenJu (zhnmju123 AT gmx.de) * // ************************************************************************** -// + #ifndef TRAYICON_H_INCLUDED #define TRAYICON_H_INCLUDED #include <wx/event.h> -#include <wx/toplevel.h> +//show tray icon with progress during lifetime of this instance +//emits the following wxCommandEvent in case user double-clicks on tray icon or selects corresponding context menu item: +extern const wxEventType FFS_REQUEST_RESUME_TRAY_EVENT; -class MinimizeToTray : private wxEvtHandler +class FfsTrayIcon : public wxEvtHandler { public: - MinimizeToTray(wxTopLevelWindow* callerWnd, wxTopLevelWindow* secondWnd = NULL); //ensure both windows have longer lifetime than this instance! - ~MinimizeToTray(); //show windows again + FfsTrayIcon(); + ~FfsTrayIcon(); void setToolTip(const wxString& toolTipText, double percent = 0); //percent (optional), number between [0, 100], for small progress indicator - void keepHidden(); //do not show windows again: avoid window flashing shortly before it is destroyed private: + FfsTrayIcon(const FfsTrayIcon&); + FfsTrayIcon& operator=(const FfsTrayIcon&); + void OnContextMenuSelection(wxCommandEvent& event); void OnDoubleClick(wxCommandEvent& event); - void resumeFromTray(); - wxTopLevelWindow* callerWnd_; - wxTopLevelWindow* secondWnd_; class TaskBarImpl; TaskBarImpl* trayIcon; //actual tray icon (don't use inheritance to enable delayed deletion) }; |