Garmin Fleet Management Controller
2.19.0
|
Browser-based container for listing the Custom Avoidances library. More...
#include <CMapViewerDlg.h>
Public Types | |
enum | { IDD = IDD_MAP_VIEWER } |
Public Member Functions | |
CMapViewerDlg (CWnd *pParent, FmiApplicationLayer &aCom) | |
Constructor. More... | |
virtual | ~CMapViewerDlg () |
Destructor. More... | |
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. More... | |
void | onEvent (EventId aEventId, uint32 aEventData, void *aEventDataPtr, BOOL handleNow) |
Handles event callbacks by translating an EventId into a windows message. More... | |
Protected Member Functions | |
BOOL | activateStopOnDevice (int itemId) |
This function activates the specified route on the device. More... | |
BOOL | addAvoidanceToCatalog (int itemId, LPCTSTR name, LPCTSTR description, long north, long east, long south, long west) |
This function adds an item to the catalog. More... | |
BOOL | addRouteToCatalog (CStringArray &args) |
This function adds an item to the catalog. More... | |
BOOL | addStopToCatalog (CStringArray &args) |
This function adds an item to the catalog. More... | |
BOOL | completeStopOnDevice (int itemId) |
This function marks the specified route as done on the device. More... | |
BOOL | deleteAvoidanceFromDevice (int itemId) |
This function deletes the specified region from the device. More... | |
BOOL | deleteRouteFromDevice (int itemId) |
This function deletes the specified route from the device. More... | |
virtual void | DoDataExchange (CDataExchange *pDX) |
Perform dialog data exchange and validation. More... | |
BOOL | moveStopOnDevice (int itemId, short newPosition) |
This function repositions the specified stop on the device. More... | |
BOOL | OnInitDialog () |
This function is called when the window is created. More... | |
afx_msg void | OnSize (UINT aType, int aClientWidth, int aClientHeight) |
Called after the dialog is resized; repositions the contents of the display. More... | |
void | refreshCatalog () |
This function is called to reload the catalog document. More... | |
BOOL | removeAvoidanceFromCatalog (int itemId) |
This function removes specific regions from the catalog. More... | |
BOOL | removeItemsFromCatalog (LPCTSTR selector) |
This function removes specific routes from the catalog. More... | |
BOOL | removeRouteFromCatalog (int itemId) |
This function removes specific routes from the catalog. More... | |
BOOL | removeStopFromCatalog (int itemId) |
BOOL | sendAvoidanceToDevice (int itemId, LPCTSTR name, long north, long east, long south, long west) |
This function sends the specified region to the device. More... | |
BOOL | sendRouteToDevice (int itemId) |
This function sends the specified route to the device. More... | |
BOOL | sendStopToDevice (int itemId) |
This function sends the specified stop to the device. More... | |
BOOL | setAvoidanceEnabled (int itemId, BOOL enabled=TRUE) |
This function toggles enabled for the region on the device. More... | |
Protected Attributes | |
CWebBrowser2 | m_browser |
FmiApplicationLayer & | mCom |
Reference to the FMI communication controller. More... | |
Private Attributes | |
CStringArray | m_addRouteArguments |
List of arguments that are accumulated across several calls from browser. More... | |
Browser-based container for listing the Custom Avoidances library.
Definition at line 24 of file CMapViewerDlg.h.
anonymous enum |
Enumerator | |
---|---|
IDD |
Definition at line 36 of file CMapViewerDlg.h.
CMapViewerDlg::CMapViewerDlg | ( | CWnd * | pParent, |
FmiApplicationLayer & | aCom | ||
) |
Constructor.
Definition at line 39 of file CMapViewerDlg.cpp.
|
virtual |
Destructor.
Definition at line 48 of file CMapViewerDlg.cpp.
|
protected |
This function activates the specified route on the device.
Definition at line 814 of file CMapViewerDlg.cpp.
References REQUEST_ACTIVATE_STOP, and TRUE.
|
protected |
This function adds an item to the catalog.
Load the catalog document, create the new region element, add that to the catalog element, and then save the document
Definition at line 382 of file CMapViewerDlg.cpp.
|
protected |
This function adds an item to the catalog.
Load the catalog document, create the new route element, add that to the catalog element, and then save the document
Definition at line 595 of file CMapViewerDlg.cpp.
|
protected |
This function adds an item to the catalog.
Load the catalog document, create the new stop element, add that to the catalog element, and then save the document
Definition at line 500 of file CMapViewerDlg.cpp.
References FALSE, StopListItem::setCurrentName(), StopListItem::setStopStatus(), ClientListItem::setValid(), STOP_STATUS_UNREAD, and TRUE.
|
protected |
This function marks the specified route as done on the device.
Definition at line 824 of file CMapViewerDlg.cpp.
References REQUEST_MARK_STOP_DONE, and TRUE.
|
protected |
This function deletes the specified region from the device.
Definition at line 465 of file CMapViewerDlg.cpp.
References FMI_CUSTOM_AVOID_DEL_REQUEST, TRUE, and custom_avoid_delete_type::unique_id.
|
protected |
This function deletes the specified route from the device.
Definition at line 804 of file CMapViewerDlg.cpp.
References REQUEST_DELETE_STOP, and TRUE.
|
protectedvirtual |
Perform dialog data exchange and validation.
aDataExchange | The DDX context |
Definition at line 57 of file CMapViewerDlg.cpp.
References IDC_EMBEDDED_BROWSER.
|
protected |
This function repositions the specified stop on the device.
Definition at line 834 of file CMapViewerDlg.cpp.
References REQUEST_MOVE_STOP, and TRUE.
void CMapViewerDlg::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.
Handle application-specific navigation URLs.
Definition at line 159 of file CMapViewerDlg.cpp.
References FALSE, TRUE, and CWebBrowser2::URLDecode().
Referenced by refreshCatalog().
|
virtualinherited |
Handles event callbacks by translating an EventId into a windows message.
Casts this to a CWnd then posts a Windows message to it. The use of dynamic_cast is used as an alternative to the "dreaded diamond" caused by C++ multiple inheritance.
aEventId | The event ID |
aEventData | The event data |
aEventDataPtr | Pointer to more event data |
Implements EventListener.
Definition at line 29 of file CWndEventListener.cpp.
References EVENT_ID_CNT, and WM_EVENT.
|
protected |
This function is called when the window is created.
Definition at line 67 of file CMapViewerDlg.cpp.
|
protected |
Called after the dialog is resized; repositions the contents of the display.
Moves/sizes the contents as follows:
aType | The type of resizing requested (maximized, etc.) |
aClientWidth | The new width of the client area |
aClientHeight | The new height of the client area |
Definition at line 94 of file CMapViewerDlg.cpp.
Referenced by OnInitDialog().
|
protected |
This function is called to reload the catalog document.
Definition at line 120 of file CMapViewerDlg.cpp.
References IDC_EMBEDDED_BROWSER, OnBeforeNavigate2(), and write().
|
protected |
This function removes specific regions from the catalog.
Load the catalog document, search for all regions by id, remove them, and then save the document
Definition at line 426 of file CMapViewerDlg.cpp.
|
protected |
This function removes specific routes from the catalog.
Load the catalog document, search for all routes by id, remove them, and then save the document
Definition at line 848 of file CMapViewerDlg.cpp.
|
protected |
This function removes specific routes from the catalog.
Load the catalog document, search for all routes by id, remove them, and then save the document
Definition at line 645 of file CMapViewerDlg.cpp.
|
protected |
|
protected |
This function sends the specified region to the device.
This passes data directly to the device. It does not load any information from the catalog
Definition at line 439 of file CMapViewerDlg.cpp.
References custom_avoid_type::enable, FMI_CUSTOM_AVOID_ADD_REQUEST, sc_position_type::lat, sc_position_type::lon, custom_avoid_type::name, custom_avoid_type::point1, custom_avoid_type::point2, TRUE, and custom_avoid_type::unique_id.
|
protected |
This function sends the specified route to the device.
This passes data directly to the device. It does load information from the catalog
Definition at line 658 of file CMapViewerDlg.cpp.
References FALSE, FMI_FILE_TYPE_PATH_SPECIFIC_ROUTE, sc_position_type::lat, sc_position_type::lon, minval, SEND_ROUTE_TEMP_FILE, StopListItem::setCurrentName(), StopListItem::setStopStatus(), ClientListItem::setValid(), STOP_STATUS_UNREAD, TRUE, UTIL_get_current_garmin_time(), and write().
|
protected |
This function sends the specified stop to the device.
This passes data directly to the device. It does load information from the catalog
Definition at line 549 of file CMapViewerDlg.cpp.
|
protected |
This function toggles enabled for the region on the device.
Definition at line 481 of file CMapViewerDlg.cpp.
References custom_avoid_enable_type::enable, FMI_CUSTOM_AVOID_TOGGLE_REQUEST, TRUE, and custom_avoid_enable_type::unique_id.
|
private |
List of arguments that are accumulated across several calls from browser.
Definition at line 81 of file CMapViewerDlg.h.
|
protected |
Definition at line 73 of file CMapViewerDlg.h.
|
protected |
Reference to the FMI communication controller.
Definition at line 76 of file CMapViewerDlg.h.