Isaac's next color/layer work step
This commit is contained in:
parent
12fa5f020c
commit
b4fe26a31f
|
@ -316,12 +316,14 @@ void Pcb3D_GLCanvas::Draw3D_Track( TRACK* track )
|
||||||
{
|
{
|
||||||
double zpos;
|
double zpos;
|
||||||
int layer = track->GetLayer();
|
int layer = track->GetLayer();
|
||||||
int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
|
||||||
double ox, oy, fx, fy;
|
double ox, oy, fx, fy;
|
||||||
double w;
|
double w;
|
||||||
|
|
||||||
if( color & ITEM_NOT_SHOW )
|
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
||||||
|
|
||||||
if( layer == LAST_COPPER_LAYER )
|
if( layer == LAST_COPPER_LAYER )
|
||||||
layer = g_Parm_3D_Visu.m_Layers - 1;
|
layer = g_Parm_3D_Visu.m_Layers - 1;
|
||||||
zpos = g_Parm_3D_Visu.m_LayerZcoord[layer];
|
zpos = g_Parm_3D_Visu.m_LayerZcoord[layer];
|
||||||
|
@ -363,11 +365,17 @@ void Pcb3D_GLCanvas::Draw3D_Via( SEGVIA* via )
|
||||||
{
|
{
|
||||||
zpos = g_Parm_3D_Visu.m_LayerZcoord[layer];
|
zpos = g_Parm_3D_Visu.m_LayerZcoord[layer];
|
||||||
if( layer < g_Parm_3D_Visu.m_Layers - 1 )
|
if( layer < g_Parm_3D_Visu.m_Layers - 1 )
|
||||||
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
{
|
||||||
else
|
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false )
|
||||||
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[CMP_N];
|
|
||||||
if( color & ITEM_NOT_SHOW )
|
|
||||||
continue;
|
continue;
|
||||||
|
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( CMP_N ) == false )
|
||||||
|
continue;
|
||||||
|
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[CMP_N];
|
||||||
|
}
|
||||||
|
|
||||||
SetGLColor( color );
|
SetGLColor( color );
|
||||||
|
|
||||||
|
@ -394,14 +402,16 @@ void Pcb3D_GLCanvas::Draw3D_Via( SEGVIA* via )
|
||||||
void Pcb3D_GLCanvas::Draw3D_DrawSegment( DRAWSEGMENT* segment )
|
void Pcb3D_GLCanvas::Draw3D_DrawSegment( DRAWSEGMENT* segment )
|
||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
{
|
{
|
||||||
int layer;
|
|
||||||
double x, y, xf, yf;
|
double x, y, xf, yf;
|
||||||
double zpos, w;
|
double zpos, w;
|
||||||
int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[segment->GetLayer()];
|
|
||||||
|
|
||||||
if( color & ITEM_NOT_SHOW )
|
int layer = segment->GetLayer();
|
||||||
|
|
||||||
|
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
||||||
|
|
||||||
SetGLColor( color );
|
SetGLColor( color );
|
||||||
w = segment->m_Width * g_Parm_3D_Visu.m_BoardScale;
|
w = segment->m_Width * g_Parm_3D_Visu.m_BoardScale;
|
||||||
x = segment->m_Start.x * g_Parm_3D_Visu.m_BoardScale;
|
x = segment->m_Start.x * g_Parm_3D_Visu.m_BoardScale;
|
||||||
|
@ -409,7 +419,7 @@ void Pcb3D_GLCanvas::Draw3D_DrawSegment( DRAWSEGMENT* segment )
|
||||||
xf = segment->m_End.x * g_Parm_3D_Visu.m_BoardScale;
|
xf = segment->m_End.x * g_Parm_3D_Visu.m_BoardScale;
|
||||||
yf = segment->m_End.y * g_Parm_3D_Visu.m_BoardScale;
|
yf = segment->m_End.y * g_Parm_3D_Visu.m_BoardScale;
|
||||||
|
|
||||||
if( segment->GetLayer() == EDGE_N )
|
if( layer == EDGE_N )
|
||||||
{
|
{
|
||||||
for( layer = 0; layer < g_Parm_3D_Visu.m_Layers; layer++ )
|
for( layer = 0; layer < g_Parm_3D_Visu.m_Layers; layer++ )
|
||||||
{
|
{
|
||||||
|
@ -434,7 +444,6 @@ void Pcb3D_GLCanvas::Draw3D_DrawSegment( DRAWSEGMENT* segment )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
layer = segment->GetLayer();
|
|
||||||
glNormal3f( 0.0, 0.0, Get3DLayerSide( layer ) );
|
glNormal3f( 0.0, 0.0, Get3DLayerSide( layer ) );
|
||||||
zpos = g_Parm_3D_Visu.m_LayerZcoord[layer];
|
zpos = g_Parm_3D_Visu.m_LayerZcoord[layer];
|
||||||
if( Get3DLayerEnable( layer ) )
|
if( Get3DLayerEnable( layer ) )
|
||||||
|
@ -623,10 +632,12 @@ void EDGE_MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas )
|
||||||
wxString s;
|
wxString s;
|
||||||
int dx, dy;
|
int dx, dy;
|
||||||
double scale, x, y, fx, fy, w, zpos;
|
double scale, x, y, fx, fy, w, zpos;
|
||||||
|
|
||||||
|
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( m_Layer ) == false )
|
||||||
|
return;
|
||||||
|
|
||||||
int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[m_Layer];
|
int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[m_Layer];
|
||||||
|
|
||||||
if( color & ITEM_NOT_SHOW )
|
|
||||||
return;
|
|
||||||
|
|
||||||
SetGLColor( color );
|
SetGLColor( color );
|
||||||
glNormal3f( 0.0, 0.0, (m_Layer == COPPER_LAYER_N) ? -1.0 : 1.0 );
|
glNormal3f( 0.0, 0.0, (m_Layer == COPPER_LAYER_N) ? -1.0 : 1.0 );
|
||||||
|
@ -737,7 +748,7 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
|
||||||
if( (layer > FIRST_COPPER_LAYER) && (layer < LAST_COPPER_LAYER) && !Both )
|
if( (layer > FIRST_COPPER_LAYER) && (layer < LAST_COPPER_LAYER) && !Both )
|
||||||
continue;
|
continue;
|
||||||
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
||||||
if( color & ITEM_NOT_SHOW )
|
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SetGLColor( color );
|
SetGLColor( color );
|
||||||
|
@ -787,7 +798,7 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
|
||||||
continue;
|
continue;
|
||||||
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
||||||
glNormal3f( 0.0, 0.0, (layer == COPPER_LAYER_N) ? -1.0 : 1.0 );
|
glNormal3f( 0.0, 0.0, (layer == COPPER_LAYER_N) ? -1.0 : 1.0 );
|
||||||
if( color & ITEM_NOT_SHOW )
|
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SetGLColor( color );
|
SetGLColor( color );
|
||||||
|
@ -862,7 +873,7 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
|
||||||
continue;
|
continue;
|
||||||
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer];
|
||||||
glNormal3f( 0.0, 0.0, (layer == COPPER_LAYER_N) ? -1.0 : 1.0 );
|
glNormal3f( 0.0, 0.0, (layer == COPPER_LAYER_N) ? -1.0 : 1.0 );
|
||||||
if( color & ITEM_NOT_SHOW )
|
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SetGLColor( color );
|
SetGLColor( color );
|
||||||
|
|
|
@ -338,7 +338,8 @@ static PARAM_CFG_SETCOLOR ColorpcbGrilleCfg
|
||||||
(
|
(
|
||||||
INSETUP,
|
INSETUP,
|
||||||
wxT("CoPcbGr"), /* identification */
|
wxT("CoPcbGr"), /* identification */
|
||||||
&g_DesignSettings.m_PcbGridColor, /* Adresse du parametre */
|
//@@IMB: Wrong object &g_DesignSettings.m_PcbGridColor, /* Adresse du parametre */
|
||||||
|
&g_GridColor, //@@IMB: This is the real variable.
|
||||||
DARKGRAY /* Valeur par defaut */
|
DARKGRAY /* Valeur par defaut */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -213,10 +213,10 @@ void WinEDA_SetColorsFrame::CreateControls()
|
||||||
|
|
||||||
if( laytool_list[lyr]->m_NoDisplayIsColor )
|
if( laytool_list[lyr]->m_NoDisplayIsColor )
|
||||||
{
|
{
|
||||||
if( *laytool_list[lyr]->m_Color & ITEM_NOT_SHOW )
|
if( g_DesignSettings.IsLayerVisible( lyr ))
|
||||||
CheckBox->SetValue( FALSE );
|
|
||||||
else
|
|
||||||
CheckBox->SetValue( TRUE );
|
CheckBox->SetValue( TRUE );
|
||||||
|
else
|
||||||
|
CheckBox->SetValue( FALSE );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
CheckBox->SetValue( *laytool_list[lyr]->m_NoDisplay );
|
CheckBox->SetValue( *laytool_list[lyr]->m_NoDisplay );
|
||||||
|
@ -427,24 +427,23 @@ void WinEDA_SetColorsFrame::SetColor(wxCommandEvent& event)
|
||||||
void WinEDA_SetColorsFrame::UpdateLayerSettings()
|
void WinEDA_SetColorsFrame::UpdateLayerSettings()
|
||||||
/******************************************************************/
|
/******************************************************************/
|
||||||
{
|
{
|
||||||
for( int lyr = 0; lyr < NB_BUTT; lyr++ )
|
for( int lyr = 0; lyr < NB_BUTT - 2; lyr++ )
|
||||||
{
|
{
|
||||||
if( laytool_list[lyr]->m_NoDisplayIsColor )
|
g_DesignSettings.SetLayerVisibility( lyr, laytool_list[lyr]->m_CheckBox->GetValue() );
|
||||||
{
|
*laytool_list[lyr]->m_Color = CurrentColor[lyr];
|
||||||
if( laytool_list[lyr]->m_CheckBox->GetValue() )
|
|
||||||
*laytool_list[lyr]->m_Color = CurrentColor[lyr] & ~ITEM_NOT_SHOW;
|
|
||||||
else
|
|
||||||
*laytool_list[lyr]->m_Color = CurrentColor[lyr] | ITEM_NOT_SHOW;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// (As a bitmap button and a checkbox have been provided for *every*
|
// (As a bitmap button and a checkbox have been provided for *every*
|
||||||
// layer, it is not necessary to check whether each of those items
|
// layer, it is not necessary to check whether each of those items
|
||||||
// actually has been provided for each of those layers.)
|
// actually has been provided for each of those layers.)
|
||||||
*laytool_list[lyr]->m_Color = CurrentColor[lyr];
|
|
||||||
*laytool_list[lyr]->m_NoDisplay = laytool_list[lyr]->m_CheckBox->GetValue();
|
|
||||||
}
|
g_GridColor = CurrentColor[32];
|
||||||
}
|
s_showGrid = laytool_list[32]->m_CheckBox->GetValue();
|
||||||
|
|
||||||
|
g_DCodesColor = CurrentColor[33];
|
||||||
|
DisplayOpt.DisplayPadNum = laytool_list[33]->m_CheckBox->GetValue();
|
||||||
|
|
||||||
// Additional command required for updating visibility of grid.
|
// Additional command required for updating visibility of grid.
|
||||||
m_Parent->m_Draw_Grid = s_showGrid;
|
m_Parent->m_Draw_Grid = s_showGrid;
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,112 +85,112 @@ static ColorButton Layer_1_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 1"), // Title
|
_("Layer 1"), // Title
|
||||||
ADR(0), // Address of optional parameter
|
ADR(0), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_2_Butt=
|
static ColorButton Layer_2_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 2"), // Title
|
_("Layer 2"), // Title
|
||||||
ADR(1), // Address of optional parameter
|
ADR(1), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_3_Butt=
|
static ColorButton Layer_3_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 3"), // Title
|
_("Layer 3"), // Title
|
||||||
ADR(2), // Address of optional parameter
|
ADR(2), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_4_Butt=
|
static ColorButton Layer_4_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 4"), // Title
|
_("Layer 4"), // Title
|
||||||
ADR(3), // Address of optional parameter
|
ADR(3), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_5_Butt=
|
static ColorButton Layer_5_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 5"), // Title
|
_("Layer 5"), // Title
|
||||||
ADR(4), // Address of optional parameter
|
ADR(4), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_6_Butt=
|
static ColorButton Layer_6_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 6"), // Title
|
_("Layer 6"), // Title
|
||||||
ADR(5), // Address of optional parameter
|
ADR(5), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_7_Butt=
|
static ColorButton Layer_7_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 7"), // Title
|
_("Layer 7"), // Title
|
||||||
ADR(6), // Address of optional parameter
|
ADR(6), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_8_Butt=
|
static ColorButton Layer_8_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 8"), // Title
|
_("Layer 8"), // Title
|
||||||
ADR(7), // Address of optional parameter
|
ADR(7), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_9_Butt=
|
static ColorButton Layer_9_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 9"), // Title
|
_("Layer 9"), // Title
|
||||||
ADR(8), // Address of optional parameter
|
ADR(8), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_10_Butt=
|
static ColorButton Layer_10_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 10"), // Title
|
_("Layer 10"), // Title
|
||||||
ADR(9), // Address of optional parameter
|
ADR(9), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_11_Butt=
|
static ColorButton Layer_11_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 11"), // Title
|
_("Layer 11"), // Title
|
||||||
ADR(10), // Address of optional parameter
|
ADR(10), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_12_Butt=
|
static ColorButton Layer_12_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 12"), // Title
|
_("Layer 12"), // Title
|
||||||
ADR(11), // Address of optional parameter
|
ADR(11), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_13_Butt=
|
static ColorButton Layer_13_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 13"), // Title
|
_("Layer 13"), // Title
|
||||||
ADR(12), // Address of optional parameter
|
ADR(12), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_14_Butt=
|
static ColorButton Layer_14_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 14"), // Title
|
_("Layer 14"), // Title
|
||||||
ADR(13), // Address of optional parameter
|
ADR(13), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_15_Butt=
|
static ColorButton Layer_15_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 15"), // Title
|
_("Layer 15"), // Title
|
||||||
ADR(14), // Address of optional parameter
|
ADR(14), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_16_Butt=
|
static ColorButton Layer_16_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 16"), // Title
|
_("Layer 16"), // Title
|
||||||
ADR(15), // Address of optional parameter
|
ADR(15), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -204,112 +204,112 @@ static ColorButton Layer_17_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 17"), // Title
|
_("Layer 17"), // Title
|
||||||
ADR(16), // Address of optional parameter
|
ADR(16), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_18_Butt=
|
static ColorButton Layer_18_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 18"), // Title
|
_("Layer 18"), // Title
|
||||||
ADR(17), // Address of optional parameter
|
ADR(17), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_19_Butt=
|
static ColorButton Layer_19_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 19"), // Title
|
_("Layer 19"), // Title
|
||||||
ADR(18), // Address of optional parameter
|
ADR(18), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_20_Butt=
|
static ColorButton Layer_20_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 20"), // Title
|
_("Layer 20"), // Title
|
||||||
ADR(19), // Address of optional parameter
|
ADR(19), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_21_Butt=
|
static ColorButton Layer_21_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 21"), // Title
|
_("Layer 21"), // Title
|
||||||
ADR(20), // Address of optional parameter
|
ADR(20), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_22_Butt=
|
static ColorButton Layer_22_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 22"), // Title
|
_("Layer 22"), // Title
|
||||||
ADR(21), // Address of optional parameter
|
ADR(21), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_23_Butt=
|
static ColorButton Layer_23_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 23"), // Title
|
_("Layer 23"), // Title
|
||||||
ADR(22), // Address of optional parameter
|
ADR(22), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_24_Butt=
|
static ColorButton Layer_24_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 24"), // Title
|
_("Layer 24"), // Title
|
||||||
ADR(23), // Address of optional parameter
|
ADR(23), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_25_Butt=
|
static ColorButton Layer_25_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 25"), // Title
|
_("Layer 25"), // Title
|
||||||
ADR(24), // Address of optional parameter
|
ADR(24), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_26_Butt=
|
static ColorButton Layer_26_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 26"), // Title
|
_("Layer 26"), // Title
|
||||||
ADR(25), // Address of optional parameter
|
ADR(25), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_27_Butt=
|
static ColorButton Layer_27_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 27"), // Title
|
_("Layer 27"), // Title
|
||||||
ADR(26), // Address of optional parameter
|
ADR(26), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_28_Butt=
|
static ColorButton Layer_28_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 28"), // Title
|
_("Layer 28"), // Title
|
||||||
ADR(27), // Address of optional parameter
|
ADR(27), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_29_Butt=
|
static ColorButton Layer_29_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 29"), // Title
|
_("Layer 29"), // Title
|
||||||
ADR(28), // Address of optional parameter
|
ADR(28), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_30_Butt=
|
static ColorButton Layer_30_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 30"), // Title
|
_("Layer 30"), // Title
|
||||||
ADR(29), // Address of optional parameter
|
ADR(29), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_31_Butt=
|
static ColorButton Layer_31_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 31"), // Title
|
_("Layer 31"), // Title
|
||||||
ADR(30), // Address of optional parameter
|
ADR(30), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_32_Butt=
|
static ColorButton Layer_32_Butt=
|
||||||
{
|
{
|
||||||
_("Layer 32"), // Title
|
_("Layer 32"), // Title
|
||||||
ADR(31), // Address of optional parameter
|
ADR(31), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
TRUE // Toggle ITEM*NOT*SHOW bit of the color variable
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -78,10 +78,11 @@ void Trace_Segment( WinEDA_DrawPanel* panel, wxDC* DC, TRACK* track, int draw_mo
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
color = g_DesignSettings.m_LayerColor[track->GetLayer()];
|
if( g_DesignSettings.IsLayerVisible( track->GetLayer() ) == false )
|
||||||
if( color & ITEM_NOT_SHOW )
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
color = g_DesignSettings.m_LayerColor[track->GetLayer()];
|
||||||
|
|
||||||
if( draw_mode & GR_SURBRILL )
|
if( draw_mode & GR_SURBRILL )
|
||||||
{
|
{
|
||||||
if( draw_mode & GR_AND )
|
if( draw_mode & GR_AND )
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#define MASKCOLOR 31 ///< mask for color index into ColorRefs[]
|
#define MASKCOLOR 31 ///< mask for color index into ColorRefs[]
|
||||||
|
|
||||||
/// bit indicateur d'affichage (vu / non vu) des items : (defini dans les valeurs des couleurs
|
/// bit indicateur d'affichage (vu / non vu) des items : (defini dans les valeurs des couleurs
|
||||||
#define ITEM_NOT_SHOW (1<<18) // 0x40000
|
//IMB: Not used anymore #define ITEM_NOT_SHOW (1<<18) // 0x40000
|
||||||
|
|
||||||
/// Definition du bit de surbrillance
|
/// Definition du bit de surbrillance
|
||||||
#define HIGHT_LIGHT_FLAG (1<<19) // 0x80000
|
#define HIGHT_LIGHT_FLAG (1<<19) // 0x80000
|
||||||
|
|
|
@ -134,6 +134,23 @@ class RATSNEST_ITEM;
|
||||||
/* Class to handle a board */
|
/* Class to handle a board */
|
||||||
#include "class_board.h"
|
#include "class_board.h"
|
||||||
|
|
||||||
|
enum ELEMENTS_NUMBERS
|
||||||
|
{
|
||||||
|
VIAS_VISIBLE = 0,
|
||||||
|
VIA_NOT_DEFINED_VISIBLE = VIAS_VISIBLE,
|
||||||
|
VIA_MICROVIA_VISIBLE,
|
||||||
|
VIA_BLIND_BURIED_VISIBLE,
|
||||||
|
VIA_THROUGH_VISIBLE,
|
||||||
|
MODULE_TEXT_CMP_VISIBLE,
|
||||||
|
MODULE_TEXT_CU_VISIBLE,
|
||||||
|
MODULE_TEXT_NOV_VISIBLE,
|
||||||
|
ANCHOR_VISIBLE,
|
||||||
|
PAD_CU_VISIBLE,
|
||||||
|
PAD_CMP_VISIBLE
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Class for handle current printed board design settings
|
// Class for handle current printed board design settings
|
||||||
class EDA_BoardDesignSettings
|
class EDA_BoardDesignSettings
|
||||||
{
|
{
|
||||||
|
@ -160,22 +177,29 @@ public:
|
||||||
int m_LayerThickness; // Layer Thickness for 3D viewer
|
int m_LayerThickness; // Layer Thickness for 3D viewer
|
||||||
|
|
||||||
// Color options for screen display of the Printed Board:
|
// Color options for screen display of the Printed Board:
|
||||||
int m_PcbGridColor; // Grid color
|
//@@IMB: Not used int m_PcbGridColor; // Grid color
|
||||||
|
|
||||||
|
int m_EnabledLayers; // IMB: Paving the road
|
||||||
|
int m_VisibleLayers; // IMB: Bit-mask for layer visibility
|
||||||
|
int m_VisibleElements; // IMB: Bit-mask for elements visibility
|
||||||
|
|
||||||
int m_LayerColor[32]; // Layer colors (tracks and graphic items)
|
int m_LayerColor[32]; // Layer colors (tracks and graphic items)
|
||||||
|
|
||||||
int m_ViaColor[4]; // Via color (depending on is type)
|
int m_ViaColor[4]; // Via color (depending on is type)
|
||||||
int m_ModuleTextCMPColor; // Text module color for modules on the COMPONENT layer
|
|
||||||
int m_ModuleTextCUColor; // Text module color for modules on the COPPER layer
|
|
||||||
int m_ModuleTextNOVColor; // Text module color for "invisible" texts (must be BLACK if really not displayed)
|
|
||||||
int m_AnchorColor; // Anchor color for modules and texts
|
|
||||||
|
|
||||||
int m_PadCUColor; // Pad color for the COPPER side of the pad
|
//@@IMB: Not used int m_ModuleTextCMPColor; // Text module color for modules on the COMPONENT layer
|
||||||
int m_PadCMPColor; // Pad color for the COMPONENT side of the pad
|
//@@IMB: Not used int m_ModuleTextCUColor; // Text module color for modules on the COPPER layer
|
||||||
|
//@@IMB: Not used int m_ModuleTextNOVColor; // Text module color for "invisible" texts (must be BLACK if really not displayed)
|
||||||
|
//@@IMB: Not used int m_AnchorColor; // Anchor color for modules and texts
|
||||||
|
|
||||||
|
//@@IMB: Not used int m_PadCUColor; // Pad color for the COPPER side of the pad
|
||||||
|
//@@IMB: Not used int m_PadCMPColor; // Pad color for the COMPONENT side of the pad
|
||||||
|
|
||||||
// Pad color for the pads of both sides is m_PadCUColor OR m_PadCMPColor (in terms of colors)
|
// Pad color for the pads of both sides is m_PadCUColor OR m_PadCMPColor (in terms of colors)
|
||||||
|
|
||||||
int m_RatsnestColor; // Ratsnest color
|
int m_RatsnestColor; // Ratsnest color
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
EDA_BoardDesignSettings();
|
EDA_BoardDesignSettings();
|
||||||
|
|
||||||
|
@ -185,6 +209,36 @@ public:
|
||||||
* @return int - the visible layers in bit-mapped form.
|
* @return int - the visible layers in bit-mapped form.
|
||||||
*/
|
*/
|
||||||
int GetVisibleLayers() const;
|
int GetVisibleLayers() const;
|
||||||
|
|
||||||
|
void SetVisibleLayers( int Mask );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function IsLayerVisible
|
||||||
|
* @param LayerNumber The number of the layer to be tested.
|
||||||
|
* @return bool - true if the layer is visible.
|
||||||
|
*/
|
||||||
|
inline bool IsLayerVisible( int LayerNumber ) const
|
||||||
|
{
|
||||||
|
if( LayerNumber < 0 || LayerNumber >= 32 ) //@@IMB: Altough Pcbnew uses only 29, Gerbview uses all 32 layers
|
||||||
|
return false;
|
||||||
|
return (bool)( m_VisibleLayers & 1 << LayerNumber );
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetLayerVisibility( int LayerNumber, bool State );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function IsElementVisible
|
||||||
|
* @param ElementNumber The number of the element to be tested.
|
||||||
|
* @return bool - true if the elememt is visible.
|
||||||
|
*/
|
||||||
|
inline bool IsElementVisible( int ElementNumber ) const
|
||||||
|
{
|
||||||
|
if( ElementNumber < 0 || ElementNumber > PAD_CMP_VISIBLE )
|
||||||
|
return false;
|
||||||
|
return (bool)( m_VisibleElements & 1 << ElementNumber );
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetElementVisibility( int ElementNumber, bool State );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -290,9 +290,9 @@ GENERAL_COLLECTORS_GUIDE WinEDA_BasePcbFrame::GetCollectorsGuide()
|
||||||
((PCB_SCREEN*)GetScreen())->m_Active_Layer );
|
((PCB_SCREEN*)GetScreen())->m_Active_Layer );
|
||||||
|
|
||||||
// account for the globals
|
// account for the globals
|
||||||
guide.SetIgnoreMTextsMarkedNoShow( g_ModuleTextNOVColor & ITEM_NOT_SHOW );
|
guide.SetIgnoreMTextsMarkedNoShow( ! g_DesignSettings.IsElementVisible( MODULE_TEXT_NOV_VISIBLE ));
|
||||||
guide.SetIgnoreMTextsOnCopper( g_ModuleTextCUColor & ITEM_NOT_SHOW );
|
guide.SetIgnoreMTextsOnCopper( ! g_DesignSettings.IsElementVisible( MODULE_TEXT_CU_VISIBLE ));
|
||||||
guide.SetIgnoreMTextsOnCmp( g_ModuleTextCMPColor & ITEM_NOT_SHOW );
|
guide.SetIgnoreMTextsOnCmp( ! g_DesignSettings.IsElementVisible( MODULE_TEXT_CMP_VISIBLE ));
|
||||||
guide.SetIgnoreModulesOnCu( !DisplayOpt.Show_Modules_Cu );
|
guide.SetIgnoreModulesOnCu( !DisplayOpt.Show_Modules_Cu );
|
||||||
guide.SetIgnoreModulesOnCmp( !DisplayOpt.Show_Modules_Cmp );
|
guide.SetIgnoreModulesOnCmp( !DisplayOpt.Show_Modules_Cmp );
|
||||||
|
|
||||||
|
|
|
@ -406,10 +406,11 @@ void COTATION::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
||||||
|
|
||||||
m_Text->Draw( panel, DC, mode_color, offset );
|
m_Text->Draw( panel, DC, mode_color, offset );
|
||||||
|
|
||||||
gcolor = g_DesignSettings.m_LayerColor[m_Layer];
|
if( g_DesignSettings.IsLayerVisible( m_Layer ) == false )
|
||||||
if( (gcolor & ITEM_NOT_SHOW) != 0 )
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
gcolor = g_DesignSettings.m_LayerColor[m_Layer];
|
||||||
|
|
||||||
GRSetDrawMode( DC, mode_color );
|
GRSetDrawMode( DC, mode_color );
|
||||||
typeaff = DisplayOpt.DisplayDrawItems;
|
typeaff = DisplayOpt.DisplayDrawItems;
|
||||||
width = m_Width;
|
width = m_Width;
|
||||||
|
|
|
@ -234,10 +234,11 @@ void DRAWSEGMENT::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
||||||
int color, mode;
|
int color, mode;
|
||||||
int rayon;
|
int rayon;
|
||||||
|
|
||||||
color = g_DesignSettings.m_LayerColor[GetLayer()];
|
if( g_DesignSettings.IsLayerVisible( GetLayer() ) == false )
|
||||||
if( color & ITEM_NOT_SHOW )
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
color = g_DesignSettings.m_LayerColor[GetLayer()];
|
||||||
|
|
||||||
GRSetDrawMode( DC, draw_mode );
|
GRSetDrawMode( DC, draw_mode );
|
||||||
l_piste = m_Width >> 1; /* l_piste = demi largeur piste */
|
l_piste = m_Width >> 1; /* l_piste = demi largeur piste */
|
||||||
|
|
||||||
|
|
|
@ -102,10 +102,11 @@ void EDGE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
||||||
if( m_Parent && (m_Parent->Type() == TYPE_MODULE) )
|
if( m_Parent && (m_Parent->Type() == TYPE_MODULE) )
|
||||||
Module = (MODULE*) m_Parent;
|
Module = (MODULE*) m_Parent;
|
||||||
|
|
||||||
color = g_DesignSettings.m_LayerColor[m_Layer];
|
if( g_DesignSettings.IsLayerVisible( m_Layer ) == false )
|
||||||
if( (color & ITEM_NOT_SHOW) != 0 )
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
color = g_DesignSettings.m_LayerColor[m_Layer];
|
||||||
|
|
||||||
frame = (WinEDA_BasePcbFrame*) panel->m_Parent;
|
frame = (WinEDA_BasePcbFrame*) panel->m_Parent;
|
||||||
|
|
||||||
screen = frame->GetScreen();
|
screen = frame->GetScreen();
|
||||||
|
|
|
@ -114,10 +114,11 @@ void MIREPCB::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
||||||
ox = m_Pos.x + offset.x;
|
ox = m_Pos.x + offset.x;
|
||||||
oy = m_Pos.y + offset.y;
|
oy = m_Pos.y + offset.y;
|
||||||
|
|
||||||
gcolor = g_DesignSettings.m_LayerColor[m_Layer];
|
if( g_DesignSettings.IsLayerVisible( m_Layer ) == false )
|
||||||
if( (gcolor & ITEM_NOT_SHOW) != 0 )
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
gcolor = g_DesignSettings.m_LayerColor[m_Layer];
|
||||||
|
|
||||||
GRSetDrawMode( DC, mode_color );
|
GRSetDrawMode( DC, mode_color );
|
||||||
typeaff = DisplayOpt.DisplayDrawItems;
|
typeaff = DisplayOpt.DisplayDrawItems;
|
||||||
width = m_Width;
|
width = m_Width;
|
||||||
|
|
|
@ -67,7 +67,7 @@ void MODULE::DrawAncre( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset
|
||||||
|
|
||||||
GRSetDrawMode( DC, draw_mode );
|
GRSetDrawMode( DC, draw_mode );
|
||||||
|
|
||||||
if( (g_AnchorColor & ITEM_NOT_SHOW) == 0 )
|
if( g_DesignSettings.IsElementVisible( ANCHOR_VISIBLE ))
|
||||||
{
|
{
|
||||||
GRLine( &panel->m_ClipBox, DC,
|
GRLine( &panel->m_ClipBox, DC,
|
||||||
m_Pos.x - offset.x - anchor_size, m_Pos.y - offset.y,
|
m_Pos.x - offset.x - anchor_size, m_Pos.y - offset.y,
|
||||||
|
|
|
@ -196,11 +196,11 @@ void TEXTE_PCB::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
||||||
* and the actual size is very important, especially for copper texts
|
* and the actual size is very important, especially for copper texts
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int color = g_DesignSettings.m_LayerColor[m_Layer];
|
if( g_DesignSettings.IsLayerVisible( m_Layer ) == false )
|
||||||
|
|
||||||
if( color & ITEM_NOT_SHOW )
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
int color = g_DesignSettings.m_LayerColor[m_Layer];
|
||||||
|
|
||||||
GRTraceMode fillmode = FILLED;
|
GRTraceMode fillmode = FILLED;
|
||||||
if ( DisplayOpt.DisplayDrawItems == SKETCH)
|
if ( DisplayOpt.DisplayDrawItems == SKETCH)
|
||||||
fillmode = SKETCH;
|
fillmode = SKETCH;
|
||||||
|
@ -210,7 +210,8 @@ void TEXTE_PCB::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
||||||
offset,
|
offset,
|
||||||
(EDA_Colors) color,
|
(EDA_Colors) color,
|
||||||
DrawMode, fillmode,
|
DrawMode, fillmode,
|
||||||
(g_AnchorColor & ITEM_NOT_SHOW) ? UNSPECIFIED_COLOR : (EDA_Colors) g_AnchorColor );
|
g_DesignSettings.IsElementVisible( ANCHOR_VISIBLE ) ?
|
||||||
|
(EDA_Colors) g_AnchorColor : UNSPECIFIED_COLOR );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -381,7 +381,7 @@ void TEXTE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const
|
||||||
GRSetDrawMode( DC, draw_mode );
|
GRSetDrawMode( DC, draw_mode );
|
||||||
|
|
||||||
/* trace du centre du texte */
|
/* trace du centre du texte */
|
||||||
if( (g_AnchorColor & ITEM_NOT_SHOW) == 0 )
|
if( g_DesignSettings.IsElementVisible( ANCHOR_VISIBLE ))
|
||||||
{
|
{
|
||||||
int anchor_size = screen->Unscale( 2 );
|
int anchor_size = screen->Unscale( 2 );
|
||||||
GRLine( &panel->m_ClipBox, DC,
|
GRLine( &panel->m_ClipBox, DC,
|
||||||
|
@ -392,22 +392,30 @@ void TEXTE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const
|
||||||
pos.x, pos.y + anchor_size, 0, g_AnchorColor );
|
pos.x, pos.y + anchor_size, 0, g_AnchorColor );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//@@@@IMB: BIG BIG BUG Here???? May Module be NULL?
|
||||||
color = g_DesignSettings.m_LayerColor[Module->GetLayer()];
|
color = g_DesignSettings.m_LayerColor[Module->GetLayer()];
|
||||||
|
|
||||||
|
|
||||||
|
//@@IMB: Why the next ifs are testing for Module?
|
||||||
if( Module && Module->GetLayer() == COPPER_LAYER_N )
|
if( Module && Module->GetLayer() == COPPER_LAYER_N )
|
||||||
color = g_ModuleTextCUColor;
|
{
|
||||||
|
if( g_DesignSettings.IsElementVisible( MODULE_TEXT_CU_VISIBLE ) == false )
|
||||||
else if( Module && Module->GetLayer() == CMP_N )
|
|
||||||
color = g_ModuleTextCMPColor;
|
|
||||||
|
|
||||||
if( (color & ITEM_NOT_SHOW) != 0 )
|
|
||||||
return;
|
return;
|
||||||
|
color = g_ModuleTextCUColor;
|
||||||
|
}
|
||||||
|
else if( Module && Module->GetLayer() == CMP_N )
|
||||||
|
{
|
||||||
|
if( g_DesignSettings.IsElementVisible( MODULE_TEXT_CMP_VISIBLE ) == false )
|
||||||
|
return;
|
||||||
|
color = g_ModuleTextCMPColor;
|
||||||
|
}
|
||||||
|
|
||||||
if( m_NoShow )
|
if( m_NoShow )
|
||||||
color = g_ModuleTextNOVColor;
|
{
|
||||||
|
if( g_DesignSettings.IsElementVisible( MODULE_TEXT_NOV_VISIBLE ) == false )
|
||||||
if( (color & ITEM_NOT_SHOW) != 0 )
|
|
||||||
return;
|
return;
|
||||||
|
color = g_ModuleTextNOVColor;
|
||||||
|
}
|
||||||
|
|
||||||
/* If the text is mirrored : negate size.x (mirror / Y axis) */
|
/* If the text is mirrored : negate size.x (mirror / Y axis) */
|
||||||
if( m_Mirror )
|
if( m_Mirror )
|
||||||
|
|
|
@ -579,7 +579,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
|
||||||
{
|
{
|
||||||
color = g_DesignSettings.m_LayerColor[m_Layer];
|
color = g_DesignSettings.m_LayerColor[m_Layer];
|
||||||
|
|
||||||
if( ( color & (ITEM_NOT_SHOW | HIGHT_LIGHT_FLAG) ) == ITEM_NOT_SHOW )
|
if( g_DesignSettings.IsLayerVisible( m_Layer ) == false && ( color & HIGHT_LIGHT_FLAG ) != HIGHT_LIGHT_FLAG )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( DisplayOpt.ContrastModeDisplay )
|
if( DisplayOpt.ContrastModeDisplay )
|
||||||
|
@ -743,7 +743,7 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
|
||||||
|
|
||||||
color = g_DesignSettings.m_ViaColor[m_Shape];
|
color = g_DesignSettings.m_ViaColor[m_Shape];
|
||||||
|
|
||||||
if( ( color & (ITEM_NOT_SHOW | HIGHT_LIGHT_FLAG) ) == ITEM_NOT_SHOW )
|
if( g_DesignSettings.IsElementVisible( VIAS_VISIBLE + m_Shape ) == false && ( color & HIGHT_LIGHT_FLAG ) != HIGHT_LIGHT_FLAG )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( DisplayOpt.ContrastModeDisplay )
|
if( DisplayOpt.ContrastModeDisplay )
|
||||||
|
|
|
@ -450,7 +450,7 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, con
|
||||||
int curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer;
|
int curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer;
|
||||||
int color = g_DesignSettings.m_LayerColor[m_Layer];
|
int color = g_DesignSettings.m_LayerColor[m_Layer];
|
||||||
|
|
||||||
if( ( color & (ITEM_NOT_SHOW | HIGHT_LIGHT_FLAG) ) == ITEM_NOT_SHOW )
|
if( g_DesignSettings.IsLayerVisible( m_Layer ) == false && ( color & HIGHT_LIGHT_FLAG ) != HIGHT_LIGHT_FLAG )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GRSetDrawMode( DC, draw_mode );
|
GRSetDrawMode( DC, draw_mode );
|
||||||
|
@ -538,7 +538,7 @@ void ZONE_CONTAINER::DrawFilledArea( WinEDA_DrawPanel* panel,
|
||||||
int curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer;
|
int curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer;
|
||||||
int color = g_DesignSettings.m_LayerColor[m_Layer];
|
int color = g_DesignSettings.m_LayerColor[m_Layer];
|
||||||
|
|
||||||
if( ( color & (ITEM_NOT_SHOW | HIGHT_LIGHT_FLAG) ) == ITEM_NOT_SHOW )
|
if( g_DesignSettings.IsLayerVisible( m_Layer ) == false && ( color & HIGHT_LIGHT_FLAG ) != HIGHT_LIGHT_FLAG )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GRSetDrawMode( DC, aDrawMode );
|
GRSetDrawMode( DC, aDrawMode );
|
||||||
|
|
|
@ -213,7 +213,13 @@ EDA_BoardDesignSettings::EDA_BoardDesignSettings()
|
||||||
m_MicroViasMinSize = 200; // micro vias (not vias) min diameter
|
m_MicroViasMinSize = 200; // micro vias (not vias) min diameter
|
||||||
m_MaskMargin = 150; // Solder mask margin
|
m_MaskMargin = 150; // Solder mask margin
|
||||||
/* Color options for screen display of the Printed Board: */
|
/* Color options for screen display of the Printed Board: */
|
||||||
m_PcbGridColor = DARKGRAY; // Grid color
|
|
||||||
|
|
||||||
|
//@@IMB: Not used m_PcbGridColor = DARKGRAY; // Grid color
|
||||||
|
|
||||||
|
m_EnabledLayers = 0x1fffffff; // IMB: All layers enabled at first. TODO: Use a macro for the initial value.
|
||||||
|
m_VisibleLayers = 0xffffffff; // IMB: All layers visible at first. TODO: Use a macro for the initial value.
|
||||||
|
m_VisibleElements = 0x00000fff; // IMB: All elements visible at first. TODO: Use a macro for the initial value.
|
||||||
|
|
||||||
for( ii = 0; ii < 32; ii++ )
|
for( ii = 0; ii < 32; ii++ )
|
||||||
m_LayerColor[ii] = default_layer_color[ii];
|
m_LayerColor[ii] = default_layer_color[ii];
|
||||||
|
@ -224,12 +230,13 @@ EDA_BoardDesignSettings::EDA_BoardDesignSettings()
|
||||||
m_ViaColor[VIA_BLIND_BURIED] = BROWN;
|
m_ViaColor[VIA_BLIND_BURIED] = BROWN;
|
||||||
m_ViaColor[VIA_THROUGH] = WHITE;
|
m_ViaColor[VIA_THROUGH] = WHITE;
|
||||||
|
|
||||||
m_ModuleTextCMPColor = LIGHTGRAY; // Text module color for modules on the COMPONENT layer
|
//@@IMB: Not used m_ModuleTextCMPColor = LIGHTGRAY; // Text module color for modules on the COMPONENT layer
|
||||||
m_ModuleTextCUColor = MAGENTA; // Text module color for modules on the COPPER layer
|
//@@IMB: Not used m_ModuleTextCUColor = MAGENTA; // Text module color for modules on the COPPER layer
|
||||||
m_ModuleTextNOVColor = DARKGRAY; // Text module color for "invisible" texts (must be BLACK if really not displayed)
|
//@@IMB: Not used m_ModuleTextNOVColor = DARKGRAY; // Text module color for "invisible" texts (must be BLACK if really not displayed)
|
||||||
m_AnchorColor = BLUE; // Anchor color for modules and texts
|
//@@IMB: Not used m_AnchorColor = BLUE; // Anchor color for modules and texts
|
||||||
m_PadCUColor = GREEN; // Pad color for the COMPONENT side of the pad
|
//@@IMB: Not used m_PadCUColor = GREEN; // Pad color for the COMPONENT side of the pad
|
||||||
m_PadCMPColor = RED; // Pad color for the COPPER side of the pad
|
//@@IMB: Not used m_PadCMPColor = RED; // Pad color for the COPPER side of the pad
|
||||||
|
|
||||||
m_RatsnestColor = WHITE; // Ratsnest color
|
m_RatsnestColor = WHITE; // Ratsnest color
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,13 +244,48 @@ EDA_BoardDesignSettings::EDA_BoardDesignSettings()
|
||||||
// see pcbstruct.h
|
// see pcbstruct.h
|
||||||
int EDA_BoardDesignSettings::GetVisibleLayers() const
|
int EDA_BoardDesignSettings::GetVisibleLayers() const
|
||||||
{
|
{
|
||||||
int layerMask = 0;
|
return m_VisibleLayers;
|
||||||
|
}
|
||||||
|
|
||||||
for( int i = 0, mask = 1; i< 32; ++i, mask <<= 1 )
|
void EDA_BoardDesignSettings::SetVisibleLayers( int Mask )
|
||||||
{
|
{
|
||||||
if( !( m_LayerColor[i] & ITEM_NOT_SHOW ) )
|
m_VisibleLayers = Mask & 0x1fffffff;
|
||||||
layerMask |= mask;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return layerMask;
|
/* //@@IMB: Made inline
|
||||||
|
bool EDA_BoardDesignSettings::IsLayerVisible( int LayerNumber ) const
|
||||||
|
{
|
||||||
|
if( LayerNumber < 0 || LayerNumber >= 32 ) //@@IMB: Altough Pcbnew uses only 29, Gerbview uses all 32 layers
|
||||||
|
return false;
|
||||||
|
return (bool)( m_VisibleLayers & 1 << LayerNumber );
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
void EDA_BoardDesignSettings::SetLayerVisibility( int LayerNumber, bool State )
|
||||||
|
{
|
||||||
|
if( LayerNumber < 0 || LayerNumber >= 32 ) //@@IMB: Altough Pcbnew uses only 29, Gerbview uses all 32 layers
|
||||||
|
return;
|
||||||
|
if( State )
|
||||||
|
m_VisibleLayers |= 1 << LayerNumber;
|
||||||
|
else
|
||||||
|
m_VisibleLayers &= ~( 1 << LayerNumber );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* //@@IMB: Made inline
|
||||||
|
bool EDA_BoardDesignSettings::IsElementVisible( int ElementNumber ) const
|
||||||
|
{
|
||||||
|
if( ElementNumber < 0 || ElementNumber > PAD_CMP_VISIBLE )
|
||||||
|
return false;
|
||||||
|
return (bool)( m_VisibleElements & 1 << ElementNumber );
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
void EDA_BoardDesignSettings::SetElementVisibility( int ElementNumber, bool State )
|
||||||
|
{
|
||||||
|
if( ElementNumber < 0 || ElementNumber > PAD_CMP_VISIBLE )
|
||||||
|
return;
|
||||||
|
if( State )
|
||||||
|
m_VisibleElements |= 1 << ElementNumber;
|
||||||
|
else
|
||||||
|
m_VisibleElements &= ~( 1 << ElementNumber );
|
||||||
}
|
}
|
||||||
|
|
|
@ -420,7 +420,7 @@ static bool Magnetize( BOARD* m_Pcb, WinEDA_PcbFrame* frame,
|
||||||
if( doCheckNet && currTrack && currTrack->GetNet() != track->GetNet() )
|
if( doCheckNet && currTrack && currTrack->GetNet() != track->GetNet() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( g_DesignSettings.m_LayerColor[track->GetLayer()] & ITEM_NOT_SHOW )
|
if( g_DesignSettings.IsLayerVisible( track->GetLayer() ) == false )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// omit the layer check if moving a via
|
// omit the layer check if moving a via
|
||||||
|
|
|
@ -294,10 +294,8 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
|
||||||
DrawPanel->Refresh( );
|
DrawPanel->Refresh( );
|
||||||
break;
|
break;
|
||||||
case ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE:
|
case ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE:
|
||||||
if(!m_OptionsToolBar->GetToolState( id ))
|
g_DesignSettings.SetElementVisibility( MODULE_TEXT_NOV_VISIBLE,
|
||||||
g_ModuleTextNOVColor &= (~ITEM_NOT_SHOW);
|
m_OptionsToolBar->GetToolState( id ));
|
||||||
else
|
|
||||||
g_ModuleTextNOVColor |= ( ITEM_NOT_SHOW);
|
|
||||||
DrawPanel->Refresh( );
|
DrawPanel->Refresh( );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -189,6 +189,42 @@ int WinEDA_BasePcbFrame::ReadGeneralDescrPcb( FILE* File, int* LineNum )
|
||||||
if( strnicmp( data, "$EndGENERAL", 10 ) == 0 )
|
if( strnicmp( data, "$EndGENERAL", 10 ) == 0 )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if( stricmp( data, "EnabledLayers" ) == 0 )
|
||||||
|
{
|
||||||
|
int EnabledLayers = 0;
|
||||||
|
data = strtok( NULL, " =\n\r" );
|
||||||
|
sscanf( data, "%X", &EnabledLayers );
|
||||||
|
|
||||||
|
// Setup layer visibility
|
||||||
|
GetBoard()->m_BoardSettings->m_EnabledLayers = EnabledLayers;
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( stricmp( data, "VisibleLayers" ) == 0 )
|
||||||
|
{
|
||||||
|
int VisibleLayers = 0;
|
||||||
|
data = strtok( NULL, " =\n\r" );
|
||||||
|
sscanf( data, "%X", &VisibleLayers );
|
||||||
|
|
||||||
|
// Setup layer visibility
|
||||||
|
GetBoard()->m_BoardSettings->m_VisibleLayers = VisibleLayers;
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( stricmp( data, "VisibleElements" ) == 0 )
|
||||||
|
{
|
||||||
|
int VisibleElements = 0;
|
||||||
|
data = strtok( NULL, " =\n\r" );
|
||||||
|
sscanf( data, "%X", &VisibleElements );
|
||||||
|
|
||||||
|
// Setup elements visibility
|
||||||
|
GetBoard()->m_BoardSettings->m_VisibleElements = VisibleElements;
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if( strncmp( data, "Ly", 2 ) == 0 ) // Old format for Layer count
|
if( strncmp( data, "Ly", 2 ) == 0 ) // Old format for Layer count
|
||||||
{
|
{
|
||||||
int Masque_Layer = 1, ii;
|
int Masque_Layer = 1, ii;
|
||||||
|
@ -629,6 +665,9 @@ bool WinEDA_PcbFrame::WriteGeneralDescrPcb( FILE* File )
|
||||||
|
|
||||||
// Write old format for Layer count (for compatibility with old versions of pcbnew
|
// Write old format for Layer count (for compatibility with old versions of pcbnew
|
||||||
fprintf( File, "Ly %8X\n", g_TabAllCopperLayerMask[NbLayers - 1] | ALL_NO_CU_LAYERS ); // For compatibility with old version of pcbnew
|
fprintf( File, "Ly %8X\n", g_TabAllCopperLayerMask[NbLayers - 1] | ALL_NO_CU_LAYERS ); // For compatibility with old version of pcbnew
|
||||||
|
fprintf( File, "EnabledLayers %08X\n", GetBoard()->m_BoardSettings->m_EnabledLayers );
|
||||||
|
fprintf( File, "VisibleLayers %08X\n", GetBoard()->m_BoardSettings->m_VisibleLayers );
|
||||||
|
fprintf( File, "VisibleElements %08X\n", GetBoard()->m_BoardSettings->m_VisibleElements );
|
||||||
fprintf( File, "Links %d\n", GetBoard()->GetRatsnestsCount() );
|
fprintf( File, "Links %d\n", GetBoard()->GetRatsnestsCount() );
|
||||||
fprintf( File, "NoConn %d\n", GetBoard()->m_NbNoconnect );
|
fprintf( File, "NoConn %d\n", GetBoard()->m_NbNoconnect );
|
||||||
|
|
||||||
|
|
|
@ -506,7 +506,7 @@ TRACK* Locate_Pistes( TRACK* start_adresse, const wxPoint& ref_pos, int MasqueLa
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( g_DesignSettings.m_LayerColor[layer] & ITEM_NOT_SHOW )
|
if( g_DesignSettings.IsLayerVisible( layer ) == false )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( track->Type() == TYPE_VIA ) /* VIA rencontree */
|
if( track->Type() == TYPE_VIA ) /* VIA rencontree */
|
||||||
|
|
|
@ -186,25 +186,29 @@ bool Read_Config( const wxString& projectFileName )
|
||||||
/* User library path takes precedent over default library search paths. */
|
/* User library path takes precedent over default library search paths. */
|
||||||
wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1 );
|
wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1 );
|
||||||
|
|
||||||
/* Reset the ITEM_NOT_SHOW flag when loading a new config
|
/* Reset the ITEM*NOT*SHOW flag when loading a new config
|
||||||
* Because it could creates SERIOUS mistakes for the user,
|
* Because it could creates SERIOUS mistakes for the user,
|
||||||
* if some items are not visible after loading a board...
|
* if some items are not visible after loading a board...
|
||||||
*/
|
*/
|
||||||
for( ii = 0; ii < LAYER_COUNT; ii++ )
|
for( ii = 0; ii < LAYER_COUNT; ii++ )
|
||||||
g_DesignSettings.m_LayerColor[ii] &= ~ ITEM_NOT_SHOW;
|
g_DesignSettings.SetLayerVisibility( ii, true );
|
||||||
|
|
||||||
DisplayOpt.Show_Modules_Cmp = true;
|
DisplayOpt.Show_Modules_Cmp = true;
|
||||||
DisplayOpt.Show_Modules_Cu = true;
|
DisplayOpt.Show_Modules_Cu = true;
|
||||||
g_ModuleTextNOVColor &= ~ ITEM_NOT_SHOW;
|
|
||||||
g_ModuleTextCMPColor &= ~ ITEM_NOT_SHOW;
|
|
||||||
g_ModuleTextCUColor &= ~ ITEM_NOT_SHOW;
|
|
||||||
g_PadCMPColor &= ~ ITEM_NOT_SHOW;
|
|
||||||
g_PadCUColor &= ~ ITEM_NOT_SHOW;
|
|
||||||
g_DesignSettings.m_ViaColor[VIA_THROUGH] &= ~ ITEM_NOT_SHOW;
|
|
||||||
g_DesignSettings.m_ViaColor[VIA_BLIND_BURIED] &= ~ ITEM_NOT_SHOW;
|
|
||||||
g_DesignSettings.m_ViaColor[VIA_MICROVIA] &= ~ ITEM_NOT_SHOW;
|
|
||||||
// These parameters could be left in their previous state, or resetted
|
// These parameters could be left in their previous state, or resetted
|
||||||
// Comment or uncomment to keep or reset this option after loading a board
|
// Comment or uncomment to keep or reset this option after loading a board
|
||||||
g_AnchorColor &= ~ ITEM_NOT_SHOW;
|
|
||||||
|
g_DesignSettings.SetElementVisibility( MODULE_TEXT_NOV_VISIBLE, true );
|
||||||
|
g_DesignSettings.SetElementVisibility( MODULE_TEXT_CMP_VISIBLE, true );
|
||||||
|
g_DesignSettings.SetElementVisibility( MODULE_TEXT_CU_VISIBLE, true );
|
||||||
|
g_DesignSettings.SetElementVisibility( PAD_CMP_VISIBLE, true );
|
||||||
|
g_DesignSettings.SetElementVisibility( PAD_CU_VISIBLE, true );
|
||||||
|
g_DesignSettings.SetElementVisibility( VIA_THROUGH_VISIBLE, true );
|
||||||
|
g_DesignSettings.SetElementVisibility( VIA_BLIND_BURIED_VISIBLE, true );
|
||||||
|
g_DesignSettings.SetElementVisibility( VIA_MICROVIA_VISIBLE, true );
|
||||||
|
g_DesignSettings.SetElementVisibility( ANCHOR_VISIBLE, true );
|
||||||
|
|
||||||
DisplayOpt.DisplayPadNoConn = true;
|
DisplayOpt.DisplayPadNoConn = true;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,32 +210,47 @@ void WinEDA_SetColorsFrame::CreateControls()
|
||||||
RowBoxSizer->Add(BUTT_SIZE_X, BUTT_SIZE_Y, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5);
|
RowBoxSizer->Add(BUTT_SIZE_X, BUTT_SIZE_Y, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------
|
||||||
// Note: When setting texts, we must call wxGetTranslation( ) for all statically created texts
|
// Note: When setting texts, we must call wxGetTranslation( ) for all statically created texts
|
||||||
// if we want them translated
|
// if we want them translated
|
||||||
if( laytool_list[lyr]->m_LayerNumber >= 0 )
|
switch( laytool_list[lyr]->m_Type )
|
||||||
{
|
{
|
||||||
if( laytool_list[lyr]->m_Title == wxT( "*" ) )
|
case type_layer:
|
||||||
msg = wxGetTranslation( g_ViaType_Name[laytool_list[lyr]->m_LayerNumber]);
|
|
||||||
else
|
|
||||||
msg = m_Parent->GetBoard()->GetLayerName( laytool_list[lyr]->m_LayerNumber );
|
msg = m_Parent->GetBoard()->GetLayerName( laytool_list[lyr]->m_LayerNumber );
|
||||||
}
|
break;
|
||||||
else
|
|
||||||
msg = wxGetTranslation( laytool_list[lyr]->m_Title );
|
|
||||||
|
|
||||||
|
case type_via:
|
||||||
|
msg = wxGetTranslation( g_ViaType_Name[laytool_list[lyr]->m_LayerNumber] );
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
msg = wxGetTranslation( laytool_list[lyr]->m_Title );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------
|
||||||
CheckBox = new wxCheckBox( this, ID_COLOR_CHECKBOX_ONOFF, msg,
|
CheckBox = new wxCheckBox( this, ID_COLOR_CHECKBOX_ONOFF, msg,
|
||||||
wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
||||||
|
|
||||||
laytool_list[lyr]->m_CheckBox = CheckBox;
|
laytool_list[lyr]->m_CheckBox = CheckBox;
|
||||||
|
|
||||||
if( laytool_list[lyr]->m_NoDisplayIsColor )
|
//---------------------------------------------------------------
|
||||||
|
|
||||||
|
switch( laytool_list[lyr]->m_Type )
|
||||||
{
|
{
|
||||||
if( *laytool_list[lyr]->m_Color & ITEM_NOT_SHOW )
|
case type_layer:
|
||||||
CheckBox->SetValue( FALSE );
|
CheckBox->SetValue( g_DesignSettings.IsLayerVisible( laytool_list[lyr]->m_LayerNumber ));
|
||||||
else
|
break;
|
||||||
CheckBox->SetValue( TRUE );
|
|
||||||
}
|
case type_via:
|
||||||
else if( laytool_list[lyr]->m_NoDisplay )
|
case type_element:
|
||||||
|
CheckBox->SetValue( g_DesignSettings.IsElementVisible( laytool_list[lyr]->m_LayerNumber ));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case type_visual:
|
||||||
CheckBox->SetValue( *laytool_list[lyr]->m_NoDisplay );
|
CheckBox->SetValue( *laytool_list[lyr]->m_NoDisplay );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
RowBoxSizer->Add(CheckBox, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5);
|
RowBoxSizer->Add(CheckBox, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5);
|
||||||
|
|
||||||
|
@ -456,27 +471,32 @@ void WinEDA_SetColorsFrame::UpdateLayerSettings()
|
||||||
/******************************************************************/
|
/******************************************************************/
|
||||||
{
|
{
|
||||||
for( int lyr = 0; lyr < NB_BUTT; lyr++ )
|
for( int lyr = 0; lyr < NB_BUTT; lyr++ )
|
||||||
{
|
|
||||||
if( laytool_list[lyr]->m_NoDisplayIsColor )
|
|
||||||
{
|
|
||||||
if( laytool_list[lyr]->m_CheckBox->GetValue() )
|
|
||||||
*laytool_list[lyr]->m_Color = CurrentColor[lyr] & ~ITEM_NOT_SHOW;
|
|
||||||
else
|
|
||||||
*laytool_list[lyr]->m_Color = CurrentColor[lyr] | ITEM_NOT_SHOW;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if( laytool_list[lyr]->m_Color )
|
if( laytool_list[lyr]->m_Color )
|
||||||
*laytool_list[lyr]->m_Color = CurrentColor[lyr];
|
*laytool_list[lyr]->m_Color = CurrentColor[lyr];
|
||||||
|
switch( laytool_list[lyr]->m_Type )
|
||||||
|
{
|
||||||
|
case type_layer:
|
||||||
|
g_DesignSettings.SetLayerVisibility( laytool_list[lyr]->m_LayerNumber,
|
||||||
|
laytool_list[lyr]->m_CheckBox->GetValue() );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case type_via:
|
||||||
|
case type_element:
|
||||||
|
g_DesignSettings.SetElementVisibility( laytool_list[lyr]->m_LayerNumber,
|
||||||
|
laytool_list[lyr]->m_CheckBox->GetValue() );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case type_visual:
|
||||||
*laytool_list[lyr]->m_NoDisplay = laytool_list[lyr]->m_CheckBox->GetValue();
|
*laytool_list[lyr]->m_NoDisplay = laytool_list[lyr]->m_CheckBox->GetValue();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Additional command required for updating visibility of grid.
|
// Additional command required for updating visibility of grid.
|
||||||
m_Parent->m_Draw_Grid = s_showGrid;
|
m_Parent->m_Draw_Grid = s_showGrid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
void WinEDA_SetColorsFrame::ResetDisplayLayersCu( wxCommandEvent& event )
|
void WinEDA_SetColorsFrame::ResetDisplayLayersCu( wxCommandEvent& event )
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
@ -487,11 +507,6 @@ void WinEDA_SetColorsFrame::ResetDisplayLayersCu( wxCommandEvent& event )
|
||||||
|
|
||||||
for( int lyr = 0; lyr < 16; lyr++ )
|
for( int lyr = 0; lyr < 16; lyr++ )
|
||||||
{
|
{
|
||||||
// if( laytool_list[lyr]->m_CheckBox )
|
|
||||||
// laytool_list[lyr]->m_CheckBox->SetValue( NewState );
|
|
||||||
|
|
||||||
// (As checkboxes are actually provided for *all* of these layers,
|
|
||||||
// the following (simpler) command can be used instead.)
|
|
||||||
laytool_list[lyr]->m_CheckBox->SetValue( NewState );
|
laytool_list[lyr]->m_CheckBox->SetValue( NewState );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,12 +53,22 @@ const int BUTT_SIZE_Y = 20;
|
||||||
/**********************************/
|
/**********************************/
|
||||||
/* Liste des menus de Menu_Layers */
|
/* Liste des menus de Menu_Layers */
|
||||||
/**********************************/
|
/**********************************/
|
||||||
|
|
||||||
|
enum button_types
|
||||||
|
{
|
||||||
|
type_layer,
|
||||||
|
type_via,
|
||||||
|
type_element,
|
||||||
|
type_visual
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
struct ColorButton
|
struct ColorButton
|
||||||
{
|
{
|
||||||
|
int m_Type; ///
|
||||||
const wxString m_Title;
|
const wxString m_Title;
|
||||||
int m_LayerNumber;
|
int m_LayerNumber;
|
||||||
int* m_Color; ///< pointer to color variable to manipulate
|
int* m_Color; ///< pointer to color variable to manipulate
|
||||||
bool m_NoDisplayIsColor; ///< TRUE if bit ITEM_NOT_SHOW of the color variable should be manipulated
|
|
||||||
bool* m_NoDisplay; ///< pointer to the on/off display control variable, if it is not the color variable
|
bool* m_NoDisplay; ///< pointer to the on/off display control variable, if it is not the color variable
|
||||||
|
|
||||||
int m_Id;
|
int m_Id;
|
||||||
|
@ -82,130 +92,130 @@ static ButtonIndex Msg_Layers_Cu =
|
||||||
|
|
||||||
static ColorButton Layer_1_Butt =
|
static ColorButton Layer_1_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
COPPER_LAYER_N, // Layer
|
COPPER_LAYER_N, // Layer
|
||||||
ADR( COPPER_LAYER_N ), // Address of optional parameter
|
ADR( COPPER_LAYER_N ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_2_Butt =
|
static ColorButton Layer_2_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
1, // Layer
|
1, // Layer
|
||||||
ADR( 1 ), // Address of optional parameter
|
ADR( 1 ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_3_Butt =
|
static ColorButton Layer_3_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
2, // Layer
|
2, // Layer
|
||||||
ADR( 2 ), // Address of optional parameter
|
ADR( 2 ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_4_Butt =
|
static ColorButton Layer_4_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
3, // Layer
|
3, // Layer
|
||||||
ADR( 3 ), // Address of optional parameter
|
ADR( 3 ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_5_Butt =
|
static ColorButton Layer_5_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
4, // Layer
|
4, // Layer
|
||||||
ADR( 4 ), // Address of optional parameter
|
ADR( 4 ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_6_Butt =
|
static ColorButton Layer_6_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
5, // Layer
|
5, // Layer
|
||||||
ADR( 5 ), // Address of optional parameter
|
ADR( 5 ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_7_Butt =
|
static ColorButton Layer_7_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
6, // Layer
|
6, // Layer
|
||||||
ADR( 6 ), // Address of optional parameter
|
ADR( 6 ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_8_Butt =
|
static ColorButton Layer_8_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
7, // Layer
|
7, // Layer
|
||||||
ADR( 7 ), // Address of optional parameter
|
ADR( 7 ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_9_Butt =
|
static ColorButton Layer_9_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
8, // Layer
|
8, // Layer
|
||||||
ADR( 8 ), // Address of optional parameter
|
ADR( 8 ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_10_Butt =
|
static ColorButton Layer_10_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
9, // Layer
|
9, // Layer
|
||||||
ADR( 9 ), // Address of optional parameter
|
ADR( 9 ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_11_Butt =
|
static ColorButton Layer_11_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
10, // Layer
|
10, // Layer
|
||||||
ADR( 10 ), // Address of optional parameter
|
ADR( 10 ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_12_Butt =
|
static ColorButton Layer_12_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
11, // Layer
|
11, // Layer
|
||||||
ADR( 11 ), // Address of optional parameter
|
ADR( 11 ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_13_Butt =
|
static ColorButton Layer_13_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
12, // Layer
|
12, // Layer
|
||||||
ADR( 12 ), // Address of optional parameter
|
ADR( 12 ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_14_Butt =
|
static ColorButton Layer_14_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
13, // Layer
|
13, // Layer
|
||||||
ADR( 13 ), // Address of optional parameter
|
ADR( 13 ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_15_Butt =
|
static ColorButton Layer_15_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
14, // Layer
|
14, // Layer
|
||||||
ADR( 14 ), // Address of optional parameter
|
ADR( 14 ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_16_Butt =
|
static ColorButton Layer_16_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
CMP_N, // Layer
|
CMP_N, // Layer
|
||||||
ADR( CMP_N ), // Address of optional parameter
|
ADR( CMP_N ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -217,106 +227,106 @@ static ButtonIndex Msg_Layers_Tech =
|
||||||
|
|
||||||
static ColorButton Layer_17_Butt =
|
static ColorButton Layer_17_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
ADHESIVE_N_CU, // Layer
|
ADHESIVE_N_CU, // Layer
|
||||||
ADR( ADHESIVE_N_CU ), // Address of optional parameter
|
ADR( ADHESIVE_N_CU ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_18_Butt =
|
static ColorButton Layer_18_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
ADHESIVE_N_CMP, // Layer
|
ADHESIVE_N_CMP, // Layer
|
||||||
ADR( ADHESIVE_N_CMP ), // Address of optional parameter
|
ADR( ADHESIVE_N_CMP ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_19_Butt =
|
static ColorButton Layer_19_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
SOLDERPASTE_N_CU, // Layer
|
SOLDERPASTE_N_CU, // Layer
|
||||||
ADR( SOLDERPASTE_N_CU ), // Address of optional parameter
|
ADR( SOLDERPASTE_N_CU ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_20_Butt =
|
static ColorButton Layer_20_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
SOLDERPASTE_N_CMP, // Layer
|
SOLDERPASTE_N_CMP, // Layer
|
||||||
ADR( SOLDERPASTE_N_CMP ), // Address of optional parameter
|
ADR( SOLDERPASTE_N_CMP ), // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_21_Butt =
|
static ColorButton Layer_21_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
SILKSCREEN_N_CU, // Layer
|
SILKSCREEN_N_CU, // Layer
|
||||||
ADR( SILKSCREEN_N_CU ), // Address of optional parameter
|
ADR( SILKSCREEN_N_CU ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_22_Butt =
|
static ColorButton Layer_22_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
SILKSCREEN_N_CMP, // Layer
|
SILKSCREEN_N_CMP, // Layer
|
||||||
ADR( SILKSCREEN_N_CMP ), // Address of optional parameter
|
ADR( SILKSCREEN_N_CMP ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_23_Butt =
|
static ColorButton Layer_23_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
SOLDERMASK_N_CU, // Layer
|
SOLDERMASK_N_CU, // Layer
|
||||||
ADR( SOLDERMASK_N_CU ), // Address of optional parameter
|
ADR( SOLDERMASK_N_CU ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_24_Butt =
|
static ColorButton Layer_24_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
SOLDERMASK_N_CMP, // Layer
|
SOLDERMASK_N_CMP, // Layer
|
||||||
ADR( SOLDERMASK_N_CMP ), // Address of optional parameter
|
ADR( SOLDERMASK_N_CMP ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_25_Butt =
|
static ColorButton Layer_25_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
DRAW_N, // Layer
|
DRAW_N, // Layer
|
||||||
ADR( DRAW_N ), // Address of optional parameter
|
ADR( DRAW_N ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_26_Butt =
|
static ColorButton Layer_26_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
COMMENT_N, // Layer
|
COMMENT_N, // Layer
|
||||||
ADR( COMMENT_N ), // Address of optional parameter
|
ADR( COMMENT_N ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_27_Butt =
|
static ColorButton Layer_27_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
ECO1_N, // Layer
|
ECO1_N, // Layer
|
||||||
ADR( ECO1_N ), // Address of optional parameter
|
ADR( ECO1_N ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_28_Butt =
|
static ColorButton Layer_28_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
ECO2_N, // Layer
|
ECO2_N, // Layer
|
||||||
ADR( ECO2_N ), // Address of optional parameter
|
ADR( ECO2_N ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Layer_29_Butt =
|
static ColorButton Layer_29_Butt =
|
||||||
{
|
{
|
||||||
|
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
wxEmptyString,
|
wxEmptyString,
|
||||||
EDGE_N, // Layer
|
EDGE_N, // Layer
|
||||||
ADR( EDGE_N ), // Address of optional parameter
|
ADR( EDGE_N ) // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -328,118 +338,118 @@ static ButtonIndex Msg_Others_Items =
|
||||||
|
|
||||||
static ColorButton VIA_THROUGH_Butt =
|
static ColorButton VIA_THROUGH_Butt =
|
||||||
{
|
{
|
||||||
wxT( "*" ),
|
type_via, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
|
wxEmptyString,
|
||||||
VIA_THROUGH, // Layer
|
VIA_THROUGH, // Layer
|
||||||
&g_DesignSettings.m_ViaColor[VIA_THROUGH], // Address of optional parameter
|
&g_DesignSettings.m_ViaColor[VIA_THROUGH] // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton VIA_BLIND_BURIED_Butt =
|
static ColorButton VIA_BLIND_BURIED_Butt =
|
||||||
{
|
{
|
||||||
wxT( "*" ),
|
type_via, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
|
wxEmptyString,
|
||||||
VIA_BLIND_BURIED, // Layer
|
VIA_BLIND_BURIED, // Layer
|
||||||
&g_DesignSettings.m_ViaColor[VIA_BLIND_BURIED], // Address of optional parameter
|
&g_DesignSettings.m_ViaColor[VIA_BLIND_BURIED] // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton MICRO_VIA_Butt =
|
static ColorButton MICRO_VIA_Butt =
|
||||||
{
|
{
|
||||||
wxT( "*" ),
|
type_via, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
|
wxEmptyString,
|
||||||
VIA_MICROVIA, // Layer
|
VIA_MICROVIA, // Layer
|
||||||
&g_DesignSettings.m_ViaColor[VIA_MICROVIA], // Address of optional parameter
|
&g_DesignSettings.m_ViaColor[VIA_MICROVIA] // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Ratsnest_Butt =
|
static ColorButton Ratsnest_Butt =
|
||||||
{
|
{
|
||||||
|
type_visual,
|
||||||
_( "Ratsnest" ), // Title
|
_( "Ratsnest" ), // Title
|
||||||
-1,
|
-1,
|
||||||
&g_DesignSettings.m_RatsnestColor, // Address of optional parameter
|
&g_DesignSettings.m_RatsnestColor, // Address of optional parameter
|
||||||
FALSE,
|
|
||||||
&g_Show_Ratsnest // Address of boolean display control parameter to toggle
|
&g_Show_Ratsnest // Address of boolean display control parameter to toggle
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Pad_Cu_Butt =
|
static ColorButton Pad_Cu_Butt =
|
||||||
{
|
{
|
||||||
|
type_element, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
_( "Pad Cu" ), // Title
|
_( "Pad Cu" ), // Title
|
||||||
-1,
|
PAD_CU_VISIBLE,
|
||||||
&g_PadCUColor, // Address of optional parameter
|
&g_PadCUColor // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Pad_Cmp_Butt =
|
static ColorButton Pad_Cmp_Butt =
|
||||||
{
|
{
|
||||||
|
type_element, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
_( "Pad Cmp" ), // Title
|
_( "Pad Cmp" ), // Title
|
||||||
-1,
|
PAD_CMP_VISIBLE,
|
||||||
&g_PadCMPColor, // Address of optional parameter
|
&g_PadCMPColor // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Text_Mod_Cu_Butt =
|
static ColorButton Text_Mod_Cu_Butt =
|
||||||
{
|
{
|
||||||
|
type_element, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
_( "Text Module Cu" ), // Title
|
_( "Text Module Cu" ), // Title
|
||||||
-1,
|
MODULE_TEXT_CU_VISIBLE,
|
||||||
&g_ModuleTextCUColor, // Address of optional parameter
|
&g_ModuleTextCUColor // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Text_Mod_Cmp_Butt =
|
static ColorButton Text_Mod_Cmp_Butt =
|
||||||
{
|
{
|
||||||
|
type_element, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
_( "Text Module Cmp" ), // Title
|
_( "Text Module Cmp" ), // Title
|
||||||
-1,
|
MODULE_TEXT_CMP_VISIBLE,
|
||||||
&g_ModuleTextCMPColor, // Address of optional parameter
|
&g_ModuleTextCMPColor // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Text_Mod_NoVisible_Butt =
|
static ColorButton Text_Mod_NoVisible_Butt =
|
||||||
{
|
{
|
||||||
|
type_element, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
_( "Text Module invisible" ), // Title
|
_( "Text Module invisible" ), // Title
|
||||||
-1,
|
MODULE_TEXT_NOV_VISIBLE,
|
||||||
&g_ModuleTextNOVColor, // Address of optional parameter
|
&g_ModuleTextNOVColor // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Anchors_Butt =
|
static ColorButton Anchors_Butt =
|
||||||
{
|
{
|
||||||
|
type_element, // Toggle ITEM_NOT_SHOW bit of the color variable
|
||||||
_( "Anchors" ), // Title
|
_( "Anchors" ), // Title
|
||||||
-1,
|
ANCHOR_VISIBLE,
|
||||||
&g_AnchorColor, // Address of optional parameter
|
&g_AnchorColor // Address of optional parameter
|
||||||
TRUE // Toggle ITEM_NOT_SHOW bit of the color variable
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Grid_Butt =
|
static ColorButton Grid_Butt =
|
||||||
{
|
{
|
||||||
|
type_visual,
|
||||||
_( "Grid" ), // Title
|
_( "Grid" ), // Title
|
||||||
-1,
|
-1,
|
||||||
&g_GridColor, // Address of optional parameter
|
&g_GridColor, // Address of optional parameter
|
||||||
FALSE,
|
|
||||||
&s_showGrid // Address of boolean display control parameter to toggle
|
&s_showGrid // Address of boolean display control parameter to toggle
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Show_Pads_Noconnect_Butt =
|
static ColorButton Show_Pads_Noconnect_Butt =
|
||||||
{
|
{
|
||||||
|
type_visual,
|
||||||
_( "Show Noconnect" ), // Title
|
_( "Show Noconnect" ), // Title
|
||||||
-1,
|
-1,
|
||||||
NULL, // Address of optional parameter
|
NULL, // Address of optional parameter
|
||||||
FALSE,
|
|
||||||
&DisplayOpt.DisplayPadNoConn // Address of boolean display control parameter to toggle
|
&DisplayOpt.DisplayPadNoConn // Address of boolean display control parameter to toggle
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Show_Modules_Cmp_Butt =
|
static ColorButton Show_Modules_Cmp_Butt =
|
||||||
{
|
{
|
||||||
|
type_visual,
|
||||||
_( "Show Modules Cmp" ), // Title
|
_( "Show Modules Cmp" ), // Title
|
||||||
-1,
|
-1,
|
||||||
NULL, // Address of optional parameter
|
NULL, // Address of optional parameter
|
||||||
FALSE,
|
|
||||||
&DisplayOpt.Show_Modules_Cmp // Address of boolean display control parameter to toggle
|
&DisplayOpt.Show_Modules_Cmp // Address of boolean display control parameter to toggle
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColorButton Show_Modules_Cu_Butt =
|
static ColorButton Show_Modules_Cu_Butt =
|
||||||
{
|
{
|
||||||
|
type_visual,
|
||||||
_( "Show Modules Cu" ), // Title
|
_( "Show Modules Cu" ), // Title
|
||||||
-1,
|
-1,
|
||||||
NULL, // Address of optional parameter
|
NULL, // Address of optional parameter
|
||||||
FALSE,
|
|
||||||
&DisplayOpt.Show_Modules_Cu // Address of boolean display control parameter to toggle
|
&DisplayOpt.Show_Modules_Cu // Address of boolean display control parameter to toggle
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -388,7 +388,7 @@ void WinEDA_PcbFrame::ReCreateOptToolbar()
|
||||||
_( "Show Invisible Text" ),
|
_( "Show Invisible Text" ),
|
||||||
wxITEM_CHECK );
|
wxITEM_CHECK );
|
||||||
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
|
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
|
||||||
g_ModuleTextNOVColor & ITEM_NOT_SHOW );
|
g_DesignSettings.IsElementVisible( MODULE_TEXT_NOV_VISIBLE ));
|
||||||
|
|
||||||
|
|
||||||
#ifdef MUWAVE_ENBL
|
#ifdef MUWAVE_ENBL
|
||||||
|
|
|
@ -271,12 +271,14 @@ void WinEDA_PcbFrame::SetToolbars()
|
||||||
DisplayOpt.ContrastModeDisplay ?
|
DisplayOpt.ContrastModeDisplay ?
|
||||||
_( "Normal contrast mode display" ) :
|
_( "Normal contrast mode display" ) :
|
||||||
_( "High contrast mode display" ) );
|
_( "High contrast mode display" ) );
|
||||||
|
|
||||||
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
|
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
|
||||||
g_ModuleTextNOVColor & ITEM_NOT_SHOW );
|
g_DesignSettings.IsElementVisible( MODULE_TEXT_NOV_VISIBLE ) );
|
||||||
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
|
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
|
||||||
g_ModuleTextNOVColor & (ITEM_NOT_SHOW) ?
|
g_DesignSettings.IsElementVisible( MODULE_TEXT_NOV_VISIBLE ) ?
|
||||||
_( "Show invisible text" ) :
|
_( "Hide invisible text" ) :
|
||||||
_( "Hide invisible text" ) );
|
_( "Show invisible text" ) );
|
||||||
|
|
||||||
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1,
|
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1,
|
||||||
m_AuxVToolBar ? true : false );
|
m_AuxVToolBar ? true : false );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue