void AddControls(TWinControl* AWinControl, TStrings* Strings) { for(int i=0; i < AWinControl->ControlCount; i++) { if (dynamic_cast<TWinControl*>(AWinControl->Controls[i])) AddControls(dynamic_cast<TWinControl*>(AWinControl->Controls[i]), Strings); else AddCtrl(AWinControl->Controls[i], Strings); AddCtrl(AWinControl, Strings); } }
/** * fügt eine ProgressBar hinzu. * * @author OLiver */ ctrlProgress *Window::AddProgress(unsigned int id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, TextureColor tc, unsigned short button_minus, unsigned short button_plus, unsigned short maximum, const std::string& tooltip, unsigned short x_padding, unsigned short y_padding, unsigned int force_color, const std::string& button_minus_tooltip, const std::string& button_plus_tooltip) { if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } return AddCtrl(id, new ctrlProgress(this, id, x, y, width, height, tc, button_minus, button_plus, maximum, x_padding, y_padding, force_color, tooltip, button_minus_tooltip, button_plus_tooltip)); }
/** * fügt ein variables TextCtrl hinzu. * * @param[in] x X-Koordinate des Steuerelements * @param[in] y Y-Koordinate des Steuerelements * @param[in] formatstr Der Formatstring des Steuerelements * @param[in] color Textfarbe * @param[in] format Formatierung des Textes * @p 0 - Text links ( standard ) * @p glArchivItem_Font::DF_CENTER - Text mittig * @p glArchivItem_Font::DF_RIGHT - Text rechts * @p glArchivItem_Font::DF_TOP - Text oben ( standard ) * @p glArchivItem_Font::DF_VCENTER - Text vertikal zentriert * @p glArchivItem_Font::DF_BOTTOM - Text unten * @param[in] font Schriftart * @param[in] parameters Anzahl der nachfolgenden Parameter * @param[in] ... die variablen Parameter * * @author OLiver */ ctrlVarText *Window::AddVarText(unsigned int id, unsigned short x, unsigned short y, const std::string& formatstr, unsigned int color, unsigned int format, glArchivItem_Font *font, unsigned int parameters, ...) { ctrlVarText *ctrl; va_list liste; va_start(liste, parameters); if(scale) { x = ScaleX(x); y = ScaleY(y); } ctrl = new ctrlVarText(this, id, x, y, formatstr, color, format, font, parameters, liste); va_end(liste); return AddCtrl(id, ctrl); }
SjDlgCtrl* SjDlgControls::AddCheckCtrl(const wxString& id, const wxString& label, long value, long defaultValue) { SjDlgCtrl* dc = AddCtrl(SJ_DLG_CHECKCTRL_TYPE, id, label); dc->m_value = wxString::Format(wxT("%i"), (int)value); dc->m_defaultValue = wxString::Format(wxT("%i"), (int)defaultValue); return dc; }
/** * fügt eine Tabelle hinzu. * ... sollte eine Menge von const char*, int und SortType sein * * @author OLiver */ ctrlTable *Window::AddTable(unsigned int id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, TextureColor tc, glArchivItem_Font *font, unsigned int columns, ...) { ctrlTable *ctrl; va_list liste; va_start(liste, columns); if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } ctrl = new ctrlTable(this, id, x, y, width, height, tc, font, columns, liste); va_end(liste); return AddCtrl(id, ctrl); }
/** * fügt ein vertieftes variables TextCtrl hinzu. * * @author FloSoft */ ctrlVarDeepening *Window::AddVarDeepening(unsigned int id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, TextureColor tc, const std::string& formatstr, glArchivItem_Font *font, unsigned int color, unsigned int parameters, ...) { ctrlVarDeepening *ctrl; va_list liste; va_start(liste, parameters); if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } ctrl = new ctrlVarDeepening(this, id, x, y, width, height, tc, formatstr, font, color, parameters, liste); va_end(liste); return AddCtrl(id, ctrl); }
SjDlgCtrl* SjDlgControls::AddTextCtrl(const wxString& id, const wxString& label, const wxString& value, const wxString& defaultValue, long style) { SjDlgCtrl* dc = AddCtrl(SJ_DLG_TEXTCTRL_TYPE, id, label); dc->m_value = value; dc->m_defaultValue = defaultValue; dc->m_style = style; return dc; }
SjDlgCtrl* SjDlgControls::AddSelectCtrl(const wxString& id, const wxString& label, long value, long defaultValue, const wxArrayString& options) { SjDlgCtrl* dc = AddCtrl(SJ_DLG_SELECTCTRL_TYPE, id, label); dc->m_value = wxString::Format(wxT("%i"), (int)value); dc->m_defaultValue = wxString::Format(wxT("%i"), (int)defaultValue); dc->m_options = options; return dc; }
TKShellMenu::TKShellMenu() { _hge = hgeCreate(HGE_VERSION); _bg = new hgeSprite(_hge->Texture_Load("img\\ShellMenuBg.png"),0,0,800,600); _hBgMusic = _hge->Effect_Load("music\\pause.ogg"); _cursor = new hgeSprite(_hge->Texture_Load("img\\cursor.png"), 0, 0, 32, 32); _font = new hgeFont("img\\font1.fnt"); AddCtrl(new hgeGUIMenuItem(1, _font, 0, 185, 300, 0.0f, "Single")); AddCtrl(new hgeGUIMenuItem(2, _font, 0, 185, 340, 0.1f, "MultiPlayer")); AddCtrl(new hgeGUIMenuItem(3, _font, 0, 185, 380, 0.2f, "About")); AddCtrl(new hgeGUIMenuItem(4, _font, 0, 185, 420, 0.3f, "Exit")); SetNavMode(HGEGUI_UPDOWN|HGEGUI_CYCLED); SetCursor(_cursor); SetFocus(1); Enter(); }
/// fügt einen Image-ButtonCtrl hinzu. ctrlImageButton *Window::AddImageButton(unsigned int id, unsigned short x, unsigned short y,unsigned short width, unsigned short height, const TextureColor tc,glArchivItem_Bitmap * const image, const std::string& tooltip) { if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } return AddCtrl(id, new ctrlImageButton(this, id, x, y, width, height, tc, image,tooltip)); }
/// fügt einen Color-ButtonCtrl hinzu. ctrlColorButton *Window::AddColorButton(unsigned int id, unsigned short x, unsigned short y,unsigned short width, unsigned short height, const TextureColor tc, const unsigned int fillColor, const std::string& tooltip) { if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } return AddCtrl(id, new ctrlColorButton(this, id, x, y, width, height, tc, fillColor, tooltip)); }
LoginWindow::LoginWindow(GUIApp *parentApp, int _id, float x, float y,bool fixed ) : GUIAppWindow(parentApp,_id, x,y, 200, 200 ) { font = Game::Instance()->GetSysInterface()->GetFont(TANK_FONT_1); edit1 = new GUIAppEdit(GUIAPP_ID_EDIT_USERNAME,40, 50, 120, font, GUIAPPEDIT_FLAGS_NOMARL,16); AddCtrl(edit1); edit2 = new GUIAppEdit(GUIAPP_ID_EDIT_PASSWORD,40, 80, 120, font, GUIAPPEDIT_FLAGS_PASSWORD,16); AddCtrl(edit2); label1 = new GUIAppLabel(GUIAPP_ID_LABLE_STATUS, 40,110, font, "press connect button", 0xffffffff,0); AddCtrl(label1); // active elements button = new GUIAppButton(GUIAPP_ID_BTN_LOGIN, 70, 140, 60, 20,NULL,0,0); AddCtrl(button); }
/// fügt einen Text-ButtonCtrl hinzu. ctrlTextButton *Window::AddTextButton(unsigned int id, unsigned short x, unsigned short y,unsigned short width, unsigned short height, const TextureColor tc,const std::string& text, glArchivItem_Font *font, const std::string& tooltip) { if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } return AddCtrl(id, new ctrlTextButton(this, id, x, y, width, height, tc, text,font,tooltip)); }
/** * fügt ein ImageCtrl hinzu. * * @author OLiver */ ctrlImage *Window::AddImage(unsigned int id, unsigned short x, unsigned short y, glArchivItem_Bitmap *image, const std::string& tooltip) { if(scale) { x = ScaleX(x); y = ScaleY(y); } return AddCtrl(id, new ctrlImage(this, id, x, y, image, tooltip)); }
/** * fügt ein TabCtrl hinzu. * * @author OLiver */ ctrlTab *Window::AddTabCtrl(unsigned int id, unsigned short x, unsigned short y, unsigned short width) { if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); } return AddCtrl(id, new ctrlTab(this, id, x, y, width)); }
/** * fügt ein TextCtrl hinzu. * * @param[in] x X-Koordinate des Steuerelements * @param[in] y Y-Koordinate des Steuerelements * @param[in] text Text * @param[in] color Textfarbe * @param[in] format Formatierung des Textes * @p 0 - Text links ( standard ) * @p glArchivItem_Font::DF_CENTER - Text mittig * @p glArchivItem_Font::DF_RIGHT - Text rechts * @p glArchivItem_Font::DF_TOP - Text oben ( standard ) * @p glArchivItem_Font::DF_VCENTER - Text vertikal zentriert * @p glArchivItem_Font::DF_BOTTOM - Text unten * @param[in] font Schriftart * * @author OLiver */ ctrlText *Window::AddText(unsigned int id, unsigned short x, unsigned short y, const std::string& text, unsigned int color, unsigned int format, glArchivItem_Font *font) { if(scale) { x = ScaleX(x); y = ScaleY(y); } return AddCtrl(id, new ctrlText(this, id, x, y, text, color, format, font)); }
/** * fügt ein BuildingIcon hinzu. * * @author OLiver */ ctrlBuildingIcon *Window::AddBuildingIcon(unsigned int id, unsigned short x, unsigned short y, BuildingType type, const Nation nation, unsigned short size, const std::string& tooltip) { if(scale) { x = ScaleX(x); y = ScaleY(y); } return AddCtrl(id, new ctrlBuildingIcon(this, id, x, y, type, nation, size, tooltip)); }
ctrlPreviewMinimap *Window::AddPreviewMinimap(const unsigned id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, glArchivItem_Map * const map) { if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } return AddCtrl(id, new ctrlPreviewMinimap(this, id, x, y, width, height, map)); }
/** * fügt ein ListCtrl hinzu. * * @author OLiver */ ctrlList *Window::AddList(unsigned int id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, TextureColor tc, glArchivItem_Font *font) { if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } return AddCtrl(id, new ctrlList(this, id, x, y, width, height, tc, font)); }
/** * adds a colored Deepening * * @author Divan */ ctrlColorDeepening *Window::AddColorDeepening(unsigned int id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, TextureColor tc, unsigned int fillColor) { if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } return AddCtrl(id, new ctrlColorDeepening(this, id, x, y, width, height, tc, fillColor)); }
/** * fügt ein mehrzeiliges TextCtrl hinzu. * * @author Devil */ ctrlMultiline* Window::AddMultiline(unsigned int id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, TextureColor tc, glArchivItem_Font* font, unsigned int format) { if(scale_) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } return AddCtrl(id, new ctrlMultiline(this, id, x, y, width, height, tc, font, format)); }
/** * fügt eine Combobox hinzu. * * @author OLiver */ ctrlComboBox *Window::AddComboBox(unsigned int id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, TextureColor tc, glArchivItem_Font *font, unsigned short max_list_height, bool readonly) { if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } return AddCtrl(id, new ctrlComboBox(this, id, x, y, width, height, tc, font, max_list_height, readonly)); }
/** * fügt eine Checkbox hinzu. * * @author OLiver */ ctrlCheck *Window::AddCheckBox(unsigned int id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, TextureColor tc, const std::string& text, glArchivItem_Font *font, bool readonly) { if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } return AddCtrl(id, new ctrlCheck(this, id, x, y, width, height, tc, text, font, readonly)); }
/** * fügt ein vertieftes TextCtrl hinzu. * * @author OLiver */ ctrlDeepening *Window::AddDeepening(unsigned int id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, TextureColor tc, const std::string& text, glArchivItem_Font *font, unsigned int color) { if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } return AddCtrl(id, new ctrlDeepening(this, id, x, y, width, height, tc, text, font, color)); }
/** * fügt eine Scrollbar hinzu. * * @author OLiver */ ctrlScrollBar *Window::AddScrollBar(unsigned int id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, unsigned short button_height, TextureColor tc, unsigned short page_size) { if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); button_height = ScaleY(button_height); } return AddCtrl(id, new ctrlScrollBar(this, id, x, y, width, height, button_height, tc, page_size)); }
/** * fügt eine prozentuale ProgressBar hinzu. * * @author OLiver */ ctrlPercent *Window::AddPercent(unsigned int id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, TextureColor tc, unsigned int text_color, glArchivItem_Font *font, const unsigned short *percentage) { if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } return AddCtrl(id, new ctrlPercent(this, id, x, y, width, height, tc, text_color, font, percentage)); }
DialogDummyVideo::DialogDummyVideo(wxWindow *parent) : wxDialog(parent, -1, _("Dummy video options")) , fps(OPT_GET("Video/Dummy/FPS")->GetDouble()) , width(OPT_GET("Video/Dummy/Last/Width")->GetInt()) , height(OPT_GET("Video/Dummy/Last/Height")->GetInt()) , length(OPT_GET("Video/Dummy/Last/Length")->GetInt()) , color(OPT_GET("Colour/Video Dummy/Last Colour")->GetColor()) , pattern(OPT_GET("Video/Dummy/Pattern")->GetBool()) { SetIcon(GETICON(use_dummy_video_menu_16)); auto res_sizer = new wxBoxSizer(wxHORIZONTAL); res_sizer->Add(spin_ctrl(this, 1, 10000, &width), wxSizerFlags(1).Expand()); res_sizer->Add(new wxStaticText(this, -1, " x "), wxSizerFlags().Center()); res_sizer->Add(spin_ctrl(this, 1, 10000, &height), wxSizerFlags(1).Expand()); auto color_sizer = new wxBoxSizer(wxHORIZONTAL); auto color_btn = new ColourButton(this, wxSize(30, 17), false, color); color_sizer->Add(color_btn, wxSizerFlags().DoubleBorder(wxRIGHT)); color_sizer->Add(new wxCheckBox(this, -1, _("Checkerboard &pattern"), wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator(&pattern)), wxSizerFlags(1).Center()); sizer = new wxFlexGridSizer(2, 5, 5); AddCtrl(_("Video resolution:"), resolution_shortcuts(this, width, height)); AddCtrl("", res_sizer); AddCtrl(_("Color:"), color_sizer); AddCtrl(_("Frame rate (fps):"), spin_ctrl(this, .1, 1000.0, &fps)); AddCtrl(_("Duration (frames):"), spin_ctrl(this, 2, 36000000, &length)); // Ten hours of 1k FPS AddCtrl("", length_display = new wxStaticText(this, -1, "")); wxStdDialogButtonSizer *btn_sizer = CreateStdDialogButtonSizer(wxOK | wxCANCEL | wxHELP); btn_sizer->GetHelpButton()->Bind(wxEVT_BUTTON, std::bind(&HelpButton::OpenPage, "Dummy Video")); auto main_sizer = new wxBoxSizer(wxVERTICAL); main_sizer->Add(sizer, wxSizerFlags(1).Border().Expand()); main_sizer->Add(new wxStaticLine(this, wxHORIZONTAL), wxSizerFlags().HorzBorder().Expand()); main_sizer->Add(btn_sizer, wxSizerFlags().Expand().Border()); UpdateLengthDisplay(); SetSizerAndFit(main_sizer); CenterOnParent(); Bind(wxEVT_COMBOBOX, &DialogDummyVideo::OnResolutionShortcut, this); color_btn->Bind(EVT_COLOR, [=](wxThreadEvent& e) { color = color_btn->GetColor(); }); Bind(wxEVT_SPINCTRL, [=](wxCommandEvent&) { TransferDataFromWindow(); UpdateLengthDisplay(); }); }
/** * fügt ein EditCtrl hinzu. * * @author OLiver */ ctrlEdit *Window::AddEdit(unsigned int id, unsigned short x, unsigned short y, unsigned short width, unsigned short height, TextureColor tc, glArchivItem_Font *font, unsigned short maxlength, bool password, bool disabled, bool notify) { if(scale) { x = ScaleX(x); y = ScaleY(y); width = ScaleX(width); height = ScaleY(height); } return AddCtrl(id, new ctrlEdit(this, id, x, y, width, height, tc, font, maxlength, password, disabled, notify)); }
PageOneQualityParameters::PageOneQualityParameters(ModelReconstructionWizard *parent) : wxWizardPageSimple(parent) { ReconstructionUserPreferences_t defaultParameters; //Boite principale pour aligner les contrôles à gauche wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); //Ajout du "slider" AddCtrl(new wxSlider(this,WIZARD_CTRL_SLIDER_DEPTH,defaultParameters.depth,5,10,wxDefaultPosition,wxDefaultSize,wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS),_("Model solving"),mainSizer); //Ajout du choix du mode de triangularisation du modèle wxArrayString triangulationMethods; triangulationMethods.push_back(_("Marching cube")); //TRIANGULATION_METHOD_MARCHING_CUBE wxComboBox* triangulationMethod= new wxComboBox(this,WIZARD_CTRL_COMBO_TRIANGULATION_MODE,triangulationMethods[defaultParameters.triangulationMethod],wxDefaultPosition,wxDefaultSize,triangulationMethods); triangulationMethod->SetSelection(defaultParameters.triangulationMethod); AddCtrl(triangulationMethod,_("Triangulation method"),mainSizer); //Ajout de la liste déroulante du choix de la méthode adaptative wxArrayString adaptativeMethods; adaptativeMethods.push_back(_("None")); //ADAPTATIVE_MESH_METHOD_NONE adaptativeMethods.push_back(_("Vertices translation")); //ADAPTATIVE_MESH_METHOD_VERTICE_TRANSLATION wxComboBox* adaptativeMethod=new wxComboBox(this,WIZARD_CTRL_COMBO_ADAPTATIVE_REMESH_MODE,adaptativeMethods[defaultParameters.adaptativeMeshMethod],wxDefaultPosition,wxDefaultSize,adaptativeMethods); adaptativeMethod->SetSelection(defaultParameters.adaptativeMeshMethod); AddCtrl(adaptativeMethod,_("Remesh adaptation"),mainSizer); //Ajout de la liste déroulante du choix de la méthode de simplification wxArrayString simplificationMethods; simplificationMethods.push_back(_("Edge collapse")); //MESH_SIMPLIFICATION_METHOD_EDGE_COLLAPSE wxComboBox* simplificationMethod=new wxComboBox(this,WIZARD_CTRL_COMBO_SIMPLIFICATION_MODE,simplificationMethods[defaultParameters.meshSimplificationMethod],wxDefaultPosition,wxDefaultSize,simplificationMethods); simplificationMethod->SetSelection(defaultParameters.meshSimplificationMethod); AddCtrl(simplificationMethod,_("Reduction of the number of surfaces"),mainSizer); //Ajout du choix de la qualité min des triangles AddCtrl(new wxSlider(this,WIZARD_CTRL_SLIDER_TRIANGLE_QUALITY,(int)(defaultParameters.minTriangleQuality*100),0,62,wxDefaultPosition,wxDefaultSize,wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS),_("Quality constraint"),mainSizer); //Ajout du choix de l'approximation de la simplification AddCtrl(new wxSlider(this,WIZARD_CTRL_SLIDER_EPSILON_MERGE,(int)(defaultParameters.mergeEpsilon*1000),900,1000,wxDefaultPosition,wxDefaultSize,wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS),_("Approximation constraint"),mainSizer); //Finalisation de l'initialisation des contrôles SetSizer(mainSizer); mainSizer->Fit(this); }
CameraConfigDialogCtrlSet::CameraConfigDialogCtrlSet(wxWindow *pParent, GuideCamera *pCamera, AdvancedDialog *pAdvancedDialog, BrainCtrlIdMap& CtrlMap) : ConfigDialogCtrlSet(pParent, pAdvancedDialog, CtrlMap) { assert(pCamera); m_pCamera = pCamera; if (m_pCamera->HasSubframes) { m_pUseSubframes = new wxCheckBox(GetParentWindow(AD_cbUseSubFrames), wxID_ANY, _("Use Subframes")); AddCtrl(CtrlMap, AD_cbUseSubFrames, m_pUseSubframes, _("Check to only download subframes (ROIs). Sub-frame size is equal to search region size.")); } int numRows = (int)m_pCamera->HasGainControl + (int)m_pCamera->HasDelayParam + (int)m_pCamera->HasPortNum + 1; int width = StringWidth(_T("0000")) + 30; // Pixel size always m_pPixelSize = NewSpinnerDouble(GetParentWindow(AD_szPixelSize), width, m_pCamera->GetCameraPixelSize(), 0.0, 99.9, 0.1, _("Guide camera un-binned pixel size in microns. Used with the guide telescope focal length to display guiding error in arc-seconds.")); AddLabeledCtrl(CtrlMap, AD_szPixelSize, _("Pixel size"), m_pPixelSize, ""); // Gain control if (m_pCamera->HasGainControl) { int width = StringWidth(_T("0000")) + 30; m_pCameraGain = NewSpinnerInt(GetParentWindow(AD_szGain), width, 100, 0, 100, 1); AddLabeledCtrl(CtrlMap, AD_szGain, _("Camera gain"), m_pCameraGain, _("Camera gain, default = 95 % , lower if you experience noise or wish to guide on a very bright star. Not available on all cameras.")); } // Binning m_binning = 0; if (m_pCamera->MaxBinning > 1) { wxArrayString opts; m_pCamera->GetBinningOpts(&opts); int width = StringArrayWidth(opts); m_binning = new wxChoice(GetParentWindow(AD_binning), wxID_ANY, wxPoint(-1, -1), wxSize(width + 35, -1), opts); AddLabeledCtrl(CtrlMap, AD_binning, _("Binning"), m_binning, _("Camera pixel binning")); } // Delay parameter if (m_pCamera->HasDelayParam) { int width = StringWidth(_T("0000")) + 30; m_pDelay = NewSpinnerInt(GetParentWindow(AD_szDelay), width, 5, 0, 250, 150); AddLabeledCtrl(CtrlMap, AD_szDelay, _("Delay"), m_pDelay, _("LE Read Delay (ms) , Adjust if you get dropped frames")); } // Port number if (m_pCamera->HasPortNum) { wxString port_choices[] = { _T("Port 378"), _T("Port 3BC"), _T("Port 278"), _T("COM1"), _T("COM2"), _T("COM3"), _T("COM4"), _T("COM5"), _T("COM6"), _T("COM7"), _T("COM8"), _T("COM9"), _T("COM10"), _T("COM11"), _T("COM12"), _T("COM13"), _T("COM14"), _T("COM15"), _T("COM16"), }; int width = StringArrayWidth(port_choices, WXSIZEOF(port_choices)); m_pPortNum = new wxChoice(GetParentWindow(AD_szPort), wxID_ANY, wxPoint(-1, -1), wxSize(width + 35, -1), WXSIZEOF(port_choices), port_choices); AddLabeledCtrl(CtrlMap, AD_szPort, _("LE Port"), m_pPortNum, _("Port number for long-exposure control")); } if (m_pCamera->HasCooler) { wxSizer *sz = new wxBoxSizer(wxHORIZONTAL); m_coolerOn = new wxCheckBox(GetParentWindow(AD_cooler), wxID_ANY, _("Cooler On")); m_coolerOn->SetToolTip(_("Turn camera cooler on or off")); sz->Add(m_coolerOn, wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL).Border(wxRIGHT)); m_coolerSetpt = NewSpinnerInt(GetParentWindow(AD_szDelay), width, 5, -99, 99, 1); wxSizer *szt = MakeLabeledControl(AD_cooler, _("Set Temperature"), m_coolerSetpt, _("Cooler setpoint temperature")); sz->Add(szt, wxSizerFlags().Align(wxALIGN_CENTER_VERTICAL)); AddGroup(CtrlMap, AD_cooler, sz); } // Watchdog timeout { int width = StringWidth(_T("0000")) + 30; m_timeoutVal = NewSpinnerInt(GetParentWindow(AD_szCameraTimeout), width, 5, 5, 9999, 1); AddLabeledCtrl(CtrlMap, AD_szCameraTimeout, _("Disconnect nonresponsive\ncamera after (seconds)"), m_timeoutVal, wxString::Format(_("The camera will be disconnected if it fails to respond for this long. " "The default value, %d seconds, should be appropriate for most cameras."), DefaultGuideCameraTimeoutMs / 1000)); } }