1 /* 2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef IMAGE_FUNCTIONS_VIEW_H 6 #define IMAGE_FUNCTIONS_VIEW_H 7 8 #include <GroupView.h> 9 10 #include "table/TreeTable.h" 11 #include "Team.h" 12 13 14 class FunctionInstance; 15 16 17 class ImageFunctionsView : public BGroupView, private TreeTableListener { 18 public: 19 class Listener; 20 21 public: 22 ImageFunctionsView(Listener* listener); 23 ~ImageFunctionsView(); 24 25 static ImageFunctionsView* Create(Listener* listener); 26 // throws 27 28 void UnsetListener(); 29 30 void SetImageDebugInfo( 31 ImageDebugInfo* imageDebugInfo); 32 void SetFunction(FunctionInstance* function); 33 34 private: 35 class FunctionsTableModel; 36 37 private: 38 // TreeTableListener 39 virtual void TreeTableSelectionChanged(TreeTable* table); 40 41 void _Init(); 42 43 private: 44 ImageDebugInfo* fImageDebugInfo; 45 TreeTable* fFunctionsTable; 46 FunctionsTableModel* fFunctionsTableModel; 47 Listener* fListener; 48 }; 49 50 51 class ImageFunctionsView::Listener { 52 public: 53 virtual ~Listener(); 54 55 virtual void FunctionSelectionChanged( 56 FunctionInstance* function) = 0; 57 }; 58 59 60 #endif // IMAGE_FUNCTIONS_VIEW_H 61