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 14class FunctionInstance; 15 16 17class ImageFunctionsView : public BGroupView, private TreeTableListener { 18public: 19 class Listener; 20 21public: 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 37private: 38 class FunctionsTableModel; 39 40private: 41 // TreeTableListener 42 virtual void TreeTableSelectionChanged(TreeTable* table); 43 44 void _Init(); 45 46private: 47 ImageDebugInfo* fImageDebugInfo; 48 TreeTable* fFunctionsTable; 49 FunctionsTableModel* fFunctionsTableModel; 50 Listener* fListener; 51}; 52 53 54class ImageFunctionsView::Listener { 55public: 56 virtual ~Listener(); 57 58 virtual void FunctionSelectionChanged( 59 FunctionInstance* function) = 0; 60}; 61 62 63#endif // IMAGE_FUNCTIONS_VIEW_H 64