27 #include "select_item.h"
29 #include "model/track.h"
30 #include "model/route.h"
32 #define SELTYPE_UNKNOWN 0x0001
33 #define SELTYPE_ROUTEPOINT 0x0002
34 #define SELTYPE_ROUTESEGMENT 0x0004
35 #define SELTYPE_TIDEPOINT 0x0008
36 #define SELTYPE_CURRENTPOINT 0x0010
37 #define SELTYPE_ROUTECREATE 0x0020
38 #define SELTYPE_AISTARGET 0x0040
39 #define SELTYPE_MARKPOINT 0x0080
40 #define SELTYPE_TRACKSEGMENT 0x0100
41 #define SELTYPE_DRAGHANDLE 0x0200
48 const bool show_nav_objects;
50 const double chart_scale;
51 SelectCtx(
bool s,
double _scale,
double _chart_scale) : show_nav_objects(s),
scale(_scale), chart_scale(_chart_scale) {}
59 void SetSelectPixelRadius(
int radius) { pixelRadius = radius; }
61 bool IsSelectableRoutePointValid(
RoutePoint *pRoutePoint);
62 bool AddSelectableRoutePoint(
float slat,
float slon,
64 bool AddSelectableRouteSegment(
float slat1,
float slon1,
float slat2,
68 bool AddSelectableTrackSegment(
float slat1,
float slon1,
float slat2,
74 SelectableItemList FindSelectionList(
SelectCtx& ctx,
float slat,
float slon,
77 bool DeleteAllSelectableRouteSegments(
Route *);
78 bool DeleteAllSelectableTrackSegments(
Track *);
79 bool DeleteAllSelectableRoutePoints(
Route *);
80 bool AddAllSelectableRouteSegments(
Route *pr);
81 bool AddAllSelectableTrackSegments(
Track *pr);
82 bool AddAllSelectableRoutePoints(
Route *pr);
83 bool UpdateSelectableRouteSegments(
RoutePoint *prp);
84 bool DeletePointSelectableTrackSegments(
TrackPoint *pt);
85 bool IsSegmentSelected(
float a,
float b,
float c,
float d,
float slat,
87 bool IsSelectableSegmentSelected(
SelectCtx& ctx,
float slat,
float slon,
92 SelectItem *AddSelectablePoint(
float slat,
float slon,
const void *data,
94 bool DeleteAllPoints(
void);
95 bool DeleteSelectablePoint(
void *data,
int SeltypeToDelete);
96 bool ModifySelectablePoint(
float slat,
float slon,
void *data,
int fseltype);
99 bool DeleteAllSelectableTypePoints(
int SeltypeToDelete);
101 bool DeleteSelectableRoutePoint(
RoutePoint *prp);
105 SelectableItemList *GetSelectList() {
return pSelectList; }
111 SelectableItemList *pSelectList;