OpenASIP
2.0
|
#include <ProximDebuggerWindow.hh>
Public Member Functions | |
ProximDebuggerWindow (ProximMainFrame *parent, int id) | |
virtual | ~ProximDebuggerWindow () |
virtual void | reset () |
void | loadProgram (const TTAProgram::Program &program) |
void | updateAnnotations () |
void | loadSourceCode (wxString sourceFile) |
void | setLineAttributes (int lineNum, wxTextAttr style) |
void | highlightLine (int lineNum) |
void | showLine (int lineNum) |
Private Types | |
enum | { ID_SOURCEFILE_CHOICE = 19000, ID_SOURCECODE } |
Private Member Functions | |
void | onProgramLoaded (const SimulatorEvent &event) |
void | onSimulationStop (const SimulatorEvent &event) |
void | onSourceFileChoice (wxCommandEvent &event) |
wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
Private Attributes | |
wxString | currentFile_ |
std::vector< int > | currentLineNums_ |
wxChoice * | sourceFileList_ |
wxTextCtrl * | sourceCodeText_ |
Additional Inherited Members | |
Protected Member Functions inherited from ProximSimulatorWindow | |
ProximSimulatorWindow (ProximMainFrame *mainFrame, wxWindowID id=-1, wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, long style=wxTAB_TRAVERSAL) | |
virtual | ~ProximSimulatorWindow () |
Proxim subwindow which displays program source code annotations.
This window listens to SimulatorEvents and updates the window contents automatically.
Definition at line 54 of file ProximDebuggerWindow.hh.
|
private |
Enumerator | |
---|---|
ID_SOURCEFILE_CHOICE | |
ID_SOURCECODE |
Definition at line 82 of file ProximDebuggerWindow.hh.
ProximDebuggerWindow::ProximDebuggerWindow | ( | ProximMainFrame * | parent, |
int | id | ||
) |
Definition at line 58 of file ProximDebuggerWindow.cc.
References ProximToolbox::program().
|
virtual |
Definition at line 68 of file ProximDebuggerWindow.cc.
|
private |
Creates the window contents.
Code generated by wxDesigner.
Definition at line 250 of file ProximDebuggerWindow.cc.
void ProximDebuggerWindow::highlightLine | ( | int | lineNum | ) |
Highlights line of code in the sourceCodeText_ widget
lineNum | Source code line number. |
Definition at line 185 of file ProximDebuggerWindow.cc.
void ProximDebuggerWindow::loadProgram | ( | const TTAProgram::Program & | program | ) |
Loads a program model to the window.
program | Program to load. |
Definition at line 91 of file ProximDebuggerWindow.cc.
References TTAProgram::Move::hasSourceFileName(), program, TTAProgram::Move::sourceFileName(), and WxConversion::toWxString().
void ProximDebuggerWindow::loadSourceCode | ( | wxString | sourceFile | ) |
Loads source code into the sourceCodeText_ widget
sourceFile | Absolute file location as wxString. |
Definition at line 155 of file ProximDebuggerWindow.cc.
|
private |
Event handler which is called when a new program is loaded in the simulator.
Definition at line 211 of file ProximDebuggerWindow.cc.
References ProximToolbox::program().
|
private |
Event handler which is called when simulation step ends.
Definition at line 220 of file ProximDebuggerWindow.cc.
|
private |
Event handler for drop-down list selection.
Loads selected source code from the drop-down list.
Definition at line 237 of file ProximDebuggerWindow.cc.
|
virtual |
Resets the window when a new program or machine is being loaded in the simulator.
Reimplemented from ProximSimulatorWindow.
Definition at line 77 of file ProximDebuggerWindow.cc.
void ProximDebuggerWindow::setLineAttributes | ( | int | lineNum, |
wxTextAttr | style | ||
) |
Sets certain style attributes to the line in sourceCodeText_ widget
lineNum | Line number |
style | Style attributes (text color, background color, font, alignment) |
Definition at line 170 of file ProximDebuggerWindow.cc.
void ProximDebuggerWindow::showLine | ( | int | lineNum | ) |
Makes line visible in the sourceCodeText_ widget
lineNum | Source code line number. |
Definition at line 202 of file ProximDebuggerWindow.cc.
void ProximDebuggerWindow::updateAnnotations | ( | ) |
Parses possible annotations in the current instruction and hilights source code lines.
Definition at line 123 of file ProximDebuggerWindow.cc.
References TTAProgram::Move::hasSourceLineNumber(), TTAProgram::Program::instructionAt(), TTAProgram::Instruction::move(), TTAProgram::Instruction::moveCount(), ProximToolbox::program(), TTAProgram::Move::sourceFileName(), TTAProgram::Move::sourceLineNumber(), and WxConversion::toWxString().
|
private |
Definition at line 73 of file ProximDebuggerWindow.hh.
|
private |
Definition at line 75 of file ProximDebuggerWindow.hh.
|
private |
Definition at line 79 of file ProximDebuggerWindow.hh.
|
private |
Definition at line 77 of file ProximDebuggerWindow.hh.