summaryrefslogtreecommitdiffabout
path: root/Trayer.cpp
Unidiff
Diffstat (limited to 'Trayer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--Trayer.cpp125
1 files changed, 0 insertions, 125 deletions
diff --git a/Trayer.cpp b/Trayer.cpp
deleted file mode 100644
index 1e1ab3c..0000000
--- a/Trayer.cpp
+++ b/dev/null
@@ -1,125 +0,0 @@
1// Trayer.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "Trayer.h"
7
8#include "PumpKINDlg.h"
9
10#ifdef _DEBUG
11#define new DEBUG_NEW
12#undef THIS_FILE
13static char THIS_FILE[] = __FILE__;
14#endif
15
16/////////////////////////////////////////////////////////////////////////////
17// CTrayer
18
19CTrayer::CTrayer()
20{
21 m_inMenu=0;
22}
23
24CTrayer::~CTrayer()
25{
26}
27
28
29BEGIN_MESSAGE_MAP(CTrayer, CWnd)
30 //{{AFX_MSG_MAP(CTrayer)
31 ON_MESSAGE(WM_TRAYICON, OnTray)
32 ON_COMMAND(ID_TRAY_ABOUTPUMPKIN, OnTrayAboutpumpkin)
33 ON_COMMAND(ID_TRAY_EXIT, OnTrayExit)
34 ON_COMMAND(ID_TRAY_FETCHFILE, OnTrayFetchfile)
35 ON_COMMAND(ID_TRAY_HELP, OnTrayHelp)
36 ON_COMMAND(ID_TRAY_OPENFILESFOLDER, OnTrayOpenfilesfolder)
37 ON_COMMAND(ID_TRAY_OPTIONS, OnTrayOptions)
38 ON_COMMAND(ID_TRAY_SENDFILE, OnTraySendfile)
39 ON_COMMAND(ID_TRAY_SHOWPUMPKINWINDOW, OnTrayShowpumpkinwindow)
40 ON_COMMAND(ID_TRAY_LISTEN, OnTrayListen)
41 //}}AFX_MSG_MAP
42END_MESSAGE_MAP()
43
44
45/////////////////////////////////////////////////////////////////////////////
46// CTrayer message handlers
47
48CTrayer::CTrayer(CPumpKINDlg* daddy)
49 : m_Daddy(daddy)
50{
51 m_inMenu=0;
52}
53
54LRESULT CTrayer::OnTray(WPARAM wP,LPARAM lP)
55{
56 ASSERT(wP==IDC_TRAYICON);
57 switch(lP){
58 case WM_RBUTTONDOWN:
59 {
60 CMenu menu;
61 VERIFY(menu.LoadMenu(IDM_POPUPS));
62 CMenu *popUp = menu.GetSubMenu(0);
63 ASSERT(popUp);
64 CPoint pt;
65 VERIFY(::GetCursorPos(&pt));
66 m_inMenu++;
67 SetForegroundWindow();
68 popUp->CheckMenuItem(ID_TRAY_SHOWPUMPKINWINDOW,MF_BYCOMMAND|(IsWindowVisible()?MF_CHECKED:MF_UNCHECKED));
69 popUp->CheckMenuItem(ID_TRAY_LISTEN,MF_BYCOMMAND|(m_Daddy->m_Listener.m_bListen?MF_CHECKED:MF_UNCHECKED));
70 popUp->TrackPopupMenu(TPM_RIGHTALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON,pt.x,pt.y,this);
71 m_inMenu--;
72 SendMessage(WM_NULL);
73 }
74 break;
75 case WM_LBUTTONDOWN:
76 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_SHOWPUMPKINWINDOW);
77 break;
78 }
79 return 0;
80}
81
82void CTrayer::OnTrayAboutpumpkin()
83{
84 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_ABOUTPUMPKIN);
85}
86
87void CTrayer::OnTrayExit()
88{
89 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_EXIT);
90}
91
92void CTrayer::OnTrayFetchfile()
93{
94 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_FETCHFILE);
95}
96
97void CTrayer::OnTrayHelp()
98{
99 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_HELP);
100}
101
102void CTrayer::OnTrayOpenfilesfolder()
103{
104 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_OPENFILESFOLDER);
105}
106
107void CTrayer::OnTrayOptions()
108{
109 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_OPTIONS);
110}
111
112void CTrayer::OnTraySendfile()
113{
114 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_SENDFILE);
115}
116
117void CTrayer::OnTrayShowpumpkinwindow()
118{
119 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_SHOWPUMPKINWINDOW);
120}
121
122void CTrayer::OnTrayListen()
123{
124 m_Daddy->SendMessage(WM_COMMAND,ID_TRAY_LISTEN);
125}