Makefile
[desktopswitcher.git] / switcherwindow.h
blob836c58ea2fc6c3be851a44efbc5fb56ba5798cd0
1 // $Id: switcherwindow.h,v 1.1 2002/05/29 22:06:50 nedko Exp $
2 //
3 // Desktop Switcher
4 // Copyright (C) 2000,2001,2002 Nedko Arnaudov <nedko@users.sourceforge.net>
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef _SWITCHER_WINDOW_H_f8ade2f7_4bdf_4b29_9e91_fd26a09ff35d__INCLUDED
21 #define _SWITCHER_WINDOW_H_f8ade2f7_4bdf_4b29_9e91_fd26a09ff35d__INCLUDED
23 #include "switcher.h"
24 #include "ShadowWindow.h"
25 class CDesktopSwitcher;
26 class CDesktop;
28 class CSwitcherWindow : public CWindowImpl <CSwitcherWindow>
30 public:
31 CSwitcherWindow(CDesktopSwitcher *pDesktopSwitcher, CDesktop *pDesktop);
32 ~CSwitcherWindow();
33 BOOL Create();
34 void Destroy();
35 void ToggleVisible();
36 void OnRun();
37 void DrawWindow(HWND hwnd);
39 BEGIN_MSG_MAP(CSwitcherWindow)
40 MESSAGE_HANDLER(WM_CLOSE,OnClose)
41 MESSAGE_HANDLER(WM_HOTKEY,OnHotKey)
42 MESSAGE_HANDLER(WM_RBUTTONDOWN,OnRButtonDown)
43 MESSAGE_HANDLER(WM_LBUTTONDOWN,OnLButtonDown)
44 MESSAGE_HANDLER(WM_PAINT,OnPaint)
45 MESSAGE_HANDLER(WM_EXITSIZEMOVE,OnExitSizeMove)
46 COMMAND_ID_HANDLER(ID_RUN,OnRun)
47 COMMAND_ID_HANDLER(ID_EXIT,OnExit)
48 END_MSG_MAP()
50 protected:
51 LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
52 LRESULT OnHotKey(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
53 LRESULT OnRButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
54 LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
55 LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
56 LRESULT OnExitSizeMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
58 LRESULT OnRun(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
59 LRESULT OnExit(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
61 private:
62 CDesktopSwitcher *m_pDesktopSwitcher;
63 CDesktop *m_pDesktop;
65 CShadowWindow *m_pMoveWnd;
66 POINT m_ptMoveBegin;
68 HBITMAP m_hBackground;
71 #endif // #ifndef _SWITCHER_WINDOW_H_f8ade2f7_4bdf_4b29_9e91_fd26a09ff35d__INCLUDED