static bool
FormKeyDown(gcc_unused WndForm &Sender, unsigned key_code)
{
  switch (key_code) {
  case VK_LEFT:
#ifdef GNAV
  case '6':
#endif
    ((WndButton *)wf->FindByName(_T("cmdPrev")))->set_focus();
    tabbed->PreviousPage();
    PageSwitched();
    //((WndButton *)wf->FindByName(_T("cmdPrev")))->SetFocused(true, NULL);
    return true;

  case VK_RIGHT:
#ifdef GNAV
  case '7':
#endif
    ((WndButton *)wf->FindByName(_T("cmdNext")))->set_focus();
    tabbed->NextPage();
    PageSwitched();
    //((WndButton *)wf->FindByName(_T("cmdNext")))->SetFocused(true, NULL);
    return true;

  default:
    return false;
  }
}
Example #2
0
static void
OnPrevClicked(WindowControl * Sender)
{
  (void)Sender;
  tabbed->PreviousPage();
  PageSwitched();
}
Example #3
0
static void
OnNextClicked(WindowControl * Sender)
{
  (void)Sender;
  tabbed->NextPage();
  PageSwitched();
}
Example #4
0
static void
OnPrevClicked(WndButton &Sender)
{
  (void)Sender;
  tabbed->PreviousPage();
  PageSwitched();
}
Example #5
0
static void
OnNextClicked(WndButton &Sender)
{
  (void)Sender;
  tabbed->NextPage();
  PageSwitched();
}
Example #6
0
static void
PrepareConfigurationDialog()
{
  gcc_unused ScopeBusyIndicator busy;

  wf = LoadDialog(CallBackTable, XCSoarInterface::main_window,
                  Layout::landscape ? _T("IDR_XML_CONFIGURATION_L") :
                                      _T("IDR_XML_CONFIGURATION"));
  if (wf == NULL)
    return;

  wf->SetKeyDownNotify(FormKeyDown);

  bool expert_mode = false;
  Profile::Get(szProfileUserLevel, expert_mode);

  CheckBox *cb = (CheckBox *)wf->FindByName(_T("Expert"));
  cb->set_checked(expert_mode);
  wf->FilterAdvanced(expert_mode);

  ((WndButton *)wf->FindByName(_T("cmdClose")))->SetOnClickNotify(OnCloseClicked);

  configuration_tabbed = ((TabbedControl *)wf->FindByName(_T("tabbed")));
  assert(configuration_tabbed != NULL);

  setVariables();

  /* restore previous page */
  configuration_tabbed->SetCurrentPage((unsigned)current_page);
  PageSwitched();
}
Example #7
0
bool
dlgConfigurationVarioShowModal(void)
{
  changed = false;

  if (!is_simulator() && devVarioFindVega() == NULL) {
    MessageBoxX (_("No communication with Vega."),
                 _("Vega error"), MB_OK);
    return false;
  }

  if (!Layout::landscape)
    wf = LoadDialog(CallBackTable,
                        XCSoarInterface::main_window, _T("IDR_XML_VARIO_L"));
  else
    wf = LoadDialog(CallBackTable,
                        XCSoarInterface::main_window, _T("IDR_XML_VARIO"));

  if (!wf)
    return false;

  wf->SetKeyDownNotify(FormKeyDown);

  ((WndButton *)wf->FindByName(_T("cmdClose")))->SetOnClickNotify(OnCloseClicked);

  tabbed = ((TabbedControl *)wf->FindByName(_T("tabbed")));
  assert(tabbed != NULL);

  PageSwitched();

  // populate enums

  FillEnums();

  ProgressGlue::Create(_("Reading vario settings..."));
  // Need step size finer than default 10
  ProgressGlue::SetStep(20);
  UpdateParameters(true);
  ProgressGlue::Close();

  wf->ShowModal();

  UpdateParameters(false);

  delete wf;
  wf = NULL;

  return changed;
}
Example #8
0
static bool
FormKeyDown(WindowControl *Sender, unsigned key_code)
{
  switch (key_code) {
  // JMW NO! This disables editing! //   case VK_LEFT:
  case '6':
    ((WndButton *)wf->FindByName(_T("cmdPrev")))->set_focus();
    tabbed->PreviousPage();
    PageSwitched();
    //((WndButton *)wf->FindByName(_T("cmdPrev")))->SetFocused(true, NULL);
    return true;

    // JMW NO! This disables editing!  //  case VK_RIGHT:
  case '7':
    ((WndButton *)wf->FindByName(_T("cmdNext")))->set_focus();
    tabbed->NextPage();
    PageSwitched();
    //((WndButton *)wf->FindByName(_T("cmdNext")))->SetFocused(true, NULL);
    return true;

  default:
    return false;
  }
}
static void
OnPrevClicked(gcc_unused WndButton &Sender)
{
  tabbed->PreviousPage();
  PageSwitched();
}
static void
OnNextClicked(gcc_unused WndButton &Sender)
{
  tabbed->NextPage();
  PageSwitched();
}
Example #11
0
static void
OnPrevClicked(gcc_unused WndButton &button)
{
  configuration_tabbed->PreviousPage();
  PageSwitched();
}
Example #12
0
static void
OnNextClicked(gcc_unused WndButton &button)
{
  configuration_tabbed->NextPage();
  PageSwitched();
}