示例#1
0
bool
WindowControl::OnKeyDown(unsigned key_code)
{
  KeyTimer(true, key_code);

  return ContainerWindow::OnKeyDown(key_code);
}
示例#2
0
文件: Edit.cpp 项目: macsux/XCSoar
bool
WndProperty::Editor::on_key_down(unsigned key_code)
{
  // If return key pressed (Compaq uses VKF23)
  if (key_code == VK_RETURN && parent->on_mouse_down(0, 0))
    return true;

  // Check for long key press
  // tmep hack, do not process nav keys
  if (KeyTimer(true, key_code)) {
    // Activate Help dialog
    if (key_code == VK_RETURN) {
      if (parent->OnHelp())
        return true;
    }
  }

  switch (key_code) {
  case VK_RIGHT:
    parent->IncValue();
    return true;
  case VK_LEFT:
    parent->DecValue();
    return true;
  }

  return EditWindow::on_key_down(key_code);
}
示例#3
0
bool
WndProperty::Editor::OnKeyDown(unsigned key_code)
{
  // If return key pressed (Compaq uses VKF23)
  if (key_code == VK_RETURN && parent->OnMouseDown(0, 0))
    return true;

  switch (key_code) {
  case VK_RIGHT:
    if (IsReadOnly())
      break;

    parent->IncValue();
    return true;
  case VK_LEFT:
    if (IsReadOnly())
      break;

    parent->DecValue();
    return true;
  }

  KeyTimer(true, key_code);
  return EditWindow::OnKeyDown(key_code);
}
示例#4
0
void
WndProperty::Editor::OnKillFocus()
{
  KeyTimer(true, 0);
  parent->on_editor_killfocus();
  EditWindow::OnKillFocus();
}
示例#5
0
文件: Edit.cpp 项目: macsux/XCSoar
bool
WndProperty::Editor::on_killfocus()
{
  KeyTimer(true, 0);
  parent->on_editor_killfocus();
  EditWindow::on_killfocus();
  return true;
}
示例#6
0
void
WndProperty::Editor::OnSetFocus()
{
  KeyTimer(true, 0);
  EditWindow::OnSetFocus();
  parent->on_editor_setfocus();
  SelectAll();
}
示例#7
0
文件: Edit.cpp 项目: macsux/XCSoar
bool
WndProperty::Editor::on_setfocus()
{
  KeyTimer(true, 0);
  EditWindow::on_setfocus();
  parent->on_editor_setfocus();
  set_selection();
  return true;
}
示例#8
0
bool
WindowControl::OnKeyUp(unsigned key_code)
{
  // JMW: detect long enter release
  // VENTA4: PNAs don't have Enter, so it should be better to find an alternate solution
  // activate tool tips if hit return for long time
  if (KeyTimer(false, key_code) && key_code == VK_RETURN && OnHelp())
    return true;

  return ContainerWindow::OnKeyUp(key_code);
}
示例#9
0
文件: Edit.cpp 项目: macsux/XCSoar
bool
WndProperty::Editor::on_key_up(unsigned key_code)
{
  if (KeyTimer(false, key_code)) {
    // activate tool tips if hit return for long time
    if (key_code == VK_RETURN) {
      if (parent->OnHelp())
        return true;
    }
  } else if (key_code == VK_RETURN) {
    if (parent->CallSpecial())
      return true;
  }

  return false;
}