Garmin Fleet Management Controller
2.19.0
|
Modeless dialog allowing the user to manage the A603 stops on the client device. More...
#include <CStopListDlg.h>
Public Member Functions | |
CStopListDlg (CWnd *aParent, FmiApplicationLayer &aCom) | |
Constructor. More... | |
virtual | ~CStopListDlg () |
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 | OnBnClickedNewStop () |
Click handler for the New Stop button. More... | |
afx_msg void | OnBnClickedOk () |
Click handler for the OK button. More... | |
afx_msg void | OnBnClickedSend () |
Click handler for the Send button. More... | |
afx_msg void | OnBnClickedSort () |
Click handler for the Sort button. More... | |
afx_msg void | OnCancel () |
Handler for the Cancel action. More... | |
afx_msg void | OnCbnSelChangeUpdateOption () |
Selection Change handler for the Update Stop combo box. More... | |
afx_msg void | OnEnChangeMoveTo () |
Edit handler for the Move To text box. More... | |
afx_msg LRESULT | OnEventEtaReceived (WPARAM, LPARAM) |
Handle an ETA Received event from FmiApplicationLayer. More... | |
afx_msg LRESULT | OnEventStopListChanged (WPARAM, LPARAM) |
Handler for the Stop List Changed event. More... | |
BOOL | OnInitDialog () |
Initialize the dialog. More... | |
void | PostNcDestroy () |
Perform final cleanup. More... | |
Protected Attributes | |
FmiApplicationLayer & | mCom |
Reference to the FMI communication controller. More... | |
CString | mEta |
Text in the ETA edit box. More... | |
CString | mMoveTo |
Text in the "Move To" edit box. More... | |
int | mSelectedStopIndex |
Index of the selected stop in the stop list. More... | |
CString | mSelectedStopStatus |
Text description of the selected stop's status. More... | |
int | mSelectedUpdateIndex |
Index of the selected item in the Update Stop combo box. More... | |
CListBox | mStopListBox |
The list box control containing the A603 stops. More... | |
Modeless dialog allowing the user to manage the A603 stops on the client device.
CStopListDlg allows the user to view and manipulate the A603 stops on the client device. The user also has the option to create a new stop and to sort the stop list.
Definition at line 25 of file CStopListDlg.h.
CStopListDlg::CStopListDlg | ( | CWnd * | aParent, |
FmiApplicationLayer & | aCom | ||
) |
Constructor.
aParent | The parent of this dialog |
aCom | Reference to the FMI communication controller |
Definition at line 41 of file CStopListDlg.cpp.
|
virtual |
|
protectedvirtual |
Perform dialog data exchange and validation.
aDataExchange | The DDX context |
Definition at line 68 of file CStopListDlg.cpp.
References IDC_STOPLIST_LST_SELECT_STOP, IDC_STOPLIST_TXT_ETA, and IDC_STOPLIST_TXT_STATUS.
Referenced by ~CStopListDlg().
|
protected |
Click handler for the New Stop button.
Open the New Stop modal dialog.
Definition at line 291 of file CStopListDlg.cpp.
|
protected |
Click handler for the OK button.
Destroy the window, since this is a modeless dialog.
Definition at line 313 of file CStopListDlg.cpp.
|
protected |
Click handler for the Send button.
Send a stop update or request using the Stop Status protocol.
Definition at line 263 of file CStopListDlg.cpp.
References INVALID16, REQUEST_MOVE_STOP, and TRUE.
|
protected |
Click handler for the Sort button.
Initiate the Stop Sort Request protocol.
Definition at line 303 of file CStopListDlg.cpp.
|
protected |
Handler for the Cancel action.
Destroy the window, since this is a modeless dialog.
Definition at line 322 of file CStopListDlg.cpp.
|
protected |
Selection Change handler for the Update Stop combo box.
If the option selected is Move To, enable the Move To edit box and Send button; otherwise disable them.
Definition at line 213 of file CStopListDlg.cpp.
References FALSE, IDC_STOPLIST_LBL_MOVETO, REQUEST_MOVE_STOP, and TRUE.
|
protected |
Edit handler for the Move To text box.
If a valid index is entered into the Move To edit box, enable the Send button.
Definition at line 238 of file CStopListDlg.cpp.
|
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 |
Handle an ETA Received event from FmiApplicationLayer.
Update the contents of the ETA text box with the ETA time received from the client.
Definition at line 344 of file CStopListDlg.cpp.
References FALSE.
|
protected |
Handler for the Stop List Changed event.
Update the stop list, the status of the selected stop, and, if the selected stop is active, show the ETA text box.
Definition at line 129 of file CStopListDlg.cpp.
References FALSE, StopListItem::getStopStatus(), IDC_STOPLIST_LBL_ETA, IDC_STOPLIST_TXT_ETA, INVALID32, STOP_STATUS_ACTIVE, STOP_STATUS_DELETED, STOP_STATUS_DONE, STOP_STATUS_READ, STOP_STATUS_UNREAD, and TRUE.
|
protected |
Initialize the dialog.
This function is called when the window is created. It initializes the stop list based on the map owned by the FmiApplicationLayer, and sets the initial window position.
Definition at line 91 of file CStopListDlg.cpp.
References FALSE, IDC_STOPLIST_BTN_SORT, IDC_STOPLIST_GRP_UPDATE_STOP, IDC_STOPLIST_LBL_ETA, IDC_STOPLIST_LBL_MOVETO, IDC_STOPLIST_LBL_SELECT_STOP, IDC_STOPLIST_LBL_STATUS, IDC_STOPLIST_LST_SELECT_STOP, IDC_STOPLIST_TXT_ETA, IDC_STOPLIST_TXT_STATUS, and TRUE.
|
protected |
Perform final cleanup.
Enable the View Stops button on the main window.
Definition at line 331 of file CStopListDlg.cpp.
References EVENT_STOP_LIST_DLG_CLOSED, and Event::post().
|
protected |
Reference to the FMI communication controller.
Definition at line 61 of file CStopListDlg.h.
|
protected |
Text in the ETA edit box.
Definition at line 81 of file CStopListDlg.h.
|
protected |
Text in the "Move To" edit box.
Definition at line 78 of file CStopListDlg.h.
|
protected |
Index of the selected stop in the stop list.
Definition at line 65 of file CStopListDlg.h.
|
protected |
Text description of the selected stop's status.
Definition at line 71 of file CStopListDlg.h.
|
protected |
Index of the selected item in the Update Stop combo box.
Definition at line 75 of file CStopListDlg.h.
|
protected |
The list box control containing the A603 stops.
Definition at line 68 of file CStopListDlg.h.