xref: /haiku/src/apps/debugger/user_interface/gui/team_window/ImageFunctionsView.h (revision 17889a8c70dbb3d59c1412f6431968753c767bab)
1 /*
2  * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Copyright 2013, Rene Gollent, rene@gollent.com.
4  * Distributed under the terms of the MIT License.
5  */
6 #ifndef IMAGE_FUNCTIONS_VIEW_H
7 #define IMAGE_FUNCTIONS_VIEW_H
8 
9 #include <GroupView.h>
10 
11 #include "table/TreeTable.h"
12 #include "Team.h"
13 
14 
15 class BTextControl;
16 class FunctionInstance;
17 
18 
19 class ImageFunctionsView : public BGroupView, private TreeTableListener {
20 public:
21 	class Listener;
22 
23 public:
24 								ImageFunctionsView(Listener* listener);
25 								~ImageFunctionsView();
26 
27 	static	ImageFunctionsView*	Create(Listener* listener);
28 									// throws
29 
30 			void				UnsetListener();
31 
32 			void				SetImageDebugInfo(
33 									ImageDebugInfo* imageDebugInfo);
34 			void				SetFunction(FunctionInstance* function);
35 	virtual	void				AttachedToWindow();
36 	virtual	void				MessageReceived(BMessage* message);
37 
38 			void				LoadSettings(const BMessage& settings);
39 			status_t			SaveSettings(BMessage& settings);
40 
41 private:
42 			class FunctionsTableModel;
43 			class HighlightingTableColumn;
44 			class SourcePathComponentNode;
45 
46 private:
47 	// TreeTableListener
48 	virtual	void				TreeTableSelectionChanged(TreeTable* table);
49 
50 			void				_Init();
51 
52 			void				_ExpandFilteredNodes();
53 
54 private:
55 			ImageDebugInfo*		fImageDebugInfo;
56 			BTextControl*		fFilterField;
57 			TreeTable*			fFunctionsTable;
58 			FunctionsTableModel* fFunctionsTableModel;
59 			Listener*			fListener;
60 			HighlightingTableColumn* fHighlightingColumn;
61 			bigtime_t			fLastFilterKeypress;
62 };
63 
64 
65 class ImageFunctionsView::Listener {
66 public:
67 	virtual						~Listener();
68 
69 	virtual	void				FunctionSelectionChanged(
70 									FunctionInstance* function) = 0;
71 };
72 
73 
74 #endif	// IMAGE_FUNCTIONS_VIEW_H
75