blob: 50480b54685c1aecece179e62796212e3e2acd5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// **************************************************************************
// * This file is part of the FreeFileSync project. It is distributed under *
// * GNU General Public License: http://www.gnu.org/licenses/gpl.html *
// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
#ifndef TRAYICON_H_INCLUDED
#define TRAYICON_H_INCLUDED
#include <wx/event.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 FfsTrayIcon : public wxEvtHandler
{
public:
FfsTrayIcon();
~FfsTrayIcon();
void setToolTip(const wxString& toolTip);
void setProgress(double fraction); //number between [0, 1], for small progress indicator
private:
FfsTrayIcon(const FfsTrayIcon&);
FfsTrayIcon& operator=(const FfsTrayIcon&);
void OnContextMenuSelection(wxCommandEvent& event);
void OnDoubleClick(wxCommandEvent& event);
class TaskBarImpl;
TaskBarImpl* trayIcon; //actual tray icon (don't use inheritance to enable delayed deletion)
wxString toolTipLast;
double fractionLast;
};
#endif // TRAYICON_H_INCLUDED
|