OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ProximFindCmd Class Reference

#include <ProximFindCmd.hh>

Inheritance diagram for ProximFindCmd:
Inheritance graph
Collaboration diagram for ProximFindCmd:
Collaboration graph

Public Member Functions

 ProximFindCmd ()
 
virtual ~ProximFindCmd ()
 
virtual bool Do ()
 
virtual int id () const
 
virtual ProximFindCmdcreate () const
 
virtual std::string icon () const
 
virtual bool isEnabled ()
 
- Public Member Functions inherited from GUICommand
 GUICommand (std::string name, wxWindow *parent)
 
virtual ~GUICommand ()
 
virtual bool isChecked () const
 
virtual std::string shortName () const
 
void setParentWindow (wxWindow *view)
 
wxWindow * parentWindow () const
 
std::string name () const
 

Detailed Description

Command for displaying Proxim disassembly search window.

Definition at line 42 of file ProximFindCmd.hh.

Constructor & Destructor Documentation

◆ ProximFindCmd()

ProximFindCmd::ProximFindCmd ( )

Definition at line 42 of file ProximFindCmd.cc.

42 :
44}
static const std::string COMMAND_NAME_FIND
Name of the find command.

Referenced by create().

◆ ~ProximFindCmd()

ProximFindCmd::~ProximFindCmd ( )
virtual

Definition at line 47 of file ProximFindCmd.cc.

47 {
48}

Member Function Documentation

◆ create()

ProximFindCmd * ProximFindCmd::create ( ) const
virtual

Creates and returns a new instance of this command.

Returns
Newly created instance of this command.

Implements GUICommand.

Definition at line 113 of file ProximFindCmd.cc.

113 {
114 return new ProximFindCmd();
115}

References ProximFindCmd().

Here is the call graph for this function:

◆ Do()

bool ProximFindCmd::Do ( )
virtual

Executes the command.

Implements GUICommand.

Definition at line 55 of file ProximFindCmd.cc.

55 {
56
58
59 if (simulation->isSimulationInitialized() ||
60 simulation->isSimulationRunning() ||
61 simulation->isSimulationStopped()) {
62
63 FindWindow* findWindow = dynamic_cast<FindWindow*>(
65 FindWindowById(ProximConstants::ID_FIND_WINDOW));
66
67 if (findWindow == NULL) {
68 findWindow = new FindWindow(ProximToolbox::mainFrame(),
70
72 findWindow, _T("Find pattern in disassembly"), false,
73 wxSize(300, 160));
74 findWindow->GetParent()->Center();
75
76 findWindow->GetParent()->SetSize(300, 160);
77 }
78 } else {
79 ErrorDialog error(parentWindow(), _T("Simulation not initialized."));
80 error.ShowModal();
81 }
82
83 return true;
84}
wxWindow * parentWindow() const
Definition GUICommand.cc:75
static void addFramedWindow(wxWindow *window, const wxString &title, bool stayOnTop=false, const wxSize &minSize=wxSize(100, 100))
static ProximMainFrame * mainFrame()
static TracedSimulatorFrontend * frontend()
bool isSimulationInitialized() const
bool isSimulationStopped() const
bool isSimulationRunning() const

References ProximToolbox::addFramedWindow(), ProximToolbox::frontend(), ProximConstants::ID_FIND_WINDOW, SimulatorFrontend::isSimulationInitialized(), SimulatorFrontend::isSimulationRunning(), SimulatorFrontend::isSimulationStopped(), ProximToolbox::mainFrame(), and GUICommand::parentWindow().

Here is the call graph for this function:

◆ icon()

std::string ProximFindCmd::icon ( ) const
virtual

Returns full path to the command icon file.

Returns
Full path to the command icon file.

Implements GUICommand.

Definition at line 93 of file ProximFindCmd.cc.

93 {
94 return "find.png";
95}

◆ id()

int ProximFindCmd::id ( ) const
virtual

Returns ID of this command.

Implements GUICommand.

Definition at line 102 of file ProximFindCmd.cc.

References ProximConstants::COMMAND_FIND.

◆ isEnabled()

bool ProximFindCmd::isEnabled ( )
virtual

Returns true if the command is enabled, false otherwise.

Returns
Always true.

Implements GUICommand.

Definition at line 124 of file ProximFindCmd.cc.

124 {
125 return true;
126}

The documentation for this class was generated from the following files: