Example #1
0
 void Draw(Canvas &canvas) {
   for (auto it = waypoints.begin(), end = waypoints.end(); it != end; ++it)
     DrawWaypoint(canvas, *it);
 }
Example #2
0
 void Draw(Canvas &canvas) {
   for (const VisibleWaypoint &vwp : waypoints)
     DrawWaypoint(canvas, vwp);
 }
static void UpdateDisplay(void) {

	UInt16 j;
	const char timer[] = "\024";

	PFScreenLock(false);
	
	GUIFormDraw();
	/*
	 * make sure that the selected waypoint is kept high-lighted i.e.
	 * move the list selector if the waypoint moves position in the list
	 *
	 */


	if (selectedWaypointID != UNSELECTED && proxList.waypoints[currentSelection].id != selectedWaypointID) {

		/*
		 * look for the waypoint ID in the list
		 *
		 */

		for (j=0;j<proxList.numWaypoints;j++) {
			if (proxList.waypoints[j].id == selectedWaypointID) {
				currentSelection = j;
				break;
			}
		}

		/*
		 * didn't find it? Clear the list selection
		 *
		 */

		if (j == proxList.numWaypoints) {
			currentSelection = noListSelection;
			selectedWaypointID = UNSELECTED;
		}
	}
	if (GUIMenuIsDisplayed()) return;

	SetupScrollbar();

	for (j=0;j<numProxWaypointsToDisplay;j++) {

		DrawWaypoint(j);

	}
	
	if (newProxList == &proxList) {
		
		FntSetFont(symbolFont);
		PFDrawChars(timer,1, StandardPageWidth-20,0);

	} else {

		FntSetFont(stdFont);
		PFDrawChars("    ",4, StandardPageWidth-20,0);
		
	}
	
	if (HSIMiniPanel) HSIMiniPanelDraw(HSIMiniPanel);

	PFScreenUnlock();


#ifdef ALTERNATE

	if (newProxList == &proxList) {

		PFScreenRectType r;
		FormPtr       f = FrmGetActiveForm();

		FrmGetObjectBounds(f, FrmGetObjectIndex(f, displayFilter + DvAirfieldPushbutton),
				&r);

		DrawAlignedChars(timer, ALIGNCENTRE, r.x1+r.extent.x/2,
				r.y1+r.extent.y/2 - FntLineHeight()/2);

	} else {

		CtlDrawControl(GetObjectPtr(FrmGetActiveForm(), displayFilter+DvAirfieldPushbutton));

	}

#endif
	PFSendSimpleEvent(evtScreenRedrawn);

}