]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////// | |
2 | // File: src/palmos/taskbar.cpp | |
3 | // Purpose: Implements wxTaskBarIcon class for manipulating icons on | |
4 | // the task bar. | |
5 | // Author: Julian Smart | |
6 | // Modified by: Vaclav Slavik | |
7 | // Created: 24/3/98 | |
8 | // RCS-ID: $Id$ | |
9 | // Copyright: (c) | |
10 | // Licence: wxWindows licence | |
11 | ///////////////////////////////////////////////////////////////////////// | |
12 | ||
13 | // For compilers that support precompilation, includes "wx.h". | |
14 | #include "wx/wxprec.h" | |
15 | ||
16 | #ifdef __BORLANDC__ | |
17 | #pragma hdrstop | |
18 | #endif | |
19 | ||
20 | #ifndef WX_PRECOMP | |
21 | #include "wx/window.h" | |
22 | #include "wx/frame.h" | |
23 | #include "wx/utils.h" | |
24 | #include "wx/menu.h" | |
25 | #endif | |
26 | ||
27 | #if defined(__WIN95__) | |
28 | ||
29 | #include <string.h> | |
30 | #include "wx/taskbar.h" | |
31 | ||
32 | IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIcon, wxEvtHandler) | |
33 | ||
34 | // ============================================================================ | |
35 | // implementation | |
36 | // ============================================================================ | |
37 | ||
38 | // ---------------------------------------------------------------------------- | |
39 | // wxTaskBarIconWindow: helper window | |
40 | // ---------------------------------------------------------------------------- | |
41 | ||
42 | // NB: this class serves two purposes: | |
43 | // 1. win32 needs a HWND associated with taskbar icon, this provides it | |
44 | // 2. we need wxTopLevelWindow so that the app doesn't exit when | |
45 | // last frame is closed but there still is a taskbar icon | |
46 | class wxTaskBarIconWindow : public wxFrame | |
47 | { | |
48 | public: | |
49 | wxTaskBarIconWindow(wxTaskBarIcon *icon) | |
50 | : wxFrame(NULL, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0), | |
51 | m_icon(icon) | |
52 | { | |
53 | } | |
54 | ||
55 | WXLRESULT MSWWindowProc(WXUINT msg, | |
56 | WXWPARAM wParam, WXLPARAM lParam) | |
57 | { | |
58 | return 0; | |
59 | } | |
60 | ||
61 | private: | |
62 | wxTaskBarIcon *m_icon; | |
63 | }; | |
64 | ||
65 | // ---------------------------------------------------------------------------- | |
66 | // wxTaskBarIcon | |
67 | // ---------------------------------------------------------------------------- | |
68 | ||
69 | wxTaskBarIcon::wxTaskBarIcon() | |
70 | { | |
71 | } | |
72 | ||
73 | wxTaskBarIcon::~wxTaskBarIcon() | |
74 | { | |
75 | } | |
76 | ||
77 | // Operations | |
78 | bool wxTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip) | |
79 | { | |
80 | return false; | |
81 | } | |
82 | ||
83 | bool wxTaskBarIcon::RemoveIcon() | |
84 | { | |
85 | return false; | |
86 | } | |
87 | ||
88 | bool wxTaskBarIcon::PopupMenu(wxMenu *menu) | |
89 | { | |
90 | return false; | |
91 | } | |
92 | ||
93 | void wxTaskBarIcon::RegisterWindowMessages() | |
94 | { | |
95 | } | |
96 | ||
97 | // ---------------------------------------------------------------------------- | |
98 | // wxTaskBarIcon window proc | |
99 | // ---------------------------------------------------------------------------- | |
100 | ||
101 | long wxTaskBarIcon::WindowProc(unsigned int msg, | |
102 | unsigned int WXUNUSED(wParam), | |
103 | long lParam) | |
104 | { | |
105 | return 0; | |
106 | } | |
107 | ||
108 | #endif // __WIN95__ |