2013-05-26 04:36:44 +00:00
///////////////////////////////////////////////////////////////////////////
2023-08-29 17:04:33 +00:00
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
2013-05-26 04:36:44 +00:00
// http://www.wxformbuilder.org/
//
2017-12-24 15:04:02 +00:00
// PLEASE DO *NOT* EDIT THIS FILE!
2013-05-26 04:36:44 +00:00
///////////////////////////////////////////////////////////////////////////
2022-12-13 20:47:28 +00:00
# include "widgets/std_bitmap_button.h"
2018-05-30 10:52:19 +00:00
# include "widgets/wx_grid.h"
2020-10-17 23:25:39 +00:00
# include "dialog_symbol_properties_base.h"
2013-05-26 04:36:44 +00:00
///////////////////////////////////////////////////////////////////////////
2020-10-17 23:25:39 +00:00
DIALOG_SYMBOL_PROPERTIES_BASE : : DIALOG_SYMBOL_PROPERTIES_BASE ( wxWindow * parent , wxWindowID id , const wxString & title , const wxPoint & pos , const wxSize & size , long style ) : DIALOG_SHIM ( parent , id , title , pos , size , style )
2013-05-26 04:36:44 +00:00
{
this - > SetSizeHints ( wxDefaultSize , wxDefaultSize ) ;
2019-11-06 19:15:42 +00:00
2013-05-26 04:36:44 +00:00
wxBoxSizer * mainSizer ;
mainSizer = new wxBoxSizer ( wxVERTICAL ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 11:50:07 +00:00
m_notebook1 = new wxNotebook ( this , wxID_ANY , wxDefaultPosition , wxDefaultSize , 0 ) ;
generalPage = new wxPanel ( m_notebook1 , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxTAB_TRAVERSAL ) ;
wxBoxSizer * generalPageSizer ;
generalPageSizer = new wxBoxSizer ( wxVERTICAL ) ;
2018-02-28 16:54:35 +00:00
wxStaticBoxSizer * sbFields ;
2020-09-02 11:50:07 +00:00
sbFields = new wxStaticBoxSizer ( new wxStaticBox ( generalPage , wxID_ANY , _ ( " Fields " ) ) , wxVERTICAL ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 11:50:07 +00:00
m_fieldsGrid = new WX_GRID ( sbFields - > GetStaticBox ( ) , wxID_ANY , wxDefaultPosition , wxDefaultSize , 0 ) ;
2019-11-06 19:15:42 +00:00
2018-02-28 16:54:35 +00:00
// Grid
2023-02-01 12:36:04 +00:00
m_fieldsGrid - > CreateGrid ( 4 , 14 ) ;
2020-09-02 11:50:07 +00:00
m_fieldsGrid - > EnableEditing ( true ) ;
m_fieldsGrid - > EnableGridLines ( true ) ;
m_fieldsGrid - > EnableDragGridSize ( false ) ;
m_fieldsGrid - > SetMargins ( 0 , 0 ) ;
2019-11-06 19:15:42 +00:00
2018-02-28 16:54:35 +00:00
// Columns
2020-09-02 11:50:07 +00:00
m_fieldsGrid - > SetColSize ( 0 , 72 ) ;
m_fieldsGrid - > SetColSize ( 1 , 120 ) ;
m_fieldsGrid - > SetColSize ( 2 , 48 ) ;
2023-02-01 12:36:04 +00:00
m_fieldsGrid - > SetColSize ( 3 , 84 ) ;
m_fieldsGrid - > SetColSize ( 4 , 70 ) ;
m_fieldsGrid - > SetColSize ( 5 , 70 ) ;
2020-09-02 11:50:07 +00:00
m_fieldsGrid - > SetColSize ( 6 , 48 ) ;
2023-02-01 12:36:04 +00:00
m_fieldsGrid - > SetColSize ( 7 , 48 ) ;
2020-09-02 11:50:07 +00:00
m_fieldsGrid - > SetColSize ( 8 , 84 ) ;
m_fieldsGrid - > SetColSize ( 9 , 84 ) ;
m_fieldsGrid - > SetColSize ( 10 , 84 ) ;
2023-02-01 12:36:04 +00:00
m_fieldsGrid - > SetColSize ( 11 , 84 ) ;
m_fieldsGrid - > SetColSize ( 12 , 140 ) ;
m_fieldsGrid - > SetColSize ( 13 , 48 ) ;
2020-09-02 11:50:07 +00:00
m_fieldsGrid - > EnableDragColMove ( false ) ;
m_fieldsGrid - > EnableDragColSize ( true ) ;
m_fieldsGrid - > SetColLabelValue ( 0 , _ ( " Name " ) ) ;
m_fieldsGrid - > SetColLabelValue ( 1 , _ ( " Value " ) ) ;
m_fieldsGrid - > SetColLabelValue ( 2 , _ ( " Show " ) ) ;
2023-02-01 12:36:04 +00:00
m_fieldsGrid - > SetColLabelValue ( 3 , _ ( " Show Name " ) ) ;
m_fieldsGrid - > SetColLabelValue ( 4 , _ ( " H Align " ) ) ;
m_fieldsGrid - > SetColLabelValue ( 5 , _ ( " V Align " ) ) ;
m_fieldsGrid - > SetColLabelValue ( 6 , _ ( " Italic " ) ) ;
m_fieldsGrid - > SetColLabelValue ( 7 , _ ( " Bold " ) ) ;
m_fieldsGrid - > SetColLabelValue ( 8 , _ ( " Text Size " ) ) ;
m_fieldsGrid - > SetColLabelValue ( 9 , _ ( " Orientation " ) ) ;
m_fieldsGrid - > SetColLabelValue ( 10 , _ ( " X Position " ) ) ;
m_fieldsGrid - > SetColLabelValue ( 11 , _ ( " Y Position " ) ) ;
m_fieldsGrid - > SetColLabelValue ( 12 , _ ( " Font " ) ) ;
m_fieldsGrid - > SetColLabelValue ( 13 , _ ( " Color " ) ) ;
2022-08-13 09:00:00 +00:00
m_fieldsGrid - > SetColLabelSize ( 22 ) ;
2020-09-02 11:50:07 +00:00
m_fieldsGrid - > SetColLabelAlignment ( wxALIGN_CENTER , wxALIGN_CENTER ) ;
2019-11-06 19:15:42 +00:00
2018-02-28 16:54:35 +00:00
// Rows
2020-09-02 11:50:07 +00:00
m_fieldsGrid - > EnableDragRowSize ( true ) ;
m_fieldsGrid - > SetRowLabelSize ( 0 ) ;
m_fieldsGrid - > SetRowLabelAlignment ( wxALIGN_CENTER , wxALIGN_CENTER ) ;
2019-11-06 19:15:42 +00:00
2018-02-28 16:54:35 +00:00
// Label Appearance
2019-11-06 19:15:42 +00:00
2018-02-28 16:54:35 +00:00
// Cell Defaults
2023-09-18 14:15:22 +00:00
m_fieldsGrid - > SetDefaultCellAlignment ( wxALIGN_LEFT , wxALIGN_CENTER ) ;
2020-09-02 11:50:07 +00:00
m_fieldsGrid - > SetMinSize ( wxSize ( - 1 , 180 ) ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 11:50:07 +00:00
sbFields - > Add ( m_fieldsGrid , 1 , wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT , 5 ) ;
2019-11-06 19:15:42 +00:00
2018-02-28 16:54:35 +00:00
wxBoxSizer * bButtonSize ;
bButtonSize = new wxBoxSizer ( wxHORIZONTAL ) ;
2019-11-06 19:15:42 +00:00
2022-12-13 20:47:28 +00:00
m_bpAdd = new STD_BITMAP_BUTTON ( sbFields - > GetStaticBox ( ) , wxID_ANY , wxNullBitmap , wxDefaultPosition , wxDefaultSize , wxBU_AUTODRAW | 0 ) ;
2018-11-24 14:51:17 +00:00
m_bpAdd - > SetToolTip ( _ ( " Add field " ) ) ;
2019-11-06 19:15:42 +00:00
bButtonSize - > Add ( m_bpAdd , 0 , wxALIGN_CENTER_VERTICAL | wxRIGHT , 5 ) ;
2022-12-13 20:47:28 +00:00
m_bpMoveUp = new STD_BITMAP_BUTTON ( sbFields - > GetStaticBox ( ) , wxID_ANY , wxNullBitmap , wxDefaultPosition , wxDefaultSize , wxBU_AUTODRAW | 0 ) ;
2018-11-24 14:51:17 +00:00
m_bpMoveUp - > SetToolTip ( _ ( " Move up " ) ) ;
2019-11-06 19:15:42 +00:00
bButtonSize - > Add ( m_bpMoveUp , 0 , wxALIGN_CENTER_VERTICAL | wxRIGHT , 5 ) ;
2022-12-13 20:47:28 +00:00
m_bpMoveDown = new STD_BITMAP_BUTTON ( sbFields - > GetStaticBox ( ) , wxID_ANY , wxNullBitmap , wxDefaultPosition , wxDefaultSize , wxBU_AUTODRAW | 0 ) ;
2018-11-24 14:51:17 +00:00
m_bpMoveDown - > SetToolTip ( _ ( " Move down " ) ) ;
2019-11-06 19:15:42 +00:00
bButtonSize - > Add ( m_bpMoveDown , 0 , wxALIGN_CENTER_VERTICAL | wxRIGHT , 5 ) ;
2020-08-17 22:34:02 +00:00
bButtonSize - > Add ( 20 , 0 , 0 , wxEXPAND , 10 ) ;
2019-11-06 19:15:42 +00:00
2022-12-13 20:47:28 +00:00
m_bpDelete = new STD_BITMAP_BUTTON ( sbFields - > GetStaticBox ( ) , wxID_ANY , wxNullBitmap , wxDefaultPosition , wxDefaultSize , wxBU_AUTODRAW | 0 ) ;
2018-11-24 14:51:17 +00:00
m_bpDelete - > SetToolTip ( _ ( " Delete field " ) ) ;
2019-11-06 19:15:42 +00:00
bButtonSize - > Add ( m_bpDelete , 0 , wxALIGN_CENTER_VERTICAL | wxRIGHT , 5 ) ;
2020-02-01 12:29:46 +00:00
bButtonSize - > Add ( 0 , 0 , 1 , wxEXPAND , 5 ) ;
2019-11-06 19:15:42 +00:00
2022-12-28 13:43:14 +00:00
sbFields - > Add ( bButtonSize , 0 , wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT , 5 ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 11:50:07 +00:00
generalPageSizer - > Add ( sbFields , 1 , wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT , 5 ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 00:37:28 +00:00
wxBoxSizer * bLowerSizer ;
bLowerSizer = new wxBoxSizer ( wxHORIZONTAL ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 00:37:28 +00:00
wxStaticBoxSizer * sbGeneralProps ;
2022-12-28 13:43:14 +00:00
sbGeneralProps = new wxStaticBoxSizer ( new wxStaticBox ( generalPage , wxID_ANY , _ ( " General " ) ) , wxVERTICAL ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 00:37:28 +00:00
wxGridBagSizer * gbSizer1 ;
gbSizer1 = new wxGridBagSizer ( 3 , 3 ) ;
gbSizer1 - > SetFlexibleDirection ( wxBOTH ) ;
gbSizer1 - > SetNonFlexibleGrowMode ( wxFLEX_GROWMODE_SPECIFIED ) ;
2022-12-28 13:43:14 +00:00
gbSizer1 - > SetEmptyCellSize ( wxSize ( - 1 , 12 ) ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 00:37:28 +00:00
m_unitLabel = new wxStaticText ( sbGeneralProps - > GetStaticBox ( ) , wxID_ANY , _ ( " Unit: " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_unitLabel - > Wrap ( - 1 ) ;
2020-10-30 14:49:24 +00:00
gbSizer1 - > Add ( m_unitLabel , wxGBPosition ( 0 , 0 ) , wxGBSpan ( 1 , 1 ) , wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT , 5 ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 00:37:28 +00:00
wxArrayString m_unitChoiceChoices ;
m_unitChoice = new wxChoice ( sbGeneralProps - > GetStaticBox ( ) , wxID_ANY , wxDefaultPosition , wxDefaultSize , m_unitChoiceChoices , 0 ) ;
m_unitChoice - > SetSelection ( 0 ) ;
m_unitChoice - > SetMinSize ( wxSize ( 100 , - 1 ) ) ;
2019-11-06 19:15:42 +00:00
2020-10-30 14:49:24 +00:00
gbSizer1 - > Add ( m_unitChoice , wxGBPosition ( 0 , 1 ) , wxGBSpan ( 1 , 1 ) , wxEXPAND | wxLEFT | wxRIGHT , 5 ) ;
2019-11-06 19:15:42 +00:00
2021-10-29 19:27:24 +00:00
m_cbAlternateSymbol = new wxCheckBox ( sbGeneralProps - > GetStaticBox ( ) , wxID_ANY , _ ( " Alternate symbol (De Morgan) " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
2020-09-02 00:37:28 +00:00
m_cbAlternateSymbol - > SetToolTip ( _ ( " Use the alternate shape of this symbol. \n For gates, this is the \" De Morgan \" conversion " ) ) ;
2019-11-06 19:15:42 +00:00
2022-12-28 13:43:14 +00:00
gbSizer1 - > Add ( m_cbAlternateSymbol , wxGBPosition ( 1 , 0 ) , wxGBSpan ( 1 , 2 ) , wxEXPAND | wxLEFT | wxRIGHT | wxTOP , 4 ) ;
2022-04-08 16:05:27 +00:00
2020-09-02 00:37:28 +00:00
m_orientationLabel = new wxStaticText ( sbGeneralProps - > GetStaticBox ( ) , wxID_ANY , _ ( " Angle: " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_orientationLabel - > Wrap ( - 1 ) ;
2022-07-24 07:59:37 +00:00
gbSizer1 - > Add ( m_orientationLabel , wxGBPosition ( 3 , 0 ) , wxGBSpan ( 1 , 1 ) , wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT , 5 ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 00:37:28 +00:00
wxString m_orientationCtrlChoices [ ] = { _ ( " 0 " ) , _ ( " +90 " ) , _ ( " -90 " ) , _ ( " 180 " ) } ;
int m_orientationCtrlNChoices = sizeof ( m_orientationCtrlChoices ) / sizeof ( wxString ) ;
m_orientationCtrl = new wxChoice ( sbGeneralProps - > GetStaticBox ( ) , wxID_ANY , wxDefaultPosition , wxDefaultSize , m_orientationCtrlNChoices , m_orientationCtrlChoices , 0 ) ;
m_orientationCtrl - > SetSelection ( 0 ) ;
2022-07-24 07:59:37 +00:00
gbSizer1 - > Add ( m_orientationCtrl , wxGBPosition ( 3 , 1 ) , wxGBSpan ( 1 , 1 ) , wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxEXPAND , 5 ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 00:37:28 +00:00
m_mirrorLabel = new wxStaticText ( sbGeneralProps - > GetStaticBox ( ) , wxID_ANY , _ ( " Mirror: " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_mirrorLabel - > Wrap ( - 1 ) ;
2020-10-30 14:49:24 +00:00
gbSizer1 - > Add ( m_mirrorLabel , wxGBPosition ( 4 , 0 ) , wxGBSpan ( 1 , 1 ) , wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT , 5 ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 00:37:28 +00:00
wxString m_mirrorCtrlChoices [ ] = { _ ( " Not mirrored " ) , _ ( " Around X axis " ) , _ ( " Around Y axis " ) } ;
int m_mirrorCtrlNChoices = sizeof ( m_mirrorCtrlChoices ) / sizeof ( wxString ) ;
m_mirrorCtrl = new wxChoice ( sbGeneralProps - > GetStaticBox ( ) , wxID_ANY , wxDefaultPosition , wxDefaultSize , m_mirrorCtrlNChoices , m_mirrorCtrlChoices , 0 ) ;
m_mirrorCtrl - > SetSelection ( 0 ) ;
2020-10-30 14:49:24 +00:00
gbSizer1 - > Add ( m_mirrorCtrl , wxGBPosition ( 4 , 1 ) , wxGBSpan ( 1 , 1 ) , wxEXPAND | wxLEFT | wxRIGHT , 5 ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 00:37:28 +00:00
gbSizer1 - > AddGrowableCol ( 1 ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 00:37:28 +00:00
sbGeneralProps - > Add ( gbSizer1 , 1 , wxEXPAND , 5 ) ;
2019-11-06 19:15:42 +00:00
2022-12-28 13:43:14 +00:00
wxBoxSizer * bSizer11 ;
bSizer11 = new wxBoxSizer ( wxHORIZONTAL ) ;
2019-11-06 19:15:42 +00:00
2022-12-28 13:43:14 +00:00
m_ShowPinNumButt = new wxCheckBox ( sbGeneralProps - > GetStaticBox ( ) , wxID_ANY , _ ( " Show pin numbers " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
2020-09-02 00:37:28 +00:00
m_ShowPinNumButt - > SetValue ( true ) ;
m_ShowPinNumButt - > SetToolTip ( _ ( " Show or hide pin numbers " ) ) ;
2019-11-06 19:15:42 +00:00
2022-12-28 13:43:14 +00:00
bSizer11 - > Add ( m_ShowPinNumButt , 1 , wxALL , 3 ) ;
2019-11-06 19:15:42 +00:00
2022-12-28 13:43:14 +00:00
m_ShowPinNameButt = new wxCheckBox ( sbGeneralProps - > GetStaticBox ( ) , wxID_ANY , _ ( " Show pin names " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
2020-09-02 00:37:28 +00:00
m_ShowPinNameButt - > SetValue ( true ) ;
m_ShowPinNameButt - > SetToolTip ( _ ( " Show or hide pin names " ) ) ;
2020-06-03 12:30:57 +00:00
2022-12-28 13:43:14 +00:00
bSizer11 - > Add ( m_ShowPinNameButt , 1 , wxALL , 3 ) ;
sbGeneralProps - > Add ( bSizer11 , 0 , wxEXPAND | wxTOP , 13 ) ;
2020-06-03 12:30:57 +00:00
2020-06-09 16:50:05 +00:00
2022-12-28 13:43:14 +00:00
bLowerSizer - > Add ( sbGeneralProps , 4 , wxEXPAND | wxRIGHT | wxLEFT , 5 ) ;
wxBoxSizer * bMiddleCol ;
bMiddleCol = new wxBoxSizer ( wxVERTICAL ) ;
2020-06-09 16:50:05 +00:00
2020-09-02 00:37:28 +00:00
wxStaticBoxSizer * sbAttributes ;
2020-09-02 11:50:07 +00:00
sbAttributes = new wxStaticBoxSizer ( new wxStaticBox ( generalPage , wxID_ANY , _ ( " Attributes " ) ) , wxVERTICAL ) ;
2020-09-02 00:37:28 +00:00
2022-12-28 13:43:14 +00:00
m_cbExcludeFromSim = new wxCheckBox ( sbAttributes - > GetStaticBox ( ) , wxID_ANY , _ ( " Exclude from simulation " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
sbAttributes - > Add ( m_cbExcludeFromSim , 0 , wxRIGHT | wxLEFT , 5 ) ;
sbAttributes - > Add ( 0 , 10 , 0 , wxEXPAND , 5 ) ;
2020-09-02 00:37:28 +00:00
m_cbExcludeFromBom = new wxCheckBox ( sbAttributes - > GetStaticBox ( ) , wxID_ANY , _ ( " Exclude from bill of materials " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_cbExcludeFromBom - > SetToolTip ( _ ( " This is useful for adding symbols for board footprints such as fiducials \n and logos that you do not want to appear in the bill of materials export " ) ) ;
2020-06-09 16:50:05 +00:00
2022-12-28 13:43:14 +00:00
sbAttributes - > Add ( m_cbExcludeFromBom , 0 , wxALL , 5 ) ;
2020-09-02 00:37:28 +00:00
m_cbExcludeFromBoard = new wxCheckBox ( sbAttributes - > GetStaticBox ( ) , wxID_ANY , _ ( " Exclude from board " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
2020-06-09 16:50:05 +00:00
m_cbExcludeFromBoard - > SetToolTip ( _ ( " This is useful for adding symbols that only get exported to the bill of materials but \n not required to layout the board such as mechanical fasteners and enclosures " ) ) ;
2022-12-28 13:43:14 +00:00
sbAttributes - > Add ( m_cbExcludeFromBoard , 0 , wxBOTTOM | wxRIGHT | wxLEFT , 5 ) ;
2020-09-02 00:37:28 +00:00
2022-09-16 16:20:36 +00:00
m_cbDNP = new wxCheckBox ( sbAttributes - > GetStaticBox ( ) , wxID_ANY , _ ( " Do not populate " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
2022-12-28 13:43:14 +00:00
sbAttributes - > Add ( m_cbDNP , 0 , wxBOTTOM | wxLEFT | wxRIGHT , 5 ) ;
2022-09-16 16:20:36 +00:00
2020-06-03 12:30:57 +00:00
2022-12-28 13:43:14 +00:00
bMiddleCol - > Add ( sbAttributes , 1 , wxEXPAND | wxRIGHT | wxLEFT , 5 ) ;
2020-06-03 12:30:57 +00:00
2019-11-06 19:15:42 +00:00
2022-12-28 13:43:14 +00:00
bLowerSizer - > Add ( bMiddleCol , 3 , wxEXPAND | wxRIGHT | wxLEFT , 5 ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 00:37:28 +00:00
wxBoxSizer * buttonsSizer ;
buttonsSizer = new wxBoxSizer ( wxVERTICAL ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 11:50:07 +00:00
m_updateSymbolBtn = new wxButton ( generalPage , wxID_ANY , _ ( " Update Symbol from Library... " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
2020-09-02 00:37:28 +00:00
buttonsSizer - > Add ( m_updateSymbolBtn , 0 , wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT , 5 ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 11:50:07 +00:00
m_changeSymbolBtn = new wxButton ( generalPage , wxID_ANY , _ ( " Change Symbol... " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
2020-09-02 00:37:28 +00:00
buttonsSizer - > Add ( m_changeSymbolBtn , 0 , wxEXPAND | wxALL , 5 ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 11:50:07 +00:00
m_editSchematicSymbolBtn = new wxButton ( generalPage , wxID_ANY , _ ( " Edit Symbol... " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
2020-09-02 00:37:28 +00:00
buttonsSizer - > Add ( m_editSchematicSymbolBtn , 0 , wxEXPAND | wxALL , 5 ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 11:50:07 +00:00
buttonsSizer - > Add ( 0 , 20 , 0 , wxEXPAND , 5 ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 11:50:07 +00:00
m_editLibrarySymbolBtn = new wxButton ( generalPage , wxID_ANY , _ ( " Edit Library Symbol... " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
buttonsSizer - > Add ( m_editLibrarySymbolBtn , 0 , wxEXPAND | wxTOP | wxRIGHT | wxLEFT , 5 ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 00:37:28 +00:00
2022-12-28 13:43:14 +00:00
bLowerSizer - > Add ( buttonsSizer , 3 , wxEXPAND | wxALL , 5 ) ;
2020-09-02 11:50:07 +00:00
generalPageSizer - > Add ( bLowerSizer , 0 , wxEXPAND | wxTOP | wxBOTTOM , 5 ) ;
generalPage - > SetSizer ( generalPageSizer ) ;
generalPage - > Layout ( ) ;
generalPageSizer - > Fit ( generalPage ) ;
2020-10-17 14:41:39 +00:00
m_notebook1 - > AddPage ( generalPage , _ ( " General " ) , true ) ;
2020-09-02 11:50:07 +00:00
m_pinTablePage = new wxPanel ( m_notebook1 , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxTAB_TRAVERSAL ) ;
wxBoxSizer * pinTableSizer ;
pinTableSizer = new wxBoxSizer ( wxVERTICAL ) ;
wxBoxSizer * bMargins ;
bMargins = new wxBoxSizer ( wxVERTICAL ) ;
m_pinGrid = new WX_GRID ( m_pinTablePage , wxID_ANY , wxDefaultPosition , wxSize ( - 1 , - 1 ) , 0 ) ;
// Grid
m_pinGrid - > CreateGrid ( 5 , 5 ) ;
m_pinGrid - > EnableEditing ( true ) ;
m_pinGrid - > EnableGridLines ( true ) ;
m_pinGrid - > EnableDragGridSize ( false ) ;
m_pinGrid - > SetMargins ( 0 , 0 ) ;
// Columns
m_pinGrid - > SetColSize ( 0 , 160 ) ;
m_pinGrid - > SetColSize ( 1 , 160 ) ;
m_pinGrid - > SetColSize ( 2 , 160 ) ;
m_pinGrid - > SetColSize ( 3 , 140 ) ;
m_pinGrid - > SetColSize ( 4 , 140 ) ;
m_pinGrid - > EnableDragColMove ( false ) ;
m_pinGrid - > EnableDragColSize ( true ) ;
m_pinGrid - > SetColLabelValue ( 0 , _ ( " Pin Number " ) ) ;
m_pinGrid - > SetColLabelValue ( 1 , _ ( " Base Pin Name " ) ) ;
m_pinGrid - > SetColLabelValue ( 2 , _ ( " Alternate Assignment " ) ) ;
m_pinGrid - > SetColLabelValue ( 3 , _ ( " Electrical Type " ) ) ;
m_pinGrid - > SetColLabelValue ( 4 , _ ( " Graphic Style " ) ) ;
2022-08-13 09:00:00 +00:00
m_pinGrid - > SetColLabelSize ( 24 ) ;
2020-09-02 11:50:07 +00:00
m_pinGrid - > SetColLabelAlignment ( wxALIGN_CENTER , wxALIGN_CENTER ) ;
// Rows
m_pinGrid - > EnableDragRowSize ( false ) ;
m_pinGrid - > SetRowLabelSize ( 0 ) ;
m_pinGrid - > SetRowLabelAlignment ( wxALIGN_CENTER , wxALIGN_CENTER ) ;
// Label Appearance
// Cell Defaults
2023-09-18 14:15:22 +00:00
m_pinGrid - > SetDefaultCellAlignment ( wxALIGN_LEFT , wxALIGN_CENTER ) ;
2023-08-07 20:59:51 +00:00
bMargins - > Add ( m_pinGrid , 1 , wxEXPAND | wxALL | wxFIXED_MINSIZE , 5 ) ;
2020-09-02 00:37:28 +00:00
2020-09-02 11:50:07 +00:00
pinTableSizer - > Add ( bMargins , 1 , wxEXPAND | wxRIGHT | wxLEFT , 5 ) ;
2020-09-02 00:37:28 +00:00
2020-09-02 11:50:07 +00:00
m_pinTablePage - > SetSizer ( pinTableSizer ) ;
m_pinTablePage - > Layout ( ) ;
pinTableSizer - > Fit ( m_pinTablePage ) ;
2023-08-29 17:04:33 +00:00
m_notebook1 - > AddPage ( m_pinTablePage , _ ( " Pin Functions " ) , false ) ;
2019-11-06 19:15:42 +00:00
2023-07-09 11:19:43 +00:00
mainSizer - > Add ( m_notebook1 , 1 , wxEXPAND | wxALL , 10 ) ;
2019-11-06 19:15:42 +00:00
2020-02-01 12:29:46 +00:00
wxBoxSizer * bSizerBottom ;
bSizerBottom = new wxBoxSizer ( wxHORIZONTAL ) ;
2019-11-06 19:15:42 +00:00
2020-09-02 00:37:28 +00:00
wxBoxSizer * bLibLink ;
bLibLink = new wxBoxSizer ( wxHORIZONTAL ) ;
2020-08-21 15:54:24 +00:00
2023-07-09 11:19:43 +00:00
bSizerBottom - > Add ( bLibLink , 1 , wxLEFT | wxEXPAND , 12 ) ;
2020-09-02 00:37:28 +00:00
m_libraryIDLabel = new wxStaticText ( this , wxID_ANY , _ ( " Library link: " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_libraryIDLabel - > Wrap ( - 1 ) ;
2023-07-09 11:19:43 +00:00
bSizerBottom - > Add ( m_libraryIDLabel , 0 , wxALIGN_CENTER_VERTICAL | wxLEFT , 5 ) ;
2019-11-06 19:15:42 +00:00
2021-04-01 11:54:32 +00:00
m_tcLibraryID = new wxTextCtrl ( this , wxID_ANY , wxEmptyString , wxDefaultPosition , wxDefaultSize , wxTE_READONLY | wxBORDER_NONE ) ;
2023-07-09 11:19:43 +00:00
bSizerBottom - > Add ( m_tcLibraryID , 1 , wxALIGN_CENTER_VERTICAL | wxALL , 5 ) ;
2020-09-02 00:37:28 +00:00
2021-09-15 09:20:10 +00:00
2023-07-09 11:19:43 +00:00
bSizerBottom - > Add ( 10 , 0 , 0 , wxALIGN_CENTER_VERTICAL , 5 ) ;
2020-09-02 00:37:28 +00:00
2022-09-29 10:02:23 +00:00
m_spiceFieldsButton = new wxButton ( this , wxID_ANY , _ ( " Simulation Model... " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
2021-09-15 09:20:10 +00:00
bSizerBottom - > Add ( m_spiceFieldsButton , 0 , wxALIGN_CENTER_VERTICAL | wxRIGHT | wxLEFT , 15 ) ;
2019-11-06 19:15:42 +00:00
2018-02-28 16:54:35 +00:00
m_stdDialogButtonSizer = new wxStdDialogButtonSizer ( ) ;
m_stdDialogButtonSizerOK = new wxButton ( this , wxID_OK ) ;
m_stdDialogButtonSizer - > AddButton ( m_stdDialogButtonSizerOK ) ;
m_stdDialogButtonSizerCancel = new wxButton ( this , wxID_CANCEL ) ;
m_stdDialogButtonSizer - > AddButton ( m_stdDialogButtonSizerCancel ) ;
m_stdDialogButtonSizer - > Realize ( ) ;
2019-11-06 19:15:42 +00:00
2020-10-17 23:14:17 +00:00
bSizerBottom - > Add ( m_stdDialogButtonSizer , 0 , wxALIGN_CENTER_VERTICAL | wxALL , 5 ) ;
2019-11-06 19:15:42 +00:00
2023-07-09 11:19:43 +00:00
mainSizer - > Add ( bSizerBottom , 0 , wxEXPAND | wxLEFT , 5 ) ;
2019-11-06 19:15:42 +00:00
2013-05-26 04:36:44 +00:00
this - > SetSizer ( mainSizer ) ;
this - > Layout ( ) ;
2020-06-03 12:30:57 +00:00
mainSizer - > Fit ( this ) ;
2019-11-06 19:15:42 +00:00
2013-05-26 04:36:44 +00:00
// Connect Events
2020-10-17 23:25:39 +00:00
this - > Connect ( wxEVT_INIT_DIALOG , wxInitDialogEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnInitDlg ) ) ;
this - > Connect ( wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnUpdateUI ) ) ;
2022-01-26 01:57:42 +00:00
m_fieldsGrid - > Connect ( wxEVT_GRID_EDITOR_HIDDEN , wxGridEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnGridEditorHidden ) , NULL , this ) ;
2020-10-17 23:25:39 +00:00
m_fieldsGrid - > Connect ( wxEVT_GRID_EDITOR_SHOWN , wxGridEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnGridEditorShown ) , NULL , this ) ;
2021-12-16 14:39:58 +00:00
m_fieldsGrid - > Connect ( wxEVT_SIZE , wxSizeEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnSizeFieldsGrid ) , NULL , this ) ;
2020-10-17 23:25:39 +00:00
m_bpAdd - > Connect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnAddField ) , NULL , this ) ;
m_bpMoveUp - > Connect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnMoveUp ) , NULL , this ) ;
m_bpMoveDown - > Connect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnMoveDown ) , NULL , this ) ;
m_bpDelete - > Connect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnDeleteField ) , NULL , this ) ;
2022-08-13 09:00:00 +00:00
m_unitChoice - > Connect ( wxEVT_COMMAND_CHOICE_SELECTED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnUnitChoice ) , NULL , this ) ;
2021-10-25 11:34:30 +00:00
m_cbAlternateSymbol - > Connect ( wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnCheckBox ) , NULL , this ) ;
m_orientationCtrl - > Connect ( wxEVT_COMMAND_CHOICE_SELECTED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnChoice ) , NULL , this ) ;
m_mirrorCtrl - > Connect ( wxEVT_COMMAND_CHOICE_SELECTED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnChoice ) , NULL , this ) ;
m_ShowPinNumButt - > Connect ( wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnCheckBox ) , NULL , this ) ;
m_ShowPinNameButt - > Connect ( wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnCheckBox ) , NULL , this ) ;
2023-08-08 16:32:08 +00:00
m_cbExcludeFromSim - > Connect ( wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnCheckBox ) , NULL , this ) ;
2021-10-25 11:34:30 +00:00
m_cbExcludeFromBom - > Connect ( wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnCheckBox ) , NULL , this ) ;
m_cbExcludeFromBoard - > Connect ( wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnCheckBox ) , NULL , this ) ;
2020-10-17 23:25:39 +00:00
m_updateSymbolBtn - > Connect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnUpdateSymbol ) , NULL , this ) ;
m_changeSymbolBtn - > Connect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnExchangeSymbol ) , NULL , this ) ;
m_editSchematicSymbolBtn - > Connect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnEditSymbol ) , NULL , this ) ;
2022-09-02 19:48:10 +00:00
m_editSchematicSymbolBtn - > Connect ( wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : onUpdateEditSymbol ) , NULL , this ) ;
2020-10-17 23:25:39 +00:00
m_editLibrarySymbolBtn - > Connect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnEditLibrarySymbol ) , NULL , this ) ;
2022-09-02 19:48:10 +00:00
m_editLibrarySymbolBtn - > Connect ( wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : onUpdateEditLibrarySymbol ) , NULL , this ) ;
2020-10-17 23:25:39 +00:00
m_pinGrid - > Connect ( wxEVT_GRID_CELL_CHANGED , wxGridEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnPinTableCellEdited ) , NULL , this ) ;
2021-12-16 14:39:58 +00:00
m_pinGrid - > Connect ( wxEVT_SIZE , wxSizeEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnSizePinsGrid ) , NULL , this ) ;
2020-10-17 23:25:39 +00:00
m_spiceFieldsButton - > Connect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnEditSpiceModel ) , NULL , this ) ;
m_stdDialogButtonSizerCancel - > Connect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnCancelButtonClick ) , NULL , this ) ;
2013-05-26 04:36:44 +00:00
}
2020-10-17 23:25:39 +00:00
DIALOG_SYMBOL_PROPERTIES_BASE : : ~ DIALOG_SYMBOL_PROPERTIES_BASE ( )
2013-05-26 04:36:44 +00:00
{
// Disconnect Events
2020-10-17 23:25:39 +00:00
this - > Disconnect ( wxEVT_INIT_DIALOG , wxInitDialogEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnInitDlg ) ) ;
this - > Disconnect ( wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnUpdateUI ) ) ;
2022-01-26 01:57:42 +00:00
m_fieldsGrid - > Disconnect ( wxEVT_GRID_EDITOR_HIDDEN , wxGridEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnGridEditorHidden ) , NULL , this ) ;
2020-10-17 23:25:39 +00:00
m_fieldsGrid - > Disconnect ( wxEVT_GRID_EDITOR_SHOWN , wxGridEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnGridEditorShown ) , NULL , this ) ;
2021-12-16 14:39:58 +00:00
m_fieldsGrid - > Disconnect ( wxEVT_SIZE , wxSizeEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnSizeFieldsGrid ) , NULL , this ) ;
2020-10-17 23:25:39 +00:00
m_bpAdd - > Disconnect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnAddField ) , NULL , this ) ;
m_bpMoveUp - > Disconnect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnMoveUp ) , NULL , this ) ;
m_bpMoveDown - > Disconnect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnMoveDown ) , NULL , this ) ;
m_bpDelete - > Disconnect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnDeleteField ) , NULL , this ) ;
2022-08-13 09:00:00 +00:00
m_unitChoice - > Disconnect ( wxEVT_COMMAND_CHOICE_SELECTED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnUnitChoice ) , NULL , this ) ;
2021-10-25 11:34:30 +00:00
m_cbAlternateSymbol - > Disconnect ( wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnCheckBox ) , NULL , this ) ;
m_orientationCtrl - > Disconnect ( wxEVT_COMMAND_CHOICE_SELECTED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnChoice ) , NULL , this ) ;
m_mirrorCtrl - > Disconnect ( wxEVT_COMMAND_CHOICE_SELECTED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnChoice ) , NULL , this ) ;
m_ShowPinNumButt - > Disconnect ( wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnCheckBox ) , NULL , this ) ;
m_ShowPinNameButt - > Disconnect ( wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnCheckBox ) , NULL , this ) ;
2023-08-08 16:32:08 +00:00
m_cbExcludeFromSim - > Disconnect ( wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnCheckBox ) , NULL , this ) ;
2021-10-25 11:34:30 +00:00
m_cbExcludeFromBom - > Disconnect ( wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnCheckBox ) , NULL , this ) ;
m_cbExcludeFromBoard - > Disconnect ( wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnCheckBox ) , NULL , this ) ;
2020-10-17 23:25:39 +00:00
m_updateSymbolBtn - > Disconnect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnUpdateSymbol ) , NULL , this ) ;
m_changeSymbolBtn - > Disconnect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnExchangeSymbol ) , NULL , this ) ;
m_editSchematicSymbolBtn - > Disconnect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnEditSymbol ) , NULL , this ) ;
2022-09-02 19:48:10 +00:00
m_editSchematicSymbolBtn - > Disconnect ( wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : onUpdateEditSymbol ) , NULL , this ) ;
2020-10-17 23:25:39 +00:00
m_editLibrarySymbolBtn - > Disconnect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnEditLibrarySymbol ) , NULL , this ) ;
2022-09-02 19:48:10 +00:00
m_editLibrarySymbolBtn - > Disconnect ( wxEVT_UPDATE_UI , wxUpdateUIEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : onUpdateEditLibrarySymbol ) , NULL , this ) ;
2020-10-17 23:25:39 +00:00
m_pinGrid - > Disconnect ( wxEVT_GRID_CELL_CHANGED , wxGridEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnPinTableCellEdited ) , NULL , this ) ;
2021-12-16 14:39:58 +00:00
m_pinGrid - > Disconnect ( wxEVT_SIZE , wxSizeEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnSizePinsGrid ) , NULL , this ) ;
2020-10-17 23:25:39 +00:00
m_spiceFieldsButton - > Disconnect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnEditSpiceModel ) , NULL , this ) ;
m_stdDialogButtonSizerCancel - > Disconnect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SYMBOL_PROPERTIES_BASE : : OnCancelButtonClick ) , NULL , this ) ;
2019-11-06 19:15:42 +00:00
2013-05-26 04:36:44 +00:00
}