2018-04-28 15:22:25 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2023-07-09 11:19:43 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
2018-04-28 15:22:25 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "widgets/wx_grid.h"
|
|
|
|
|
|
|
|
#include "panel_setup_text_and_graphics_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2019-10-31 23:25:50 +00:00
|
|
|
PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
|
2018-04-28 15:22:25 +00:00
|
|
|
{
|
|
|
|
wxBoxSizer* mainSizer;
|
|
|
|
mainSizer = new wxBoxSizer( wxVERTICAL );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
2018-04-28 15:22:25 +00:00
|
|
|
m_gridSizer = new wxBoxSizer( wxVERTICAL );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
2023-07-09 11:19:43 +00:00
|
|
|
m_staticTextDefProp = new wxStaticText( this, wxID_ANY, _("Default properties for new graphics and text:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2021-05-16 07:11:13 +00:00
|
|
|
m_staticTextDefProp->Wrap( -1 );
|
2023-01-11 01:00:47 +00:00
|
|
|
m_gridSizer->Add( m_staticTextDefProp, 0, wxTOP|wxRIGHT|wxLEFT, 8 );
|
|
|
|
|
2023-07-08 23:55:27 +00:00
|
|
|
m_staticline11 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
|
|
|
m_gridSizer->Add( m_staticline11, 0, wxEXPAND | wxALL, 5 );
|
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
|
|
|
|
m_gridSizer->Add( 0, 3, 0, wxEXPAND, 5 );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
2018-04-28 15:22:25 +00:00
|
|
|
m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
2018-04-28 15:22:25 +00:00
|
|
|
// Grid
|
2020-05-01 16:24:01 +00:00
|
|
|
m_grid->CreateGrid( 6, 6 );
|
2018-04-28 15:22:25 +00:00
|
|
|
m_grid->EnableEditing( true );
|
|
|
|
m_grid->EnableGridLines( true );
|
|
|
|
m_grid->EnableDragGridSize( false );
|
|
|
|
m_grid->SetMargins( 0, 0 );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
2018-04-28 15:22:25 +00:00
|
|
|
// Columns
|
2019-02-07 21:48:41 +00:00
|
|
|
m_grid->SetColSize( 0, 140 );
|
|
|
|
m_grid->SetColSize( 1, 140 );
|
|
|
|
m_grid->SetColSize( 2, 140 );
|
|
|
|
m_grid->SetColSize( 3, 140 );
|
|
|
|
m_grid->SetColSize( 4, 80 );
|
|
|
|
m_grid->SetColSize( 5, 120 );
|
2018-04-28 15:22:25 +00:00
|
|
|
m_grid->EnableDragColMove( false );
|
|
|
|
m_grid->EnableDragColSize( true );
|
|
|
|
m_grid->SetColLabelValue( 0, _("Line Thickness") );
|
|
|
|
m_grid->SetColLabelValue( 1, _("Text Width") );
|
|
|
|
m_grid->SetColLabelValue( 2, _("Text Height") );
|
|
|
|
m_grid->SetColLabelValue( 3, _("Text Thickness") );
|
|
|
|
m_grid->SetColLabelValue( 4, _("Italic") );
|
|
|
|
m_grid->SetColLabelValue( 5, _("Keep Upright") );
|
2023-01-11 01:00:47 +00:00
|
|
|
m_grid->SetColLabelSize( wxGRID_AUTOSIZE );
|
2019-10-31 23:25:50 +00:00
|
|
|
m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
|
|
|
2018-04-28 15:22:25 +00:00
|
|
|
// Rows
|
|
|
|
m_grid->EnableDragRowSize( false );
|
|
|
|
m_grid->SetRowLabelValue( 0, _("Silk Layers") );
|
|
|
|
m_grid->SetRowLabelValue( 1, _("Copper Layers") );
|
2018-08-24 20:08:30 +00:00
|
|
|
m_grid->SetRowLabelValue( 2, _("Edge Cuts") );
|
|
|
|
m_grid->SetRowLabelValue( 3, _("Courtyards") );
|
2020-05-01 16:24:01 +00:00
|
|
|
m_grid->SetRowLabelValue( 4, _("Fab Layers") );
|
|
|
|
m_grid->SetRowLabelValue( 5, _("Other Layers") );
|
2023-01-11 01:00:47 +00:00
|
|
|
m_grid->SetRowLabelSize( 132 );
|
2019-10-31 23:25:50 +00:00
|
|
|
m_grid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
|
|
|
|
2018-04-28 15:22:25 +00:00
|
|
|
// Label Appearance
|
2019-10-31 23:25:50 +00:00
|
|
|
|
2018-04-28 15:22:25 +00:00
|
|
|
// Cell Defaults
|
2023-09-18 14:15:22 +00:00
|
|
|
m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
2023-01-11 01:00:47 +00:00
|
|
|
m_gridSizer->Add( m_grid, 0, wxBOTTOM, 15 );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
|
|
|
|
2023-07-09 11:19:43 +00:00
|
|
|
m_gridSizer->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
2021-05-16 07:11:13 +00:00
|
|
|
m_staticTextDefPropDim = new wxStaticText( this, wxID_ANY, _("Default properties for new dimension objects:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_staticTextDefPropDim->Wrap( -1 );
|
2023-01-11 01:00:47 +00:00
|
|
|
m_gridSizer->Add( m_staticTextDefPropDim, 0, wxTOP|wxRIGHT|wxLEFT, 8 );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
|
|
|
m_gridSizer->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM, 8 );
|
2021-09-17 17:04:49 +00:00
|
|
|
|
2020-09-12 00:36:43 +00:00
|
|
|
wxGridBagSizer* gbSizer1;
|
2021-09-17 17:04:49 +00:00
|
|
|
gbSizer1 = new wxGridBagSizer( 0, 5 );
|
|
|
|
gbSizer1->SetFlexibleDirection( wxVERTICAL );
|
2020-09-12 00:36:43 +00:00
|
|
|
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
m_lblDimensionUnits = new wxStaticText( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-09-12 00:36:43 +00:00
|
|
|
m_lblDimensionUnits->Wrap( -1 );
|
2023-01-11 01:00:47 +00:00
|
|
|
gbSizer1->Add( m_lblDimensionUnits, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
2020-09-12 00:36:43 +00:00
|
|
|
wxString m_dimensionUnitsChoices[] = { _("Inches"), _("Mils"), _("Millimeters"), _("Automatic") };
|
2019-10-31 23:25:50 +00:00
|
|
|
int m_dimensionUnitsNChoices = sizeof( m_dimensionUnitsChoices ) / sizeof( wxString );
|
2023-01-11 01:00:47 +00:00
|
|
|
m_dimensionUnits = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dimensionUnitsNChoices, m_dimensionUnitsChoices, 0 );
|
2019-10-31 23:25:50 +00:00
|
|
|
m_dimensionUnits->SetSelection( 0 );
|
2020-09-12 00:36:43 +00:00
|
|
|
m_dimensionUnits->SetToolTip( _("Default units for dimensions (\"automatic\" to follow the chosen UI units)") );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
2021-09-17 17:04:49 +00:00
|
|
|
gbSizer1->Add( m_dimensionUnits, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
2020-09-12 00:36:43 +00:00
|
|
|
|
2021-09-17 17:04:49 +00:00
|
|
|
gbSizer1->Add( 0, 0, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
|
2020-09-12 00:36:43 +00:00
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
m_lblTextPositionMode = new wxStaticText( this, wxID_ANY, _("Text position:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-09-12 00:36:43 +00:00
|
|
|
m_lblTextPositionMode->Wrap( -1 );
|
2023-10-19 11:35:10 +00:00
|
|
|
gbSizer1->Add( m_lblTextPositionMode, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 4 );
|
2020-09-12 00:36:43 +00:00
|
|
|
|
|
|
|
wxString m_dimensionTextPositionModeChoices[] = { _("Outside"), _("Inline") };
|
|
|
|
int m_dimensionTextPositionModeNChoices = sizeof( m_dimensionTextPositionModeChoices ) / sizeof( wxString );
|
2023-01-11 01:00:47 +00:00
|
|
|
m_dimensionTextPositionMode = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dimensionTextPositionModeNChoices, m_dimensionTextPositionModeChoices, 0 );
|
2020-09-12 00:36:43 +00:00
|
|
|
m_dimensionTextPositionMode->SetSelection( 0 );
|
|
|
|
m_dimensionTextPositionMode->SetToolTip( _("Where to position the dimension text relative to the dimension line") );
|
|
|
|
|
2021-09-17 17:04:49 +00:00
|
|
|
gbSizer1->Add( m_dimensionTextPositionMode, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
2020-09-12 00:36:43 +00:00
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
m_lblDimensionUnitsFormat = new wxStaticText( this, wxID_ANY, _("Units format:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-09-12 00:36:43 +00:00
|
|
|
m_lblDimensionUnitsFormat->Wrap( -1 );
|
2023-01-11 01:00:47 +00:00
|
|
|
gbSizer1->Add( m_lblDimensionUnitsFormat, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
2020-09-12 00:36:43 +00:00
|
|
|
|
|
|
|
wxString m_dimensionUnitsFormatChoices[] = { _("1234"), _("1234 mm"), _("1234 (mm)") };
|
|
|
|
int m_dimensionUnitsFormatNChoices = sizeof( m_dimensionUnitsFormatChoices ) / sizeof( wxString );
|
2023-01-11 01:00:47 +00:00
|
|
|
m_dimensionUnitsFormat = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dimensionUnitsFormatNChoices, m_dimensionUnitsFormatChoices, 0 );
|
2020-09-12 00:36:43 +00:00
|
|
|
m_dimensionUnitsFormat->SetSelection( 1 );
|
2021-09-17 17:04:49 +00:00
|
|
|
gbSizer1->Add( m_dimensionUnitsFormat, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
2020-09-12 00:36:43 +00:00
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
m_dimensionTextKeepAligned = new wxCheckBox( this, wxID_ANY, _("Keep text aligned"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-09-12 00:36:43 +00:00
|
|
|
m_dimensionTextKeepAligned->SetToolTip( _("When checked, dimension text will be kept aligned with dimension lines") );
|
|
|
|
|
2023-10-19 11:35:10 +00:00
|
|
|
gbSizer1->Add( m_dimensionTextKeepAligned, wxGBPosition( 1, 3 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxLEFT, 5 );
|
2020-09-12 00:36:43 +00:00
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
m_lblDimensionPrecision = new wxStaticText( this, wxID_ANY, _("Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-09-12 00:36:43 +00:00
|
|
|
m_lblDimensionPrecision->Wrap( -1 );
|
2023-01-11 01:00:47 +00:00
|
|
|
gbSizer1->Add( m_lblDimensionPrecision, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
2020-09-12 00:36:43 +00:00
|
|
|
|
|
|
|
wxString m_dimensionPrecisionChoices[] = { _("0"), _("0.0"), _("0.00"), _("0.000"), _("0.0000"), _("0.00000") };
|
2019-10-31 23:25:50 +00:00
|
|
|
int m_dimensionPrecisionNChoices = sizeof( m_dimensionPrecisionChoices ) / sizeof( wxString );
|
2023-01-11 01:00:47 +00:00
|
|
|
m_dimensionPrecision = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dimensionPrecisionNChoices, m_dimensionPrecisionChoices, 0 );
|
2020-09-09 03:17:08 +00:00
|
|
|
m_dimensionPrecision->SetSelection( 4 );
|
2020-09-12 00:36:43 +00:00
|
|
|
m_dimensionPrecision->SetToolTip( _("How many digits of precision to show") );
|
|
|
|
|
2021-09-17 17:04:49 +00:00
|
|
|
gbSizer1->Add( m_dimensionPrecision, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
2020-09-12 00:36:43 +00:00
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
m_lblArrowLength = new wxStaticText( this, wxID_ANY, _("Arrow length:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-09-12 00:36:43 +00:00
|
|
|
m_lblArrowLength->Wrap( -1 );
|
2023-10-19 11:35:10 +00:00
|
|
|
gbSizer1->Add( m_lblArrowLength, wxGBPosition( 2, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
2020-09-12 00:36:43 +00:00
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
m_dimensionArrowLength = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2021-09-17 17:04:49 +00:00
|
|
|
gbSizer1->Add( m_dimensionArrowLength, wxGBPosition( 2, 4 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
2020-09-12 00:36:43 +00:00
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
m_arrowLengthUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-09-12 00:36:43 +00:00
|
|
|
m_arrowLengthUnits->Wrap( -1 );
|
2023-01-11 01:00:47 +00:00
|
|
|
gbSizer1->Add( m_arrowLengthUnits, wxGBPosition( 2, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
m_dimensionSuppressZeroes = new wxCheckBox( this, wxID_ANY, _("Suppress trailing zeroes"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-09-12 15:46:33 +00:00
|
|
|
m_dimensionSuppressZeroes->SetToolTip( _("When checked, \"1.2300\" will be rendered as \"1.23\" even if precision is set to show more digits") );
|
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
gbSizer1->Add( m_dimensionSuppressZeroes, wxGBPosition( 3, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
2020-09-12 15:46:33 +00:00
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
m_lblExtensionOffset = new wxStaticText( this, wxID_ANY, _("Extension line offset:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-09-12 15:46:33 +00:00
|
|
|
m_lblExtensionOffset->Wrap( -1 );
|
2023-10-19 11:35:10 +00:00
|
|
|
gbSizer1->Add( m_lblExtensionOffset, wxGBPosition( 3, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
2020-09-12 15:46:33 +00:00
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
m_dimensionExtensionOffset = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2021-09-17 17:04:49 +00:00
|
|
|
gbSizer1->Add( m_dimensionExtensionOffset, wxGBPosition( 3, 4 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
2020-09-12 15:46:33 +00:00
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
m_dimensionExtensionOffsetUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-09-12 15:46:33 +00:00
|
|
|
m_dimensionExtensionOffsetUnits->Wrap( -1 );
|
2023-01-11 01:00:47 +00:00
|
|
|
gbSizer1->Add( m_dimensionExtensionOffsetUnits, wxGBPosition( 3, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
2021-09-17 17:04:49 +00:00
|
|
|
|
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
m_gridSizer->Add( gbSizer1, 1, wxEXPAND|wxTOP, 5 );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
mainSizer->Add( m_gridSizer, 0, wxLEFT, 5 );
|
2019-10-31 23:25:50 +00:00
|
|
|
|
|
|
|
|
2018-04-28 15:22:25 +00:00
|
|
|
this->SetSizer( mainSizer );
|
|
|
|
this->Layout();
|
|
|
|
mainSizer->Fit( this );
|
|
|
|
}
|
|
|
|
|
|
|
|
PANEL_SETUP_TEXT_AND_GRAPHICS_BASE::~PANEL_SETUP_TEXT_AND_GRAPHICS_BASE()
|
|
|
|
{
|
|
|
|
}
|