Esempio n. 1
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();
  }
Esempio n. 2
0
void
DevicesConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
  instance = this;
  LoadWindow(NULL, parent,
             Layout::landscape ? _T("IDR_XML_DEVICESCONFIGPANEL") :
                               _T("IDR_XML_DEVICESCONFIGPANEL_L"));

  current_device = 0;

  for (unsigned i = 0; i < NUMDEV; ++i)
    Profile::GetDeviceConfig(i, device_config[i]);

  DockWindow *dock = (DockWindow *)form.FindByName(_T("edit"));
  assert(dock != NULL);
  DeviceEditWidget *edit = new DeviceEditWidget(device_config[0]);
  dock->SetWidget(edit);

  WndListFrame *list = (WndListFrame *)form.FindByName(_T("list"));
  assert(list != NULL);
  list->SetPaintItemCallback(PaintDeviceListItem);
  list->SetLength(2);
  list->SetCursorCallback(DeviceListCursorCallback);

  LoadFormProperty(form, _T("prpSetSystemTimeFromGPS"),
                   CommonInterface::GetComputerSettings().set_system_time_from_gps);

  LoadFormProperty(form, _T("prpIgnoreNMEAChecksum"),
                   NMEAParser::ignore_checksum);
}