2017-05-10 13:55:03 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2018-06-12 07:36:35 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
2017-05-10 13:55:03 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
2018-06-12 07:36:35 +00:00
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
2017-05-10 13:55:03 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "dialog_position_relative_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
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 )
|
|
|
|
{
|
|
|
|
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
|
|
|
|
|
|
|
|
wxBoxSizer* bMainSizer;
|
|
|
|
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
2018-06-12 07:36:35 +00:00
|
|
|
wxBoxSizer* bUpperSizer;
|
|
|
|
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
|
2018-05-18 11:24:02 +00:00
|
|
|
|
2018-06-12 07:36:35 +00:00
|
|
|
m_referenceInfo = new wxStaticText( this, wxID_ANY, _("Reference item: <none selected>"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_referenceInfo->Wrap( -1 );
|
|
|
|
m_referenceInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
|
|
|
|
m_referenceInfo->SetMinSize( wxSize( 340,-1 ) );
|
|
|
|
|
|
|
|
bUpperSizer->Add( m_referenceInfo, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
bUpperSizer->Add( 0, 0, 1, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
m_select_anchor_button = new wxButton( this, wxID_ANY, _("Select"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
|
|
|
m_select_anchor_button->SetToolTip( _("Click and select a board item.\nThe anchor position will be the position of the selected item.") );
|
|
|
|
|
|
|
|
bUpperSizer->Add( m_select_anchor_button, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
2018-05-18 11:24:02 +00:00
|
|
|
|
2018-06-12 07:36:35 +00:00
|
|
|
|
|
|
|
bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxALL, 10 );
|
|
|
|
|
|
|
|
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
|
|
|
bMainSizer->Add( m_staticline2, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
2017-05-10 13:55:03 +00:00
|
|
|
|
|
|
|
wxFlexGridSizer* fgSizer2;
|
2018-06-12 07:36:35 +00:00
|
|
|
fgSizer2 = new wxFlexGridSizer( 0, 5, 5, 0 );
|
2017-05-10 13:55:03 +00:00
|
|
|
fgSizer2->AddGrowableCol( 1 );
|
|
|
|
fgSizer2->SetFlexibleDirection( wxBOTH );
|
|
|
|
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
|
|
|
|
2018-06-12 07:36:35 +00:00
|
|
|
m_xLabel = new wxStaticText( this, wxID_ANY, _("Offset X:"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
2017-05-10 13:55:03 +00:00
|
|
|
m_xLabel->Wrap( -1 );
|
2018-06-12 07:36:35 +00:00
|
|
|
fgSizer2->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
|
2017-05-10 13:55:03 +00:00
|
|
|
|
2018-06-12 07:36:35 +00:00
|
|
|
m_xEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
fgSizer2->Add( m_xEntry, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
2017-05-10 13:55:03 +00:00
|
|
|
|
|
|
|
m_xUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_xUnit->Wrap( -1 );
|
2018-06-12 07:36:35 +00:00
|
|
|
fgSizer2->Add( m_xUnit, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxTOP|wxRIGHT, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
fgSizer2->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
2017-05-10 13:55:03 +00:00
|
|
|
|
|
|
|
m_clearX = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
2018-06-12 07:36:35 +00:00
|
|
|
fgSizer2->Add( m_clearX, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
2017-05-10 13:55:03 +00:00
|
|
|
|
2018-06-12 07:36:35 +00:00
|
|
|
m_yLabel = new wxStaticText( this, wxID_ANY, _("Offset Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2017-05-10 13:55:03 +00:00
|
|
|
m_yLabel->Wrap( -1 );
|
2018-06-12 07:36:35 +00:00
|
|
|
fgSizer2->Add( m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
2017-05-10 13:55:03 +00:00
|
|
|
|
2018-06-12 07:36:35 +00:00
|
|
|
m_yEntry = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
fgSizer2->Add( m_yEntry, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2017-05-10 13:55:03 +00:00
|
|
|
|
|
|
|
m_yUnit = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_yUnit->Wrap( -1 );
|
2018-06-12 07:36:35 +00:00
|
|
|
fgSizer2->Add( m_yUnit, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
2017-05-10 13:55:03 +00:00
|
|
|
|
|
|
|
|
2018-06-12 07:36:35 +00:00
|
|
|
fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
|
2017-05-10 13:55:03 +00:00
|
|
|
|
2018-06-12 07:36:35 +00:00
|
|
|
m_clearY = new wxButton( this, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
|
|
|
fgSizer2->Add( m_clearY, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2017-05-10 13:55:03 +00:00
|
|
|
|
|
|
|
|
2018-06-12 07:36:35 +00:00
|
|
|
bMainSizer->Add( fgSizer2, 1, wxEXPAND|wxALL, 10 );
|
2017-05-10 13:55:03 +00:00
|
|
|
|
|
|
|
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
2018-06-12 07:36:35 +00:00
|
|
|
bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
2017-05-10 13:55:03 +00:00
|
|
|
|
2018-05-18 11:24:02 +00:00
|
|
|
wxBoxSizer* bSizerBottom;
|
|
|
|
bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
2018-06-12 07:36:35 +00:00
|
|
|
m_polarCoords = new wxCheckBox( this, wxID_ANY, _("Use polar coordinates"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_polarCoords->SetValue(true);
|
|
|
|
bSizerBottom->Add( m_polarCoords, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2017-05-10 13:55:03 +00:00
|
|
|
|
|
|
|
m_stdButtons = new wxStdDialogButtonSizer();
|
|
|
|
m_stdButtonsOK = new wxButton( this, wxID_OK );
|
|
|
|
m_stdButtons->AddButton( m_stdButtonsOK );
|
|
|
|
m_stdButtonsCancel = new wxButton( this, wxID_CANCEL );
|
|
|
|
m_stdButtons->AddButton( m_stdButtonsCancel );
|
|
|
|
m_stdButtons->Realize();
|
|
|
|
|
2018-06-12 07:36:35 +00:00
|
|
|
bSizerBottom->Add( m_stdButtons, 1, wxALL|wxEXPAND, 5 );
|
2018-05-18 11:24:02 +00:00
|
|
|
|
|
|
|
|
2018-06-12 07:36:35 +00:00
|
|
|
bMainSizer->Add( bSizerBottom, 0, wxEXPAND|wxLEFT, 5 );
|
2017-05-10 13:55:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
this->SetSizer( bMainSizer );
|
|
|
|
this->Layout();
|
|
|
|
bMainSizer->Fit( this );
|
|
|
|
|
|
|
|
// Connect Events
|
|
|
|
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClose ) );
|
2018-06-12 07:36:35 +00:00
|
|
|
m_select_anchor_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnSelectItemClick ), NULL, this );
|
2017-05-10 13:55:03 +00:00
|
|
|
m_xEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
|
|
|
|
m_clearX->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
|
|
|
|
m_yEntry->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
|
|
|
|
m_clearY->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
|
2018-06-12 07:36:35 +00:00
|
|
|
m_polarCoords->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnPolarChanged ), NULL, this );
|
2017-05-10 13:55:03 +00:00
|
|
|
m_stdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnOkClick ), NULL, this );
|
|
|
|
}
|
|
|
|
|
|
|
|
DIALOG_POSITION_RELATIVE_BASE::~DIALOG_POSITION_RELATIVE_BASE()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
|
|
|
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClose ) );
|
2018-06-12 07:36:35 +00:00
|
|
|
m_select_anchor_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnSelectItemClick ), NULL, this );
|
2017-05-10 13:55:03 +00:00
|
|
|
m_xEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
|
|
|
|
m_clearX->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
|
|
|
|
m_yEntry->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnTextFocusLost ), NULL, this );
|
|
|
|
m_clearY->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnClear ), NULL, this );
|
2018-06-12 07:36:35 +00:00
|
|
|
m_polarCoords->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnPolarChanged ), NULL, this );
|
2017-05-10 13:55:03 +00:00
|
|
|
m_stdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_POSITION_RELATIVE_BASE::OnOkClick ), NULL, this );
|
|
|
|
|
|
|
|
}
|