• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ IsAltair函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Sleep

size_t
SerialPort::Write(const void *data, size_t length)
{
  DWORD NumberOfBytesWritten;

  if (hPort == INVALID_HANDLE_VALUE)
    return 0;

#ifdef _WIN32_WCE

#if 0
  /* this workaround is currently disabled because it causes major
    problems with some of our device drivers, causing timeouts; this
    may be a regression on the bugged HP31x, but I prefer to support
    sane platforms any day */

  if (IsWindowsCE() && !IsAltair())
    /* this is needed to work around a driver bug on the HP31x -
       without it, the second consecutive write without a task switch
       will hang the whole PNA; this Sleep() call enforces a task
       switch */
    Sleep(100);
#endif

  // lpNumberOfBytesWritten : This parameter can be NULL only when the lpOverlapped parameter is not NULL.
  if (!::WriteFile(hPort, data, length, &NumberOfBytesWritten, NULL))
    return 0;

  return NumberOfBytesWritten;

#else

  OverlappedEvent osWriter;

  // Start reading data
  if (::WriteFile(hPort, data, length, &NumberOfBytesWritten, osWriter.GetPointer()))
    return NumberOfBytesWritten;

  if (::GetLastError() != ERROR_IO_PENDING)
    return 0;

  // Let's wait for ReadFile() to finish
  unsigned timeout_ms = 1000 + length * 10;
  switch (osWriter.Wait(timeout_ms)) {
  case OverlappedEvent::FINISHED:
    // Get results
    ::GetOverlappedResult(hPort, osWriter.GetPointer(), &NumberOfBytesWritten, FALSE);
    return NumberOfBytesWritten;

  default:
    ::CancelIo(hPort);
    ::SetCommMask(hPort, 0);
    osWriter.Wait();
    return 0;
  }
#endif
}
开发者ID:osteocool,项目名称:XCSoar-1,代码行数:57,代码来源:SerialPort.cpp


示例17: InitialiseLogFonts

static void
InitialiseLogFonts()
{
  if (IsAltair()) {
    LoadAltairLogFonts();
    return;
  }

#ifndef USE_GDI
  UPixelScalar font_height = Layout::SmallScale(IsAndroid() ? 30 : 24);
#else
  UPixelScalar font_height = Layout::SmallScale(35);
#endif

  // oversize first so can then scale down
  InitialiseLogfont(&log_infobox, GetStandardFontFace(),
                    (int)(font_height * 1.4), true, false, true);

#ifdef WIN32
  log_infobox.lfCharSet = ANSI_CHARSET;
#endif

  InitialiseLogfont(&log_title, GetStandardFontFace(), font_height / 3);

  // new font for CDI Scale
  InitialiseLogfont(&log_cdi, GetStandardFontFace(),
                    UPixelScalar(font_height * 0.6), false, false, false);

  // new font for map labels
  InitialiseLogfont(&log_map_label, GetStandardFontFace(),
                    UPixelScalar(font_height * 0.39), false, true);

  // new font for map labels big/medium cities
  InitialiseLogfont(&log_map_label_important, GetStandardFontFace(),
                    UPixelScalar(font_height * 0.39), false, true);

  // new font for map labels
  InitialiseLogfont(&log_map, GetStandardFontFace(),
                    UPixelScalar(font_height * 0.507));

  // Font for map bold text
  InitialiseLogfont(&log_map_bold, GetStandardFontFace(),
                    UPixelScalar(font_height * 0.507), true);

  InitialiseLogfont(&log_infobox_small, GetStandardFontFace(),
                    Layout::Scale(20));

#ifndef GNAV
  InitialiseLogfont(&log_infobox_units, GetStandardFontFace(),
                    (int)(font_height * 0.56));
#endif

  InitialiseLogfont(&log_monospace, GetStandardMonospaceFontFace(),
                    UPixelScalar(font_height * 0.39), false, false, false);
}
开发者ID:Tjeerdm,项目名称:XCSoarDktjm,代码行数:55,代码来源:Fonts.cpp


示例18: FormKeyDown

static bool
FormKeyDown(unsigned key_code)
{
    switch (key_code) {
    case KEY_UP:
    case KEY_LEFT:
        if ((key_code == KEY_LEFT) ^ IsAltair()) {
            if (cursor < 1)
                return true; // min width

            cursor--;
            MoveCursor();
            return true;
        } else {
            lettercursor--;
            UpdateCursor();
            return true;
        }

    case KEY_DOWN:
    case KEY_RIGHT:
        if ((key_code == KEY_RIGHT) ^ IsAltair()) {
            if (cursor + 2 >= max_width)
                return true; // max width

            cursor++;
            MoveCursor();
            return true;
        } else {
            lettercursor++;
            UpdateCursor();
            return true;
        }
    case KEY_RETURN:
        wf->SetModalResult(mrOK);
        return true;

    default:
        return false;
    }
}
开发者ID:onkelhotte,项目名称:XCSoar,代码行数:41,代码来源:dlgTextEntry.cpp


示例19: AllowDialogMessage

/**
 * Checks if we should pass this message to the WIN32 dialog manager.
 */
gcc_pure
static bool
AllowDialogMessage(const MSG &msg)
{
  /* this hack disallows the dialog manager to handle VK_LEFT/VK_RIGHT
     on the Altair; some dialogs use the knob as a hot key, and they
     can't implement Window::OnKeyCheck() */
  if (IsAltair() && (msg.message == WM_KEYDOWN || msg.message == WM_KEYUP) &&
      (msg.wParam == VK_LEFT || msg.wParam == VK_RIGHT))
    return false;

  return true;
}
开发者ID:davidswelt,项目名称:XCSoar,代码行数:16,代码来源:Event.cpp


示例20: assert

void
Simulator::Process(NMEAInfo &basic)
{
  assert(is_simulator());

  Touch(basic);

  basic.location = FindLatitudeLongitude(basic.location, basic.track,
                                         basic.ground_speed);

  // use this to test FLARM parsing/display
  if (IsDebug() && !IsAltair())
    GenerateFLARMTraffic(basic);
}
开发者ID:davidswelt,项目名称:XCSoar,代码行数:14,代码来源:Simulator.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IsAnOper函数代码示例发布时间:2022-05-30
下一篇:
C++ IsAlphaNum函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap