Go to the documentation of this file.
35 #include <wx/gdicmn.h>
118 wxPoint position =
event.GetPosition();
121 long logicalX = dc.DeviceToLogicalX(position.x);
122 long logicalY = dc.DeviceToLogicalY(position.y);
131 if (part != NULL && part->
canHandle(request)) {
133 if (command != NULL) {
143 if (event.LeftUp()) {
147 if (event.RightDown()) {
155 if (event.ButtonDClick(1)) {
162 wxGetApp().mainFrame()->updateUI();
193 wxMenu* contextMenu = NULL;
202 contextMenu =
new wxMenu();
207 contextMenu->AppendSeparator();
230 view_->
canvas()->PopupMenu(contextMenu, wxPoint(x,y));
240 wxMenu* popupMenu =
new wxMenu();
254 popupMenu->AppendSeparator();
256 wxMenu* addSubMenu =
new wxMenu;
258 _T(
"&Function Unit..."));
260 _T(
"&Register File..."));
262 _T(
"&Transport Bus..."));
268 _T(
"&Immediate Unit..."));
270 _T(
"&Global Control Unit..."));
272 _T(
"&Address Space..."));
276 _T(
"Edit &Connections"));
279 popupMenu->AppendSeparator();
EditPart * findEditPart(int x, int y)
void setParentWindow(wxWindow *view)
void setStatus(const wxString text, int field=0)
bool isEnabled(const std::string command)
@ COMMAND_EDIT_CONNECTIONS
MachineCanvas * canvas() const
ComponentCommand * performRequest(Request *request) const
static const std::string CMD_NAME_MODIFY_COMP
Command name for the "Modify Component" command.
void setView(wxView *view)
static const std::string CMD_NAME_PASTE
Command name for the "Paste" command.
static const std::string CMD_NAME_COPY
Command name for the "Copy" command.
void select(EditPart *part)
static const std::string CMD_NAME_UNDO
Command name for the "Undo" command.
find Finds info of the inner loops in the false
bool canHandle(Request *request) const
static const std::string CMD_NAME_CUT
Command name for the "Cut" command.
@ STATUS_REQUEST
Status request.
static const std::string CMD_NAME_REDO
Command name for the "Redo" command.