void ProcCommand() { string comName = GetEventData(); string nodName = GetEventData(); switch(nodName) { case "B_OK": if(comName=="activate" || comName=="click") { ExecuteSailorPayment(); PostEvent("evntDoPostExit",1,"l",RC_INTERFACE_SALARY_EXIT); } break; case "B_CANCEL": if(comName=="activate" || comName=="click") { SkipSailorPayment(); PostEvent("evntDoPostExit",1,"l",RC_INTERFACE_SALARY_EXIT); } if(comName=="upstep") { if(GetSelectable("B_OK")) {SetCurrentNode("B_OK");} } break; } }
// Remove an item from the drawing... void CTinyCadDoc::Delete( drawingIterator it) { CDrawingObject *pointer = *it; pointer->Display(); if (pointer == GetSelectable()) { SetSelectable( NULL ); } UnSelect(pointer); MarkDeleteForUndo( *it ); delete *it; m_drawing.erase( it ); SetModifiedFlag( TRUE ); }
// Delete the selected objects! void CTinyCadDoc::SelectDelete() { if (!IsSelected()) return; CJunctionUtils j( this ); drawingIterator it = GetDrawingBegin(); while (it != GetDrawingEnd()) { drawingIterator current = it; ++ it; CDrawingObject *pointer = *current; if (IsSelected( pointer )) { if (pointer == GetSelectable()) { SetSelectable( NULL ); } j.AddObjectToTodo( pointer ); MarkDeleteForUndo( pointer ); m_drawing.erase( current ); pointer->Display(); delete pointer; } } m_selected.erase( m_selected.begin(), m_selected.end() ); // ... and perform the junction requirements... j.CheckTodoList( true ); SetModifiedFlag( TRUE ); }