Main Page | Alphabetical List | Data Structures | File List | Globals | Related Pages

route.c File Reference

Routes management part of GPilotS. More...

#include <PalmOS.h>
#include <PalmCompatibility.h>
#include "gtalkRsc.h"
#include "gpslib.h"
#include "gtalk.h"
#include "route.h"
#include "gpsutil.h"
#include "log.h"
#include "dbio.h"
#include "map.h"
#include "ExgMgr.h"

Defines

#define LastWptName   "TOTAL:"
#define XName   0
#define XDist   82
#define XBear   110

Functions

void RouteListDraw (Int16 itemNum, RectanglePtr bounds, CharPtr *itemsText) ROUTE_SECTION
 Display route items in list.

double LengthOfRoute (int index, Boolean exceptlast) ROUTE_SECTION
 Computes the length of a route.

Err EditRouteRecord (UInt recindex, UInt objindex, Object *objp)
 Insertion, deletion of objects in a route record.

void WptDraw (Int16 itemNum, RectanglePtr bounds, CharPtr *itemsText) ROUTE_SECTION
 Display waypoints name.

Boolean RteEditFormHandleEvent (EventPtr e)
 Creation and edition of routes.

Boolean RouteFormHandleEvent (EventPtr e)
 Route form event handler.

UInt NewRouteNumber ()
 Search a free route number in current category.

Err CopyOrCreateRoute (Custom_Rte_Hdr_Type *RteHdrp, UInt16 index, Boolean new)
 Duplicate or create a route.

void SearchWptInRoutes (void)

Variables

Boolean uneditable


Detailed Description

Routes management part of GPilotS.

Author:
C. Claveleira
Date:
1999-2004

Function Documentation

Err CopyOrCreateRoute Custom_Rte_Hdr_Type RteHdrp,
UInt16  index,
Boolean  new
 

Duplicate or create a route.

Parameters:
RteHdrp pointer on the new route header
index index of route to duplicate (if new not set)
new if true a route is to created, else given route is to be duplicated
Returns:
error code

Err EditRouteRecord UInt  recindex,
UInt  objindex,
Object objp
 

Insertion, deletion of objects in a route record.

Parameters:
recindex index of route record in routes database
objindex index of object in route to delete or where to insert a new object
objp pointer on object to insert. If null, delete objindex, else insert *objp at objindex
Returns:
0 if ok

double LengthOfRoute int  index,
Boolean  exceptlast
 

Computes the length of a route.

Parameters:
index index of the route to compute length of
exceptlast if true the last waypoint is ignored
Returns:
length in units length set in preferences

UInt NewRouteNumber void   ) 
 

Search a free route number in current category.

Returns:
route number

Boolean RouteFormHandleEvent EventPtr  e  ) 
 

Route form event handler.

Parameters:
e pointer on event to handle
Returns:
true if evet handled

void RouteListDraw Int16  itemNum,
RectanglePtr  bounds,
CharPtr *  itemsText
[static]
 

Display route items in list.

Parameters:
itemNum item number in the list
bounds bounds of drawing rectangle
itemsText not used
Returns:
nothing

Boolean RteEditFormHandleEvent EventPtr  e  ) 
 

Creation and edition of routes.

Parameters:
e event
Returns:
true if nothing more to do

void WptDraw Int16  itemNum,
RectanglePtr  bounds,
CharPtr *  itemsText
[static]
 

Display waypoints name.

List callback proc.

Parameters:
itemNum list item number
bounds bounds to draw
itemsText unused
Returns:
nothing


Generated on Sun Mar 13 09:36:01 2005 for GPilotS by doxygen 1.3.6