summaryrefslogtreecommitdiff
path: root/ui/tray_icon.h
diff options
context:
space:
mode:
Diffstat (limited to 'ui/tray_icon.h')
-rw-r--r--ui/tray_icon.h19
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)
};
bgstack15