Garmin Fleet Management Controller
2.19.0
|
Browser-based container for listing the Custom Forms library. More...
#include <CCustomFormsDlg.h>
Public Types | |
enum | { IDD = IDD_CUSTOM_FORMS } |
Public Member Functions | |
CCustomFormsDlg (CWnd *pParent, FmiApplicationLayer &aCom) | |
Constructor. More... | |
virtual | ~CCustomFormsDlg () |
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 | buildCatalog (LPCTSTR filename) |
Construct a catalog document based on the library structure. More... | |
BOOL | deleteFromDevice (int formId) |
virtual void | DoDataExchange (CDataExchange *pDX) |
Perform dialog data exchange and validation. More... | |
BOOL | importForm () |
BOOL | moveOnDevice (int formId, uint8 newPosition) |
afx_msg LRESULT | OnFormDeleted (WPARAM, LPARAM) |
This function handles form delete ACK event from device. More... | |
afx_msg LRESULT | OnFormPositionChanged (WPARAM, LPARAM) |
This function handles form position report event from device. More... | |
afx_msg LRESULT | OnFormShowFail (WPARAM, LPARAM) |
This function handles form show failure event from device. More... | |
afx_msg LRESULT | OnFormShowSuccess (WPARAM, LPARAM) |
This function handles form show success event from device. More... | |
afx_msg LRESULT | OnFormSubmitReceived (WPARAM, LPARAM) |
This function handles completed form submit event from 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 reconstructs catalog file and redisplays it. More... | |
BOOL | requestPosition (int formId) |
BOOL | sendToDevice (LPCTSTR filename) |
BOOL | showForm (int formId) |
void | transform (LPCTSTR src, XMLTransformer *transformer, CMapStringToString ¶ms) |
Transform specified XML document and display in web view. More... | |
Protected Attributes | |
CWebBrowser2 | m_browser |
XMLTransformer * | m_submittedTransform |
cache the submitted form transformer for re-use More... | |
XMLTransformer * | m_templateTransform |
cache the form template transformer for re-use More... | |
FmiApplicationLayer & | mCom |
Reference to the FMI communication controller. More... | |
Browser-based container for listing the Custom Forms library.
When first loaded this dialog lists all the forms imported into its file-based repository. Each list item has a link to a preview of the template, as well as links to a preview of any forms submitted against that template.
Definition at line 28 of file CCustomFormsDlg.h.
anonymous enum |
Enumerator | |
---|---|
IDD |
Definition at line 40 of file CCustomFormsDlg.h.
CCustomFormsDlg::CCustomFormsDlg | ( | CWnd * | pParent, |
FmiApplicationLayer & | aCom | ||
) |
Constructor.
Definition at line 46 of file CCustomFormsDlg.cpp.
|
virtual |
Destructor.
Definition at line 57 of file CCustomFormsDlg.cpp.
|
protected |
Construct a catalog document based on the library structure.
Definition at line 544 of file CCustomFormsDlg.cpp.
|
protected |
Definition at line 1098 of file CCustomFormsDlg.cpp.
References FMI_CUSTOM_FORM_DEL_REQUEST, and TRUE.
|
protectedvirtual |
Perform dialog data exchange and validation.
aDataExchange | The DDX context |
Definition at line 69 of file CCustomFormsDlg.cpp.
References IDC_EMBEDDED_BROWSER.
|
protected |
Definition at line 894 of file CCustomFormsDlg.cpp.
|
protected |
Definition at line 1107 of file CCustomFormsDlg.cpp.
References FMI_CUSTOM_FORM_MOVE_REQUEST, custom_form_move_type::form_id, custom_form_move_type::new_position, and TRUE.
void CCustomFormsDlg::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 772 of file CCustomFormsDlg.cpp.
References cleanupParentFolder(), TRUE, and CWebBrowser2::URLDecode().
Referenced by transform().
|
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 handles form delete ACK event from device.
Definition at line 154 of file CCustomFormsDlg.cpp.
|
protected |
This function handles form position report event from device.
Definition at line 166 of file CCustomFormsDlg.cpp.
|
protected |
This function handles form show failure event from device.
Definition at line 179 of file CCustomFormsDlg.cpp.
|
protected |
This function handles form show success event from device.
Definition at line 191 of file CCustomFormsDlg.cpp.
|
protected |
This function handles completed form submit event from device.
Definition at line 382 of file CCustomFormsDlg.cpp.
References extractMultiPart(), MULTIPART_CONTENT_HEADER, SAVE_RECEIVED_FORM_SUBMIT, and unzip().
|
protected |
This function is called when the window is created.
Definition at line 79 of file CCustomFormsDlg.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 131 of file CCustomFormsDlg.cpp.
Referenced by OnInitDialog().
|
protected |
This function reconstructs catalog file and redisplays it.
Definition at line 513 of file CCustomFormsDlg.cpp.
References CWebBrowser2::URLDecode().
|
protected |
Definition at line 1119 of file CCustomFormsDlg.cpp.
References FMI_CUSTOM_FORM_GET_POS_REQUEST, and TRUE.
|
protected |
Definition at line 1027 of file CCustomFormsDlg.cpp.
References FALSE, FMI_FILE_TYPE_CUSTOM_FORMS, minval, and TRUE.
|
protected |
Definition at line 1129 of file CCustomFormsDlg.cpp.
References FMI_CUSTOM_FORM_SHOW_REQUEST, and TRUE.
|
protected |
Transform specified XML document and display in web view.
Definition at line 700 of file CCustomFormsDlg.cpp.
References IDC_EMBEDDED_BROWSER, OnBeforeNavigate2(), FileStream::OpenFile(), and XMLTransformer::transform().
|
protected |
Definition at line 76 of file CCustomFormsDlg.h.
|
protected |
cache the submitted form transformer for re-use
Definition at line 81 of file CCustomFormsDlg.h.
|
protected |
cache the form template transformer for re-use
Definition at line 79 of file CCustomFormsDlg.h.
|
protected |
Reference to the FMI communication controller.
Definition at line 84 of file CCustomFormsDlg.h.