1 /* 2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef STACK_TRACE_VIEW_H 6 #define STACK_TRACE_VIEW_H 7 8 #include <GroupView.h> 9 10 #include "table/Table.h" 11 #include "Team.h" 12 13 14 class StackFrame; 15 16 17 class StackTraceView : public BGroupView, private TableListener { 18 public: 19 class Listener; 20 21 public: 22 StackTraceView(Listener* listener); 23 ~StackTraceView(); 24 25 static StackTraceView* Create(Listener* listener); 26 // throws 27 28 void UnsetListener(); 29 30 void SetStackTrace(StackTrace* stackTrace); 31 void SetStackFrame(StackFrame* stackFrame); 32 33 void LoadSettings(const BMessage& settings); 34 status_t SaveSettings(BMessage& settings); 35 36 void SetStackTraceClearPending(); 37 38 private: 39 class FramesTableModel; 40 41 private: 42 // TableListener 43 virtual void TableSelectionChanged(Table* table); 44 45 void _Init(); 46 47 private: 48 StackTrace* fStackTrace; 49 Table* fFramesTable; 50 FramesTableModel* fFramesTableModel; 51 bool fTraceClearPending; 52 Listener* fListener; 53 }; 54 55 56 class StackTraceView::Listener { 57 public: 58 virtual ~Listener(); 59 60 virtual void StackFrameSelectionChanged( 61 StackFrame* frame) = 0; 62 }; 63 64 65 #endif // STACK_TRACE_VIEW_H 66