xref: /haiku/src/apps/debugger/user_interface/gui/utility_windows/SignalDispositionEditWindow.h (revision b3f2ebf008490ab0b37e7d12fb6e2702f45bcd2b)
1 /*
2  * Copyright 2015, Rene Gollent, rene@gollent.com.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef SIGNAL_DISPOSITION_EDIT_WINDOW_H
6 #define SIGNAL_DISPOSITION_EDIT_WINDOW_H
7 
8 
9 #include <Window.h>
10 
11 #include "Team.h"
12 
13 #include "types/Types.h"
14 
15 
16 class BButton;
17 class BMenu;
18 class BMenuField;
19 class Team;
20 class UserInterfaceListener;
21 
22 
23 class SignalDispositionEditWindow : public BWindow {
24 public:
25 								SignalDispositionEditWindow(
26 									::Team* team,
27 									int32 signal,
28 									UserInterfaceListener* listener,
29 									BHandler* target);
30 
31 								~SignalDispositionEditWindow();
32 
33 	static	SignalDispositionEditWindow* Create(::Team* team,
34 									int32 signal,
35 									UserInterfaceListener* listener,
36 									BHandler* target);
37 									// throws
38 
39 	virtual	void				MessageReceived(BMessage* message);
40 
41 	virtual	void				Show();
42 
43 private:
44 			void	 			_Init();
45 			BMenu*				_BuildSignalSelectionMenu();
46 			void				_UpdateState();
47 
48 private:
49 			::Team*				fTeam;
50 			UserInterfaceListener* fListener;
51 			bool				fEditMode;
52 			int32				fCurrentSignal;
53 			int32				fCurrentDisposition;
54 			BButton*			fSaveButton;
55 			BButton*			fCancelButton;
56 			BMenuField*			fSignalSelectionField;
57 			BMenuField*			fDispositionSelectionField;
58 			BHandler*			fTarget;
59 };
60 
61 
62 #endif // SIGNAL_DISPOSITION_EDIT_WINDOW
63