Garmin Fleet Management Controller  2.19.0
CMapViewerDlg.h
Go to the documentation of this file.
1 /*********************************************************************
2 *
3 * HEADER NAME:
4 * CMapViewerDlg.h
5 *
6 * Copyright 2013 by Garmin Ltd. or its subsidiaries.
7 *---------------------------------------------------------------------
8 * $NoKeywords$
9 *********************************************************************/
10 #pragma once
11 
12 #include "CWebBrowser2.h"
13 #include "FmiApplicationLayer.h"
14 #include "CWndEventListener.h"
15 
16 #if( FMI_SUPPORT_A613 )
17 
18 // CMapViewerDlg dialog
19 
20 //----------------------------------------------------------------------
23 //----------------------------------------------------------------------
24 class CMapViewerDlg : public CDialog, public CWndEventListener
25 {
26  DECLARE_DYNAMIC(CMapViewerDlg)
27 
28 public:
30  CWnd* pParent,
31  FmiApplicationLayer & aCom
32  );
33  virtual ~CMapViewerDlg();
34 
35 // Dialog Data
36  enum { IDD = IDD_MAP_VIEWER };
37 
38 protected:
39  virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
40 
41  DECLARE_MESSAGE_MAP()
42 
43  BOOL OnInitDialog();
44  afx_msg void OnSize
45  (
46  UINT aType,
47  int aClientWidth,
48  int aClientHeight
49  );
50 
51  void refreshCatalog();
52 
53  BOOL addAvoidanceToCatalog(int itemId, LPCTSTR name, LPCTSTR description, long north, long east, long south, long west);
54  BOOL removeAvoidanceFromCatalog(int itemId);
55  BOOL sendAvoidanceToDevice(int itemId, LPCTSTR name, long north, long east, long south, long west);
56  BOOL deleteAvoidanceFromDevice(int itemId);
57  BOOL setAvoidanceEnabled(int itemId, BOOL enabled = TRUE);
58  BOOL addStopToCatalog(CStringArray & args);
59  BOOL sendStopToDevice(int itemId);
60  BOOL removeStopFromCatalog(int itemId);
61 
62 #if( FMI_SUPPORT_A614 )
63  BOOL addRouteToCatalog(CStringArray & args);
64  BOOL removeRouteFromCatalog(int itemId);
65  BOOL sendRouteToDevice(int itemId);
66  BOOL deleteRouteFromDevice(int itemId);
67  BOOL activateStopOnDevice(int itemId);
68  BOOL completeStopOnDevice(int itemId);
69  BOOL moveStopOnDevice(int itemId, short newPosition);
70 #endif
71  BOOL removeItemsFromCatalog(LPCTSTR selector);
72 
74 
77 
78 private:
79 #if( FMI_SUPPORT_A614 )
80  CStringArray m_addRouteArguments;
82 #endif
83 
84 public:
85  DECLARE_EVENTSINK_MAP()
87  void OnBeforeNavigate2(LPDISPATCH pDisp, VARIANT* URL, VARIANT* Flags, VARIANT* TargetFrameName, VARIANT* PostData, VARIANT* Headers, BOOL* Cancel);
88  };
89 
90 #endif
CWebBrowser2 m_browser
Definition: CMapViewerDlg.h:73
BOOL addStopToCatalog(CStringArray &args)
This function adds an item to the catalog.
FmiApplicationLayer & mCom
Reference to the FMI communication controller.
Definition: CMapViewerDlg.h:76
Browser-based container for listing the Custom Avoidances library.
Definition: CMapViewerDlg.h:24
BOOL OnInitDialog()
This function is called when the window is created.
BOOL completeStopOnDevice(int itemId)
This function marks the specified route as done on the device.
afx_msg void OnSize(UINT aType, int aClientWidth, int aClientHeight)
Called after the dialog is resized; repositions the contents of the display.
#define TRUE
Definition: garmin_types.h:45
virtual ~CMapViewerDlg()
Destructor.
BOOL sendAvoidanceToDevice(int itemId, LPCTSTR name, long north, long east, long south, long west)
This function sends the specified region to the device.
BOOL addAvoidanceToCatalog(int itemId, LPCTSTR name, LPCTSTR description, long north, long east, long south, long west)
This function adds an item to the catalog.
BOOL addRouteToCatalog(CStringArray &args)
This function adds an item to the catalog.
Serial communication controller for Garmin and FMI packets.
BOOL removeRouteFromCatalog(int itemId)
This function removes specific routes from the catalog.
BOOL removeStopFromCatalog(int itemId)
BOOL deleteAvoidanceFromDevice(int itemId)
This function deletes the specified region from the device.
virtual void DoDataExchange(CDataExchange *pDX)
Perform dialog data exchange and validation.
EventListener that dispatches a Windows message.
BOOL moveStopOnDevice(int itemId, short newPosition)
This function repositions the specified stop on the device.
CStringArray m_addRouteArguments
List of arguments that are accumulated across several calls from browser.
Definition: CMapViewerDlg.h:81
void OnBeforeNavigate2(LPDISPATCH pDisp, VARIANT *URL, VARIANT *Flags, VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers, BOOL *Cancel)
This catches navigation attempts for the purpose of handling application-specific navigation...
BOOL removeAvoidanceFromCatalog(int itemId)
This function removes specific regions from the catalog.
BOOL deleteRouteFromDevice(int itemId)
This function deletes the specified route from the device.
Web Browser ActiveX wrapper, generated by Visual Studio.
Definition: CWebBrowser2.h:24
#define IDD_MAP_VIEWER
Definition: resource.h:54
BOOL removeItemsFromCatalog(LPCTSTR selector)
This function removes specific routes from the catalog.
BOOL sendRouteToDevice(int itemId)
This function sends the specified route to the device.
void refreshCatalog()
This function is called to reload the catalog document.
BOOL setAvoidanceEnabled(int itemId, BOOL enabled=TRUE)
This function toggles enabled for the region on the device.
CMapViewerDlg(CWnd *pParent, FmiApplicationLayer &aCom)
Constructor.
BOOL activateStopOnDevice(int itemId)
This function activates the specified route on the device.
BOOL sendStopToDevice(int itemId)
This function sends the specified stop to the device.