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 void LoadSettings(const BMessage& settings); 35 status_t SaveSettings(BMessage& settings); 36 37 private: 38 class FunctionsTableModel; 39 40 private: 41 // TreeTableListener 42 virtual void TreeTableSelectionChanged(TreeTable* table); 43 44 void _Init(); 45 46 private: 47 ImageDebugInfo* fImageDebugInfo; 48 TreeTable* fFunctionsTable; 49 FunctionsTableModel* fFunctionsTableModel; 50 Listener* fListener; 51 }; 52 53 54 class ImageFunctionsView::Listener { 55 public: 56 virtual ~Listener(); 57 58 virtual void FunctionSelectionChanged( 59 FunctionInstance* function) = 0; 60 }; 61 62 63 #endif // IMAGE_FUNCTIONS_VIEW_H 64