Example #1
0
/**
 * Copies the given basic and calculated info to the MapWindowBlackboard
 * and reads the Settings from the DeviceBlackboard.
 * @param nmea_info Basic info
 * @param derived_info Calculated info
 * @param settings_computer Computer settings to exchange
 * @param settings_map Map settings to exchange
 */
void
MapWindow::ReadBlackboard(const NMEA_INFO &nmea_info,
                          const DERIVED_INFO &derived_info,
                          const SETTINGS_COMPUTER &settings_computer,
                          const SETTINGS_MAP &settings_map)
{
  MapWindowBlackboard::ReadBlackboard(nmea_info, derived_info);
  ReadSettingsComputer(settings_computer);
  ReadSettingsMap(settings_map);
}
Example #2
0
void
GlueMapWindow::SetSettingsMap(const SETTINGS_MAP &new_value)
{
  AssertThreadOrUndefined();

#ifdef ENABLE_OPENGL
  ReadSettingsMap(new_value);
#else
  ScopeLock protect(next_mutex);
  next_settings_map = new_value;
#endif
}
Example #3
0
void
GlueMapWindow::ExchangeBlackboard()
{
  /* copy device_blackboard to MapWindow */

  device_blackboard.mutex.Lock();
  ReadBlackboard(device_blackboard.Basic(), device_blackboard.Calculated());
  device_blackboard.mutex.Unlock();

#ifndef ENABLE_OPENGL
  next_mutex.Lock();
  ReadSettingsMap(next_settings_map);
  ReadSettingsComputer(next_settings_computer);
  next_mutex.Unlock();
#endif
}
Example #4
0
void
GlueMapWindow::QuickRedraw(const SETTINGS_MAP &_settings_map)
{
  assert(&_settings_map != &SettingsMap());

  ReadSettingsMap(_settings_map);

  /* update the Projection */

  visible_projection.CalculateOrigin(get_client_rect(),
                                     Basic(), Calculated(),
                                     SettingsComputer(),
                                     SettingsMap());

  visible_projection.ExchangeBlackboard(Calculated(), SettingsMap());

  ++ui_generation;

  /* quickly stretch the existing buffer into the window */

  scale_buffer = 2;
  invalidate();
}