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.

129 lines
6.8 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_move_exact_base.h"
  8. ///////////////////////////////////////////////////////////////////////////
  9. DIALOG_MOVE_EXACT_BASE::DIALOG_MOVE_EXACT_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. bMainSizer = new wxBoxSizer( wxVERTICAL );
  13. wxFlexGridSizer* fgInputSizer;
  14. fgInputSizer = new wxFlexGridSizer( 0, 4, 0, 5 );
  15. fgInputSizer->AddGrowableCol( 1 );
  16. fgInputSizer->SetFlexibleDirection( wxBOTH );
  17. fgInputSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
  18. m_xLabel = new wxStaticText( this, wxID_ANY, _("Move X:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
  19. m_xLabel->Wrap( -1 );
  20. fgInputSizer->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
  21. m_xEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
  22. fgInputSizer->Add( m_xEntry, 0, wxEXPAND|wxTOP, 5 );
  23. m_xUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
  24. m_xUnit->Wrap( -1 );
  25. fgInputSizer->Add( m_xUnit, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP|wxRIGHT, 5 );
  26. m_clearX = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
  27. fgInputSizer->Add( m_clearX, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
  28. m_yLabel = new wxStaticText( this, wxID_ANY, _("Move Y:"), wxDefaultPosition, wxDefaultSize, 0 );
  29. m_yLabel->Wrap( -1 );
  30. fgInputSizer->Add( m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
  31. m_yEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
  32. fgInputSizer->Add( m_yEntry, 0, wxEXPAND|wxTOP, 5 );
  33. m_yUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
  34. m_yUnit->Wrap( -1 );
  35. fgInputSizer->Add( m_yUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
  36. m_clearY = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
  37. fgInputSizer->Add( m_clearY, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
  38. m_rotLabel = new wxStaticText( this, wxID_ANY, _("Rotate:"), wxDefaultPosition, wxDefaultSize, 0 );
  39. m_rotLabel->Wrap( -1 );
  40. fgInputSizer->Add( m_rotLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
  41. m_rotEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
  42. fgInputSizer->Add( m_rotEntry, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
  43. m_rotUnit = new wxStaticText( this, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 );
  44. m_rotUnit->Wrap( -1 );
  45. fgInputSizer->Add( m_rotUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
  46. m_clearRot = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
  47. fgInputSizer->Add( m_clearRot, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
  48. fgInputSizer->Add( 0, 0, 1, wxEXPAND, 5 );
  49. wxString m_anchorOptionsChoices[] = { _("Rotate around center of selection"), _("Rotate around local coordinates origin"), _("Rotate around drill/place origin") };
  50. int m_anchorOptionsNChoices = sizeof( m_anchorOptionsChoices ) / sizeof( wxString );
  51. m_anchorOptions = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_anchorOptionsNChoices, m_anchorOptionsChoices, 0 );
  52. m_anchorOptions->SetSelection( 0 );
  53. fgInputSizer->Add( m_anchorOptions, 0, wxEXPAND|wxBOTTOM, 5 );
  54. bMainSizer->Add( fgInputSizer, 0, wxEXPAND|wxALL, 10 );
  55. m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
  56. bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
  57. wxBoxSizer* bBottomSizer;
  58. bBottomSizer = new wxBoxSizer( wxHORIZONTAL );
  59. m_polarCoords = new wxCheckBox( this, wxID_ANY, _("Use polar coordinates"), wxDefaultPosition, wxDefaultSize, 0 );
  60. bBottomSizer->Add( m_polarCoords, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
  61. m_stdButtons = new wxStdDialogButtonSizer();
  62. m_stdButtonsOK = new wxButton( this, wxID_OK );
  63. m_stdButtons->AddButton( m_stdButtonsOK );
  64. m_stdButtonsCancel = new wxButton( this, wxID_CANCEL );
  65. m_stdButtons->AddButton( m_stdButtonsCancel );
  66. m_stdButtons->Realize();
  67. bBottomSizer->Add( m_stdButtons, 1, wxALL|wxEXPAND, 5 );
  68. bMainSizer->Add( bBottomSizer, 0, wxEXPAND, 5 );
  69. this->SetSizer( bMainSizer );
  70. this->Layout();
  71. bMainSizer->Fit( this );
  72. // Connect Events
  73. m_xEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this );
  74. m_xEntry->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextChanged ), NULL, this );
  75. m_clearX->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this );
  76. m_yEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this );
  77. m_yEntry->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextChanged ), NULL, this );
  78. m_clearY->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this );
  79. m_rotEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this );
  80. m_clearRot->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this );
  81. m_polarCoords->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnPolarChanged ), NULL, this );
  82. }
  83. DIALOG_MOVE_EXACT_BASE::~DIALOG_MOVE_EXACT_BASE()
  84. {
  85. // Disconnect Events
  86. m_xEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this );
  87. m_xEntry->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextChanged ), NULL, this );
  88. m_clearX->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this );
  89. m_yEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this );
  90. m_yEntry->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextChanged ), NULL, this );
  91. m_clearY->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this );
  92. m_rotEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MOVE_EXACT_BASE::OnTextFocusLost ), NULL, this );
  93. m_clearRot->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnClear ), NULL, this );
  94. m_polarCoords->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_MOVE_EXACT_BASE::OnPolarChanged ), NULL, this );
  95. }