32#include <wx/datetime.h>
33#include <wx/treectrl.h>
34#include <wx/dirctrl.h>
44#include "emboss_data.h"
57void ShowAISTargetQueryDialog(wxWindow *parent,
int mmsi);
64int InitScreenBrightness(
void);
65int RestoreScreenBrightness(
void);
66int SetScreenBrightness(
int brightness);
113typedef enum ownship_state_t {
119enum { ID_S57QUERYTREECTRL = 10000, ID_AISDIALOGOK };
121enum { ID_PIANO_DISABLE_QUILT_CHART = 32000, ID_PIANO_ENABLE_QUILT_CHART };
123enum { NORTH_UP_MODE, COURSE_UP_MODE, HEAD_UP_MODE };
135 void SetupGlCanvas();
138 void OnKeyDown(wxKeyEvent &event);
139 void OnKeyUp(wxKeyEvent &event);
140 void OnKeyChar(wxKeyEvent &event);
141 void OnPaint(wxPaintEvent &event);
143 void Scroll(
int dx,
int dy);
144 void OnToolLeftClick(wxCommandEvent &event);
146 bool MouseEventOverlayWindows(wxMouseEvent &event);
147 bool MouseEventChartBar(wxMouseEvent &event);
148 bool MouseEventSetup(wxMouseEvent &event,
bool b_handle_dclick =
true);
149 bool MouseEventProcessObjects(wxMouseEvent &event);
150 bool MouseEventProcessCanvas(wxMouseEvent &event);
151 void SetCanvasCursor(wxMouseEvent &event);
152 void OnKillFocus(wxFocusEvent &WXUNUSED(event));
153 void OnSetFocus(wxFocusEvent &WXUNUSED(event));
154#ifdef HAVE_WX_GESTURE_EVENTS
155 void OnZoom(wxZoomGestureEvent& event);
156 void OnLongPress(wxLongPressEvent& event);
157 void OnPressAndTap(wxPressAndTapEvent& event);
159 void OnLeftDown(wxMouseEvent& evt);
160 void OnLeftUp(wxMouseEvent& evt);
162 void OnRightUp(wxMouseEvent& event);
163 void OnRightDown(wxMouseEvent& event);
165 void OnDoubleLeftClick(wxMouseEvent& event);
167 void OnWheel(wxMouseEvent& event);
168 void OnMotion(wxMouseEvent& event);
171 void PopupMenuHandler(wxCommandEvent &event);
172 bool IsPrimaryCanvas() {
return (m_canvasIndex == 0); }
174 bool SetUserOwnship();
176 double GetCanvasRangeMeters();
177 void SetCanvasRangeMeters(
double range);
179 void EnablePaint(
bool b_enable);
180 virtual bool SetCursor(
const wxCursor &c);
181 virtual void Refresh(
bool eraseBackground =
true,
182 const wxRect *rect = (
const wxRect *)NULL);
183 virtual void Update();
185 void LostMouseCapture(wxMouseCaptureLostEvent &event);
187 void CancelMouseRoute();
188 void SetDisplaySizeMM(
double size);
189 double GetDisplaySizeMM() {
return m_display_size_mm; }
191 bool SetVPScale(
double sc,
bool b_refresh =
true);
192 bool SetVPProjection(
int projection);
193 bool SetViewPoint(
double lat,
double lon);
194 bool SetViewPointByCorners(
double latSW,
double lonSW,
double latNE,
196 bool SetViewPoint(
double lat,
double lon,
double scale_ppm,
double skew,
197 double rotation,
int projection = 0,
bool b_adjust =
true,
198 bool b_refresh =
true);
199 void ReloadVP(
bool b_adjust =
true);
200 void LoadVP(
ViewPort &vp,
bool b_adjust =
true);
202 ChartStack *GetpCurrentStack() {
return m_pCurrentStack; }
203 void SetGroupIndex(
int index,
bool autoswitch =
false);
204 bool CheckGroup(
int igroup);
205 void canvasRefreshGroupIndex(
void);
206 void canvasChartsRefresh(
int dbi_hint);
208 void CheckGroupValid(
bool showMessage =
true,
bool switchGroup0 =
true);
210 void UpdateCanvasS52PLIBConfig();
212 void TriggerDeferredFocus();
213 void OnDeferredFocusTimerEvent(wxTimerEvent &event);
214 void OnRouteFinishTimerEvent(wxTimerEvent &event);
216 void ClearS52PLIBStateHash() { m_s52StateHash = 0; }
217 void SetupCanvasQuiltMode(
void);
220 bool SetVPRotation(
double angle);
221 double GetVPRotation(
void) {
return GetVP().rotation; }
222 double GetVPSkew(
void) {
return GetVP().skew; }
223 double GetVPTilt(
void) {
return GetVP().tilt; }
224 void ClearbFollow(
void);
225 void SetbFollow(
void);
226 void TogglebFollow(
void);
227 void JumpToPosition(
double lat,
double lon,
double scale);
228 void SetFirstAuto(
bool b_auto) { m_bFirstAuto = b_auto; }
230 void GetDoubleCanvasPointPix(
double rlat,
double rlon, wxPoint2DDouble *r);
231 void GetDoubleCanvasPointPixVP(
ViewPort &vp,
double rlat,
double rlon,
233 bool GetCanvasPointPix(
double rlat,
double rlon, wxPoint *r);
234 bool GetCanvasPointPixVP(
ViewPort &vp,
double rlat,
double rlon, wxPoint *r);
236 void GetCanvasPixPoint(
double x,
double y,
double &lat,
double &lon);
237 void WarpPointerDeferred(
int x,
int y);
241 void ToggleCPAWarn();
243 bool IsMeasureActive() {
return m_bMeasure_Active; }
244 wxBitmap &GetTideBitmap() {
return m_cTideBitmap; }
247 void SetQuiltMode(
bool b_quilt);
248 bool GetQuiltMode(
void);
249 std::vector<int> GetQuiltIndexArray(
void);
250 bool IsQuiltDelta(
void);
251 void SetQuiltChartHiLiteIndex(
int dbIndex);
252 int GetQuiltReferenceChartIndex(
void);
253 double GetBestStartScale(
int dbi_hint,
const ViewPort &vp);
254 void ConfigureChartBar();
256 int GetNextContextMenuId();
258 TCWin *getTCWin() {
return pCwin; }
260 bool StartTimedMovement(
bool stoptimer =
true);
261 void DoTimedMovement();
262 void DoMovement(
long dt);
265 void SetColorScheme(ColorScheme cs);
266 ColorScheme GetColorScheme() {
return m_cs; }
268 void CanvasApplyLocale();
269 void RebuildCursors();
272 int GetCanvasWidth() {
return m_canvas_width; }
273 int GetCanvasHeight() {
return m_canvas_height; }
274 float GetVPScale() {
return GetVP().view_scale_ppm; }
275 float GetVPChartScale() {
return GetVP().chart_scale; }
276 double GetCanvasScaleFactor() {
return m_canvas_scale_factor; }
277 double GetCanvasTrueScale() {
return m_true_scale_ppm; }
278 double GetAbsoluteMinScalePpm() {
return m_absolute_min_scale_ppm; }
280 ViewPort *GetpVP() {
return &VPoint; }
284 Piano *GetPiano() {
return m_Piano; }
285 int GetPianoHeight();
287 bool isRouteEditing(
void) {
288 return m_bRouteEditing && m_pRoutePointEditTarget;
290 bool isMarkEditing(
void) {
return m_bMarkEditing && m_pRoutePointEditTarget; }
292 GSHHSChart *GetWorldBackgroundChart() {
return pWorldBackgroundChart; }
293 void ResetWorldBackgroundChart() { pWorldBackgroundChart->Reset(); }
295 void SetbTCUpdate(
bool f) { m_bTCupdate = f; }
296 bool GetbTCUpdate() {
return m_bTCupdate; }
297 void SetbShowCurrent(
bool f) { m_bShowCurrent = f; }
298 bool GetbShowCurrent() {
return m_bShowCurrent; }
299 void SetbShowTide(
bool f) { m_bShowTide = f; }
300 bool GetbShowTide() {
return m_bShowTide; }
301 void SetShowVisibleSectors(
bool val) { m_bShowVisibleSectors = val; }
302 bool GetShowVisibleSectors() {
return m_bShowVisibleSectors; }
304 double GetPixPerMM() {
return m_pix_per_mm; }
306 void SetOwnShipState(ownship_state_t state) { m_ownship_state = state; }
307 void SetCursorStatus(
double cursor_lat,
double cursor_lon);
308 void GetCursorLatLon(
double *lat,
double *lon);
310 bool PanCanvas(
double dx,
double dy);
311 void StopAutoPan(
void);
313 void ZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true,
314 bool stoptimer =
true);
315 void ZoomCanvasSimple(
double factor);
316 void DoZoomCanvas(
double factor,
bool can_zoom_to_cursor =
true);
318 void RotateCanvas(
double dir);
319 void DoRotateCanvas(
double rotation);
320 void DoTiltCanvas(
double tilt);
322 void ShowAISTargetList(
void);
324 void ShowGoToPosition(
void);
325 void HideGlobalToolbar();
326 void ShowGlobalToolbar();
331 int GetQuiltChartCount();
332 void InvalidateAllQuiltPatchs(
void);
333 void SetQuiltRefChart(
int dbIndex);
334 std::vector<int> GetQuiltCandidatedbIndexArray(
bool flag1 =
true,
336 std::vector<int> GetQuiltExtendedStackdbIndexArray();
337 std::vector<int> GetQuiltEclipsedStackdbIndexArray();
338 int GetQuiltRefChartdbIndex(
void);
339 void InvalidateQuilt(
void);
340 double GetQuiltMaxErrorFactor();
341 bool IsChartQuiltableRef(
int db_index);
343 int GetCanvasChartNativeScale();
344 int FindClosestCanvasChartdbIndex(
int scale);
345 void UpdateCanvasOnGroupChange(
void);
346 void SetUpMode(
int mode);
347 void ToggleLookahead();
348 void SetShowGPS(
bool show);
350 void ShowObjectQueryWindow(
int x,
int y,
float zlat,
float zlon);
351 void ShowMarkPropertiesDialog(
RoutePoint *markPoint);
352 void ShowRoutePropertiesDialog(wxString title,
Route *selected);
353 void ShowTrackPropertiesDialog(
Track *selected);
354 void DrawTCWindow(
int x,
int y,
void *pIDX);
356 void UpdateGPSCompassStatusBox(
bool b_force_new);
359 wxColour GetFogColor() {
return m_fog_color; }
361 void ShowChartInfoWindow(
int x,
int dbIndex);
362 void HideChartInfoWindow(
void);
364 void StartMeasureRoute();
365 void CancelMeasureRoute();
367 bool DoCanvasUpdate(
void);
368 void SelectQuiltRefdbChart(
int db_index,
bool b_autoscale =
true);
369 void SelectQuiltRefChart(
int selected_index);
370 double GetBestVPScale(
ChartBase *pchart);
371 void selectCanvasChartDisplay(
int type,
int family);
372 void RemoveChartFromQuilt(
int dbIndex);
374 void HandlePianoClick(
int selected_index,
int selected_dbIndex);
375 void HandlePianoRClick(
int x,
int y,
int selected_index,
376 int selected_dbIndex);
377 void HandlePianoRollover(
int selected_index,
int selected_dbIndex);
378 void UpdateCanvasControlBar(
void);
379 void FormatPianoKeys(
void);
380 void PianoPopupMenu(
int x,
int y,
int selected_index,
int selected_dbIndex);
381 void OnPianoMenuDisableChart(wxCommandEvent &event);
382 void OnPianoMenuEnableChart(wxCommandEvent &event);
383 bool IsPianoContextMenuActive() {
return m_piano_ctx_menu != 0; }
384 void SetCanvasToolbarItemState(
int tool_id,
bool state);
385 bool DoCanvasCOGSet(
void);
386 void UpdateFollowButtonState(
void);
387 void ApplyGlobalSettings();
388 void SetShowGPSCompassWindow(
bool bshow);
390 void FreezePiano() { m_pianoFrozen =
true; }
391 void ThawPiano() { m_pianoFrozen =
false; }
395 wxCursor *pCursorPencil;
396 wxCursor *pCursorArrow;
397 wxCursor *pCursorCross;
398 wxCursor *pPlugIn_Cursor;
400 wxBitmap *pscratch_bm;
401 bool m_brepaint_piano;
402 double m_cursor_lon, m_cursor_lat;
409 bool m_bShowNavobjects;
418#ifdef HAVE_WX_GESTURE_EVENTS
419 double m_oldVPSScale;
422 wxPoint m_zoomStartPoint;
425 void DrawBlinkObjects(
void);
427 void StartRoute(
void);
428 void FinishRoute(
void);
436 void JaggyCircle(
ocpnDC &dc, wxPen pen,
int x,
int y,
int radius);
438 bool CheckEdgePan(
int x,
int y,
bool bdragging,
int margin,
int delta);
440 Route *m_pMouseRoute;
441 bool m_FinishRouteOnKillFocus;
442 bool m_bMeasure_Active;
443 bool m_bMeasure_DistCircle;
444 wxString m_active_upload_port;
445 bool m_bAppendingRoute;
447 Route *m_pMeasureRoute;
449 wxString FindValidUploadPort();
451 int GetMinAvailableGshhgQuality() {
452 return pWorldBackgroundChart->GetMinAvailableQuality();
454 int GetMaxAvailableGshhgQuality() {
455 return pWorldBackgroundChart->GetMaxAvailableQuality();
457 Route *GetSelectedRoute()
const {
return m_pSelectedRoute; }
458 Track *GetSelectedTrack()
const {
return m_pSelectedTrack; }
459 RoutePoint *GetSelectedRoutePoint()
const {
return m_pFoundRoutePoint; }
462 void UpdateToolbarColorScheme(ColorScheme cs);
463 void SetAISCanvasDisplayStyle(
int StyleIndx);
464 void TouchAISToolActive(
void);
465 void UpdateAISTBTool(
void);
466 void SetToolbarScaleFactor(
double scale_factor) {
467 m_toolbar_scalefactor = scale_factor;
470 void SetToolbarConfigString(wxString &config) { m_toolbarConfig = config; }
471 wxString GetToolbarConfigString() {
return m_toolbarConfig; }
473 void SetToolbarPosition(wxPoint position);
474 wxPoint GetToolbarPosition();
475 void SetToolbarOrientation(
long orient);
476 long GetToolbarOrientation();
478 void SubmergeToolbar(
void);
479 void SurfaceToolbar(
void);
480 void ToggleToolbar(
bool b_smooth =
false);
481 bool IsToolbarShown();
482 void DestroyToolbar();
484 void SelectChartFromStack(
int index,
bool bDir =
false,
485 ChartTypeEnum New_Type = CHART_TYPE_DONTCARE,
486 ChartFamilyEnum New_Family = CHART_FAMILY_DONTCARE);
487 void SelectdbChart(
int dbindex);
489 void ShowTides(
bool bShow);
490 void ShowCurrents(
bool bShow);
492 void DoCanvasStackDelta(
int direction);
494 void ProcessNewGUIScale();
496 bool GetShowDepthUnits() {
return m_bShowDepthUnits; }
497 void SetShowDepthUnits(
bool show) { m_bShowDepthUnits = show; }
498 bool GetShowGrid() {
return m_bDisplayGrid; }
499 void SetShowGrid(
bool show) { m_bDisplayGrid = show; }
500 bool GetShowOutlines() {
return m_bShowOutlines; }
501 void SetShowOutlines(
bool show) { m_bShowOutlines = show; }
502 bool GetShowChartbar() {
return true; }
503 bool GetToolbarEnable() {
return m_bToolbarEnable; }
504 void SetToolbarEnable(
bool show);
505 wxRect GetMUIBarRect();
506 void SetMUIBarPosition();
507 void DestroyMuiBar();
510 void ToggleChartOutlines(
void);
511 void ToggleCanvasQuiltMode(
void);
513 wxString GetScaleText() {
return m_scaleText; }
514 double GetScaleValue() {
return m_scaleValue; }
516 bool m_b_paint_enable;
518 bool GetShowENCText() {
return m_encShowText; }
519 void SetShowENCText(
bool show);
521 bool GetShowENCDepth() {
return m_encShowDepth; }
522 void SetShowENCDepth(
bool show);
524 bool GetShowENCLightDesc() {
return m_encShowLightDesc; }
525 void SetShowENCLightDesc(
bool show);
527 bool GetShowENCBuoyLabels() {
return m_encShowBuoyLabels; }
528 void SetShowENCBuoyLabels(
bool show);
530 bool GetShowENCLights() {
return m_encShowLights; }
531 void SetShowENCLights(
bool show);
533 int GetENCDisplayCategory() {
return m_encDisplayCategory; }
534 void SetENCDisplayCategory(
int category);
536 bool GetShowENCAnchor() {
return m_encShowAnchor; }
537 void SetShowENCAnchor(
bool show);
539 bool GetShowENCDataQual() {
return m_encShowDataQual; }
540 void SetShowENCDataQual(
bool show);
542 int GetUpMode() {
return m_upMode; }
543 bool GetLookahead() {
return m_bLookAhead; }
545 bool GetShowAIS() {
return m_bShowAIS; }
546 void SetShowAIS(
bool show);
547 bool GetAttenAIS() {
return m_bShowAISScaled; }
548 void SetAttenAIS(
bool show);
550 MUIBar *GetMUIBar() {
return m_muiBar; }
552 void SetAlertString(wxString str) { m_alertString = str; }
553 wxString GetAlertString() {
return m_alertString; }
555 wxRect GetScaleBarRect() {
return m_scaleBarRect; }
556 void RenderAlertMessage(wxDC &dc,
const ViewPort &vp);
558 std::vector<int> m_tile_noshow_index_array;
559 std::vector<int> m_tile_yesshow_index_array;
560 std::vector<int> m_quilt_noshow_index_array;
562 bool IsTileOverlayIndexInYesShow(
int index);
563 bool IsTileOverlayIndexInNoShow(
int index);
564 void AddTileOverlayIndexToNoShow(
int index);
566 std::vector<int> GetQuiltNoshowIindexArray() {
567 return m_quilt_noshow_index_array;
569 double GetDisplayScale(){
return m_displayScale; }
572 int AdjustQuiltRefChart();
574 bool UpdateS52State();
576 void CallPopupMenu(
int x,
int y);
578 bool IsTempMenuBarEnabled();
579 bool InvokeCanvasMenu(
int x,
int y,
int seltype);
582 void PositionConsole(
void);
584 wxColour PredColor();
585 wxColour ShipColor();
587 void ComputeShipScaleFactor(
float icon_hdt,
int ownShipWidth,
588 int ownShipLength, wxPoint &lShipMidPoint,
589 wxPoint &GpsOffsetPixels, wxPoint lGPSPoint,
590 float &scale_factor_x,
float &scale_factor_y);
592 void ShipDrawLargeScale(
ocpnDC &dc, wxPoint lShipMidPoint);
593 void ShipIndicatorsDraw(
ocpnDC &dc,
int img_height, wxPoint GPSOffsetPixels,
602 wxString m_scaleText;
604 bool m_bShowScaleInStatusBar;
607 wxPoint LastShipPoint;
608 wxPoint LastPredPoint;
609 bool m_bDrawingRoute;
610 bool m_bRouteEditing;
612 bool m_bRoutePoinDragging;
614 bool m_bMayToggleMenuBar;
619 bool m_bChartDragging;
620 Route *m_pSelectedRoute;
621 Track *m_pSelectedTrack;
622 wxArrayPtrVoid *m_pEditRouteArray;
627 wxCursor *pCursorLeft;
628 wxCursor *pCursorRight;
630 wxCursor *pCursorDown;
632 wxCursor *pCursorUpLeft;
633 wxCursor *pCursorUpRight;
634 wxCursor *pCursorDownLeft;
635 wxCursor *pCursorDownRight;
639 wxBitmap *pThumbDIBShow;
640 wxBitmap *pThumbShowing;
642 bool bShowingCurrent;
646 m_canvas_scale_factor;
653 double m_display_size_mm;
655 double m_absolute_min_scale_ppm;
657 bool singleClickEventIsValid;
658 wxMouseEvent singleClickEvent;
660 std::vector<s57Sector_t> extendedSectorLegs;
661 wxFont m_overzoomFont;
662 int m_overzoomTextWidth;
663 int m_overzoomTextHeight;
666 void OnActivate(wxActivateEvent &event);
667 void OnSize(wxSizeEvent &event);
668 void MouseTimedEvent(wxTimerEvent &event);
669 void MouseEvent(wxMouseEvent &event);
670 void ShipDraw(
ocpnDC &dc);
671 void DrawArrow(
ocpnDC &dc,
int x,
int y,
double rot_angle,
double scale);
672 void OnRolloverPopupTimerEvent(wxTimerEvent &event);
673 void FindRoutePointsAtCursor(
float selectRadius,
bool setBeingEdited);
675 void RotateTimerEvent(wxTimerEvent &event);
676 void PanTimerEvent(wxTimerEvent &event);
677 void MovementTimerEvent(wxTimerEvent &);
678 void MovementStopTimerEvent(wxTimerEvent &);
679 void OnCursorTrackTimerEvent(wxTimerEvent &event);
681 void DrawAllTracksInBBox(
ocpnDC &dc, LLBBox &BltBBox);
682 void DrawActiveTrackInBBox(
ocpnDC &dc, LLBBox &BltBBox);
683 void DrawAllRoutesInBBox(
ocpnDC &dc, LLBBox &BltBBox);
684 void DrawActiveRouteInBBox(
ocpnDC &dc, LLBBox &BltBBox);
685 void DrawAllWaypointsInBBox(
ocpnDC &dc, LLBBox &BltBBox);
686 void DrawAnchorWatchPoints(
ocpnDC &dc);
687 double GetAnchorWatchRadiusPixels(
RoutePoint *pAnchorWatchPoint);
689 void DrawAllTidesInBBox(
ocpnDC &dc, LLBBox &BBox);
690 void DrawAllCurrentsInBBox(
ocpnDC &dc, LLBBox &BBox);
691 void RebuildTideSelectList(LLBBox &BBox);
692 void RebuildCurrentSelectList(LLBBox &BBox);
696 void RenderRouteLegs(
ocpnDC &dc);
697 void RenderVisibleSectorLights(
ocpnDC &dc);
699 void AlertDraw(
ocpnDC &dc);
701 void GridDraw(
ocpnDC &dc);
702 void ScaleBarDraw(
ocpnDC &dc);
704 void DrawOverlayObjects(
ocpnDC &dc,
const wxRegion &ru);
705 void RenderShipToActive(
ocpnDC &dc,
bool Use_Opengl);
708 emboss_data *CreateEmbossMapData(wxFont &font,
int width,
int height,
709 const wxString &str, ColorScheme cs);
710 void CreateDepthUnitEmbossMaps(ColorScheme cs);
711 wxBitmap CreateDimBitmap(wxBitmap &Bitmap,
double factor);
713 void CreateOZEmbossMapData(ColorScheme cs);
715 void SetOverzoomFont();
722 void ShowBrightnessLevelTimedPopup(
int brightness,
int min,
int max);
725 int m_canvas_width, m_canvas_height;
743 wxTimer *pMovementStopTimer;
745 wxTimer *pCurTrackTimer;
747 wxTimer *pRotDefTimer;
749 wxTimer *m_DoubleClickTimer;
750 wxTimer m_routeFinishTimer;
752 wxTimer m_RolloverPopupTimer;
754 int m_wheelzoom_stop_oneshot;
755 int m_last_wheel_dir;
756 wxStopWatch m_wheelstopwatch;
757 double m_zoom_target;
759 int m_curtrack_timer_msec;
760 int m_rollover_popup_timer_msec;
765 wxBitmap *pss_overlay_bmp;
766 wxMask *pss_overlay_mask;
768 wxRect ship_draw_rect;
769 wxRect ship_draw_last_rect;
770 wxRect ais_draw_rect;
771 wxRect alert_draw_rect;
774 wxMemoryDC m_dc_route;
783 double m_true_scale_ppm;
785 ownship_state_t m_ownship_state;
789 wxBitmap m_bmTideDay;
790 wxBitmap m_bmTideDusk;
791 wxBitmap m_bmTideNight;
792 wxBitmap m_bmCurrentDay;
793 wxBitmap m_bmCurrentDusk;
794 wxBitmap m_bmCurrentNight;
795 wxBitmap m_cTideBitmap;
796 wxBitmap m_cCurrentBitmap;
804 wxImage m_os_image_red_day;
805 wxImage m_os_image_red_dusk;
806 wxImage m_os_image_red_night;
807 wxImage m_os_image_grey_day;
808 wxImage m_os_image_grey_dusk;
809 wxImage m_os_image_grey_night;
810 wxImage m_os_image_yellow_day;
811 wxImage m_os_image_yellow_dusk;
812 wxImage m_os_image_yellow_night;
814 wxImage *m_pos_image_red;
815 wxImage *m_pos_image_grey;
816 wxImage *m_pos_image_yellow;
818 wxImage *m_pos_image_user;
819 wxImage *m_pos_image_user_grey;
820 wxImage *m_pos_image_user_yellow;
822 wxImage *m_pos_image_user_day;
823 wxImage *m_pos_image_user_dusk;
824 wxImage *m_pos_image_user_night;
825 wxImage *m_pos_image_user_grey_day;
826 wxImage *m_pos_image_user_grey_dusk;
827 wxImage *m_pos_image_user_grey_night;
828 wxImage *m_pos_image_user_yellow_day;
829 wxImage *m_pos_image_user_yellow_dusk;
830 wxImage *m_pos_image_user_yellow_night;
832 wxImage m_ship_pix_image;
834 bool m_cur_ship_pix_isgrey;
835 ColorScheme m_ship_cs;
846 double m_wheel_lat, m_wheel_lon;
847 int m_wheel_x, m_wheel_y;
850 wxBitmap m_working_bm;
851 wxBitmap m_cached_chart_bm;
856 bool m_bzooming, m_bzooming_to_cursor;
865 int m_panx, m_pany, m_modkeys;
867 bool m_bmouse_key_mod;
868 double m_zoom_factor, m_rotation_speed;
871 wxDateTime m_last_movement_time;
873 int m_AISRollover_MMSI;
874 bool m_bsectors_shown;
876 double m_displayed_scale_factor;
878 wxColour m_fog_color;
879 bool m_disable_edge_pan;
882 bool m_dragoffsetSet;
885 double m_toolbar_scalefactor;
886 wxString m_toolbarConfig;
887 wxPoint m_toolbarPosition;
888 long m_toolbarOrientation;
892 double m_vLat, m_vLon;
895 bool m_bpersistent_quilt;
897 wxMenu *m_piano_ctx_menu;
898 int menu_selected_dbIndex, menu_selected_index;
903 wxRect m_mainlast_tb_rect;
904 int m_restore_dbindex;
908 wxSize m_muiBarHOSize;
910 bool m_bShowOutlines;
912 bool m_bShowDepthUnits;
913 bool m_bToolbarEnable;
915 bool m_bShowAISScaled;
921 bool m_encShowLightDesc;
922 bool m_encShowBuoyLabels;
923 int m_encDisplayCategory;
924 bool m_encShowLights;
925 bool m_encShowAnchor;
926 bool m_encShowDataQual;
928 wxTimer m_deferredFocusTimer;
929 float m_focus_indicator_pix;
933 double m_OSoffsetx, m_OSoffsety;
934 bool m_MouseDragging;
936 wxString m_alertString;
937 wxRect m_scaleBarRect;
938 bool m_bShowCompassWin;
941 double m_sector_glat, m_sector_glon;
942 std::vector<s57Sector_t> m_sectorlegsVisible;
943 bool m_bShowVisibleSectors;
944 double m_displayScale;
946 DECLARE_EVENT_TABLE()
951wxString minutesToHoursDays(
float timeInMinutes);
960#define wxCLOSE_BOX 0x1000
962#ifndef wxFIXED_MINSIZE
963#define wxFIXED_MINSIZE 0
bool MouseEventSetup(wxMouseEvent &event, bool b_handle_dclick=true)