19 ON_BN_CLICKED( IDOK, OnBnClickedOk )
35 CWaypointDlg::CWaypointDlg
66 CDataExchange * aDataExchange
69 CDialog::DoDataExchange( aDataExchange );
88 CDialog::PostNcDestroy();
101 CDialog::OnInitDialog();
103 SetWindowPos( NULL, 700, 35, 0, 0, SWP_NOSIZE | SWP_NOZORDER );
122 int selectedIndex =
mListBox.GetCurSel();
123 int topIndex =
mListBox.GetTopIndex();
133 if( it->second.isValid() )
135 temp.Format( _T(
"%d - %s"), it->first, it->second.getCurrentName() );
140 mListBox.SetCurSel( selectedIndex );
153 int selectedIndex =
mCatBox.GetCurSel();
154 int topIndex =
mCatBox.GetTopIndex();
164 if( it->second.isValid() )
166 temp.Format( _T(
"%d - %s"), it->first, it->second.getCurrentName() );
171 mCatBox.SetCurSel( selectedIndex );
172 mCatBox.SetTopIndex( topIndex );
208 count =
mCatBox.GetSelItems( 16, selList );
210 for(
int i = 0; i < count; ++i )
212 int selectedIndex = selList[i];
214 selIds |=
setbit( catId );
CString mComment
Waypoint comment entered by the user.
#define IDC_WPT_EDIT_WPT_ID
CListBox mCatBox
List box containing waypoint categories sent to the client.
const_iterator begin()
Iterator positioned at the first element in the map.
UINT mWptId
Waypoint ID entered by the user.
CString mCat
Waypoint category entered by the user.
uint16 getCatIds()
Get category bit field value for the selected category IDs.
#define IDC_WPT_BTN_CREATE_CAT
const_iterator end()
Iterator positioned after the last element in the map.
afx_msg void OnEnChangeWptEdit()
Edit handler for the waypoint edit boxes on this dialog.
FmiApplicationLayer & mCom
Reference to the FMI communication controller.
CString mName
Waypoint name entered by the user.
void sendCreateWaypointCat(uint8 aCatId, CString &aCatName)
Create waypoint category.
#define IDC_WPT_EDIT_CAT_ID
afx_msg void OnBnClickedOk()
Handler for the OK button.
void sendWaypoint(uint16 aUniqueId, double aLat, double aLon, uint16 aSymbol, CString &aName, uint16 aCat, CString &aComment)
Send a waypoint.
#define IDC_WPT_BTN_DELETE_CAT
afx_msg LPARAM OnCategoryListChanged(WPARAM, LPARAM)
Handler for EVENT_FMI_CATEGORY_LIST_CHANGED event.
Modeless dialog allowing the user to manage waypoints.
unsigned int mCatId
Waypoint category ID entered by the user.
virtual ~CWaypointDlg()
Destructor.
#define setbit(_b)
A bit mask with one bit set and the rest cleared.
afx_msg void OnBnClickedWptBtnDeleteCat()
Handler for the Delete Category button.
afx_msg LPARAM OnWaypointListChanged(WPARAM, LPARAM)
Handler for EVENT_FMI_WAYPOINT_LIST_CHANGED event.
UINT mSymbol
Waypoint symbol entered by the user.
#define IDC_WPT_EDIT_SYM_ID
Serial communication controller for Garmin and FMI packets.
#define IDC_WPT_EDIT_WPT_COMMENT
#define IDC_WPT_LST_CATEGORIES
unsigned short int uint16
16-bit unsigned integer
void sendDeleteWaypointCat(uint16 aCatIdx)
Delete waypoint category.
void PostNcDestroy()
Perform final cleanup.
const key_type & getKeyAt(uint32 aIndex) const
Get the key for the item at a given list index.
afx_msg void OnBnClickedWptBtnCreateCat()
Handler for the Create Category button.
afx_msg void OnBnClickedWptBtnSend()
Handler for the Send Waypoint button.
Map whose contents are also saved to a file.
FileBackedMap< ClientListItem > mCategories
Map of waypoint category IDs to names.
void sendDeleteWaypoint(uint16 aUniqueId)
Delete a waypoint.
unsigned char uint8
8-bit unsigned integer
virtual void DoDataExchange(CDataExchange *aDataExchange)
Perform dialog data exchange and validation.
CListBox mListBox
List box containing waypoints sent to the client.
#define IDC_WPT_LST_WAYPOINTS
BOOL OnInitDialog()
Initialize the dialog.
void updateListBox()
Update the waypoint list box from the map owned by Com.
#define WM_EVENT(_event)
Translation from an application event to the corresponding Windows message.
#define IDC_WPT_EDIT_CAT_NAME
#define IDC_WPT_EDIT_WPT_NAME
void updateCatBox()
Update the waypoint list box from the map owned by Com.
afx_msg void OnBnClickedWptBtnDelete()
Handler for the Delete Waypoint button.
double mLat
Waypoint latitude in decimal degrees.
FileBackedMap< WaypointListItem > mWaypoints
Map of waypoint IDs to names.
static void post(EventId aEventId, uint32 aEventData=0, void *aEventDataPtr=NULL, BOOL handleNow=FALSE)
Posts a message to all windows that have registered to get events.
#define IDC_WPT_BTN_DELETE
double mLon
Waypoint longitude in decimal degrees.