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 FunctionInstance; 16 17 18 class ImageFunctionsView : public BGroupView, private TreeTableListener { 19 public: 20 class Listener; 21 22 public: 23 ImageFunctionsView(Listener* listener); 24 ~ImageFunctionsView(); 25 26 static ImageFunctionsView* Create(Listener* listener); 27 // throws 28 29 void UnsetListener(); 30 31 void SetImageDebugInfo( 32 ImageDebugInfo* imageDebugInfo); 33 void SetFunction(FunctionInstance* function); 34 35 void LoadSettings(const BMessage& settings); 36 status_t SaveSettings(BMessage& settings); 37 38 private: 39 class FunctionsTableModel; 40 class SourcePathComponentNode; 41 42 private: 43 // TreeTableListener 44 virtual void TreeTableSelectionChanged(TreeTable* table); 45 46 void _Init(); 47 48 private: 49 ImageDebugInfo* fImageDebugInfo; 50 TreeTable* fFunctionsTable; 51 FunctionsTableModel* fFunctionsTableModel; 52 Listener* fListener; 53 }; 54 55 56 class ImageFunctionsView::Listener { 57 public: 58 virtual ~Listener(); 59 60 virtual void FunctionSelectionChanged( 61 FunctionInstance* function) = 0; 62 }; 63 64 65 #endif // IMAGE_FUNCTIONS_VIEW_H 66