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.

203 lines
11 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO *NOT* EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "widgets/std_bitmap_button.h"
  8. #include "panel_grid_settings_base.h"
  9. ///////////////////////////////////////////////////////////////////////////
  10. PANEL_GRID_SETTINGS_BASE::PANEL_GRID_SETTINGS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : RESETTABLE_PANEL( parent, id, pos, size, style, name )
  11. {
  12. wxBoxSizer* bSizerMain;
  13. bSizerMain = new wxBoxSizer( wxVERTICAL );
  14. wxBoxSizer* bSizerColumns;
  15. bSizerColumns = new wxBoxSizer( wxHORIZONTAL );
  16. wxBoxSizer* bSizerLeftCol;
  17. bSizerLeftCol = new wxBoxSizer( wxVERTICAL );
  18. m_gridsLabel = new wxStaticText( this, wxID_ANY, _("Grids"), wxDefaultPosition, wxDefaultSize, 0 );
  19. m_gridsLabel->Wrap( -1 );
  20. bSizerLeftCol->Add( m_gridsLabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
  21. m_currentGridCtrl = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
  22. m_currentGridCtrl->SetMinSize( wxSize( 240,-1 ) );
  23. bSizerLeftCol->Add( m_currentGridCtrl, 1, wxEXPAND|wxBOTTOM|wxLEFT, 3 );
  24. wxBoxSizer* bSizerGridButtons;
  25. bSizerGridButtons = new wxBoxSizer( wxHORIZONTAL );
  26. m_addGridButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
  27. bSizerGridButtons->Add( m_addGridButton, 0, wxRIGHT|wxLEFT, 5 );
  28. m_editGridButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
  29. bSizerGridButtons->Add( m_editGridButton, 0, wxRIGHT, 5 );
  30. m_moveUpButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
  31. bSizerGridButtons->Add( m_moveUpButton, 0, wxRIGHT, 5 );
  32. m_moveDownButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
  33. bSizerGridButtons->Add( m_moveDownButton, 0, 0, 5 );
  34. bSizerGridButtons->Add( 25, 0, 0, wxEXPAND, 5 );
  35. m_removeGridButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
  36. bSizerGridButtons->Add( m_removeGridButton, 0, 0, 5 );
  37. bSizerLeftCol->Add( bSizerGridButtons, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
  38. bSizerColumns->Add( bSizerLeftCol, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
  39. bSizerColumns->Add( 16, 0, 0, wxEXPAND, 5 );
  40. wxBoxSizer* bSizerRightCol;
  41. bSizerRightCol = new wxBoxSizer( wxVERTICAL );
  42. m_staticText21 = new wxStaticText( this, wxID_ANY, _("Fast Grid Switching"), wxDefaultPosition, wxDefaultSize, 0 );
  43. m_staticText21->Wrap( -1 );
  44. bSizerRightCol->Add( m_staticText21, 0, wxRIGHT|wxLEFT, 12 );
  45. m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
  46. bSizerRightCol->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
  47. wxFlexGridSizer* fgSizer3;
  48. fgSizer3 = new wxFlexGridSizer( 2, 3, 6, 5 );
  49. fgSizer3->AddGrowableCol( 1 );
  50. fgSizer3->SetFlexibleDirection( wxBOTH );
  51. fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
  52. m_staticTextGrid1 = new wxStaticText( this, wxID_ANY, _("Grid 1:"), wxDefaultPosition, wxDefaultSize, 0 );
  53. m_staticTextGrid1->Wrap( -1 );
  54. fgSizer3->Add( m_staticTextGrid1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 8 );
  55. wxArrayString m_grid1CtrlChoices;
  56. m_grid1Ctrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_grid1CtrlChoices, 0 );
  57. m_grid1Ctrl->SetSelection( 0 );
  58. fgSizer3->Add( m_grid1Ctrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
  59. m_grid1HotKey = new wxStaticText( this, wxID_ANY, _("(hotkey)"), wxDefaultPosition, wxDefaultSize, 0 );
  60. m_grid1HotKey->Wrap( -1 );
  61. fgSizer3->Add( m_grid1HotKey, 0, wxALIGN_CENTER_VERTICAL, 5 );
  62. m_staticTextGrid2 = new wxStaticText( this, wxID_ANY, _("Grid 2:"), wxDefaultPosition, wxDefaultSize, 0 );
  63. m_staticTextGrid2->Wrap( -1 );
  64. fgSizer3->Add( m_staticTextGrid2, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 8 );
  65. wxArrayString m_grid2CtrlChoices;
  66. m_grid2Ctrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_grid2CtrlChoices, 0 );
  67. m_grid2Ctrl->SetSelection( 0 );
  68. fgSizer3->Add( m_grid2Ctrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
  69. m_grid2HotKey = new wxStaticText( this, wxID_ANY, _("(hotkey)"), wxDefaultPosition, wxDefaultSize, 0 );
  70. m_grid2HotKey->Wrap( -1 );
  71. fgSizer3->Add( m_grid2HotKey, 0, wxALIGN_CENTER_VERTICAL, 5 );
  72. bSizerRightCol->Add( fgSizer3, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 10 );
  73. m_overridesLabel = new wxStaticText( this, wxID_ANY, _("Grid Overrides"), wxDefaultPosition, wxDefaultSize, 0 );
  74. m_overridesLabel->Wrap( -1 );
  75. bSizerRightCol->Add( m_overridesLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
  76. m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
  77. bSizerRightCol->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
  78. wxFlexGridSizer* fgGridOverrides;
  79. fgGridOverrides = new wxFlexGridSizer( 0, 2, 4, 0 );
  80. fgGridOverrides->AddGrowableCol( 1 );
  81. fgGridOverrides->SetFlexibleDirection( wxBOTH );
  82. fgGridOverrides->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
  83. m_checkGridOverrideConnected = new wxCheckBox( this, wxID_ANY, _("Connected items:"), wxDefaultPosition, wxDefaultSize, 0 );
  84. fgGridOverrides->Add( m_checkGridOverrideConnected, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT, 8 );
  85. wxArrayString m_gridOverrideConnectedChoiceChoices;
  86. m_gridOverrideConnectedChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_gridOverrideConnectedChoiceChoices, 0 );
  87. m_gridOverrideConnectedChoice->SetSelection( 0 );
  88. fgGridOverrides->Add( m_gridOverrideConnectedChoice, 0, wxALL, 5 );
  89. m_checkGridOverrideWires = new wxCheckBox( this, wxID_ANY, _("Wires:"), wxDefaultPosition, wxDefaultSize, 0 );
  90. fgGridOverrides->Add( m_checkGridOverrideWires, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT, 8 );
  91. wxArrayString m_gridOverrideWiresChoiceChoices;
  92. m_gridOverrideWiresChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_gridOverrideWiresChoiceChoices, 0 );
  93. m_gridOverrideWiresChoice->SetSelection( 0 );
  94. fgGridOverrides->Add( m_gridOverrideWiresChoice, 0, wxALL, 5 );
  95. m_checkGridOverrideVias = new wxCheckBox( this, wxID_ANY, _("Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
  96. fgGridOverrides->Add( m_checkGridOverrideVias, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT, 8 );
  97. wxArrayString m_gridOverrideViasChoiceChoices;
  98. m_gridOverrideViasChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_gridOverrideViasChoiceChoices, 0 );
  99. m_gridOverrideViasChoice->SetSelection( 0 );
  100. fgGridOverrides->Add( m_gridOverrideViasChoice, 0, wxALL, 5 );
  101. m_checkGridOverrideText = new wxCheckBox( this, wxID_ANY, _("Text:"), wxDefaultPosition, wxDefaultSize, 0 );
  102. fgGridOverrides->Add( m_checkGridOverrideText, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT, 8 );
  103. wxArrayString m_gridOverrideTextChoiceChoices;
  104. m_gridOverrideTextChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_gridOverrideTextChoiceChoices, 0 );
  105. m_gridOverrideTextChoice->SetSelection( 0 );
  106. fgGridOverrides->Add( m_gridOverrideTextChoice, 0, wxALL, 5 );
  107. m_checkGridOverrideGraphics = new wxCheckBox( this, wxID_ANY, _("Graphics:"), wxDefaultPosition, wxDefaultSize, 0 );
  108. fgGridOverrides->Add( m_checkGridOverrideGraphics, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT, 8 );
  109. wxArrayString m_gridOverrideGraphicsChoiceChoices;
  110. m_gridOverrideGraphicsChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_gridOverrideGraphicsChoiceChoices, 0 );
  111. m_gridOverrideGraphicsChoice->SetSelection( 0 );
  112. fgGridOverrides->Add( m_gridOverrideGraphicsChoice, 0, wxALL, 5 );
  113. bSizerRightCol->Add( fgGridOverrides, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 10 );
  114. bSizerColumns->Add( bSizerRightCol, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
  115. bSizerMain->Add( bSizerColumns, 1, wxEXPAND|wxTOP, 8 );
  116. this->SetSizer( bSizerMain );
  117. this->Layout();
  118. bSizerMain->Fit( this );
  119. // Connect Events
  120. m_currentGridCtrl->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( PANEL_GRID_SETTINGS_BASE::OnEditGrid ), NULL, this );
  121. m_addGridButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_GRID_SETTINGS_BASE::OnAddGrid ), NULL, this );
  122. m_editGridButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_GRID_SETTINGS_BASE::OnEditGrid ), NULL, this );
  123. m_editGridButton->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_GRID_SETTINGS_BASE::OnUpdateEditGrid ), NULL, this );
  124. m_moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_GRID_SETTINGS_BASE::OnMoveGridUp ), NULL, this );
  125. m_moveUpButton->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_GRID_SETTINGS_BASE::OnUpdateMoveUp ), NULL, this );
  126. m_moveDownButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_GRID_SETTINGS_BASE::OnMoveGridDown ), NULL, this );
  127. m_moveDownButton->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_GRID_SETTINGS_BASE::OnUpdateMoveDown ), NULL, this );
  128. m_removeGridButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_GRID_SETTINGS_BASE::OnRemoveGrid ), NULL, this );
  129. m_removeGridButton->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_GRID_SETTINGS_BASE::OnUpdateRemove ), NULL, this );
  130. }
  131. PANEL_GRID_SETTINGS_BASE::~PANEL_GRID_SETTINGS_BASE()
  132. {
  133. // Disconnect Events
  134. m_currentGridCtrl->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( PANEL_GRID_SETTINGS_BASE::OnEditGrid ), NULL, this );
  135. m_addGridButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_GRID_SETTINGS_BASE::OnAddGrid ), NULL, this );
  136. m_editGridButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_GRID_SETTINGS_BASE::OnEditGrid ), NULL, this );
  137. m_editGridButton->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_GRID_SETTINGS_BASE::OnUpdateEditGrid ), NULL, this );
  138. m_moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_GRID_SETTINGS_BASE::OnMoveGridUp ), NULL, this );
  139. m_moveUpButton->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_GRID_SETTINGS_BASE::OnUpdateMoveUp ), NULL, this );
  140. m_moveDownButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_GRID_SETTINGS_BASE::OnMoveGridDown ), NULL, this );
  141. m_moveDownButton->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_GRID_SETTINGS_BASE::OnUpdateMoveDown ), NULL, this );
  142. m_removeGridButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_GRID_SETTINGS_BASE::OnRemoveGrid ), NULL, this );
  143. m_removeGridButton->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_GRID_SETTINGS_BASE::OnUpdateRemove ), NULL, this );
  144. }