2018-06-06 10:05:56 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2024-01-29 18:31:24 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
2018-06-06 10:05:56 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "pcb_layer_box_selector.h"
|
2021-11-07 22:41:03 +00:00
|
|
|
#include "widgets/bitmap_button.h"
|
2022-01-03 01:20:25 +00:00
|
|
|
#include "widgets/font_choice.h"
|
2018-06-06 10:05:56 +00:00
|
|
|
|
|
|
|
#include "dialog_text_properties_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
DIALOG_TEXT_PROPERTIES_BASE::DIALOG_TEXT_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 )
|
|
|
|
{
|
|
|
|
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
wxBoxSizer* bMainSizer;
|
|
|
|
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
m_MultiLineSizer = new wxBoxSizer( wxVERTICAL );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
wxStaticText* textLabel;
|
|
|
|
textLabel = new wxStaticText( this, wxID_ANY, _("Text:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
textLabel->Wrap( -1 );
|
|
|
|
m_MultiLineSizer->Add( textLabel, 0, wxRIGHT|wxLEFT, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2019-09-05 07:42:01 +00:00
|
|
|
m_MultiLineText = new wxStyledTextCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, wxEmptyString );
|
|
|
|
m_MultiLineText->SetUseTabs( true );
|
|
|
|
m_MultiLineText->SetTabWidth( 4 );
|
|
|
|
m_MultiLineText->SetIndent( 4 );
|
|
|
|
m_MultiLineText->SetTabIndents( false );
|
|
|
|
m_MultiLineText->SetBackSpaceUnIndents( false );
|
|
|
|
m_MultiLineText->SetViewEOL( false );
|
|
|
|
m_MultiLineText->SetViewWhiteSpace( false );
|
|
|
|
m_MultiLineText->SetMarginWidth( 2, 0 );
|
|
|
|
m_MultiLineText->SetIndentationGuides( true );
|
2023-01-09 13:49:20 +00:00
|
|
|
m_MultiLineText->SetReadOnly( false );
|
2019-09-05 07:42:01 +00:00
|
|
|
m_MultiLineText->SetMarginWidth( 1, 0 );
|
|
|
|
m_MultiLineText->SetMarginWidth( 0, 0 );
|
|
|
|
m_MultiLineText->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS );
|
|
|
|
m_MultiLineText->MarkerSetBackground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("BLACK") ) );
|
|
|
|
m_MultiLineText->MarkerSetForeground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("WHITE") ) );
|
|
|
|
m_MultiLineText->MarkerDefine( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS );
|
|
|
|
m_MultiLineText->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("BLACK") ) );
|
|
|
|
m_MultiLineText->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("WHITE") ) );
|
|
|
|
m_MultiLineText->MarkerDefine( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY );
|
|
|
|
m_MultiLineText->MarkerDefine( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUS );
|
|
|
|
m_MultiLineText->MarkerSetBackground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("BLACK") ) );
|
|
|
|
m_MultiLineText->MarkerSetForeground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("WHITE") ) );
|
|
|
|
m_MultiLineText->MarkerDefine( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUS );
|
|
|
|
m_MultiLineText->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("BLACK") ) );
|
|
|
|
m_MultiLineText->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("WHITE") ) );
|
|
|
|
m_MultiLineText->MarkerDefine( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY );
|
|
|
|
m_MultiLineText->MarkerDefine( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY );
|
|
|
|
m_MultiLineText->SetSelBackground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
|
|
|
|
m_MultiLineText->SetSelForeground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
|
2021-01-12 09:00:21 +00:00
|
|
|
m_MultiLineSizer->Add( m_MultiLineText, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
bMainSizer->Add( m_MultiLineSizer, 20, wxEXPAND|wxALL, 10 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
m_SingleLineSizer = new wxBoxSizer( wxHORIZONTAL );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2020-03-17 16:08:29 +00:00
|
|
|
m_TextLabel = new wxStaticText( this, wxID_ANY, _("Reference designator:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2018-06-06 10:05:56 +00:00
|
|
|
m_TextLabel->Wrap( -1 );
|
2021-11-07 22:41:03 +00:00
|
|
|
m_SingleLineSizer->Add( m_TextLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-10-26 11:09:05 +00:00
|
|
|
m_SingleLineText = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
2021-11-07 22:41:03 +00:00
|
|
|
m_SingleLineSizer->Add( m_SingleLineText, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
|
|
|
|
2021-11-07 22:41:03 +00:00
|
|
|
bMainSizer->Add( m_SingleLineSizer, 0, wxEXPAND|wxALL, 10 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2021-11-07 22:41:03 +00:00
|
|
|
wxGridBagSizer* gbSizer1;
|
2022-02-01 15:30:15 +00:00
|
|
|
gbSizer1 = new wxGridBagSizer( 2, 3 );
|
2021-11-07 22:41:03 +00:00
|
|
|
gbSizer1->SetFlexibleDirection( wxBOTH );
|
|
|
|
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->SetEmptyCellSize( wxSize( 20,-1 ) );
|
2021-01-12 09:00:21 +00:00
|
|
|
|
|
|
|
m_cbLocked = new wxCheckBox( this, wxID_ANY, _("Locked"), wxDefaultPosition, wxDefaultSize, 0 );
|
2022-03-08 13:16:39 +00:00
|
|
|
gbSizer1->Add( m_cbLocked, wxGBPosition( 0, 0 ), wxGBSpan( 1, 3 ), wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
|
|
|
m_Visible = new wxCheckBox( this, wxID_ANY, _("Visible"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
gbSizer1->Add( m_Visible, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxRIGHT, 5 );
|
2021-01-12 09:00:21 +00:00
|
|
|
|
2022-01-03 01:20:25 +00:00
|
|
|
m_LayerLabel = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_LayerLabel->Wrap( -1 );
|
|
|
|
gbSizer1->Add( m_LayerLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
|
|
|
|
|
|
|
m_LayerSelectionCtrl = new PCB_LAYER_BOX_SELECTOR( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
|
|
|
gbSizer1->Add( m_LayerSelectionCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
|
|
|
|
2021-11-07 22:41:03 +00:00
|
|
|
wxBoxSizer* bSizer7;
|
|
|
|
bSizer7 = new wxBoxSizer( wxHORIZONTAL );
|
2021-01-12 09:00:21 +00:00
|
|
|
|
2022-03-08 13:16:39 +00:00
|
|
|
m_cbKnockout = new wxCheckBox( this, wxID_ANY, _("Knockout"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSizer7->Add( m_cbKnockout, 1, wxTOP|wxBOTTOM|wxRIGHT, 15 );
|
2021-11-07 22:41:03 +00:00
|
|
|
|
|
|
|
m_KeepUpright = new wxCheckBox( this, wxID_ANY, _("Keep upright"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_KeepUpright->SetToolTip( _("Keep text upright") );
|
2021-01-12 09:00:21 +00:00
|
|
|
|
2022-01-03 01:20:25 +00:00
|
|
|
bSizer7->Add( m_KeepUpright, 1, wxALIGN_CENTER_VERTICAL, 5 );
|
2021-11-07 22:41:03 +00:00
|
|
|
|
|
|
|
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( bSizer7, wxGBPosition( 1, 4 ), wxGBSpan( 1, 3 ), wxEXPAND, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2022-01-03 01:20:25 +00:00
|
|
|
m_fontLabel = new wxStaticText( this, wxID_ANY, _("Font:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_fontLabel->Wrap( -1 );
|
|
|
|
gbSizer1->Add( m_fontLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2022-01-07 00:47:23 +00:00
|
|
|
wxString m_fontCtrlChoices[] = { _("KiCad Font") };
|
2022-01-03 01:20:25 +00:00
|
|
|
int m_fontCtrlNChoices = sizeof( m_fontCtrlChoices ) / sizeof( wxString );
|
|
|
|
m_fontCtrl = new FONT_CHOICE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fontCtrlNChoices, m_fontCtrlChoices, 0 );
|
|
|
|
m_fontCtrl->SetSelection( 0 );
|
2022-03-08 13:16:39 +00:00
|
|
|
gbSizer1->Add( m_fontCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2021-11-07 22:41:03 +00:00
|
|
|
wxBoxSizer* bSizerButtonBar;
|
|
|
|
bSizerButtonBar = new wxBoxSizer( wxHORIZONTAL );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2022-01-03 01:20:25 +00:00
|
|
|
m_bold = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
bSizerButtonBar->Add( m_bold, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
2021-11-07 22:41:03 +00:00
|
|
|
m_italic = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
bSizerButtonBar->Add( m_italic, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
m_separator1 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
m_separator1->Enable( false );
|
|
|
|
|
|
|
|
bSizerButtonBar->Add( m_separator1, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
m_alignLeft = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
bSizerButtonBar->Add( m_alignLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
m_alignCenter = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
bSizerButtonBar->Add( m_alignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
m_alignRight = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
bSizerButtonBar->Add( m_alignRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
m_separator2 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
m_separator2->Enable( false );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2021-11-07 22:41:03 +00:00
|
|
|
bSizerButtonBar->Add( m_separator2, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2023-01-08 12:13:06 +00:00
|
|
|
m_valignTop = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
bSizerButtonBar->Add( m_valignTop, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
m_valignCenter = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
bSizerButtonBar->Add( m_valignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
m_valignBottom = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
bSizerButtonBar->Add( m_valignBottom, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
2021-11-07 22:41:03 +00:00
|
|
|
|
|
|
|
m_separator3 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
m_separator3->Enable( false );
|
|
|
|
|
|
|
|
bSizerButtonBar->Add( m_separator3, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
2023-01-08 12:13:06 +00:00
|
|
|
m_mirrored = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
bSizerButtonBar->Add( m_mirrored, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
2021-11-07 22:41:03 +00:00
|
|
|
|
2023-10-19 15:59:35 +00:00
|
|
|
gbSizer1->Add( bSizerButtonBar, wxGBPosition( 2, 4 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxEXPAND|wxTOP, 3 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
m_SizeXLabel = new wxStaticText( this, wxID_ANY, _("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_SizeXLabel->Wrap( -1 );
|
2019-09-02 10:07:05 +00:00
|
|
|
m_SizeXLabel->SetToolTip( _("Text width") );
|
|
|
|
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( m_SizeXLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-10-26 11:09:05 +00:00
|
|
|
m_SizeXCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( m_SizeXCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
m_SizeXUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_SizeXUnits->Wrap( -1 );
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( m_SizeXUnits, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
m_SizeYLabel = new wxStaticText( this, wxID_ANY, _("Height:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_SizeYLabel->Wrap( -1 );
|
2019-09-02 10:07:05 +00:00
|
|
|
m_SizeYLabel->SetToolTip( _("Text height") );
|
|
|
|
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( m_SizeYLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-10-26 11:09:05 +00:00
|
|
|
m_SizeYCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( m_SizeYCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
m_SizeYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_SizeYUnits->Wrap( -1 );
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( m_SizeYUnits, wxGBPosition( 4, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
m_ThicknessLabel = new wxStaticText( this, wxID_ANY, _("Thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_ThicknessLabel->Wrap( -1 );
|
2019-09-02 10:07:05 +00:00
|
|
|
m_ThicknessLabel->SetToolTip( _("Text thickness") );
|
|
|
|
|
2023-10-19 11:35:10 +00:00
|
|
|
gbSizer1->Add( m_ThicknessLabel, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 4 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-10-26 11:09:05 +00:00
|
|
|
m_ThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( m_ThicknessCtrl, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
m_ThicknessUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_ThicknessUnits->Wrap( -1 );
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( m_ThicknessUnits, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
m_PositionXLabel = new wxStaticText( this, wxID_ANY, _("Position X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_PositionXLabel->Wrap( -1 );
|
2019-09-02 10:07:05 +00:00
|
|
|
m_PositionXLabel->SetToolTip( _("Text pos X") );
|
|
|
|
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( m_PositionXLabel, wxGBPosition( 3, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-10-26 11:09:05 +00:00
|
|
|
m_PositionXCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( m_PositionXCtrl, wxGBPosition( 3, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
m_PositionXUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_PositionXUnits->Wrap( -1 );
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( m_PositionXUnits, wxGBPosition( 3, 6 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
m_PositionYLabel = new wxStaticText( this, wxID_ANY, _("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_PositionYLabel->Wrap( -1 );
|
2019-09-02 10:07:05 +00:00
|
|
|
m_PositionYLabel->SetToolTip( _("Text pos Y") );
|
|
|
|
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( m_PositionYLabel, wxGBPosition( 4, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-10-26 11:09:05 +00:00
|
|
|
m_PositionYCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( m_PositionYCtrl, wxGBPosition( 4, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
m_PositionYUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_PositionYUnits->Wrap( -1 );
|
2022-01-10 01:53:01 +00:00
|
|
|
gbSizer1->Add( m_PositionYUnits, wxGBPosition( 4, 6 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2021-11-07 22:41:03 +00:00
|
|
|
m_OrientLabel = new wxStaticText( this, wxID_ANY, _("Orientation:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_OrientLabel->Wrap( -1 );
|
|
|
|
m_OrientLabel->SetToolTip( _("Text orientation") );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2022-01-03 01:20:25 +00:00
|
|
|
gbSizer1->Add( m_OrientLabel, wxGBPosition( 5, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2021-11-07 22:41:03 +00:00
|
|
|
m_OrientCtrl = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
|
|
|
m_OrientCtrl->Append( _("0.0") );
|
|
|
|
m_OrientCtrl->Append( _("90.0") );
|
|
|
|
m_OrientCtrl->Append( _("-90.0") );
|
|
|
|
m_OrientCtrl->Append( _("180.0") );
|
2022-01-10 01:53:01 +00:00
|
|
|
gbSizer1->Add( m_OrientCtrl, wxGBPosition( 5, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
2019-09-02 07:11:59 +00:00
|
|
|
|
|
|
|
|
2023-08-22 07:39:20 +00:00
|
|
|
gbSizer1->AddGrowableCol( 1 );
|
|
|
|
gbSizer1->AddGrowableCol( 5 );
|
|
|
|
|
2021-11-07 22:41:03 +00:00
|
|
|
bMainSizer->Add( gbSizer1, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
|
|
|
|
2018-10-26 11:09:05 +00:00
|
|
|
bMainSizer->Add( 0, 0, 0, wxTOP, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-07-18 16:59:05 +00:00
|
|
|
wxBoxSizer* bMargins;
|
|
|
|
bMargins = new wxBoxSizer( wxVERTICAL );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-07-18 16:59:05 +00:00
|
|
|
m_statusLine = new wxStaticText( this, wxID_ANY, _("Parent footprint description"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_statusLine->Wrap( -1 );
|
|
|
|
bMargins->Add( m_statusLine, 0, wxBOTTOM|wxRIGHT|wxLEFT, 3 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
|
|
|
|
2023-01-09 13:49:20 +00:00
|
|
|
bMainSizer->Add( bMargins, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +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();
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2023-01-09 13:49:20 +00:00
|
|
|
bMainSizer->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
this->SetSizer( bMainSizer );
|
|
|
|
this->Layout();
|
2023-10-19 15:59:35 +00:00
|
|
|
bMainSizer->Fit( this );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
this->Centre( wxBOTH );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
// Connect Events
|
|
|
|
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnInitDlg ) );
|
2021-11-27 09:08:30 +00:00
|
|
|
m_MultiLineText->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onMultiLineTCLostFocus ), NULL, this );
|
2020-11-25 16:25:26 +00:00
|
|
|
m_SingleLineText->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnSetFocusText ), NULL, this );
|
2018-06-06 10:05:56 +00:00
|
|
|
m_SingleLineText->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this );
|
2022-01-03 01:20:25 +00:00
|
|
|
m_fontCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onFontSelected ), NULL, this );
|
|
|
|
m_bold->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onBoldToggle ), NULL, this );
|
2021-11-07 22:41:03 +00:00
|
|
|
m_alignLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onAlignButton ), NULL, this );
|
|
|
|
m_alignCenter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onAlignButton ), NULL, this );
|
|
|
|
m_alignRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onAlignButton ), NULL, this );
|
2023-01-08 12:13:06 +00:00
|
|
|
m_valignTop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onValignButton ), NULL, this );
|
|
|
|
m_valignCenter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onValignButton ), NULL, this );
|
|
|
|
m_valignBottom->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onValignButton ), NULL, this );
|
2018-06-06 10:05:56 +00:00
|
|
|
m_SizeXCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this );
|
|
|
|
m_SizeYCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this );
|
2022-01-03 01:20:25 +00:00
|
|
|
m_ThicknessCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onThickness ), NULL, this );
|
2018-06-06 10:05:56 +00:00
|
|
|
m_PositionXCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this );
|
|
|
|
m_PositionYCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this );
|
2021-11-07 22:41:03 +00:00
|
|
|
m_OrientCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this );
|
2018-06-06 10:05:56 +00:00
|
|
|
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this );
|
|
|
|
}
|
|
|
|
|
|
|
|
DIALOG_TEXT_PROPERTIES_BASE::~DIALOG_TEXT_PROPERTIES_BASE()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
|
|
|
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnInitDlg ) );
|
2021-11-27 09:08:30 +00:00
|
|
|
m_MultiLineText->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onMultiLineTCLostFocus ), NULL, this );
|
2020-11-25 16:25:26 +00:00
|
|
|
m_SingleLineText->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnSetFocusText ), NULL, this );
|
2018-06-06 10:05:56 +00:00
|
|
|
m_SingleLineText->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this );
|
2022-01-03 01:20:25 +00:00
|
|
|
m_fontCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onFontSelected ), NULL, this );
|
|
|
|
m_bold->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onBoldToggle ), NULL, this );
|
2021-11-07 22:41:03 +00:00
|
|
|
m_alignLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onAlignButton ), NULL, this );
|
|
|
|
m_alignCenter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onAlignButton ), NULL, this );
|
|
|
|
m_alignRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onAlignButton ), NULL, this );
|
2023-01-08 12:13:06 +00:00
|
|
|
m_valignTop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onValignButton ), NULL, this );
|
|
|
|
m_valignCenter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onValignButton ), NULL, this );
|
|
|
|
m_valignBottom->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onValignButton ), NULL, this );
|
2018-06-06 10:05:56 +00:00
|
|
|
m_SizeXCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this );
|
|
|
|
m_SizeYCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this );
|
2022-01-03 01:20:25 +00:00
|
|
|
m_ThicknessCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onThickness ), NULL, this );
|
2018-06-06 10:05:56 +00:00
|
|
|
m_PositionXCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this );
|
|
|
|
m_PositionYCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this );
|
2021-11-07 22:41:03 +00:00
|
|
|
m_OrientCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this );
|
2018-06-06 10:05:56 +00:00
|
|
|
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnOkClick ), NULL, this );
|
2019-03-27 10:50:24 +00:00
|
|
|
|
2018-06-06 10:05:56 +00:00
|
|
|
}
|