You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

136 lines
7.0 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version Oct 8 2012)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO "NOT" EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "gerbview_dialog_display_options_frame_base.h"
  8. ///////////////////////////////////////////////////////////////////////////
  9. DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
  10. {
  11. this->SetSizeHints( wxDefaultSize, wxDefaultSize );
  12. wxBoxSizer* bDialogSizer;
  13. bDialogSizer = new wxBoxSizer( wxVERTICAL );
  14. wxBoxSizer* bUpperSizer;
  15. bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
  16. wxBoxSizer* bLeftSizer;
  17. bLeftSizer = new wxBoxSizer( wxVERTICAL );
  18. wxString m_PolarDisplayChoices[] = { _("Rectangular"), _("Polar") };
  19. int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
  20. m_PolarDisplay = new wxRadioBox( this, wxID_ANY, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
  21. m_PolarDisplay->SetSelection( 0 );
  22. bLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 );
  23. wxString m_BoxUnitsChoices[] = { _("Inches"), _("Millimeters") };
  24. int m_BoxUnitsNChoices = sizeof( m_BoxUnitsChoices ) / sizeof( wxString );
  25. m_BoxUnits = new wxRadioBox( this, wxID_ANY, _("Units"), wxDefaultPosition, wxDefaultSize, m_BoxUnitsNChoices, m_BoxUnitsChoices, 1, wxRA_SPECIFY_COLS );
  26. m_BoxUnits->SetSelection( 0 );
  27. bLeftSizer->Add( m_BoxUnits, 0, wxALL|wxEXPAND, 5 );
  28. wxString m_CursorShapeChoices[] = { _("Small"), _("Large") };
  29. int m_CursorShapeNChoices = sizeof( m_CursorShapeChoices ) / sizeof( wxString );
  30. m_CursorShape = new wxRadioBox( this, wxID_ANY, _("Cursor"), wxDefaultPosition, wxDefaultSize, m_CursorShapeNChoices, m_CursorShapeChoices, 1, wxRA_SPECIFY_COLS );
  31. m_CursorShape->SetSelection( 1 );
  32. bLeftSizer->Add( m_CursorShape, 0, wxALL|wxEXPAND, 5 );
  33. m_OptDisplayDCodes = new wxCheckBox( this, wxID_ANY, _("Show D codes"), wxDefaultPosition, wxDefaultSize, 0 );
  34. m_OptDisplayDCodes->SetValue(true);
  35. bLeftSizer->Add( m_OptDisplayDCodes, 0, wxALL, 5 );
  36. bUpperSizer->Add( bLeftSizer, 1, wxALL|wxEXPAND, 5 );
  37. wxBoxSizer* bMiddleSizer;
  38. bMiddleSizer = new wxBoxSizer( wxVERTICAL );
  39. wxString m_OptDisplayLinesChoices[] = { _("Sketch"), _("Filled") };
  40. int m_OptDisplayLinesNChoices = sizeof( m_OptDisplayLinesChoices ) / sizeof( wxString );
  41. m_OptDisplayLines = new wxRadioBox( this, wxID_ANY, _("Lines"), wxDefaultPosition, wxDefaultSize, m_OptDisplayLinesNChoices, m_OptDisplayLinesChoices, 1, wxRA_SPECIFY_COLS );
  42. m_OptDisplayLines->SetSelection( 1 );
  43. bMiddleSizer->Add( m_OptDisplayLines, 0, wxALL|wxEXPAND, 5 );
  44. wxString m_OptDisplayFlashedItemsChoices[] = { _("Sketch"), _("Filled") };
  45. int m_OptDisplayFlashedItemsNChoices = sizeof( m_OptDisplayFlashedItemsChoices ) / sizeof( wxString );
  46. m_OptDisplayFlashedItems = new wxRadioBox( this, wxID_ANY, _("Pads"), wxDefaultPosition, wxDefaultSize, m_OptDisplayFlashedItemsNChoices, m_OptDisplayFlashedItemsChoices, 1, wxRA_SPECIFY_COLS );
  47. m_OptDisplayFlashedItems->SetSelection( 1 );
  48. bMiddleSizer->Add( m_OptDisplayFlashedItems, 0, wxALL|wxEXPAND, 5 );
  49. wxString m_OptDisplayPolygonsChoices[] = { _("Sketch"), _("Filled") };
  50. int m_OptDisplayPolygonsNChoices = sizeof( m_OptDisplayPolygonsChoices ) / sizeof( wxString );
  51. m_OptDisplayPolygons = new wxRadioBox( this, wxID_ANY, _("Polygons"), wxDefaultPosition, wxDefaultSize, m_OptDisplayPolygonsNChoices, m_OptDisplayPolygonsChoices, 1, wxRA_SPECIFY_COLS );
  52. m_OptDisplayPolygons->SetSelection( 1 );
  53. bMiddleSizer->Add( m_OptDisplayPolygons, 0, wxALL|wxEXPAND, 5 );
  54. bUpperSizer->Add( bMiddleSizer, 1, wxALL|wxEXPAND, 5 );
  55. wxBoxSizer* bRightSizer;
  56. bRightSizer = new wxBoxSizer( wxVERTICAL );
  57. wxString m_ShowPageLimitsChoices[] = { _("Full size without limits"), _("Full size"), _("Size A4"), _("Size A3"), _("Size A2"), _("Size A"), _("Size B"), _("Size C") };
  58. int m_ShowPageLimitsNChoices = sizeof( m_ShowPageLimitsChoices ) / sizeof( wxString );
  59. m_ShowPageLimits = new wxRadioBox( this, wxID_ANY, _("Page"), wxDefaultPosition, wxDefaultSize, m_ShowPageLimitsNChoices, m_ShowPageLimitsChoices, 1, wxRA_SPECIFY_COLS );
  60. m_ShowPageLimits->SetSelection( 0 );
  61. bRightSizer->Add( m_ShowPageLimits, 0, wxALL|wxEXPAND, 5 );
  62. wxStaticBoxSizer* bLeftBottomSizer;
  63. bLeftBottomSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pan and Zoom") ), wxVERTICAL );
  64. m_OptZoomNoCenter = new wxCheckBox( this, wxID_ANY, _("Do not center and warp cursor on zoom"), wxDefaultPosition, wxDefaultSize, 0 );
  65. m_OptZoomNoCenter->SetToolTip( _("Keep the cursor at its current location when zooming") );
  66. bLeftBottomSizer->Add( m_OptZoomNoCenter, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
  67. m_OptMiddleButtonPan = new wxCheckBox( this, wxID_ANY, _("Use middle mouse button to pan"), wxDefaultPosition, wxDefaultSize, 0 );
  68. bLeftBottomSizer->Add( m_OptMiddleButtonPan, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
  69. m_OptMiddleButtonPanLimited = new wxCheckBox( this, wxID_ANY, _("Limit panning to scroll size"), wxDefaultPosition, wxDefaultSize, 0 );
  70. bLeftBottomSizer->Add( m_OptMiddleButtonPanLimited, 0, wxALL, 5 );
  71. bRightSizer->Add( bLeftBottomSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
  72. bUpperSizer->Add( bRightSizer, 2, wxALL|wxEXPAND, 5 );
  73. bDialogSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
  74. m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
  75. bDialogSizer->Add( m_staticline1, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
  76. m_sdbSizer1 = new wxStdDialogButtonSizer();
  77. m_sdbSizer1OK = new wxButton( this, wxID_OK );
  78. m_sdbSizer1->AddButton( m_sdbSizer1OK );
  79. m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
  80. m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
  81. m_sdbSizer1->Realize();
  82. bDialogSizer->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
  83. this->SetSizer( bDialogSizer );
  84. this->Layout();
  85. bDialogSizer->Fit( this );
  86. // Connect Events
  87. m_OptMiddleButtonPan->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnMiddleBtnPanEnbl ), NULL, this );
  88. m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelButtonClick ), NULL, this );
  89. m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOKBUttonClick ), NULL, this );
  90. }
  91. DIALOG_DISPLAY_OPTIONS_BASE::~DIALOG_DISPLAY_OPTIONS_BASE()
  92. {
  93. // Disconnect Events
  94. m_OptMiddleButtonPan->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnMiddleBtnPanEnbl ), NULL, this );
  95. m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelButtonClick ), NULL, this );
  96. m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOKBUttonClick ), NULL, this );
  97. }