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

gtalk.h File Reference

main include file More...

#include "types.h"
#include "sections.h"

Go to the source code of this file.

Data Structures

struct  PrefType
 Preferences structure. More...

struct  RecordSeparator

Defines

#define GPilotSID   'GPil'
#define WptDBType   'Wpts'
#define TrkDBType   'Trks'
#define RteDBType   'Rtes'
#define LogDBType   'Logs'
#define WptDBName   "WptDB-GPil"
#define TrkDBName   "TrkDB-GPil"
#define RteDBName   "RteDB-GPil"
#define LogDBName   "LogDB-GPil"
#define GPilotSPrefID   0
#define DBVersion   2
#define MaxRecordSize   62000
#define WinDrawChar(theChar, x, y)   do{char mw_buf[1];mw_buf[0]=(theChar);WinDrawChars (mw_buf, 1 , (x), (y));}while(0)
#define GTALKDBG_INFOS   128
#define GTALKDBG_CALLS   32
#define GTALKDBG_UNEXP   8
#define LATMAX   0x3fffffffL
#define LATMIN   0xC0000000L
#define LONMAX   0x7fffffffL
#define LONMIN   0x80000000L
#define LONMAX23   0x55555554L
#define LONMIN23   0xAAAAAAACL
#define DELTALONMAX   0X38E38E38
#define GErrNoError   0
#define GErrUnsupportedFmt   appErrorClass + 1
#define GErrProtocolError   appErrorClass + 2
#define GErrNoHandle   appErrorClass + 3

Typedefs

typedef enum ItemToDisplay ItemToDisplay
typedef enum WptSortCritType WptSortCritType
typedef enum EditWptMode EditWptMode

Enumerations

enum  ItemToDisplay { DispUnknown, DispWpt, DispRte, DispTrk }
 Item type to display in main form.

enum  WptSortCritType {
  Alpha, Dist, Lat, Lon,
  Symbol, Alt, Bear, Current
}
 waypoint sort criteria enum

enum  EditWptMode { EditWpt, NewWpt, MarkWpt, FromRefWpt }

Functions

Boolean EditFormHandleEvent (EventPtr e) EDIT_SECTION
 Edit form event handler.

Int CompareWpt (void *p1, void *p2, Int other, SortRecordInfoPtr sp1, SortRecordInfoPtr sp2, VoidHand aph)
 Compares two waypoints features according to Prefs.wptsortcrit.

void SortWpts (WptSortCritType s)
 Sort waypoints according to given criteria.

long SearchWptByName (char *name, Boolean exact, Boolean all)
 Search waypoint by name.

int SetReferencePt (UInt index, Boolean ask)
 Set reference point to waypoint whose index is passed if user confirms.

void DrawSymbol (unsigned int lid, int x, int y)
 Draws a waypoint symbol centered at given coordinates.

void MainListDraw (Int16 itemNum, RectanglePtr bounds, CharPtr *itemsText)
 Draws an item of the main page's list.

void SetPreferences (void)
 Display and setting of preferences with a modal form.

Boolean RecIsSecret (DmOpenRef *DBP, UInt16 index)
 Tests if a record has secret attribute.

Err SetBackupBit (DmOpenRef *DBP)
 Set the backup flag of the given data base.


Variables

PrefType Prefs
DmOpenRef CurrentDB
DmOpenRef WptDB
DmOpenRef TrkDB
DmOpenRef RteDB
UInt CurrentRecordIndex
UInt * CurrentCategory
Semicircle_Type CurrentWGS84Pos
char ReferencePtName []
char * BeamTypes []
Semicircle_Type ReferencePt
Boolean OnlyNews
Boolean Furuno
Boolean CompactTracks
Boolean MainListDirty
EditWptMode EditMode
const char * DistanceUnitNames []
char gbuf1 [512]
char gbuf2 [128]
Boolean MustCallGpslibTicks


Detailed Description

main include file

Author:
C. Claveleira
Date:
1999-2004

Function Documentation

Int CompareWpt void *  p1,
void *  p2,
Int  other,
SortRecordInfoPtr  sp1,
SortRecordInfoPtr  sp2,
VoidHand  aph
 

Compares two waypoints features according to Prefs.wptsortcrit.

Used as callback.

Parameters:
p1 pointer on first waypoint
p2 pointer on second waypoint
other ignored
sp1 ignored
sp2 ignored
aph ignored
Returns:
>0 if *p1>*p2, 0 if *p1==*p2, <0 if *p1<*p2

void DrawSymbol unsigned int  lid,
int  x,
int  y
 

Draws a waypoint symbol centered at given coordinates.

Parameters:
lid local bitmap index
x x coordinate of center
y y coordinate of center
Returns:
nothing

Boolean EditFormHandleEvent EventPtr  e  ) 
 

Edit form event handler.

Parameters:
e event
Returns:
conventional handled

void MainListDraw Int16  itemNum,
RectanglePtr  bounds,
CharPtr *  itemsText
 

Draws an item of the main page's list.

Take appropriate actions given the type of the object concerned and the display and sort options.

Parameters:
itemNum item number
bounds rectangle to draw into
itemsText ignored
Returns:
nothing

Boolean RecIsSecret DmOpenRef *  DBP,
UInt16  index
 

Tests if a record has secret attribute.

Parameters:
DBP pointer on an open data base
index index of record to test
Returns:
true if secret attribute set

long SearchWptByName char *  name,
Boolean  exact,
Boolean  all
 

Search waypoint by name.

Parameters:
name part of name to search (null terminated)
exact if true, name contains the exact string to search si false,name contains the begining of the name to search
all si true, search in all categories else search in current category
Returns:
index of wayoint if found, -1 else

Err SetBackupBit DmOpenRef *  DBP  ) 
 

Set the backup flag of the given data base.

Parameters:
DBP DmOpenRef to the data base
Returns:
nothing

void SetPreferences void   ) 
 

Display and setting of preferences with a modal form.

Returns:
nothing

int SetReferencePt UInt  index,
Boolean  ask
 

Set reference point to waypoint whose index is passed if user confirms.

Parameters:
index index of waypoint record
ask 1 -> a confirmation dialog is displayed, 0 -> it's set without asking
Returns:
1 if user accepts, 0 otherwise

void SortWpts WptSortCritType  s  ) 
 

Sort waypoints according to given criteria.

If allready sorted following given criteria nothing is done except if s == Current.

Parameters:
s sort criteria. If s == Current, the sort is forced on current criteria
Returns:
nothing


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