OpenASIP  2.0
ProximBreakpointWindow.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file ProximBreakpointWindow.hh
26  *
27  * Declaration of PorixmBreakpointWindow class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2005 (vjaaskel-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #ifndef TTA_PROXIM_BREAKPOINT_WINDOW
34 #define TTA_PROXIM_BREAKPOINT_WINDOW
35 
36 #include <wx/wx.h>
37 #include <wx/listctrl.h>
38 #include <map>
39 #include "ProximSimulatorWindow.hh"
40 
41 class SimulatorEvent;
42 class StopPointManager;
43 
44 /**
45  * Proxim window for managing simulation breakpoints and watches.
46  */
48 public:
49  ProximBreakpointWindow(ProximMainFrame* parent, wxWindowID id);
50  virtual ~ProximBreakpointWindow();
51  virtual void reset();
52 
53 private:
54  wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
55  wxSizer* createBreakpointTab(
56  wxWindow* parent, bool call_fit = true, bool set_sizer = true);
57  wxSizer* createWatchTab(
58  wxWindow* parent, bool call_fit = true, bool set_sizer = true);
59  void refreshStopPoints();
60  void onClose(wxCommandEvent& event);
61 
63  void onDeleteBreakpoint(wxCommandEvent& event);
64  void onDeleteWatch(wxCommandEvent& event);
65  void onBreakpointLookup(wxCommandEvent& event);
66  void onBreakpointProperties(wxCommandEvent& event);
67  void onBreakpointSelection(wxListEvent& event);
68  void onAddBreakpoint(wxCommandEvent& event);
69  void onAddWatch(wxCommandEvent& event);
70  void onWatchProperties(wxCommandEvent& event);
71 
72  /// List widget for breakpoints.
73  wxListCtrl* breakpointList_;
74  /// List widget for watches.
75  wxListCtrl* watchList_;
76 
77  /// Map for translating breakpoint list item numbers to stop point handles.
78  std::map<unsigned, unsigned> bpListItemHandle_;
79  /// Map for translating watch list item numbers to stop point handles.
80  std::map<unsigned, unsigned> watchListItemHandle_;
81 
82  /// Widget IDs.
83  enum {
84  ID_NOTEBOOK = 10000,
99  };
100 
101  DECLARE_EVENT_TABLE()
102 
103 };
104 #endif
ProximMainFrame
Definition: ProximMainFrame.hh:58
ProximBreakpointWindow::ID_BREAKPOINT_LIST
@ ID_BREAKPOINT_LIST
Definition: ProximBreakpointWindow.hh:97
ProximBreakpointWindow::reset
virtual void reset()
Definition: ProximBreakpointWindow.cc:162
ProximSimulatorWindow.hh
ProximBreakpointWindow::breakpointList_
wxListCtrl * breakpointList_
List widget for breakpoints.
Definition: ProximBreakpointWindow.hh:73
ProximBreakpointWindow::watchList_
wxListCtrl * watchList_
List widget for watches.
Definition: ProximBreakpointWindow.hh:75
ProximBreakpointWindow::onDeleteBreakpoint
void onDeleteBreakpoint(wxCommandEvent &event)
Definition: ProximBreakpointWindow.cc:282
ProximBreakpointWindow::ID_ADD_WATCH
@ ID_ADD_WATCH
Definition: ProximBreakpointWindow.hh:95
ProximBreakpointWindow::ID_BREAKPOINT_ENABLED
@ ID_BREAKPOINT_ENABLED
Definition: ProximBreakpointWindow.hh:92
ProximBreakpointWindow
Definition: ProximBreakpointWindow.hh:47
ProximBreakpointWindow::ID_WATCH_ENABLED
@ ID_WATCH_ENABLED
Definition: ProximBreakpointWindow.hh:96
ProximBreakpointWindow::onBreakpointProperties
void onBreakpointProperties(wxCommandEvent &event)
Definition: ProximBreakpointWindow.cc:138
ProximBreakpointWindow::~ProximBreakpointWindow
virtual ~ProximBreakpointWindow()
Definition: ProximBreakpointWindow.cc:119
ProximBreakpointWindow::ID_WATCH_LIST
@ ID_WATCH_LIST
Definition: ProximBreakpointWindow.hh:98
ProximBreakpointWindow::createBreakpointTab
wxSizer * createBreakpointTab(wxWindow *parent, bool call_fit=true, bool set_sizer=true)
Definition: ProximBreakpointWindow.cc:483
ProximBreakpointWindow::onDeleteWatch
void onDeleteWatch(wxCommandEvent &event)
Definition: ProximBreakpointWindow.cc:344
ProximSimulatorWindow
Definition: ProximSimulatorWindow.hh:47
ProximBreakpointWindow::ID_DELETE_WATCH
@ ID_DELETE_WATCH
Definition: ProximBreakpointWindow.hh:94
ProximBreakpointWindow::ID_DELETE_BREAKPOINT
@ ID_DELETE_BREAKPOINT
Definition: ProximBreakpointWindow.hh:90
StopPointManager
Definition: StopPointManager.hh:50
ProximBreakpointWindow::onWatchProperties
void onWatchProperties(wxCommandEvent &event)
Definition: ProximBreakpointWindow.cc:171
ProximBreakpointWindow::bpListItemHandle_
std::map< unsigned, unsigned > bpListItemHandle_
Map for translating breakpoint list item numbers to stop point handles.
Definition: ProximBreakpointWindow.hh:78
ProximBreakpointWindow::ID_NOTEBOOK
@ ID_NOTEBOOK
Definition: ProximBreakpointWindow.hh:84
ProximBreakpointWindow::onBreakpointLookup
void onBreakpointLookup(wxCommandEvent &event)
Definition: ProximBreakpointWindow.cc:365
ProximBreakpointWindow::ID_LINE
@ ID_LINE
Definition: ProximBreakpointWindow.hh:87
ProximBreakpointWindow::ID_WATCH_PROPERTIES
@ ID_WATCH_PROPERTIES
Definition: ProximBreakpointWindow.hh:93
ProximBreakpointWindow::onBreakpointSelection
void onBreakpointSelection(wxListEvent &event)
Definition: ProximBreakpointWindow.cc:305
ProximBreakpointWindow::createContents
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition: ProximBreakpointWindow.cc:434
ProximBreakpointWindow::refreshStopPoints
void refreshStopPoints()
Definition: ProximBreakpointWindow.cc:195
ProximBreakpointWindow::ID_CLOSE
@ ID_CLOSE
Definition: ProximBreakpointWindow.hh:86
ProximBreakpointWindow::onAddWatch
void onAddWatch(wxCommandEvent &event)
Definition: ProximBreakpointWindow.cc:409
ProximBreakpointWindow::ID_BREAKPOINT_PROPERTIES
@ ID_BREAKPOINT_PROPERTIES
Definition: ProximBreakpointWindow.hh:89
ProximBreakpointWindow::ID_LOOKUP_BREAKPOINT
@ ID_LOOKUP_BREAKPOINT
Definition: ProximBreakpointWindow.hh:88
ProximBreakpointWindow::ID_ADD_BREAKPOINT
@ ID_ADD_BREAKPOINT
Definition: ProximBreakpointWindow.hh:91
ProximBreakpointWindow::onBreakpointsModified
void onBreakpointsModified(SimulatorEvent &event)
Definition: ProximBreakpointWindow.cc:333
SimulatorEvent
Definition: SimulatorEvent.hh:42
ProximBreakpointWindow::ProximBreakpointWindow
ProximBreakpointWindow(ProximMainFrame *parent, wxWindowID id)
Definition: ProximBreakpointWindow.cc:80
ProximBreakpointWindow::watchListItemHandle_
std::map< unsigned, unsigned > watchListItemHandle_
Map for translating watch list item numbers to stop point handles.
Definition: ProximBreakpointWindow.hh:80
ProximBreakpointWindow::onAddBreakpoint
void onAddBreakpoint(wxCommandEvent &event)
Definition: ProximBreakpointWindow.cc:388
ProximBreakpointWindow::ID_HELP
@ ID_HELP
Definition: ProximBreakpointWindow.hh:85
ProximBreakpointWindow::onClose
void onClose(wxCommandEvent &event)
Definition: ProximBreakpointWindow.cc:128
ProximBreakpointWindow::createWatchTab
wxSizer * createWatchTab(wxWindow *parent, bool call_fit=true, bool set_sizer=true)
Definition: ProximBreakpointWindow.cc:528