void CFrobLock::Unlock() { m_Lock->SetLocked(false); // Fire the event OnUnlock(); }
void wxGISRubberEnvelope::OnMouseUp(wxMouseEvent& event) { IDisplayTransformation* pDT = m_pCachedDisplay->GetDisplayTransformation(); wxPoint Points[2]; Points[0] = wxPoint(m_StartX, m_StartY); Points[1] = wxPoint(event.GetX(), event.GetY()); OGRRawPoint* pOGRPoints = pDT->TransformCoordDC2World(Points, 2); OGRLineString* pLine = new OGRLineString(); pLine->setPoints(2, pOGRPoints); m_pRetGeom = static_cast<OGRGeometry*>(pLine); delete [] pOGRPoints; OnUnlock(); }
void wxGISRubberBand::OnKeyDown(wxKeyEvent & event) { switch(event.GetKeyCode()) { case WXK_ESCAPE: { wxClientDC CDC(m_pWnd); m_pCachedDisplay->OnDraw(CDC); } OnUnlock(); break; default: break; } event.Skip(); }