2017-11-20 16:14:25 +00:00
///////////////////////////////////////////////////////////////////////////
2021-02-19 08:37:53 +00:00
// C++ code generated with wxFormBuilder (version Oct 26 2018)
2017-11-20 16:14:25 +00:00
// http://www.wxformbuilder.org/
//
2017-12-24 15:04:02 +00:00
// PLEASE DO *NOT* EDIT THIS FILE!
2017-11-20 16:14:25 +00:00
///////////////////////////////////////////////////////////////////////////
2018-06-28 17:19:31 +00:00
# include "widgets/wx_grid.h"
2017-11-20 16:14:25 +00:00
# include "dialog_edit_components_libid_base.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_EDIT_COMPONENTS_LIBID_BASE : : DIALOG_EDIT_COMPONENTS_LIBID_BASE ( wxWindow * parent , wxWindowID id , const wxString & title , const wxPoint & pos , const wxSize & size , long style ) : DIALOG_SHIM ( parent , id , title , pos , size , style )
{
this - > SetSizeHints ( wxDefaultSize , wxDefaultSize ) ;
2020-07-13 13:16:21 +00:00
2017-11-20 16:14:25 +00:00
wxBoxSizer * bSizerMain ;
bSizerMain = new wxBoxSizer ( wxVERTICAL ) ;
2020-07-13 13:16:21 +00:00
2018-06-28 17:19:31 +00:00
m_grid = new WX_GRID ( this , wxID_ANY , wxDefaultPosition , wxDefaultSize , 0 ) ;
2020-07-13 13:16:21 +00:00
2017-11-20 16:14:25 +00:00
// Grid
2017-12-24 15:04:02 +00:00
m_grid - > CreateGrid ( 5 , 3 ) ;
2017-11-20 16:14:25 +00:00
m_grid - > EnableEditing ( true ) ;
m_grid - > EnableGridLines ( true ) ;
m_grid - > EnableDragGridSize ( false ) ;
m_grid - > SetMargins ( 0 , 0 ) ;
2020-07-13 13:16:21 +00:00
2017-11-20 16:14:25 +00:00
// Columns
2018-06-28 17:19:31 +00:00
m_grid - > SetColSize ( 0 , 280 ) ;
m_grid - > SetColSize ( 1 , 280 ) ;
m_grid - > SetColSize ( 2 , 280 ) ;
2017-11-20 16:14:25 +00:00
m_grid - > EnableDragColMove ( false ) ;
m_grid - > EnableDragColSize ( true ) ;
2021-02-19 08:37:53 +00:00
m_grid - > SetColLabelSize ( 22 ) ;
2017-12-24 15:04:02 +00:00
m_grid - > SetColLabelValue ( 0 , _ ( " Symbols " ) ) ;
2018-04-20 14:31:45 +00:00
m_grid - > SetColLabelValue ( 1 , _ ( " Current Library Reference " ) ) ;
m_grid - > SetColLabelValue ( 2 , _ ( " New Library Reference " ) ) ;
2020-07-13 13:16:21 +00:00
m_grid - > SetColLabelAlignment ( wxALIGN_CENTER , wxALIGN_CENTER ) ;
2017-11-20 16:14:25 +00:00
// Rows
2018-06-28 17:19:31 +00:00
m_grid - > EnableDragRowSize ( false ) ;
m_grid - > SetRowLabelSize ( 0 ) ;
2020-07-13 13:16:21 +00:00
m_grid - > SetRowLabelAlignment ( wxALIGN_CENTER , wxALIGN_CENTER ) ;
2017-11-20 16:14:25 +00:00
// Label Appearance
2020-07-13 13:16:21 +00:00
2017-11-20 16:14:25 +00:00
// Cell Defaults
m_grid - > SetDefaultCellAlignment ( wxALIGN_LEFT , wxALIGN_TOP ) ;
2018-06-28 17:19:31 +00:00
m_grid - > SetMinSize ( wxSize ( - 1 , 300 ) ) ;
2020-07-13 13:16:21 +00:00
2018-06-28 17:19:31 +00:00
bSizerMain - > Add ( m_grid , 1 , wxEXPAND | wxTOP | wxRIGHT | wxLEFT , 10 ) ;
2020-07-13 13:16:21 +00:00
2017-11-22 16:53:56 +00:00
wxBoxSizer * bSizerButtons ;
bSizerButtons = new wxBoxSizer ( wxHORIZONTAL ) ;
2020-07-13 13:16:21 +00:00
2018-06-28 17:19:31 +00:00
m_buttonOrphanItems = new wxButton ( this , wxID_ANY , _ ( " Map Orphans " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
2019-02-07 19:13:38 +00:00
m_buttonOrphanItems - > SetToolTip ( _ ( " If some components are orphan (the linked symbol is found nowhere), \n try to find a candidate having the same name in one of loaded symbol libraries. " ) ) ;
2020-07-13 13:16:21 +00:00
2018-06-28 17:19:31 +00:00
bSizerButtons - > Add ( m_buttonOrphanItems , 0 , wxALL | wxALIGN_CENTER_VERTICAL , 5 ) ;
2020-07-13 13:16:21 +00:00
2021-02-18 09:37:48 +00:00
m_checkBoxUpdateFields = new wxCheckBox ( this , wxID_ANY , _ ( " Update symbol fields from new library " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
2021-02-19 09:35:25 +00:00
m_checkBoxUpdateFields - > SetToolTip ( _ ( " Replace current symbols fields by fields from the new library. \n Warning: fields \" Value \" and \" Footprints \" will be therefore replaced. " ) ) ;
2021-02-19 08:37:53 +00:00
2021-02-18 09:37:48 +00:00
bSizerButtons - > Add ( m_checkBoxUpdateFields , 0 , wxALIGN_CENTER_VERTICAL | wxALL , 5 ) ;
2020-07-13 13:16:21 +00:00
2018-08-22 08:42:59 +00:00
bSizerButtons - > Add ( 0 , 0 , 1 , wxEXPAND , 5 ) ;
2020-07-13 13:16:21 +00:00
2017-11-20 16:14:25 +00:00
m_sdbSizer = new wxStdDialogButtonSizer ( ) ;
m_sdbSizerOK = new wxButton ( this , wxID_OK ) ;
m_sdbSizer - > AddButton ( m_sdbSizerOK ) ;
m_sdbSizerCancel = new wxButton ( this , wxID_CANCEL ) ;
m_sdbSizer - > AddButton ( m_sdbSizerCancel ) ;
m_sdbSizer - > Realize ( ) ;
2020-07-13 13:16:21 +00:00
2018-08-22 08:42:59 +00:00
bSizerButtons - > Add ( m_sdbSizer , 0 , wxALL | wxALIGN_CENTER_VERTICAL , 5 ) ;
2020-07-13 13:16:21 +00:00
2018-09-29 16:18:55 +00:00
bSizerMain - > Add ( bSizerButtons , 0 , wxEXPAND | wxLEFT , 5 ) ;
2020-07-13 13:16:21 +00:00
2017-11-20 16:14:25 +00:00
this - > SetSizer ( bSizerMain ) ;
this - > Layout ( ) ;
2020-11-14 12:39:45 +00:00
bSizerMain - > Fit ( this ) ;
2020-07-13 13:16:21 +00:00
2017-11-20 16:14:25 +00:00
this - > Centre ( wxBOTH ) ;
2020-07-13 13:16:21 +00:00
2017-11-20 16:14:25 +00:00
// Connect Events
m_grid - > Connect ( wxEVT_GRID_CELL_LEFT_DCLICK , wxGridEventHandler ( DIALOG_EDIT_COMPONENTS_LIBID_BASE : : onCellBrowseLib ) , NULL , this ) ;
2018-06-28 17:19:31 +00:00
m_grid - > Connect ( wxEVT_SIZE , wxSizeEventHandler ( DIALOG_EDIT_COMPONENTS_LIBID_BASE : : OnSizeGrid ) , NULL , this ) ;
2017-11-23 18:48:49 +00:00
m_buttonOrphanItems - > Connect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_EDIT_COMPONENTS_LIBID_BASE : : onClickOrphansButton ) , NULL , this ) ;
2018-06-28 17:19:31 +00:00
m_sdbSizerCancel - > Connect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_EDIT_COMPONENTS_LIBID_BASE : : onCancel ) , NULL , this ) ;
2017-11-20 16:14:25 +00:00
}
DIALOG_EDIT_COMPONENTS_LIBID_BASE : : ~ DIALOG_EDIT_COMPONENTS_LIBID_BASE ( )
{
// Disconnect Events
m_grid - > Disconnect ( wxEVT_GRID_CELL_LEFT_DCLICK , wxGridEventHandler ( DIALOG_EDIT_COMPONENTS_LIBID_BASE : : onCellBrowseLib ) , NULL , this ) ;
2018-06-28 17:19:31 +00:00
m_grid - > Disconnect ( wxEVT_SIZE , wxSizeEventHandler ( DIALOG_EDIT_COMPONENTS_LIBID_BASE : : OnSizeGrid ) , NULL , this ) ;
2017-11-23 18:48:49 +00:00
m_buttonOrphanItems - > Disconnect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_EDIT_COMPONENTS_LIBID_BASE : : onClickOrphansButton ) , NULL , this ) ;
2018-06-28 17:19:31 +00:00
m_sdbSizerCancel - > Disconnect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_EDIT_COMPONENTS_LIBID_BASE : : onCancel ) , NULL , this ) ;
2020-07-13 13:16:21 +00:00
2017-11-20 16:14:25 +00:00
}