Commit 92e0eb62 authored by jean-pierre charras's avatar jean-pierre charras

Minor changes in dialogs to ensure a better likeness between dialogs on Linux...

Minor changes in dialogs to ensure a better likeness between dialogs on Linux and Windows (mainly, remove some wxStaticBoxSizer in dialogs)
parent 0dd413a7
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 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( ...@@ -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( ...@@ -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( ...@@ -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( ...@@ -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;
...@@ -112,45 +113,48 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( ...@@ -112,45 +113,48 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
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( 2 );
sbSizerOptions->Add( m_FieldVJustifyCtrl, 1, wxRIGHT|wxLEFT, 5 ); bSizerJustification->Add( m_FieldVJustifyCtrl, 1, wxRIGHT|wxLEFT, 5 );
fieldEditBoxSizer->Add( sbSizerOptions, 0, wxEXPAND, 5 );
wxStaticBoxSizer* visibilitySizer; fieldEditBoxSizer->Add( bSizerJustification, 0, wxEXPAND, 5 );
visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL );
wxBoxSizer* bSizerStyle;
bSizerStyle = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bShowRotateSizer; wxStaticBoxSizer* visibilitySizer;
bShowRotateSizer = new wxBoxSizer( wxVERTICAL ); visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), 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( ...@@ -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 );
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 = 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 );
wxBoxSizer* positionBoxSizer; m_staticTextUnitSize = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
positionBoxSizer = new wxBoxSizer( wxHORIZONTAL ); m_staticTextUnitSize->Wrap( -1 );
fgSizerPosSize->Add( m_staticTextUnitSize, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* posXBoxSizer; posXLabel = new wxStaticText( this, wxID_ANY, _("PosX"), wxDefaultPosition, wxDefaultSize, 0 );
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 );
wxBoxSizer* posYBoxSizer; m_staticTextUnitPosX = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
posYBoxSizer = new wxBoxSizer( wxVERTICAL ); m_staticTextUnitPosX->Wrap( -1 );
fgSizerPosSize->Add( m_staticTextUnitPosX, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
posYLabel = new wxStaticText( this, wxID_ANY, _("PosY(\")"), wxDefaultPosition, wxDefaultSize, 0 ); 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 );
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 );
positionBoxSizer->Add( posYBoxSizer, 1, wxALL|wxEXPAND, 5 );
fieldEditBoxSizer->Add( positionBoxSizer, 0, wxEXPAND, 5 ); fieldEditBoxSizer->Add( fgSizerPosSize, 1, wxEXPAND|wxTOP, 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( ...@@ -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();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 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 @@ ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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,482 ), 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 ...@@ -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: ...@@ -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( ...@@ -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 ...@@ -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 ...@@ -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" ), ...@@ -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" ), ...@@ -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 ...@@ -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() ...@@ -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 )
{ {
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 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 ...@@ -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, wxALL|wxEXPAND, 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, wxALL|wxEXPAND, 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, wxALL|wxEXPAND, 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 ...@@ -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 ...@@ -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 );
wxStaticBoxSizer* visibilitySizer; fieldEditBoxSizer->Add( bSizerJustify, 0, wxEXPAND, 5 );
visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL );
wxBoxSizer* bShowRotateSizer; wxBoxSizer* bSizerAspect;
bShowRotateSizer = new wxBoxSizer( wxVERTICAL ); bSizerAspect = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* visibilitySizer;
visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), 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, 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 ...@@ -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 ...@@ -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 );
wxBoxSizer* positionBoxSizer; m_staticTextUnitSize = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
positionBoxSizer = new wxBoxSizer( wxHORIZONTAL ); m_staticTextUnitSize->Wrap( -1 );
fgSizerPosSize->Add( m_staticTextUnitSize, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
wxBoxSizer* posXBoxSizer; posXLabel = new wxStaticText( this, wxID_ANY, _("PosX"), wxDefaultPosition, wxDefaultSize, 0 );
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 );
wxBoxSizer* posYBoxSizer; m_staticTextUnitPosX = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
posYBoxSizer = new wxBoxSizer( wxVERTICAL ); m_staticTextUnitPosX->Wrap( -1 );
fgSizerPosSize->Add( m_staticTextUnitPosX, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
posYLabel = new wxStaticText( this, wxID_ANY, _("PosY(\")"), wxDefaultPosition, wxDefaultSize, 0 ); 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 );
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 );
positionBoxSizer->Add( posYBoxSizer, 1, wxALL|wxEXPAND, 5 ); fieldEditBoxSizer->Add( fgSizerPosSize, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
fieldEditBoxSizer->Add( positionBoxSizer, 1, wxEXPAND, 5 );
fieldsSizer->Add( fieldEditBoxSizer, 3, wxEXPAND, 5 ); bSizerFieldsSetup->Add( fieldEditBoxSizer, 0, wxEXPAND, 5 );
mainSizer->Add( fieldsSizer, 1, wxEXPAND|wxALL, 5 );
mainSizer->Add( bSizerFieldsSetup, 1, wxEXPAND, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 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 ...@@ -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();
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project> <wxFormBuilder_Project>
<FileVersion major="1" minor="10" /> <FileVersion major="1" minor="11" />
<object class="Project" expanded="1"> <object class="Project" expanded="1">
<property name="class_decoration">; </property> <property name="class_decoration">; </property>
<property name="code_generation">C++</property> <property name="code_generation">C++</property>
<property name="disconnect_events">1</property> <property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property> <property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property> <property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property> <property name="embedded_files_path">res</property>
<property name="encoding">ANSI</property> <property name="encoding">ANSI</property>
...@@ -19,66 +20,33 @@ ...@@ -19,66 +20,33 @@
<property name="path">.</property> <property name="path">.</property>
<property name="precompiled_header"></property> <property name="precompiled_header"></property>
<property name="relative_path">1</property> <property name="relative_path">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property> <property name="skip_python_events">1</property>
<property name="use_enum">0</property> <property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property> <property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1"> <object class="Dialog" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_managed">0</property> <property name="aui_managed">0</property>
<property name="aui_name"></property> <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center"></property> <property name="center"></property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="event_handler">impl_virtual</property> <property name="event_handler">impl_virtual</property>
<property name="extra_style"></property> <property name="extra_style"></property>
<property name="fg"></property> <property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property> <property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="layer"></property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE</property> <property name="name">DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property> <property name="size">615,456</property>
<property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property>
<property name="size">615,550</property>
<property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property> <property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="title">Fields Properties</property> <property name="title">Fields Properties</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
...@@ -125,28 +93,22 @@ ...@@ -125,28 +93,22 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Fields</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">fieldsSizer</property> <property name="name">bSizerFieldsSetup</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">8</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT</property> <property name="flag">wxEXPAND</property>
<property name="proportion">5</property> <property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">gridStaticBoxSizer</property> <property name="name">bSizerFiledsList</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">8</property> <property name="border">8</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL|wxEXPAND</property>
...@@ -156,7 +118,10 @@ ...@@ -156,7 +118,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -176,7 +141,6 @@ ...@@ -176,7 +141,6 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -191,9 +155,7 @@ ...@@ -191,9 +155,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES</property> <property name="style">wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES</property>
...@@ -261,7 +223,10 @@ ...@@ -261,7 +223,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -283,7 +248,6 @@ ...@@ -283,7 +248,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Add Field</property> <property name="label">Add Field</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -298,9 +262,7 @@ ...@@ -298,9 +262,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
...@@ -349,7 +311,10 @@ ...@@ -349,7 +311,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -371,7 +336,6 @@ ...@@ -371,7 +336,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Delete Field</property> <property name="label">Delete Field</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -386,9 +350,7 @@ ...@@ -386,9 +350,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
...@@ -437,7 +399,10 @@ ...@@ -437,7 +399,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -459,7 +424,6 @@ ...@@ -459,7 +424,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Move Up</property> <property name="label">Move Up</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -474,9 +438,7 @@ ...@@ -474,9 +438,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
...@@ -521,7 +483,7 @@ ...@@ -521,7 +483,7 @@
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">3</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">fieldEditBoxSizer</property> <property name="name">fieldEditBoxSizer</property>
...@@ -529,18 +491,15 @@ ...@@ -529,18 +491,15 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_TOP|wxEXPAND|wxBOTTOM</property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Text Justification:</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">optionsSizer</property> <property name="name">bSizerJustify</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">8</property> <property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxRadioBox" expanded="1"> <object class="wxRadioBox" expanded="1">
...@@ -548,7 +507,10 @@ ...@@ -548,7 +507,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -570,7 +532,6 @@ ...@@ -570,7 +532,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Horiz. Justify</property> <property name="label">Horiz. Justify</property>
<property name="layer"></property>
<property name="majorDimension">1</property> <property name="majorDimension">1</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
...@@ -586,9 +547,7 @@ ...@@ -586,9 +547,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="selection">1</property> <property name="selection">1</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
...@@ -630,15 +589,18 @@ ...@@ -630,15 +589,18 @@
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">8</property> <property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">1</property>
<object class="wxRadioBox" expanded="1"> <object class="wxRadioBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -660,7 +622,6 @@ ...@@ -660,7 +622,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Vert. Justify</property> <property name="label">Vert. Justify</property>
<property name="layer"></property>
<property name="majorDimension">1</property> <property name="majorDimension">1</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
...@@ -676,9 +637,7 @@ ...@@ -676,9 +637,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="selection">0</property> <property name="selection">0</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
...@@ -725,23 +684,23 @@ ...@@ -725,23 +684,23 @@
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Visibility</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">visibilitySizer</property> <property name="name">bSizerAspect</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property> <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Visibility</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bShowRotateSizer</property> <property name="name">visibilitySizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxALL</property>
...@@ -751,7 +710,10 @@ ...@@ -751,7 +710,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -773,7 +735,6 @@ ...@@ -773,7 +735,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Show</property> <property name="label">Show</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -788,9 +749,7 @@ ...@@ -788,9 +749,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
...@@ -839,7 +798,10 @@ ...@@ -839,7 +798,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -861,7 +823,6 @@ ...@@ -861,7 +823,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Rotate</property> <property name="label">Rotate</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -876,9 +837,7 @@ ...@@ -876,9 +837,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
...@@ -929,7 +888,10 @@ ...@@ -929,7 +888,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -951,7 +913,6 @@ ...@@ -951,7 +913,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Style:</property> <property name="label">Style:</property>
<property name="layer"></property>
<property name="majorDimension">1</property> <property name="majorDimension">1</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
...@@ -967,10 +928,8 @@ ...@@ -967,10 +928,8 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property> <property name="selection">0</property>
<property name="selection">1</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style">wxRA_SPECIFY_COLS</property>
...@@ -1030,7 +989,10 @@ ...@@ -1030,7 +989,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -1051,7 +1013,6 @@ ...@@ -1051,7 +1013,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Field Name</property> <property name="label">Field Name</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -1066,19 +1027,13 @@ ...@@ -1066,19 +1027,13 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
...@@ -1117,7 +1072,10 @@ ...@@ -1117,7 +1072,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -1137,7 +1095,6 @@ ...@@ -1137,7 +1095,6 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -1153,9 +1110,7 @@ ...@@ -1153,9 +1110,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
...@@ -1219,7 +1174,10 @@ ...@@ -1219,7 +1174,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -1240,7 +1198,6 @@ ...@@ -1240,7 +1198,6 @@
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Field Value</property> <property name="label">Field Value</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -1255,19 +1212,13 @@ ...@@ -1255,19 +1212,13 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
...@@ -1306,7 +1257,10 @@ ...@@ -1306,7 +1257,10 @@
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -1326,7 +1280,6 @@ ...@@ -1326,7 +1280,6 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -1342,9 +1295,7 @@ ...@@ -1342,9 +1295,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
...@@ -1392,23 +1343,33 @@ ...@@ -1392,23 +1343,33 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxFlexGridSizer" expanded="1">
<property name="cols">3</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">textSizeBoxSizer</property> <property name="name">fgSizerPosSize</property>
<property name="orient">wxVERTICAL</property> <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property> <property name="permission">none</property>
<property name="rows">3</property>
<property name="vgap">0</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag"></property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -1428,8 +1389,7 @@ ...@@ -1428,8 +1389,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Size(&quot;)</property> <property name="label">Size</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -1444,19 +1404,13 @@ ...@@ -1444,19 +1404,13 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
...@@ -1488,14 +1442,17 @@ ...@@ -1488,14 +1442,17 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -1515,7 +1472,6 @@ ...@@ -1515,7 +1472,6 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -1531,9 +1487,7 @@ ...@@ -1531,9 +1487,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
...@@ -1577,36 +1531,102 @@ ...@@ -1577,36 +1531,102 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
</object>
</object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">1</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="0"> <object class="wxStaticText" expanded="1">
<property name="minimum_size"></property> <property name="BottomDockable">1</property>
<property name="name">positionBoxSizer</property> <property name="LeftDockable">1</property>
<property name="orient">wxHORIZONTAL</property> <property name="RightDockable">1</property>
<property name="permission">none</property> <property name="TopDockable">1</property>
<object class="sizeritem" expanded="1"> <property name="aui_layer"></property>
<property name="border">5</property> <property name="aui_name"></property>
<property name="flag">wxALL|wxEXPAND</property> <property name="aui_position"></property>
<property name="proportion">1</property> <property name="aui_row"></property>
<object class="wxBoxSizer" expanded="1"> <property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">unit</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">posXBoxSizer</property> <property name="moveable">1</property>
<property name="orient">wxVERTICAL</property> <property name="name">m_staticTextUnitSize</property>
<property name="permission">none</property> <property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag"></property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -1626,8 +1646,7 @@ ...@@ -1626,8 +1646,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">PosX(&quot;)</property> <property name="label">PosX</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -1642,19 +1661,13 @@ ...@@ -1642,19 +1661,13 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
...@@ -1686,14 +1699,17 @@ ...@@ -1686,14 +1699,17 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -1713,7 +1729,6 @@ ...@@ -1713,7 +1729,6 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -1729,9 +1744,7 @@ ...@@ -1729,9 +1744,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
...@@ -1775,27 +1788,102 @@ ...@@ -1775,27 +1788,102 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
</object>
</object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">1</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">unit</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">posYBoxSizer</property> <property name="moveable">1</property>
<property name="orient">wxVERTICAL</property> <property name="name">m_staticTextUnitPosX</property>
<property name="permission">none</property> <property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag"></property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -1815,8 +1903,7 @@ ...@@ -1815,8 +1903,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">PosY(&quot;)</property> <property name="label">PosY</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -1831,19 +1918,13 @@ ...@@ -1831,19 +1918,13 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
...@@ -1875,14 +1956,17 @@ ...@@ -1875,14 +1956,17 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
<property name="RightDockable">1</property> <property name="RightDockable">1</property>
<property name="TopDockable">1</property> <property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property> <property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property> <property name="best_size"></property>
<property name="bg"></property> <property name="bg"></property>
<property name="caption"></property> <property name="caption"></property>
...@@ -1902,7 +1986,6 @@ ...@@ -1902,7 +1986,6 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -1918,9 +2001,7 @@ ...@@ -1918,9 +2001,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pin_button">1</property> <property name="pin_button">1</property>
<property name="pos"></property> <property name="pos"></property>
<property name="position"></property>
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="row"></property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
...@@ -1964,12 +2045,174 @@ ...@@ -1964,12 +2045,174 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">unit</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticTextUnitPosY</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object> </object>
</object> </object>
</object> </object>
</object> </object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND | wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticline1</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 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 @@ ...@@ -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 ...@@ -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 ...@@ -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();
}; };
......
/******************************************************************************* /*******************************************************************************
* * * *
* 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 @@ ...@@ -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 2428, 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 *
* * * *
*******************************************************************************/ *******************************************************************************/
...@@ -63,8 +63,90 @@ inline long64 Abs(long64 val) ...@@ -63,8 +63,90 @@ inline long64 Abs(long64 val)
{ {
return val < 0 ? -val : val; return val < 0 ? -val : val;
} }
//------------------------------------------------------------------------------
// PolyTree methods ...
//------------------------------------------------------------------------------
void PolyTree::Clear()
{
for (PolyNodes::size_type i = 0; i < AllNodes.size(); ++i)
delete AllNodes[i];
AllNodes.resize(0);
Childs.resize(0);
}
//------------------------------------------------------------------------------
PolyNode* PolyTree::GetFirst() const
{
if (Childs.size() > 0)
return Childs[0];
else
return 0;
}
//------------------------------------------------------------------------------
int PolyTree::Total() const
{
return AllNodes.size();
}
//------------------------------------------------------------------------------
// PolyNode methods ...
//------------------------------------------------------------------------------
PolyNode::PolyNode(): Childs(), Parent(0), Index(0)
{
}
//------------------------------------------------------------------------------
int PolyNode::ChildCount() const
{
return Childs.size();
}
//------------------------------------------------------------------------------
void PolyNode::AddChild(PolyNode& child)
{
unsigned cnt = Childs.size();
Childs.push_back(&child);
child.Parent = this;
child.Index = cnt;
}
//------------------------------------------------------------------------------
PolyNode* PolyNode::GetNext() const
{
if (Childs.size() > 0)
return Childs[0];
else
return GetNextSiblingUp();
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
PolyNode* PolyNode::GetNextSiblingUp() const
{
if (!Parent) //protects against PolyTree.GetNextSiblingUp()
return 0;
else if (Index == Parent->Childs.size() - 1)
return Parent->GetNextSiblingUp();
else
return Parent->Childs[Index + 1];
}
//------------------------------------------------------------------------------
bool PolyNode::IsHole() const
{
bool result = true;
PolyNode* node = Parent;
while (node)
{
result = !result;
node = node->Parent;
}
return result;
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Int128 class (enables safe math on signed 64bit integers) // Int128 class (enables safe math on signed 64bit integers)
// eg Int128 val1((long64)9223372036854775807); //ie 2^63 -1 // eg Int128 val1((long64)9223372036854775807); //ie 2^63 -1
...@@ -77,8 +159,8 @@ class Int128 ...@@ -77,8 +159,8 @@ class Int128
{ {
public: public:
long64 hi;
ulong64 lo; ulong64 lo;
long64 hi;
Int128(long64 _lo = 0) Int128(long64 _lo = 0)
{ {
...@@ -86,9 +168,10 @@ class Int128 ...@@ -86,9 +168,10 @@ class Int128
if (_lo < 0) hi = -1; else hi = 0; if (_lo < 0) hi = -1; else hi = 0;
} }
Int128(const Int128 &val): hi(val.hi), lo(val.lo){}
Int128(const long64& _hi, const ulong64& _lo): hi(_hi), lo(_lo){} Int128(const Int128 &val): lo(val.lo), hi(val.hi){}
Int128(const long64& _hi, const ulong64& _lo): lo(_lo), hi(_hi){}
long64 operator = (const long64 &val) long64 operator = (const long64 &val)
{ {
...@@ -423,7 +506,7 @@ void SetDx(TEdge &e) ...@@ -423,7 +506,7 @@ void SetDx(TEdge &e)
e.deltaY = (e.ytop - e.ybot); e.deltaY = (e.ytop - e.ybot);
if (e.deltaY == 0) e.dx = HORIZONTAL; if (e.deltaY == 0) e.dx = HORIZONTAL;
else e.dx = (double)(e.deltaX) / (e.deltaY); else e.dx = (double)(e.deltaX) / e.deltaY;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -460,14 +543,18 @@ bool IntersectPoint(TEdge &edge1, TEdge &edge2, ...@@ -460,14 +543,18 @@ bool IntersectPoint(TEdge &edge1, TEdge &edge2,
IntPoint &ip, bool UseFullInt64Range) IntPoint &ip, bool UseFullInt64Range)
{ {
double b1, b2; double b1, b2;
if (SlopesEqual(edge1, edge2, UseFullInt64Range)) return false; if (SlopesEqual(edge1, edge2, UseFullInt64Range))
{
if (edge2.ybot > edge1.ybot) ip.Y = edge2.ybot;
else ip.Y = edge1.ybot;
return false;
}
else if (NEAR_ZERO(edge1.dx)) else if (NEAR_ZERO(edge1.dx))
{ {
ip.X = edge1.xbot; ip.X = edge1.xbot;
if (NEAR_EQUAL(edge2.dx, HORIZONTAL)) if (NEAR_EQUAL(edge2.dx, HORIZONTAL))
{
ip.Y = edge2.ybot; ip.Y = edge2.ybot;
} else else
{ {
b2 = edge2.ybot - (edge2.xbot / edge2.dx); b2 = edge2.ybot - (edge2.xbot / edge2.dx);
ip.Y = Round(ip.X / edge2.dx + b2); ip.Y = Round(ip.X / edge2.dx + b2);
...@@ -477,14 +564,14 @@ bool IntersectPoint(TEdge &edge1, TEdge &edge2, ...@@ -477,14 +564,14 @@ bool IntersectPoint(TEdge &edge1, TEdge &edge2,
{ {
ip.X = edge2.xbot; ip.X = edge2.xbot;
if (NEAR_EQUAL(edge1.dx, HORIZONTAL)) if (NEAR_EQUAL(edge1.dx, HORIZONTAL))
{
ip.Y = edge1.ybot; ip.Y = edge1.ybot;
} else else
{ {
b1 = edge1.ybot - (edge1.xbot / edge1.dx); b1 = edge1.ybot - (edge1.xbot / edge1.dx);
ip.Y = Round(ip.X / edge1.dx + b1); ip.Y = Round(ip.X / edge1.dx + b1);
} }
} else }
else
{ {
b1 = edge1.xbot - edge1.ybot * edge1.dx; b1 = edge1.xbot - edge1.ybot * edge1.dx;
b2 = edge2.xbot - edge2.ybot * edge2.dx; b2 = edge2.xbot - edge2.ybot * edge2.dx;
...@@ -503,7 +590,8 @@ bool IntersectPoint(TEdge &edge1, TEdge &edge2, ...@@ -503,7 +590,8 @@ bool IntersectPoint(TEdge &edge1, TEdge &edge2,
ip.X = edge1.xtop; ip.X = edge1.xtop;
ip.Y = edge1.ytop; ip.Y = edge1.ytop;
return TopX(edge2, edge1.ytop) < edge1.xtop; return TopX(edge2, edge1.ytop) < edge1.xtop;
} else }
else
{ {
ip.X = edge2.xtop; ip.X = edge2.xtop;
ip.Y = edge2.ytop; ip.Y = edge2.ytop;
...@@ -670,7 +758,8 @@ OutPt* GetBottomPt(OutPt *pp) ...@@ -670,7 +758,8 @@ OutPt* GetBottomPt(OutPt *pp)
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool FindSegment(OutPt* &pp, IntPoint &pt1, IntPoint &pt2) bool FindSegment(OutPt* &pp, bool UseFullInt64Range,
IntPoint &pt1, IntPoint &pt2)
{ {
//outPt1 & outPt2 => the overlap segment (if the function returns true) //outPt1 & outPt2 => the overlap segment (if the function returns true)
if (!pp) return false; if (!pp) return false;
...@@ -678,8 +767,8 @@ bool FindSegment(OutPt* &pp, IntPoint &pt1, IntPoint &pt2) ...@@ -678,8 +767,8 @@ bool FindSegment(OutPt* &pp, IntPoint &pt1, IntPoint &pt2)
IntPoint pt1a = pt1, pt2a = pt2; IntPoint pt1a = pt1, pt2a = pt2;
do do
{ {
if (SlopesEqual(pt1a, pt2a, pp->pt, pp->prev->pt, true) && if (SlopesEqual(pt1a, pt2a, pp->pt, pp->prev->pt, UseFullInt64Range) &&
SlopesEqual(pt1a, pt2a, pp->pt, true) && SlopesEqual(pt1a, pt2a, pp->pt, UseFullInt64Range) &&
GetOverlapSegment(pt1a, pt2a, pp->pt, pp->prev->pt, pt1, pt2)) GetOverlapSegment(pt1a, pt2a, pp->pt, pp->prev->pt, pt1, pt2))
return true; return true;
pp = pp->next; pp = pp->next;
...@@ -1081,7 +1170,7 @@ bool Clipper::Execute(ClipType clipType, Polygons &solution, ...@@ -1081,7 +1170,7 @@ bool Clipper::Execute(ClipType clipType, Polygons &solution,
m_SubjFillType = subjFillType; m_SubjFillType = subjFillType;
m_ClipFillType = clipFillType; m_ClipFillType = clipFillType;
m_ClipType = clipType; m_ClipType = clipType;
m_UsingExPolygons = false; m_UsingPolyTree = false;
bool succeeded = ExecuteInternal(); bool succeeded = ExecuteInternal();
if (succeeded) BuildResult(solution); if (succeeded) BuildResult(solution);
m_ExecuteLocked = false; m_ExecuteLocked = false;
...@@ -1089,79 +1178,34 @@ bool Clipper::Execute(ClipType clipType, Polygons &solution, ...@@ -1089,79 +1178,34 @@ bool Clipper::Execute(ClipType clipType, Polygons &solution,
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool Clipper::Execute(ClipType clipType, ExPolygons &solution, bool Clipper::Execute(ClipType clipType, PolyTree& polytree,
PolyFillType subjFillType, PolyFillType clipFillType) PolyFillType subjFillType, PolyFillType clipFillType)
{ {
if( m_ExecuteLocked ) return false; if( m_ExecuteLocked ) return false;
m_ExecuteLocked = true; m_ExecuteLocked = true;
solution.resize(0);
m_SubjFillType = subjFillType; m_SubjFillType = subjFillType;
m_ClipFillType = clipFillType; m_ClipFillType = clipFillType;
m_ClipType = clipType; m_ClipType = clipType;
m_UsingExPolygons = true; m_UsingPolyTree = true;
bool succeeded = ExecuteInternal(); bool succeeded = ExecuteInternal();
if (succeeded) BuildResultEx(solution); if (succeeded) BuildResult2(polytree);
m_ExecuteLocked = false; m_ExecuteLocked = false;
return succeeded; return succeeded;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool PolySort(OutRec *or1, OutRec *or2) void Clipper::FixHoleLinkage(OutRec &outRec)
{
if (or1 == or2) return false;
if (!or1->pts || !or2->pts)
{
if (or1->pts != or2->pts)
{
return or1->pts ? true : false;
}
else return false;
}
int i1, i2;
if (or1->isHole)
i1 = or1->FirstLeft->idx; else
i1 = or1->idx;
if (or2->isHole)
i2 = or2->FirstLeft->idx; else
i2 = or2->idx;
int result = i1 - i2;
if (result == 0 && (or1->isHole != or2->isHole))
{
return or1->isHole ? false : true;
}
else return result < 0;
}
//------------------------------------------------------------------------------
OutRec* FindAppendLinkEnd(OutRec *outRec)
{
while (outRec->AppendLink) outRec = outRec->AppendLink;
return outRec;
}
//------------------------------------------------------------------------------
void Clipper::FixHoleLinkage(OutRec *outRec)
{ {
OutRec *tmp; //skip OutRecs that (a) contain outermost polygons or
if (outRec->bottomPt) //(b) already have the correct owner/child linkage ...
tmp = m_PolyOuts[outRec->bottomPt->idx]->FirstLeft; if (!outRec.FirstLeft ||
else (outRec.isHole != outRec.FirstLeft->isHole &&
tmp = outRec->FirstLeft; outRec.FirstLeft->pts)) return;
if (outRec == tmp) throw clipperException("HoleLinkage error");
if (tmp) OutRec* orfl = outRec.FirstLeft;
{ while (orfl && ((orfl->isHole == outRec.isHole) || !orfl->pts))
if (tmp->AppendLink) tmp = FindAppendLinkEnd(tmp); orfl = orfl->FirstLeft;
if (tmp == outRec) tmp = 0; outRec.FirstLeft = orfl;
else if (tmp->isHole)
{
FixHoleLinkage(tmp);
tmp = tmp->FirstLeft;
}
}
outRec->FirstLeft = tmp;
if (!tmp) outRec->isHole = false;
outRec->AppendLink = 0;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -1196,15 +1240,12 @@ bool Clipper::ExecuteInternal() ...@@ -1196,15 +1240,12 @@ bool Clipper::ExecuteInternal()
if (!outRec->pts) continue; if (!outRec->pts) continue;
FixupOutPolygon(*outRec); FixupOutPolygon(*outRec);
if (!outRec->pts) continue; if (!outRec->pts) continue;
if (outRec->isHole && m_UsingExPolygons) FixHoleLinkage(outRec);
if ((outRec->isHole ^ m_ReverseOutput) == (Area(*outRec, m_UseFullRange) > 0)) if ((outRec->isHole ^ m_ReverseOutput) == (Area(*outRec, m_UseFullRange) > 0))
ReversePolyPtLinks(outRec->pts); ReversePolyPtLinks(outRec->pts);
} }
if (m_Joins.size() > 0) JoinCommonEdges(); if (m_Joins.size() > 0) JoinCommonEdges();
if (m_UsingExPolygons)
std::sort(m_PolyOuts.begin(), m_PolyOuts.end(), PolySort);
} }
ClearJoins(); ClearJoins();
...@@ -1493,14 +1534,10 @@ void Clipper::CopyAELToSEL() ...@@ -1493,14 +1534,10 @@ void Clipper::CopyAELToSEL()
{ {
TEdge* e = m_ActiveEdges; TEdge* e = m_ActiveEdges;
m_SortedEdges = e; m_SortedEdges = e;
if (!m_ActiveEdges) return;
m_SortedEdges->prevInSEL = 0;
e = e->nextInAEL;
while ( e ) while ( e )
{ {
e->prevInSEL = e->prevInAEL; e->prevInSEL = e->prevInAEL;
e->prevInSEL->nextInSEL = e; e->nextInSEL = e->nextInAEL;
e->nextInSEL = 0;
e = e->nextInAEL; e = e->nextInAEL;
} }
} }
...@@ -1585,9 +1622,7 @@ void Clipper::InsertLocalMinimaIntoAEL(const long64 botY) ...@@ -1585,9 +1622,7 @@ void Clipper::InsertLocalMinimaIntoAEL(const long64 botY)
AddLocalMinPoly( lb, rb, IntPoint(lb->xcurr, m_CurrentLM->Y) ); AddLocalMinPoly( lb, rb, IntPoint(lb->xcurr, m_CurrentLM->Y) );
//if any output polygons share an edge, they'll need joining later ... //if any output polygons share an edge, they'll need joining later ...
if (rb->outIdx >= 0) if (rb->outIdx >= 0 && NEAR_EQUAL(rb->dx, HORIZONTAL))
{
if (NEAR_EQUAL(rb->dx, HORIZONTAL))
{ {
for (HorzJoinList::size_type i = 0; i < m_HorizJoins.size(); ++i) for (HorzJoinList::size_type i = 0; i < m_HorizJoins.size(); ++i)
{ {
...@@ -1601,7 +1636,6 @@ void Clipper::InsertLocalMinimaIntoAEL(const long64 botY) ...@@ -1601,7 +1636,6 @@ void Clipper::InsertLocalMinimaIntoAEL(const long64 botY)
AddJoin(hj->edge, rb, hj->savedIdx); AddJoin(hj->edge, rb, hj->savedIdx);
} }
} }
}
if( lb->nextInAEL != rb ) if( lb->nextInAEL != rb )
{ {
...@@ -1732,17 +1766,11 @@ void Clipper::IntersectEdges(TEdge *e1, TEdge *e2, ...@@ -1732,17 +1766,11 @@ void Clipper::IntersectEdges(TEdge *e1, TEdge *e2,
} }
else if ( e1Contributing ) else if ( e1Contributing )
{ {
if ((e2Wc == 0 || e2Wc == 1) && if (e2Wc == 0 || e2Wc == 1) DoEdge1(e1, e2, pt);
(m_ClipType != ctIntersection ||
e2->polyType == ptSubject || (e2->windCnt2 != 0)))
DoEdge1(e1, e2, pt);
} }
else if ( e2contributing ) else if ( e2contributing )
{ {
if ((e1Wc == 0 || e1Wc == 1) && if (e1Wc == 0 || e1Wc == 1) DoEdge2(e1, e2, pt);
(m_ClipType != ctIntersection ||
e1->polyType == ptSubject || (e1->windCnt2 != 0)))
DoEdge2(e1, e2, pt);
} }
else if ( (e1Wc == 0 || e1Wc == 1) && else if ( (e1Wc == 0 || e1Wc == 1) &&
(e2Wc == 0 || e2Wc == 1) && !e1stops && !e2stops ) (e2Wc == 0 || e2Wc == 1) && !e1stops && !e2stops )
...@@ -1918,7 +1946,9 @@ void Clipper::AppendPolygon(TEdge *e1, TEdge *e2) ...@@ -1918,7 +1946,9 @@ void Clipper::AppendPolygon(TEdge *e1, TEdge *e2)
} }
outRec2->pts = 0; outRec2->pts = 0;
outRec2->bottomPt = 0; outRec2->bottomPt = 0;
outRec2->AppendLink = outRec1;
outRec2->FirstLeft = outRec1;
int OKIdx = e1->outIdx; int OKIdx = e1->outIdx;
int ObsoleteIdx = e2->outIdx; int ObsoleteIdx = e2->outIdx;
...@@ -1957,9 +1987,9 @@ OutRec* Clipper::CreateOutRec() ...@@ -1957,9 +1987,9 @@ OutRec* Clipper::CreateOutRec()
OutRec* result = new OutRec; OutRec* result = new OutRec;
result->isHole = false; result->isHole = false;
result->FirstLeft = 0; result->FirstLeft = 0;
result->AppendLink = 0;
result->pts = 0; result->pts = 0;
result->bottomPt = 0; result->bottomPt = 0;
result->polyNode = 0;
return result; return result;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -2056,9 +2086,6 @@ TEdge *GetMaximaPair(TEdge *e) ...@@ -2056,9 +2086,6 @@ TEdge *GetMaximaPair(TEdge *e)
void Clipper::SwapPositionsInAEL(TEdge *edge1, TEdge *edge2) void Clipper::SwapPositionsInAEL(TEdge *edge1, TEdge *edge2)
{ {
if( !edge1->nextInAEL && !edge1->prevInAEL ) return;
if( !edge2->nextInAEL && !edge2->prevInAEL ) return;
if( edge1->nextInAEL == edge2 ) if( edge1->nextInAEL == edge2 )
{ {
TEdge* next = edge2->nextInAEL; TEdge* next = edge2->nextInAEL;
...@@ -2176,13 +2203,6 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge) ...@@ -2176,13 +2203,6 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge)
TEdge* e = GetNextInAEL( horzEdge , dir ); TEdge* e = GetNextInAEL( horzEdge , dir );
while( e ) while( e )
{ {
TEdge* eNext = GetNextInAEL( e, dir );
if (eMaxPair ||
((dir == dLeftToRight) && (e->xcurr <= horzRight)) ||
((dir == dRightToLeft) && (e->xcurr >= horzLeft)))
{
//ok, so far it looks like we're still in range of the horizontal edge
if ( e->xcurr == horzEdge->xtop && !eMaxPair ) if ( e->xcurr == horzEdge->xtop && !eMaxPair )
{ {
if (SlopesEqual(*e, *horzEdge->nextInLML, m_UseFullRange)) if (SlopesEqual(*e, *horzEdge->nextInLML, m_UseFullRange))
...@@ -2198,6 +2218,13 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge) ...@@ -2198,6 +2218,13 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge)
break; break;
} }
TEdge* eNext = GetNextInAEL( e, dir );
if (eMaxPair ||
((dir == dLeftToRight) && (e->xcurr < horzRight)) ||
((dir == dRightToLeft) && (e->xcurr > horzLeft)))
{
//so far we're still in range of the horizontal edge
if( e == eMaxPair ) if( e == eMaxPair )
{ {
//horzEdge is evidently a maxima horizontal and we've arrived at its end. //horzEdge is evidently a maxima horizontal and we've arrived at its end.
...@@ -2233,8 +2260,8 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge) ...@@ -2233,8 +2260,8 @@ void Clipper::ProcessHorizontal(TEdge *horzEdge)
} }
SwapPositionsInAEL( horzEdge, e ); SwapPositionsInAEL( horzEdge, e );
} }
else if( (dir == dLeftToRight && e->xcurr > horzRight && m_SortedEdges) || else if( (dir == dLeftToRight && e->xcurr >= horzRight) ||
(dir == dRightToLeft && e->xcurr < horzLeft && m_SortedEdges) ) break; (dir == dRightToLeft && e->xcurr <= horzLeft) ) break;
e = eNext; e = eNext;
} //end while } //end while
...@@ -2283,7 +2310,7 @@ bool Clipper::ProcessIntersections(const long64 botY, const long64 topY) ...@@ -2283,7 +2310,7 @@ bool Clipper::ProcessIntersections(const long64 botY, const long64 topY)
try { try {
BuildIntersectList(botY, topY); BuildIntersectList(botY, topY);
if ( !m_IntersectNodes) return true; if ( !m_IntersectNodes) return true;
if ( FixupIntersections() ) ProcessIntersectList(); if ( FixupIntersectionOrder() ) ProcessIntersectList();
else return false; else return false;
} }
catch(...) { catch(...) {
...@@ -2312,16 +2339,12 @@ void Clipper::BuildIntersectList(const long64 botY, const long64 topY) ...@@ -2312,16 +2339,12 @@ void Clipper::BuildIntersectList(const long64 botY, const long64 topY)
//prepare for sorting ... //prepare for sorting ...
TEdge* e = m_ActiveEdges; TEdge* e = m_ActiveEdges;
e->tmpX = TopX( *e, topY );
m_SortedEdges = e; m_SortedEdges = e;
m_SortedEdges->prevInSEL = 0;
e = e->nextInAEL;
while( e ) while( e )
{ {
e->prevInSEL = e->prevInAEL; e->prevInSEL = e->prevInAEL;
e->prevInSEL->nextInSEL = e; e->nextInSEL = e->nextInAEL;
e->nextInSEL = 0; e->xcurr = TopX( *e, topY );
e->tmpX = TopX( *e, topY );
e = e->nextInAEL; e = e->nextInAEL;
} }
...@@ -2335,9 +2358,10 @@ void Clipper::BuildIntersectList(const long64 botY, const long64 topY) ...@@ -2335,9 +2358,10 @@ void Clipper::BuildIntersectList(const long64 botY, const long64 topY)
{ {
TEdge *eNext = e->nextInSEL; TEdge *eNext = e->nextInSEL;
IntPoint pt; IntPoint pt;
if(e->tmpX > eNext->tmpX && if(e->xcurr > eNext->xcurr)
IntersectPoint(*e, *eNext, pt, m_UseFullRange))
{ {
if (!IntersectPoint(*e, *eNext, pt, m_UseFullRange) && e->xcurr > eNext->xcurr +1)
throw clipperException("Intersection error");
if (pt.Y > botY) if (pt.Y > botY)
{ {
pt.Y = botY; pt.Y = botY;
...@@ -2427,7 +2451,8 @@ void Clipper::DoMaxima(TEdge *e, long64 topY) ...@@ -2427,7 +2451,8 @@ void Clipper::DoMaxima(TEdge *e, long64 topY)
{ {
if (!eNext) throw clipperException("DoMaxima error"); if (!eNext) throw clipperException("DoMaxima error");
IntersectEdges( e, eNext, IntPoint(X, topY), ipBoth ); IntersectEdges( e, eNext, IntPoint(X, topY), ipBoth );
eNext = eNext->nextInAEL; SwapPositionsInAEL(e, eNext);
eNext = e->nextInAEL;
} }
if( e->outIdx < 0 && eMaxPair->outIdx < 0 ) if( e->outIdx < 0 && eMaxPair->outIdx < 0 )
{ {
...@@ -2575,61 +2600,77 @@ void Clipper::FixupOutPolygon(OutRec &outRec) ...@@ -2575,61 +2600,77 @@ void Clipper::FixupOutPolygon(OutRec &outRec)
void Clipper::BuildResult(Polygons &polys) void Clipper::BuildResult(Polygons &polys)
{ {
int k = 0; polys.reserve(m_PolyOuts.size());
polys.resize(m_PolyOuts.size());
for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i) for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i)
{ {
if (m_PolyOuts[i]->pts) if (m_PolyOuts[i]->pts)
{ {
Polygon* pg = &polys[k]; Polygon pg;
pg->clear();
OutPt* p = m_PolyOuts[i]->pts; OutPt* p = m_PolyOuts[i]->pts;
do do
{ {
pg->push_back(p->pt); pg.push_back(p->pt);
p = p->prev; p = p->prev;
} while (p != m_PolyOuts[i]->pts); } while (p != m_PolyOuts[i]->pts);
//make sure each polygon has at least 3 vertices ... if (pg.size() > 2)
if (pg->size() < 3) pg->clear(); else k++; polys.push_back(pg);
} }
} }
polys.resize(k);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void Clipper::BuildResultEx(ExPolygons &polys) int PointCount(OutPt *pts)
{ {
PolyOutList::size_type i = 0; if (!pts) return 0;
int k = 0; int result = 0;
polys.resize(0); OutPt* p = pts;
polys.reserve(m_PolyOuts.size()); do
while (i < m_PolyOuts.size() && m_PolyOuts[i]->pts)
{ {
ExPolygon epg; result++;
OutPt* p = m_PolyOuts[i]->pts; p = p->next;
do { }
epg.outer.push_back(p->pt); while (p != pts);
p = p->prev; return result;
} while (p != m_PolyOuts[i]->pts); }
i++; //------------------------------------------------------------------------------
//make sure polygons have at least 3 vertices ...
if (epg.outer.size() < 3) continue; void Clipper::BuildResult2(PolyTree& polytree)
while (i < m_PolyOuts.size() {
&& m_PolyOuts[i]->pts && m_PolyOuts[i]->isHole) polytree.Clear();
polytree.AllNodes.reserve(m_PolyOuts.size());
//add each output polygon/contour to polytree ...
for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); i++)
{ {
Polygon pg; OutRec* outRec = m_PolyOuts[i];
p = m_PolyOuts[i]->pts; int cnt = PointCount(outRec->pts);
do { if (cnt < 3) continue;
pg.push_back(p->pt); FixHoleLinkage(*outRec);
p = p->prev; PolyNode* pn = new PolyNode();
} while (p != m_PolyOuts[i]->pts); //nb: polytree takes ownership of all the PolyNodes
epg.holes.push_back(pg); polytree.AllNodes.push_back(pn);
i++; outRec->polyNode = pn;
pn->Parent = 0;
pn->Index = 0;
pn->Contour.reserve(cnt);
OutPt *op = outRec->pts;
for (int j = 0; j < cnt; j++)
{
pn->Contour.push_back(op->pt);
op = op->prev;
} }
polys.push_back(epg);
k++;
} }
polys.resize(k);
//fixup PolyNode links etc ...
polytree.Childs.reserve(m_PolyOuts.size());
for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); i++)
{
OutRec* outRec = m_PolyOuts[i];
if (!outRec->polyNode) continue;
if (outRec->FirstLeft)
outRec->FirstLeft->polyNode->AddChild(*outRec->polyNode);
else
polytree.AddChild(*outRec->polyNode);
}
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -2649,7 +2690,7 @@ void SwapIntersectNodes(IntersectNode &int1, IntersectNode &int2) ...@@ -2649,7 +2690,7 @@ void SwapIntersectNodes(IntersectNode &int1, IntersectNode &int2)
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool Clipper::FixupIntersections() bool Clipper::FixupIntersectionOrder()
{ {
if ( !m_IntersectNodes->next ) return true; if ( !m_IntersectNodes->next ) return true;
...@@ -2664,8 +2705,8 @@ bool Clipper::FixupIntersections() ...@@ -2664,8 +2705,8 @@ bool Clipper::FixupIntersections()
else if (e1->nextInSEL == int1->edge2) e2 = e1->nextInSEL; else if (e1->nextInSEL == int1->edge2) e2 = e1->nextInSEL;
else else
{ {
//The current intersection is out of order, so try and swap it with //The current intersection (Int1) is out of order (since it doesn't
//a subsequent intersection ... //contain adjacent edges), so swap it with a subsequent intersection ...
while (int2) while (int2)
{ {
if (int2->edge1->nextInSEL == int2->edge2 || if (int2->edge1->nextInSEL == int2->edge2 ||
...@@ -2674,7 +2715,8 @@ bool Clipper::FixupIntersections() ...@@ -2674,7 +2715,8 @@ bool Clipper::FixupIntersections()
} }
if ( !int2 ) return false; //oops!!! if ( !int2 ) return false; //oops!!!
//found an intersect node that can be swapped ... //found an intersect node (Int2) that does contain adjacent edges,
//so prepare to process it before Int1 ...
SwapIntersectNodes(*int1, *int2); SwapIntersectNodes(*int1, *int2);
e1 = int1->edge1; e1 = int1->edge1;
e2 = int1->edge2; e2 = int1->edge2;
...@@ -2758,15 +2800,16 @@ bool Clipper::JoinPoints(const JoinRec *j, OutPt *&p1, OutPt *&p2) ...@@ -2758,15 +2800,16 @@ bool Clipper::JoinPoints(const JoinRec *j, OutPt *&p1, OutPt *&p2)
OutPt *pp2a = outRec2->pts; OutPt *pp2a = outRec2->pts;
IntPoint pt1 = j->pt2a, pt2 = j->pt2b; IntPoint pt1 = j->pt2a, pt2 = j->pt2b;
IntPoint pt3 = j->pt1a, pt4 = j->pt1b; IntPoint pt3 = j->pt1a, pt4 = j->pt1b;
if (!FindSegment(pp1a, pt1, pt2)) return false; if (!FindSegment(pp1a, m_UseFullRange, pt1, pt2)) return false;
if (outRec1 == outRec2) if (outRec1 == outRec2)
{ {
//we're searching the same polygon for overlapping segments so //we're searching the same polygon for overlapping segments so
//segment 2 mustn't be the same as segment 1 ... //segment 2 mustn't be the same as segment 1 ...
pp2a = pp1a->next; pp2a = pp1a->next;
if (!FindSegment(pp2a, pt3, pt4) || (pp2a == pp1a)) return false; if (!FindSegment(pp2a, m_UseFullRange, pt3, pt4) || (pp2a == pp1a))
return false;
} }
else if (!FindSegment(pp2a, pt3, pt4)) return false; else if (!FindSegment(pp2a, m_UseFullRange, pt3, pt4)) return false;
if (!GetOverlapSegment(pt1, pt2, pt3, pt4, pt1, pt2)) return false; if (!GetOverlapSegment(pt1, pt2, pt3, pt4, pt1, pt2)) return false;
...@@ -2833,17 +2876,76 @@ void Clipper::FixupJoinRecs(JoinRec *j, OutPt *pt, unsigned startIdx) ...@@ -2833,17 +2876,76 @@ void Clipper::FixupJoinRecs(JoinRec *j, OutPt *pt, unsigned startIdx)
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
bool Poly2ContainsPoly1(OutPt* outPt1, OutPt* outPt2, bool UseFullInt64Range)
{
//find the first pt in outPt1 that isn't also a vertex of outPt2 ...
OutPt* outPt = outPt1;
do
{
if (!PointIsVertex(outPt->pt, outPt2)) break;
outPt = outPt->next;
}
while (outPt != outPt1);
bool result;
//sometimes a point on one polygon can be touching the other polygon
//so to be totally confident outPt1 is inside outPt2 repeat ...
do
{
result = PointInPolygon(outPt->pt, outPt2, UseFullInt64Range);
outPt = outPt->next;
}
while (result && outPt != outPt1);
return result;
}
//----------------------------------------------------------------------
void Clipper::FixupFirstLefts1(OutRec* OldOutRec, OutRec* NewOutRec)
{
for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i)
{
OutRec* outRec = m_PolyOuts[i];
if (outRec->pts && outRec->FirstLeft == OldOutRec)
{
if (Poly2ContainsPoly1(outRec->pts, NewOutRec->pts, m_UseFullRange))
outRec->FirstLeft = NewOutRec;
}
}
}
//----------------------------------------------------------------------
void Clipper::FixupFirstLefts2(OutRec* OldOutRec, OutRec* NewOutRec)
{
for (PolyOutList::size_type i = 0; i < m_PolyOuts.size(); ++i)
{
OutRec* outRec = m_PolyOuts[i];
if (outRec->FirstLeft == OldOutRec) outRec->FirstLeft = NewOutRec;
}
}
//----------------------------------------------------------------------
void Clipper::JoinCommonEdges() void Clipper::JoinCommonEdges()
{ {
for (JoinList::size_type i = 0; i < m_Joins.size(); i++) for (JoinList::size_type i = 0; i < m_Joins.size(); i++)
{ {
JoinRec* j = m_Joins[i]; JoinRec* j = m_Joins[i];
OutPt *p1, *p2;
if (!JoinPoints(j, p1, p2)) continue;
OutRec *outRec1 = m_PolyOuts[j->poly1Idx]; OutRec *outRec1 = m_PolyOuts[j->poly1Idx];
OutRec *outRec2 = m_PolyOuts[j->poly2Idx]; OutRec *outRec2 = m_PolyOuts[j->poly2Idx];
if (!outRec1->pts || !outRec2->pts) continue;
//get the polygon fragment with the correct hole state (FirstLeft)
//before calling JoinPoints() ...
OutRec *holeStateRec;
if (outRec1 == outRec2) holeStateRec = outRec1;
else if (Param1RightOfParam2(outRec1, outRec2)) holeStateRec = outRec2;
else if (Param1RightOfParam2(outRec2, outRec1)) holeStateRec = outRec1;
else holeStateRec = GetLowermostRec(outRec1, outRec2);
OutPt *p1, *p2;
if (!JoinPoints(j, p1, p2)) continue;
if (outRec1 == outRec2) if (outRec1 == outRec2)
{ {
//instead of joining two polygons, we've just created a new one by //instead of joining two polygons, we've just created a new one by
...@@ -2859,13 +2961,17 @@ void Clipper::JoinCommonEdges() ...@@ -2859,13 +2961,17 @@ void Clipper::JoinCommonEdges()
outRec2->bottomPt = outRec2->pts; outRec2->bottomPt = outRec2->pts;
outRec2->bottomPt->idx = outRec2->idx; outRec2->bottomPt->idx = outRec2->idx;
if (PointInPolygon(outRec2->pts->pt, outRec1->pts, m_UseFullRange)) if (Poly2ContainsPoly1(outRec2->pts, outRec1->pts, m_UseFullRange))
{ {
//outRec2 is contained by outRec1 ... //outRec2 is contained by outRec1 ...
outRec2->isHole = !outRec1->isHole; outRec2->isHole = !outRec1->isHole;
outRec2->FirstLeft = outRec1; outRec2->FirstLeft = outRec1;
FixupJoinRecs(j, p2, i+1); FixupJoinRecs(j, p2, i+1);
//fixup FirstLeft pointers that may need reassigning to OutRec1
if (m_UsingPolyTree) FixupFirstLefts2(outRec2, outRec1);
FixupOutPolygon(*outRec1); //nb: do this BEFORE testing orientation FixupOutPolygon(*outRec1); //nb: do this BEFORE testing orientation
FixupOutPolygon(*outRec2); // but AFTER calling FixupJoinRecs() FixupOutPolygon(*outRec2); // but AFTER calling FixupJoinRecs()
...@@ -2873,7 +2979,7 @@ void Clipper::JoinCommonEdges() ...@@ -2873,7 +2979,7 @@ void Clipper::JoinCommonEdges()
if ((outRec2->isHole ^ m_ReverseOutput) == (Area(*outRec2, m_UseFullRange) > 0)) if ((outRec2->isHole ^ m_ReverseOutput) == (Area(*outRec2, m_UseFullRange) > 0))
ReversePolyPtLinks(outRec2->pts); ReversePolyPtLinks(outRec2->pts);
} else if (PointInPolygon(outRec1->pts->pt, outRec2->pts, m_UseFullRange)) } else if (Poly2ContainsPoly1(outRec1->pts, outRec2->pts, m_UseFullRange))
{ {
//outRec1 is contained by outRec2 ... //outRec1 is contained by outRec2 ...
outRec2->isHole = outRec1->isHole; outRec2->isHole = outRec1->isHole;
...@@ -2882,19 +2988,15 @@ void Clipper::JoinCommonEdges() ...@@ -2882,19 +2988,15 @@ void Clipper::JoinCommonEdges()
outRec1->FirstLeft = outRec2; outRec1->FirstLeft = outRec2;
FixupJoinRecs(j, p2, i+1); FixupJoinRecs(j, p2, i+1);
//fixup FirstLeft pointers that may need reassigning to OutRec1
if (m_UsingPolyTree) FixupFirstLefts2(outRec1, outRec2);
FixupOutPolygon(*outRec1); //nb: do this BEFORE testing orientation FixupOutPolygon(*outRec1); //nb: do this BEFORE testing orientation
FixupOutPolygon(*outRec2); // but AFTER calling FixupJoinRecs() FixupOutPolygon(*outRec2); // but AFTER calling FixupJoinRecs()
if ((outRec1->isHole ^ m_ReverseOutput) == (Area(*outRec1, m_UseFullRange) > 0)) if ((outRec1->isHole ^ m_ReverseOutput) == (Area(*outRec1, m_UseFullRange) > 0))
ReversePolyPtLinks(outRec1->pts); ReversePolyPtLinks(outRec1->pts);
//make sure any contained holes now link to the correct polygon ...
if (m_UsingExPolygons && outRec1->isHole)
for (PolyOutList::size_type k = 0; k < m_PolyOuts.size(); ++k)
{
OutRec *orec = m_PolyOuts[k];
if (orec->isHole && orec->bottomPt && orec->FirstLeft == outRec1)
orec->FirstLeft = outRec2;
}
} }
else else
{ {
...@@ -2903,47 +3005,31 @@ void Clipper::JoinCommonEdges() ...@@ -2903,47 +3005,31 @@ void Clipper::JoinCommonEdges()
outRec2->FirstLeft = outRec1->FirstLeft; outRec2->FirstLeft = outRec1->FirstLeft;
FixupJoinRecs(j, p2, i+1); FixupJoinRecs(j, p2, i+1);
//fixup FirstLeft pointers that may need reassigning to OutRec2
if (m_UsingPolyTree) FixupFirstLefts1(outRec1, outRec2);
FixupOutPolygon(*outRec1); //nb: do this BEFORE testing orientation FixupOutPolygon(*outRec1); //nb: do this BEFORE testing orientation
FixupOutPolygon(*outRec2); // but AFTER calling FixupJoinRecs() FixupOutPolygon(*outRec2); // but AFTER calling FixupJoinRecs()
if (m_UsingExPolygons && outRec2->pts)
for (PolyOutList::size_type k = 0; k < m_PolyOuts.size(); ++k)
{
OutRec *orec = m_PolyOuts[k];
if (orec->isHole && orec->bottomPt && orec->FirstLeft == outRec1 &&
PointInPolygon(orec->bottomPt->pt, outRec2->pts, m_UseFullRange))
orec->FirstLeft = outRec2;
}
} }
} else } else
{ {
//joined 2 polygons together ... //joined 2 polygons together ...
//make sure any holes contained by outRec2 now link to outRec1 ... //cleanup redundant edges ...
if (m_UsingExPolygons)
for (PolyOutList::size_type k = 0; k < m_PolyOuts.size(); ++k)
if (m_PolyOuts[k]->isHole && m_PolyOuts[k]->bottomPt &&
m_PolyOuts[k]->FirstLeft == outRec2)
m_PolyOuts[k]->FirstLeft = outRec1;
//and cleanup redundant edges too ...
FixupOutPolygon(*outRec1); FixupOutPolygon(*outRec1);
if (outRec1->pts)
{
outRec1->isHole = Area(*outRec1, m_UseFullRange) < 0;
if (outRec1->isHole && !outRec1->FirstLeft)
outRec1->FirstLeft = outRec2->FirstLeft;
}
//delete the obsolete pointer ... //delete the obsolete pointer ...
int OKIdx = outRec1->idx; int OKIdx = outRec1->idx;
int ObsoleteIdx = outRec2->idx; int ObsoleteIdx = outRec2->idx;
outRec2->pts = 0; outRec2->pts = 0;
outRec2->bottomPt = 0; outRec2->bottomPt = 0;
outRec2->AppendLink = outRec1;
outRec1->isHole = holeStateRec->isHole;
if (holeStateRec == outRec2)
outRec1->FirstLeft = outRec2->FirstLeft;
outRec2->FirstLeft = outRec1;
//now fixup any subsequent Joins that match this polygon //now fixup any subsequent Joins that match this polygon
for (JoinList::size_type k = i+1; k < m_Joins.size(); k++) for (JoinList::size_type k = i+1; k < m_Joins.size(); k++)
...@@ -2952,6 +3038,9 @@ void Clipper::JoinCommonEdges() ...@@ -2952,6 +3038,9 @@ void Clipper::JoinCommonEdges()
if (j2->poly1Idx == ObsoleteIdx) j2->poly1Idx = OKIdx; if (j2->poly1Idx == ObsoleteIdx) j2->poly1Idx = OKIdx;
if (j2->poly2Idx == ObsoleteIdx) j2->poly2Idx = OKIdx; if (j2->poly2Idx == ObsoleteIdx) j2->poly2Idx = OKIdx;
} }
//fixup FirstLeft pointers that may need reassigning to OutRec1
if (m_UsingPolyTree) FixupFirstLefts2(outRec2, outRec1);
} }
} }
} }
...@@ -2982,19 +3071,26 @@ struct DoublePoint ...@@ -2982,19 +3071,26 @@ struct DoublePoint
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
Polygon BuildArc(const IntPoint &pt, Polygon BuildArc(const IntPoint &pt,
const double a1, const double a2, const double r) const double a1, const double a2, const double r, double limit)
{ {
long64 steps = std::max(6, int(std::sqrt(std::fabs(r)) * std::fabs(a2 - a1))); //see notes in clipper.pas regarding steps
if (steps > 0x100) steps = 0x100; double arcFrac = std::fabs(a2 - a1) / (2 * pi);
int n = (unsigned)steps; int steps = (int)(arcFrac * pi / std::acos(1 - limit / std::fabs(r)));
Polygon result(n); if (steps < 2) steps = 2;
double da = (a2 - a1) / (n -1); else if (steps > (int)(222.0 * arcFrac)) steps = (int)(222.0 * arcFrac);
double a = a1;
for (int i = 0; i < n; ++i) double x = std::cos(a1);
{ double y = std::sin(a1);
result[i].X = pt.X + Round(std::cos(a)*r); double c = std::cos((a2 - a1) / steps);
result[i].Y = pt.Y + Round(std::sin(a)*r); double s = std::sin((a2 - a1) / steps);
a += da; Polygon result(steps +1);
for (int i = 0; i <= steps; ++i)
{
result[i].X = pt.X + Round(x * r);
result[i].Y = pt.Y + Round(y * r);
double x2 = x;
x = x * c - s * y; //cross product
y = x2 * s + y * c; //dot product
} }
return result; return result;
} }
...@@ -3030,7 +3126,7 @@ private: ...@@ -3030,7 +3126,7 @@ private:
public: public:
PolyOffsetBuilder(const Polygons& in_polys, Polygons& out_polys, PolyOffsetBuilder(const Polygons& in_polys, Polygons& out_polys,
double delta, JoinType jointype, double MiterLimit, bool AutoFix) double delta, JoinType jointype, double limit, bool autoFix)
{ {
//nb precondition - out_polys != ptsin_polys //nb precondition - out_polys != ptsin_polys
if (NEAR_ZERO(delta)) if (NEAR_ZERO(delta))
...@@ -3046,7 +3142,7 @@ PolyOffsetBuilder(const Polygons& in_polys, Polygons& out_polys, ...@@ -3046,7 +3142,7 @@ PolyOffsetBuilder(const Polygons& in_polys, Polygons& out_polys,
//ChecksInput - fixes polygon orientation if necessary and removes //ChecksInput - fixes polygon orientation if necessary and removes
//duplicate vertices. Can be set false when you're sure that polygon //duplicate vertices. Can be set false when you're sure that polygon
//orientation is correct and that there are no duplicate vertices. //orientation is correct and that there are no duplicate vertices.
if (AutoFix) if (autoFix)
{ {
size_t Len = m_p.size(), botI = 0; size_t Len = m_p.size(), botI = 0;
while (botI < Len && m_p[botI].size() == 0) botI++; while (botI < Len && m_p[botI].size() == 0) botI++;
...@@ -3077,8 +3173,19 @@ PolyOffsetBuilder(const Polygons& in_polys, Polygons& out_polys, ...@@ -3077,8 +3173,19 @@ PolyOffsetBuilder(const Polygons& in_polys, Polygons& out_polys,
ReversePolygons(m_p); ReversePolygons(m_p);
} }
if (MiterLimit <= 1) MiterLimit = 1; switch (jointype)
m_RMin = 2.0/(MiterLimit*MiterLimit); {
case jtRound:
if (limit <= 0) limit = 0.25;
else if (limit > std::fabs(delta)) limit = std::fabs(delta);
break;
case jtMiter:
if (limit < 2) limit = 2;
break;
default: //unused
limit = 1;
}
m_RMin = 2.0/(limit*limit);
double deltaSq = delta*delta; double deltaSq = delta*delta;
out_polys.clear(); out_polys.clear();
...@@ -3101,7 +3208,7 @@ PolyOffsetBuilder(const Polygons& in_polys, Polygons& out_polys, ...@@ -3101,7 +3208,7 @@ PolyOffsetBuilder(const Polygons& in_polys, Polygons& out_polys,
else if (len == 1) else if (len == 1)
{ {
Polygon arc; Polygon arc;
arc = BuildArc(m_p[m_i][len-1], 0, 2 * pi, delta); arc = BuildArc(m_p[m_i][len-1], 0, 2 * pi, delta, limit);
out_polys[m_i] = arc; out_polys[m_i] = arc;
continue; continue;
} }
...@@ -3122,11 +3229,11 @@ PolyOffsetBuilder(const Polygons& in_polys, Polygons& out_polys, ...@@ -3122,11 +3229,11 @@ PolyOffsetBuilder(const Polygons& in_polys, Polygons& out_polys,
{ {
m_R = 1 + (normals[m_j].X*normals[m_k].X + m_R = 1 + (normals[m_j].X*normals[m_k].X +
normals[m_j].Y*normals[m_k].Y); normals[m_j].Y*normals[m_k].Y);
if (m_R >= m_RMin) DoMiter(); else DoSquare(MiterLimit); if (m_R >= m_RMin) DoMiter(); else DoSquare(limit);
break; break;
} }
case jtSquare: DoSquare(); break; case jtSquare: DoSquare(1.0); break;
case jtRound: DoRound(); break; case jtRound: DoRound(limit); break;
} }
m_k = m_j; m_k = m_j;
} }
...@@ -3165,14 +3272,13 @@ private: ...@@ -3165,14 +3272,13 @@ private:
void AddPoint(const IntPoint& pt) void AddPoint(const IntPoint& pt)
{ {
Polygon::size_type len = m_curr_poly->size(); if (m_curr_poly->size() == m_curr_poly->capacity())
if (len == m_curr_poly->capacity()) m_curr_poly->reserve(m_curr_poly->capacity() + buffLength);
m_curr_poly->reserve(len + buffLength);
m_curr_poly->push_back(pt); m_curr_poly->push_back(pt);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void DoSquare(double mul = 1.0) void DoSquare(double mul)
{ {
IntPoint pt1 = IntPoint((long64)Round(m_p[m_i][m_j].X + normals[m_k].X * m_delta), IntPoint pt1 = IntPoint((long64)Round(m_p[m_i][m_j].X + normals[m_k].X * m_delta),
(long64)Round(m_p[m_i][m_j].Y + normals[m_k].Y * m_delta)); (long64)Round(m_p[m_i][m_j].Y + normals[m_k].Y * m_delta));
...@@ -3223,7 +3329,7 @@ void DoMiter() ...@@ -3223,7 +3329,7 @@ void DoMiter()
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void DoRound() void DoRound(double limit)
{ {
IntPoint pt1 = IntPoint((long64)Round(m_p[m_i][m_j].X + normals[m_k].X * m_delta), IntPoint pt1 = IntPoint((long64)Round(m_p[m_i][m_j].X + normals[m_k].X * m_delta),
(long64)Round(m_p[m_i][m_j].Y + normals[m_k].Y * m_delta)); (long64)Round(m_p[m_i][m_j].Y + normals[m_k].Y * m_delta));
...@@ -3239,7 +3345,7 @@ void DoRound() ...@@ -3239,7 +3345,7 @@ void DoRound()
double a2 = std::atan2(normals[m_j].Y, normals[m_j].X); double a2 = std::atan2(normals[m_j].Y, normals[m_j].X);
if (m_delta > 0 && a2 < a1) a2 += pi *2; if (m_delta > 0 && a2 < a1) a2 += pi *2;
else if (m_delta < 0 && a2 > a1) a2 -= pi *2; else if (m_delta < 0 && a2 > a1) a2 -= pi *2;
Polygon arc = BuildArc(m_p[m_i][m_j], a1, a2, m_delta); Polygon arc = BuildArc(m_p[m_i][m_j], a1, a2, m_delta, limit);
for (Polygon::size_type m = 0; m < arc.size(); m++) for (Polygon::size_type m = 0; m < arc.size(); m++)
AddPoint(arc[m]); AddPoint(arc[m]);
} }
...@@ -3267,14 +3373,14 @@ bool UpdateBotPt(const IntPoint &pt, IntPoint &botPt) ...@@ -3267,14 +3373,14 @@ bool UpdateBotPt(const IntPoint &pt, IntPoint &botPt)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void OffsetPolygons(const Polygons &in_polys, Polygons &out_polys, void OffsetPolygons(const Polygons &in_polys, Polygons &out_polys,
double delta, JoinType jointype, double MiterLimit, bool AutoFix) double delta, JoinType jointype, double limit, bool autoFix)
{ {
if (&out_polys == &in_polys) if (&out_polys == &in_polys)
{ {
Polygons poly2(in_polys); Polygons poly2(in_polys);
PolyOffsetBuilder(poly2, out_polys, delta, jointype, MiterLimit, AutoFix); PolyOffsetBuilder(poly2, out_polys, delta, jointype, limit, autoFix);
} }
else PolyOffsetBuilder(in_polys, out_polys, delta, jointype, MiterLimit, AutoFix); else PolyOffsetBuilder(in_polys, out_polys, delta, jointype, limit, autoFix);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -3300,6 +3406,86 @@ void SimplifyPolygons(Polygons &polys, PolyFillType fillType) ...@@ -3300,6 +3406,86 @@ void SimplifyPolygons(Polygons &polys, PolyFillType fillType)
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool PointsAreClose(IntPoint pt1, IntPoint pt2, long64 distSqrd)
{
long64 dx = pt1.X - pt2.X;
long64 dy = pt1.Y - pt2.Y;
return ((dx * dx) + (dy * dy) <= distSqrd);
}
//------------------------------------------------------------------------------
void CleanPolygon(Polygon& in_poly, Polygon& out_poly, double distance)
{
//distance = proximity in units/pixels below which vertices
//will be stripped. Default ~= sqrt(2).
int highI = in_poly.size() -1;
long64 d = (int)(distance * distance);
while (highI > 0 && PointsAreClose(in_poly[highI], in_poly[0], d)) highI--;
if (highI < 2)
{
out_poly.clear();
return;
}
out_poly.resize(highI + 1);
bool UseFullRange = FullRangeNeeded(in_poly);
IntPoint pt = in_poly[highI];
int i = 0;
int k = 0;
for (;;)
{
if (i >= highI) break;
int j = i + 1;
if (PointsAreClose(pt, in_poly[j], d))
{
i = j + 1;
while (i <= highI && PointsAreClose(pt, in_poly[i], d)) i++;
continue;
}
if (PointsAreClose(in_poly[i], in_poly[j], d) ||
SlopesEqual(pt, in_poly[i], in_poly[j], UseFullRange))
{
i = j;
continue;
}
pt = in_poly[i++];
out_poly[k++] = pt;
}
if (i <= highI) out_poly[k++] = in_poly[i];
if (k > 2 && SlopesEqual(out_poly[k -2], out_poly[k -1], out_poly[0], UseFullRange))
k--;
if (k < 3) out_poly.clear();
else if (k <= highI) out_poly.resize(k);
}
//------------------------------------------------------------------------------
void CleanPolygons(Polygons& in_polys, Polygons& out_polys, double distance)
{
for (Polygons::size_type i = 0; i < in_polys.size(); ++i)
CleanPolygon(in_polys[i], out_polys[i], distance);
}
//------------------------------------------------------------------------------
void AddPolyNodeToPolygons(PolyNode& polynode, Polygons& polygons)
{
if (polynode.Contour.size() > 0)
polygons.push_back(polynode.Contour);
for (int i = 0; i < polynode.ChildCount(); ++i)
AddPolyNodeToPolygons(*polynode.Childs[i], polygons);
}
//------------------------------------------------------------------------------
void PolyTreeToPolygons(PolyTree& polytree, Polygons& polygons)
{
polygons.resize(0);
polygons.reserve(polytree.Total());
AddPolyNodeToPolygons(polytree, polygons);
}
//------------------------------------------------------------------------------
std::ostream& operator <<(std::ostream &s, IntPoint& p) std::ostream& operator <<(std::ostream &s, IntPoint& p)
{ {
s << p.X << ' ' << p.Y << "\n"; s << p.X << ' ' << p.Y << "\n";
......
/******************************************************************************* /*******************************************************************************
* * * *
* 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 @@ ...@@ -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 2428, 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: ...@@ -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 { ...@@ -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 ...@@ -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;
}; };
...@@ -208,7 +241,7 @@ public: ...@@ -208,7 +241,7 @@ public:
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();
...@@ -230,7 +263,7 @@ private: ...@@ -230,7 +263,7 @@ private:
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: ...@@ -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: ...@@ -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);
}; };
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment