void
TrafficWidget::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
  instance = this;

  WindowStyle style;
  style.Hide();
  style.EnableDoubleClicks();

  const Look &look = UIGlobals::GetLook();
  view = new FlarmTrafficControl2(look.flarm_dialog);
  view->set(parent, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,
            style);
  SetWindow(view);
}
Exemple #2
0
void
MapWindow::Create(ContainerWindow &parent, const PixelRect &rc)
{
  WindowStyle style;
  style.EnableDoubleClicks();
  DoubleBufferWindow::Create(parent, rc, style);

  // initialize other systems
  visible_projection.SetMapScale(fixed(5000));
  visible_projection.SetScreenOrigin((rc.left + rc.right) / 2,
                                     (rc.bottom + rc.top) / 2);
  visible_projection.UpdateScreenBounds();

#ifndef ENABLE_OPENGL
  buffer_projection = visible_projection;
#endif
}
Exemple #3
0
InfoBoxWindow::InfoBoxWindow(ContainerWindow &parent, PixelRect rc,
                             unsigned border_flags,
                             const InfoBoxSettings &_settings,
                             const InfoBoxLook &_look,
                             const UnitsLook &_units_look,
                             unsigned _id,
                             WindowStyle style)
  :content(NULL),
   settings(_settings), look(_look), units_look(_units_look),
   border_kind(border_flags),
   id(_id),
   dragging(false), pressed(false),
   force_draw_selector(false),
   focus_timer(*this), dialog_timer(*this)
{
  data.Clear();

  style.EnableDoubleClicks();
  Create(parent, rc, style);
}
Exemple #4
0
InfoBoxWindow::InfoBoxWindow(ContainerWindow &_parent,
                             PixelScalar x, PixelScalar y,
                             UPixelScalar width, UPixelScalar height,
                             int border_flags, const InfoBoxSettings &_settings,
                             const InfoBoxLook &_look,
                             const UnitsLook &_units_look,
                             WindowStyle style)
  :content(NULL),
   parent(_parent),
   settings(_settings), look(_look), units_look(_units_look),
   border_kind(border_flags),
   force_draw_selector(false),
   focus_timer(*this)
{
  data.Clear();

  style.EnableDoubleClicks();
  set(parent, x, y, width, height, style);

  id = -1;
}
Exemple #5
0
void
TrafficWidget::Prepare(ContainerWindow &parent, const PixelRect &_rc)
{
  ContainerWidget::Prepare(parent, _rc);

  const Look &look = UIGlobals::GetLook();

  const PixelRect rc = GetContainer().GetClientRect();

#ifndef GNAV
  zoom_in_button = new WndSymbolButton(GetContainer(), look.dialog.button,
                                       _T("+"), rc, ButtonWindowStyle(),
                                       *this, ZOOM_IN);
  zoom_out_button = new WndSymbolButton(GetContainer(), look.dialog.button,
                                        _T("-"), rc, ButtonWindowStyle(),
                                        *this, ZOOM_OUT);
  previous_item_button = new WndSymbolButton(GetContainer(),
                                             look.dialog.button,
                                             _T("<"), rc, ButtonWindowStyle(),
                                             *this, PREVIOUS_ITEM);
  next_item_button = new WndSymbolButton(GetContainer(), look.dialog.button,
                                         _T(">"), rc, ButtonWindowStyle(),
                                         *this, NEXT_ITEM);
  details_button = new WndButton(GetContainer(), look.dialog.button,
                                 _("Details"), rc, ButtonWindowStyle(),
                                 *this, DETAILS);
  close_button = new WndButton(GetContainer(), look.dialog.button,
                               _("Close"), rc, ButtonWindowStyle(),
                               *this, CLOSE);
#endif

  WindowStyle style;
  style.EnableDoubleClicks();

  view = new FlarmTrafficControl(look.flarm_dialog);
  view->Create(GetContainer(), rc, style);

  UpdateLayout();
}
 void Create(ContainerWindow &parent, PixelRect rc,
          WindowStyle window_style=WindowStyle()) {
   window_style.EnableDoubleClicks();
   ThermalAssistantWindow::Create(parent, rc, window_style);
 }