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.

167 lines
8.1 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version v3.8.0)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO *NOT* EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "dialog_position_relative_base.h"
  8. ///////////////////////////////////////////////////////////////////////////
  9. DIALOG_POSITION_RELATIVE_BASE::DIALOG_POSITION_RELATIVE_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( wxSize( -1,-1 ), wxDefaultSize );
  12. wxBoxSizer* bMainSizer;
  13. bMainSizer = new wxBoxSizer( wxVERTICAL );
  14. wxBoxSizer* bUpperSizer;
  15. bUpperSizer = new wxBoxSizer( wxVERTICAL );
  16. m_referenceInfo = new wxStaticText( this, wxID_ANY, _("Reference item: <none selected>"), wxDefaultPosition, wxDefaultSize, 0 );
  17. m_referenceInfo->Wrap( -1 );
  18. m_referenceInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
  19. m_referenceInfo->SetMinSize( wxSize( 340,-1 ) );
  20. bUpperSizer->Add( m_referenceInfo, 0, wxALL, 5 );
  21. bUpperSizer->Add( 0, 0, 0, wxEXPAND, 5 );
  22. wxBoxSizer* bSizerButtOpts;
  23. bSizerButtOpts = new wxBoxSizer( wxHORIZONTAL );
  24. m_user_origin_button = new wxButton( this, wxID_ANY, _("Use Local Origin"), wxDefaultPosition, wxDefaultSize, 0 );
  25. bSizerButtOpts->Add( m_user_origin_button, 1, wxALL|wxEXPAND, 5 );
  26. m_grid_origin_button = new wxButton( this, wxID_ANY, _("Use Grid Origin"), wxDefaultPosition, wxDefaultSize, 0 );
  27. bSizerButtOpts->Add( m_grid_origin_button, 1, wxALL|wxEXPAND, 5 );
  28. m_select_anchor_button = new wxButton( this, wxID_ANY, _("Select Item..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
  29. m_select_anchor_button->SetToolTip( _("Click and select a board item.\nThe anchor position will be the position of the selected item.") );
  30. bSizerButtOpts->Add( m_select_anchor_button, 1, wxALL|wxEXPAND, 5 );
  31. bUpperSizer->Add( bSizerButtOpts, 1, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
  32. wxBoxSizer* bSizer6;
  33. bSizer6 = new wxBoxSizer( wxVERTICAL );
  34. m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
  35. bSizer6->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
  36. bUpperSizer->Add( bSizer6, 0, wxEXPAND|wxTOP, 3 );
  37. bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxALL, 5 );
  38. wxFlexGridSizer* fgSizer2;
  39. fgSizer2 = new wxFlexGridSizer( 0, 5, 5, 0 );
  40. fgSizer2->AddGrowableCol( 1 );
  41. fgSizer2->SetFlexibleDirection( wxBOTH );
  42. fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
  43. m_xLabel = new wxStaticText( this, wxID_ANY, _("Offset X:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
  44. m_xLabel->Wrap( -1 );
  45. fgSizer2->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
  46. m_xEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
  47. fgSizer2->Add( m_xEntry, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
  48. m_xUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
  49. m_xUnit->Wrap( -1 );
  50. fgSizer2->Add( m_xUnit, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP|wxRIGHT, 5 );
  51. fgSizer2->Add( 10, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
  52. m_clearX = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
  53. fgSizer2->Add( m_clearX, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
  54. m_yLabel = new wxStaticText( this, wxID_ANY, _("Offset Y:"), wxDefaultPosition, wxDefaultSize, 0 );
  55. m_yLabel->Wrap( -1 );
  56. fgSizer2->Add( m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
  57. m_yEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
  58. fgSizer2->Add( m_yEntry, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
  59. m_yUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
  60. m_yUnit->Wrap( -1 );
  61. fgSizer2->Add( m_yUnit, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
  62. fgSizer2->Add( 10, 0, 1, wxEXPAND, 5 );
  63. m_clearY = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
  64. fgSizer2->Add( m_clearY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
  65. bMainSizer->Add( fgSizer2, 1, wxEXPAND|wxALL, 10 );
  66. wxBoxSizer* bSizer5;
  67. bSizer5 = new wxBoxSizer( wxVERTICAL );
  68. m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
  69. bSizer5->Add( m_staticline1, 0, wxEXPAND|wxALL, 5 );
  70. bMainSizer->Add( bSizer5, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
  71. wxBoxSizer* bSizerBottom;
  72. bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
  73. m_polarCoords = new wxCheckBox( this, wxID_ANY, _("Use polar coordinates"), wxDefaultPosition, wxDefaultSize, 0 );
  74. m_polarCoords->SetValue(true);
  75. bSizerBottom->Add( m_polarCoords, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
  76. bSizerBottom->Add( 40, 0, 1, wxEXPAND, 5 );
  77. m_stdButtons = new wxStdDialogButtonSizer();
  78. m_stdButtonsOK = new wxButton( this, wxID_OK );
  79. m_stdButtons->AddButton( m_stdButtonsOK );
  80. m_stdButtonsCancel = new wxButton( this, wxID_CANCEL );
  81. m_stdButtons->AddButton( m_stdButtonsCancel );
  82. m_stdButtons->Realize();
  83. bSizerBottom->Add( m_stdButtons, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
  84. bMainSizer->Add( bSizerBottom, 0, wxEXPAND|wxLEFT, 5 );
  85. this->SetSizer( bMainSizer );
  86. this->Layout();
  87. bMainSizer->Fit( this );
  88. // Connect Events
  89. this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClose ) );
  90. m_user_origin_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnUseUserOriginClick ), NULL, this );
  91. m_grid_origin_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnUseGridOriginClick ), NULL, this );
  92. m_select_anchor_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnSelectItemClick ), NULL, this );
  93. m_xEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
  94. m_clearX->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
  95. m_yEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
  96. m_clearY->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
  97. m_polarCoords->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnPolarChanged ), NULL, this );
  98. m_stdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnOkClick ), NULL, this );
  99. }
  100. DIALOG_POSITION_RELATIVE_BASE::~DIALOG_POSITION_RELATIVE_BASE()
  101. {
  102. // Disconnect Events
  103. this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClose ) );
  104. m_user_origin_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnUseUserOriginClick ), NULL, this );
  105. m_grid_origin_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnUseGridOriginClick ), NULL, this );
  106. m_select_anchor_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnSelectItemClick ), NULL, this );
  107. m_xEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
  108. m_clearX->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
  109. m_yEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
  110. m_clearY->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
  111. m_polarCoords->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnPolarChanged ), NULL, this );
  112. m_stdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnOkClick ), NULL, this );
  113. }