void DIALOG_LAYERS_SETUP::showSelectedLayerCheckBoxes( LAYER_MSK enabledLayers ) { for( LAYER_NUM layer=FIRST_LAYER; layer<NB_PCB_LAYERS; ++layer ) { setLayerCheckBox( layer, GetLayerMask( layer ) & enabledLayers ); } }
void DIALOG_LAYERS_SETUP::setCopperLayerCheckBoxes( int copperCount ) { if( copperCount > 0 ) { setLayerCheckBox( LAYER_N_BACK, true ); --copperCount; } if( copperCount > 0 ) { setLayerCheckBox( LAYER_N_FRONT, true ); --copperCount; } else { setLayerCheckBox( LAYER_N_FRONT, false ); } for( LAYER_NUM layer=LAYER_N_2; layer < NB_COPPER_LAYERS-1; ++layer, --copperCount ) { bool state = copperCount > 0; #ifdef HIDE_INACTIVE_LAYERS // This code hides non-active copper layers, or redisplays hidden // layers which are now needed. CTLs ctl = getCTLs( layer ); ctl.name->Show( state ); ctl.checkbox->Show( state ); ctl.choice->Show( state ); if( ctl.panel ) ctl.panel->Show( state ); #endif setLayerCheckBox( layer, state ); } #ifdef HIDE_INACTIVE_LAYERS // Send an size event to force sizers to be updated, // because the number of copper layers can have changed. wxSizeEvent evt_size(m_LayersListPanel->GetSize() ); m_LayersListPanel->GetEventHandler()->ProcessEvent( evt_size ); #endif }
void DIALOG_LAYERS_SETUP::showSelectedLayerCheckBoxes( LSET enabledLayers ) { // the check boxes for( LSEQ seq = dlg_layers(); seq; ++seq ) { LAYER_ID layer = *seq; setLayerCheckBox( layer, enabledLayers[layer] ); } }
void DIALOG_LAYERS_SETUP::setCopperLayerCheckBoxes( int copperCount ) { if( copperCount > 0 ) { setLayerCheckBox( F_Cu, true ); --copperCount; } if( copperCount > 0 ) { setLayerCheckBox( B_Cu, true ); --copperCount; } for( LSEQ seq = LSET::InternalCuMask().Seq(); seq; ++seq, --copperCount ) { LAYER_ID layer = *seq; bool state = copperCount > 0; #ifdef HIDE_INACTIVE_LAYERS // This code hides non-active copper layers, or redisplays hidden // layers which are now needed. CTLs ctl = getCTLs( layer ); ctl.name->Show( state ); ctl.checkbox->Show( state ); ctl.choice->Show( state ); if( ctl.panel ) ctl.panel->Show( state ); #endif setLayerCheckBox( layer, state ); } #ifdef HIDE_INACTIVE_LAYERS // Send an size event to force sizers to be updated, // because the number of copper layers can have changed. wxSizeEvent evt_size( m_LayersListPanel->GetSize() ); m_LayersListPanel->GetEventHandler()->ProcessEvent( evt_size ); #endif }