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


C++ WindowStyle::TabStop方法代码示例

本文整理汇总了C++中WindowStyle::TabStop方法的典型用法代码示例。如果您正苦于以下问题:C++ WindowStyle::TabStop方法的具体用法?C++ WindowStyle::TabStop怎么用?C++ WindowStyle::TabStop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WindowStyle的用法示例。


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

示例1: BitmapButtonRenderer

void
SimulatorPromptWindow::OnCreate()
{
  ContainerWindow::OnCreate();

  const PixelRect rc = GetClientRect();

  WindowStyle style;
  style.TabStop();

  fly_bitmap.Load(IDB_LAUNCHER1);
  fly_bitmap.EnableInterpolation();
  fly_button.Create(*this, rc, style,
                    new BitmapButtonRenderer(fly_bitmap),
                    action_listener, FLY);

  sim_bitmap.Load(IDB_LAUNCHER2);
  sim_bitmap.EnableInterpolation();
  sim_button.Create(*this, rc, style,
                    new BitmapButtonRenderer(sim_bitmap),
                    action_listener, SIMULATOR);

  if (have_quit_button)
    quit_button.Create(*this, look.button, _("Quit"), rc, style,
                       action_listener, QUIT);
}
开发者ID:CnZoom,项目名称:XcSoarPull,代码行数:26,代码来源:SimulatorPromptWindow.cpp

示例2: WndProperty

WndProperty *
RowFormWidget::CreateEdit(const TCHAR *label, const TCHAR *help,
                          bool read_only)
{
  assert(IsDefined());

  const PixelRect edit_rc =
    InitialControlRect(Layout::GetMinimumControlHeight());

  WindowStyle style;
  if (!read_only)
    style.TabStop();

  PanelControl &panel = *(PanelControl *)GetWindow();
  WndProperty *edit =
    new WndProperty(panel, look, label,
                    edit_rc, (*label == '\0') ? 0 : 100,
                    style);
  edit->SetReadOnly(read_only);

  if (help != NULL)
    edit->SetHelpText(help);

  return edit;
}
开发者ID:StefanL74,项目名称:XCSoar,代码行数:25,代码来源:RowFormWidget.cpp

示例3: Prepare

  void Prepare(ContainerWindow &parent, const PixelRect &rc) override {
    assert(!visible);

    WindowStyle style;
    style.Hide();
    style.TabStop();

    const ButtonLook &look = UIGlobals::GetDialogLook().button;

    const Layout layout = CalculateLayout(rc);
    edit_button.Create(parent, look, _("Edit Point"),
                       layout.edit, style,
                       *listener, EDIT);
    mutate_button.Create(parent, look, _("Make Finish"),
                         layout.down, style,
                         *listener, MUTATE);
    down_button.Create(parent, layout.down, style,
                       new SymbolButtonRenderer(look, _T("v")),
                       *listener, DOWN);
    up_button.Create(parent, layout.down, style,
                     new SymbolButtonRenderer(look, _T("^")),
                     *listener, UP);
    reverse_button.Create(parent, look, _("Reverse"),
                          layout.reverse, style,
                          *listener, REVERSE);
    clear_all_button.Create(parent, look, _("Clear All"),
                            layout.clear_all, style,
                            *listener, CLEAR_ALL);
  }
开发者ID:Andy-1954,项目名称:XCSoar,代码行数:29,代码来源:TaskEditPanel.cpp

示例4: QuickMenuButtonRenderer

void
QuickMenu::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
  WindowStyle grid_view_style;
  grid_view_style.ControlParent();
  grid_view_style.Hide();

  const auto &dialog_look = UIGlobals::GetDialogLook();

  const auto &font = *dialog_look.button.font;
  const unsigned column_width = Layout::Scale(78u);
  const unsigned row_height =
    std::max(2 * (Layout::GetTextPadding() + font.GetHeight()),
             Layout::GetMaximumControlHeight());

  grid_view.Create(parent, dialog_look, rc, grid_view_style,
                   column_width, row_height);
  SetWindow(&grid_view);

  WindowStyle buttonStyle;
  buttonStyle.TabStop();

  for (unsigned i = 0; i < menu.MAX_ITEMS; ++i) {
    if (buttons.full())
      continue;

    const auto &menuItem = menu[i];
    if (!menuItem.IsDefined())
      continue;

    TCHAR buffer[100];
    const auto expanded =
      ButtonLabel::Expand(menuItem.label, buffer, ARRAY_SIZE(buffer));
    if (!expanded.visible)
      continue;

    PixelRect button_rc;
    button_rc.left = 0;
    button_rc.top = 0;
    button_rc.right = 80;
    button_rc.bottom = 30;
    auto *button = new Button(grid_view, button_rc, buttonStyle,
                              new QuickMenuButtonRenderer(dialog_look,
                                                          expanded.text),
                              *this, menuItem.event);
    button->SetEnabled(expanded.enabled);

    buttons.append(button);
    grid_view.AddItem(*button);
  }

  grid_view.RefreshLayout();
  UpdateCaption();
}
开发者ID:Exadios,项目名称:xcsoar-exp,代码行数:54,代码来源:dlgQuickMenu.cpp

示例5: SetWindow

void
MacCreadySetupPanel::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
  WindowStyle style;
  style.Hide();
  style.TabStop();

  auto_mc.Create(parent, UIGlobals::GetDialogLook(), _("Auto"), rc, style,
                 *this, 1);
  SetWindow(&auto_mc);
}
开发者ID:kwtskran,项目名称:XCSoar,代码行数:11,代码来源:MacCreadySetup.cpp

示例6: look

TabDisplay::TabDisplay(TabWidget &_pager, const DialogLook &_look,
                       ContainerWindow &parent, PixelRect rc,
                       bool _vertical,
                       WindowStyle style)
  :pager(_pager),
   look(_look),
   vertical(_vertical),
   dragging(false),
   tab_line_height(Layout::VptScale(5))
{
  style.TabStop();
  Create(parent, rc, style);
}
开发者ID:kwtskran,项目名称:XCSoar,代码行数:13,代码来源:TabDisplay.cpp

示例7: Prepare

  /* virtual methods from Widget */
  virtual void Prepare(ContainerWindow &parent,
                       const PixelRect &rc) override {
    Layout layout(rc);

    WindowStyle style;
    style.Hide();
    style.TabStop();

    expert.Create(parent, look, _("Expert"),
                  layout.expert, style, *this, EXPERT);

    button2.Create(parent, _T(""), layout.button2, style);
    button1.Create(parent, _T(""), layout.button1, style);
  }
开发者ID:DRIZO,项目名称:xcsoar,代码行数:15,代码来源:dlgConfiguration.cpp

示例8: Prepare

  /* virtual methods from Widget */
  virtual void Prepare(ContainerWindow &parent,
                       const PixelRect &rc) override {
    Layout layout(rc);

    WindowStyle style;
    style.Hide();
    style.TabStop();

    const auto &button_look = dialog.GetLook().button;
    demo_button.Create(parent, button_look, _("Demo"),
                       layout.demo, style, *this, DEMO);
    save_button.Create(parent, button_look, _("Save"),
                       layout.save, style, *this, SAVE);
  }
开发者ID:CnZoom,项目名称:XcSoarPull,代码行数:15,代码来源:VegaConfigurationDialog.cpp

示例9: look

TabDisplay::TabDisplay(TabBarControl& _theTabBar, const DialogLook &_look,
                       ContainerWindow &parent, PixelRect rc,
                       bool _vertical)
  :tab_bar(_theTabBar),
   look(_look),
   vertical(_vertical),
   dragging(false),
   tab_line_height(vertical
                   ? (Layout::Scale(TabLineHeightInitUnscaled) * 0.75)
                   : Layout::Scale(TabLineHeightInitUnscaled))
{
  WindowStyle mystyle;
  mystyle.TabStop();
  Create(parent, rc, mystyle);
}
开发者ID:robertscottbeattie,项目名称:xcsoardev,代码行数:15,代码来源:TabDisplay.cpp

示例10: look

TabDisplay::TabDisplay(TabBarControl& _theTabBar, const DialogLook &_look,
                       ContainerWindow &parent,
                       PixelScalar left, PixelScalar top,
                       UPixelScalar width, UPixelScalar height,
                       bool _flipOrientation)
    :tab_bar(_theTabBar),
     look(_look),
     dragging(false),
     down_index(-1),
     drag_off_button(false),
     flip_orientation(_flipOrientation)
{
    WindowStyle mystyle;
    mystyle.TabStop();
    set(parent, left, top, width, height, mystyle);
}
开发者ID:damianob,项目名称:xcsoar,代码行数:16,代码来源:TabDisplay.cpp

示例11: form

int WINAPI
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
#ifdef _WIN32_WCE
        LPWSTR lpCmdLine,
#else
        LPSTR lpCmdLine2,
#endif
        int nCmdShow)
#endif
{
  PixelRect screen_rc{0, 0, 640, 480};

  ScreenGlobalInit screen_init;
  Layout::Initialize(screen_rc.right - screen_rc.left,
                     screen_rc.bottom - screen_rc.top);

  InitialiseFonts();
  DialogLook *dialog_look = new DialogLook();
  dialog_look->Initialise(bold_font, normal_font, small_font,
                          bold_font, bold_font);

  SingleWindow main_window;
  main_window.set(_T("STATIC"), _T("RunListControl"), screen_rc);
  main_window.show();

  WndForm form(main_window, *dialog_look, main_window.get_client_rect(),
               _T("RunListControl"));
  ContainerWindow &client_area = form.GetClientAreaWindow();

  WindowStyle style;
  style.TabStop();
  WndListFrame list(client_area, *dialog_look, 2, 2,
                    client_area.get_width() - 4,
                    client_area.get_height() - 4,
                    style, normal_font.GetHeight() + 4);
  list.SetPaintItemCallback(PaintItemCallback);
  list.SetLength(64);
  list.set_focus();

  form.ShowModal();

  delete dialog_look;
  DeinitialiseFonts();

  return 0;
}
开发者ID:davidswelt,项目名称:XCSoar,代码行数:46,代码来源:RunListControl.cpp

示例12: assert

void
ProgressDialog::AddCancelButton(std::function<void()> &&callback)
{
  assert(!cancel_button.IsDefined());

  WindowStyle style;
  style.TabStop();

  PixelRect rc = client_area.GetClientRect();
  rc.right -= Layout::Scale(2);
  rc.left = rc.right - Layout::Scale(78);
  rc.top += Layout::Scale(2);
  rc.bottom = rc.top + Layout::Scale(35);

  cancel_button.Create(client_area, GetLook().button,
                       _("Cancel"), rc, style,
                       *this, mrCancel);
  cancel_button.BringToTop();

  cancel_callback = std::move(callback);
}
开发者ID:CnZoom,项目名称:XcSoarPull,代码行数:21,代码来源:ProgressDialog.cpp

示例13: form

static void
Main()
{
  WndForm form(*dialog_look);
  form.Create(main_window, _T("RunListControl"));
  ContainerWindow &client_area = form.GetClientAreaWindow();

  PixelRect list_rc = client_area.GetClientRect();
  list_rc.Grow(-2);

  WindowStyle style;
  style.TabStop();
  ListControl list(client_area, *dialog_look, list_rc,
                   style, normal_font.GetHeight() + 4);

  FunctionListItemRenderer renderer(PaintItemCallback);
  list.SetItemRenderer(&renderer);
  list.SetLength(64);
  list.SetFocus();

  form.ShowModal();
}
开发者ID:CnZoom,项目名称:XcSoarPull,代码行数:22,代码来源:RunListControl.cpp

示例14: label_rc

void
PolarShapeEditWidget::Prepare(ContainerWindow &parent, const PixelRect &_rc)
{
  PanelWidget::Prepare(parent, _rc);
  const DialogLook &look = UIGlobals::GetDialogLook();
  ContainerWindow &panel = (ContainerWindow &)GetWindow();

  const unsigned width = _rc.right - _rc.left;
  const unsigned height = _rc.bottom - _rc.top;

  const TCHAR *v_text = _("Polar V");
  const TCHAR *w_text = _("Polar W");

  const unsigned row_height = height / 2;
  const unsigned label_width = Layout::Scale(8) +
    std::max(look.text_font->TextSize(v_text).cx,
             look.text_font->TextSize(v_text).cx);
  const UPixelScalar edit_width = (width - label_width) / ARRAY_SIZE(points);

  WindowStyle style;
  style.TabStop();

  PixelRect label_rc(0, 0, label_width, row_height);
  v_label = new WndFrame(panel, look, label_rc);
  v_label->SetText(v_text);

  PixelRect rc;
  rc.left = label_width;
  rc.top = 0;
  rc.right = rc.left + edit_width;
  rc.bottom = row_height;
  for (unsigned i = 0; i < ARRAY_SIZE(points);
       ++i, rc.left += edit_width, rc.right += edit_width) {
    points[i].v = new WndProperty(panel, look, _T(""),
                                  rc, 0, style);
    DataFieldFloat *df = new DataFieldFloat(_T("%.0f"), _T("%.0f %s"),
                                            fixed(0), fixed(300), fixed(0),
                                            fixed(1), false, NULL);
    points[i].v->SetDataField(df);
  }

  label_rc.top += row_height;
  label_rc.bottom += row_height;
  w_label = new WndFrame(panel, look, label_rc);
  w_label->SetText(w_text);

  rc.left = label_width;
  rc.top = row_height;
  rc.right = rc.left + edit_width;
  rc.bottom = height;

  fixed step = fixed(0.05), min = fixed(-10);
  switch (Units::current.vertical_speed_unit) {
  case Unit::FEET_PER_MINUTE:
    step = fixed(10);
    min = fixed(-2000);
    break;

  case Unit::KNOTS:
    step = fixed(0.1);
    min = fixed(-20);
    break;

  default:
    break;
  }

  for (unsigned i = 0; i < ARRAY_SIZE(points);
       ++i, rc.left += edit_width, rc.right += edit_width) {
    points[i].w = new WndProperty(panel, look, _T(""),
                                  rc, 0, style);
    DataFieldFloat *df = new DataFieldFloat(_T("%.2f"), _T("%.2f %s"),
                                            min, fixed(0), fixed(0),
                                            step, false, NULL);

    points[i].w->SetDataField(df);
  }

  for (unsigned i = 0; i < ARRAY_SIZE(points); ++i)
    LoadPoint(points[i], shape[i]);
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:81,代码来源:PolarShapeEditWidget.cpp

示例15: WndCustomButton

void
dlgQuickMenuShowModal(SingleWindow &parent)
{
  const Menu *menu = InputEvents::GetMenu(_T("RemoteStick"));
  if (menu == NULL)
    return;

  const DialogLook &dialog_look = UIGlobals::GetDialogLook();

  WindowStyle dialogStyle;
  dialogStyle.Hide();
  dialogStyle.ControlParent();

  wf = new WndForm(parent, dialog_look, parent.get_client_rect(),
                   _T("Quick Menu"), dialogStyle);

  ContainerWindow &client_area = wf->GetClientAreaWindow();

  PixelRect r = client_area.get_client_rect();

  WindowStyle grid_view_style;
  grid_view_style.ControlParent();

  grid_view = new GridView(client_area,
                           r.left, r.top,
                           r.right - r.left, r.bottom - r.top,
                           dialog_look, grid_view_style);

  WindowStyle buttonStyle;
  buttonStyle.TabStop();

  for (unsigned i = 0; i < menu->MAX_ITEMS; ++i) {
    if (buttons.full())
      continue;

    const MenuItem &menuItem = (*menu)[i];
    if (!menuItem.IsDefined())
      continue;

    TCHAR buffer[100];
    ButtonLabel::Expanded expanded =
      ButtonLabel::Expand(menuItem.label, buffer, ARRAY_SIZE(buffer));
    if (!expanded.visible)
      continue;

    PixelRect button_rc;
    button_rc.left = 0;
    button_rc.top = 0;
    button_rc.right = 80;
    button_rc.bottom = 30;
    WndButton *button =
      new WndCustomButton(*grid_view, dialog_look, expanded.text,
                          button_rc, buttonStyle, OnButtonClicked);
    button->set_enabled(expanded.enabled);

    buttons.append(button);
    events.append(menuItem.event);
  }

  grid_view->SetItems(buttons);
  SetFormDefaultFocus();
  SetFormCaption();

  wf->SetKeyDownNotify(FormKeyDown);

  wf->ShowModal();

  for (auto it = buttons.begin(), end = buttons.end(); it != end; ++it)
    delete *it;

  buttons.clear();
  events.clear();

  delete wf;
  delete grid_view;
}
开发者ID:davidswelt,项目名称:XCSoar,代码行数:76,代码来源:dlgQuickMenu.cpp


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