当前位置: 首页>>代码示例>>C++>>正文


C++ IsAltair函数代码示例

本文整理汇总了C++中IsAltair函数的典型用法代码示例。如果您正苦于以下问题:C++ IsAltair函数的具体用法?C++ IsAltair怎么用?C++ IsAltair使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了IsAltair函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SizeLogFont

void
Fonts::SizeInfoboxFont(UPixelScalar control_width)
{
  LOGFONT lf = log_infobox;

  if (!IsAltair())
    SizeLogFont(lf, control_width, _T("1234m"));
  infobox.Load(lf);

#ifndef GNAV
  unsigned height = lf.lfHeight;
  lf = log_infobox_units;
  lf.lfHeight = (height * 2) / 5;
  infobox_units.Load(lf);
#endif

  lf = log_infobox_small;
  if (!IsAltair())
    SizeLogFont(lf, control_width, _T("12345m"));
  infobox_small.Load(lf);

#ifdef ENABLE_OPENGL
  TextCache::Flush();
#endif
}
开发者ID:Tjeerdm,项目名称:XCSoarDktjm,代码行数:25,代码来源:Fonts.cpp

示例2: switch

bool
TaskEditPanel::OnKeyDown(unsigned key_code)
{
  switch (key_code){
  case KEY_ESCAPE:
    if (IsAltair() && GetList().HasFocus()){
       dialog.FocusFirstControl();
      return true;
    }
    return false;

  case '6': /* F5 */
    if (IsAltair()) {
      MoveUp();
      return true;
    } else
      return false;

  case '7': /* F6 */
    if (IsAltair()) {
      MoveDown();
      return true;
    } else
      return false;

  default:
    return false;
  }
}
开发者ID:Tjeerdm,项目名称:XCSoarDktjm,代码行数:29,代码来源:TaskEditPanel.cpp

示例3: switch

bool
TaskEditPanel::OnKeyDown(unsigned key_code)
{
  switch (key_code){
  case VK_ESCAPE:
    if (IsAltair() && wTaskPoints->HasFocus()){
       wf.FocusFirstControl();
      return true;
    }
    return false;

  case '6': /* F5 */
    if (IsAltair()) {
      MoveUp();
      return true;
    } else
      return false;

  case '7': /* F6 */
    if (IsAltair()) {
      MoveDown();
      return true;
    } else
      return false;

  default:
    return false;
  }
}
开发者ID:osteocool,项目名称:XCSoar-1,代码行数:29,代码来源:TaskEditPanel.cpp

示例4: AutoSizeInfoBoxFonts

void
AutoSizeInfoBoxFonts(FontSettings &settings, unsigned control_width)
{
  if (!IsAltair())
    AutoSizeFont(settings.infobox, control_width, _T("1234m"));

#ifndef GNAV
  settings.infobox_units.lfHeight = unsigned(settings.infobox.lfHeight) * 2u / 5u;
#endif

  if (!IsAltair())
    AutoSizeFont(settings.infobox_small, control_width, _T("12345m"));
}
开发者ID:Adrien81,项目名称:XCSoar,代码行数:13,代码来源:AutoFont.cpp

示例5: fixed

fixed
DataFieldFloat::SpeedUp(bool keyup)
{
  if (IsAltair())
    return fixed(1);

  if (keyup != DataFieldKeyUp) {
    mSpeedup = 0;
    DataFieldKeyUp = keyup;
    last_step.Update();
    return fixed(1);
  }

  if (!last_step.Check(200)) {
    mSpeedup++;
    if (mSpeedup > 5) {
      last_step.UpdateWithOffset(350);
      return fixed(10);
    }
  } else
    mSpeedup = 0;

  last_step.Update();

  return fixed(1);
}
开发者ID:DRIZO,项目名称:xcsoar,代码行数:26,代码来源:Float.cpp

示例6: return

int
DataFieldInteger::SpeedUp(bool keyup)
{
  int res = 1;

  if (IsAltair())
    return res;

  if (GetDisableSpeedUp() == true)
    return 1;

  if (keyup != DataFieldKeyUp) {
    mSpeedup = 0;
    DataFieldKeyUp = keyup;
    last_step.update();
    return 1;
  }

  if (!last_step.check(200)) {
    mSpeedup++;
    if (mSpeedup > 5) {
      res = 10;
      last_step.update_offset(350);
      return (res);
    }
  } else
    mSpeedup = 0;

  last_step.update();

  return res;
}
开发者ID:pascaltempez,项目名称:xcsoar,代码行数:32,代码来源:Integer.cpp

示例7: IsAltair

void
ComputerSettings::SetDefaults()
{
  wind.SetDefaults();
  polar.SetDefaults();
  team_code.SetDefaults();
  voice.SetDefaults();
  poi.SetDefaults();
  features.SetDefaults();
  circling.SetDefaults();

  average_eff_time = ae30seconds;
  set_system_time_from_gps = IsAltair() && IsEmbedded();
  utc_offset = GetSystemUTCOffset();
  forecast_temperature = CelsiusToKelvin(fixed(25));
  pressure = AtmosphericPressure::Standard();
  pressure_available.Clear();
  airspace.SetDefaults();
  task.SetDefaults();
  contest.SetDefaults();
  logger.SetDefaults();

#ifdef HAVE_TRACKING
  tracking.SetDefaults();
#endif
}
开发者ID:StefanL74,项目名称:XCSoar,代码行数:26,代码来源:ComputerSettings.cpp

示例8: ProcessEvent

bool
InputEvents::ProcessKey(Mode mode, unsigned key_code)
{
  if (IsAltair() && key_code == 0xF5) {
    UIActions::SignalShutdown(false);
    return true;
  }

  if (!global_running)
    return false;

#ifdef KOBO
#ifdef ENABLE_SDL
  if (key_code == SDLK_POWER)
    /* the Kobo power button opens the main menu */
    key_code = KEY_MENU;
#else
  // TODO: check the console key code
#endif
#endif

  // Which key - can be defined locally or at default (fall back to default)
  unsigned event_id = key_to_event(mode, overlay_mode, key_code);
  if (event_id == 0)
    return false;

  ProcessEvent(event_id);
  return true;
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:29,代码来源:InputEvents.cpp

示例9: return

int
DataFieldInteger::SpeedUp(bool keyup)
{
  int res = 1;

  if (IsAltair())
    return res;

  if (keyup != datafield_key_up) {
    speedup = 0;
    datafield_key_up = keyup;
    last_step.Update();
    return 1;
  }

  if (!last_step.Check(200)) {
    speedup++;
    if (speedup > 5) {
      res = 10;
      last_step.UpdateWithOffset(350);
      return (res);
    }
  } else
    speedup = 0;

  last_step.Update();

  return res;
}
开发者ID:CnZoom,项目名称:XcSoarWork,代码行数:29,代码来源:Integer.cpp

示例10: SetModified

void
Profile::SetFiles(const TCHAR *override_path)
{
  /* set the "modified" flag, because we are potentially saving to a
     new file now */
  SetModified(true);

  if (!StringIsEmpty(override_path)) {
    if (IsBaseName(override_path)) {
      LocalPath(startProfileFile, override_path);

      if (StringFind(override_path, '.') == nullptr)
        _tcscat(startProfileFile, _T(".prf"));
    } else
      CopyString(startProfileFile, override_path, MAX_PATH);
    return;
  }

  // Set the default profile file
  LocalPath(startProfileFile, _T(XCSPROFILE));

  if (IsAltair() && !File::Exists(startProfileFile)) {
    /* backwards compatibility with old Altair firmware */
    LocalPath(startProfileFile, _T("config/") _T(OLDXCSPROFILE));
    if (!File::Exists(startProfileFile))
      LocalPath(startProfileFile, _T(XCSPROFILE));
  }
}
开发者ID:CnZoom,项目名称:XcSoarPull,代码行数:28,代码来源:Profile.cpp

示例11:

// Read the data files
void
InputEvents::LoadDefaults(InputConfig &input_config)
{
    // Get defaults
    input_config.SetDefaults();

    if (IsAltair()) {
#include "InputEvents_altair.cpp"
        apply_defaults(input_config,
                       default_modes,
                       default_events,
                       ARRAY_SIZE(default_events),
                       default_gesture2event,
                       default_key2event, default_gc2event, default_n2event,
                       default_labels);
    } else {
#include "InputEvents_default.cpp"
        apply_defaults(input_config,
                       default_modes,
                       default_events,
                       ARRAY_SIZE(default_events),
                       default_gesture2event,
                       default_key2event, default_gc2event, default_n2event,
                       default_labels);
    }
}
开发者ID:RBE-Avionik,项目名称:xcsoar,代码行数:27,代码来源:InputDefaults.cpp

示例12:

int
DataFieldTime::SpeedUp(bool key_up)
{
  if (IsAltair())
    return 1;

  if (key_up != data_field_key_up) {
    speedup = 0;
    data_field_key_up = key_up;
    last_step.Update();
    return 1;
  }

  if (!last_step.Check(200)) {
    speedup++;
    if (speedup > 5) {
      last_step.UpdateWithOffset(350);
      return 10;
    }
  } else
    speedup = 0;

  last_step.Update();

  return 1;
}
开发者ID:CnZoom,项目名称:XcSoarWork,代码行数:26,代码来源:Time.cpp

示例13: GetButtonPosition

gcc_pure
static PixelRect
GetButtonPosition(unsigned i, PixelRect rc)
{
  UPixelScalar hwidth = rc.right - rc.left;
  UPixelScalar hheight = rc.bottom - rc.top;

  if (hheight > hwidth) {
    // portrait

    hheight /= 6;

    if (i == 0) {
      rc.left = rc.right;
      rc.top = rc.bottom;
    } else if (i < 5) {
      hwidth /= 4;

      rc.left += hwidth * (i - 1);
      rc.top = rc.bottom - hheight;
    } else {
      hwidth /= 3;

      rc.left = rc.right - hwidth;
      PixelScalar k = rc.bottom - rc.top - Layout::Scale(46);

      if (IsAltair()) {
        k = rc.bottom - rc.top;
        // JMW need upside down button order for rotated Altair
        rc.top = rc.bottom - (i - 5) * k / 5 - hheight - Layout::Scale(20);
      } else {
        rc.top += (i - 5) * hheight;
      }
    }

    rc.right = rc.left + hwidth;
    rc.bottom = rc.top + hheight;
  } else {
    // landscape

    hwidth /= 5;
    hheight /= 5;

    if (i == 0) {
      rc.left = rc.right;
      rc.top = rc.bottom;
    } else if (i < 5) {
      rc.top += hheight * (i - 1);
    } else {
      rc.left += hwidth * (i - 5);
      rc.top = rc.bottom - hheight;
    }

    rc.right = rc.left + hwidth;
    rc.bottom = rc.top + hheight;
  }

  return rc;
}
开发者ID:davidswelt,项目名称:XCSoar,代码行数:59,代码来源:MenuBar.cpp

示例14: GetStandardFontFace

gcc_const
static inline const TCHAR *
GetStandardFontFace()
{
  if (IsAltair())
    return _T("RasterGothicFourteenCond");

  return _T("Tahoma");
}
开发者ID:CnZoom,项目名称:XcSoarPull,代码行数:9,代码来源:StandardFonts.hpp

示例15: UpdateButtons

static void
UpdateButtons()
{
  if (IsAltair()) {
    // Altair uses the rotary knob
    ShowFormControl(*wf, _T("btnNext"), false);
    ShowFormControl(*wf, _T("btnPrev"), false);
  }
}
开发者ID:j-konopka,项目名称:XCSoar-TE,代码行数:9,代码来源:TargetDialog.cpp


注:本文中的IsAltair函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。