void AISTargetListDialog::OnHideAllTracks( wxCommandEvent& event ) { AIS_Target_Hash::iterator it; AIS_Target_Hash *current_targets = m_pdecoder->GetTargetList(); for( it = ( *current_targets ).begin(); it != ( *current_targets ).end(); ++it ) { AIS_Target_Data *pAISTarget = it->second; if( NULL != pAISTarget ) { pAISTarget->b_show_track = false; } } UpdateAISTargetList(); }
void AISTargetListDialog::OnToggleTrack( wxCommandEvent& event ) { long selItemID = -1; selItemID = m_pListCtrlAISTargets->GetNextItem( selItemID, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); if( selItemID == -1 ) return; AIS_Target_Data *pAISTarget = NULL; if( m_pdecoder ) pAISTarget = m_pdecoder->Get_Target_Data_From_MMSI( m_pMMSI_array->Item( selItemID ) ); if( pAISTarget ) { pAISTarget->b_show_track = !pAISTarget->b_show_track; UpdateAISTargetList(); } }
void AISTargetListDialog::OnTargetListColumnClicked( wxListEvent &event ) { int key = event.GetColumn(); wxListItem item; item.SetMask( wxLIST_MASK_IMAGE ); if( key == g_AisTargetList_sortColumn ) g_bAisTargetList_sortReverse = !g_bAisTargetList_sortReverse; else { item.SetImage( -1 ); m_pListCtrlAISTargets->SetColumn( g_AisTargetList_sortColumn, item ); g_bAisTargetList_sortReverse = false; g_AisTargetList_sortColumn = key; } item.SetImage( g_bAisTargetList_sortReverse ? 1 : 0 ); if( g_AisTargetList_sortColumn >= 0 ) { m_pListCtrlAISTargets->SetColumn( g_AisTargetList_sortColumn, item ); UpdateAISTargetList(); } }
void AISTargetListDialog::OnAutosortCB( wxCommandEvent &event ) { g_bAisTargetList_autosort = m_pCBAutosort->GetValue(); m_bautosort_force = g_bAisTargetList_autosort; if( !g_bAisTargetList_autosort ) { wxListItem item; item.SetMask( wxLIST_MASK_IMAGE ); item.SetImage( -1 ); g_AisTargetList_sortColumn = wxMax(g_AisTargetList_sortColumn, 0); m_pListCtrlAISTargets->SetColumn( g_AisTargetList_sortColumn, item ); } else { wxListItem item; item.SetMask( wxLIST_MASK_IMAGE ); item.SetImage( g_bAisTargetList_sortReverse ? 1 : 0 ); if( g_AisTargetList_sortColumn >= 0 ) { m_pListCtrlAISTargets->SetColumn( g_AisTargetList_sortColumn, item ); UpdateAISTargetList(); } } }
void AISTargetListDialog::OnLimitRange( wxCommandEvent& event ) { g_AisTargetList_range = m_pSpinCtrlRange->GetValue(); UpdateAISTargetList(); }