]>
Commit | Line | Data |
---|---|---|
1 | #ifndef _WX_TASKBAR_H_BASE_ | |
2 | #define _WX_TASKBAR_H_BASE_ | |
3 | ||
4 | #include "wx/defs.h" | |
5 | ||
6 | #ifdef wxHAS_TASK_BAR_ICON | |
7 | ||
8 | #include "wx/event.h" | |
9 | ||
10 | // ---------------------------------------------------------------------------- | |
11 | // wxTaskBarIconBase: define wxTaskBarIcon interface | |
12 | // ---------------------------------------------------------------------------- | |
13 | ||
14 | class WXDLLEXPORT wxTaskBarIconBase : public wxEvtHandler | |
15 | { | |
16 | }; | |
17 | ||
18 | ||
19 | // ---------------------------------------------------------------------------- | |
20 | // now include the actual class declaration | |
21 | // ---------------------------------------------------------------------------- | |
22 | ||
23 | #if defined(__WXMSW__) | |
24 | #include "wx/msw/taskbar.h" | |
25 | #elif defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) | |
26 | #include "wx/unix/taskbarx11.h" | |
27 | #endif | |
28 | ||
29 | // ---------------------------------------------------------------------------- | |
30 | // wxTaskBarIcon events | |
31 | // ---------------------------------------------------------------------------- | |
32 | ||
33 | class WXDLLEXPORT wxTaskBarIconEvent : public wxEvent | |
34 | { | |
35 | public: | |
36 | wxTaskBarIconEvent(wxEventType evtType, wxTaskBarIcon *tbIcon) | |
37 | : wxEvent(-1, evtType) | |
38 | { | |
39 | SetEventObject(tbIcon); | |
40 | } | |
41 | ||
42 | virtual wxEvent *Clone() const { return new wxTaskBarIconEvent(*this); } | |
43 | }; | |
44 | ||
45 | BEGIN_DECLARE_EVENT_TYPES() | |
46 | DECLARE_EVENT_TYPE( wxEVT_TASKBAR_MOVE, 1550 ) | |
47 | DECLARE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_DOWN, 1551 ) | |
48 | DECLARE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_UP, 1552 ) | |
49 | DECLARE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_DOWN, 1553 ) | |
50 | DECLARE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_UP, 1554 ) | |
51 | DECLARE_EVENT_TYPE( wxEVT_TASKBAR_LEFT_DCLICK, 1555 ) | |
52 | DECLARE_EVENT_TYPE( wxEVT_TASKBAR_RIGHT_DCLICK, 1556 ) | |
53 | END_DECLARE_EVENT_TYPES() | |
54 | ||
55 | #define EVT_TASKBAR_MOVE(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), | |
56 | #define EVT_TASKBAR_LEFT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), | |
57 | #define EVT_TASKBAR_LEFT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), | |
58 | #define EVT_TASKBAR_RIGHT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), | |
59 | #define EVT_TASKBAR_RIGHT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), | |
60 | #define EVT_TASKBAR_LEFT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), | |
61 | #define EVT_TASKBAR_RIGHT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL), | |
62 | ||
63 | #endif | |
64 | // wxHAS_TASK_BAR_ICON | |
65 | ||
66 | #endif | |
67 | // _WX_TASKBAR_H_BASE_ |