Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

CMSWindowsClientTaskBarReceiver.h

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2003 Chris Schoeneman
00004  * 
00005  * This package is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * found in the file COPYING that should have accompanied this file.
00008  * 
00009  * This package is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  */
00014 
00015 #ifndef CMSWINDOWSCLIENTTASKBARRECEIVER_H
00016 #define CMSWINDOWSCLIENTTASKBARRECEIVER_H
00017 
00018 #define WIN32_LEAN_AND_MEAN
00019 
00020 #include "CClientTaskBarReceiver.h"
00021 #include <windows.h>
00022 
00023 class CBufferedLogOutputter;
00024 
00026 class CMSWindowsClientTaskBarReceiver : public CClientTaskBarReceiver {
00027 public:
00028     CMSWindowsClientTaskBarReceiver(HINSTANCE, const CBufferedLogOutputter*);
00029     virtual ~CMSWindowsClientTaskBarReceiver();
00030 
00031     // IArchTaskBarReceiver overrides
00032     virtual void        showStatus();
00033     virtual void        runMenu(int x, int y);
00034     virtual void        primaryAction();
00035     virtual const Icon  getIcon() const;
00036 
00037 protected:
00038     void                copyLog() const;
00039 
00040     // CClientTaskBarReceiver overrides
00041     virtual void        onStatusChanged();
00042 
00043 private:
00044     HICON               loadIcon(UINT);
00045     void                deleteIcon(HICON);
00046     void                createWindow();
00047     void                destroyWindow();
00048 
00049     BOOL                dlgProc(HWND hwnd,
00050                             UINT msg, WPARAM wParam, LPARAM lParam);
00051     static BOOL CALLBACK
00052                         staticDlgProc(HWND hwnd,
00053                             UINT msg, WPARAM wParam, LPARAM lParam);
00054 
00055 private:
00056     HINSTANCE           m_appInstance;
00057     HWND                m_window;
00058     HMENU               m_menu;
00059     HICON               m_icon[kMaxState];
00060     const CBufferedLogOutputter*    m_logBuffer;
00061     static const UINT   s_stateToIconID[];
00062 };
00063 
00064 #endif

Generated on Fri Nov 6 00:21:14 2009 for synergy-plus by  doxygen 1.3.9.1