diff --git a/eeschema/dialogs/dialog_sheet_pin_properties.cpp b/eeschema/dialogs/dialog_sheet_pin_properties.cpp index 501b42c533..4b8ca941b4 100644 --- a/eeschema/dialogs/dialog_sheet_pin_properties.cpp +++ b/eeschema/dialogs/dialog_sheet_pin_properties.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2010 Wayne Stambaugh - * Copyright (C) 2018-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2018-2022 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -22,6 +22,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include +#include +#include +#include #include #include #include @@ -31,16 +35,6 @@ #include -static wxString sheetPinTypes[] = -{ - _( "Input" ), - _( "Output" ), - _( "Bidirectional" ), - _( "Tri-state" ), - _( "Passive" ) -}; - - DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES( SCH_EDIT_FRAME* parent, SCH_SHEET_PIN* aPin ) : DIALOG_SHEET_PIN_PROPERTIES_BASE( parent ), @@ -49,10 +43,21 @@ DIALOG_SHEET_PIN_PROPERTIES::DIALOG_SHEET_PIN_PROPERTIES( SCH_EDIT_FRAME* parent m_textSize( parent, m_textSizeLabel, m_textSizeCtrl, m_textSizeUnits ), m_helpWindow( nullptr ) { - for( const wxString& sheetPinType : sheetPinTypes ) - m_choiceConnectionType->Append( sheetPinType ); + COLOR_SETTINGS* colorSettings = m_frame->GetColorSettings(); + COLOR4D schematicBackground = colorSettings->GetColor( LAYER_SCHEMATIC_BACKGROUND ); + + m_separator1->SetIsSeparator(); + + m_bold->SetIsCheckButton(); + m_bold->SetBitmap( KiBitmap( BITMAPS::text_bold ) ); + m_italic->SetIsCheckButton(); + m_italic->SetBitmap( KiBitmap( BITMAPS::text_italic ) ); + + m_separator2->SetIsSeparator(); + + m_textColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED ); + m_textColorSwatch->SetSwatchBackground( schematicBackground ); - m_choiceConnectionType->SetSelection( 0 ); SetInitialFocus( m_comboName ); SetupStandardButtons(); @@ -100,10 +105,26 @@ bool DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow() m_comboName->SetValue( UnescapeString( m_sheetPin->GetText() ) ); m_comboName->SelectAll(); + m_fontCtrl->SetFontSelection( m_sheetPin->GetFont() ); + + m_bold->Check( m_sheetPin->IsBold() ); + m_italic->Check( m_sheetPin->IsItalic() ); + // Currently, eeschema uses only the text width as text size // (only the text width is saved in files), and expects text width = text height m_textSize.SetValue( m_sheetPin->GetTextWidth() ); - m_choiceConnectionType->SetSelection( static_cast( m_sheetPin->GetShape() ) ); + + m_textColorSwatch->SetSwatchColor( m_sheetPin->GetTextColor(), false ); + + switch( m_sheetPin->GetShape() ) + { + case LABEL_FLAG_SHAPE::L_INPUT: m_input->SetValue( true ); break; + case LABEL_FLAG_SHAPE::L_OUTPUT: m_output->SetValue( true ); break; + case LABEL_FLAG_SHAPE::L_BIDI: m_bidirectional->SetValue( true ); break; + case LABEL_FLAG_SHAPE::L_TRISTATE: m_triState->SetValue( true ); break; + case LABEL_FLAG_SHAPE::L_UNSPECIFIED: m_passive->SetValue( true ); break; + default: wxFAIL_MSG( wxT( "Unknown sheet pin shape" ) ); break; + } return true; } @@ -118,12 +139,45 @@ bool DIALOG_SHEET_PIN_PROPERTIES::TransferDataFromWindow() } m_sheetPin->SetText( EscapeString( m_comboName->GetValue(), CTX_NETNAME ) ); + + if( m_fontCtrl->HaveFontSelection() ) + { + m_sheetPin->SetFont( m_fontCtrl->GetFontSelection( m_bold->IsChecked(), + m_italic->IsChecked() ) ); + } + + if( m_bold->IsChecked() != m_sheetPin->IsBold() ) + { + if( m_bold->IsChecked() ) + { + m_sheetPin->SetBold( true ); + m_sheetPin->SetTextThickness( GetPenSizeForBold( m_sheetPin->GetTextWidth() ) ); + } + else + { + m_sheetPin->SetBold( false ); + m_sheetPin->SetTextThickness( 0 ); // Use default pen width + } + } + + m_sheetPin->SetItalic( m_italic->IsChecked() ); + // Currently, eeschema uses only the text width as text size, // and expects text width = text height m_sheetPin->SetTextSize( wxSize( m_textSize.GetValue(), m_textSize.GetValue() ) ); - auto shape = static_cast( m_choiceConnectionType->GetCurrentSelection() ); - m_sheetPin->SetShape( shape ); + m_sheetPin->SetTextColor( m_textColorSwatch->GetSwatchColor() ); + + if( m_input->GetValue() ) + m_sheetPin->SetShape( LABEL_FLAG_SHAPE::L_INPUT ); + else if( m_output->GetValue() ) + m_sheetPin->SetShape( LABEL_FLAG_SHAPE::L_OUTPUT ); + else if( m_bidirectional->GetValue() ) + m_sheetPin->SetShape( LABEL_FLAG_SHAPE::L_BIDI ); + else if( m_triState->GetValue() ) + m_sheetPin->SetShape( LABEL_FLAG_SHAPE::L_TRISTATE ); + else if( m_passive->GetValue() ) + m_sheetPin->SetShape( LABEL_FLAG_SHAPE::L_UNSPECIFIED ); m_frame->UpdateItem( m_sheetPin, false, true ); m_frame->GetCanvas()->Refresh(); @@ -151,11 +205,20 @@ void DIALOG_SHEET_PIN_PROPERTIES::onComboBox( wxCommandEvent& aEvent ) for( SCH_ITEM* item : screen->Items().OfType( SCH_HIER_LABEL_T ) ) { - auto hierLabelItem = static_cast( item ); + SCH_HIERLABEL* hierLabelItem = static_cast( item ); if( m_comboName->GetValue().CmpNoCase( hierLabelItem->GetText() ) == 0 ) { - m_choiceConnectionType->SetSelection( static_cast( hierLabelItem->GetShape() ) ); + switch( hierLabelItem->GetShape() ) + { + case LABEL_FLAG_SHAPE::L_INPUT: m_input->SetValue( true ); break; + case LABEL_FLAG_SHAPE::L_OUTPUT: m_output->SetValue( true ); break; + case LABEL_FLAG_SHAPE::L_BIDI: m_bidirectional->SetValue( true ); break; + case LABEL_FLAG_SHAPE::L_TRISTATE: m_triState->SetValue( true ); break; + case LABEL_FLAG_SHAPE::L_UNSPECIFIED: m_passive->SetValue( true ); break; + default: wxFAIL_MSG( wxT( "Unknown sheet pin shape" ) ); break; + } + break; } } diff --git a/eeschema/dialogs/dialog_sheet_pin_properties_base.cpp b/eeschema/dialogs/dialog_sheet_pin_properties_base.cpp index 39350ca9f2..f4840e1462 100644 --- a/eeschema/dialogs/dialog_sheet_pin_properties_base.cpp +++ b/eeschema/dialogs/dialog_sheet_pin_properties_base.cpp @@ -5,6 +5,10 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/bitmap_button.h" +#include "widgets/color_swatch.h" +#include "widgets/font_choice.h" + #include "dialog_sheet_pin_properties_base.h" /////////////////////////////////////////////////////////////////////////// @@ -43,42 +47,118 @@ DIALOG_SHEET_PIN_PROPERTIES_BASE::DIALOG_SHEET_PIN_PROPERTIES_BASE( wxWindow* pa m_nameSizer->Add( fgSizer2, 0, wxEXPAND, 5 ); - m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - m_nameSizer->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 ); + wxBoxSizer* optionsSizer; + optionsSizer = new wxBoxSizer( wxHORIZONTAL ); - wxFlexGridSizer* fgSizer1; - fgSizer1 = new wxFlexGridSizer( 2, 3, 2, 0 ); - fgSizer1->AddGrowableCol( 1 ); - fgSizer1->SetFlexibleDirection( wxBOTH ); - fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + m_shapeSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Shape") ), wxVERTICAL ); - m_textSizeLabel = new wxStaticText( this, wxID_ANY, _("Text size:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_input = new wxRadioButton( m_shapeSizer->GetStaticBox(), wxID_ANY, _("Input"), wxDefaultPosition, wxDefaultSize, 0 ); + m_shapeSizer->Add( m_input, 0, wxBOTTOM|wxRIGHT, 2 ); + + m_output = new wxRadioButton( m_shapeSizer->GetStaticBox(), wxID_ANY, _("Output"), wxDefaultPosition, wxDefaultSize, 0 ); + m_shapeSizer->Add( m_output, 0, wxBOTTOM|wxRIGHT, 3 ); + + m_bidirectional = new wxRadioButton( m_shapeSizer->GetStaticBox(), wxID_ANY, _("Bidirectional"), wxDefaultPosition, wxDefaultSize, 0 ); + m_shapeSizer->Add( m_bidirectional, 0, wxBOTTOM|wxRIGHT, 3 ); + + m_triState = new wxRadioButton( m_shapeSizer->GetStaticBox(), wxID_ANY, _("Tri-state"), wxDefaultPosition, wxDefaultSize, 0 ); + m_shapeSizer->Add( m_triState, 0, wxBOTTOM|wxRIGHT, 3 ); + + m_passive = new wxRadioButton( m_shapeSizer->GetStaticBox(), wxID_ANY, _("Passive"), wxDefaultPosition, wxDefaultSize, 0 ); + m_shapeSizer->Add( m_passive, 0, wxBOTTOM|wxRIGHT, 3 ); + + + optionsSizer->Add( m_shapeSizer, 0, wxEXPAND|wxTOP|wxRIGHT, 5 ); + + wxStaticBoxSizer* formatting; + formatting = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Formatting") ), wxVERTICAL ); + + wxGridBagSizer* gbSizer1; + gbSizer1 = new wxGridBagSizer( 3, 0 ); + gbSizer1->SetFlexibleDirection( wxBOTH ); + gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_fontLabel = new wxStaticText( formatting->GetStaticBox(), wxID_ANY, _("Font:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_fontLabel->Wrap( -1 ); + gbSizer1->Add( m_fontLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_fontCtrlChoices[] = { _("Default Font"), _("KiCad Font") }; + int m_fontCtrlNChoices = sizeof( m_fontCtrlChoices ) / sizeof( wxString ); + m_fontCtrl = new FONT_CHOICE( formatting->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fontCtrlNChoices, m_fontCtrlChoices, 0 ); + m_fontCtrl->SetSelection( 0 ); + gbSizer1->Add( m_fontCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + + wxBoxSizer* formattingSizer; + formattingSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_separator1 = new BITMAP_BUTTON( formatting->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE ); + m_separator1->Enable( false ); + + formattingSizer->Add( m_separator1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_bold = new BITMAP_BUTTON( formatting->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE ); + m_bold->SetToolTip( _("Bold") ); + + formattingSizer->Add( m_bold, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_italic = new BITMAP_BUTTON( formatting->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE ); + m_italic->SetToolTip( _("Italic") ); + + formattingSizer->Add( m_italic, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_separator2 = new BITMAP_BUTTON( formatting->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE ); + m_separator2->Enable( false ); + + formattingSizer->Add( m_separator2, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + gbSizer1->Add( formattingSizer, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_textSizeLabel = new wxStaticText( formatting->GetStaticBox(), wxID_ANY, _("Text size:"), wxDefaultPosition, wxDefaultSize, 0 ); m_textSizeLabel->Wrap( -1 ); - fgSizer1->Add( m_textSizeLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_textSizeLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_textSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer1->Add( m_textSizeCtrl, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + wxBoxSizer* bSizer71; + bSizer71 = new wxBoxSizer( wxHORIZONTAL ); - m_textSizeUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); + m_textSizeCtrl = new wxTextCtrl( formatting->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); + bSizer71->Add( m_textSizeCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + m_textSizeUnits = new wxStaticText( formatting->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 ); m_textSizeUnits->Wrap( -1 ); - fgSizer1->Add( m_textSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + bSizer71->Add( m_textSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 ); - m_staticText3 = new wxStaticText( this, wxID_ANY, _("Connection type:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText3->Wrap( -1 ); - fgSizer1->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - wxArrayString m_choiceConnectionTypeChoices; - m_choiceConnectionType = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceConnectionTypeChoices, 0 ); - m_choiceConnectionType->SetSelection( 0 ); - m_choiceConnectionType->SetMinSize( wxSize( 160,-1 ) ); - - fgSizer1->Add( m_choiceConnectionType, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_textColorLabel = new wxStaticText( formatting->GetStaticBox(), wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_textColorLabel->Wrap( -1 ); + bSizer71->Add( m_textColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); - fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 ); + bSizer71->Add( 5, 0, 0, 0, 5 ); + + m_panelBorderColor1 = new wxPanel( formatting->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer22; + bSizer22 = new wxBoxSizer( wxVERTICAL ); + + m_textColorSwatch = new COLOR_SWATCH( m_panelBorderColor1, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer22->Add( m_textColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_nameSizer->Add( fgSizer1, 0, wxEXPAND, 6 ); + m_panelBorderColor1->SetSizer( bSizer22 ); + m_panelBorderColor1->Layout(); + bSizer22->Fit( m_panelBorderColor1 ); + bSizer71->Add( m_panelBorderColor1, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + gbSizer1->Add( bSizer71, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); + + + formatting->Add( gbSizer1, 1, wxEXPAND, 5 ); + + + optionsSizer->Add( formatting, 1, wxEXPAND|wxTOP, 5 ); + + + m_nameSizer->Add( optionsSizer, 1, wxEXPAND, 5 ); m_mainSizer->Add( m_nameSizer, 1, wxALL|wxEXPAND, 10 ); diff --git a/eeschema/dialogs/dialog_sheet_pin_properties_base.fbp b/eeschema/dialogs/dialog_sheet_pin_properties_base.fbp index d20f3cd58e..344fc355f9 100644 --- a/eeschema/dialogs/dialog_sheet_pin_properties_base.fbp +++ b/eeschema/dialogs/dialog_sheet_pin_properties_base.fbp @@ -287,398 +287,1209 @@ - 10 - wxEXPAND|wxTOP|wxBOTTOM - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline3 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - ; ; forward_declare - 0 - - - - - - - - 6 + 5 wxEXPAND - 0 - - 3 - wxBOTH - 1 - - 0 + 1 + - fgSizer1 - wxFLEX_GROWMODE_SPECIFIED + optionsSizer + wxHORIZONTAL none - 2 - 2 5 - wxALL|wxALIGN_CENTER_VERTICAL + wxEXPAND|wxTOP|wxRIGHT 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 + wxID_ANY - Text size: - 0 - - 0 - - - 0 + Shape - 1 - m_textSizeLabel - 1 - - + m_shapeSizer + wxVERTICAL + 1 protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 + + 2 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Input + + 0 + + + 0 + + 1 + m_input + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + 3 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Output + + 0 + + + 0 + + 1 + m_output + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + 3 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Bidirectional + + 0 + + + 0 + + 1 + m_bidirectional + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + 3 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Tri-state + + 0 + + + 0 + + 1 + m_triState + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + 3 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Passive + + 0 + + + 0 + + 1 + m_passive + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + 5 - wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textSizeCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NUMERIC - wxDefaultValidator - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - mm - 0 - - 0 - - - 0 - - 1 - m_textSizeUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Connection type: - 0 - - 0 - - - 0 - - 1 - m_staticText3 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - 160,-1 - 1 - m_choiceConnectionType - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxEXPAND + wxEXPAND|wxTOP 1 - - 0 - protected - 0 + + wxID_ANY + Formatting + + formatting + wxVERTICAL + 1 + none + + 5 + wxEXPAND + 1 + + + wxBOTH + + + 0 + + gbSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 3 + + 5 + 1 + 0 + wxRIGHT|wxALIGN_CENTER_VERTICAL + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Font: + 0 + + 0 + + + 0 + + 1 + m_fontLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + 2 + 1 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Default Font" "KiCad Font" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_fontCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + FONT_CHOICE; widgets/font_choice.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + 1 + 3 + wxEXPAND|wxRIGHT|wxLEFT + 0 + 1 + + + formattingSizer + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + + 1 + + + 0 + 0 + wxID_ANY + + + 0 + + 0 + -1,-1 + + 0 + + 1 + m_separator1 + 1 + + + protected + 1 + + + + Resizable + 1 + 21,21 + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + Bold + + 0 + + 0 + -1,-1 + + 0 + + 1 + m_bold + 1 + + + protected + 1 + + + + Resizable + 1 + 21,21 + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + Bold + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + Italic + + 0 + + 0 + -1,-1 + + 0 + + 1 + m_italic + 1 + + + protected + 1 + + + + Resizable + 1 + 21,21 + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + Italic + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + + 1 + + + 0 + 0 + wxID_ANY + + + 0 + + 0 + -1,-1 + + 0 + + 1 + m_separator2 + 1 + + + protected + 1 + + + + Resizable + 1 + 21,21 + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Text size: + 0 + + 0 + + + 0 + + 1 + m_textSizeLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxEXPAND + 1 + 1 + + + bSizer71 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + -1,-1 + 0 + -1,-1 + 1 + m_textSizeCtrl + 1 + + + protected + 1 + + Resizable + 1 + -1,-1 + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 3 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + 0 + + 0 + + + 0 + -1,-1 + 1 + m_textSizeUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 15 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Color: + 0 + + 0 + + + 0 + + 1 + m_textColorLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; Not forward_declare + 0 + + + + + -1 + + + + 5 + + 0 + + 0 + protected + 5 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_panelBorderColor1 + 1 + + + protected + 1 + + Resizable + 1 + + ; ; forward_declare + 0 + + + + wxBORDER_SIMPLE|wxTAB_TRAVERSAL + + + bSizer22 + wxVERTICAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + COLOR_SWATCH + 1 + + + 1 + + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_textColorSwatch + 1 + + + protected + 1 + + Resizable + + 1 + + COLOR_SWATCH; widgets/color_swatch.h; forward_declare + 0 + + + + + + + + + + + + + diff --git a/eeschema/dialogs/dialog_sheet_pin_properties_base.h b/eeschema/dialogs/dialog_sheet_pin_properties_base.h index 7ad4ec8dfe..acbcd3611a 100644 --- a/eeschema/dialogs/dialog_sheet_pin_properties_base.h +++ b/eeschema/dialogs/dialog_sheet_pin_properties_base.h @@ -10,6 +10,10 @@ #include #include #include +class BITMAP_BUTTON; +class COLOR_SWATCH; +class FONT_CHOICE; + #include "dialog_shim.h" #include #include @@ -20,10 +24,18 @@ #include #include #include -#include -#include +#include +#include #include +#include +#include +#include +#include #include +#include +#include +#include +#include #include /////////////////////////////////////////////////////////////////////////// @@ -40,12 +52,24 @@ class DIALOG_SHEET_PIN_PROPERTIES_BASE : public DIALOG_SHIM wxStaticText* m_staticText1; wxComboBox* m_comboName; wxHyperlinkCtrl* m_hyperlink1; - wxStaticLine* m_staticline3; + wxStaticBoxSizer* m_shapeSizer; + wxRadioButton* m_input; + wxRadioButton* m_output; + wxRadioButton* m_bidirectional; + wxRadioButton* m_triState; + wxRadioButton* m_passive; + wxStaticText* m_fontLabel; + FONT_CHOICE* m_fontCtrl; + BITMAP_BUTTON* m_separator1; + BITMAP_BUTTON* m_bold; + BITMAP_BUTTON* m_italic; + BITMAP_BUTTON* m_separator2; wxStaticText* m_textSizeLabel; wxTextCtrl* m_textSizeCtrl; wxStaticText* m_textSizeUnits; - wxStaticText* m_staticText3; - wxChoice* m_choiceConnectionType; + wxStaticText* m_textColorLabel; + wxPanel* m_panelBorderColor1; + COLOR_SWATCH* m_textColorSwatch; wxStaticLine* m_staticline2; wxStdDialogButtonSizer* m_sdbSizer; wxButton* m_sdbSizerOK;