void AISTargetQueryDialog::SetMMSI(int mmsi) { m_MMSI = mmsi; AIS_Target_Data *td = g_pAIS->Get_Target_Data_From_MMSI( m_MMSI ); AdjustBestSize(td); }
void AISTargetQueryDialog::UpdateText() { wxString html; if( !m_pQueryTextCtl ) return; int scroll_x, scroll_y; m_pQueryTextCtl->GetViewStart(&scroll_x, &scroll_y); AIS_Target_Data *td = g_pAIS->Get_Target_Data_From_MMSI( m_MMSI ); AdjustBestSize(td); DimeControl( this ); wxColor bg = GetBackgroundColour(); m_pQueryTextCtl->SetBackgroundColour( bg ); SetBackgroundColour( bg ); if( td ) { if( td->b_PersistTrack ) m_createTrkBtn->SetLabel(_("Stop Tracking")); else m_createTrkBtn->SetLabel(_("Record Track")); m_createWptBtn->Enable( td->b_positionOnceValid ); m_createTrkBtn->Enable( td->b_show_track ); RenderHTMLQuery(td); } #ifdef __WXQT__ SetColorScheme( m_colorscheme ); #endif m_pQueryTextCtl->Scroll(scroll_x, scroll_y); }