Eeschema: Minor changes in dialogs to ensure a better likeness between dialogs on Linux and Windows (mainly, remove some useless wxStaticBoxSizer in dialogs)
Update Clipper version.
This commit is contained in:
commit
f4d6430eb0
|
@ -102,18 +102,9 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( wxWindow
|
||||||
columnLabel.SetText( _( "Value" ) );
|
columnLabel.SetText( _( "Value" ) );
|
||||||
fieldListCtrl->InsertColumn( 1, columnLabel );
|
fieldListCtrl->InsertColumn( 1, columnLabel );
|
||||||
|
|
||||||
wxString label = _( "Size" ) + ReturnUnitSymbol( g_UserUnit );
|
m_staticTextUnitSize->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
|
||||||
textSizeLabel->SetLabel( label );
|
m_staticTextUnitPosX->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
|
||||||
|
m_staticTextUnitPosY->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
|
||||||
label = _( "Pos " );
|
|
||||||
label += _( "X" );
|
|
||||||
label += ReturnUnitSymbol( g_UserUnit );
|
|
||||||
posXLabel->SetLabel( label );
|
|
||||||
|
|
||||||
label = _( "Pos " );
|
|
||||||
label += _( "Y" );
|
|
||||||
label += ReturnUnitSymbol( g_UserUnit );
|
|
||||||
posYLabel->SetLabel( label );
|
|
||||||
|
|
||||||
copySelectedFieldToPanel();
|
copySelectedFieldToPanel();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Jun 30 2011)
|
// C++ code generated with wxFormBuilder (version Oct 8 2012)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
@ -20,18 +20,17 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
|
||||||
upperSizer = new wxBoxSizer( wxHORIZONTAL );
|
upperSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
wxStaticBoxSizer* optionsSizer;
|
wxStaticBoxSizer* optionsSizer;
|
||||||
optionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
|
optionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Component") ), wxVERTICAL );
|
||||||
|
|
||||||
wxStaticBoxSizer* unitSizer;
|
m_staticTextUnit = new wxStaticText( this, wxID_ANY, _("Unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
unitSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Unit") ), wxVERTICAL );
|
m_staticTextUnit->Wrap( -1 );
|
||||||
|
optionsSizer->Add( m_staticTextUnit, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
wxString unitChoiceChoices[] = { _("1"), _("2"), _("3"), _("4"), _("5"), _("6"), _("7"), _("8"), _("9"), _("10"), _("11"), _("12"), _("13"), _("14"), _("15"), _("16"), _("17"), _("18"), _("19"), _("20"), _("21"), _("22"), _("23"), _("24"), _("25"), _("26") };
|
wxString unitChoiceChoices[] = { _("1"), _("2"), _("3"), _("4"), _("5"), _("6"), _("7"), _("8"), _("9"), _("10"), _("11"), _("12"), _("13"), _("14"), _("15"), _("16"), _("17"), _("18"), _("19"), _("20"), _("21"), _("22"), _("23"), _("24"), _("25"), _("26") };
|
||||||
int unitChoiceNChoices = sizeof( unitChoiceChoices ) / sizeof( wxString );
|
int unitChoiceNChoices = sizeof( unitChoiceChoices ) / sizeof( wxString );
|
||||||
unitChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, unitChoiceNChoices, unitChoiceChoices, 0 );
|
unitChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, unitChoiceNChoices, unitChoiceChoices, 0 );
|
||||||
unitChoice->SetSelection( 0 );
|
unitChoice->SetSelection( 0 );
|
||||||
unitSizer->Add( unitChoice, 0, wxALL|wxEXPAND, 5 );
|
optionsSizer->Add( unitChoice, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
optionsSizer->Add( unitSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
|
|
||||||
|
|
||||||
wxBoxSizer* orientationSizer;
|
wxBoxSizer* orientationSizer;
|
||||||
orientationSizer = new wxBoxSizer( wxHORIZONTAL );
|
orientationSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
@ -44,6 +43,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
|
||||||
|
|
||||||
orientationSizer->Add( orientationRadioBox, 1, wxALL|wxEXPAND, 8 );
|
orientationSizer->Add( orientationRadioBox, 1, wxALL|wxEXPAND, 8 );
|
||||||
|
|
||||||
|
|
||||||
optionsSizer->Add( orientationSizer, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 0 );
|
optionsSizer->Add( orientationSizer, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 0 );
|
||||||
|
|
||||||
wxBoxSizer* mirrorSizer;
|
wxBoxSizer* mirrorSizer;
|
||||||
|
@ -57,18 +57,18 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
|
||||||
|
|
||||||
mirrorSizer->Add( mirrorRadioBox, 1, wxALL, 8 );
|
mirrorSizer->Add( mirrorRadioBox, 1, wxALL, 8 );
|
||||||
|
|
||||||
|
|
||||||
optionsSizer->Add( mirrorSizer, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 0 );
|
optionsSizer->Add( mirrorSizer, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 0 );
|
||||||
|
|
||||||
wxStaticBoxSizer* chipnameSizer;
|
m_staticTextChipname = new wxStaticText( this, wxID_ANY, _("Chip Name"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
chipnameSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Chip Name") ), wxHORIZONTAL );
|
m_staticTextChipname->Wrap( -1 );
|
||||||
|
optionsSizer->Add( m_staticTextChipname, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
chipnameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
chipnameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
chipnameTextCtrl->SetMaxLength( 32 );
|
chipnameTextCtrl->SetMaxLength( 32 );
|
||||||
chipnameTextCtrl->SetToolTip( _("The name of the symbol in the library from which this component came") );
|
chipnameTextCtrl->SetToolTip( _("The name of the symbol in the library from which this component came") );
|
||||||
|
|
||||||
chipnameSizer->Add( chipnameTextCtrl, 1, wxALL|wxEXPAND, 5 );
|
optionsSizer->Add( chipnameTextCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
optionsSizer->Add( chipnameSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 8 );
|
|
||||||
|
|
||||||
convertCheckBox = new wxCheckBox( this, wxID_ANY, _("Convert"), wxDefaultPosition, wxDefaultSize, 0 );
|
convertCheckBox = new wxCheckBox( this, wxID_ANY, _("Convert"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
convertCheckBox->SetToolTip( _("Use the alternate shape of this component.\nFor gates, this is the \"De Morgan\" conversion") );
|
convertCheckBox->SetToolTip( _("Use the alternate shape of this component.\nFor gates, this is the \"De Morgan\" conversion") );
|
||||||
|
@ -84,6 +84,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
|
||||||
|
|
||||||
optionsSizer->Add( defaultsButton, 0, wxALL|wxEXPAND, 5 );
|
optionsSizer->Add( defaultsButton, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
upperSizer->Add( optionsSizer, 0, wxALIGN_TOP|wxALL|wxEXPAND, 5 );
|
upperSizer->Add( optionsSizer, 0, wxALIGN_TOP|wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
wxStaticBoxSizer* fieldsSizer;
|
wxStaticBoxSizer* fieldsSizer;
|
||||||
|
@ -100,57 +101,60 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
|
||||||
addFieldButton = new wxButton( this, wxID_ANY, _("Add Field"), wxDefaultPosition, wxDefaultSize, 0 );
|
addFieldButton = new wxButton( this, wxID_ANY, _("Add Field"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
addFieldButton->SetToolTip( _("Add a new custom field") );
|
addFieldButton->SetToolTip( _("Add a new custom field") );
|
||||||
|
|
||||||
gridStaticBoxSizer->Add( addFieldButton, 0, wxALL|wxEXPAND, 5 );
|
gridStaticBoxSizer->Add( addFieldButton, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
deleteFieldButton = new wxButton( this, wxID_ANY, _("Delete Field"), wxDefaultPosition, wxDefaultSize, 0 );
|
deleteFieldButton = new wxButton( this, wxID_ANY, _("Delete Field"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
deleteFieldButton->SetToolTip( _("Delete one of the optional fields") );
|
deleteFieldButton->SetToolTip( _("Delete one of the optional fields") );
|
||||||
|
|
||||||
gridStaticBoxSizer->Add( deleteFieldButton, 0, wxALL|wxEXPAND, 5 );
|
gridStaticBoxSizer->Add( deleteFieldButton, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
moveUpButton = new wxButton( this, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
|
moveUpButton = new wxButton( this, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
moveUpButton->SetToolTip( _("Move the selected optional fields up one position") );
|
moveUpButton->SetToolTip( _("Move the selected optional fields up one position") );
|
||||||
|
|
||||||
gridStaticBoxSizer->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 );
|
gridStaticBoxSizer->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
fieldsSizer->Add( gridStaticBoxSizer, 3, wxEXPAND|wxRIGHT|wxLEFT, 8 );
|
fieldsSizer->Add( gridStaticBoxSizer, 3, wxEXPAND|wxRIGHT|wxLEFT, 8 );
|
||||||
|
|
||||||
wxBoxSizer* fieldEditBoxSizer;
|
wxBoxSizer* fieldEditBoxSizer;
|
||||||
fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL );
|
fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
wxStaticBoxSizer* sbSizerOptions;
|
wxBoxSizer* bSizerJustification;
|
||||||
sbSizerOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Text Justification:") ), wxHORIZONTAL );
|
bSizerJustification = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
wxString m_FieldHJustifyCtrlChoices[] = { _("Left"), _("Center"), _("Right") };
|
wxString m_FieldHJustifyCtrlChoices[] = { _("Left"), _("Center"), _("Right") };
|
||||||
int m_FieldHJustifyCtrlNChoices = sizeof( m_FieldHJustifyCtrlChoices ) / sizeof( wxString );
|
int m_FieldHJustifyCtrlNChoices = sizeof( m_FieldHJustifyCtrlChoices ) / sizeof( wxString );
|
||||||
m_FieldHJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Horiz. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldHJustifyCtrlNChoices, m_FieldHJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS );
|
m_FieldHJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Horiz. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldHJustifyCtrlNChoices, m_FieldHJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
m_FieldHJustifyCtrl->SetSelection( 0 );
|
m_FieldHJustifyCtrl->SetSelection( 0 );
|
||||||
sbSizerOptions->Add( m_FieldHJustifyCtrl, 1, wxRIGHT|wxLEFT, 5 );
|
bSizerJustification->Add( m_FieldHJustifyCtrl, 1, wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
wxString m_FieldVJustifyCtrlChoices[] = { _("Bottom"), _("Center"), _("Top") };
|
wxString m_FieldVJustifyCtrlChoices[] = { _("Bottom"), _("Center"), _("Top") };
|
||||||
int m_FieldVJustifyCtrlNChoices = sizeof( m_FieldVJustifyCtrlChoices ) / sizeof( wxString );
|
int m_FieldVJustifyCtrlNChoices = sizeof( m_FieldVJustifyCtrlChoices ) / sizeof( wxString );
|
||||||
m_FieldVJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Vert. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldVJustifyCtrlNChoices, m_FieldVJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS );
|
m_FieldVJustifyCtrl = new wxRadioBox( this, wxID_ANY, _("Vert. Justify"), wxDefaultPosition, wxDefaultSize, m_FieldVJustifyCtrlNChoices, m_FieldVJustifyCtrlChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
m_FieldVJustifyCtrl->SetSelection( 2 );
|
m_FieldVJustifyCtrl->SetSelection( 0 );
|
||||||
sbSizerOptions->Add( m_FieldVJustifyCtrl, 1, wxRIGHT|wxLEFT, 5 );
|
bSizerJustification->Add( m_FieldVJustifyCtrl, 1, wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
fieldEditBoxSizer->Add( sbSizerOptions, 0, wxEXPAND, 5 );
|
|
||||||
|
fieldEditBoxSizer->Add( bSizerJustification, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizerStyle;
|
||||||
|
bSizerStyle = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
wxStaticBoxSizer* visibilitySizer;
|
wxStaticBoxSizer* visibilitySizer;
|
||||||
visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL );
|
visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxVERTICAL );
|
||||||
|
|
||||||
wxBoxSizer* bShowRotateSizer;
|
|
||||||
bShowRotateSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 );
|
showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
showCheckBox->SetToolTip( _("Check if you want this field visible") );
|
showCheckBox->SetToolTip( _("Check if you want this field visible") );
|
||||||
|
|
||||||
bShowRotateSizer->Add( showCheckBox, 0, wxALL, 5 );
|
visibilitySizer->Add( showCheckBox, 0, wxALL, 5 );
|
||||||
|
|
||||||
rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 );
|
rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") );
|
rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") );
|
||||||
|
|
||||||
bShowRotateSizer->Add( rotateCheckBox, 0, wxALL, 5 );
|
visibilitySizer->Add( rotateCheckBox, 0, wxALL, 5 );
|
||||||
|
|
||||||
visibilitySizer->Add( bShowRotateSizer, 1, wxALIGN_CENTER_VERTICAL, 5 );
|
|
||||||
|
bSizerStyle->Add( visibilitySizer, 1, wxEXPAND|wxALL, 5 );
|
||||||
|
|
||||||
wxString m_StyleRadioBoxChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
|
wxString m_StyleRadioBoxChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
|
||||||
int m_StyleRadioBoxNChoices = sizeof( m_StyleRadioBoxChoices ) / sizeof( wxString );
|
int m_StyleRadioBoxNChoices = sizeof( m_StyleRadioBoxChoices ) / sizeof( wxString );
|
||||||
|
@ -158,89 +162,101 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
|
||||||
m_StyleRadioBox->SetSelection( 3 );
|
m_StyleRadioBox->SetSelection( 3 );
|
||||||
m_StyleRadioBox->SetToolTip( _("The style of the currently selected field's text in the schemati") );
|
m_StyleRadioBox->SetToolTip( _("The style of the currently selected field's text in the schemati") );
|
||||||
|
|
||||||
visibilitySizer->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
bSizerStyle->Add( m_StyleRadioBox, 1, wxEXPAND|wxALL, 5 );
|
||||||
|
|
||||||
fieldEditBoxSizer->Add( visibilitySizer, 0, wxEXPAND|wxTOP, 5 );
|
|
||||||
|
fieldEditBoxSizer->Add( bSizerStyle, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* fieldNameBoxSizer;
|
wxBoxSizer* fieldNameBoxSizer;
|
||||||
fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL );
|
fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
fieldNameLabel = new wxStaticText( this, wxID_ANY, _("Field Name"), wxDefaultPosition, wxDefaultSize, 0 );
|
fieldNameLabel = new wxStaticText( this, wxID_ANY, _("Field Name"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
fieldNameLabel->Wrap( -1 );
|
fieldNameLabel->Wrap( -1 );
|
||||||
fieldNameBoxSizer->Add( fieldNameLabel, 0, 0, 5 );
|
fieldNameBoxSizer->Add( fieldNameLabel, 0, wxTOP, 5 );
|
||||||
|
|
||||||
fieldNameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
fieldNameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fieldNameTextCtrl->SetMaxLength( 0 );
|
||||||
fieldNameTextCtrl->SetToolTip( _("The name of the currently selected field\nSome fixed fields names are not editable") );
|
fieldNameTextCtrl->SetToolTip( _("The name of the currently selected field\nSome fixed fields names are not editable") );
|
||||||
|
|
||||||
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxEXPAND, 5 );
|
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxALL|wxEXPAND, 5 );
|
|
||||||
|
fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* fieldTextBoxSizer;
|
wxBoxSizer* fieldTextBoxSizer;
|
||||||
fieldTextBoxSizer = new wxBoxSizer( wxVERTICAL );
|
fieldTextBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 );
|
fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
fieldValueLabel->Wrap( -1 );
|
fieldValueLabel->Wrap( -1 );
|
||||||
fieldTextBoxSizer->Add( fieldValueLabel, 0, 0, 5 );
|
fieldTextBoxSizer->Add( fieldValueLabel, 0, wxTOP, 5 );
|
||||||
|
|
||||||
fieldValueTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
fieldValueTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fieldValueTextCtrl->SetMaxLength( 0 );
|
||||||
fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
|
fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
|
||||||
|
|
||||||
fieldTextBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 );
|
fieldTextBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
fieldEditBoxSizer->Add( fieldTextBoxSizer, 0, wxALL|wxEXPAND, 5 );
|
|
||||||
|
|
||||||
wxBoxSizer* textSizeBoxSizer;
|
fieldEditBoxSizer->Add( fieldTextBoxSizer, 0, wxEXPAND, 5 );
|
||||||
textSizeBoxSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
textSizeLabel = new wxStaticText( this, wxID_ANY, _("Size(\")"), wxDefaultPosition, wxDefaultSize, 0 );
|
wxFlexGridSizer* fgSizerPosSize;
|
||||||
|
fgSizerPosSize = new wxFlexGridSizer( 3, 3, 0, 0 );
|
||||||
|
fgSizerPosSize->AddGrowableCol( 1 );
|
||||||
|
fgSizerPosSize->SetFlexibleDirection( wxBOTH );
|
||||||
|
fgSizerPosSize->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
|
textSizeLabel = new wxStaticText( this, wxID_ANY, _("Size"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
textSizeLabel->Wrap( -1 );
|
textSizeLabel->Wrap( -1 );
|
||||||
textSizeBoxSizer->Add( textSizeLabel, 0, 0, 5 );
|
fgSizerPosSize->Add( textSizeLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
textSizeTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
textSizeTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
textSizeTextCtrl->SetMaxLength( 0 );
|
||||||
textSizeTextCtrl->SetToolTip( _("The size of the currently selected field's text in the schematic") );
|
textSizeTextCtrl->SetToolTip( _("The size of the currently selected field's text in the schematic") );
|
||||||
|
|
||||||
textSizeBoxSizer->Add( textSizeTextCtrl, 0, wxEXPAND, 5 );
|
fgSizerPosSize->Add( textSizeTextCtrl, 0, wxEXPAND|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
fieldEditBoxSizer->Add( textSizeBoxSizer, 0, wxALL|wxEXPAND, 5 );
|
m_staticTextUnitSize = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextUnitSize->Wrap( -1 );
|
||||||
|
fgSizerPosSize->Add( m_staticTextUnitSize, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
wxBoxSizer* positionBoxSizer;
|
posXLabel = new wxStaticText( this, wxID_ANY, _("PosX"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
positionBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
|
||||||
|
|
||||||
wxBoxSizer* posXBoxSizer;
|
|
||||||
posXBoxSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
posXLabel = new wxStaticText( this, wxID_ANY, _("PosX(\")"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
posXLabel->Wrap( -1 );
|
posXLabel->Wrap( -1 );
|
||||||
posXBoxSizer->Add( posXLabel, 0, 0, 5 );
|
fgSizerPosSize->Add( posXLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
posXTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
posXTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
posXTextCtrl->SetMaxLength( 0 );
|
||||||
posXTextCtrl->SetToolTip( _("The X coordinate of the text relative to the component") );
|
posXTextCtrl->SetToolTip( _("The X coordinate of the text relative to the component") );
|
||||||
|
|
||||||
posXBoxSizer->Add( posXTextCtrl, 0, wxEXPAND, 5 );
|
fgSizerPosSize->Add( posXTextCtrl, 0, wxEXPAND|wxTOP|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
positionBoxSizer->Add( posXBoxSizer, 1, wxALL|wxEXPAND, 5 );
|
m_staticTextUnitPosX = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextUnitPosX->Wrap( -1 );
|
||||||
|
fgSizerPosSize->Add( m_staticTextUnitPosX, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
wxBoxSizer* posYBoxSizer;
|
posYLabel = new wxStaticText( this, wxID_ANY, _("PosY"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
posYBoxSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
posYLabel = new wxStaticText( this, wxID_ANY, _("PosY(\")"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
posYLabel->Wrap( -1 );
|
posYLabel->Wrap( -1 );
|
||||||
posYBoxSizer->Add( posYLabel, 0, 0, 5 );
|
fgSizerPosSize->Add( posYLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
posYTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
posYTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
posYTextCtrl->SetMaxLength( 0 );
|
||||||
posYTextCtrl->SetToolTip( _("The Y coordinate of the text relative to the component") );
|
posYTextCtrl->SetToolTip( _("The Y coordinate of the text relative to the component") );
|
||||||
|
|
||||||
posYBoxSizer->Add( posYTextCtrl, 0, wxEXPAND, 5 );
|
fgSizerPosSize->Add( posYTextCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
positionBoxSizer->Add( posYBoxSizer, 1, wxALL|wxEXPAND, 5 );
|
m_staticTextUnitPosY = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextUnitPosY->Wrap( -1 );
|
||||||
|
fgSizerPosSize->Add( m_staticTextUnitPosY, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
fieldEditBoxSizer->Add( fgSizerPosSize, 1, wxEXPAND|wxTOP, 5 );
|
||||||
|
|
||||||
fieldEditBoxSizer->Add( positionBoxSizer, 0, wxEXPAND, 5 );
|
|
||||||
|
|
||||||
fieldsSizer->Add( fieldEditBoxSizer, 2, wxEXPAND, 5 );
|
fieldsSizer->Add( fieldEditBoxSizer, 2, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
upperSizer->Add( fieldsSizer, 1, wxALL|wxEXPAND, 5 );
|
upperSizer->Add( fieldsSizer, 1, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
mainSizer->Add( upperSizer, 1, wxEXPAND, 5 );
|
mainSizer->Add( upperSizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
stdDialogButtonSizer = new wxStdDialogButtonSizer();
|
stdDialogButtonSizer = new wxStdDialogButtonSizer();
|
||||||
|
@ -249,8 +265,10 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
|
||||||
stdDialogButtonSizerCancel = new wxButton( this, wxID_CANCEL );
|
stdDialogButtonSizerCancel = new wxButton( this, wxID_CANCEL );
|
||||||
stdDialogButtonSizer->AddButton( stdDialogButtonSizerCancel );
|
stdDialogButtonSizer->AddButton( stdDialogButtonSizerCancel );
|
||||||
stdDialogButtonSizer->Realize();
|
stdDialogButtonSizer->Realize();
|
||||||
|
|
||||||
mainSizer->Add( stdDialogButtonSizer, 0, wxALL|wxEXPAND, 8 );
|
mainSizer->Add( stdDialogButtonSizer, 0, wxALL|wxEXPAND, 8 );
|
||||||
|
|
||||||
|
|
||||||
this->SetSizer( mainSizer );
|
this->SetSizer( mainSizer );
|
||||||
this->Layout();
|
this->Layout();
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Jun 30 2011)
|
// C++ code generated with wxFormBuilder (version Oct 8 2012)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
@ -12,18 +12,18 @@
|
||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/choice.h>
|
#include <wx/stattext.h>
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
#include <wx/font.h>
|
#include <wx/font.h>
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/choice.h>
|
||||||
#include <wx/statbox.h>
|
|
||||||
#include <wx/radiobox.h>
|
#include <wx/radiobox.h>
|
||||||
|
#include <wx/sizer.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
#include <wx/stattext.h>
|
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
|
#include <wx/statbox.h>
|
||||||
#include <wx/listctrl.h>
|
#include <wx/listctrl.h>
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
|
|
||||||
|
@ -38,9 +38,11 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public wxDialog
|
||||||
private:
|
private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
wxStaticText* m_staticTextUnit;
|
||||||
wxChoice* unitChoice;
|
wxChoice* unitChoice;
|
||||||
wxRadioBox* orientationRadioBox;
|
wxRadioBox* orientationRadioBox;
|
||||||
wxRadioBox* mirrorRadioBox;
|
wxRadioBox* mirrorRadioBox;
|
||||||
|
wxStaticText* m_staticTextChipname;
|
||||||
wxTextCtrl* chipnameTextCtrl;
|
wxTextCtrl* chipnameTextCtrl;
|
||||||
wxCheckBox* convertCheckBox;
|
wxCheckBox* convertCheckBox;
|
||||||
wxStaticText* partsAreLockedLabel;
|
wxStaticText* partsAreLockedLabel;
|
||||||
|
@ -60,10 +62,13 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public wxDialog
|
||||||
wxTextCtrl* fieldValueTextCtrl;
|
wxTextCtrl* fieldValueTextCtrl;
|
||||||
wxStaticText* textSizeLabel;
|
wxStaticText* textSizeLabel;
|
||||||
wxTextCtrl* textSizeTextCtrl;
|
wxTextCtrl* textSizeTextCtrl;
|
||||||
|
wxStaticText* m_staticTextUnitSize;
|
||||||
wxStaticText* posXLabel;
|
wxStaticText* posXLabel;
|
||||||
wxTextCtrl* posXTextCtrl;
|
wxTextCtrl* posXTextCtrl;
|
||||||
|
wxStaticText* m_staticTextUnitPosX;
|
||||||
wxStaticText* posYLabel;
|
wxStaticText* posYLabel;
|
||||||
wxTextCtrl* posYTextCtrl;
|
wxTextCtrl* posYTextCtrl;
|
||||||
|
wxStaticText* m_staticTextUnitPosY;
|
||||||
wxStdDialogButtonSizer* stdDialogButtonSizer;
|
wxStdDialogButtonSizer* stdDialogButtonSizer;
|
||||||
wxButton* stdDialogButtonSizerOK;
|
wxButton* stdDialogButtonSizerOK;
|
||||||
wxButton* stdDialogButtonSizerCancel;
|
wxButton* stdDialogButtonSizerCancel;
|
||||||
|
@ -81,7 +86,7 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public wxDialog
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 700,521 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
|
DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 700,496 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
|
||||||
~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP();
|
~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -34,8 +34,8 @@ class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB : public DIALOG_EDIT_LIBENTRY_FIELDS_IN
|
||||||
/*****************************************************************************************/
|
/*****************************************************************************************/
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
LIB_EDIT_FRAME* m_Parent;
|
LIB_EDIT_FRAME* m_parent;
|
||||||
LIB_COMPONENT* m_LibEntry;
|
LIB_COMPONENT* m_libEntry;
|
||||||
bool m_skipCopyFromPanel;
|
bool m_skipCopyFromPanel;
|
||||||
|
|
||||||
/// a copy of the edited component's LIB_FIELDs
|
/// a copy of the edited component's LIB_FIELDs
|
||||||
|
@ -64,10 +64,10 @@ private:
|
||||||
int getSelectedFieldNdx();
|
int getSelectedFieldNdx();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function InitBuffers
|
* Function initBuffers
|
||||||
* sets up to edit the given component.
|
* sets up to edit the given component.
|
||||||
*/
|
*/
|
||||||
void InitBuffers();
|
void initBuffers();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function findField
|
* Function findField
|
||||||
|
@ -133,8 +133,8 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB(
|
||||||
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( aParent )
|
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( aParent )
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
{
|
{
|
||||||
m_Parent = aParent;
|
m_parent = aParent;
|
||||||
m_LibEntry = aLibEntry;
|
m_libEntry = aLibEntry;
|
||||||
|
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
Centre();
|
Centre();
|
||||||
|
@ -163,20 +163,11 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnInitDialog( wxInitDialogEvent& event
|
||||||
columnLabel.SetText( _( "Value" ) );
|
columnLabel.SetText( _( "Value" ) );
|
||||||
fieldListCtrl->InsertColumn( COLUMN_TEXT, columnLabel );
|
fieldListCtrl->InsertColumn( COLUMN_TEXT, columnLabel );
|
||||||
|
|
||||||
wxString label = _( "Size" ) + ReturnUnitSymbol( g_UserUnit );
|
m_staticTextUnitSize->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
|
||||||
textSizeLabel->SetLabel( label );
|
m_staticTextUnitPosX->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
|
||||||
|
m_staticTextUnitPosY->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) );
|
||||||
|
|
||||||
label = _( "Pos " );
|
initBuffers();
|
||||||
label += _( "X" );
|
|
||||||
label += ReturnUnitSymbol( g_UserUnit );
|
|
||||||
posXLabel->SetLabel( label );
|
|
||||||
|
|
||||||
label = _( "Pos " );
|
|
||||||
label += _( "Y" );
|
|
||||||
label += ReturnUnitSymbol( g_UserUnit );
|
|
||||||
posYLabel->SetLabel( label );
|
|
||||||
|
|
||||||
InitBuffers();
|
|
||||||
copySelectedFieldToPanel();
|
copySelectedFieldToPanel();
|
||||||
|
|
||||||
stdDialogButtonSizerOK->SetDefault();
|
stdDialogButtonSizerOK->SetDefault();
|
||||||
|
@ -237,7 +228,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnOKButtonClick( wxCommandEvent& event
|
||||||
* or root alias of the component */
|
* or root alias of the component */
|
||||||
wxString newvalue = m_FieldsBuf[VALUE].GetText();
|
wxString newvalue = m_FieldsBuf[VALUE].GetText();
|
||||||
|
|
||||||
if( m_LibEntry->HasAlias( newvalue ) && !m_LibEntry->GetAlias( newvalue )->IsRoot() )
|
if( m_libEntry->HasAlias( newvalue ) && !m_libEntry->GetAlias( newvalue )->IsRoot() )
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( _( "A new name is entered for this component\n\
|
msg.Printf( _( "A new name is entered for this component\n\
|
||||||
|
@ -249,7 +240,7 @@ An alias %s already exists!\nCannot update this component" ),
|
||||||
/* End unused code */
|
/* End unused code */
|
||||||
|
|
||||||
/* save old cmp in undo list */
|
/* save old cmp in undo list */
|
||||||
m_Parent->SaveCopyInUndoList( m_LibEntry, IS_CHANGED );
|
m_parent->SaveCopyInUndoList( m_libEntry, IS_CHANGED );
|
||||||
|
|
||||||
// delete any fields with no name or no value before we copy all of m_FieldsBuf
|
// delete any fields with no name or no value before we copy all of m_FieldsBuf
|
||||||
// back into the component
|
// back into the component
|
||||||
|
@ -274,12 +265,12 @@ An alias %s already exists!\nCannot update this component" ),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// copy all the fields back, fully replacing any previous fields
|
// copy all the fields back, fully replacing any previous fields
|
||||||
m_LibEntry->SetFields( m_FieldsBuf );
|
m_libEntry->SetFields( m_FieldsBuf );
|
||||||
|
|
||||||
// We need to keep the name and the value the same at the moment!
|
// We need to keep the name and the value the same at the moment!
|
||||||
SetName( m_LibEntry->GetValueField().GetText() );
|
SetName( m_libEntry->GetValueField().GetText() );
|
||||||
|
|
||||||
m_Parent->OnModify();
|
m_parent->OnModify();
|
||||||
|
|
||||||
EndModal( 0 );
|
EndModal( 0 );
|
||||||
}
|
}
|
||||||
|
@ -445,13 +436,11 @@ LIB_FIELD* DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::findField( const wxString& aField
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************/
|
void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::initBuffers()
|
||||||
void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::InitBuffers()
|
|
||||||
/***********************************************************/
|
|
||||||
{
|
{
|
||||||
LIB_FIELDS cmpFields;
|
LIB_FIELDS cmpFields;
|
||||||
|
|
||||||
m_LibEntry->GetFields( cmpFields );
|
m_libEntry->GetFields( cmpFields );
|
||||||
|
|
||||||
#if defined(DEBUG)
|
#if defined(DEBUG)
|
||||||
for( unsigned i=0; i<cmpFields.size(); ++i )
|
for( unsigned i=0; i<cmpFields.size(); ++i )
|
||||||
|
@ -492,7 +481,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::InitBuffers()
|
||||||
// Now copy in the template fields, in the order that they are present in the
|
// Now copy in the template fields, in the order that they are present in the
|
||||||
// template field editor UI.
|
// template field editor UI.
|
||||||
const TEMPLATE_FIELDNAMES& tfnames =
|
const TEMPLATE_FIELDNAMES& tfnames =
|
||||||
((SCH_EDIT_FRAME*)m_Parent->GetParent())->GetTemplateFieldNames();
|
((SCH_EDIT_FRAME*)m_parent->GetParent())->GetTemplateFieldNames();
|
||||||
|
|
||||||
for( TEMPLATE_FIELDNAMES::const_iterator it = tfnames.begin(); it!=tfnames.end(); ++it )
|
for( TEMPLATE_FIELDNAMES::const_iterator it = tfnames.begin(); it!=tfnames.end(); ++it )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Jun 30 2011)
|
// C++ code generated with wxFormBuilder (version Oct 8 2012)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
@ -16,39 +16,40 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
|
||||||
wxBoxSizer* mainSizer;
|
wxBoxSizer* mainSizer;
|
||||||
mainSizer = new wxBoxSizer( wxVERTICAL );
|
mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
wxStaticBoxSizer* fieldsSizer;
|
wxBoxSizer* bSizerFieldsSetup;
|
||||||
fieldsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields") ), wxHORIZONTAL );
|
bSizerFieldsSetup = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
wxStaticBoxSizer* gridStaticBoxSizer;
|
wxBoxSizer* bSizerFiledsList;
|
||||||
gridStaticBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL );
|
bSizerFiledsList = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
fieldListCtrl = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES );
|
fieldListCtrl = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES );
|
||||||
fieldListCtrl->SetMinSize( wxSize( 220,-1 ) );
|
fieldListCtrl->SetMinSize( wxSize( 220,-1 ) );
|
||||||
|
|
||||||
gridStaticBoxSizer->Add( fieldListCtrl, 1, wxALL|wxEXPAND, 8 );
|
bSizerFiledsList->Add( fieldListCtrl, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
|
||||||
|
|
||||||
addFieldButton = new wxButton( this, wxID_ANY, _("Add Field"), wxDefaultPosition, wxDefaultSize, 0 );
|
addFieldButton = new wxButton( this, wxID_ANY, _("Add Field"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
addFieldButton->SetToolTip( _("Add a new custom field") );
|
addFieldButton->SetToolTip( _("Add a new custom field") );
|
||||||
|
|
||||||
gridStaticBoxSizer->Add( addFieldButton, 0, wxALL|wxEXPAND, 5 );
|
bSizerFiledsList->Add( addFieldButton, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
deleteFieldButton = new wxButton( this, wxID_ANY, _("Delete Field"), wxDefaultPosition, wxDefaultSize, 0 );
|
deleteFieldButton = new wxButton( this, wxID_ANY, _("Delete Field"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
deleteFieldButton->SetToolTip( _("Delete one of the optional fields") );
|
deleteFieldButton->SetToolTip( _("Delete one of the optional fields") );
|
||||||
|
|
||||||
gridStaticBoxSizer->Add( deleteFieldButton, 0, wxALL|wxEXPAND, 5 );
|
bSizerFiledsList->Add( deleteFieldButton, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
moveUpButton = new wxButton( this, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
|
moveUpButton = new wxButton( this, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
moveUpButton->SetToolTip( _("Move the selected optional fields up one position") );
|
moveUpButton->SetToolTip( _("Move the selected optional fields up one position") );
|
||||||
|
|
||||||
gridStaticBoxSizer->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 );
|
bSizerFiledsList->Add( moveUpButton, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
fieldsSizer->Add( gridStaticBoxSizer, 5, wxEXPAND|wxRIGHT, 8 );
|
|
||||||
|
bSizerFieldsSetup->Add( bSizerFiledsList, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* fieldEditBoxSizer;
|
wxBoxSizer* fieldEditBoxSizer;
|
||||||
fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL );
|
fieldEditBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
wxStaticBoxSizer* optionsSizer;
|
wxBoxSizer* bSizerJustify;
|
||||||
optionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Text Justification:") ), wxHORIZONTAL );
|
bSizerJustify = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
wxString m_FieldHJustifyCtrlChoices[] = { _("Left"), _("Center"), _("Right") };
|
wxString m_FieldHJustifyCtrlChoices[] = { _("Left"), _("Center"), _("Right") };
|
||||||
int m_FieldHJustifyCtrlNChoices = sizeof( m_FieldHJustifyCtrlChoices ) / sizeof( wxString );
|
int m_FieldHJustifyCtrlNChoices = sizeof( m_FieldHJustifyCtrlChoices ) / sizeof( wxString );
|
||||||
|
@ -56,7 +57,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
|
||||||
m_FieldHJustifyCtrl->SetSelection( 1 );
|
m_FieldHJustifyCtrl->SetSelection( 1 );
|
||||||
m_FieldHJustifyCtrl->SetToolTip( _("Select if the component is to be rotated when drawn") );
|
m_FieldHJustifyCtrl->SetToolTip( _("Select if the component is to be rotated when drawn") );
|
||||||
|
|
||||||
optionsSizer->Add( m_FieldHJustifyCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT, 8 );
|
bSizerJustify->Add( m_FieldHJustifyCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
wxString m_FieldVJustifyCtrlChoices[] = { _("Bottom"), _("Center"), _("Top") };
|
wxString m_FieldVJustifyCtrlChoices[] = { _("Bottom"), _("Center"), _("Top") };
|
||||||
int m_FieldVJustifyCtrlNChoices = sizeof( m_FieldVJustifyCtrlChoices ) / sizeof( wxString );
|
int m_FieldVJustifyCtrlNChoices = sizeof( m_FieldVJustifyCtrlChoices ) / sizeof( wxString );
|
||||||
|
@ -64,35 +65,38 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
|
||||||
m_FieldVJustifyCtrl->SetSelection( 0 );
|
m_FieldVJustifyCtrl->SetSelection( 0 );
|
||||||
m_FieldVJustifyCtrl->SetToolTip( _("Pick the graphical transformation to be used when displaying the component, if any") );
|
m_FieldVJustifyCtrl->SetToolTip( _("Pick the graphical transformation to be used when displaying the component, if any") );
|
||||||
|
|
||||||
optionsSizer->Add( m_FieldVJustifyCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 8 );
|
bSizerJustify->Add( m_FieldVJustifyCtrl, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||||
|
|
||||||
fieldEditBoxSizer->Add( optionsSizer, 0, wxALIGN_TOP|wxEXPAND|wxBOTTOM, 5 );
|
|
||||||
|
fieldEditBoxSizer->Add( bSizerJustify, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizerAspect;
|
||||||
|
bSizerAspect = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
wxStaticBoxSizer* visibilitySizer;
|
wxStaticBoxSizer* visibilitySizer;
|
||||||
visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL );
|
visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxVERTICAL );
|
||||||
|
|
||||||
wxBoxSizer* bShowRotateSizer;
|
|
||||||
bShowRotateSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 );
|
showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
showCheckBox->SetToolTip( _("Check if you want this field visible") );
|
showCheckBox->SetToolTip( _("Check if you want this field visible") );
|
||||||
|
|
||||||
bShowRotateSizer->Add( showCheckBox, 0, wxALL, 5 );
|
visibilitySizer->Add( showCheckBox, 0, wxALL, 5 );
|
||||||
|
|
||||||
rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 );
|
rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") );
|
rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") );
|
||||||
|
|
||||||
bShowRotateSizer->Add( rotateCheckBox, 0, wxALL, 5 );
|
visibilitySizer->Add( rotateCheckBox, 0, wxALL, 5 );
|
||||||
|
|
||||||
visibilitySizer->Add( bShowRotateSizer, 1, wxALIGN_CENTER_VERTICAL, 5 );
|
|
||||||
|
bSizerAspect->Add( visibilitySizer, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
wxString m_StyleRadioBoxChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
|
wxString m_StyleRadioBoxChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
|
||||||
int m_StyleRadioBoxNChoices = sizeof( m_StyleRadioBoxChoices ) / sizeof( wxString );
|
int m_StyleRadioBoxNChoices = sizeof( m_StyleRadioBoxChoices ) / sizeof( wxString );
|
||||||
m_StyleRadioBox = new wxRadioBox( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, m_StyleRadioBoxNChoices, m_StyleRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
|
m_StyleRadioBox = new wxRadioBox( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, m_StyleRadioBoxNChoices, m_StyleRadioBoxChoices, 1, wxRA_SPECIFY_COLS );
|
||||||
m_StyleRadioBox->SetSelection( 1 );
|
m_StyleRadioBox->SetSelection( 0 );
|
||||||
visibilitySizer->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
bSizerAspect->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
fieldEditBoxSizer->Add( visibilitySizer, 0, wxEXPAND, 5 );
|
|
||||||
|
fieldEditBoxSizer->Add( bSizerAspect, 0, wxEXPAND|wxTOP, 5 );
|
||||||
|
|
||||||
wxBoxSizer* fieldNameBoxSizer;
|
wxBoxSizer* fieldNameBoxSizer;
|
||||||
fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL );
|
fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
@ -102,10 +106,12 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
|
||||||
fieldNameBoxSizer->Add( fieldNameLabel, 0, 0, 5 );
|
fieldNameBoxSizer->Add( fieldNameLabel, 0, 0, 5 );
|
||||||
|
|
||||||
fieldNameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
fieldNameTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fieldNameTextCtrl->SetMaxLength( 0 );
|
||||||
fieldNameTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
|
fieldNameTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
|
||||||
|
|
||||||
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxEXPAND, 5 );
|
fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxALL|wxEXPAND, 5 );
|
fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* fieldTextBoxSizer;
|
wxBoxSizer* fieldTextBoxSizer;
|
||||||
|
@ -116,60 +122,71 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
|
||||||
fieldTextBoxSizer->Add( fieldValueLabel, 0, 0, 5 );
|
fieldTextBoxSizer->Add( fieldValueLabel, 0, 0, 5 );
|
||||||
|
|
||||||
fieldValueTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
fieldValueTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
fieldValueTextCtrl->SetMaxLength( 0 );
|
||||||
fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
|
fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") );
|
||||||
|
|
||||||
fieldTextBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 );
|
fieldTextBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
fieldEditBoxSizer->Add( fieldTextBoxSizer, 0, wxALL|wxEXPAND, 5 );
|
fieldEditBoxSizer->Add( fieldTextBoxSizer, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* textSizeBoxSizer;
|
wxFlexGridSizer* fgSizerPosSize;
|
||||||
textSizeBoxSizer = new wxBoxSizer( wxVERTICAL );
|
fgSizerPosSize = new wxFlexGridSizer( 3, 3, 0, 0 );
|
||||||
|
fgSizerPosSize->AddGrowableCol( 1 );
|
||||||
|
fgSizerPosSize->SetFlexibleDirection( wxBOTH );
|
||||||
|
fgSizerPosSize->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
textSizeLabel = new wxStaticText( this, wxID_ANY, _("Size(\")"), wxDefaultPosition, wxDefaultSize, 0 );
|
textSizeLabel = new wxStaticText( this, wxID_ANY, _("Size"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
textSizeLabel->Wrap( -1 );
|
textSizeLabel->Wrap( -1 );
|
||||||
textSizeBoxSizer->Add( textSizeLabel, 0, 0, 5 );
|
fgSizerPosSize->Add( textSizeLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
textSizeTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
textSizeTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
textSizeTextCtrl->SetMaxLength( 0 );
|
||||||
textSizeTextCtrl->SetToolTip( _("The vertical height of the currently selected field's text in the schematic") );
|
textSizeTextCtrl->SetToolTip( _("The vertical height of the currently selected field's text in the schematic") );
|
||||||
|
|
||||||
textSizeBoxSizer->Add( textSizeTextCtrl, 0, wxEXPAND, 5 );
|
fgSizerPosSize->Add( textSizeTextCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
||||||
|
|
||||||
fieldEditBoxSizer->Add( textSizeBoxSizer, 0, wxALL|wxEXPAND, 5 );
|
m_staticTextUnitSize = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextUnitSize->Wrap( -1 );
|
||||||
|
fgSizerPosSize->Add( m_staticTextUnitSize, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
wxBoxSizer* positionBoxSizer;
|
posXLabel = new wxStaticText( this, wxID_ANY, _("PosX"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
positionBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
|
||||||
|
|
||||||
wxBoxSizer* posXBoxSizer;
|
|
||||||
posXBoxSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
posXLabel = new wxStaticText( this, wxID_ANY, _("PosX(\")"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
posXLabel->Wrap( -1 );
|
posXLabel->Wrap( -1 );
|
||||||
posXBoxSizer->Add( posXLabel, 0, 0, 5 );
|
fgSizerPosSize->Add( posXLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
posXTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
posXTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
posXBoxSizer->Add( posXTextCtrl, 0, wxEXPAND, 5 );
|
posXTextCtrl->SetMaxLength( 0 );
|
||||||
|
fgSizerPosSize->Add( posXTextCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
|
||||||
|
|
||||||
positionBoxSizer->Add( posXBoxSizer, 1, wxALL|wxEXPAND, 5 );
|
m_staticTextUnitPosX = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextUnitPosX->Wrap( -1 );
|
||||||
|
fgSizerPosSize->Add( m_staticTextUnitPosX, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
wxBoxSizer* posYBoxSizer;
|
posYLabel = new wxStaticText( this, wxID_ANY, _("PosY"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
posYBoxSizer = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
posYLabel = new wxStaticText( this, wxID_ANY, _("PosY(\")"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
posYLabel->Wrap( -1 );
|
posYLabel->Wrap( -1 );
|
||||||
posYBoxSizer->Add( posYLabel, 0, 0, 5 );
|
fgSizerPosSize->Add( posYLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
posYTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
posYTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
posYTextCtrl->SetMaxLength( 0 );
|
||||||
posYTextCtrl->SetToolTip( _("The Y coordinate of the text relative to the component") );
|
posYTextCtrl->SetToolTip( _("The Y coordinate of the text relative to the component") );
|
||||||
|
|
||||||
posYBoxSizer->Add( posYTextCtrl, 0, wxEXPAND, 5 );
|
fgSizerPosSize->Add( posYTextCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
positionBoxSizer->Add( posYBoxSizer, 1, wxALL|wxEXPAND, 5 );
|
m_staticTextUnitPosY = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_staticTextUnitPosY->Wrap( -1 );
|
||||||
|
fgSizerPosSize->Add( m_staticTextUnitPosY, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
fieldEditBoxSizer->Add( positionBoxSizer, 1, wxEXPAND, 5 );
|
|
||||||
|
|
||||||
fieldsSizer->Add( fieldEditBoxSizer, 3, wxEXPAND, 5 );
|
fieldEditBoxSizer->Add( fgSizerPosSize, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||||
|
|
||||||
mainSizer->Add( fieldsSizer, 1, wxEXPAND|wxALL, 5 );
|
|
||||||
|
bSizerFieldsSetup->Add( fieldEditBoxSizer, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
mainSizer->Add( bSizerFieldsSetup, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
|
mainSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
stdDialogButtonSizer = new wxStdDialogButtonSizer();
|
stdDialogButtonSizer = new wxStdDialogButtonSizer();
|
||||||
stdDialogButtonSizerOK = new wxButton( this, wxID_OK );
|
stdDialogButtonSizerOK = new wxButton( this, wxID_OK );
|
||||||
|
@ -177,8 +194,10 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE
|
||||||
stdDialogButtonSizerCancel = new wxButton( this, wxID_CANCEL );
|
stdDialogButtonSizerCancel = new wxButton( this, wxID_CANCEL );
|
||||||
stdDialogButtonSizer->AddButton( stdDialogButtonSizerCancel );
|
stdDialogButtonSizer->AddButton( stdDialogButtonSizerCancel );
|
||||||
stdDialogButtonSizer->Realize();
|
stdDialogButtonSizer->Realize();
|
||||||
|
|
||||||
mainSizer->Add( stdDialogButtonSizer, 0, wxALL|wxEXPAND, 8 );
|
mainSizer->Add( stdDialogButtonSizer, 0, wxALL|wxEXPAND, 8 );
|
||||||
|
|
||||||
|
|
||||||
this->SetSizer( mainSizer );
|
this->SetSizer( mainSizer );
|
||||||
this->Layout();
|
this->Layout();
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Jun 30 2011)
|
// C++ code generated with wxFormBuilder (version Oct 8 2012)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
@ -12,18 +12,19 @@
|
||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
#include <wx/listctrl.h>
|
#include <wx/listctrl.h>
|
||||||
#include <wx/string.h>
|
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
#include <wx/font.h>
|
#include <wx/font.h>
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
|
#include <wx/string.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/statbox.h>
|
|
||||||
#include <wx/radiobox.h>
|
#include <wx/radiobox.h>
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
|
#include <wx/statbox.h>
|
||||||
#include <wx/stattext.h>
|
#include <wx/stattext.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
|
#include <wx/statline.h>
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -52,10 +53,14 @@ class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog
|
||||||
wxTextCtrl* fieldValueTextCtrl;
|
wxTextCtrl* fieldValueTextCtrl;
|
||||||
wxStaticText* textSizeLabel;
|
wxStaticText* textSizeLabel;
|
||||||
wxTextCtrl* textSizeTextCtrl;
|
wxTextCtrl* textSizeTextCtrl;
|
||||||
|
wxStaticText* m_staticTextUnitSize;
|
||||||
wxStaticText* posXLabel;
|
wxStaticText* posXLabel;
|
||||||
wxTextCtrl* posXTextCtrl;
|
wxTextCtrl* posXTextCtrl;
|
||||||
|
wxStaticText* m_staticTextUnitPosX;
|
||||||
wxStaticText* posYLabel;
|
wxStaticText* posYLabel;
|
||||||
wxTextCtrl* posYTextCtrl;
|
wxTextCtrl* posYTextCtrl;
|
||||||
|
wxStaticText* m_staticTextUnitPosY;
|
||||||
|
wxStaticLine* m_staticline1;
|
||||||
wxStdDialogButtonSizer* stdDialogButtonSizer;
|
wxStdDialogButtonSizer* stdDialogButtonSizer;
|
||||||
wxButton* stdDialogButtonSizerOK;
|
wxButton* stdDialogButtonSizerOK;
|
||||||
wxButton* stdDialogButtonSizerCancel;
|
wxButton* stdDialogButtonSizerCancel;
|
||||||
|
@ -73,7 +78,7 @@ class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Fields Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 615,550 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
|
DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Fields Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 615,456 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
|
||||||
~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE();
|
~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,8 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* *
|
* *
|
||||||
* Author : Angus Johnson *
|
* Author : Angus Johnson *
|
||||||
* Version : 5.0.3 *
|
* Version : 5.1.4 *
|
||||||
* Date : 12 January 2013 *
|
* Date : 24 March 2013 *
|
||||||
* Website : http://www.angusj.com *
|
* Website : http://www.angusj.com *
|
||||||
* Copyright : Angus Johnson 2010-2013 *
|
* Copyright : Angus Johnson 2010-2013 *
|
||||||
* *
|
* *
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
* Paper no. DETC2005-85513 pp. 565-575 *
|
* Paper no. DETC2005-85513 pp. 565-575 *
|
||||||
* ASME 2005 International Design Engineering Technical Conferences *
|
* ASME 2005 International Design Engineering Technical Conferences *
|
||||||
* and Computers and Information in Engineering Conference (IDETC/CIE2005) *
|
* and Computers and Information in Engineering Conference (IDETC/CIE2005) *
|
||||||
* September 24–28, 2005 , Long Beach, California, USA *
|
* September 24-28, 2005 , Long Beach, California, USA *
|
||||||
* http://www.me.berkeley.edu/~mcmains/pubs/DAC05OffsetPolygon.pdf *
|
* http://www.me.berkeley.edu/~mcmains/pubs/DAC05OffsetPolygon.pdf *
|
||||||
* *
|
* *
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
@ -64,25 +64,59 @@ public:
|
||||||
typedef std::vector< IntPoint > Polygon;
|
typedef std::vector< IntPoint > Polygon;
|
||||||
typedef std::vector< Polygon > Polygons;
|
typedef std::vector< Polygon > Polygons;
|
||||||
|
|
||||||
|
|
||||||
std::ostream& operator <<(std::ostream &s, Polygon &p);
|
std::ostream& operator <<(std::ostream &s, Polygon &p);
|
||||||
std::ostream& operator <<(std::ostream &s, Polygons &p);
|
std::ostream& operator <<(std::ostream &s, Polygons &p);
|
||||||
|
|
||||||
struct ExPolygon {
|
class PolyNode;
|
||||||
Polygon outer;
|
typedef std::vector< PolyNode* > PolyNodes;
|
||||||
Polygons holes;
|
|
||||||
|
class PolyNode
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PolyNode();
|
||||||
|
Polygon Contour;
|
||||||
|
PolyNodes Childs;
|
||||||
|
PolyNode* Parent;
|
||||||
|
PolyNode* GetNext() const;
|
||||||
|
bool IsHole() const;
|
||||||
|
int ChildCount() const;
|
||||||
|
private:
|
||||||
|
PolyNode* GetNextSiblingUp() const;
|
||||||
|
unsigned Index; //node index in Parent.Childs
|
||||||
|
void AddChild(PolyNode& child);
|
||||||
|
friend class Clipper; //to access Index
|
||||||
|
};
|
||||||
|
|
||||||
|
class PolyTree: public PolyNode
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~PolyTree(){Clear();};
|
||||||
|
PolyNode* GetFirst() const;
|
||||||
|
void Clear();
|
||||||
|
int Total() const;
|
||||||
|
private:
|
||||||
|
PolyNodes AllNodes;
|
||||||
|
friend class Clipper; //to access AllNodes
|
||||||
};
|
};
|
||||||
typedef std::vector< ExPolygon > ExPolygons;
|
|
||||||
|
|
||||||
enum JoinType { jtSquare, jtRound, jtMiter };
|
enum JoinType { jtSquare, jtRound, jtMiter };
|
||||||
|
|
||||||
bool Orientation(const Polygon &poly);
|
bool Orientation(const Polygon &poly);
|
||||||
double Area(const Polygon &poly);
|
double Area(const Polygon &poly);
|
||||||
|
|
||||||
void OffsetPolygons(const Polygons &in_polys, Polygons &out_polys,
|
void OffsetPolygons(const Polygons &in_polys, Polygons &out_polys,
|
||||||
double delta, JoinType jointype = jtSquare, double MiterLimit = 2, bool AutoFix = true);
|
double delta, JoinType jointype = jtSquare, double limit = 0, bool autoFix = true);
|
||||||
|
|
||||||
void SimplifyPolygon(const Polygon &in_poly, Polygons &out_polys, PolyFillType fillType = pftEvenOdd);
|
void SimplifyPolygon(const Polygon &in_poly, Polygons &out_polys, PolyFillType fillType = pftEvenOdd);
|
||||||
void SimplifyPolygons(const Polygons &in_polys, Polygons &out_polys, PolyFillType fillType = pftEvenOdd);
|
void SimplifyPolygons(const Polygons &in_polys, Polygons &out_polys, PolyFillType fillType = pftEvenOdd);
|
||||||
void SimplifyPolygons(Polygons &polys, PolyFillType fillType = pftEvenOdd);
|
void SimplifyPolygons(Polygons &polys, PolyFillType fillType = pftEvenOdd);
|
||||||
|
|
||||||
|
void CleanPolygon(Polygon& in_poly, Polygon& out_poly, double distance = 1.415);
|
||||||
|
void CleanPolygons(Polygons& in_polys, Polygons& out_polys, double distance = 1.415);
|
||||||
|
|
||||||
|
void PolyTreeToPolygons(PolyTree& polytree, Polygons& polygons);
|
||||||
|
|
||||||
void ReversePolygon(Polygon& p);
|
void ReversePolygon(Polygon& p);
|
||||||
void ReversePolygons(Polygons& p);
|
void ReversePolygons(Polygons& p);
|
||||||
|
|
||||||
|
@ -100,7 +134,6 @@ struct TEdge {
|
||||||
double dx;
|
double dx;
|
||||||
long64 deltaX;
|
long64 deltaX;
|
||||||
long64 deltaY;
|
long64 deltaY;
|
||||||
long64 tmpX;
|
|
||||||
PolyType polyType;
|
PolyType polyType;
|
||||||
EdgeSide side;
|
EdgeSide side;
|
||||||
int windDelta; //1 or -1 depending on winding direction
|
int windDelta; //1 or -1 depending on winding direction
|
||||||
|
@ -140,8 +173,8 @@ struct OutPt; //forward declaration
|
||||||
struct OutRec {
|
struct OutRec {
|
||||||
int idx;
|
int idx;
|
||||||
bool isHole;
|
bool isHole;
|
||||||
OutRec *FirstLeft;
|
OutRec *FirstLeft; //see comments in clipper.pas
|
||||||
OutRec *AppendLink;
|
PolyNode *polyNode;
|
||||||
OutPt *pts;
|
OutPt *pts;
|
||||||
OutPt *bottomPt;
|
OutPt *bottomPt;
|
||||||
};
|
};
|
||||||
|
@ -204,13 +237,13 @@ public:
|
||||||
Clipper();
|
Clipper();
|
||||||
~Clipper();
|
~Clipper();
|
||||||
bool Execute(ClipType clipType,
|
bool Execute(ClipType clipType,
|
||||||
Polygons &solution,
|
Polygons &solution,
|
||||||
PolyFillType subjFillType = pftEvenOdd,
|
PolyFillType subjFillType = pftEvenOdd,
|
||||||
PolyFillType clipFillType = pftEvenOdd);
|
PolyFillType clipFillType = pftEvenOdd);
|
||||||
bool Execute(ClipType clipType,
|
bool Execute(ClipType clipType,
|
||||||
ExPolygons &solution,
|
PolyTree &polytree,
|
||||||
PolyFillType subjFillType = pftEvenOdd,
|
PolyFillType subjFillType = pftEvenOdd,
|
||||||
PolyFillType clipFillType = pftEvenOdd);
|
PolyFillType clipFillType = pftEvenOdd);
|
||||||
void Clear();
|
void Clear();
|
||||||
bool ReverseSolution() {return m_ReverseOutput;};
|
bool ReverseSolution() {return m_ReverseOutput;};
|
||||||
void ReverseSolution(bool value) {m_ReverseOutput = value;};
|
void ReverseSolution(bool value) {m_ReverseOutput = value;};
|
||||||
|
@ -225,12 +258,12 @@ private:
|
||||||
Scanbeam *m_Scanbeam;
|
Scanbeam *m_Scanbeam;
|
||||||
TEdge *m_ActiveEdges;
|
TEdge *m_ActiveEdges;
|
||||||
TEdge *m_SortedEdges;
|
TEdge *m_SortedEdges;
|
||||||
IntersectNode *m_IntersectNodes;
|
IntersectNode *m_IntersectNodes;
|
||||||
bool m_ExecuteLocked;
|
bool m_ExecuteLocked;
|
||||||
PolyFillType m_ClipFillType;
|
PolyFillType m_ClipFillType;
|
||||||
PolyFillType m_SubjFillType;
|
PolyFillType m_SubjFillType;
|
||||||
bool m_ReverseOutput;
|
bool m_ReverseOutput;
|
||||||
bool m_UsingExPolygons;
|
bool m_UsingPolyTree;
|
||||||
void DisposeScanbeamList();
|
void DisposeScanbeamList();
|
||||||
void SetWindingCount(TEdge& edge);
|
void SetWindingCount(TEdge& edge);
|
||||||
bool IsEvenOddFillType(const TEdge& edge) const;
|
bool IsEvenOddFillType(const TEdge& edge) const;
|
||||||
|
@ -269,13 +302,13 @@ private:
|
||||||
void ProcessIntersectList();
|
void ProcessIntersectList();
|
||||||
void ProcessEdgesAtTopOfScanbeam(const long64 topY);
|
void ProcessEdgesAtTopOfScanbeam(const long64 topY);
|
||||||
void BuildResult(Polygons& polys);
|
void BuildResult(Polygons& polys);
|
||||||
void BuildResultEx(ExPolygons& polys);
|
void BuildResult2(PolyTree& polytree);
|
||||||
void SetHoleState(TEdge *e, OutRec *OutRec);
|
void SetHoleState(TEdge *e, OutRec *OutRec);
|
||||||
void DisposeIntersectNodes();
|
void DisposeIntersectNodes();
|
||||||
bool FixupIntersections();
|
bool FixupIntersectionOrder();
|
||||||
void FixupOutPolygon(OutRec &outRec);
|
void FixupOutPolygon(OutRec &outRec);
|
||||||
bool IsHole(TEdge *e);
|
bool IsHole(TEdge *e);
|
||||||
void FixHoleLinkage(OutRec *outRec);
|
void FixHoleLinkage(OutRec &outRec);
|
||||||
void AddJoin(TEdge *e1, TEdge *e2, int e1OutIdx = -1, int e2OutIdx = -1);
|
void AddJoin(TEdge *e1, TEdge *e2, int e1OutIdx = -1, int e2OutIdx = -1);
|
||||||
void ClearJoins();
|
void ClearJoins();
|
||||||
void AddHorzJoin(TEdge *e, int idx);
|
void AddHorzJoin(TEdge *e, int idx);
|
||||||
|
@ -283,6 +316,8 @@ private:
|
||||||
bool JoinPoints(const JoinRec *j, OutPt *&p1, OutPt *&p2);
|
bool JoinPoints(const JoinRec *j, OutPt *&p1, OutPt *&p2);
|
||||||
void FixupJoinRecs(JoinRec *j, OutPt *pt, unsigned startIdx);
|
void FixupJoinRecs(JoinRec *j, OutPt *pt, unsigned startIdx);
|
||||||
void JoinCommonEdges();
|
void JoinCommonEdges();
|
||||||
|
void FixupFirstLefts1(OutRec* OldOutRec, OutRec* NewOutRec);
|
||||||
|
void FixupFirstLefts2(OutRec* OldOutRec, OutRec* NewOutRec);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue