xref: /haiku/src/apps/debugger/user_interface/gui/GraphicalUserInterface.h (revision 445d4fd926c569e7b9ae28017da86280aaecbae2)
1 /*
2  * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Copyright 2014-2016, Rene Gollent, rene@gollent.com.
4  * Distributed under the terms of the MIT License.
5  */
6 #ifndef GRAPHICAL_USER_INTERFACE_H
7 #define GRAPHICAL_USER_INTERFACE_H
8 
9 
10 #include "UserInterface.h"
11 
12 #include "ObjectList.h"
13 #include "String.h"
14 
15 
16 class BFilePanel;
17 class BHandler;
18 class BMessenger;
19 class TeamWindow;
20 
21 
22 class GraphicalUserInterface : public UserInterface {
23 public:
24 								GraphicalUserInterface();
25 	virtual						~GraphicalUserInterface();
26 
27 	virtual	const char*			ID() const;
28 
29 	virtual	status_t			Init(Team* team,
30 									UserInterfaceListener* listener);
31 	virtual	void				Show();
32 	virtual	void				Terminate();
33 									// shut down the UI *now* -- no more user
34 									// feedback
35 
36 	virtual	UserInterface*		Clone() const;
37 
38 	virtual	bool				IsInteractive() const;
39 
40 	virtual status_t			LoadSettings(const TeamUiSettings* settings);
41 	virtual status_t			SaveSettings(TeamUiSettings*& settings)	const;
42 
43 	virtual	void				NotifyUser(const char* title,
44 									const char* message,
45 									user_notification_type type);
46 	virtual	void				NotifyBackgroundWorkStatus(
47 									const char* message);
48 	virtual	int32				SynchronouslyAskUser(const char* title,
49 									const char* message, const char* choice1,
50 									const char* choice2, const char* choice3);
51 	virtual	status_t			SynchronouslyAskUserForFile(entry_ref* _ref);
52 private:
53 			class FilePanelHandler;
54 
55 private:
56 			TeamWindow*			fTeamWindow;
57 			BMessenger*			fTeamWindowMessenger;
58 			FilePanelHandler*	fFilePanelHandler;
59 			BFilePanel*			fFilePanel;
60 
61 			struct DefaultAction {
62 				BString fKey;
63 				int fDecision;
64 			};
65 			BObjectList<DefaultAction>	fDefaultActions;
66 };
67 
68 
69 #endif	// GRAPHICAL_USER_INTERFACE_H
70