Garmin Fleet Management Controller
2.19.0
|
Dialog allowing the user to manage canned responses. More...
#include <CManageCannedResponseDlg.h>
Public Member Functions | |
CManageCannedResponseDlg (CWnd *aParent, FmiApplicationLayer &aCom) | |
Constructor. More... | |
virtual | ~CManageCannedResponseDlg () |
Destructor. 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 | |
virtual void | DoDataExchange (CDataExchange *aDataExchange) |
Perform dialog data exchange and validation. More... | |
afx_msg void | OnBnClickedDelete () |
Button handler for the Delete button. More... | |
afx_msg void | OnBnClickedOk () |
Button handler for the OK button. More... | |
afx_msg void | OnBnClickedSend () |
Button handler for the Send button. More... | |
afx_msg void | OnCancel () |
Handler for the Cancel action. More... | |
afx_msg LPARAM | OnCannedRespListChanged (WPARAM, LPARAM) |
Handler for FMI_EVENT_CANNED_RESP_LIST_CHANGED event. More... | |
afx_msg void | OnEnChangeRspBoxes () |
Edit handler for the Response ID and Response Text boxes. More... | |
afx_msg void | OnEnKillfocusResponseEdit () |
Handles the kill focus event for the Response ID and Response Text edit boxes. More... | |
afx_msg void | OnEnSetfocusResponseEdit () |
Handles the set focus event for the Response ID and Response Text edit boxes. More... | |
BOOL | OnInitDialog () |
This function is called when the window is created. More... | |
afx_msg void | OnLbnKillfocusResponselist () |
Handles the kill focus event for the Response List box. More... | |
afx_msg void | OnLbnSelchangeResponselist () |
Selection Changed handler for the Response List box. More... | |
afx_msg void | OnLbnSetfocusResponselist () |
Handles the set focus event for the Response List. More... | |
void | PostNcDestroy () |
Called by MFC after the window has been destroyed; performs final termination activities. More... | |
void | updateListBox () |
Update the canned response list box from the canned response map owned by FmiApplicationLayer. More... | |
Protected Attributes | |
FmiApplicationLayer & | mCom |
Reference to the FMI communication controller. More... | |
CListBox | mListBox |
List box control containing the canned responses. More... | |
CString | mResponseId |
DDX member: the contents of the Response ID edit box. More... | |
CString | mResponseText |
DDX member: the contents of the Response Text edit box. More... | |
int | mSelectedResponseIndex |
Index of the list box item currently selected. More... | |
Dialog allowing the user to manage canned responses.
This dialog allows the user to manage the global list of canned responses available for messages. Particular responses for a message are selected in the CSelectCannedResponseDlg.
Definition at line 26 of file CManageCannedResponseDlg.h.
CManageCannedResponseDlg::CManageCannedResponseDlg | ( | CWnd * | aParent, |
FmiApplicationLayer & | aCom | ||
) |
Constructor.
aParent | The parent window. |
aCom | Reference to the FMI communication controller |
Definition at line 40 of file CManageCannedResponseDlg.cpp.
|
virtual |
Destructor.
Definition at line 55 of file CManageCannedResponseDlg.cpp.
References DoDataExchange().
|
protectedvirtual |
Perform dialog data exchange and validation.
aDataExchange | The DDX context |
Definition at line 64 of file CManageCannedResponseDlg.cpp.
References IDC_CANRESP_EDIT_ID, IDC_CANRESP_EDIT_TEXT, and IDC_CANRESP_LST_RESPONSES.
Referenced by ~CManageCannedResponseDlg().
|
protected |
Button handler for the Delete button.
Calls FmiApplicationLayer to initiate the Delete Canned Response protocol.
Definition at line 127 of file CManageCannedResponseDlg.cpp.
References TRUE.
|
protected |
Button handler for the OK button.
Closes the window.
Definition at line 227 of file CManageCannedResponseDlg.cpp.
|
protected |
Button handler for the Send button.
Calls FmiApplicationLayer to initiate the Set Canned Response protocol, using the data in the Response ID and Response Text edit boxes.
Definition at line 153 of file CManageCannedResponseDlg.cpp.
References TRUE.
|
protected |
Handler for the Cancel action.
Closes the window.
Definition at line 237 of file CManageCannedResponseDlg.cpp.
|
protected |
Handler for FMI_EVENT_CANNED_RESP_LIST_CHANGED event.
Updates the list box
Definition at line 141 of file CManageCannedResponseDlg.cpp.
|
protected |
Edit handler for the Response ID and Response Text boxes.
If either box is empty, disables the Send button; if both ID and text are specified, enables the Send button.
Definition at line 166 of file CManageCannedResponseDlg.cpp.
References FALSE, IDC_CANRESP_BTN_SEND, and TRUE.
|
protected |
Handles the kill focus event for the Response ID and Response Text edit boxes.
Sets the default control to the OK button so that it is activated if the user presses the Enter key.
Definition at line 273 of file CManageCannedResponseDlg.cpp.
|
protected |
Handles the set focus event for the Response ID and Response Text edit boxes.
Sets the default control to the Send button so that it is activated if the user presses the Enter key.
Definition at line 262 of file CManageCannedResponseDlg.cpp.
References IDC_CANRESP_BTN_SEND.
|
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.
This function is called when the window is created. It initializes the canned response list, and sets the initial position of the window.
Definition at line 82 of file CManageCannedResponseDlg.cpp.
References TRUE.
|
protected |
Handles the kill focus event for the Response List box.
Sets the default control to the OK button so that it is activated if the user presses the Enter key.
Definition at line 293 of file CManageCannedResponseDlg.cpp.
|
protected |
Selection Changed handler for the Response List box.
Fills in the Response ID and Response Text fields of the dialog with the information from the selected list item, for easy editing.
Definition at line 186 of file CManageCannedResponseDlg.cpp.
References FALSE, and IDC_CANRESP_LST_RESPONSES.
|
protected |
Handles the set focus event for the Response List.
Sets the default control to the Delete button so that it is activated if the user presses the Enter key.
Definition at line 283 of file CManageCannedResponseDlg.cpp.
References IDC_CANRESP_BTN_DELETE.
|
protected |
Called by MFC after the window has been destroyed; performs final termination activities.
This dialog is a "monitor", so it is modeless. When it gets the destroy message it must re-enable the main button to open this dialog (the button is disabled when the dialog is opened to prevent more than one from being created)
Definition at line 250 of file CManageCannedResponseDlg.cpp.
References EVENT_FMI_CANNED_RESPONSE_DLG_CLOSED, and Event::post().
|
protected |
Update the canned response list box from the canned response map owned by FmiApplicationLayer.
Definition at line 97 of file CManageCannedResponseDlg.cpp.
References FileBackedMap< T >::begin(), and FileBackedMap< T >::end().
|
protected |
Reference to the FMI communication controller.
Definition at line 63 of file CManageCannedResponseDlg.h.
|
protected |
List box control containing the canned responses.
Definition at line 66 of file CManageCannedResponseDlg.h.
|
protected |
DDX member: the contents of the Response ID edit box.
Definition at line 72 of file CManageCannedResponseDlg.h.
|
protected |
DDX member: the contents of the Response Text edit box.
Definition at line 75 of file CManageCannedResponseDlg.h.
|
protected |
Index of the list box item currently selected.
Definition at line 69 of file CManageCannedResponseDlg.h.