32 #include <wx/datetime.h>
33 #include <wx/treectrl.h>
34 #include <wx/dirctrl.h>
37 #include <wx/wxhtml.h>
42 #include "ocpCursor.h"
44 #include "emboss_data.h"
45 #include "S57Sector.h"
56 void ShowAISTargetQueryDialog(wxWindow *parent,
int mmsi);
63 int InitScreenBrightness(
void);
64 int RestoreScreenBrightness(
void);
65 int SetScreenBrightness(
int brightness);
112 typedef enum ownship_state_t {
118 enum { ID_S57QUERYTREECTRL = 10000, ID_AISDIALOGOK };
120 enum { ID_PIANO_DISABLE_QUILT_CHART = 32000,
121 ID_PIANO_ENABLE_QUILT_CHART,
122 ID_PIANO_CONTRACT_PIANO,
123 ID_PIANO_EXPAND_PIANO
126 enum { NORTH_UP_MODE, COURSE_UP_MODE, HEAD_UP_MODE };
138 void SetupGlCanvas();
141 void OnKeyDown(wxKeyEvent &event);
142 void OnKeyUp(wxKeyEvent &event);
143 void OnKeyChar(wxKeyEvent &event);
144 void OnPaint(wxPaintEvent &event);
146 void Scroll(
int dx,
int dy);
147 void OnToolLeftClick(wxCommandEvent &event);
149 bool MouseEventOverlayWindows(wxMouseEvent &event);
150 bool MouseEventChartBar(wxMouseEvent &event);
151 bool MouseEventMUIBar(wxMouseEvent &event);
152 bool MouseEventToolbar(wxMouseEvent &event);
153 bool MouseEventIENCBar(wxMouseEvent &event);
155 bool MouseEventSetup(wxMouseEvent &event,
bool b_handle_dclick =
true);
156 bool MouseEventProcessObjects(wxMouseEvent &event);
157 bool MouseEventProcessCanvas(wxMouseEvent &event);
158 void SetCanvasCursor(wxMouseEvent &event);
159 void OnKillFocus(wxFocusEvent &WXUNUSED(event));
160 void OnSetFocus(wxFocusEvent &WXUNUSED(event));
161 #ifdef HAVE_WX_GESTURE_EVENTS
162 void OnZoom(wxZoomGestureEvent& event);
163 void OnLongPress(wxLongPressEvent& event);
164 void OnPressAndTap(wxPressAndTapEvent& event);
166 void OnLeftDown(wxMouseEvent& evt);
167 void OnLeftUp(wxMouseEvent& evt);
169 void OnRightUp(wxMouseEvent& event);
170 void OnRightDown(wxMouseEvent& event);
172 void OnDoubleLeftClick(wxMouseEvent& event);
174 void OnWheel(wxMouseEvent& event);
175 void OnMotion(wxMouseEvent& event);
178 void PopupMenuHandler(wxCommandEvent &event);
179 bool IsPrimaryCanvas() {
return (m_canvasIndex == 0); }
181 bool SetUserOwnship();
183 double GetCanvasRangeMeters();
184 void SetCanvasRangeMeters(
double range);
186 void EnablePaint(
bool b_enable);
187 virtual bool SetCursor(
const wxCursor &c);
188 virtual void Refresh(
bool eraseBackground =
true,
189 const wxRect *rect = (
const wxRect *)NULL);
190 virtual void Update();
192 void LostMouseCapture(wxMouseCaptureLostEvent &event);
194 void CancelMouseRoute();
195 void SetDisplaySizeMM(
double size);
196 double GetDisplaySizeMM() {
return m_display_size_mm; }
198 bool SetVPScale(
double sc,
bool b_refresh =
true);
199 bool SetVPProjection(
int projection);
200 bool SetViewPoint(
double lat,
double lon);
201 bool SetViewPointByCorners(
double latSW,
double lonSW,
double latNE,
203 bool SetViewPoint(
double lat,
double lon,
double scale_ppm,
double skew,
204 double rotation,
int projection = 0,
bool b_adjust =
true,
205 bool b_refresh =
true);
206 void ReloadVP(
bool b_adjust =
true);
207 void LoadVP(
ViewPort &vp,
bool b_adjust =
true);
209 ChartStack *GetpCurrentStack() {
return m_pCurrentStack; }
210 void SetGroupIndex(
int index,
bool autoswitch =
false);
211 bool CheckGroup(
int igroup);
212 void canvasRefreshGroupIndex(
void);
213 void canvasChartsRefresh(
int dbi_hint);
215 void CheckGroupValid(
bool showMessage =
true,
bool switchGroup0 =
true);
217 void UpdateCanvasS52PLIBConfig();
219 void TriggerDeferredFocus();
220 void OnDeferredFocusTimerEvent(wxTimerEvent &event);
221 void OnRouteFinishTimerEvent(wxTimerEvent &event);
223 void ClearS52PLIBStateHash() { m_s52StateHash = 0; }
224 void SetupCanvasQuiltMode(
void);
227 bool SetVPRotation(
double angle);
228 double GetVPRotation(
void) {
return GetVP().rotation; }
229 double GetVPSkew(
void) {
return GetVP().skew; }
230 double GetVPTilt(
void) {
return GetVP().tilt; }
231 void ClearbFollow(
void);
232 void SetbFollow(
void);
233 void TogglebFollow(
void);
234 void JumpToPosition(
double lat,
double lon,
double scale);
235 void SetFirstAuto(
bool b_auto) { m_bFirstAuto = b_auto; }
237 void GetDoubleCanvasPointPix(
double rlat,
double rlon, wxPoint2DDouble *r);
238 void GetDoubleCanvasPointPixVP(
ViewPort &vp,
double rlat,
double rlon,
240 bool GetCanvasPointPix(
double rlat,
double rlon, wxPoint *r);
241 bool GetCanvasPointPixVP(
ViewPort &vp,
double rlat,
double rlon, wxPoint *r);
243 void GetCanvasPixPoint(
double x,
double y,
double &lat,
double &lon);
244 void WarpPointerDeferred(
int x,
int y);
248 void ToggleCPAWarn();
250 bool IsMeasureActive() {
return m_bMeasure_Active; }
251 wxBitmap &GetTideBitmap() {
return m_cTideBitmap; }
254 void SetQuiltMode(
bool b_quilt);
255 bool GetQuiltMode(
void);
256 std::vector<int> GetQuiltIndexArray(
void);
257 bool IsQuiltDelta(
void);
258 void SetQuiltChartHiLiteIndex(
int dbIndex);
259 void SetQuiltChartHiLiteIndexArray(std::vector<int> hilite_array);
260 void ClearQuiltChartHiLiteIndexArray();
261 int GetQuiltReferenceChartIndex(
void);
262 double GetBestStartScale(
int dbi_hint,
const ViewPort &vp);
263 void ConfigureChartBar();
265 int GetNextContextMenuId();
267 TCWin *getTCWin() {
return pCwin; }
269 bool StartTimedMovement(
bool stoptimer =
true);
270 void DoTimedMovement();
271 void DoMovement(
long dt);
274 void SetColorScheme(ColorScheme cs);
275 ColorScheme GetColorScheme() {
return m_cs; }
277 void CanvasApplyLocale();
278 void RebuildCursors();
281 int GetCanvasWidth() {
return m_canvas_width; }
282 int GetCanvasHeight() {
return m_canvas_height; }
283 float GetVPScale() {
return GetVP().view_scale_ppm; }
284 float GetVPChartScale() {
return GetVP().chart_scale; }
285 double GetCanvasScaleFactor() {
return m_canvas_scale_factor; }
286 double GetCanvasTrueScale() {
return m_true_scale_ppm; }
287 double GetAbsoluteMinScalePpm() {
return m_absolute_min_scale_ppm; }
289 ViewPort *GetpVP() {
return &VPoint; }
293 Piano *GetPiano() {
return m_Piano; }
294 int GetPianoHeight();
296 bool isRouteEditing(
void) {
297 return m_bRouteEditing && m_pRoutePointEditTarget;
299 bool isMarkEditing(
void) {
return m_bMarkEditing && m_pRoutePointEditTarget; }
301 GSHHSChart *GetWorldBackgroundChart() {
return pWorldBackgroundChart; }
302 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
304 void SetbTCUpdate(
bool f) { m_bTCupdate = f; }
305 bool GetbTCUpdate() {
return m_bTCupdate; }
306 void SetbShowCurrent(
bool f) { m_bShowCurrent = f; }
307 bool GetbShowCurrent() {
return m_bShowCurrent; }
308 void SetbShowTide(
bool f) { m_bShowTide = f; }
309 bool GetbShowTide() {
return m_bShowTide; }
310 void SetShowVisibleSectors(
bool val) { m_bShowVisibleSectors = val; }
311 bool GetShowVisibleSectors() {
return m_bShowVisibleSectors; }
313 double GetPixPerMM() {
return m_pix_per_mm; }
315 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
316 void SetCursorStatus(
double cursor_lat,
double cursor_lon);
317 void GetCursorLatLon(
double *lat,
double *lon);
319 bool PanCanvas(
double dx,
double dy);
320 void StopAutoPan(
void);
322 void ZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true,
323 bool stoptimer =
true);
324 void ZoomCanvasSimple(
double factor);
325 void DoZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true);
327 void RotateCanvas(
double dir);
328 void DoRotateCanvas(
double rotation);
329 void DoTiltCanvas(
double tilt);
331 void ShowAISTargetList(
void);
333 void ShowGoToPosition(
void);
334 void HideGlobalToolbar();
335 void ShowGlobalToolbar();
340 int GetQuiltChartCount();
341 void InvalidateAllQuiltPatchs(
void);
342 void SetQuiltRefChart(
int dbIndex);
343 std::vector<int> GetQuiltCandidatedbIndexArray(
bool flag1 =
true,
345 std::vector<int> &GetQuiltExtendedStackdbIndexArray();
346 std::vector<int> &GetQuiltFullScreendbIndexArray();
347 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
348 int GetQuiltRefChartdbIndex(
void);
349 void InvalidateQuilt(
void);
350 double GetQuiltMaxErrorFactor();
351 bool IsChartQuiltableRef(
int db_index);
353 int GetCanvasChartNativeScale();
354 int FindClosestCanvasChartdbIndex(
int scale);
355 void UpdateCanvasOnGroupChange(
void);
356 void SetUpMode(
int mode);
357 void ToggleLookahead();
358 void SetShowGPS(
bool show);
360 void ShowObjectQueryWindow(
int x,
int y,
float zlat,
float zlon);
361 void ShowMarkPropertiesDialog(
RoutePoint *markPoint);
362 void ShowRoutePropertiesDialog(wxString title,
Route *selected);
363 void ShowTrackPropertiesDialog(
Track *selected);
364 void DrawTCWindow(
int x,
int y,
void *pIDX);
366 void UpdateGPSCompassStatusBox(
bool b_force_new);
369 wxColour GetFogColor() {
return m_fog_color; }
371 void ShowChartInfoWindow(
int x,
int dbIndex);
372 void HideChartInfoWindow(
void);
373 void ShowCompositeInfoWindow(
int x,
int n_charts,
374 int scale,
const std::vector<int> &index_vector);
376 void StartMeasureRoute();
377 void CancelMeasureRoute();
379 bool DoCanvasUpdate(
void);
380 void SelectQuiltRefdbChart(
int db_index,
bool b_autoscale =
true);
381 void SelectQuiltRefChart(
int selected_index);
382 double GetBestVPScale(
ChartBase *pchart);
383 void selectCanvasChartDisplay(
int type,
int family);
384 void RemoveChartFromQuilt(
int dbIndex);
386 void HandlePianoClick(
int selected_index,
387 const std::vector<int> &selected_dbIndex_array);
388 void HandlePianoRClick(
int x,
int y,
int selected_index,
389 const std::vector<int> &selected_dbIndex_array);
390 void HandlePianoRollover(
int selected_index,
391 const std::vector<int> &selected_dbIndex_array,
392 int n_charts,
int scale);
393 void ClearPianoRollover();
394 void UpdateCanvasControlBar(
void);
395 void FormatPianoKeys(
void);
396 void PianoPopupMenu(
int x,
int y,
int selected_index,
397 const std::vector<int> &selected_dbIndex_array);
398 void OnPianoMenuDisableChart(wxCommandEvent &event);
399 void OnPianoMenuEnableChart(wxCommandEvent &event);
401 bool IsPianoContextMenuActive() {
return m_piano_ctx_menu != 0; }
402 bool DoCanvasCOGSet(
void);
403 void UpdateFollowButtonState(
void);
404 void ApplyGlobalSettings();
405 void SetShowGPSCompassWindow(
bool bshow);
407 void FreezePiano() { m_pianoFrozen =
true; }
408 void ThawPiano() { m_pianoFrozen =
false; }
412 wxCursor *pCursorPencil;
413 wxCursor *pCursorArrow;
414 wxCursor *pCursorCross;
415 wxCursor *pPlugIn_Cursor;
417 wxBitmap *pscratch_bm;
418 bool m_brepaint_piano;
419 double m_cursor_lon, m_cursor_lat;
426 bool m_bShowNavobjects;
435 #ifdef HAVE_WX_GESTURE_EVENTS
436 double m_oldVPSScale;
439 wxPoint m_zoomStartPoint;
442 void DrawBlinkObjects(
void);
444 void StartRoute(
void);
445 void FinishRoute(
void);
453 void JaggyCircle(
ocpnDC &dc, wxPen pen,
int x,
int y,
int radius);
455 bool CheckEdgePan(
int x,
int y,
bool bdragging,
int margin,
int delta);
457 Route *m_pMouseRoute;
458 bool m_FinishRouteOnKillFocus;
459 bool m_bMeasure_Active;
460 bool m_bMeasure_DistCircle;
461 wxString m_active_upload_port;
462 bool m_bAppendingRoute;
464 Route *m_pMeasureRoute;
466 wxString FindValidUploadPort();
468 int GetMinAvailableGshhgQuality() {
469 return pWorldBackgroundChart->GetMinAvailableQuality();
471 int GetMaxAvailableGshhgQuality() {
472 return pWorldBackgroundChart->GetMaxAvailableQuality();
474 Route *GetSelectedRoute()
const {
return m_pSelectedRoute; }
475 Track *GetSelectedTrack()
const {
return m_pSelectedTrack; }
476 RoutePoint *GetSelectedRoutePoint()
const {
return m_pFoundRoutePoint; }
478 void SetAISCanvasDisplayStyle(
int StyleIndx);
479 void TouchAISToolActive(
void);
480 void UpdateAISTBTool(
void);
483 void SelectChartFromStack(
int index,
bool bDir =
false,
484 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
485 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
486 void SelectdbChart(
int dbindex);
488 void ShowTides(
bool bShow);
489 void ShowCurrents(
bool bShow);
491 void DoCanvasStackDelta(
int direction);
493 void ProcessNewGUIScale();
495 bool GetShowDepthUnits() {
return m_bShowDepthUnits; }
496 void SetShowDepthUnits(
bool show) { m_bShowDepthUnits = show; }
497 bool GetShowGrid() {
return m_bDisplayGrid; }
498 void SetShowGrid(
bool show) { m_bDisplayGrid = show; }
499 bool GetShowOutlines() {
return m_bShowOutlines; }
500 void SetShowOutlines(
bool show) { m_bShowOutlines = show; }
501 bool GetShowChartbar() {
return true; }
502 wxRect GetMUIBarRect();
503 void SetMUIBarPosition();
504 void DestroyMuiBar();
507 void ToggleChartOutlines(
void);
508 void ToggleCanvasQuiltMode(
void);
510 wxString GetScaleText() {
return m_scaleText; }
511 double GetScaleValue() {
return m_scaleValue; }
513 bool m_b_paint_enable;
515 bool GetShowENCText() {
return m_encShowText; }
516 void SetShowENCText(
bool show);
518 bool GetShowENCDepth() {
return m_encShowDepth; }
519 void SetShowENCDepth(
bool show);
521 bool GetShowENCLightDesc() {
return m_encShowLightDesc; }
522 void SetShowENCLightDesc(
bool show);
524 bool GetShowENCBuoyLabels() {
return m_encShowBuoyLabels; }
525 void SetShowENCBuoyLabels(
bool show);
527 bool GetShowENCLights() {
return m_encShowLights; }
528 void SetShowENCLights(
bool show);
530 int GetENCDisplayCategory() {
return m_encDisplayCategory; }
531 void SetENCDisplayCategory(
int category);
533 bool GetShowENCAnchor() {
return m_encShowAnchor; }
534 void SetShowENCAnchor(
bool show);
536 bool GetShowENCDataQual() {
return m_encShowDataQual; }
537 void SetShowENCDataQual(
bool show);
539 int GetUpMode() {
return m_upMode; }
540 bool GetLookahead() {
return m_bLookAhead; }
542 bool GetShowAIS() {
return m_bShowAIS; }
543 void SetShowAIS(
bool show);
544 bool GetAttenAIS() {
return m_bShowAISScaled; }
545 void SetAttenAIS(
bool show);
547 MUIBar *GetMUIBar() {
return m_muiBar; }
549 void SetAlertString(wxString str) { m_alertString = str; }
550 wxString GetAlertString() {
return m_alertString; }
552 wxRect GetScaleBarRect() {
return m_scaleBarRect; }
553 void RenderAlertMessage(wxDC &dc,
const ViewPort &vp);
555 std::vector<int> m_tile_noshow_index_array;
556 std::vector<int> m_tile_yesshow_index_array;
557 std::vector<int> m_quilt_noshow_index_array;
559 bool IsTileOverlayIndexInYesShow(
int index);
560 bool IsTileOverlayIndexInNoShow(
int index);
561 void AddTileOverlayIndexToNoShow(
int index);
563 std::vector<int> GetQuiltNoshowIindexArray() {
564 return m_quilt_noshow_index_array;
566 double GetDisplayScale(){
return m_displayScale; }
569 int AdjustQuiltRefChart();
571 bool UpdateS52State();
573 void CallPopupMenu(
int x,
int y);
575 bool IsTempMenuBarEnabled();
576 bool InvokeCanvasMenu(
int x,
int y,
int seltype);
579 void PositionConsole(
void);
581 wxColour PredColor();
582 wxColour ShipColor();
584 void ComputeShipScaleFactor(
float icon_hdt,
int ownShipWidth,
585 int ownShipLength, wxPoint &lShipMidPoint,
586 wxPoint &GpsOffsetPixels, wxPoint lGPSPoint,
587 float &scale_factor_x,
float &scale_factor_y);
589 void ShipDrawLargeScale(
ocpnDC &dc, wxPoint lShipMidPoint);
590 void ShipIndicatorsDraw(
ocpnDC &dc,
int img_height, wxPoint GPSOffsetPixels,
599 wxString m_scaleText;
601 bool m_bShowScaleInStatusBar;
604 wxPoint LastShipPoint;
605 wxPoint LastPredPoint;
606 bool m_bDrawingRoute;
607 bool m_bRouteEditing;
609 bool m_bRoutePoinDragging;
611 bool m_bMayToggleMenuBar;
616 bool m_bChartDragging;
617 Route *m_pSelectedRoute;
618 Track *m_pSelectedTrack;
619 wxArrayPtrVoid *m_pEditRouteArray;
624 wxCursor *pCursorLeft;
625 wxCursor *pCursorRight;
627 wxCursor *pCursorDown;
629 wxCursor *pCursorUpLeft;
630 wxCursor *pCursorUpRight;
631 wxCursor *pCursorDownLeft;
632 wxCursor *pCursorDownRight;
636 wxBitmap *pThumbDIBShow;
637 wxBitmap *pThumbShowing;
639 bool bShowingCurrent;
643 m_canvas_scale_factor;
650 double m_display_size_mm;
652 double m_absolute_min_scale_ppm;
654 bool singleClickEventIsValid;
655 wxMouseEvent singleClickEvent;
657 std::vector<s57Sector_t> extendedSectorLegs;
658 wxFont m_overzoomFont;
659 int m_overzoomTextWidth;
660 int m_overzoomTextHeight;
663 void OnActivate(wxActivateEvent &event);
664 void OnSize(wxSizeEvent &event);
665 void MouseTimedEvent(wxTimerEvent &event);
666 void MouseEvent(wxMouseEvent &event);
667 void ShipDraw(
ocpnDC &dc);
668 void DrawArrow(
ocpnDC &dc,
int x,
int y,
double rot_angle,
double scale);
669 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
670 void FindRoutePointsAtCursor(
float selectRadius,
bool setBeingEdited);
672 void RotateTimerEvent(wxTimerEvent &event);
673 void PanTimerEvent(wxTimerEvent &event);
674 void MovementTimerEvent(wxTimerEvent &);
675 void MovementStopTimerEvent(wxTimerEvent &);
676 void OnCursorTrackTimerEvent(wxTimerEvent &event);
678 void DrawAllTracksInBBox(
ocpnDC &dc, LLBBox &BltBBox);
679 void DrawActiveTrackInBBox(
ocpnDC &dc, LLBBox &BltBBox);
680 void DrawAllRoutesInBBox(
ocpnDC &dc, LLBBox &BltBBox);
681 void DrawActiveRouteInBBox(
ocpnDC &dc, LLBBox &BltBBox);
682 void DrawAllWaypointsInBBox(
ocpnDC &dc, LLBBox &BltBBox);
683 void DrawAnchorWatchPoints(
ocpnDC &dc);
684 double GetAnchorWatchRadiusPixels(
RoutePoint *pAnchorWatchPoint);
686 void DrawAllTidesInBBox(
ocpnDC &dc, LLBBox &BBox);
687 void DrawAllCurrentsInBBox(
ocpnDC &dc, LLBBox &BBox);
688 void RebuildTideSelectList(LLBBox &BBox);
689 void RebuildCurrentSelectList(LLBBox &BBox);
693 void RenderRouteLegs(
ocpnDC &dc);
694 void RenderVisibleSectorLights(
ocpnDC &dc);
696 void AlertDraw(
ocpnDC &dc);
698 void GridDraw(
ocpnDC &dc);
699 void ScaleBarDraw(
ocpnDC &dc);
701 void DrawOverlayObjects(
ocpnDC &dc,
const wxRegion &ru);
702 void RenderShipToActive(
ocpnDC &dc,
bool Use_Opengl);
705 emboss_data *CreateEmbossMapData(wxFont &font,
int width,
int height,
706 const wxString &str, ColorScheme cs);
707 void CreateDepthUnitEmbossMaps(ColorScheme cs);
708 wxBitmap CreateDimBitmap(wxBitmap &Bitmap,
double factor);
710 void CreateOZEmbossMapData(ColorScheme cs);
712 void SetOverzoomFont();
719 void ShowBrightnessLevelTimedPopup(
int brightness,
int min,
int max);
722 int m_canvas_width, m_canvas_height;
740 wxTimer *pMovementStopTimer;
742 wxTimer *pCurTrackTimer;
744 wxTimer *pRotDefTimer;
746 wxTimer *m_DoubleClickTimer;
747 wxTimer m_routeFinishTimer;
749 wxTimer m_RolloverPopupTimer;
751 int m_wheelzoom_stop_oneshot;
752 int m_last_wheel_dir;
753 wxStopWatch m_wheelstopwatch;
754 double m_zoom_target;
756 int m_curtrack_timer_msec;
757 int m_rollover_popup_timer_msec;
762 wxBitmap *pss_overlay_bmp;
763 wxMask *pss_overlay_mask;
765 wxRect ship_draw_rect;
766 wxRect ship_draw_last_rect;
767 wxRect ais_draw_rect;
768 wxRect alert_draw_rect;
771 wxMemoryDC m_dc_route;
780 double m_true_scale_ppm;
782 ownship_state_t m_ownship_state;
786 wxBitmap m_bmTideDay;
787 wxBitmap m_bmTideDusk;
788 wxBitmap m_bmTideNight;
789 wxBitmap m_bmCurrentDay;
790 wxBitmap m_bmCurrentDusk;
791 wxBitmap m_bmCurrentNight;
792 wxBitmap m_cTideBitmap;
793 wxBitmap m_cCurrentBitmap;
801 wxImage m_os_image_red_day;
802 wxImage m_os_image_red_dusk;
803 wxImage m_os_image_red_night;
804 wxImage m_os_image_grey_day;
805 wxImage m_os_image_grey_dusk;
806 wxImage m_os_image_grey_night;
807 wxImage m_os_image_yellow_day;
808 wxImage m_os_image_yellow_dusk;
809 wxImage m_os_image_yellow_night;
811 wxImage *m_pos_image_red;
812 wxImage *m_pos_image_grey;
813 wxImage *m_pos_image_yellow;
815 wxImage *m_pos_image_user;
816 wxImage *m_pos_image_user_grey;
817 wxImage *m_pos_image_user_yellow;
819 wxImage *m_pos_image_user_day;
820 wxImage *m_pos_image_user_dusk;
821 wxImage *m_pos_image_user_night;
822 wxImage *m_pos_image_user_grey_day;
823 wxImage *m_pos_image_user_grey_dusk;
824 wxImage *m_pos_image_user_grey_night;
825 wxImage *m_pos_image_user_yellow_day;
826 wxImage *m_pos_image_user_yellow_dusk;
827 wxImage *m_pos_image_user_yellow_night;
829 wxImage m_ship_pix_image;
831 bool m_cur_ship_pix_isgrey;
832 ColorScheme m_ship_cs;
843 double m_wheel_lat, m_wheel_lon;
844 int m_wheel_x, m_wheel_y;
847 wxBitmap m_working_bm;
848 wxBitmap m_cached_chart_bm;
853 bool m_bzooming, m_bzooming_to_cursor;
862 int m_panx, m_pany, m_modkeys;
864 bool m_bmouse_key_mod;
865 double m_zoom_factor, m_rotation_speed;
868 wxDateTime m_last_movement_time;
870 int m_AISRollover_MMSI;
871 bool m_bsectors_shown;
873 double m_displayed_scale_factor;
875 wxColour m_fog_color;
876 bool m_disable_edge_pan;
879 bool m_dragoffsetSet;
884 double m_vLat, m_vLon;
887 bool m_bpersistent_quilt;
889 wxMenu *m_piano_ctx_menu;
890 int menu_selected_dbIndex, menu_selected_index;
895 wxRect m_mainlast_tb_rect;
896 int m_restore_dbindex;
900 wxSize m_muiBarHOSize;
902 bool m_bShowOutlines;
904 bool m_bShowDepthUnits;
906 bool m_bShowAISScaled;
912 bool m_encShowLightDesc;
913 bool m_encShowBuoyLabels;
914 int m_encDisplayCategory;
915 bool m_encShowLights;
916 bool m_encShowAnchor;
917 bool m_encShowDataQual;
919 wxTimer m_deferredFocusTimer;
920 float m_focus_indicator_pix;
924 double m_OSoffsetx, m_OSoffsety;
925 bool m_MouseDragging;
927 wxString m_alertString;
928 wxRect m_scaleBarRect;
929 bool m_bShowCompassWin;
932 double m_sector_glat, m_sector_glon;
933 std::vector<s57Sector_t> m_sectorlegsVisible;
934 bool m_bShowVisibleSectors;
935 double m_displayScale;
937 DECLARE_EVENT_TABLE()
942 wxString minutesToHoursDays(
float timeInMinutes);
951 #define wxCLOSE_BOX 0x1000
953 #ifndef wxFIXED_MINSIZE
954 #define wxFIXED_MINSIZE 0
bool MouseEventSetup(wxMouseEvent &event, bool b_handle_dclick=true)