xref: /haiku/src/add-ons/input_server/devices/keyboard/TeamMonitorWindow.h (revision e81a954787e50e56a7f06f72705b7859b6ab06d1)
1 /*
2  * Copyright 2004-2008, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Jérôme Duval
7  *		Axel Doerfler, axeld@pinc-software.de
8  */
9 #ifndef TEAM_MONITOR_WINDOW_H
10 #define TEAM_MONITOR_WINDOW_H
11 
12 
13 #include <Box.h>
14 #include <Button.h>
15 #include <ListView.h>
16 #include <MessageFilter.h>
17 #include <Window.h>
18 
19 #include "TeamListItem.h"
20 
21 
22 class TeamDescriptionView;
23 
24 class TeamMonitorWindow : public BWindow {
25 public:
26 							TeamMonitorWindow();
27 	virtual					~TeamMonitorWindow();
28 
29 	virtual void			MessageReceived(BMessage* message);
30 	virtual void			Show();
31 	virtual bool			QuitRequested();
32 
33 			void			Enable();
34 			void			Disable();
35 			void			LocaleChanged();
36 			void			QuitTeam(TeamListItem* item);
37 			void			MarkUnquittableTeam(BMessage* message);
38 			bool			HandleKeyDown(BMessage* msg);
39 
40 private:
41 			void			_UpdateList();
42 
43 			bool			fQuitting;
44 			BMessageRunner*	fUpdateRunner;
45 			BListView*		fListView;
46 			BButton*		fCancelButton;
47 			BButton*		fKillButton;
48 			BButton*		fQuitButton;
49 			BButton*		fRestartButton;
50 			TeamDescriptionView*	fDescriptionView;
51 			BList			fTeamQuitterList;
52 };
53 
54 static const uint32 kMsgCtrlAltDelPressed = 'TMcp';
55 static const uint32 kMsgDeselectAll = 'TMds';
56 static const uint32 kMsgQuitFailed = 'TMqf';
57 
58 #endif	// TEAM_MONITOR_WINDOW_H
59