static void OnPaintAirspacePicto(WindowControl * Sender, LKSurface& Surface){ (void)Sender; WndFrame *wPicto = ((WndFrame *)wf->FindByName(TEXT("frmAirspacePicto"))); LKASSERT(wPicto!=NULL); const RECT rc = wPicto->GetClientRect(); Surface.SelectObject(LKPen_Petrol_C2); Surface.SelectObject(LKBrush_Petrol); Surface.Rectangle(rc.left,rc.top,rc.right,rc.bottom); Surface.SetBkColor(RGB_LIGHTGREY); /**************************************************************** * for drawing the airspace pictorial, we need the original data. * copy contain only base class property, not geo data, * original data are shared ressources ! * for that we need to grant all called methods are thread safe ****************************************************************/ { CCriticalSection::CGuard guard(CAirspaceManager::Instance().MutexRef()); CAirspace* airspace = CAirspaceManager::Instance().GetAirspacesForDetails(); if(airspace) { airspace->DrawPicto(Surface, rc); } } }
static void OnPaintWaypointPicto(WindowControl * Sender, LKSurface& Surface) { (void) Sender; if (wf) { WndFrame *wPicto = ((WndFrame *) wf->FindByName(TEXT("frmWaypointPicto"))); if (wPicto) { const RECT rc = wPicto->GetClientRect(); MapWindow::DrawWaypointPictoBg(Surface, rc); LKASSERT(ValidWayPoint(SelectedWaypoint)); if (WayPointCalc[SelectedWaypoint].IsLandable) { MapWindow::DrawRunway(Surface, &WayPointList[SelectedWaypoint], rc, 4000, true); } else { MapWindow::DrawWaypointPicto(Surface, rc, &WayPointList[SelectedWaypoint]); } } } }
static void OnTaskPointPicto(WindowControl * Sender, LKSurface& Surface) { (void) Sender; WndFrame *wPicto = ((WndFrame *) wf->FindByName(TEXT("frmTaskPointPicto"))); if(wPicto) { /********************/ ReadValues(); GetWaypointValues(); // CalculateTaskSectors(); // if (AATEnabled) // CalculateAATTaskSectors(); RefreshTask(); /*******************/ const RECT rc = wPicto->GetClientRect(); MapWindow::DrawWaypointPictoBg(Surface, rc); MapWindow::DrawTaskPicto(Surface, twItemIndex, rc, 2000); } }