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

C++ WindowStyle类代码示例

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

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



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

示例1: PrepareSize

void
KeyboardWidget::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
  PrepareSize(rc);

  TCHAR caption[] = _T(" ");

  for (const TCHAR *i = keyboard_letters; !StringIsEmpty(i); ++i) {
    caption[0] = *i;
    AddButton(parent, caption, *i);
  }

  AddButton(parent, _T("Space"), ' ');
  AddButton(parent, _T("."), '.');
  AddButton(parent, _T(","), ',');
  AddButton(parent, _T("-"), '-');

  if (show_shift_button) {
    WindowStyle style;
    style.Hide();
    shift_button.Create(parent, { 0, 0, 16, 16 }, style,
                        new SymbolButtonRenderer(look, _T("v")),
                        *this, SHIFT);
  }
  UpdateShiftState();
}
开发者ID:ThomasXBMC,项目名称:XCSoar,代码行数:26,代码来源:KeyboardWidget.cpp


示例2: GetInfoBoxBorder

void
InfoBoxManager::Create(PixelRect rc, const InfoBoxLayout::Layout &_layout,
                       const InfoBoxLook &look, const UnitsLook &units_look)
{
  const InfoBoxSettings &settings =
    CommonInterface::GetUISettings().info_boxes;

  first = true;
  layout = _layout;

  WindowStyle style;
  style.Hide();

  // create infobox windows
  for (unsigned i = layout.count; i-- > 0;) {
    const PixelRect &rc = layout.positions[i];
    int Border = GetInfoBoxBorder(i);

    InfoBoxes[i] = new InfoBoxWindow(XCSoarInterface::main_window,
                                     rc.left, rc.top,
                                     rc.right - rc.left, rc.bottom - rc.top,
                                     Border, settings, look, units_look,
                                     style);
  }

  InfoBoxesHidden = true;
}
开发者ID:davidswelt,项目名称:XCSoar,代码行数:27,代码来源:InfoBoxManager.cpp


示例3: assert

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


示例4: parent

InfoBoxWindow::InfoBoxWindow(ContainerWindow &_parent, int X, int Y, int Width, int Height,
                 int border_flags,
                             const InfoBoxSettings &_settings,
                 const InfoBoxLook &_look)
  :content(NULL),
   parent(_parent),
   settings(_settings), look(_look),
   mBorderKind(border_flags),
   focus_timer(0)
{
  colorValue = 0;
  colorTitle = 0;
  colorComment = 0;

  WindowStyle style;
  style.enable_double_clicks();
  set(parent, X, Y, Width, Height, style);

  mValueUnit = unUndef;

  mTitle.clear();
  mValue.clear();
  mComment.clear();
  mID = -1;
}
开发者ID:macsux,项目名称:XCSoar,代码行数:25,代码来源:InfoBoxWindow.cpp


示例5: GetInfoBoxBorder

void
InfoBoxManager::Create(PixelRect rc, const InfoBoxLayout::Layout &_layout,
                       const InfoBoxLook &look)
{
  first = true;
  layout = _layout;

  WindowStyle style;
  style.hide();
  full_window.set(XCSoarInterface::main_window, rc.left, rc.top,
                  rc.right - rc.left, rc.bottom - rc.top, style);

  // create infobox windows
  for (unsigned i = 0; i < layout.count; i++) {
    const PixelRect &rc = layout.positions[i];
    int Border = GetInfoBoxBorder(i);

    InfoBoxes[i] = new InfoBoxWindow(XCSoarInterface::main_window,
                                     rc.left, rc.top,
                                     rc.right - rc.left, rc.bottom - rc.top,
                                     Border, look);
  }

  SetDirty();
}
开发者ID:joachimwieland,项目名称:xcsoar-jwieland,代码行数:25,代码来源:InfoBoxManager.cpp


示例6: Prepare

 virtual void Prepare(ContainerWindow &parent,
                      const PixelRect &rc) override {
   WindowStyle style;
   style.Hide();
   window.Create(parent, rc, style);
   SetWindow(&window);
 }
开发者ID:Exadios,项目名称:xcsoar-exp,代码行数:7,代码来源:KnobTextEntry.cpp


示例7: get_client_rect

void
MainWindow::InitialiseConfigured()
{
  PixelRect rc = get_client_rect();

  LogStartUp(_T("InfoBox geometry"));
  InfoBoxLayout::Init(rc);
  const InfoBoxLayout::Layout ib_layout =
    InfoBoxLayout::Calculate(rc, InfoBoxLayout::InfoBoxGeometry);

  Fonts::SizeInfoboxFont(ib_layout.control_width);

  if (Appearance.UseCustomFonts) {
    LogStartUp(_T("Load fonts"));
    Fonts::LoadCustom();
  }

  LogStartUp(_T("Create info boxes"));
  InfoBoxManager::Create(rc, ib_layout);
  map_rect = ib_layout.remaining;

  LogStartUp(_T("Create button labels"));
  ButtonLabel::CreateButtonLabels(*this);
  ButtonLabel::SetLabelText(0,_T("MODE"));
  ButtonLabel::SetFont(Fonts::MapBold);

  WindowStyle hidden;
  hidden.hide();

  vario = new GlueGaugeVario(*this,
                             rc.right - ib_layout.control_width, 0,
                             ib_layout.control_width,
                             ib_layout.control_height * 3,
                             hidden);

  WindowStyle hidden_border;
  hidden_border.hide();
  hidden_border.border();

  flarm = new GaugeFLARM(*this,
                         rc.right - ib_layout.control_width * 2 + 1,
                         rc.bottom - ib_layout.control_height * 2 + 1,
                         ib_layout.control_width * 2 - 1,
                         ib_layout.control_height * 2 - 1,
                         hidden_border);
  flarm->bring_to_top();

  unsigned sz = std::min(ib_layout.control_height,
                         ib_layout.control_width) * 2;

  ta = new GaugeThermalAssistant(*this, 0, rc.bottom - sz, sz, sz,
                                 hidden_border);
  ta->bring_to_top();

  map.set(*this, map_rect);
  map.set_font(Fonts::Map);

  LogStartUp(_T("Initialise message system"));
  popup.set(rc);
}
开发者ID:Mrdini,项目名称:XCSoar,代码行数:60,代码来源:MainWindow.cpp


示例8: Prepare

 void Prepare(ContainerWindow &parent, const PixelRect &rc) override {
   WindowStyle style;
   style.Hide();
   terminal.Create(parent, rc, style);
   SetWindow(&terminal);
   device.SetMonitor(&bridge);
 }
开发者ID:CnZoom,项目名称:XcSoarPull,代码行数:7,代码来源:PortMonitor.cpp


示例9: InfoBoxWindow

void
InfoBoxManager::Create(ContainerWindow &parent,
                       const InfoBoxLayout::Layout &_layout,
                       const InfoBoxLook &look, const UnitsLook &units_look)
{
  const InfoBoxSettings &settings =
    CommonInterface::GetUISettings().info_boxes;

  first = true;
  layout = _layout;

  WindowStyle style;
  style.Hide();

  // create infobox windows
  for (unsigned i = layout.count; i-- > 0;) {
    const PixelRect &rc = layout.positions[i];
    int Border =
      settings.border_style == InfoBoxSettings::BorderStyle::TAB
      ? 0
      /* layout.geometry is the effective layout, while
         settings.geometry is the configured layout */
      : InfoBoxLayout::GetBorder(layout.geometry, layout.landscape, i);

    infoboxes[i] = new InfoBoxWindow(parent, rc,
                                     Border, settings, look, units_look,
                                     i, style);
  }

  infoboxes_hidden = true;
}
开发者ID:CnZoom,项目名称:XcSoarWork,代码行数:31,代码来源:InfoBoxManager.cpp


示例10: 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


示例11: GetClientRect

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


示例12: background_brush

ProgressWindow::ProgressWindow(ContainerWindow &parent)
  :background_color(COLOR_WHITE),
   background_brush(background_color),
   position(0)
{
  PixelRect rc = parent.GetClientRect();
  WindowStyle style;
  style.Hide();
  Create(parent, rc, style);

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

  // Load progress bar background
  bitmap_progress_border.Load(IDB_PROGRESSBORDER);

  // Determine text height
#ifndef USE_GDI
  font.Load(FontDescription(Layout::FontScale(10)));
  text_height = font.GetHeight();
#else
  VirtualCanvas canvas({1, 1});
  text_height = canvas.GetFontHeight();
#endif

  // Make progress bar height proportional to window height
  const unsigned progress_height = height / 20;
  const unsigned progress_horizontal_border = progress_height / 2;
  progress_border_height = progress_height * 2;

  // Initialize message text field
  PixelRect message_rc = rc;
  message_rc.bottom -= progress_border_height + height / 48;
  message_rc.top = message_rc.bottom - text_height;
  TextWindowStyle message_style;
  message_style.center();
  message.Create(*this, NULL, message_rc, message_style);

#ifndef USE_GDI
  message.SetFont(font);
#endif

  // Initialize progress bar
  PixelRect pb_rc;
  pb_rc.left = progress_horizontal_border;
  pb_rc.right = pb_rc.left + width - progress_height;
  pb_rc.top = height - progress_border_height + progress_horizontal_border;
  pb_rc.bottom = pb_rc.top + progress_height;
  ProgressBarStyle pb_style;
  progress_bar.Create(*this, pb_rc, pb_style);

  message.InstallWndProc(); // needed for OnChildColor()

  // Set progress bar step size and range
  SetRange(0, 1000);
  SetStep(50);

  // Show dialog
  ShowOnTop();
}
开发者ID:CnZoom,项目名称:XcSoarPull,代码行数:59,代码来源:ProgressWindow.cpp


示例13: SetWindow

void
ContainerWidget::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
  WindowStyle style;
  style.Hide();
  container.Create(parent, rc, style);
  SetWindow(&container);
}
开发者ID:MindMil,项目名称:XCSoar,代码行数:8,代码来源:ContainerWidget.cpp


示例14: SetWindow

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

  SetWindow(new SmallTrafficWindow(parent, rc, look, style));
}
开发者ID:rjsikarwar,项目名称:XCSoar,代码行数:8,代码来源:GaugeFLARM.cpp


示例15: GetDialogStyle

gcc_const
static WindowStyle
GetDialogStyle()
{
  WindowStyle style;
  style.Hide();
  style.ControlParent();
  return style;
}
开发者ID:StefanL74,项目名称:XCSoar,代码行数:9,代码来源:WidgetDialog.cpp


示例16: background_brush

ProgressWindow::ProgressWindow(ContainerWindow &parent)
  :background_color(COLOR_WHITE),
   background_brush(background_color),
   position(0)
{
  PixelRect rc = parent.get_client_rect();
  WindowStyle style;
  style.hide();
  set(parent, rc.left, rc.top, rc.right, rc.bottom, style);

  unsigned width = rc.right - rc.left, height = rc.bottom - rc.top;

  // Load progress bar background
  bitmap_progress_border.load(IDB_PROGRESSBORDER);

  // Determine text height
#ifdef ENABLE_SDL
  font.set("Droid Sans", 12);
  text_height = font.get_height();
#else
  VirtualCanvas canvas(1, 1);
  text_height = canvas.text_height(_T("W"));
#endif

  // Make progress bar height proportional to window height
  unsigned progress_height = height / 20;
  unsigned progress_horizontal_border = progress_height / 2;
  progress_border_height = progress_height * 2;

  // Initialize message text field
  TextWindowStyle message_style;
  message_style.center();
  message.set(*this, NULL, 0,
              height - progress_border_height - text_height - (height/48),
              width, text_height, message_style);

#ifdef ENABLE_SDL
  message.set_font(font);
#endif

  // Initialize progress bar
  ProgressBarStyle pb_style;
  progress_bar.set(*this, progress_horizontal_border,
                   height - progress_border_height + progress_horizontal_border,
                   width - progress_height,
                   progress_height, pb_style);

  message.install_wndproc(); // needed for on_color()

  // Set progress bar step size and range
  set_range(0, 1000);
  set_step(50);

  // Show dialog
  show_on_top();
  update();
}
开发者ID:Mrdini,项目名称:XCSoar,代码行数:57,代码来源:ProgressWindow.cpp


示例17:

void
TopWindow::set(const TCHAR *cls, const TCHAR *text,
                int left, int top, unsigned width, unsigned height)
{
  WindowStyle style;
  style.popup();

  Window::set(NULL, cls, text, left, top, width, height, style);
}
开发者ID:Mrdini,项目名称:XCSoar,代码行数:9,代码来源:TopWindow.cpp


示例18: GaugeThermalAssistantWindow

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

  GaugeThermalAssistantWindow *window =
    new GaugeThermalAssistantWindow(parent, rc, look, style);
  SetWindow(window);
}
开发者ID:damianob,项目名称:xcsoar_mess,代码行数:10,代码来源:GaugeThermalAssistant.cpp


示例19: 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


示例20: assert

void
XMLWidget::LoadWindow(const CallBackTableEntry *callbacks,
                      ContainerWindow &parent, const TCHAR *resource)
{
  WindowStyle style;
  style.Hide();

  Window *window = ::LoadWindow(callbacks, &form, parent, resource, style);
  assert(window != NULL);
  SetWindow(window);
}
开发者ID:damianob,项目名称:xcsoar,代码行数:11,代码来源:XMLWidget.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ WindowSurfaceMap类代码示例发布时间:2022-05-31
下一篇:
C++ WindowRef类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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