Go to the documentation of this file.
33 #include <wx/cursor.h>
85 wxCursor connectCursor(wxCURSOR_CROSS);
86 canvas_->SetCursor(connectCursor);
96 canvas_->SetCursor(wxNullCursor);
115 wxPoint position =
event.GetPosition();
116 long logicalX = dc.DeviceToLogicalX(position.x);
117 long logicalY = dc.DeviceToLogicalY(position.y);
122 std::vector<EditPart*> nearbyParts;
127 vector<EditPart*> sources;
130 if(toSelect != NULL) {
136 if((selection == NULL || selection ==
target_)
137 && !nearbyParts.empty()) {
138 sources = nearbyParts;
139 }
else if(selection !=
target_) {
140 sources.push_back(selection);
143 if(!sources.empty()) {
144 for(
unsigned int i = 0; i < sources.size(); i++) {
164 if (event.LeftUp()) {
168 if (event.RightUp()) {
182 if (part != NULL && part->
canHandle(request)) {
184 if (command != NULL )
204 if (part != NULL && part->
canHandle(request)) {
205 if (selection == NULL &&
source_ == NULL) {
212 wxGetApp().docManager()->GetCurrentDocument())->getModel();
241 wxMenu* contextMenu =
new wxMenu();
254 contextMenu->AppendSeparator();
258 wxPoint position =
event.GetPosition();
259 view_->
canvas()->PopupMenu(contextMenu, wxPoint(position.x, position.y));
287 if (socket == NULL) {
299 if (segment == NULL) {
304 if (socket != NULL && port != NULL) {
322 if (socket != NULL && segment != NULL) {
EditPart * findEditPart(int x, int y)
void setStatus(const wxString text, int field=0)
bool isEnabled(const std::string command)
MachineCanvas * canvas() const
ComponentCommand * performRequest(Request *request) const
static const std::string CMD_NAME_PASTE
Command name for the "Paste" command.
void notifyObservers(bool modified=true)
void popFromStack(bool modified=false)
bool isConnectedTo(const Bus &bus) const
TTAMachine::MachinePart * model() const
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
int findEditPartsInRange(int x, int y, int range, std::vector< EditPart * > &found)
bool canHandle(Request *request) const
@ STATUS_REQUEST
Status request.
virtual bool isConnectedTo(const Socket &socket) const
bool hasEditPart(const EditPart *part) const
static const std::string CMD_NAME_REDO
Command name for the "Redo" command.