58    bool            multiLine = 
false;
 
   61        multiLine = cfg->m_Appearance.edit_label_multiple;
 
   71        m_activeTextEntry = m_valueCombo;
 
   72        SetInitialFocus( m_valueCombo->GetTextCtrl() );
 
   74        m_labelSingleLine->Show( false );
 
   75        m_valueSingleLine->Show( false );
 
   77        if( multiLine && aNew )
 
   79            m_activeTextEntry = m_valueMultiLine;
 
   80            SetInitialFocus( m_valueMultiLine );
 
   81            m_labelCombo->Show( false );
 
   82            m_valueCombo->Show( false );
 
   86            m_labelMultiLine->Show( false );
 
   87            m_valueMultiLine->Show( false );
 
   88            m_valueCombo->SetValidator( m_netNameValidator );
 
   93        m_activeTextEntry = m_valueSingleLine;
 
   94        SetInitialFocus( m_valueSingleLine );
 
   96        m_labelCombo->Show( false );
 
   97        m_valueCombo->Show( false );
 
   99        if( multiLine && aNew )
 
  101            m_activeTextEntry = m_valueMultiLine;
 
  102            SetInitialFocus( m_valueMultiLine );
 
  103            m_labelSingleLine->Show( false );
 
  104            m_valueSingleLine->Show( false );
 
  108            m_labelMultiLine->Show( false );
 
  109            m_valueMultiLine->Show( false );
 
  110            m_valueSingleLine->SetValidator( m_netNameValidator );
 
  115        SetInitialFocus( m_grid );
 
  116        m_delayedFocusRow = 0;
 
  118        m_labelSingleLine->Show( false );
 
  119        m_valueSingleLine->Show( false );
 
  120        m_labelCombo->Show( false );
 
  121        m_valueCombo->Show( false );
 
  122        m_syntaxHelp->Show( false );
 
  123        m_textEntrySizer->Show( false );
 
  124        m_labelCombo->Show( false );
 
  125        m_valueCombo->Show( false );
 
  126        m_cbMultiLine->Show( false );
 
  128        m_textSizeLabel->SetLabel( _( 
"Pin length:" ) );
 
  132        m_cbMultiLine->Show( 
false );
 
  134    switch( m_currentLabel->Type() )
 
  136    case SCH_GLOBAL_LABEL_T:    SetTitle( _( 
"Global Label Properties" ) );           break;
 
  137    case SCH_HIER_LABEL_T:      SetTitle( _( 
"Hierarchical Label Properties" ) );     break;
 
  138    case SCH_LABEL_T:           SetTitle( _( 
"Label Properties" ) );                  break;
 
  139    case SCH_DIRECTIVE_LABEL_T: SetTitle( _( 
"Directive Label Properties" ) );        break;
 
  140    case SCH_SHEET_PIN_T:       SetTitle( _( 
"Hierarchical Sheet Pin Properties" ) ); break;
 
  141    default:                    UNIMPLEMENTED_FOR( m_currentLabel->GetClass() );      break;
 
  144    m_grid->SetTable( m_fields );
 
  146                                                      [&]( wxCommandEvent& aEvent )
 
  148                                                          OnAddField( aEvent );
 
  150    m_grid->SetSelectionMode( wxGrid::wxGridSelectRows );
 
  155        m_grid->ShowHideColumns( cfg->m_Appearance.edit_label_visible_columns );
 
  156        m_shownColumns = m_grid->GetShownColumns();
 
  165    m_separator1->SetIsSeparator();
 
  167    m_bold->SetIsCheckButton();
 
  169    m_italic->SetIsCheckButton();
 
  172    m_separator2->SetIsSeparator();
 
  174    m_spin0->SetIsRadioButton();
 
  175    m_spin1->SetIsRadioButton();
 
  176    m_spin2->SetIsRadioButton();
 
  177    m_spin3->SetIsRadioButton();
 
  179    m_separator3->SetIsSeparator();
 
  182    m_textColorSwatch->SetSwatchBackground( schematicBackground );
 
  192        m_spin0->SetBitmap( KiBitmapBundle( BITMAPS::label_align_left ) );
 
  193        m_spin1->SetBitmap( KiBitmapBundle( BITMAPS::label_align_right ) );
 
  194        m_spin2->SetBitmap( KiBitmapBundle( BITMAPS::label_align_bottom ) );
 
  195        m_spin3->SetBitmap( KiBitmapBundle( BITMAPS::label_align_top ) );
 
  201        m_bidirectional->Hide();
 
  205        m_fontLabel->SetLabel( _( 
"Orientation:" ) );
 
  207        m_separator1->Hide();
 
  210        m_separator2->Hide();
 
  211        m_spin0->SetBitmap( KiBitmapBundle( BITMAPS::pinorient_down ) );
 
  212        m_spin1->SetBitmap( KiBitmapBundle( BITMAPS::pinorient_up ) );
 
  213        m_spin2->SetBitmap( KiBitmapBundle( BITMAPS::pinorient_right ) );
 
  214        m_spin3->SetBitmap( KiBitmapBundle( BITMAPS::pinorient_left ) );
 
  215        m_separator3->Hide();
 
  217        m_formattingGB->Detach( m_fontCtrl );
 
  218        m_formattingGB->Detach( m_iconBar );
 
  219        m_formattingGB->Add( m_iconBar, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND | wxRIGHT, 5 );
 
  223        m_shapeSizer->Show( false );
 
  225        m_spin0->SetBitmap( KiBitmapBundle( BITMAPS::text_align_left ) );
 
  226        m_spin1->SetBitmap( KiBitmapBundle( BITMAPS::text_align_right ) );
 
  227        m_spin2->SetBitmap( KiBitmapBundle( BITMAPS::text_align_bottom ) );
 
  228        m_spin3->SetBitmap( KiBitmapBundle( BITMAPS::text_align_top ) );
 
  231    if( !m_currentLabel->AutoRotateOnPlacementSupported() )
 
  233        m_autoRotate->Hide();
 
  234        wxSizer* parentSizer = m_autoRotate->GetContainingSizer();
 
  235        parentSizer->Detach( m_autoRotate );
 
  236        parentSizer->Layout();
 
  239    SetupStandardButtons();
 
  243    m_hash_key = 
TO_UTF8( GetTitle() );
 
  251    finishDialogSettings();
 
  255        if( cfg->m_Appearance.edit_label_width > 0 && cfg->m_Appearance.edit_label_height > 0 )
 
  256            SetSize( cfg->m_Appearance.edit_label_width, cfg->m_Appearance.edit_label_height );
 
 
  498    if( !
m_grid->CommitPendingChanges() )
 
  501    if( !wxDialog::TransferDataFromWindow() )
 
  527        text.Replace( wxS( 
"\r" ), wxS( 
"\n" ) );
 
  544        if( field.GetCanonicalName() == wxT( 
"Netclass" ) )
 
  550            if( field.IsVisible() != 
m_Parent->Schematic().Settings().m_IntersheetRefsShow )
 
  552                DisplayInfoMessage( 
this, 
_( 
"Intersheet reference visibility is controlled globally from " 
  553                                             "Schematic Setup > General > Formatting" ) );
 
  567    for( 
int ii = 
m_fields->GetNumberRows() - 1; ii >= 0; ii-- )
 
  571        const wxString& fieldText = field.
GetText();
 
  573        if( fieldName.IsEmpty() && fieldText.IsEmpty() )
 
  578        else if( fieldName == wxT( 
"Netclass" ) && fieldText.IsEmpty() )
 
  581            int netclassFieldCount = 0;
 
  583            for( 
int jj = 0; jj < 
m_fields->GetNumberRows(); ++jj )
 
  585                if( 
m_fields->at( jj ).GetCanonicalName() == wxT( 
"Netclass" ) )
 
  586                    netclassFieldCount++;
 
  589            if( netclassFieldCount > 1 )
 
  592        else if( fieldName.IsEmpty() )
 
  603        if( !field.IsMandatory() )
 
  604            field.SetOrdinal( ordinal++ );
 
  662    if( !commit.
Empty() )
 
  664        commit.
Push( 
_( 
"Edit Label Properties" ) );
 
  670        text.Replace( wxS( 
"\r" ), wxS( 
"\n" ) );
 
  671        wxArrayString lines = wxSplit( 
text, 
'\n' );
 
  673        for( 
const wxString& line : lines )
 
  676            text.Trim( 
false ).Trim( 
true );
 
  690                m_labelList->push_back( std::unique_ptr<SCH_LABEL_BASE>( label ) );
 
  697                m_labelList->push_back( std::unique_ptr<SCH_LABEL_BASE>( label ) );
 
  704                m_labelList->push_back( std::unique_ptr<SCH_LABEL_BASE>( label ) );
 
  715        m_labelList->push_back( std::unique_ptr<SCH_LABEL_BASE>( label ) );
 
 
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
 
virtual const wxString & GetText() const
Return the string associated with the text object.
 
void SetAttributes(const EDA_TEXT &aSrc, bool aSetPosition=true)
Set the text attributes from another instance.
 
void SetItalic(bool aItalic)
Set the text to be italic - this will also update the font if needed.
 
static HTML_MESSAGE_BOX * ShowSyntaxHelp(wxWindow *aParentWindow)