Garmin Fleet Management Controller
2.19.0
|
Dialog allowing the user to manage the list of canned messages on the client. More...
#include <CCannedTxtMsgDlg.h>
Public Member Functions | |
CCannedTxtMsgDlg (CWnd *aParent, FmiApplicationLayer &aCom) | |
Constructor. More... | |
virtual | ~CCannedTxtMsgDlg () |
[Brief description of the method] 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 () |
Handles the Delete button clicked event. 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 | OnCannedMsgListChanged (WPARAM, LPARAM) |
Handler for the FMI_EVENT_CANNED_MSG_LIST_CHANGED event. More... | |
afx_msg void | OnEnChangeEditBoxes () |
Edit handler for the Message ID and Message Text boxes. More... | |
afx_msg void | OnEnKillfocusMessageEdit () |
Handles the kill focus event for the Message ID and Message Text edit boxes. More... | |
afx_msg void | OnEnSetfocusMessageEdit () |
Handles the set focus event for the Message ID and Message Text edit boxes. More... | |
BOOL | OnInitDialog () |
Initialize the dialog. More... | |
afx_msg void | OnLbnKillfocusMsgList () |
Handles the kill focus event for the Message list box. More... | |
afx_msg void | OnLbnSelchangeMsglist () |
Selection Changed handler for the Message List box. More... | |
afx_msg void | OnLbnSetfocusList () |
Handles the set focus event for the Message List box. More... | |
void | PostNcDestroy () |
Called by MFC after the window has been destroyed; performs final termination activities. More... | |
void | updateListBox () |
Update the canned message list box from the canned message map owned by FmiApplicationLayer. More... | |
Protected Attributes | |
CListBox | mCannedMessageList |
Listbox containing the canned messages on the client. More... | |
FmiApplicationLayer & | mCom |
Reference to the communication layer. More... | |
CString | mMessageId |
The canned message ID entered by the user. More... | |
CString | mMessageText |
The canned message text entered by the user. More... | |
int | mSelectedIndex |
The index of the selected item in the list of messages. More... | |
Dialog allowing the user to manage the list of canned messages on the client.
This dialog must be created modal.
Definition at line 24 of file CCannedTxtMsgDlg.h.
CCannedTxtMsgDlg::CCannedTxtMsgDlg | ( | CWnd * | aParent, |
FmiApplicationLayer & | aCom | ||
) |
Constructor.
aParent | The parent of this dialog |
aCom | Reference to the FMI communication controller |
Definition at line 40 of file CCannedTxtMsgDlg.cpp.
|
virtual |
[Brief description of the method]
[A longer description of the method]
Definition at line 56 of file CCannedTxtMsgDlg.cpp.
References DoDataExchange().
|
protectedvirtual |
Perform dialog data exchange and validation.
aDataExchange | The DDX context |
Definition at line 65 of file CCannedTxtMsgDlg.cpp.
References IDC_CANMSG_EDIT_ID, IDC_CANMSG_EDIT_TEXT, and IDC_CANMSG_LST_MESSAGES.
Referenced by ~CCannedTxtMsgDlg().
|
protected |
Handles the Delete button clicked event.
Initiates a Delete Canned Message protocol using via the FmiApplicationLayer.
Definition at line 193 of file CCannedTxtMsgDlg.cpp.
References TRUE.
|
protected |
Button handler for the OK button.
Closes the window.
Definition at line 220 of file CCannedTxtMsgDlg.cpp.
|
protected |
Button handler for the Send button.
Calls FmiApplicationLayer to initiate the Set Canned Message protocol, using the data in the Message ID and Message Text edit boxes.
Definition at line 208 of file CCannedTxtMsgDlg.cpp.
References TRUE.
|
protected |
Handler for the Cancel action.
Closes the window.
Definition at line 229 of file CCannedTxtMsgDlg.cpp.
|
protected |
Handler for the FMI_EVENT_CANNED_MSG_LIST_CHANGED event.
Updates the list box.
Definition at line 127 of file CCannedTxtMsgDlg.cpp.
|
protected |
Edit handler for the Message ID and Message 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 138 of file CCannedTxtMsgDlg.cpp.
References FALSE, IDC_CANMSG_BTN_SEND, and TRUE.
|
protected |
Handles the kill focus event for the Message ID and Message Text edit boxes.
Restores the default ID to the OK button so that it is activated if the user presses the Enter key.
Definition at line 267 of file CCannedTxtMsgDlg.cpp.
|
protected |
Handles the set focus event for the Message ID and Message Text edit boxes.
Sets the default ID to the Send button so that it is activated if the user presses the Enter key.
Definition at line 256 of file CCannedTxtMsgDlg.cpp.
References IDC_CANMSG_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 |
Initialize the dialog.
This function is called when the window is created. It initializes the response list and sets the window position.
Definition at line 82 of file CCannedTxtMsgDlg.cpp.
References TRUE.
|
protected |
Handles the kill focus event for the Message list box.
Restores the default ID to the OK button so that it is activated if the user presses the Enter key.
Definition at line 287 of file CCannedTxtMsgDlg.cpp.
|
protected |
Selection Changed handler for the Message List box.
Fills in the Message ID and Message Text fields of the dialog with the information from the selected list item, for easy editing.
Definition at line 157 of file CCannedTxtMsgDlg.cpp.
References FALSE, and IDC_CANMSG_LST_MESSAGES.
|
protected |
Handles the set focus event for the Message List box.
Sets the default ID to the Delete button so that it is activated if the user presses the Enter key.
Definition at line 277 of file CCannedTxtMsgDlg.cpp.
References IDC_CANMSG_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 dialogs (the button is disabled when the dialog is opened to prevent several of the same type from being created), and delete itself since the pointer to it is not maintained by the parent.
Definition at line 244 of file CCannedTxtMsgDlg.cpp.
References EVENT_FMI_CANNED_MESSAGE_DLG_CLOSED, and Event::post().
|
protected |
Update the canned message list box from the canned message map owned by FmiApplicationLayer.
Definition at line 94 of file CCannedTxtMsgDlg.cpp.
References FileBackedMap< T >::begin(), and FileBackedMap< T >::end().
|
protected |
Listbox containing the canned messages on the client.
Definition at line 59 of file CCannedTxtMsgDlg.h.
|
protected |
Reference to the communication layer.
Definition at line 71 of file CCannedTxtMsgDlg.h.
|
protected |
The canned message ID entered by the user.
Definition at line 62 of file CCannedTxtMsgDlg.h.
|
protected |
The canned message text entered by the user.
Definition at line 65 of file CCannedTxtMsgDlg.h.
|
protected |
The index of the selected item in the list of messages.
Definition at line 68 of file CCannedTxtMsgDlg.h.