Garmin Fleet Management Controller  2.19.0
CAutoArrivalDlg Class Reference

Dialog allowing the user to change the auto-arrival options. More...

#include <CAutoArrivalDlg.h>

+ Inheritance diagram for CAutoArrivalDlg:

Public Member Functions

 CAutoArrivalDlg (CWnd *aParent, FmiApplicationLayer &aCom)
 Constructor. More...
 
virtual ~CAutoArrivalDlg ()
 Destructor. More...
 

Protected Member Functions

virtual void DoDataExchange (CDataExchange *aDataExchange)
 Perform dialog data exchange and validation. More...
 
afx_msg void OnBnClickedEnabled ()
 Button handler for the Enabled check box. More...
 
afx_msg void OnBnClickedOk ()
 Button handler for the OK button on this dialog. More...
 
afx_msg void OnEnChangeEditBox ()
 Edit handler for the edit boxes on this dialog. More...
 
BOOL OnInitDialog ()
 This function is called when the window is created. More...
 

Protected Attributes

BOOL mAutoArrivalEnabled
 The state of the Enabled check box. More...
 
FmiApplicationLayermCom
 Reference to the FMI communication controller that this dialog uses. More...
 
CString mMinimumStopDistance
 The minimum distance for a stop to be considered done by the client. More...
 
CString mMinimumStopTime
 The minimum stop time for a stop to be considered done by the client. More...
 

Detailed Description

Dialog allowing the user to change the auto-arrival options.

Note
This dialog must be created modal.
Since
Protocol A603

Definition at line 20 of file CAutoArrivalDlg.h.

Constructor & Destructor Documentation

CAutoArrivalDlg::CAutoArrivalDlg ( CWnd *  aParent,
FmiApplicationLayer aCom 
)

Constructor.

Parameters
aParentThe parent of this dialog
aComReference to the FMI communication controller

Definition at line 28 of file CAutoArrivalDlg.cpp.

CAutoArrivalDlg::~CAutoArrivalDlg ( )
virtual

Destructor.

Definition at line 43 of file CAutoArrivalDlg.cpp.

References DoDataExchange().

Member Function Documentation

void CAutoArrivalDlg::DoDataExchange ( CDataExchange *  aDataExchange)
protectedvirtual

Perform dialog data exchange and validation.

Parameters
aDataExchangeThe DDX context

Definition at line 52 of file CAutoArrivalDlg.cpp.

References IDC_AUTOARR_CHK_ENABLED, IDC_AUTOARR_EDIT_DISTANCE, IDC_AUTOARR_EDIT_TIME, mAutoArrivalEnabled, mMinimumStopDistance, and mMinimumStopTime.

Referenced by ~CAutoArrivalDlg().

void CAutoArrivalDlg::OnBnClickedEnabled ( )
protected

Button handler for the Enabled check box.

Makes sure a user can't send data unless they have entered all the data. If they are disabling the option, new text fields are blanked out and the button is enabled. Otherwise, the button is disabled and the user is allowed to enter text.

Definition at line 87 of file CAutoArrivalDlg.cpp.

References FALSE, IDC_AUTOARR_EDIT_DISTANCE, IDC_AUTOARR_EDIT_TIME, mAutoArrivalEnabled, mMinimumStopDistance, mMinimumStopTime, and TRUE.

void CAutoArrivalDlg::OnBnClickedOk ( )
protected

Button handler for the OK button on this dialog.

If this button is able to be clicked, it means all relevant information has been entered. If the user wants to enable Auto Arrival, it will send an update for the new time and distance. Otherwise, it sends 0xFFFFFFFF for both arguments to turn auto arrival off.

Definition at line 141 of file CAutoArrivalDlg.cpp.

References INVALID32, mAutoArrivalEnabled, mCom, mMinimumStopDistance, mMinimumStopTime, FmiApplicationLayer::sendAutoArrival(), and TRUE.

void CAutoArrivalDlg::OnEnChangeEditBox ( )
protected

Edit handler for the edit boxes on this dialog.

Enables the OK button when there is text in all edit fields, but disable it as long as one is empty. This same function gets called no matter which edit box changes.

Definition at line 120 of file CAutoArrivalDlg.cpp.

References FALSE, mMinimumStopDistance, mMinimumStopTime, and TRUE.

BOOL CAutoArrivalDlg::OnInitDialog ( )
protected

This function is called when the window is created.

It sets up the parent, so when the ok button is clicked, we can access com.

Returns
TRUE, since this function does not set focus to a control

Definition at line 69 of file CAutoArrivalDlg.cpp.

References FALSE, mAutoArrivalEnabled, and TRUE.

Member Data Documentation

BOOL CAutoArrivalDlg::mAutoArrivalEnabled
protected

The state of the Enabled check box.

Definition at line 46 of file CAutoArrivalDlg.h.

Referenced by DoDataExchange(), OnBnClickedEnabled(), OnBnClickedOk(), and OnInitDialog().

FmiApplicationLayer& CAutoArrivalDlg::mCom
protected

Reference to the FMI communication controller that this dialog uses.

Definition at line 55 of file CAutoArrivalDlg.h.

Referenced by OnBnClickedOk().

CString CAutoArrivalDlg::mMinimumStopDistance
protected

The minimum distance for a stop to be considered done by the client.

Definition at line 52 of file CAutoArrivalDlg.h.

Referenced by DoDataExchange(), OnBnClickedEnabled(), OnBnClickedOk(), and OnEnChangeEditBox().

CString CAutoArrivalDlg::mMinimumStopTime
protected

The minimum stop time for a stop to be considered done by the client.

Definition at line 49 of file CAutoArrivalDlg.h.

Referenced by DoDataExchange(), OnBnClickedEnabled(), OnBnClickedOk(), and OnEnChangeEditBox().


The documentation for this class was generated from the following files: