BoardPanel.hh 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // Copyright (C) 2015 Michael McMaster <michael@codesrc.com>
  2. //
  3. // This file is part of SCSI2SD.
  4. //
  5. // SCSI2SD is free software: you can redistribute it and/or modify
  6. // it under the terms of the GNU General Public License as published by
  7. // the Free Software Foundation, either version 3 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // SCSI2SD is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. // GNU General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU General Public License
  16. // along with SCSI2SD. If not, see <http://www.gnu.org/licenses/>.
  17. #ifndef BoardPanel_hh
  18. #define BoardPanel_hh
  19. #include "scsi2sd.h"
  20. #include <wx/wx.h>
  21. #include <wx/valnum.h>
  22. #include <wx/checkbox.h>
  23. #include <wx/choice.h>
  24. #include <wx/spinctrl.h>
  25. #include <wx/textctrl.h>
  26. #if __cplusplus >= 201103L
  27. #include <cstdint>
  28. #else
  29. #include <stdint.h>
  30. #endif
  31. #include <utility>
  32. namespace SCSI2SD
  33. {
  34. class BoardPanel : public wxPanel
  35. {
  36. public:
  37. BoardPanel(wxWindow* parent, const BoardConfig& initialConfig);
  38. BoardConfig getConfig() const;
  39. void setConfig(const BoardConfig& config);
  40. private:
  41. void initConfig();
  42. enum
  43. {
  44. ID_parityCtrl = wxID_HIGHEST + 1,
  45. ID_unitAttCtrl,
  46. ID_scsi2Ctrl,
  47. ID_glitchCtrl,
  48. ID_cacheCtrl,
  49. ID_disconnectCtrl,
  50. ID_startDelayCtrl,
  51. ID_selDelayCtrl
  52. };
  53. wxWindow* myParent;
  54. BoardConfig myConfig;
  55. wxCheckBox* myParityCtrl;
  56. wxCheckBox* myUnitAttCtrl;
  57. wxCheckBox* myScsi2Ctrl;
  58. wxCheckBox* myGlitchCtrl;
  59. wxCheckBox* myCacheCtrl;
  60. wxCheckBox* myDisconnectCtrl;
  61. wxIntegerValidator<uint8_t>* myDelayValidator;
  62. wxTextCtrl* myStartDelayCtrl;
  63. wxTextCtrl* mySelDelayCtrl;
  64. };
  65. } // namespace SCSI2SD
  66. #endif