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

editwpt.c File Reference

Waypoint edition. More...

#include <PalmOS.h>
#include <PalmCompatibility.h>
#include <Graffiti.h>
#include <string.h>
#include "gtalkRsc.h"
#include "latlong.h"
#include "MathLib.h"
#include <stdio.h>
#include "gpslib.h"
#include "gtalk.h"
#include "gpsutil.h"
#include "dbio.h"

Functions

void EditListDraw (Int16 itemNum, RectanglePtr bounds, CharPtr *itemsText) EDIT_SECTION
 Callback proc.

void updateLatButtons (double latitude) EDIT_SECTION
 Set content of latitude buttons from given latitude.

void updateLonButtons (double longitude) EDIT_SECTION
 Set content of longitude buttons from given longitude.

void DegreToButtons (double latitude, double longitude) EDIT_SECTION
 Display latitude and longitude on latitude and longitude buttons.

double ReadLon (void)
 Get longitude from longitude buttons.

double ReadLat ()
 Get latitude from latitude buttons.

void SetButtons (int firstbutton, char *maskp, char *datas, char label[][2])
 Sets buttons contents from given mask and datas.

Err CustomToDBWpt (Custom_Wpt_Type *pcust, LocalFormatID format, long index, Boolean merge)
 Converts the given Custom_Wpt_Type waypoint to an object of given format and place it in waypoint data base.

Boolean EditFormHandleEvent (EventPtr e)
 Edit form event handler.


Variables

char LatButtonsValues [12][2]
char LonButtonsValues [13][2]
const char * ListChoices []
char LatMask [3][13]
char LonMask [3][14]
const char * LocalId2String [] = {"Unkn", "D100","D101", "D102", "D103", "D104", "D105", "D106", "D107", "D108", "", "", "", "", "", "", "", "", "", "", "D109"}


Detailed Description

Waypoint edition.

Author:
C. Claveleira
Date:
1999-2004

Function Documentation

Err CustomToDBWpt Custom_Wpt_Type pcust,
LocalFormatID  format,
long  index,
Boolean  merge
[static]
 

Converts the given Custom_Wpt_Type waypoint to an object of given format and place it in waypoint data base.

Parameters:
pcust pointeur on Custom_Wpt_Type waypoint type
format format to convert to
index If >= 0 : index of record to replace If < 0 : new record to create
merge If != 0 the Custom_Wpt_Type waypoint is to be merged with the record of index index
Returns:
0 if OK

void DegreToButtons double  latitude,
double  longitude
[static]
 

Display latitude and longitude on latitude and longitude buttons.

Parameters:
latitude latitude to display
longitude longitude to display
Returns:
nothing

Boolean EditFormHandleEvent EventPtr  e  ) 
 

Edit form event handler.

Parameters:
e event
Returns:
conventional handled

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

Callback proc.

to draw waypoints symbols in symbols list

Parameters:
itemNum item number to draw
bounds bounds to display in
itemsText 
Returns:
nothing

double ReadLat  )  [static]
 

Get latitude from latitude buttons.

Returns:
latitude

double ReadLon void   )  [static]
 

Get longitude from longitude buttons.

Returns:
longitude

void SetButtons int  firstbutton,
char *  maskp,
char *  datas,
char  label[][2]
[static]
 

Sets buttons contents from given mask and datas.

Parameters:
firstbutton id of first button (left)
maskp mask (format) to apply
datas datas to display on buttons
label string array where to put static labels
Returns:
nothing

void updateLatButtons double  latitude  )  [static]
 

Set content of latitude buttons from given latitude.

Parameters:
latitude latitude to display
Returns:
nothing

void updateLonButtons double  longitude  )  [static]
 

Set content of longitude buttons from given longitude.

Parameters:
longitude longitude to display
Returns:
nothing


Variable Documentation

char LatMask[3][13] [static]
 

Initial value:

 {             
    "00°60.000'N",                     
    "00°60'60.0\"N",                   
    "00.00000°N"                       
}

const char* ListChoices[] [static]
 

Initial value:

    { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "N", "S", "W", "E" }

char LonMask[3][14] [static]
 

Initial value:

 {
    "200°60.000'W",                    
    "200°60'60.0\"W",                  
    "200.00000°W"                      
}


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