1/* 2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5#ifndef BREAKPOINT_LIST_VIEW_H 6#define BREAKPOINT_LIST_VIEW_H 7 8 9#include <GroupView.h> 10 11#include "table/Table.h" 12 13 14class Team; 15class UserBreakpoint; 16class Watchpoint; 17 18 19class BreakpointListView : public BGroupView, private TableListener { 20public: 21 class Listener; 22 23public: 24 BreakpointListView(Team* team, 25 Listener* listener); 26 ~BreakpointListView(); 27 28 static BreakpointListView* Create(Team* team, Listener* listener); 29 // throws 30 31 void UnsetListener(); 32 33 void SetBreakpoint(UserBreakpoint* breakpoint, 34 Watchpoint* watchpoint); 35 36 void UserBreakpointChanged( 37 UserBreakpoint* breakpoint); 38 void WatchpointChanged( 39 Watchpoint* breakpoint); 40 41 void LoadSettings(const BMessage& settings); 42 status_t SaveSettings(BMessage& settings); 43 44private: 45 class BreakpointsTableModel; 46 47private: 48 // TableListener 49 virtual void TableSelectionChanged(Table* table); 50 51 void _Init(); 52 53private: 54 Team* fTeam; 55 UserBreakpoint* fBreakpoint; 56 Watchpoint* fWatchpoint; 57 Table* fBreakpointsTable; 58 BreakpointsTableModel* fBreakpointsTableModel; 59 Listener* fListener; 60}; 61 62 63class BreakpointListView::Listener { 64public: 65 virtual ~Listener(); 66 67 virtual void BreakpointSelectionChanged( 68 UserBreakpoint* breakpoint) = 0; 69 70 virtual void WatchpointSelectionChanged( 71 Watchpoint* watchpoint) = 0; 72}; 73 74 75#endif // BREAKPOINT_LIST_VIEW_H 76