Пример #1
0
    void Create(const DialogLook &look, PixelSize size) {
        SingleWindow::Create(_T("RunRenderOZ"), size);

        const PixelRect rc = GetClientRect();

        WindowStyle with_border;
        with_border.Border();

        PixelRect oz_rc = rc;
        oz_rc.left = oz_rc.right / 2;
        oz.Create(*this, oz_rc, with_border);

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

        type_list = new ListControl(*this, look, list_rc,
                                    with_border, 25);

        type_list->SetItemRenderer(this);
        type_list->SetCursorHandler(this);
        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.Create(*this, _T("Close"), ID_CLOSE, button_rc);

        oz.set_shape(ObservationZone::Shape::LINE);

        type_list->SetFocus();
    }
Пример #2
0
  void Create(PixelSize size) {
    SingleWindow::Create(_T("Test"), size);

    WindowStyle style;
    style.Disable();

    const PixelRect rc = GetClientRect();
    close_button.Create(*this, _T("Close"), CLOSE, GetButtonRect(rc));
    test_window.Create(*this, rc, style);
  }
Пример #3
0
  void Create(PixelSize size) {
    SingleWindow::Create(_T("RunCanvas"), size);

    PixelRect rc = GetClientRect();

    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.Create(*this, _T("Buffer"), ID_BUFFER, button_rc);
    buffer_button.SetFont(normal_font);
#endif

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

    close_button.Create(*this, _T("Close"), ID_CLOSE, button_rc);
    close_button.SetFont(normal_font);
  }
Пример #4
0
  void Create(PixelSize size) {
    SingleWindow::Create(_T("RunFinalGlideBarRenderer"),
                         size);

    const PixelRect rc = GetClientRect();

    WindowStyle with_border;
    with_border.Border();

    final_glide.Create(*this, rc, with_border);

    PixelRect button_rc = rc;
    button_rc.top = button_rc.bottom - 30;
    close_button.Create(*this, _T("Close"), ID_CLOSE, button_rc);
  }
Пример #5
0
  void Create(PixelSize size) {
    TopWindowStyle style;
    style.Resizable();

    SingleWindow::Create(_T("RunHorizonRenderer"), size, style);

    const PixelRect rc = GetClientRect();

    WindowStyle with_border;
    with_border.Border();

    horizon.Create(*this, rc, with_border);

    PixelRect button_rc = rc;
    button_rc.top = button_rc.bottom - 30;
    close_button.Create(*this, _T("Close"), ID_CLOSE, button_rc);
  }
Пример #6
0
void
KeyboardControl::AddButton(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->Create(*this, caption, (unsigned)caption[0], rc);
  button->SetFont(*look.button.font);
}
  void Create(PixelSize size) {
    TopWindowStyle style;
    style.Resizable();

    SingleWindow::Create(_T("RunFAITriangleSectorRenderer"),
                         size, style);

    const PixelRect rc = GetClientRect();

    WindowStyle with_border;
    with_border.Border();

    PixelRect button_rc = rc;
    button_rc.top = button_rc.bottom - 30;
    close_button.Create(*this, _T("Close"), ID_CLOSE, button_rc);
    close_button.SetFont(normal_font);

    triangle_window.Create(*this, rc, with_border);
  }
Пример #8
0
  void Create(PixelSize size) {
    TopWindowStyle style;
    style.Resizable();

    SingleWindow::Create(_T("RunMapWindow"), size, style);

    PixelRect rc = GetClientRect();
    map.Create(*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.Create(*this, _T("Close"), ID_CLOSE, rc);
    close_button.SetFont(Fonts::map);
    close_button.BringToTop();
  }