Пример #1
0
  void set(const DialogLook &look, PixelRect _rc) {
    SingleWindow::set(_T("RunRenderOZ"), _T("RunRenderOZ"), _rc);

    const PixelRect rc = get_client_rect();

    WindowStyle with_border;
    with_border.Border();

    oz.set(*this, rc.right / 2, 0, rc.right - (rc.right / 2), rc.bottom,
           with_border);
    oz_window = &oz;

    const PixelRect list_rc = {
      0, 0, PixelScalar(rc.right / 2), PixelScalar(rc.bottom - 30),
    };

    type_list = new ListControl(*this, look, list_rc,
                                with_border, 25);
    type_list->SetPaintItemCallback(paint_oz_type_name);
    type_list->SetCursorCallback(oz_type_cursor_callback);
    type_list->SetLength(NUM_OZ_TYPES);

    PixelRect button_rc = rc;
    button_rc.right = (rc.left + rc.right) / 2;
    button_rc.top = button_rc.bottom - 30;
    close_button.set(*this, _T("Close"), ID_CLOSE, button_rc);

    oz.set_shape(ObservationZonePoint::LINE);

    type_list->SetFocus();
  }
Пример #2
0
  void set(const DialogLook &look,
           int left, int top, unsigned width, unsigned height) {
    SingleWindow::set(_T("RunRenderOZ"), _T("RunRenderOZ"),
                      left, top, width, height);

    const PixelRect rc = get_client_rect();

    WindowStyle with_border;
    with_border.border();

    oz.set(*this, rc.right / 2, 0, rc.right - (rc.right / 2), rc.bottom,
           with_border);
    oz_window = &oz;

    type_list = new WndListFrame(*this, look,
                                 0, 0, rc.right / 2, rc.bottom - 30,
                                 with_border, 25);
    type_list->SetPaintItemCallback(paint_oz_type_name);
    type_list->SetCursorCallback(oz_type_cursor_callback);
    type_list->SetLength(NUM_OZ_TYPES);

    close_button.set(*this, _T("Close"), ID_CLOSE,
                     0, rc.bottom - 30, rc.right / 2, 30);

    oz.set_shape(ObservationZonePoint::LINE);

    type_list->set_focus();
  }
Пример #3
0
void
KeyboardControl::add_button(const TCHAR* caption)
{
  assert(num_buttons < MAX_BUTTONS);

  button_values[num_buttons] = caption[0];
  ButtonWindow *button = &buttons[num_buttons++];
  button->set(*this, caption, (unsigned)caption[0],
              0, 0, button_width, button_height);
  button->set_font(Fonts::MapBold);
}
Пример #4
0
  void set(PixelRect _rc) {
    SingleWindow::set(_T("RunCanvas"), _T("RunCanvas"), _rc);

    PixelRect rc = get_client_rect();

    PixelRect button_rc = rc;
    button_rc.bottom -= 5;
    button_rc.top = button_rc.bottom - 25;

#ifndef ENABLE_OPENGL
    button_rc.left += 5;
    button_rc.right = button_rc.left + 65;

    buffer_button.set(*this, _T("Buffer"), ID_BUFFER, button_rc);
#endif

    button_rc.right = rc.right - 5;
    button_rc.left = button_rc.right - 65;

    close_button.set(*this, _T("Close"), ID_CLOSE, button_rc);
  }
Пример #5
0
  void Set(PixelRect _rc) {
    SingleWindow::set(_T("RunFinalGlideBarRenderer"), _T("RunFinalGlideBarRenderer"),
                      _rc);

    const PixelRect rc = GetClientRect();

    WindowStyle with_border;
    with_border.Border();

    final_glide.set(*this, rc.left, rc.top, rc.right, rc.bottom, with_border);

    PixelRect button_rc = rc;
    button_rc.top = button_rc.bottom - 30;
    close_button.set(*this, _T("Close"), ID_CLOSE, button_rc);
  }
Пример #6
0
  void set(int left, int top, unsigned width, unsigned height) {
    SingleWindow::set(_T("KeyCodeDumper"), _T("KeyCodeDumper"),
                      left, top, width, height);

    RECT rc = get_client_rect();

    key_code_dumper.set(*this, rc.left, rc.top,
                        rc.right - rc.left, (rc.bottom - rc.top + 1) / 2);
    close_button.set(*this, _T("Close"), ID_CLOSE,
                     rc.left, (rc.top + rc.bottom + 1) / 2,
                     rc.right - rc.left,
                     (rc.top + rc.bottom) / 2);

    key_code_dumper.set_focus();
  }
Пример #7
0
  void set(PixelRect _rc) {
    SingleWindow::set(_T("KeyCodeDumper"), _T("KeyCodeDumper"), _rc);

    PixelRect rc = get_client_rect();

    PixelRect d_rc = rc;
    d_rc.bottom = (rc.top + rc.bottom + 1) / 2;
    key_code_dumper.set(*this, d_rc);

    PixelRect button_rc = rc;
    button_rc.top = (rc.top + rc.bottom + 1) / 2;

    close_button.set(*this, _T("Close"), ID_CLOSE, button_rc);

    key_code_dumper.set_focus();
  }
Пример #8
0
void
KeyboardControl::add_button(const TCHAR* caption)
{
  assert(num_buttons < MAX_BUTTONS);

  button_values[num_buttons] = caption[0];

  PixelRect rc;
  rc.left = 0;
  rc.top = 0;
  rc.right = button_width;
  rc.bottom = button_height;

  ButtonWindow *button = &buttons[num_buttons++];
  button->set(*this, caption, (unsigned)caption[0], rc);
  button->SetFont(*look.button.font);
}
Пример #9
0
  void Set(PixelRect _rc) {
    TopWindowStyle style;
    style.Resizable();

    SingleWindow::set(_T("RunWindArrowRenderer"), _T("RunWindArrowRenderer"),
                      _rc, style);

    const PixelRect rc = GetClientRect();

    WindowStyle with_border;
    with_border.Border();

    wind.set(*this, rc.left, rc.top, rc.right, rc.bottom, with_border);

    PixelRect button_rc = rc;
    button_rc.top = button_rc.bottom - 30;
    close_button.set(*this, _T("Close"), ID_CLOSE, button_rc);
  }
Пример #10
0
  void set(PixelScalar left, PixelScalar top,
           UPixelScalar width, UPixelScalar height) {
    SingleWindow::set(_T("RunMapWindow"), _T("RunMapWindow"),
                      left, top, width, height);

    PixelRect rc = get_client_rect();
    map.set(*this, rc);
    map.SetWaypoints(&way_points);
    map.SetAirspaces(&airspace_database);
    map.SetTopography(topography);
    map.SetTerrain(terrain);
    if (terrain != NULL)
      map.SetLocation(terrain->GetTerrainCenter());

    rc.left = 5;
    rc.top = 5;
    rc.right = rc.left + 60;
    rc.bottom = rc.top + 20;
    close_button.set(*this, _T("Close"), ID_CLOSE, rc);
    close_button.set_font(Fonts::map);
    close_button.bring_to_top();
  }
Пример #11
0
  void set(PixelRect _rc) {
    TopWindowStyle style;
    style.Resizable();

    SingleWindow::set(_T("RunMapWindow"), _T("RunMapWindow"), _rc, style);

    PixelRect rc = GetClientRect();
    map.set(*this, rc);
    map.SetWaypoints(&way_points);
    map.SetAirspaces(&airspace_database);
    map.SetTopography(topography);
    map.SetTerrain(terrain);
    if (terrain != NULL)
      map.SetLocation(terrain->GetTerrainCenter());

    rc.left = 5;
    rc.top = 5;
    rc.right = rc.left + 60;
    rc.bottom = rc.top + 20;
    close_button.set(*this, _T("Close"), ID_CLOSE, rc);
    close_button.SetFont(Fonts::map);
    close_button.BringToTop();
  }