Commit 860fbb16 authored by dickelbeck's avatar dickelbeck

++pcbnew & gerbview

  * Moved ReturnLayerName() to static BOARD::GetDefaultLayerName() and migrated
    to a Specctra DSN compatible default layer naming scheme:
        Component becomes Front, Copper becomes Back.
  * set_color.h: Cmp becomes Front, Cu becomes Back.
  * D_PAD::DisplayInfo() changed to use actual copper layer names.
  * more layer setup dialog work, moved all programmatic wxControl instantiation
    into the wxFormbuilder environment, but this is fraught with danger:
    wxFlexGridSizer used the tallest control to establish the row heights, so
    be careful about changing control borders in the scroll panel. The vertical
    size can explode since just a couple of pixels times the number of rows
    is substantial.  Currently I am setting a 5 pixel border only left, top, and right
    but not bottom.
  * Set copper layer count is back in place as a hack until I can get the enabled
    layer bit map fully operational.
parent 5f9aefe8
......@@ -189,7 +189,7 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
param = g_Parm_3D_Visu.m_LayerZcoord[15];
glFogfv( GL_FOG_END, &param );
glBegin( GL_QUADS );
SetGLColor( g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[CMP_N] );
SetGLColor( g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[LAYER_N_FRONT] );
double sx = DataScale3D * g_Parm_3D_Visu.m_BoardSize.x / 2;
double sy = DataScale3D * g_Parm_3D_Visu.m_BoardSize.y / 2;
double zpos = g_Parm_3D_Visu.m_LayerZcoord[15];
......@@ -201,7 +201,7 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
glVertex3f( sx, -sy, zpos );
glEnd();
glBegin( GL_QUADS );
SetGLColor( g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[COPPER_LAYER_N] );
SetGLColor( g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[LAYER_N_BACK] );
glNormal3f( 0.0, 0.0, -1.0 ); // Normal is -Z axis
glVertex3f( -sx, -sy, 0 );
glVertex3f( -sx, sy, 0 );
......@@ -369,7 +369,7 @@ void Pcb3D_GLCanvas::Draw3D_Track( TRACK* track )
zpos = g_Parm_3D_Visu.m_LayerZcoord[layer];
SetGLColor( color );
glNormal3f( 0.0, 0.0, (layer == COPPER_LAYER_N) ? -1.0 : 1.0 );
glNormal3f( 0.0, 0.0, (layer == LAYER_N_BACK) ? -1.0 : 1.0 );
w = track->m_Width * g_Parm_3D_Visu.m_BoardScale;
ox = track->m_Start.x * g_Parm_3D_Visu.m_BoardScale;
......@@ -401,7 +401,7 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c )
SetGLColor( color );
glNormal3f( 0.0, 0.0, (layer == COPPER_LAYER_N) ? -1.0 : 1.0 );
glNormal3f( 0.0, 0.0, (layer == LAYER_N_BACK) ? -1.0 : 1.0 );
GLUtesselator* tess = gluNewTess();
gluTessCallback( tess, GLU_TESS_BEGIN, ( void (CALLBACK*)() )tessBeginCB );
......@@ -412,7 +412,7 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c )
GLdouble v_data[3];
//gluTessProperty(tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_NONZERO);
// Draw solid areas contained in this zone
int StartContour = 1;
for( unsigned ii = 0; ii < zone_c->m_FilledPolysList.size(); ii++ )
......@@ -471,17 +471,17 @@ void Pcb3D_GLCanvas::Draw3D_Via( SEGVIA* via )
}
else
{
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( CMP_N ) ==
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( LAYER_N_FRONT ) ==
false )
continue;
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[CMP_N];
color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[LAYER_N_FRONT];
}
SetGLColor( color );
// SetGLColor( LIGHTGRAY );
glNormal3f( 0.0, 0.0, (layer == COPPER_LAYER_N) ? -1.0 : 1.0 );
if( layer == COPPER_LAYER_N )
glNormal3f( 0.0, 0.0, (layer == LAYER_N_BACK) ? -1.0 : 1.0 );
if( layer == LAYER_N_BACK )
zpos = zpos - 5 * g_Parm_3D_Visu.m_BoardScale;
else
zpos = zpos + 5 * g_Parm_3D_Visu.m_BoardScale;
......@@ -523,7 +523,7 @@ void Pcb3D_GLCanvas::Draw3D_DrawSegment( DRAWSEGMENT* segment )
{
for( layer = 0; layer < g_Parm_3D_Visu.m_Layers; layer++ )
{
glNormal3f( 0.0, 0.0, (layer == COPPER_LAYER_N) ? -1.0 : 1.0 );
glNormal3f( 0.0, 0.0, (layer == LAYER_N_BACK) ? -1.0 : 1.0 );
zpos = g_Parm_3D_Visu.m_LayerZcoord[layer];
switch( segment->m_Shape )
......@@ -645,12 +645,12 @@ void MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas )
#if 0
if( !DisplayOpt.Show_Modules_Cmp )
{
if( m_Layer == CMP_N )
if( m_Layer == LAYER_N_FRONT )
return;
}
if( !DisplayOpt.Show_Modules_Cu )
{
if( m_Layer == COPPER_LAYER_N )
if( m_Layer == LAYER_N_BACK )
return;
}
#endif
......@@ -678,7 +678,7 @@ void MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas )
{
glRotatef( (double) m_Orient / 10, 0.0, 0.0, 1.0 );
}
if( m_Layer == COPPER_LAYER_N )
if( m_Layer == LAYER_N_BACK )
{
glRotatef( 180.0, 0.0, 1.0, 0.0 );
glRotatef( 180.0, 0.0, 0.0, 1.0 );
......@@ -734,7 +734,7 @@ void EDGE_MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas )
SetGLColor( color );
glNormal3f( 0.0, 0.0, (m_Layer == COPPER_LAYER_N) ? -1.0 : 1.0 );
glNormal3f( 0.0, 0.0, (m_Layer == LAYER_N_BACK) ? -1.0 : 1.0 );
scale = g_Parm_3D_Visu.m_BoardScale;
dx = m_End.x;
......@@ -812,7 +812,7 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
{
SetGLColor( DARKGRAY );
Draw3D_FilledCylinder( drillx, -drilly, hole,
g_Parm_3D_Visu.m_LayerZcoord[CMP_N], 0.0 );
g_Parm_3D_Visu.m_LayerZcoord[LAYER_N_FRONT], 0.0 );
}
glNormal3f( 0.0, 0.0, 1.0 ); // Normal is Z axis
......@@ -830,10 +830,10 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
for( layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; layer++ )
{
if( layer && (layer == nlmax) )
layer = CMP_N;
if( (layer == CMP_N) && !Oncmp )
layer = LAYER_N_FRONT;
if( (layer == LAYER_N_FRONT) && !Oncmp )
continue;
if( (layer == COPPER_LAYER_N) && !Oncu )
if( (layer == LAYER_N_BACK) && !Oncu )
continue;
if( (layer > FIRST_COPPER_LAYER) && (layer < LAST_COPPER_LAYER)
&& !Both )
......@@ -844,9 +844,9 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
continue;
SetGLColor( color );
glNormal3f( 0.0, 0.0, (layer == COPPER_LAYER_N) ? -1.0 : 1.0 );
glNormal3f( 0.0, 0.0, (layer == LAYER_N_BACK) ? -1.0 : 1.0 );
zpos = g_Parm_3D_Visu.m_LayerZcoord[layer];
if( layer == COPPER_LAYER_N )
if( layer == LAYER_N_BACK )
zpos = zpos - 5 * g_Parm_3D_Visu.m_BoardScale;
else
zpos = zpos + 5 * g_Parm_3D_Visu.m_BoardScale;
......@@ -882,23 +882,23 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
layer++ )
{
if( layer && (layer == nlmax) )
layer = CMP_N;
if( (layer == CMP_N) && !Oncmp )
layer = LAYER_N_FRONT;
if( (layer == LAYER_N_FRONT) && !Oncmp )
continue;
if( (layer == COPPER_LAYER_N) && !Oncu )
if( (layer == LAYER_N_BACK) && !Oncu )
continue;
if( (layer > FIRST_COPPER_LAYER)
&& (layer < LAST_COPPER_LAYER) && !Both )
continue;
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 == LAYER_N_BACK) ? -1.0 : 1.0 );
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) ==
false )
continue;
SetGLColor( color );
zpos = g_Parm_3D_Visu.m_LayerZcoord[layer];
if( layer == COPPER_LAYER_N )
if( layer == LAYER_N_BACK )
zpos = zpos - 5 * g_Parm_3D_Visu.m_BoardScale;
else
zpos = zpos + 5 * g_Parm_3D_Visu.m_BoardScale;
......@@ -960,23 +960,23 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
for( layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; layer++ )
{
if( layer && (layer == nlmax) )
layer = CMP_N;
if( (layer == CMP_N) && !Oncmp )
layer = LAYER_N_FRONT;
if( (layer == LAYER_N_FRONT) && !Oncmp )
continue;
if( (layer == COPPER_LAYER_N) && !Oncu )
if( (layer == LAYER_N_BACK) && !Oncu )
continue;
if( (layer > FIRST_COPPER_LAYER) && (layer < LAST_COPPER_LAYER)
&& !Both )
continue;
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 == LAYER_N_BACK) ? -1.0 : 1.0 );
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) ==
false )
continue;
SetGLColor( color );
zpos = g_Parm_3D_Visu.m_LayerZcoord[layer];
if( layer == COPPER_LAYER_N )
if( layer == LAYER_N_BACK )
zpos = zpos - 5 * g_Parm_3D_Visu.m_BoardScale;
else
zpos = zpos + 5 * g_Parm_3D_Visu.m_BoardScale;
......
......@@ -4,6 +4,24 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with
email address.
2009-Dec-6 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
++pcbnew & gerbview
* Moved ReturnLayerName() to static BOARD::GetDefaultLayerName() and migrated
to a Specctra DSN compatible default layer naming scheme:
Component becomes Front, Copper becomes Back.
* set_color.h: Cmp becomes Front, Cu becomes Back.
* D_PAD::DisplayInfo() changed to use actual copper layer names.
* more layer setup dialog work, moved all programmatic wxControl instantiation
into the wxFormbuilder environment, but this is fraught with danger:
wxFlexGridSizer used the tallest control to establish the row heights, so
be careful about changing control borders in the scroll panel. The vertical
size can explode since just a couple of pixels times the number of rows
is substantial. Currently I am setting a 5 pixel border only left, top, and right
but not bottom.
* Set copper layer count is back in place as a hack until I can get the enabled
layer bit map fully operational.
2009-Dec-3 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
......
......@@ -53,6 +53,8 @@ KiCad
PCBNew
------
* Fix DIALOG_PAD_PROPERTIES_BASE class to use actual layer names in the BOARD.
* Use BOARD_ITEM::MenuIcon() in the onrightclick.cpp
* Add unroute option in rightclick menu for components
* Document specctra round tripper, and fix the english translation of help.
......
......@@ -535,51 +535,6 @@ void MyFree( void* pt_mem )
free( pt_mem );
}
/*
* Return the name of the layer number "layer_number".
* if omitSpacePadding == TRUE, the name can be used for a file name
* (no spaces, replaced by _)
*/
wxString ReturnPcbLayerName( int layer_number, bool omitSpacePadding )
{
const unsigned LAYER_LIMIT = 29;
// These are only default layer names. For PCBNEW, the copper names
// may be over-ridden in the BOARD file *.brd.
static const wxString layer_name_list[] =
{
_( "Copper " ), _( "Inner L1 " ), _( "Inner L2 " ), _( "Inner L3 " ),
_( "Inner L4 " ), _( "Inner L5 " ), _( "Inner L6 " ), _( "Inner L7 " ),
_( "Inner L8 " ), _( "Inner L9 " ), _( "Inner L10" ), _( "Inner L11" ),
_( "Inner L12" ), _( "Inner L13" ), _( "Inner L14" ), _( "Component" ),
_( "Adhes Cop" ), _( "Adhes Cmp" ), _( "SoldP Cop" ), _( "SoldP Cmp" ),
_( "SilkS Cop" ), _( "SilkS Cmp" ), _( "Mask Cop " ), _( "Mask Cmp " ),
_( "Drawings " ), _( "Comments " ), _( "Eco1 " ), _( "Eco2 " ),
_( "Edges Pcb" ), _( "BAD INDEX" )
};
if( (unsigned) layer_number > LAYER_LIMIT )
layer_number = LAYER_LIMIT;
const wxString* p = &layer_name_list[layer_number];
if( omitSpacePadding )
{
wxString ret = *p; // copy the string
// modify the copy
ret.Trim();
ret.Replace( wxT( " " ), wxT( "_" ) );
return ret;
}
else
return *p;
}
enum textbox {
ID_TEXTBOX_LIST = 8010
};
......
......@@ -139,7 +139,7 @@ WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame( WinEDA_GerberFrame* parent ) :
if( (pcb_layer_number == g_DesignSettings.GetCopperLayerCount() - 1)
&& (g_DesignSettings.GetCopperLayerCount() > 1) )
pcb_layer_number = CMP_N;
pcb_layer_number = LAYER_N_FRONT;
ButtonTable[nb_items] = ii;
LayerLookUpTable[ii] = pcb_layer_number;
......@@ -259,17 +259,17 @@ WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame( WinEDA_GerberFrame* parent ) :
for( int jj = 0; jj < NB_LAYERS; jj++ )
{
text->SetLabel( ReturnPcbLayerName( jj ) );
text->SetLabel( BOARD::GetDefaultLayerName( jj ) );
if( goodSize.x < text->GetSize().x )
goodSize.x = text->GetSize().x;
}
msg = ReturnPcbLayerName( LayerLookUpTable[ButtonTable[ii]] );
msg = BOARD::GetDefaultLayerName( LayerLookUpTable[ButtonTable[ii]] );
text->SetLabel( msg );
}
else
{
msg = ReturnPcbLayerName( LayerLookUpTable[ButtonTable[ii]] );
msg = BOARD::GetDefaultLayerName( LayerLookUpTable[ButtonTable[ii]] );
text = new wxStaticText( this, item_ID, msg, wxDefaultPosition,
wxDefaultSize, 0 );
}
......@@ -356,7 +356,7 @@ void WinEDA_SwapLayerFrame::OnSelectLayer( wxCommandEvent& event )
}
else
{
layer_list[ii]->SetLabel( ReturnPcbLayerName( jj ) );
layer_list[ii]->SetLabel( BOARD::GetDefaultLayerName( jj ) );
// Change the text color to fuchsia (to highlight
// that this layer *is* being exported)
......@@ -383,7 +383,7 @@ void WinEDA_SwapLayerFrame::OnOkClick( wxCommandEvent& event )
int layers_count = 1;
for( ii = 0; ii < 32; ii++ )
{
if( LayerLookUpTable[ii] == CMP_N )
if( LayerLookUpTable[ii] == LAYER_N_FRONT )
AsCmpLayer = true;
else
{
......
......@@ -70,7 +70,7 @@ public:
* @param aLayerIndex = The index of the layer to be tested
* @return bool - true if the layer is visible.
*/
inline bool IsLayerVisible( int aLayerIndex ) const
bool IsLayerVisible( int aLayerIndex ) const
{
if( aLayerIndex < 0 || aLayerIndex >= 32 ) //@@IMB: Altough Pcbnew uses only 29, Gerbview uses all 32 layers
return false;
......@@ -93,7 +93,7 @@ public:
* returns a bit-mask of all the element categories that are visible
* @return int - the visible element categories in bit-mapped form.
*/
inline int GetVisibleElements() const
int GetVisibleElements() const
{
return m_VisibleElements;
}
......@@ -104,7 +104,7 @@ public:
* changes the bit-mask of visible element categories
* @param aMask = The new bit-mask of visible element categories
*/
inline void SetVisibleElements( int aMask )
void SetVisibleElements( int aMask )
{
m_VisibleElements = aMask;
}
......@@ -116,7 +116,7 @@ public:
* @param aCategoryIndex = The index of the element category to be tested.
* @return bool - true if the element is visible.
*/
inline bool IsElementVisible( int aCategoryIndex ) const
bool IsElementVisible( int aCategoryIndex ) const
{
if( aCategoryIndex < 0 || aCategoryIndex > PAD_CMP_VISIBLE )
return false;
......@@ -164,7 +164,7 @@ public:
* @param aLayerIndex = The index of the layer to be tested
* @return bool - true if the layer is enabled
*/
inline bool IsLayerEnabled( int aLayerIndex )
bool IsLayerEnabled( int aLayerIndex )
{
return (bool) ( m_EnabledLayers & 1 << aLayerIndex );
}
......@@ -174,7 +174,7 @@ public:
* Function GetCopperLayerCount
* @return int - the number of neabled copper layers
*/
inline int GetCopperLayerCount() const
int GetCopperLayerCount() const
{
return m_CopperLayerCount;
}
......
......@@ -257,17 +257,6 @@ bool ProcessExecute( const wxString& aCommandLine,
int aFlags = wxEXEC_ASYNC );
/**
* Function ReturnPcbLayerName
* @return a wxString containing the name of the layer number "layer_number".
* @param layer_number the layer number of the layer
* @param is_filename if TRUE, the name can be used for a file name (not
* internationalized, no space)
*/
wxString ReturnPcbLayerName( int layer_number,
bool is_filename = FALSE );
/*******************/
/* about_kicad.cpp */
/*******************/
......
......@@ -10,113 +10,111 @@
#include "class_board_item.h"
// Definitions relatives aux libraries
#define ENTETE_LIBRAIRIE "PCBNEW-LibModule-V1"
#define ENTETE_LIBDOC "PCBNEW-LibDoc----V1"
#define L_ENTETE_LIB 18
#define EXT_DOC wxT( "mdc" )
#define FLAG1 (1 << 13) /* flag for free local computations */
#define FLAG0 (1 << 12) /* flag for free local computations */
#define BEGIN_ONPAD (1 << 11) /* flag indicating a start of segment pad */
#define END_ONPAD (1 << 10) /* flag indicating an end of segment pad */
#define BUSY (1 << 9) /* flag indicating that the structure has
* already been edited, in some routines */
#define DELETED (1 << 8) /* flag indicating structures erased nd set
* string "DELETED" */
#define NO_TRACE (1 << 7) /* The element must not be displayed */
#define SURBRILL (1 << 5) /* element highlighted */
#define DRAG (1 << 4) /* segment in drag mode */
#define EDIT (1 << 3) /* element being edited */
#define SEGM_FIXE (1 << 2) /* segment fixed (not erase global) */
#define SEGM_AR (1 << 1) /* segment marked for auto routing */
#define CHAIN (1 << 0) /* mark segment */
#define ENTETE_LIBRAIRIE "PCBNEW-LibModule-V1"
#define ENTETE_LIBDOC "PCBNEW-LibDoc----V1"
#define L_ENTETE_LIB 18
#define EXT_DOC wxT( "mdc" )
#define FLAG1 (1 << 13) // flag for free local computations
#define FLAG0 (1 << 12) // flag for free local computations
#define BEGIN_ONPAD (1 << 11) // flag indicating a start of segment pad
#define END_ONPAD (1 << 10) // flag indicating an end of segment pad
#define BUSY (1 << 9) // flag indicating that the structure has
// already been edited, in some routines
#define DELETED (1 << 8) // structures erased and set string "DELETED"
#define NO_TRACE (1 << 7) // The element must not be displayed
#define SURBRILL (1 << 5) // element highlighted
#define DRAG (1 << 4) // segment in drag mode
#define EDIT (1 << 3) // element being edited
#define SEGM_FIXE (1 << 2) // segment fixed (not erase global)
#define SEGM_AR (1 << 1) // segment marked for auto routing
#define CHAIN (1 << 0) // mark segment
/* Layer identification (layer number) */
#define FIRST_COPPER_LAYER 0
#define COPPER_LAYER_N 0
#define LAYER_N_2 1
#define LAYER_N_3 2
#define LAYER_N_4 3
#define LAYER_N_5 4
#define LAYER_N_6 5
#define LAYER_N_7 6
#define LAYER_N_8 7
#define LAYER_N_9 8
#define LAYER_N_10 9
#define LAYER_N_11 10
#define LAYER_N_12 11
#define LAYER_N_13 12
#define LAYER_N_14 13
#define LAYER_N_15 14
#define LAYER_CMP_N 15
#define CMP_N 15
#define LAST_COPPER_LAYER 15
#define NB_COPPER_LAYERS (LAST_COPPER_LAYER + 1)
#define FIRST_NO_COPPER_LAYER 16
#define ADHESIVE_N_CU 16
#define ADHESIVE_N_CMP 17
#define SOLDERPASTE_N_CU 18
#define SOLDERPASTE_N_CMP 19
#define SILKSCREEN_N_CU 20
#define SILKSCREEN_N_CMP 21
#define SOLDERMASK_N_CU 22
#define SOLDERMASK_N_CMP 23
#define DRAW_N 24
#define COMMENT_N 25
#define ECO1_N 26
#define ECO2_N 27
#define EDGE_N 28
#define LAST_NO_COPPER_LAYER 28
#define NB_LAYERS (LAST_NO_COPPER_LAYER + 1)
#define LAYER_COUNT 32
#define CUIVRE_LAYER (1 << COPPER_LAYER_N) ///< bit mask for copper layer
#define LAYER_2 (1 << LAYER_N_2) ///< bit mask for layer 2
#define LAYER_3 (1 << LAYER_N_3) ///< bit mask for layer 3
#define LAYER_4 (1 << LAYER_N_4) ///< bit mask for layer 4
#define LAYER_5 (1 << LAYER_N_5) ///< bit mask for layer 5
#define LAYER_6 (1 << LAYER_N_6) ///< bit mask for layer 6
#define LAYER_7 (1 << LAYER_N_7) ///< bit mask for layer 7
#define LAYER_8 (1 << LAYER_N_8) ///< bit mask for layer 8
#define LAYER_9 (1 << LAYER_N_9) ///< bit mask for layer 9
#define LAYER_10 (1 << LAYER_N_10) ///< bit mask for layer 10
#define LAYER_11 (1 << LAYER_N_11) ///< bit mask for layer 11
#define LAYER_12 (1 << LAYER_N_12) ///< bit mask for layer 12
#define LAYER_13 (1 << LAYER_N_13) ///< bit mask for layer 13
#define LAYER_14 (1 << LAYER_N_14) ///< bit mask for layer 14
#define LAYER_15 (1 << LAYER_N_15) ///< bit mask for layer 15
#define CMP_LAYER (1 << LAYER_CMP_N) ///< bit mask for component layer
#define ADHESIVE_LAYER_CU (1 << ADHESIVE_N_CU)
#define ADHESIVE_LAYER_CMP (1 << ADHESIVE_N_CMP)
#define SOLDERPASTE_LAYER_CU (1 << SOLDERPASTE_N_CU)
#define SOLDERPASTE_LAYER_CMP (1 << SOLDERPASTE_N_CMP)
#define SILKSCREEN_LAYER_CU (1 << SILKSCREEN_N_CU)
#define SILKSCREEN_LAYER_CMP (1 << SILKSCREEN_N_CMP)
#define SOLDERMASK_LAYER_CU (1 << SOLDERMASK_N_CU)
#define SOLDERMASK_LAYER_CMP (1 << SOLDERMASK_N_CMP)
#define DRAW_LAYER (1 << DRAW_N)
#define COMMENT_LAYER (1 << COMMENT_N)
#define ECO1_LAYER (1 << ECO1_N)
#define ECO2_LAYER (1 << ECO2_N)
#define EDGE_LAYER (1 << EDGE_N)
#define FIRST_NON_COPPER_LAYER ADHESIVE_N_CU
#define LAST_NON_COPPER_LAYER EDGE_N
#define FIRST_COPPER_LAYER 0
#define LAYER_N_BACK 0
#define LAYER_N_2 1
#define LAYER_N_3 2
#define LAYER_N_4 3
#define LAYER_N_5 4
#define LAYER_N_6 5
#define LAYER_N_7 6
#define LAYER_N_8 7
#define LAYER_N_9 8
#define LAYER_N_10 9
#define LAYER_N_11 10
#define LAYER_N_12 11
#define LAYER_N_13 12
#define LAYER_N_14 13
#define LAYER_N_15 14
#define LAYER_N_FRONT 15
#define LAST_COPPER_LAYER LAYER_N_FRONT
#define NB_COPPER_LAYERS (LAST_COPPER_LAYER + 1)
#define FIRST_NO_COPPER_LAYER 16
#define ADHESIVE_N_CU 16
#define ADHESIVE_N_CMP 17
#define SOLDERPASTE_N_CU 18
#define SOLDERPASTE_N_CMP 19
#define SILKSCREEN_N_CU 20
#define SILKSCREEN_N_CMP 21
#define SOLDERMASK_N_CU 22
#define SOLDERMASK_N_CMP 23
#define DRAW_N 24
#define COMMENT_N 25
#define ECO1_N 26
#define ECO2_N 27
#define EDGE_N 28
#define LAST_NO_COPPER_LAYER 28
#define NB_LAYERS (LAST_NO_COPPER_LAYER + 1)
#define LAYER_COUNT 32
#define CUIVRE_LAYER (1 << LAYER_N_BACK) ///< bit mask for copper layer
#define LAYER_2 (1 << LAYER_N_2) ///< bit mask for layer 2
#define LAYER_3 (1 << LAYER_N_3) ///< bit mask for layer 3
#define LAYER_4 (1 << LAYER_N_4) ///< bit mask for layer 4
#define LAYER_5 (1 << LAYER_N_5) ///< bit mask for layer 5
#define LAYER_6 (1 << LAYER_N_6) ///< bit mask for layer 6
#define LAYER_7 (1 << LAYER_N_7) ///< bit mask for layer 7
#define LAYER_8 (1 << LAYER_N_8) ///< bit mask for layer 8
#define LAYER_9 (1 << LAYER_N_9) ///< bit mask for layer 9
#define LAYER_10 (1 << LAYER_N_10) ///< bit mask for layer 10
#define LAYER_11 (1 << LAYER_N_11) ///< bit mask for layer 11
#define LAYER_12 (1 << LAYER_N_12) ///< bit mask for layer 12
#define LAYER_13 (1 << LAYER_N_13) ///< bit mask for layer 13
#define LAYER_14 (1 << LAYER_N_14) ///< bit mask for layer 14
#define LAYER_15 (1 << LAYER_N_15) ///< bit mask for layer 15
#define CMP_LAYER (1 << LAYER_N_FRONT) ///< bit mask for component layer
#define ADHESIVE_LAYER_CU (1 << ADHESIVE_N_CU)
#define ADHESIVE_LAYER_CMP (1 << ADHESIVE_N_CMP)
#define SOLDERPASTE_LAYER_CU (1 << SOLDERPASTE_N_CU)
#define SOLDERPASTE_LAYER_CMP (1 << SOLDERPASTE_N_CMP)
#define SILKSCREEN_LAYER_CU (1 << SILKSCREEN_N_CU)
#define SILKSCREEN_LAYER_CMP (1 << SILKSCREEN_N_CMP)
#define SOLDERMASK_LAYER_CU (1 << SOLDERMASK_N_CU)
#define SOLDERMASK_LAYER_CMP (1 << SOLDERMASK_N_CMP)
#define DRAW_LAYER (1 << DRAW_N)
#define COMMENT_LAYER (1 << COMMENT_N)
#define ECO1_LAYER (1 << ECO1_N)
#define ECO2_LAYER (1 << ECO2_N)
#define EDGE_LAYER (1 << EDGE_N)
#define FIRST_NON_COPPER_LAYER ADHESIVE_N_CU
#define LAST_NON_COPPER_LAYER EDGE_N
// extra bits 0xE0000000
/* Helpful global layers mask : */
#define ALL_LAYERS 0x1FFFFFFF // Pcbnew used 29 layers
#define FULL_LAYERS 0xFFFFFFFF // Gerbview used 32 layers
#define ALL_NO_CU_LAYERS 0x1FFF0000
#define ALL_CU_LAYERS 0x0000FFFF
#define INTERNAL_LAYERS 0x00007FFE
#define EXTERNAL_LAYERS 0x00008001
#define ALL_LAYERS 0x1FFFFFFF // Pcbnew used 29 layers
#define FULL_LAYERS 0xFFFFFFFF // Gerbview used 32 layers
#define ALL_NO_CU_LAYERS 0x1FFF0000
#define ALL_CU_LAYERS 0x0000FFFF
#define INTERNAL_LAYERS 0x00007FFE
#define EXTERNAL_LAYERS 0x00008001
class NETINFO_ITEM;
class MARKER_PCB;
......@@ -163,8 +161,7 @@ inline bool IsValidLayerIndex( int aLayerIndex )
*/
inline bool IsValidCopperLayerIndex( int aLayerIndex )
{
return aLayerIndex >= FIRST_COPPER_LAYER
&& aLayerIndex <= LAST_COPPER_LAYER;
return aLayerIndex >= FIRST_COPPER_LAYER && aLayerIndex <= LAST_COPPER_LAYER;
}
/**
......@@ -272,5 +269,4 @@ public:
DISPLAY_OPTIONS();
};
#endif /* PCBSTRUCT_H */
#endif // PCBSTRUCT_H
......@@ -429,10 +429,10 @@ int WinEDA_PcbFrame::GenPlaceBoard()
msg.Printf( wxT( "%d" ), Board.m_MemSize / 1024 );
Affiche_1_Parametre( this, 24, wxT( "Mem(Kb)" ), msg, CYAN );
Route_Layer_BOTTOM = CMP_N;
Route_Layer_BOTTOM = LAYER_N_FRONT;
if( Nb_Sides == TWO_SIDES )
Route_Layer_BOTTOM = COPPER_LAYER_N;
Route_Layer_TOP = CMP_N;
Route_Layer_BOTTOM = LAYER_N_BACK;
Route_Layer_TOP = LAYER_N_FRONT;
/* Place the edge layer segments */
PtStruct = GetBoard()->m_Drawings;
......@@ -525,9 +525,9 @@ void WinEDA_PcbFrame::GenModuleOnBoard( MODULE* Module )
fy = GetBoard()->m_BoundaryBox.GetBottom();
masque_layer = 0;
if( Module->GetLayer() == CMP_N )
if( Module->GetLayer() == LAYER_N_FRONT )
masque_layer = CMP_LAYER;
if( Module->GetLayer() == COPPER_LAYER_N )
if( Module->GetLayer() == LAYER_N_BACK )
masque_layer = CUIVRE_LAYER;
TraceFilledRectangle( GetBoard(), ox, oy, fx, fy, masque_layer,
......@@ -603,7 +603,7 @@ int WinEDA_PcbFrame::RecherchePlacementModule( MODULE* Module, wxDC* DC )
{
D_PAD* Pad; int masque_otherlayer;
masque_otherlayer = CUIVRE_LAYER;
if( Module->GetLayer() == COPPER_LAYER_N )
if( Module->GetLayer() == LAYER_N_BACK )
masque_otherlayer = CMP_LAYER;
for( Pad = Module->m_Pads; Pad != NULL; Pad = Pad->Next() )
......@@ -810,7 +810,7 @@ int TstModuleOnBoard( BOARD* Pcb, MODULE* Module, bool TstOtherSide )
int error, Penalite, marge, side, otherside;
side = TOP; otherside = BOTTOM;
if( Module->GetLayer() == COPPER_LAYER_N )
if( Module->GetLayer() == LAYER_N_BACK )
{
side = BOTTOM; otherside = TOP;
}
......
......@@ -47,7 +47,7 @@ void WinEDA_PcbFrame::Autoroute( wxDC* DC, int mode )
else
{
Route_Layer_TOP =
Route_Layer_BOTTOM = COPPER_LAYER_N;
Route_Layer_BOTTOM = LAYER_N_BACK;
}
switch( mode )
......
......@@ -167,14 +167,14 @@ void WinEDA_BasePcbFrame::SwitchLayer( wxDC* DC, int layer )
// Copper layers cannot be selected unconditionally; how many
// of those layers are currently enabled needs to be checked.
if( (layer >= FIRST_COPPER_LAYER) && (layer <= LAST_COPPER_LAYER) )
if( IsValidCopperLayerIndex( layer ) )
{
// If only one copper layer is enabled, the only such layer
// that can be selected to is the "Copper" layer (so the
// selection of any other copper layer is disregarded).
if( m_Pcb->m_BoardSettings->GetCopperLayerCount() < 2 )
{
if( layer != COPPER_LAYER_N )
if( layer != LAYER_N_BACK )
{
return;
}
......@@ -186,7 +186,7 @@ void WinEDA_BasePcbFrame::SwitchLayer( wxDC* DC, int layer )
// layers are also capable of being selected.
else
{
if( ( layer != COPPER_LAYER_N ) && ( layer != LAYER_CMP_N )
if( ( layer != LAYER_N_BACK ) && ( layer != LAYER_N_FRONT )
&& ( layer >= m_Pcb->m_BoardSettings->GetCopperLayerCount() - 1 ) )
{
return;
......
......@@ -38,7 +38,7 @@ BOARD::BOARD( EDA_BaseStruct* parent, WinEDA_BasePcbFrame* frame ) :
for( int layer = 0; layer < NB_COPPER_LAYERS; ++layer )
{
m_Layer[layer].m_Name = ReturnPcbLayerName( layer, true );
m_Layer[layer].m_Name = GetDefaultLayerName( layer );
m_Layer[layer].m_Type = LT_SIGNAL;
}
......@@ -180,6 +180,7 @@ int BOARD::GetCurrentMicroViaDrill()
}
wxString BOARD::GetLayerName( int aLayerIndex ) const
{
if( !IsValidLayerIndex( aLayerIndex ) )
......@@ -194,7 +195,53 @@ wxString BOARD::GetLayerName( int aLayerIndex ) const
return m_Layer[aLayerIndex].m_Name;
}
return ReturnPcbLayerName( aLayerIndex, true );
return GetDefaultLayerName( aLayerIndex );
}
wxString BOARD::GetDefaultLayerName( int aLayerNumber )
{
const wxChar* txt;
// These are only default layer names. For PCBNEW, the copper names
// may be over-ridden in the BOARD (*.brd) file.
// Use a switch to explicitly show the mapping more clearly
switch( aLayerNumber )
{
case LAYER_N_FRONT: txt = _( "Front" ); break;
case LAYER_N_2: txt = _( "Inner2" ); break;
case LAYER_N_3: txt = _( "Inner3" ); break;
case LAYER_N_4: txt = _( "Inner4" ); break;
case LAYER_N_5: txt = _( "Inner5" ); break;
case LAYER_N_6: txt = _( "Inner6" ); break;
case LAYER_N_7: txt = _( "Inner7" ); break;
case LAYER_N_8: txt = _( "Inner8" ); break;
case LAYER_N_9: txt = _( "Inner9" ); break;
case LAYER_N_10: txt = _( "Inner10" ); break;
case LAYER_N_11: txt = _( "Inner11" ); break;
case LAYER_N_12: txt = _( "Inner12" ); break;
case LAYER_N_13: txt = _( "Inner13" ); break;
case LAYER_N_14: txt = _( "Inner14" ); break;
case LAYER_N_15: txt = _( "Inner15" ); break;
case LAYER_N_BACK: txt = _( "Back" ); break;
case ADHESIVE_N_CU: txt = _( "Adhes_Back" ); break;
case ADHESIVE_N_CMP: txt = _( "Adhes_Front" ); break;
case SOLDERPASTE_N_CU: txt = _( "SoldP_Back" ); break;
case SOLDERPASTE_N_CMP: txt = _( "SoldP_Front" ); break;
case SILKSCREEN_N_CU: txt = _( "SilkS_Back" ); break;
case SILKSCREEN_N_CMP: txt = _( "SilkS_Front" ); break;
case SOLDERMASK_N_CU: txt = _( "Mask_Back" ); break;
case SOLDERMASK_N_CMP: txt = _( "Mask_Front" ); break;
case DRAW_N: txt = _( "Drawings" ); break;
case COMMENT_N: txt = _( "Comments" ); break;
case ECO1_N: txt = _( "Eco1" ); break;
case ECO2_N: txt = _( "Eco2" ); break;
case EDGE_N: txt = _( "PCB_Edges" ); break;
default: txt = _( "BAD INDEX" ); break;
}
return wxString( txt );
}
......
......@@ -148,6 +148,19 @@ public:
BOARD( EDA_BaseStruct* aParent, WinEDA_BasePcbFrame* frame );
~BOARD();
/**
* Function GetDefaultLayerName
* returns a default name of a PCB layer when given \a aLayerNumber. This
* function is static so it can be called without a BOARD instance. Use
* GetLayerName() if want the layer names of a specific BOARD, which could
* be different than the default if the user has renamed any copper layers.
*
* @param aLayerNumber is the layer number to fetch
* @return wxString - containing the layer name or "BAD INDEX" if aLayerNumber
* is not legal
*/
static wxString GetDefaultLayerName( int aLayerNumber );
/**
* Function GetPosition
* is here to satisfy BOARD_ITEM's requirements, but this implementation
......@@ -287,7 +300,7 @@ public:
* Function GetLayerName
* returns the name of the copper layer given by aLayerIndex.
*
* @param aLayerIndex A layer index, like COPPER_LAYER_N, etc.
* @param aLayerIndex A layer index, like LAYER_N_BACK, etc.
* @return wxString - the layer name.
*/
wxString GetLayerName( int aLayerIndex ) const;
......@@ -296,7 +309,7 @@ public:
* Function SetLayerName
* changes the name of the layer given by aLayerIndex.
*
* @param aLayerIndex A layer index, like COPPER_LAYER_N, etc.
* @param aLayerIndex A layer index, like LAYER_N_BACK, etc.
* @param aLayerName The new layer name
* @return bool - true if aLayerName was legal and unique amoung other
* layer names at other layer indices and aLayerIndex was within range, else false.
......@@ -307,7 +320,7 @@ public:
* Function GetLayerType
* returns the type of the copper layer given by aLayerIndex.
*
* @param aLayerIndex A layer index, like COPPER_LAYER_N, etc.
* @param aLayerIndex A layer index, like LAYER_N_BACK, etc.
* @return LAYER_T - the layer type, or LAYER_T(-1) if the
* index was out of range.
*/
......@@ -317,7 +330,7 @@ public:
* Function SetLayerName
* changes the name of the layer given by aLayerIndex.
*
* @param aLayerIndex A layer index, like COPPER_LAYER_N, etc.
* @param aLayerIndex A layer index, like LAYER_N_BACK, etc.
* @param aLayerType The new layer type.
* @return bool - true if aLayerType was legal and aLayerIndex was within range, else false.
*/
......
......@@ -123,8 +123,11 @@ void EDA_BoardDesignSettings::SetCopperLayerCount( int aNewLayerCount )
// ensure consistency with the m_EnabledLayers member
m_EnabledLayers &= ~ALL_CU_LAYERS;
m_EnabledLayers |= CUIVRE_LAYER;
if( m_CopperLayerCount > 1 )
m_EnabledLayers |= CMP_LAYER;
for( int ii = 1; ii < aNewLayerCount - 1; ii++ )
m_EnabledLayers |= 1 << ii;
}
......@@ -66,9 +66,9 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
if ( (pad->m_Masque_Layer & ALL_CU_LAYERS) == ALL_CU_LAYERS )
text << _("all copper layers");
else if( (pad->m_Masque_Layer & CUIVRE_LAYER) == CUIVRE_LAYER )
text << aPcb->GetLayerName( COPPER_LAYER_N ).Trim();
text << aPcb->GetLayerName( LAYER_N_BACK ).Trim();
else if( (pad->m_Masque_Layer & CMP_LAYER) == CMP_LAYER )
text << aPcb->GetLayerName( LAYER_CMP_N );
text << aPcb->GetLayerName( LAYER_N_FRONT );
else text << _("???");
text << _( ") of " ) << ( (MODULE*) GetParent() )->GetReference();
break;
......
......@@ -30,7 +30,7 @@ MODULE::MODULE( BOARD* parent ) :
BOARD_ITEM( parent, TYPE_MODULE )
{
m_Attributs = MOD_DEFAULT;
m_Layer = CMP_N;
m_Layer = LAYER_N_FRONT;
m_Orient = 0;
m_ModuleStatus = 0;
flag = 0;
......
......@@ -23,12 +23,12 @@ int ChangeSideNumLayer( int oldlayer )
switch( oldlayer )
{
case COPPER_LAYER_N:
newlayer = CMP_N;
case LAYER_N_BACK:
newlayer = LAYER_N_FRONT;
break;
case CMP_N:
newlayer = COPPER_LAYER_N;
case LAYER_N_FRONT:
newlayer = LAYER_N_BACK;
break;
case SILKSCREEN_N_CU:
......@@ -198,14 +198,14 @@ void MODULE::Flip(const wxPoint& aCentre )
pt_texte->SetLayer( GetLayer() );
pt_texte->SetLayer( ChangeSideNumLayer( pt_texte->GetLayer() ) );
if( GetLayer() == COPPER_LAYER_N )
if( GetLayer() == LAYER_N_BACK )
pt_texte->SetLayer( SILKSCREEN_N_CU );
if( GetLayer() == CMP_N )
if( GetLayer() == LAYER_N_FRONT )
pt_texte->SetLayer( SILKSCREEN_N_CMP );
if( (GetLayer() == SILKSCREEN_N_CU)
|| (GetLayer() == ADHESIVE_N_CU) || (GetLayer() == COPPER_LAYER_N) )
|| (GetLayer() == ADHESIVE_N_CU) || (GetLayer() == LAYER_N_BACK) )
pt_texte->m_Mirror = true;
/* Mirror value. */
......@@ -219,14 +219,14 @@ void MODULE::Flip(const wxPoint& aCentre )
pt_texte->SetLayer( GetLayer() );
pt_texte->SetLayer( ChangeSideNumLayer( pt_texte->GetLayer() ) );
if( GetLayer() == COPPER_LAYER_N )
if( GetLayer() == LAYER_N_BACK )
pt_texte->SetLayer( SILKSCREEN_N_CU );
if( GetLayer() == CMP_N )
if( GetLayer() == LAYER_N_FRONT )
pt_texte->SetLayer( SILKSCREEN_N_CMP );
if( (GetLayer() == SILKSCREEN_N_CU)
|| (GetLayer() == ADHESIVE_N_CU) || (GetLayer() == COPPER_LAYER_N) )
|| (GetLayer() == ADHESIVE_N_CU) || (GetLayer() == LAYER_N_BACK) )
pt_texte->m_Mirror = true;
/* Reverse mirror footprints. */
......@@ -266,15 +266,15 @@ void MODULE::Flip(const wxPoint& aCentre )
pt_texte->SetLayer( GetLayer() );
pt_texte->SetLayer( ChangeSideNumLayer( pt_texte->GetLayer() ) );
if( GetLayer() == COPPER_LAYER_N )
if( GetLayer() == LAYER_N_BACK )
pt_texte->SetLayer( SILKSCREEN_N_CU );
if( GetLayer() == CMP_N )
if( GetLayer() == LAYER_N_FRONT )
pt_texte->SetLayer( SILKSCREEN_N_CMP );
if( GetLayer() == SILKSCREEN_N_CU
|| GetLayer() == ADHESIVE_N_CU
|| GetLayer() == COPPER_LAYER_N )
|| GetLayer() == LAYER_N_BACK )
{
pt_texte->m_Mirror = true;
}
......
......@@ -540,20 +540,15 @@ bool D_PAD::Save( FILE* aFile ) const
void D_PAD::DisplayInfo( WinEDA_DrawFrame* frame )
{
int ii;
MODULE* module;
wxString Line;
MODULE* module;
wxString Line;
BOARD* board;
/* Pad messages */
static const wxString Msg_Pad_Shape[6] =
{ wxT( "??? " ), wxT( "Circ" ), wxT( "Rect" ), wxT( "Oval" ), wxT( "trap" ),
wxT( "spec" ) };
static const wxString Msg_Pad_Layer[9] =
{
wxT( "??? " ), wxT( "cmp " ), wxT( "cu " ), wxT( "cmp+cu " ),
wxT( "int " ), wxT( "cmp+int " ), wxT( "cu+int " ),
wxT( "all " ), wxT( "No copp" )
wxT( "??? " ), wxT( "Circ" ), wxT( "Rect" ), wxT( "Oval" ), wxT( "trap" ),
wxT( "spec" )
};
static const wxString Msg_Pad_Attribut[5] =
......@@ -570,6 +565,7 @@ void D_PAD::DisplayInfo( WinEDA_DrawFrame* frame )
ReturnStringPadName( Line );
frame->AppendMsgPanel( _( "RefP" ), Line, BROWN );
}
frame->AppendMsgPanel( _( "Net" ), m_Netname, DARKCYAN );
/* For test and debug only: display m_physical_connexion and
......@@ -580,85 +576,112 @@ void D_PAD::DisplayInfo( WinEDA_DrawFrame* frame )
frame->AppendMsgPanel( wxT( "L-P-Z" ), Line, DARKGREEN );
#endif
wxString LayerInfo;
board = GetBoard();
ii = 0;
if( m_Masque_Layer & CUIVRE_LAYER )
ii = 2;
if( m_Masque_Layer & CMP_LAYER )
ii += 1;
if( (m_Masque_Layer & ALL_CU_LAYERS) == ALL_CU_LAYERS )
ii = 7;
wxString layerInfo;
LayerInfo = Msg_Pad_Layer[ii];
if( (m_Masque_Layer & ALL_CU_LAYERS) == 0 )
if( (m_Masque_Layer & ALL_CU_LAYERS) == 0 ) // pad is not on any copper layers
{
if( m_Masque_Layer )
LayerInfo = Msg_Pad_Layer[8];
switch( m_Masque_Layer & ~ALL_CU_LAYERS )
{
case ADHESIVE_LAYER_CU:
LayerInfo = ReturnPcbLayerName( ADHESIVE_N_CU );
layerInfo = board->GetLayerName( ADHESIVE_N_CU );
break;
case ADHESIVE_LAYER_CMP:
LayerInfo = ReturnPcbLayerName( ADHESIVE_N_CMP );
layerInfo = board->GetLayerName( ADHESIVE_N_CMP );
break;
case SOLDERPASTE_LAYER_CU:
LayerInfo = ReturnPcbLayerName( SOLDERPASTE_N_CU );
layerInfo = board->GetLayerName( SOLDERPASTE_N_CU );
break;
case SOLDERPASTE_LAYER_CMP:
LayerInfo = ReturnPcbLayerName( SOLDERPASTE_N_CMP );
layerInfo = board->GetLayerName( SOLDERPASTE_N_CMP );
break;
case SILKSCREEN_LAYER_CU:
LayerInfo = ReturnPcbLayerName( SILKSCREEN_N_CU );
layerInfo = board->GetLayerName( SILKSCREEN_N_CU );
break;
case SILKSCREEN_LAYER_CMP:
LayerInfo = ReturnPcbLayerName( SILKSCREEN_N_CMP );
layerInfo = board->GetLayerName( SILKSCREEN_N_CMP );
break;
case SOLDERMASK_LAYER_CU:
LayerInfo = ReturnPcbLayerName( SOLDERMASK_N_CU );
layerInfo = board->GetLayerName( SOLDERMASK_N_CU );
break;
case SOLDERMASK_LAYER_CMP:
LayerInfo = ReturnPcbLayerName( SOLDERMASK_N_CMP );
layerInfo = board->GetLayerName( SOLDERMASK_N_CMP );
break;
case DRAW_LAYER:
LayerInfo = ReturnPcbLayerName( DRAW_N );
layerInfo = board->GetLayerName( DRAW_N );
break;
case COMMENT_LAYER:
LayerInfo = ReturnPcbLayerName( COMMENT_N );
layerInfo = board->GetLayerName( COMMENT_N );
break;
case ECO1_LAYER:
LayerInfo = ReturnPcbLayerName( ECO1_N );
layerInfo = board->GetLayerName( ECO1_N );
break;
case ECO2_LAYER:
LayerInfo = ReturnPcbLayerName( ECO2_N );
layerInfo = board->GetLayerName( ECO2_N );
break;
case EDGE_LAYER:
LayerInfo = ReturnPcbLayerName( EDGE_N );
layerInfo = board->GetLayerName( EDGE_N );
break;
default:
layerInfo = _( "Non-copper" );
break;
}
}
frame->AppendMsgPanel( _( "Layer" ), LayerInfo, DARKGREEN );
else
{
#define INTERIOR_COPPER (ALL_CU_LAYERS & ~(CUIVRE_LAYER | CMP_LAYER))
static const wxChar* andInternal = _( " & int" );
if( (m_Masque_Layer & (CUIVRE_LAYER | CMP_LAYER)) == CUIVRE_LAYER )
{
layerInfo = board->GetLayerName( LAYER_N_BACK );
if( m_Masque_Layer & INTERIOR_COPPER )
layerInfo += andInternal;
}
else if( (m_Masque_Layer & (CUIVRE_LAYER | CMP_LAYER)) == (CUIVRE_LAYER | CMP_LAYER) )
{
layerInfo = board->GetLayerName( LAYER_N_BACK ) + wxT(", ") +
board->GetLayerName( LAYER_N_FRONT );
if( m_Masque_Layer & INTERIOR_COPPER )
layerInfo += andInternal;
}
else if( (m_Masque_Layer & (CUIVRE_LAYER | CMP_LAYER)) == CMP_LAYER )
{
layerInfo = board->GetLayerName( LAYER_N_FRONT );
if( m_Masque_Layer & INTERIOR_COPPER )
layerInfo += andInternal;
}
else // necessarily true: if( m_Masque_Layer & INTERIOR_COPPER )
layerInfo = _( "internal" );
}
frame->AppendMsgPanel( _( "Layer" ), layerInfo, DARKGREEN );
int attribut = m_Attribut & 15;
if( attribut > 3 )
attribut = 3;
frame->AppendMsgPanel( Msg_Pad_Shape[m_PadShape],
Msg_Pad_Attribut[attribut], DARKGREEN );
......@@ -682,7 +705,6 @@ void D_PAD::DisplayInfo( WinEDA_DrawFrame* frame )
frame->AppendMsgPanel( _( "Drill X / Y" ), Line, RED );
}
int module_orient = module ? module->m_Orient : 0;
if( module_orient )
Line.Printf( wxT( "%3.1f(+%3.1f)" ),
......@@ -690,6 +712,7 @@ void D_PAD::DisplayInfo( WinEDA_DrawFrame* frame )
(float) module_orient / 10 );
else
Line.Printf( wxT( "%3.1f" ), (float) m_Orient / 10 );
frame->AppendMsgPanel( _( "Orient" ), Line, BLUE );
valeur_param( m_Pos.x, Line );
......
......@@ -274,7 +274,7 @@ void TEXTE_PCB::Flip(const wxPoint& aCentre )
{
m_Pos.y = aCentre.y - ( m_Pos.y - aCentre.y );
NEGATE( m_Orient );
if( ( GetLayer() == COPPER_LAYER_N ) || ( GetLayer() == CMP_N ) )
if( ( GetLayer() == LAYER_N_BACK ) || ( GetLayer() == LAYER_N_FRONT ) )
{
m_Mirror = not m_Mirror; /* inverse mirror */
}
......
......@@ -38,16 +38,16 @@ TEXTE_MODULE::TEXTE_MODULE( MODULE* parent, int text_type ) :
int moduleLayer = Module->GetLayer();
if( moduleLayer == COPPER_LAYER_N )
if( moduleLayer == LAYER_N_BACK )
SetLayer( SILKSCREEN_N_CU );
else if( moduleLayer == CMP_N )
else if( moduleLayer == LAYER_N_FRONT )
SetLayer( SILKSCREEN_N_CMP );
else
SetLayer( moduleLayer );
if( moduleLayer == SILKSCREEN_N_CU
|| moduleLayer == ADHESIVE_N_CU
|| moduleLayer == COPPER_LAYER_N )
|| moduleLayer == LAYER_N_BACK )
{
m_Mirror = true;
}
......@@ -144,9 +144,9 @@ int TEXTE_MODULE::ReadDescr( char* aLine, FILE* aFile, int* aLineNum )
layer = 0;
if( layer > LAST_NO_COPPER_LAYER )
layer = LAST_NO_COPPER_LAYER;
if( layer == COPPER_LAYER_N )
if( layer == LAYER_N_BACK )
layer = SILKSCREEN_N_CU;
else if( layer == CMP_N )
else if( layer == LAYER_N_FRONT )
layer = SILKSCREEN_N_CMP;
SetLayer( layer );
......@@ -376,13 +376,13 @@ void TEXTE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode,
color = g_DesignSettings.m_LayerColor[Module->GetLayer()];
if( Module->GetLayer() == COPPER_LAYER_N )
if( Module->GetLayer() == LAYER_N_BACK )
{
if( g_DesignSettings.IsElementVisible( MODULE_TEXT_CU_VISIBLE ) == false )
return;
color = g_ModuleTextCUColor;
}
else if( Module->GetLayer() == CMP_N )
else if( Module->GetLayer() == LAYER_N_FRONT )
{
if( g_DesignSettings.IsElementVisible( MODULE_TEXT_CMP_VISIBLE ) == false )
return;
......@@ -499,12 +499,12 @@ bool TEXTE_MODULE::IsOnLayer( int aLayer ) const
if( aLayer == GetParent()->GetLayer() )
return true;
if( aLayer == COPPER_LAYER_N )
if( aLayer == LAYER_N_BACK )
{
if( m_Layer==ADHESIVE_N_CU || m_Layer==SILKSCREEN_N_CU )
return true;
}
else if( aLayer == CMP_N )
else if( aLayer == LAYER_N_FRONT )
{
if( m_Layer==ADHESIVE_N_CMP || m_Layer==SILKSCREEN_N_CMP )
return true;
......
......@@ -373,8 +373,8 @@ void SEGVIA::SetLayerPair( int top_layer, int bottom_layer )
{
if( Shape() == VIA_THROUGH )
{
top_layer = LAYER_CMP_N;
bottom_layer = COPPER_LAYER_N;
top_layer = LAYER_N_FRONT;
bottom_layer = LAYER_N_BACK;
}
if( bottom_layer > top_layer )
......@@ -396,8 +396,8 @@ void SEGVIA::ReturnLayerPair( int* top_layer, int* bottom_layer ) const
* @param bottom_layer = pointer to the last layer (can be null)
*/
{
int b_layer = COPPER_LAYER_N;
int t_layer = LAYER_CMP_N;
int b_layer = LAYER_N_BACK;
int t_layer = LAYER_N_FRONT;
if( Shape() != VIA_THROUGH )
{
......@@ -828,7 +828,7 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
{
int ax, ay, bx, by;
if( IsOnLayer( COPPER_LAYER_N ) )
if( IsOnLayer( LAYER_N_BACK ) )
{
ax = rayon; ay = 0;
bx = drill_rayon; by = 0;
......
......@@ -96,9 +96,9 @@ void PCB_SCREEN::Init()
/*************************/
{
InitDatas();
m_Active_Layer = COPPER_LAYER_N; /* default active layer = bottom layer */
m_Route_Layer_TOP = CMP_N; /* default layers pair for vias (bottom to top) */
m_Route_Layer_BOTTOM = COPPER_LAYER_N;
m_Active_Layer = LAYER_N_BACK; /* default active layer = bottom layer */
m_Route_Layer_TOP = LAYER_N_FRONT; /* default layers pair for vias (bottom to top) */
m_Route_Layer_BOTTOM = LAYER_N_BACK;
m_Zoom = 150; /* a default value for zoom */
}
......@@ -123,8 +123,8 @@ bool PCB_SCREEN::IsMicroViaAcceptable( void )
return false; // Obvious..
if( copperlayercnt < 4 )
return false; // Only on multilayer boards..
if( ( m_Active_Layer == COPPER_LAYER_N )
|| ( m_Active_Layer == LAYER_CMP_N )
if( ( m_Active_Layer == LAYER_N_BACK )
|| ( m_Active_Layer == LAYER_N_FRONT )
|| ( m_Active_Layer == g_DesignSettings.GetCopperLayerCount( ) - 2 )
|| ( m_Active_Layer == LAYER_N_2 ) )
return true;
......
......@@ -251,10 +251,10 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
if( module )
{
if( m_Guide->IgnoreMTextsOnCopper() && module->GetLayer()==COPPER_LAYER_N )
if( m_Guide->IgnoreMTextsOnCopper() && module->GetLayer()==LAYER_N_BACK )
goto exit;
if( m_Guide->IgnoreMTextsOnCmp() && module->GetLayer()==LAYER_CMP_N )
if( m_Guide->IgnoreMTextsOnCmp() && module->GetLayer()==LAYER_N_FRONT )
goto exit;
}
break;
......@@ -271,10 +271,10 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
if( module ) // true from case TYPE_PAD, TYPE_TEXTE_MODULE, or TYPE_MODULE
{
if( m_Guide->IgnoreModulesOnCu() && module->GetLayer()==COPPER_LAYER_N )
if( m_Guide->IgnoreModulesOnCu() && module->GetLayer()==LAYER_N_BACK )
goto exit;
if( m_Guide->IgnoreModulesOnCmp() && module->GetLayer()==LAYER_CMP_N )
if( m_Guide->IgnoreModulesOnCmp() && module->GetLayer()==LAYER_N_FRONT )
goto exit;
}
......
......@@ -360,7 +360,7 @@ public:
*/
GENERAL_COLLECTORS_GUIDE( int aVisibleLayerMask, int aPreferredLayer )
{
m_PreferredLayer = LAYER_CMP_N;
m_PreferredLayer = LAYER_N_FRONT;
m_IgnorePreferredLayer = false;
m_LayerLocked = 0;
m_LayerVisible = aVisibleLayerMask;
......
......@@ -130,12 +130,12 @@ void dialog_copper_zone::OnInitDialog( wxInitDialogEvent& event )
int layer_cnt = board->GetCopperLayerCount();
for( int ii = 0; ii < board->GetCopperLayerCount(); ii++ )
{
int layer_number = COPPER_LAYER_N;
int layer_number = LAYER_N_BACK;
if( layer_cnt <= 1 || ii < layer_cnt - 1 )
layer_number = ii;
else if( ii == layer_cnt - 1 )
layer_number = LAYER_CMP_N;
layer_number = LAYER_N_FRONT;
m_LayerId[ii] = layer_number;
......
......@@ -64,7 +64,7 @@ void DIALOG_MODULE_BOARD_EDITOR::InitBoardProperties()
AddUnitSymbol( *YPositionStatic, g_UnitMetric );
m_LayerCtrl->SetSelection(
(m_CurrentModule->GetLayer() == COPPER_LAYER_N) ? 1 : 0 );
(m_CurrentModule->GetLayer() == LAYER_N_BACK) ? 1 : 0 );
bool select = FALSE;
switch( m_CurrentModule->m_Orient )
......@@ -469,10 +469,10 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event )
if( m_LayerCtrl->GetSelection() == 0 ) // layer req = COMPONENT
{
if( m_CurrentModule->GetLayer() == COPPER_LAYER_N )
if( m_CurrentModule->GetLayer() == LAYER_N_BACK )
change_layer = TRUE;
}
else if( m_CurrentModule->GetLayer() == CMP_N )
else if( m_CurrentModule->GetLayer() == LAYER_N_FRONT )
change_layer = TRUE;
if( change_layer )
......
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 1992-2009 Isaac Marino Bavaresco, isaacbavaresco@yahoo.com.br
* Copyright (C) 2009 Isaac Marino Bavaresco, isaacbavaresco@yahoo.com.br
* Copyright (C) 2009 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-2009 Kicad Developers, see change_log.txt for contributors.
* Copyright (C) 2009 Kicad Developers, see change_log.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
......@@ -36,25 +36,8 @@
#include "pcbnew_id.h"
#include "dialog_layers_setup2.h"
#include "wx/generic/gridctrl.h"
// Fields Positions on layer grid
#define LAYERS_GRID_NAME_POSITION 0
#define LAYERS_GRID_ENABLED_POSITION 1
#define LAYERS_GRID_TYPE_POSITION 2
// Define as 1 to show the layers in Pcbnew's original order
#define ORIGINAL_KICAD_LAYER_ORDER 0
// IDs for the dialog controls
enum
{
ID_LAYERNAMES = ( wxID_HIGHEST + 1 ),
ID_CHECKBOXES = ( ID_LAYERNAMES + NB_LAYERS ),
ID_LAYERTYPES = ( ID_CHECKBOXES + NB_LAYERS ),
};
#include "class_board_design_settings.h"
// We want our dialog to remember its previous screen position
......@@ -62,33 +45,23 @@ wxPoint DIALOG_LAYERS_SETUP::s_LastPos( -1, -1 );
wxSize DIALOG_LAYERS_SETUP::s_LastSize;
/*
// Layer order on the list panel
#if ORIGINAL_KICAD_LAYER_ORDER
// Kicad's original order
static const int LayerOrder[NB_LAYERS] =
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28 };
#else
// Real board order
static const int LayerOrder[NB_LAYERS] =
{ 17, 19, 21, 23, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4,
3, 2, 1, 0, 22, 20, 18, 16, 28, 27, 26, 25, 24 };
#endif
// This function translates from the dialog's layer order to Kicad's layer order.
static int GetlayerNumber( int Row )
static int GetLayerNumber( int aRow )
{
return LayerOrder[Row];
}
// Categories for coloring the rows backgrounds (0 means default dialog color).
static const int LayerCategories[NB_LAYERS] =
{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 2, 2, 2, 2, 5, 5, 5, 5, 4 };
......@@ -104,6 +77,7 @@ static const wxString LayerCategoriesNames[NB_LAYERS] =
_( "Auxiliary" ) // 5
};
// Names for the presets
static const wxString PresetsChoiceChoices[] =
{
......@@ -117,6 +91,8 @@ static const wxString PresetsChoiceChoices[] =
};
#define PRESETS_CHOICE_N_CHOICES DIM(m_PresetsChoiceChoices)
*/
// Bit masks (for all layers) for each defined preset
static const int Presets[] =
......@@ -153,14 +129,16 @@ static const int CopperMasks[] =
// Names for the types of copper layers
static const wxString LayerTypeChoiceChoices[] =
/*
static const wxString layerTypeChoiceChoices[] =
{
wxT("Signal"),
wxT("Power"),
wxT("Mixed"),
wxT("Jumper")
// these may not be translated since they come from Specctra.
wxT("signal"),
wxT("power"),
wxT("mixed"),
wxT("jumper")
};
#define LAYER_TYPE_CHOICE_N_CHOICES DIM(LayerTypeChoiceChoices)
*/
/***********************************************************************************/
......@@ -171,106 +149,237 @@ DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( WinEDA_PcbFrame* parent ) :
m_Parent = parent;
m_Pcb = m_Parent->GetBoard();
Init();
init();
SetAutoLayout( true );
Layout();
Center();
}
Center();
#define WX_COMMON_FLAGS (wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT)
m_sdbSizer2OK->SetFocus();
}
/********************************************************************/
void DIALOG_LAYERS_SETUP::Init()
void DIALOG_LAYERS_SETUP::init()
/********************************************************************/
{
// delete the junk controls, which were put in only for WYSIWYG design formatting purposes.
delete m_junkStaticText;
delete m_junkCheckBox;
delete m_junkChoice;
// We need a sizer to organize the controls inside the wxScrolledWindow.
// We must adjust manually the widths of the column captions and controls.
// temporary: set copper layer count without regard to enabled layer mask.
static const int copperCount[] = {1,2,4,6,8,10,12,14,16};
int col1Width;
{
// We create a wxStaticText just to query its size.
// The layer names are restricted to 20 characters, so 20 "W" is the widest possible text,
// plus 1 "W" to compensate for the wxTextCtrl border.
wxStaticText *text = new wxStaticText( this, wxID_ANY, wxT( "WWWWWWWWWWWWWWWWWWWWW" ));
col1Width = text->GetSize().x;
// It is important to delete the temporary text, or else it will appear in the top
// left corner of the dialog.
delete text;
}
m_CopperLayersChoice->SetSelection(1);
// The second column will have the width of its caption, because the check boxes are
// narrower than the caption.
int col2Width = m_LayerEnabledCaption->GetSize().x;
int boardsCopperCount = m_Pcb->GetCopperLayerCount();
// The third column width will be the widest of all of its controls.
// Inside the loop we will update col3Width if some control is wider.
int col3Width = m_LayerTypeCaption->GetSize().x;
D(printf("boardsCopperCount=%d\n", boardsCopperCount );)
// Iterate for every layer.
for( int i = 0; i < NB_LAYERS; i++ )
for( unsigned i = 0; i<sizeof(copperCount); ++i )
{
// Obtain the layer number which lies in this row.
int layerNumber = GetlayerNumber( i );
if( boardsCopperCount == copperCount[i] )
{
m_CopperLayersChoice->SetSelection(i);
break;
}
}
// Here we create the control for the first column (layer name).
if( layerNumber < NB_COPPER_LAYERS )
{
// For the copper layers we need a wxTextCtrl.
// Establish all the board's layer names into the dialog presentation, by
// obtaining them from BOARD::GetLayerName() which calls
// BOARD::GetDefaultLayerName() for non-coppers.
static const short nameIds[] = {
ID_ADHESFRONTNAME,
ID_SOLDPFRONTNAME,
ID_SILKSFRONTNAME,
ID_MASKFRONTNAME,
ID_FRONTNAME,
ID_INNER2NAME,
ID_INNER3NAME,
ID_INNER4NAME,
ID_INNER5NAME,
ID_INNER6NAME,
ID_INNER7NAME,
ID_INNER8NAME,
ID_INNER9NAME,
ID_INNER10NAME,
ID_INNER11NAME,
ID_INNER12NAME,
ID_INNER13NAME,
ID_INNER14NAME,
ID_INNER15NAME,
ID_BACKNAME,
ID_MASKBACKNAME,
ID_SILKSBACKNAME,
ID_SOLDPBACKNAME,
ID_ADHESBACKNAME,
ID_PCBEDGESNAME,
ID_ECO2NAME,
ID_ECO1NAME,
ID_COMMENTSNAME,
ID_DRAWINGSNAME,
};
for( unsigned i=0; i<DIM(nameIds); ++i )
{
int layer;
m_textCtrl1[layerNumber] = new wxTextCtrl( m_LayersListPanel, ID_LAYERNAMES+i, m_Pcb->GetLayerName( layerNumber ), wxDefaultPosition, wxDefaultSize, 0 );
m_textCtrl1[layerNumber]->SetMaxLength( 20 );
m_textCtrl1[layerNumber]->SetMinSize( wxSize( col1Width, -1 ));
m_LayerListFlexGridSizer->Add( m_textCtrl1[layerNumber], 1, WX_COMMON_FLAGS | wxEXPAND, 5 );
}
else
switch( nameIds[i] )
{
// For the non-copper layers we need a wxStaticText.
wxStaticText* layerName;
case ID_ADHESFRONTNAME: layer = ADHESIVE_N_CMP; break;
case ID_SOLDPFRONTNAME: layer = SOLDERPASTE_N_CMP; break;
case ID_SILKSFRONTNAME: layer = SILKSCREEN_N_CMP; break;
case ID_MASKFRONTNAME: layer = SOLDERMASK_N_CMP; break;
case ID_FRONTNAME: layer = LAYER_N_FRONT; break;
case ID_INNER2NAME: layer = LAYER_N_2; break;
case ID_INNER3NAME: layer = LAYER_N_3; break;
case ID_INNER4NAME: layer = LAYER_N_4; break;
case ID_INNER5NAME: layer = LAYER_N_5; break;
case ID_INNER6NAME: layer = LAYER_N_6; break;
case ID_INNER7NAME: layer = LAYER_N_7; break;
case ID_INNER8NAME: layer = LAYER_N_8; break;
case ID_INNER9NAME: layer = LAYER_N_9; break;
case ID_INNER10NAME: layer = LAYER_N_10; break;
case ID_INNER11NAME: layer = LAYER_N_11; break;
case ID_INNER12NAME: layer = LAYER_N_12; break;
case ID_INNER13NAME: layer = LAYER_N_13; break;
case ID_INNER14NAME: layer = LAYER_N_14; break;
case ID_INNER15NAME: layer = LAYER_N_15; break;
case ID_BACKNAME: layer = LAYER_N_BACK; break;
case ID_MASKBACKNAME: layer = SOLDERMASK_N_CU; break;
case ID_SILKSBACKNAME: layer = SILKSCREEN_N_CU; break;
case ID_SOLDPBACKNAME: layer = SOLDERPASTE_N_CU; break;
case ID_ADHESBACKNAME: layer = ADHESIVE_N_CU; break;
case ID_PCBEDGESNAME: layer = EDGE_N; break;
case ID_ECO2NAME: layer = ECO2_N; break;
case ID_ECO1NAME: layer = ECO1_N; break;
case ID_COMMENTSNAME: layer = COMMENT_N; break;
case ID_DRAWINGSNAME: layer = DRAW_N; break;
default: continue;
}
layerName = new wxStaticText( m_LayersListPanel, wxID_ANY, m_Pcb->GetLayerName( layerNumber ), wxDefaultPosition, wxDefaultSize, 0 );
layerName->Wrap( -1 );
layerName->SetMinSize( wxSize( col1Width, -1 ));
m_LayerListFlexGridSizer->Add( layerName, 1, WX_COMMON_FLAGS, 5 );
// both wxStaticText and wxTextControl are derived from wxControl,
// which has a SetLabel() function.
}
wxControl* ctl = (wxControl*) FindWindowById( nameIds[i] )
// Here we create the control for the second column (layer enabled), a wxCheckBox.
wxASSERT( ctl );
m_checkBox[layerNumber] = new wxCheckBox( m_LayersListPanel, ID_CHECKBOXES+i, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_checkBox[layerNumber]->SetMinSize( wxSize( col2Width, -1 ));
m_LayerListFlexGridSizer->Add( m_checkBox[layerNumber], 1, WX_COMMON_FLAGS | wxALIGN_CENTER_HORIZONTAL, 5 );
if( ctl )
ctl->SetLabel( m_Pcb->GetLayerName( layer ) );
}
// Here we create the control for the third column (layer type).
if( layerNumber < NB_COPPER_LAYERS )
{
// For the copper layers we need a wxChoice.
/* names only:
ID_ADHESFRONTNAME
ID_SOLDPFRONTNAME
ID_SILKSFRONTNAME
ID_MASKFRONTNAME
ID_FRONTNAME
ID_INNER2NAME
ID_INNER3NAME
ID_INNER4NAME
ID_INNER5NAME
ID_INNER6NAME
ID_INNER7NAME
ID_INNER8NAME
ID_INNER9NAME
ID_INNER10NAME
ID_INNER11NAME
ID_INNER12NAME
ID_INNER13NAME
ID_INNER14NAME
ID_INNER15NAME
ID_BACKNAME
ID_MASKBACKNAME
ID_SILKSBACKNAME
ID_SOLDPBACKNAME
ID_ADHESBACKNAME
ID_PCBEDGESNAME
ID_ECO2NAME
ID_ECO1NAME
ID_COMMENTSNAME
ID_DRAWINGSNAME
clean ids:
ID_ADHESFRONTNAME
ID_ADHESFRONTCHECKBOX
ID_SOLDPFRONTNAME
ID_SOLDPFRONTCHECKBOX
ID_SILKSFRONTNAME
ID_SILKSFRONTCHECKBOX
ID_MASKFRONTNAME
ID_MASKFRONTCHECKBOX
ID_FRONTNAME
ID_FRONTCHECKBOX
ID_FRONTCHOICE
ID_INNER2NAME
ID_INNER2CHECKBOX
ID_INNER2CHOICE
ID_INNER3NAME
ID_INNER3CHECKBOX
ID_INNER3CHOICE
ID_INNER4NAME
ID_INNER4CHECKBOX
ID_INNER4CHOICE
ID_INNER5NAME
ID_INNER5CHECKBOX
ID_INNER5CHOICE
ID_INNER6NAME
ID_INNER6CHECKBOX
ID_INNER6CHOICE
ID_INNER7NAME
ID_INNER7CHECKBOX
ID_INNER7CHOICE
ID_INNER8NAME
ID_INNER8CHECKBOX
ID_INNER8CHOICE
ID_INNER9NAME
ID_INNER9CHECKBOX
ID_INNER9CHOICE
ID_INNER10NAME
ID_INNER10CHECKBOX
ID_INNER10CHOICE
ID_INNER11NAME
ID_INNER11CHECKBOX
ID_INNER11CHOICE
ID_INNER12NAME
ID_INNER12CHECKBOX
ID_INNER12CHOICE
ID_INNER13NAME
ID_INNER13CHECKBOX
ID_INNER13CHOICE
ID_INNER14NAME
ID_INNER14CHECKBOX
ID_INNER14CHOICE
ID_INNER15NAME
ID_INNER15CHECKBOX
ID_INNER15CHOICE
ID_BACKNAME
ID_BACKCHECKBOX
ID_BACKCHOICE
ID_MASKBACKNAME
ID_SILKSBACKNAME
ID_SILKSBACKCHECKBOX
ID_SOLDPBACKNAME
ID_SOLDPBACKCHECKBOX
ID_ADHESBACKNAME
ID_ADHESBACKCHECKBOX
ID_PCBEDGESNAME
ID_PCBEDGESCHECKBOX
ID_ECO2NAME
ID_ECHO2CHECKBOX
ID_ECO1NAME
ID_ECO1CHECKBOX
ID_COMMENTSNAME
ID_COMMENTSCHECKBOX
ID_DRAWINGSNAME
ID_DRAWINGSCHECKBOX
*/
m_choice5[layerNumber] = new wxChoice( m_LayersListPanel, ID_LAYERTYPES+i, wxDefaultPosition, wxDefaultSize, LAYER_TYPE_CHOICE_N_CHOICES, LayerTypeChoiceChoices, 0 );
m_choice5[layerNumber]->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_choice5[layerNumber], 1, WX_COMMON_FLAGS, 5 );
col3Width = max( col3Width, m_choice5[layerNumber]->GetBestSize().x );
}
else
{
// For the non-copper layers we need a wxStaticText.
wxStaticText* staticText2;
staticText2 = new wxStaticText( m_LayersListPanel, wxID_ANY, LayerCategoriesNames[LayerCategories[layerNumber]], wxDefaultPosition, wxDefaultSize, 0 );
staticText2->Wrap( -1 );
m_LayerListFlexGridSizer->Add( staticText2, 1, WX_COMMON_FLAGS, 5 );
col3Width = max( col3Width, staticText2->GetBestSize().x );
}
}
// @todo overload a layout function so we can reposition the column titles,
// which should probably not go in a sizer of their own so that we do not have
......@@ -290,11 +399,11 @@ void DIALOG_LAYERS_SETUP::SetRoutableLayerStatus()
m_gridLayersProperties->SetColFormatBool( LAYERS_GRID_ENABLED_POSITION );
for( int ii = 0; ii < m_gridLayersProperties->GetNumberRows(); ii++ )
{
int layer = LAYER_CMP_N - ii;
int layer = LAYER_N_FRONT - ii;
wxString value = layer < (m_ActivesLayersCount - 1) ? wxT( "1" ) : wxT( "0" );
if( m_ActivesLayersCount > 1 && layer == LAYER_CMP_N )
if( m_ActivesLayersCount > 1 && layer == LAYER_N_FRONT )
value = wxT( "1" );
if( layer == COPPER_LAYER_N )
if( layer == LAYER_N_BACK )
value = wxT( "1" );
m_gridLayersProperties->SetCellValue( ii, LAYERS_GRID_ENABLED_POSITION, value );
m_gridLayersProperties->SetReadOnly( ii, LAYERS_GRID_ENABLED_POSITION );
......@@ -320,6 +429,17 @@ void DIALOG_LAYERS_SETUP::OnCancelButtonClick( wxCommandEvent& event )
void DIALOG_LAYERS_SETUP::OnOkButtonClick( wxCommandEvent& event )
/**************************************************************************/
{
// temporary code to set the copper layer count until the custom layer enabling is in place:
int copperLayerCount = m_CopperLayersChoice->GetSelection() * 2;
if( copperLayerCount <= 0 )
copperLayerCount = 1;
g_DesignSettings.SetCopperLayerCount( copperLayerCount );
m_Parent->ReCreateLayerBox( NULL );
/*
if( !TestDataValidity() )
{
......@@ -333,9 +453,9 @@ void DIALOG_LAYERS_SETUP::OnOkButtonClick( wxCommandEvent& event )
for( int ii = 0; ii < m_gridLayersProperties->GetNumberRows(); ii++ )
{
wxString layer_name = m_gridLayersProperties->GetCellValue( ii, LAYERS_GRID_NAME_POSITION );
if( layer_name != m_Pcb->GetLayerName( LAYER_CMP_N - ii ) )
if( layer_name != m_Pcb->GetLayerName( LAYER_N_FRONT - ii ) )
{
m_Pcb->SetLayerName( LAYER_CMP_N - ii, layer_name );
m_Pcb->SetLayerName( LAYER_N_FRONT - ii, layer_name );
}
}
......@@ -343,7 +463,7 @@ void DIALOG_LAYERS_SETUP::OnOkButtonClick( wxCommandEvent& event )
for( int ii = 0; ii < m_gridLayersProperties->GetNumberRows(); ii++ )
{
wxString txt = m_gridLayersProperties->GetCellValue( ii, LAYERS_GRID_TYPE_POSITION );
int layer = LAYER_CMP_N - ii;
int layer = LAYER_N_FRONT - ii;
for( int jj = 0; jj < 3; jj++ )
{
if( m_LayersTypeName[jj] == txt )
......
......@@ -4,9 +4,9 @@
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 1992-2009 Isaac Marino Bavaresco, isaacbavaresco@yahoo.com.br
* Copyright (C) 2009 Isaac Marino Bavaresco, isaacbavaresco@yahoo.com.br
* Copyright (C) 2009 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-2009 Kicad Developers, see change_log.txt for contributors.
* Copyright (C) 2009 Kicad Developers, see change_log.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
......@@ -38,28 +38,23 @@ private:
WinEDA_PcbFrame* m_Parent;
int m_ActivesLayersCount;
// int m_ActivesLayersCount;
BOARD* m_Pcb;
LAYER_T m_LayersType[4];
wxString m_LayersTypeName[4];
wxTextCtrl* m_textCtrl1[NB_COPPER_LAYERS];
wxCheckBox* m_checkBox[NB_LAYERS];
private:
wxChoice* m_choice5[NB_COPPER_LAYERS];
void init();
private:
void OnCancelButtonClick( wxCommandEvent& event );
void OnOkButtonClick( wxCommandEvent& event );
void OnLayerCountClick( wxCommandEvent& event );
// void OnLayerGridLeftClick( wxGridEvent& event ){ event.Skip(); }
// void OnLayerGridRighttClick( wxGridEvent& event ){ event.Skip(); }
void Init();
void SetRoutableLayerStatus( );
bool TestDataValidity();
public:
DIALOG_LAYERS_SETUP( WinEDA_PcbFrame* parent );
~DIALOG_LAYERS_SETUP( ) { };
......
......@@ -11,7 +11,7 @@
DIALOG_LAYERS_SETUP_BASE2::DIALOG_LAYERS_SETUP_BASE2( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
this->SetSizeHints( wxSize( 600,600 ), wxDefaultSize );
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
......@@ -20,9 +20,9 @@ DIALOG_LAYERS_SETUP_BASE2::DIALOG_LAYERS_SETUP_BASE2( wxWindow* parent, wxWindow
bChoicesSizer = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* sbPresetsSizer;
sbPresetsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Preset Layer Groupings") ), wxVERTICAL );
sbPresetsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Preset Layer Groupings") ), wxVERTICAL );
wxString m_PresetsChoiceChoices[] = { wxT("All Layers On"), wxT("Single Sided"), wxT("Single Sided, SMD on Back"), wxT("Two Layers, Parts on Front"), wxT("Two Layers, Parts on Both Faces"), wxT("Four Layers, Parts on Front"), wxT("Four Layers, Parts on Both Faces") };
wxString m_PresetsChoiceChoices[] = { _("All Layers On"), _("Single Sided"), _("Single Sided, SMD on Back"), _("Two Layers, Parts on Front"), _("Two Layers, Parts on Both Faces"), _("Four Layers, Parts on Front"), _("Four Layers, Parts on Both Faces") };
int m_PresetsChoiceNChoices = sizeof( m_PresetsChoiceChoices ) / sizeof( wxString );
m_PresetsChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PresetsChoiceNChoices, m_PresetsChoiceChoices, 0 );
m_PresetsChoice->SetSelection( 0 );
......@@ -31,37 +31,37 @@ DIALOG_LAYERS_SETUP_BASE2::DIALOG_LAYERS_SETUP_BASE2( wxWindow* parent, wxWindow
bChoicesSizer->Add( sbPresetsSizer, 2, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* sbCopperLayersSizer;
sbCopperLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Copper Layers") ), wxVERTICAL );
sbCopperLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Copper Layers") ), wxVERTICAL );
wxString m_CopperLayersChoiceChoices[] = { wxT("1"), wxT("2"), wxT("4"), wxT("6"), wxT("8"), wxT("10"), wxT("12"), wxT("14"), wxT("16") };
wxString m_CopperLayersChoiceChoices[] = { _("1"), _("2"), _("4"), _("6"), _("8"), _("10"), _("12"), _("14"), _("16") };
int m_CopperLayersChoiceNChoices = sizeof( m_CopperLayersChoiceChoices ) / sizeof( wxString );
m_CopperLayersChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_CopperLayersChoiceNChoices, m_CopperLayersChoiceChoices, 0 );
m_CopperLayersChoice->SetSelection( 0 );
sbCopperLayersSizer->Add( m_CopperLayersChoice, 0, wxEXPAND, 5 );
bChoicesSizer->Add( sbCopperLayersSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bChoicesSizer->Add( sbCopperLayersSizer, 1, wxALL|wxEXPAND, 5 );
bMainSizer->Add( bChoicesSizer, 0, wxEXPAND, 5 );
wxStaticBoxSizer* sbLayersSizer;
sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Layers") ), wxVERTICAL );
sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Layers") ), wxVERTICAL );
wxBoxSizer* bCaptionsSizer;
bCaptionsSizer = new wxBoxSizer( wxHORIZONTAL );
m_LayerNameCaption = new wxStaticText( this, wxID_ANY, wxT("Name"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE );
m_LayerNameCaption = new wxStaticText( this, wxID_ANY, _("Name"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE );
m_LayerNameCaption->Wrap( -1 );
m_LayerNameCaption->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
bCaptionsSizer->Add( m_LayerNameCaption, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_LayerEnabledCaption = new wxStaticText( this, wxID_ANY, wxT("Enabled"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE );
m_LayerEnabledCaption = new wxStaticText( this, wxID_ANY, _("Enabled"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE );
m_LayerEnabledCaption->Wrap( -1 );
m_LayerEnabledCaption->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
bCaptionsSizer->Add( m_LayerEnabledCaption, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_LayerTypeCaption = new wxStaticText( this, wxID_ANY, wxT("Type"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE );
m_LayerTypeCaption = new wxStaticText( this, wxID_ANY, _("Type"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE );
m_LayerTypeCaption->Wrap( -1 );
m_LayerTypeCaption->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
......@@ -74,29 +74,703 @@ DIALOG_LAYERS_SETUP_BASE2::DIALOG_LAYERS_SETUP_BASE2( wxWindow* parent, wxWindow
m_LayerListFlexGridSizer = new wxFlexGridSizer( 0, 3, 0, 0 );
m_LayerListFlexGridSizer->AddGrowableCol( 0 );
m_LayerListFlexGridSizer->AddGrowableCol( 1 );
m_LayerListFlexGridSizer->AddGrowableCol( 2 );
m_LayerListFlexGridSizer->SetFlexibleDirection( wxHORIZONTAL );
m_LayerListFlexGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_junkStaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
m_junkStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_junkStaticText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_AdhesFrontName = new wxStaticText( m_LayersListPanel, ID_ADHESFRONTNAME, _("Adhes_Front_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_AdhesFrontName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_AdhesFrontName, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_junkCheckBox = new wxCheckBox( m_LayersListPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_AdhesFrontPanel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_AdhesFrontPanel->SetBackgroundColour( wxColour( 236, 233, 236 ) );
m_LayerListFlexGridSizer->Add( m_junkCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxBoxSizer* bSizer6;
bSizer6 = new wxBoxSizer( wxVERTICAL );
wxArrayString m_junkChoiceChoices;
m_junkChoice = new wxChoice( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_junkChoiceChoices, 0 );
m_junkChoice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_junkChoice, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_AdhesFrontCheckBox = new wxCheckBox( m_AdhesFrontPanel, ID_ADHESFRONTCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_AdhesFrontCheckBox->SetToolTip( _("If you want an adhesive template for the front side of the board") );
bSizer6->Add( m_AdhesFrontCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_AdhesFrontPanel->SetSizer( bSizer6 );
m_AdhesFrontPanel->Layout();
bSizer6->Fit( m_AdhesFrontPanel );
m_LayerListFlexGridSizer->Add( m_AdhesFrontPanel, 1, wxEXPAND, 5 );
m_AdhesFrontStaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("Off-board, manufacturing"), wxDefaultPosition, wxDefaultSize, 0 );
m_AdhesFrontStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_AdhesFrontStaticText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_SoldPFrontName = new wxStaticText( m_LayersListPanel, ID_SOLDPFRONTNAME, _("SoldP_Front_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_SoldPFrontName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_SoldPFrontName, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_SoldPFrontPanel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_SoldPFrontPanel->SetBackgroundColour( wxColour( 236, 233, 236 ) );
wxBoxSizer* bSizer7;
bSizer7 = new wxBoxSizer( wxVERTICAL );
m_SoldPFrontCheckBox = new wxCheckBox( m_SoldPFrontPanel, ID_SOLDPFRONTCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SoldPFrontCheckBox->SetToolTip( _("If you want a solder paster layer for front side of the board") );
bSizer7->Add( m_SoldPFrontCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_SoldPFrontPanel->SetSizer( bSizer7 );
m_SoldPFrontPanel->Layout();
bSizer7->Fit( m_SoldPFrontPanel );
m_LayerListFlexGridSizer->Add( m_SoldPFrontPanel, 1, wxEXPAND, 5 );
m_SoldPFrontStaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("Off-board, manufacturing"), wxDefaultPosition, wxDefaultSize, 0 );
m_SoldPFrontStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_SoldPFrontStaticText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_SilkSFrontName = new wxStaticText( m_LayersListPanel, ID_SILKSFRONTNAME, _("SilkS_Front_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_SilkSFrontName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_SilkSFrontName, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_SilkSFrontPanel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_SilkSFrontPanel->SetBackgroundColour( wxColour( 255, 252, 235 ) );
wxBoxSizer* bSizer5;
bSizer5 = new wxBoxSizer( wxVERTICAL );
m_SilkSFrontCheckBox = new wxCheckBox( m_SilkSFrontPanel, ID_SILKSFRONTCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer5->Add( m_SilkSFrontCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_SilkSFrontPanel->SetSizer( bSizer5 );
m_SilkSFrontPanel->Layout();
bSizer5->Fit( m_SilkSFrontPanel );
m_LayerListFlexGridSizer->Add( m_SilkSFrontPanel, 1, wxEXPAND, 5 );
m_SilkSFrontStaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("On-board, non-copper"), wxDefaultPosition, wxDefaultSize, 0 );
m_SilkSFrontStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_SilkSFrontStaticText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_MaskFrontName = new wxStaticText( m_LayersListPanel, ID_MASKFRONTNAME, _("Mask_Front_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_MaskFrontName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_MaskFrontName, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_MaskFrontPanel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_MaskFrontPanel->SetBackgroundColour( wxColour( 255, 252, 235 ) );
wxBoxSizer* bSizer8;
bSizer8 = new wxBoxSizer( wxVERTICAL );
m_MaskFrontCheckBox = new wxCheckBox( m_MaskFrontPanel, ID_MASKFRONTCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer8->Add( m_MaskFrontCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_MaskFrontPanel->SetSizer( bSizer8 );
m_MaskFrontPanel->Layout();
bSizer8->Fit( m_MaskFrontPanel );
m_LayerListFlexGridSizer->Add( m_MaskFrontPanel, 1, wxEXPAND, 5 );
m_MaskFrontStaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("On-board, non-copper"), wxDefaultPosition, wxDefaultSize, 0 );
m_MaskFrontStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_MaskFrontStaticText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_FrontName = new wxTextCtrl( m_LayersListPanel, ID_FRONTNAME, _("Front"), wxDefaultPosition, wxDefaultSize, 0 );
m_FrontName->SetMaxLength( 20 );
m_LayerListFlexGridSizer->Add( m_FrontName, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_FrontPanel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_FrontPanel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bSizer9;
bSizer9 = new wxBoxSizer( wxVERTICAL );
m_FrontCheckBox = new wxCheckBox( m_FrontPanel, ID_FRONTCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer9->Add( m_FrontCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_FrontPanel->SetSizer( bSizer9 );
m_FrontPanel->Layout();
bSizer9->Fit( m_FrontPanel );
m_LayerListFlexGridSizer->Add( m_FrontPanel, 1, wxEXPAND, 5 );
wxString m_FrontChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_FrontChoiceNChoices = sizeof( m_FrontChoiceChoices ) / sizeof( wxString );
m_FrontChoice = new wxChoice( m_LayersListPanel, ID_FRONTCHOICE, wxDefaultPosition, wxDefaultSize, m_FrontChoiceNChoices, m_FrontChoiceChoices, 0 );
m_FrontChoice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_FrontChoice, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_Inner2Name = new wxTextCtrl( m_LayersListPanel, ID_INNER2NAME, _("Inner2"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Inner2Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner2Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Inner2Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bInner2Sizer;
bInner2Sizer = new wxBoxSizer( wxVERTICAL );
m_Inner2CheckBox = new wxCheckBox( m_Inner2Panel, ID_INNER2CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bInner2Sizer->Add( m_Inner2CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Inner2Panel->SetSizer( bInner2Sizer );
m_Inner2Panel->Layout();
bInner2Sizer->Fit( m_Inner2Panel );
m_LayerListFlexGridSizer->Add( m_Inner2Panel, 1, wxEXPAND, 5 );
wxString m_Inner2ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_Inner2ChoiceNChoices = sizeof( m_Inner2ChoiceChoices ) / sizeof( wxString );
m_Inner2Choice = new wxChoice( m_LayersListPanel, ID_INNER2CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner2ChoiceNChoices, m_Inner2ChoiceChoices, 0 );
m_Inner2Choice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_Inner2Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner3Name = new wxTextCtrl( m_LayersListPanel, ID_INNER3NAME, _("Inner3"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Inner3Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner3Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Inner3Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bInner3Sizer;
bInner3Sizer = new wxBoxSizer( wxVERTICAL );
m_Inner3CheckBox = new wxCheckBox( m_Inner3Panel, ID_INNER3CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bInner3Sizer->Add( m_Inner3CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Inner3Panel->SetSizer( bInner3Sizer );
m_Inner3Panel->Layout();
bInner3Sizer->Fit( m_Inner3Panel );
m_LayerListFlexGridSizer->Add( m_Inner3Panel, 1, wxEXPAND, 5 );
wxString m_Inner3ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_Inner3ChoiceNChoices = sizeof( m_Inner3ChoiceChoices ) / sizeof( wxString );
m_Inner3Choice = new wxChoice( m_LayersListPanel, ID_INNER3CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner3ChoiceNChoices, m_Inner3ChoiceChoices, 0 );
m_Inner3Choice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_Inner3Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner4Name = new wxTextCtrl( m_LayersListPanel, ID_INNER4NAME, _("Inner4"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Inner4Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner4Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Inner4Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bInner4Sizer;
bInner4Sizer = new wxBoxSizer( wxVERTICAL );
m_Inner4CheckBox = new wxCheckBox( m_Inner4Panel, ID_INNER4CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bInner4Sizer->Add( m_Inner4CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Inner4Panel->SetSizer( bInner4Sizer );
m_Inner4Panel->Layout();
bInner4Sizer->Fit( m_Inner4Panel );
m_LayerListFlexGridSizer->Add( m_Inner4Panel, 1, wxEXPAND, 5 );
wxString m_Inner4ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_Inner4ChoiceNChoices = sizeof( m_Inner4ChoiceChoices ) / sizeof( wxString );
m_Inner4Choice = new wxChoice( m_LayersListPanel, ID_INNER4CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner4ChoiceNChoices, m_Inner4ChoiceChoices, 0 );
m_Inner4Choice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_Inner4Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner5Name = new wxTextCtrl( m_LayersListPanel, ID_INNER5NAME, _("Inner5"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Inner5Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner5Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Inner5Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bInner5Sizer;
bInner5Sizer = new wxBoxSizer( wxVERTICAL );
m_Inner5CheckBox = new wxCheckBox( m_Inner5Panel, ID_INNER5CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bInner5Sizer->Add( m_Inner5CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Inner5Panel->SetSizer( bInner5Sizer );
m_Inner5Panel->Layout();
bInner5Sizer->Fit( m_Inner5Panel );
m_LayerListFlexGridSizer->Add( m_Inner5Panel, 1, wxEXPAND, 5 );
wxString m_Inner5ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_Inner5ChoiceNChoices = sizeof( m_Inner5ChoiceChoices ) / sizeof( wxString );
m_Inner5Choice = new wxChoice( m_LayersListPanel, ID_INNER5CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner5ChoiceNChoices, m_Inner5ChoiceChoices, 0 );
m_Inner5Choice->SetSelection( 3 );
m_LayerListFlexGridSizer->Add( m_Inner5Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner6Name = new wxTextCtrl( m_LayersListPanel, ID_INNER6NAME, _("Inner6"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Inner6Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner6Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Inner6Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bInner6Sizer;
bInner6Sizer = new wxBoxSizer( wxVERTICAL );
m_Inner6CheckBox = new wxCheckBox( m_Inner6Panel, ID_INNER6CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bInner6Sizer->Add( m_Inner6CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Inner6Panel->SetSizer( bInner6Sizer );
m_Inner6Panel->Layout();
bInner6Sizer->Fit( m_Inner6Panel );
m_LayerListFlexGridSizer->Add( m_Inner6Panel, 1, wxEXPAND, 5 );
wxString m_Inner6ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_Inner6ChoiceNChoices = sizeof( m_Inner6ChoiceChoices ) / sizeof( wxString );
m_Inner6Choice = new wxChoice( m_LayersListPanel, ID_INNER6CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner6ChoiceNChoices, m_Inner6ChoiceChoices, 0 );
m_Inner6Choice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_Inner6Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner7Name = new wxTextCtrl( m_LayersListPanel, ID_INNER7NAME, _("Inner7"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Inner7Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner7Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Inner7Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bInner7Sizer;
bInner7Sizer = new wxBoxSizer( wxVERTICAL );
m_Inner7CheckBox = new wxCheckBox( m_Inner7Panel, ID_INNER7CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bInner7Sizer->Add( m_Inner7CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Inner7Panel->SetSizer( bInner7Sizer );
m_Inner7Panel->Layout();
bInner7Sizer->Fit( m_Inner7Panel );
m_LayerListFlexGridSizer->Add( m_Inner7Panel, 1, wxEXPAND, 5 );
wxString m_Inner7ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_Inner7ChoiceNChoices = sizeof( m_Inner7ChoiceChoices ) / sizeof( wxString );
m_Inner7Choice = new wxChoice( m_LayersListPanel, ID_INNER7CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner7ChoiceNChoices, m_Inner7ChoiceChoices, 0 );
m_Inner7Choice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_Inner7Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner8Name = new wxTextCtrl( m_LayersListPanel, ID_INNER8NAME, _("Inner8"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Inner8Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner8Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Inner8Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bInner8Sizer;
bInner8Sizer = new wxBoxSizer( wxVERTICAL );
m_Inner8CheckBox = new wxCheckBox( m_Inner8Panel, ID_INNER8CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bInner8Sizer->Add( m_Inner8CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Inner8Panel->SetSizer( bInner8Sizer );
m_Inner8Panel->Layout();
bInner8Sizer->Fit( m_Inner8Panel );
m_LayerListFlexGridSizer->Add( m_Inner8Panel, 1, wxEXPAND, 5 );
wxString m_Inner8ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_Inner8ChoiceNChoices = sizeof( m_Inner8ChoiceChoices ) / sizeof( wxString );
m_Inner8Choice = new wxChoice( m_LayersListPanel, ID_INNER8CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner8ChoiceNChoices, m_Inner8ChoiceChoices, 0 );
m_Inner8Choice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_Inner8Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner9Name = new wxTextCtrl( m_LayersListPanel, ID_INNER9NAME, _("Inner9"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Inner9Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner9Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Inner9Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bInner9Sizer;
bInner9Sizer = new wxBoxSizer( wxVERTICAL );
m_Inner9CheckBox = new wxCheckBox( m_Inner9Panel, ID_INNER9CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bInner9Sizer->Add( m_Inner9CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Inner9Panel->SetSizer( bInner9Sizer );
m_Inner9Panel->Layout();
bInner9Sizer->Fit( m_Inner9Panel );
m_LayerListFlexGridSizer->Add( m_Inner9Panel, 1, wxEXPAND, 5 );
wxString m_Inner9ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_Inner9ChoiceNChoices = sizeof( m_Inner9ChoiceChoices ) / sizeof( wxString );
m_Inner9Choice = new wxChoice( m_LayersListPanel, ID_INNER9CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner9ChoiceNChoices, m_Inner9ChoiceChoices, 0 );
m_Inner9Choice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_Inner9Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner10Name = new wxTextCtrl( m_LayersListPanel, ID_INNER10NAME, _("Inner10"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Inner10Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner10Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Inner10Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bInner10Sizer;
bInner10Sizer = new wxBoxSizer( wxVERTICAL );
m_Inner10CheckBox = new wxCheckBox( m_Inner10Panel, ID_INNER10CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bInner10Sizer->Add( m_Inner10CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Inner10Panel->SetSizer( bInner10Sizer );
m_Inner10Panel->Layout();
bInner10Sizer->Fit( m_Inner10Panel );
m_LayerListFlexGridSizer->Add( m_Inner10Panel, 1, wxEXPAND, 5 );
wxString m_Inner10ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_Inner10ChoiceNChoices = sizeof( m_Inner10ChoiceChoices ) / sizeof( wxString );
m_Inner10Choice = new wxChoice( m_LayersListPanel, ID_INNER10CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner10ChoiceNChoices, m_Inner10ChoiceChoices, 0 );
m_Inner10Choice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_Inner10Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner11Name = new wxTextCtrl( m_LayersListPanel, ID_INNER11NAME, _("Inner11"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Inner11Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner11Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Inner11Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bInner11Sizer;
bInner11Sizer = new wxBoxSizer( wxVERTICAL );
m_Inner11CheckBox = new wxCheckBox( m_Inner11Panel, ID_INNER11CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bInner11Sizer->Add( m_Inner11CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Inner11Panel->SetSizer( bInner11Sizer );
m_Inner11Panel->Layout();
bInner11Sizer->Fit( m_Inner11Panel );
m_LayerListFlexGridSizer->Add( m_Inner11Panel, 1, wxEXPAND, 5 );
wxString m_Inner11ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_Inner11ChoiceNChoices = sizeof( m_Inner11ChoiceChoices ) / sizeof( wxString );
m_Inner11Choice = new wxChoice( m_LayersListPanel, ID_INNER11CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner11ChoiceNChoices, m_Inner11ChoiceChoices, 0 );
m_Inner11Choice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_Inner11Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner12Name = new wxTextCtrl( m_LayersListPanel, ID_INNER12NAME, _("Inner12"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Inner12Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner12Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Inner12Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bInner12Sizer;
bInner12Sizer = new wxBoxSizer( wxVERTICAL );
m_Inner12CheckBox = new wxCheckBox( m_Inner12Panel, ID_INNER12CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bInner12Sizer->Add( m_Inner12CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Inner12Panel->SetSizer( bInner12Sizer );
m_Inner12Panel->Layout();
bInner12Sizer->Fit( m_Inner12Panel );
m_LayerListFlexGridSizer->Add( m_Inner12Panel, 1, wxEXPAND, 5 );
wxString m_Inner12ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_Inner12ChoiceNChoices = sizeof( m_Inner12ChoiceChoices ) / sizeof( wxString );
m_Inner12Choice = new wxChoice( m_LayersListPanel, ID_INNER12CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner12ChoiceNChoices, m_Inner12ChoiceChoices, 0 );
m_Inner12Choice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_Inner12Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner13Name = new wxTextCtrl( m_LayersListPanel, ID_INNER13NAME, _("Inner13"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Inner13Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner13Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Inner13Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bInner13Sizer;
bInner13Sizer = new wxBoxSizer( wxVERTICAL );
m_Inner13CheckBox = new wxCheckBox( m_Inner13Panel, ID_INNER13CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bInner13Sizer->Add( m_Inner13CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Inner13Panel->SetSizer( bInner13Sizer );
m_Inner13Panel->Layout();
bInner13Sizer->Fit( m_Inner13Panel );
m_LayerListFlexGridSizer->Add( m_Inner13Panel, 1, wxEXPAND, 5 );
wxString m_Inner13ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_Inner13ChoiceNChoices = sizeof( m_Inner13ChoiceChoices ) / sizeof( wxString );
m_Inner13Choice = new wxChoice( m_LayersListPanel, ID_INNER13CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner13ChoiceNChoices, m_Inner13ChoiceChoices, 0 );
m_Inner13Choice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_Inner13Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner14Name = new wxTextCtrl( m_LayersListPanel, ID_INNER14NAME, _("Inner14"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Inner14Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner14Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Inner14Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bInner14Sizer;
bInner14Sizer = new wxBoxSizer( wxVERTICAL );
m_Inner14CheckBox = new wxCheckBox( m_Inner14Panel, ID_INNER14CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bInner14Sizer->Add( m_Inner14CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Inner14Panel->SetSizer( bInner14Sizer );
m_Inner14Panel->Layout();
bInner14Sizer->Fit( m_Inner14Panel );
m_LayerListFlexGridSizer->Add( m_Inner14Panel, 1, wxEXPAND, 5 );
wxString m_Inner14ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_Inner14ChoiceNChoices = sizeof( m_Inner14ChoiceChoices ) / sizeof( wxString );
m_Inner14Choice = new wxChoice( m_LayersListPanel, ID_INNER14CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner14ChoiceNChoices, m_Inner14ChoiceChoices, 0 );
m_Inner14Choice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_Inner14Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner15Name = new wxTextCtrl( m_LayersListPanel, ID_INNER15NAME, _("Inner15"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_Inner15Name, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_Inner15Panel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_Inner15Panel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bInner15Sizer;
bInner15Sizer = new wxBoxSizer( wxVERTICAL );
m_Inner15CheckBox = new wxCheckBox( m_Inner15Panel, ID_INNER15CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bInner15Sizer->Add( m_Inner15CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Inner15Panel->SetSizer( bInner15Sizer );
m_Inner15Panel->Layout();
bInner15Sizer->Fit( m_Inner15Panel );
m_LayerListFlexGridSizer->Add( m_Inner15Panel, 1, wxEXPAND, 5 );
wxString m_Inner15ChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_Inner15ChoiceNChoices = sizeof( m_Inner15ChoiceChoices ) / sizeof( wxString );
m_Inner15Choice = new wxChoice( m_LayersListPanel, ID_INNER15CHOICE, wxDefaultPosition, wxDefaultSize, m_Inner15ChoiceNChoices, m_Inner15ChoiceChoices, 0 );
m_Inner15Choice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_Inner15Choice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_BackName = new wxTextCtrl( m_LayersListPanel, ID_BACKNAME, _("Back"), wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_BackName, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_BackPanel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_BackPanel->SetBackgroundColour( wxColour( 236, 253, 216 ) );
wxBoxSizer* bBackSizer;
bBackSizer = new wxBoxSizer( wxVERTICAL );
m_BackCheckBox = new wxCheckBox( m_BackPanel, ID_BACKCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bBackSizer->Add( m_BackCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_BackPanel->SetSizer( bBackSizer );
m_BackPanel->Layout();
bBackSizer->Fit( m_BackPanel );
m_LayerListFlexGridSizer->Add( m_BackPanel, 1, wxEXPAND, 5 );
wxString m_BackChoiceChoices[] = { _("signal"), _("power"), _("mixed"), _("jumper") };
int m_BackChoiceNChoices = sizeof( m_BackChoiceChoices ) / sizeof( wxString );
m_BackChoice = new wxChoice( m_LayersListPanel, ID_BACKCHOICE, wxDefaultPosition, wxDefaultSize, m_BackChoiceNChoices, m_BackChoiceChoices, 0 );
m_BackChoice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_BackChoice, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_MaskBackName = new wxStaticText( m_LayersListPanel, ID_MASKBACKNAME, _("Mask_Back_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_MaskBackName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_MaskBackName, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel21 = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_panel21->SetBackgroundColour( wxColour( 255, 252, 235 ) );
wxBoxSizer* bSizer24;
bSizer24 = new wxBoxSizer( wxVERTICAL );
m_MaskBackCheckBox = new wxCheckBox( m_panel21, ID_MASKFRONTCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer24->Add( m_MaskBackCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel21->SetSizer( bSizer24 );
m_panel21->Layout();
bSizer24->Fit( m_panel21 );
m_LayerListFlexGridSizer->Add( m_panel21, 1, wxEXPAND, 5 );
m_MaskBackStaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("On-board, non-copper"), wxDefaultPosition, wxDefaultSize, 0 );
m_MaskBackStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_MaskBackStaticText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_SilkSBackName = new wxStaticText( m_LayersListPanel, ID_SILKSBACKNAME, _("SilkS_Back_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_SilkSBackName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_SilkSBackName, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel22 = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_panel22->SetBackgroundColour( wxColour( 255, 252, 235 ) );
wxBoxSizer* bSizer25;
bSizer25 = new wxBoxSizer( wxVERTICAL );
m_SilkSBackCheckBox = new wxCheckBox( m_panel22, ID_SILKSBACKCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer25->Add( m_SilkSBackCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel22->SetSizer( bSizer25 );
m_panel22->Layout();
bSizer25->Fit( m_panel22 );
m_LayerListFlexGridSizer->Add( m_panel22, 1, wxEXPAND, 5 );
m_SilkSBackStaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("On-board, non-copper"), wxDefaultPosition, wxDefaultSize, 0 );
m_SilkSBackStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_SilkSBackStaticText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_SoldPBackName = new wxStaticText( m_LayersListPanel, ID_SOLDPBACKNAME, _("SoldP_Back_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_SoldPBackName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_SoldPBackName, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel23 = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_panel23->SetBackgroundColour( wxColour( 236, 233, 236 ) );
wxBoxSizer* bSizer26;
bSizer26 = new wxBoxSizer( wxVERTICAL );
m_SoldPBackCheckBox = new wxCheckBox( m_panel23, ID_SOLDPBACKCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer26->Add( m_SoldPBackCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel23->SetSizer( bSizer26 );
m_panel23->Layout();
bSizer26->Fit( m_panel23 );
m_LayerListFlexGridSizer->Add( m_panel23, 1, wxEXPAND, 5 );
m_SoldPBackStaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("Off-board, manufacturing"), wxDefaultPosition, wxDefaultSize, 0 );
m_SoldPBackStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_SoldPBackStaticText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_AdhesBackName = new wxStaticText( m_LayersListPanel, ID_ADHESBACKNAME, _("Adhes_Back_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_AdhesBackName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_AdhesBackName, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel24 = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_panel24->SetBackgroundColour( wxColour( 236, 233, 236 ) );
wxBoxSizer* bSizer27;
bSizer27 = new wxBoxSizer( wxVERTICAL );
m_AdhesBackCheckBox = new wxCheckBox( m_panel24, ID_ADHESBACKCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer27->Add( m_AdhesBackCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel24->SetSizer( bSizer27 );
m_panel24->Layout();
bSizer27->Fit( m_panel24 );
m_LayerListFlexGridSizer->Add( m_panel24, 1, wxEXPAND, 5 );
m_AdhesBackStaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("Off-board, manufacturing"), wxDefaultPosition, wxDefaultSize, 0 );
m_AdhesBackStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_AdhesBackStaticText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_PCBEdgesName = new wxStaticText( m_LayersListPanel, ID_PCBEDGESNAME, _("PCB_Edges_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_PCBEdgesName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_PCBEdgesName, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel25 = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_panel25->SetBackgroundColour( wxColour( 255, 253, 216 ) );
wxBoxSizer* bSizer28;
bSizer28 = new wxBoxSizer( wxVERTICAL );
m_PCBEdgesCheckBox = new wxCheckBox( m_panel25, ID_PCBEDGESCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer28->Add( m_PCBEdgesCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel25->SetSizer( bSizer28 );
m_panel25->Layout();
bSizer28->Fit( m_panel25 );
m_LayerListFlexGridSizer->Add( m_panel25, 1, wxEXPAND, 5 );
m_PCBEdgesStaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("Board contour"), wxDefaultPosition, wxDefaultSize, 0 );
m_PCBEdgesStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_PCBEdgesStaticText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Eco2Name = new wxStaticText( m_LayersListPanel, ID_ECO2NAME, _("Eco2_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_Eco2Name->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_Eco2Name, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel26 = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_panel26->SetBackgroundColour( wxColour( 236, 233, 255 ) );
wxBoxSizer* bSizer29;
bSizer29 = new wxBoxSizer( wxVERTICAL );
m_Eco2CheckBox = new wxCheckBox( m_panel26, ID_ECHO2CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer29->Add( m_Eco2CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel26->SetSizer( bSizer29 );
m_panel26->Layout();
bSizer29->Fit( m_panel26 );
m_LayerListFlexGridSizer->Add( m_panel26, 1, wxEXPAND, 5 );
m_Eco2StaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("Auxiliary"), wxDefaultPosition, wxDefaultSize, 0 );
m_Eco2StaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_Eco2StaticText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_Eco1Name = new wxStaticText( m_LayersListPanel, ID_ECO1NAME, _("Eco1_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_Eco1Name->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_Eco1Name, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel27 = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_panel27->SetBackgroundColour( wxColour( 236, 233, 255 ) );
wxBoxSizer* bSizer30;
bSizer30 = new wxBoxSizer( wxVERTICAL );
m_Eco1CheckBox = new wxCheckBox( m_panel27, ID_ECO1CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer30->Add( m_Eco1CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel27->SetSizer( bSizer30 );
m_panel27->Layout();
bSizer30->Fit( m_panel27 );
m_LayerListFlexGridSizer->Add( m_panel27, 1, wxEXPAND, 5 );
m_Eco1StaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("Auxiliary"), wxDefaultPosition, wxDefaultSize, 0 );
m_Eco1StaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_Eco1StaticText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_CommentsName = new wxStaticText( m_LayersListPanel, ID_COMMENTSNAME, _("Comments_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_CommentsName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_CommentsName, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel28 = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_panel28->SetBackgroundColour( wxColour( 236, 233, 255 ) );
wxBoxSizer* bSizer31;
bSizer31 = new wxBoxSizer( wxVERTICAL );
m_CommentsCheckBox = new wxCheckBox( m_panel28, ID_COMMENTSCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer31->Add( m_CommentsCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel28->SetSizer( bSizer31 );
m_panel28->Layout();
bSizer31->Fit( m_panel28 );
m_LayerListFlexGridSizer->Add( m_panel28, 1, wxEXPAND, 5 );
m_CommentsStaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("Auxiliary"), wxDefaultPosition, wxDefaultSize, 0 );
m_CommentsStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_CommentsStaticText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_DrawingsName = new wxStaticText( m_LayersListPanel, ID_DRAWINGSNAME, _("Drawings_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_DrawingsName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_DrawingsName, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel29 = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_panel29->SetBackgroundColour( wxColour( 236, 233, 255 ) );
wxBoxSizer* bSizer32;
bSizer32 = new wxBoxSizer( wxVERTICAL );
m_DrawingsCheckBox = new wxCheckBox( m_panel29, ID_DRAWINGSCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer32->Add( m_DrawingsCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_panel29->SetSizer( bSizer32 );
m_panel29->Layout();
bSizer32->Fit( m_panel29 );
m_LayerListFlexGridSizer->Add( m_panel29, 1, wxEXPAND, 5 );
m_DrawingsStaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, _("Auxiliary"), wxDefaultPosition, wxDefaultSize, 0 );
m_DrawingsStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_DrawingsStaticText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_LayersListPanel->SetSizer( m_LayerListFlexGridSizer );
m_LayersListPanel->Layout();
m_LayerListFlexGridSizer->Fit( m_LayersListPanel );
sbLayersSizer->Add( m_LayersListPanel, 1, wxALL|wxEXPAND, 5 );
bMainSizer->Add( sbLayersSizer, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
bMainSizer->Add( sbLayersSizer, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 );
m_sdbSizer2 = new wxStdDialogButtonSizer();
m_sdbSizer2OK = new wxButton( this, wxID_OK );
......@@ -108,8 +782,16 @@ DIALOG_LAYERS_SETUP_BASE2::DIALOG_LAYERS_SETUP_BASE2( wxWindow* parent, wxWindow
this->SetSizer( bMainSizer );
this->Layout();
bMainSizer->Fit( this );
// Connect Events
m_sdbSizer2Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE2::OnCancelButtonClick ), NULL, this );
m_sdbSizer2OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE2::OnOkButtonClick ), NULL, this );
}
DIALOG_LAYERS_SETUP_BASE2::~DIALOG_LAYERS_SETUP_BASE2()
{
// Disconnect Events
m_sdbSizer2Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE2::OnCancelButtonClick ), NULL, this );
m_sdbSizer2OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE2::OnOkButtonClick ), NULL, this );
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,6 +8,8 @@
#ifndef __dialog_layers_setup_base2__
#define __dialog_layers_setup_base2__
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/choice.h>
#include <wx/gdicmn.h>
......@@ -18,12 +20,87 @@
#include <wx/statbox.h>
#include <wx/stattext.h>
#include <wx/checkbox.h>
#include <wx/panel.h>
#include <wx/textctrl.h>
#include <wx/scrolwin.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
#define ID_ADHESFRONTNAME 1000
#define ID_ADHESFRONTCHECKBOX 1001
#define ID_SOLDPFRONTNAME 1002
#define ID_SOLDPFRONTCHECKBOX 1003
#define ID_SILKSFRONTNAME 1004
#define ID_SILKSFRONTCHECKBOX 1005
#define ID_MASKFRONTNAME 1006
#define ID_MASKFRONTCHECKBOX 1007
#define ID_FRONTNAME 1008
#define ID_FRONTCHECKBOX 1009
#define ID_FRONTCHOICE 1010
#define ID_INNER2NAME 1011
#define ID_INNER2CHECKBOX 1012
#define ID_INNER2CHOICE 1013
#define ID_INNER3NAME 1014
#define ID_INNER3CHECKBOX 1015
#define ID_INNER3CHOICE 1016
#define ID_INNER4NAME 1017
#define ID_INNER4CHECKBOX 1018
#define ID_INNER4CHOICE 1019
#define ID_INNER5NAME 1020
#define ID_INNER5CHECKBOX 1021
#define ID_INNER5CHOICE 1022
#define ID_INNER6NAME 1023
#define ID_INNER6CHECKBOX 1024
#define ID_INNER6CHOICE 1025
#define ID_INNER7NAME 1026
#define ID_INNER7CHECKBOX 1027
#define ID_INNER7CHOICE 1028
#define ID_INNER8NAME 1029
#define ID_INNER8CHECKBOX 1030
#define ID_INNER8CHOICE 1031
#define ID_INNER9NAME 1032
#define ID_INNER9CHECKBOX 1033
#define ID_INNER9CHOICE 1034
#define ID_INNER10NAME 1035
#define ID_INNER10CHECKBOX 1036
#define ID_INNER10CHOICE 1037
#define ID_INNER11NAME 1038
#define ID_INNER11CHECKBOX 1039
#define ID_INNER11CHOICE 1040
#define ID_INNER12NAME 1041
#define ID_INNER12CHECKBOX 1042
#define ID_INNER12CHOICE 1043
#define ID_INNER13NAME 1044
#define ID_INNER13CHECKBOX 1045
#define ID_INNER13CHOICE 1046
#define ID_INNER14NAME 1047
#define ID_INNER14CHECKBOX 1048
#define ID_INNER14CHOICE 1049
#define ID_INNER15NAME 1050
#define ID_INNER15CHECKBOX 1051
#define ID_INNER15CHOICE 1052
#define ID_BACKNAME 1053
#define ID_BACKCHECKBOX 1054
#define ID_BACKCHOICE 1055
#define ID_MASKBACKNAME 1056
#define ID_SILKSBACKNAME 1057
#define ID_SILKSBACKCHECKBOX 1058
#define ID_SOLDPBACKNAME 1059
#define ID_SOLDPBACKCHECKBOX 1060
#define ID_ADHESBACKNAME 1061
#define ID_ADHESBACKCHECKBOX 1062
#define ID_PCBEDGESNAME 1063
#define ID_PCBEDGESCHECKBOX 1064
#define ID_ECO2NAME 1065
#define ID_ECHO2CHECKBOX 1066
#define ID_ECO1NAME 1067
#define ID_ECO1CHECKBOX 1068
#define ID_COMMENTSNAME 1069
#define ID_COMMENTSCHECKBOX 1070
#define ID_DRAWINGSNAME 1071
#define ID_DRAWINGSCHECKBOX 1072
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_LAYERS_SETUP_BASE2
......@@ -40,15 +117,133 @@ class DIALOG_LAYERS_SETUP_BASE2 : public wxDialog
wxStaticText* m_LayerTypeCaption;
wxScrolledWindow* m_LayersListPanel;
wxFlexGridSizer* m_LayerListFlexGridSizer;
wxStaticText* m_junkStaticText;
wxCheckBox* m_junkCheckBox;
wxChoice* m_junkChoice;
wxStaticText* m_AdhesFrontName;
wxPanel* m_AdhesFrontPanel;
wxCheckBox* m_AdhesFrontCheckBox;
wxStaticText* m_AdhesFrontStaticText;
wxStaticText* m_SoldPFrontName;
wxPanel* m_SoldPFrontPanel;
wxCheckBox* m_SoldPFrontCheckBox;
wxStaticText* m_SoldPFrontStaticText;
wxStaticText* m_SilkSFrontName;
wxPanel* m_SilkSFrontPanel;
wxCheckBox* m_SilkSFrontCheckBox;
wxStaticText* m_SilkSFrontStaticText;
wxStaticText* m_MaskFrontName;
wxPanel* m_MaskFrontPanel;
wxCheckBox* m_MaskFrontCheckBox;
wxStaticText* m_MaskFrontStaticText;
wxTextCtrl* m_FrontName;
wxPanel* m_FrontPanel;
wxCheckBox* m_FrontCheckBox;
wxChoice* m_FrontChoice;
wxTextCtrl* m_Inner2Name;
wxPanel* m_Inner2Panel;
wxCheckBox* m_Inner2CheckBox;
wxChoice* m_Inner2Choice;
wxTextCtrl* m_Inner3Name;
wxPanel* m_Inner3Panel;
wxCheckBox* m_Inner3CheckBox;
wxChoice* m_Inner3Choice;
wxTextCtrl* m_Inner4Name;
wxPanel* m_Inner4Panel;
wxCheckBox* m_Inner4CheckBox;
wxChoice* m_Inner4Choice;
wxTextCtrl* m_Inner5Name;
wxPanel* m_Inner5Panel;
wxCheckBox* m_Inner5CheckBox;
wxChoice* m_Inner5Choice;
wxTextCtrl* m_Inner6Name;
wxPanel* m_Inner6Panel;
wxCheckBox* m_Inner6CheckBox;
wxChoice* m_Inner6Choice;
wxTextCtrl* m_Inner7Name;
wxPanel* m_Inner7Panel;
wxCheckBox* m_Inner7CheckBox;
wxChoice* m_Inner7Choice;
wxTextCtrl* m_Inner8Name;
wxPanel* m_Inner8Panel;
wxCheckBox* m_Inner8CheckBox;
wxChoice* m_Inner8Choice;
wxTextCtrl* m_Inner9Name;
wxPanel* m_Inner9Panel;
wxCheckBox* m_Inner9CheckBox;
wxChoice* m_Inner9Choice;
wxTextCtrl* m_Inner10Name;
wxPanel* m_Inner10Panel;
wxCheckBox* m_Inner10CheckBox;
wxChoice* m_Inner10Choice;
wxTextCtrl* m_Inner11Name;
wxPanel* m_Inner11Panel;
wxCheckBox* m_Inner11CheckBox;
wxChoice* m_Inner11Choice;
wxTextCtrl* m_Inner12Name;
wxPanel* m_Inner12Panel;
wxCheckBox* m_Inner12CheckBox;
wxChoice* m_Inner12Choice;
wxTextCtrl* m_Inner13Name;
wxPanel* m_Inner13Panel;
wxCheckBox* m_Inner13CheckBox;
wxChoice* m_Inner13Choice;
wxTextCtrl* m_Inner14Name;
wxPanel* m_Inner14Panel;
wxCheckBox* m_Inner14CheckBox;
wxChoice* m_Inner14Choice;
wxTextCtrl* m_Inner15Name;
wxPanel* m_Inner15Panel;
wxCheckBox* m_Inner15CheckBox;
wxChoice* m_Inner15Choice;
wxTextCtrl* m_BackName;
wxPanel* m_BackPanel;
wxCheckBox* m_BackCheckBox;
wxChoice* m_BackChoice;
wxStaticText* m_MaskBackName;
wxPanel* m_panel21;
wxCheckBox* m_MaskBackCheckBox;
wxStaticText* m_MaskBackStaticText;
wxStaticText* m_SilkSBackName;
wxPanel* m_panel22;
wxCheckBox* m_SilkSBackCheckBox;
wxStaticText* m_SilkSBackStaticText;
wxStaticText* m_SoldPBackName;
wxPanel* m_panel23;
wxCheckBox* m_SoldPBackCheckBox;
wxStaticText* m_SoldPBackStaticText;
wxStaticText* m_AdhesBackName;
wxPanel* m_panel24;
wxCheckBox* m_AdhesBackCheckBox;
wxStaticText* m_AdhesBackStaticText;
wxStaticText* m_PCBEdgesName;
wxPanel* m_panel25;
wxCheckBox* m_PCBEdgesCheckBox;
wxStaticText* m_PCBEdgesStaticText;
wxStaticText* m_Eco2Name;
wxPanel* m_panel26;
wxCheckBox* m_Eco2CheckBox;
wxStaticText* m_Eco2StaticText;
wxStaticText* m_Eco1Name;
wxPanel* m_panel27;
wxCheckBox* m_Eco1CheckBox;
wxStaticText* m_Eco1StaticText;
wxStaticText* m_CommentsName;
wxPanel* m_panel28;
wxCheckBox* m_CommentsCheckBox;
wxStaticText* m_CommentsStaticText;
wxStaticText* m_DrawingsName;
wxPanel* m_panel29;
wxCheckBox* m_DrawingsCheckBox;
wxStaticText* m_DrawingsStaticText;
wxStdDialogButtonSizer* m_sdbSizer2;
wxButton* m_sdbSizer2OK;
wxButton* m_sdbSizer2Cancel;
// Virtual event handlers, overide them in your derived class
virtual void OnCancelButtonClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnOkButtonClick( wxCommandEvent& event ){ event.Skip(); }
public:
DIALOG_LAYERS_SETUP_BASE2( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Layer Setup"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 700,600 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_LAYERS_SETUP_BASE2( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Layer Setup"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_LAYERS_SETUP_BASE2();
};
......
......@@ -770,9 +770,9 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
EXCHG( layer1, layer2 );
// test:
if( layer1 == COPPER_LAYER_N && layer2 == LAYER_N_2 )
if( layer1 == LAYER_N_BACK && layer2 == LAYER_N_2 )
err = false;
if( layer1 == (g_DesignSettings.GetCopperLayerCount() - 2 ) && layer2 == LAYER_CMP_N )
if( layer1 == (g_DesignSettings.GetCopperLayerCount() - 2 ) && layer2 == LAYER_N_FRONT )
err = false;
if( err )
{
......
......@@ -171,7 +171,7 @@ void WinEDA_ModuleEditFrame::Edit_Edge_Layer( EDGE_MODULE* Edge )
if( new_layer < 0 )
return;
if( new_layer >= FIRST_COPPER_LAYER && new_layer <= LAST_COPPER_LAYER )
if( IsValidCopperLayerIndex( new_layer ) )
{
/* an edge is put on a copper layer, and it is very dangerous. a
*confirmation is requested */
......@@ -330,9 +330,9 @@ EDGE_MODULE* WinEDA_ModuleEditFrame::Begin_Edge_Module( EDGE_MODULE* Edge,
Edge->m_Width = ModuleSegmentWidth;
Edge->SetLayer( module->GetLayer() );
if( module->GetLayer() == CMP_N )
if( module->GetLayer() == LAYER_N_FRONT )
Edge->SetLayer( SILKSCREEN_N_CMP );
if( module->GetLayer() == COPPER_LAYER_N )
if( module->GetLayer() == LAYER_N_BACK )
Edge->SetLayer( SILKSCREEN_N_CU );
/* Initialise the starting point of the new segment or arc */
......
......@@ -1082,14 +1082,14 @@ void WinEDA_PcbFrame::SwitchLayer( wxDC* DC, int layer )
// Copper layers cannot be selected unconditionally; how many
// of those layers are currently enabled needs to be checked.
if( (layer >= FIRST_COPPER_LAYER) && (layer <= LAST_COPPER_LAYER) )
if( IsValidCopperLayerIndex( layer ) )
{
// If only one copper layer is enabled, the only such layer
// that can be selected to is the "Copper" layer (so the
// selection of any other copper layer is disregarded).
if( GetBoard()->m_BoardSettings->GetCopperLayerCount() < 2 )
{
if( layer != COPPER_LAYER_N )
if( layer != LAYER_N_BACK )
{
// Uncomment following command (and line 17) to beep
// the speaker. (Doing that would provide feedback to
......@@ -1105,7 +1105,7 @@ void WinEDA_PcbFrame::SwitchLayer( wxDC* DC, int layer )
// layers are also capable of being selected.
else
{
if( ( layer != COPPER_LAYER_N ) && ( layer != LAYER_CMP_N )
if( ( layer != LAYER_N_BACK ) && ( layer != LAYER_N_FRONT )
&& ( layer >= GetBoard()->m_BoardSettings->GetCopperLayerCount() - 1 ) )
{
// Uncomment following command (and line 17) to beep
......
......@@ -160,7 +160,7 @@ TEXTE_PCB* WinEDA_PcbFrame::Create_Texte_Pcb( wxDC* DC )
TextePcb->m_Flags = IS_NEW;
TextePcb->SetLayer( ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer );
TextePcb->m_Mirror = false;
if( TextePcb->GetLayer() == COPPER_LAYER_N )
if( TextePcb->GetLayer() == LAYER_N_BACK )
TextePcb->m_Mirror = true;
TextePcb->m_Size = g_DesignSettings.m_PcbTextSize;
......
......@@ -205,15 +205,15 @@ bool WinEDA_PcbFrame::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
break;
case VIA_MICROVIA: // from external to the near neighbor inner layer
if ( old_layer == COPPER_LAYER_N )
if ( old_layer == LAYER_N_BACK )
((PCB_SCREEN*)GetScreen())->m_Active_Layer = LAYER_N_2;
else if ( old_layer == LAYER_CMP_N )
else if ( old_layer == LAYER_N_FRONT )
((PCB_SCREEN*)GetScreen())->m_Active_Layer =
GetBoard()->m_BoardSettings->GetCopperLayerCount() - 2;
else if ( old_layer == LAYER_N_2 )
((PCB_SCREEN*)GetScreen())->m_Active_Layer = COPPER_LAYER_N;
((PCB_SCREEN*)GetScreen())->m_Active_Layer = LAYER_N_BACK;
else if ( old_layer == GetBoard()->m_BoardSettings->GetCopperLayerCount() - 2 )
((PCB_SCREEN*)GetScreen())->m_Active_Layer = LAYER_CMP_N;
((PCB_SCREEN*)GetScreen())->m_Active_Layer = LAYER_N_FRONT;
// else error
via->SetLayerPair( old_layer,
((PCB_SCREEN*)GetScreen())->m_Active_Layer );
......@@ -226,7 +226,7 @@ bool WinEDA_PcbFrame::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
default:
// Usual via is from copper to component; layer pair is 0 and 0x0F.
via->SetDrillValue( GetBoard()->GetCurrentViaDrill() );
via->SetLayerPair( COPPER_LAYER_N, LAYER_CMP_N );
via->SetLayerPair( LAYER_N_BACK, LAYER_N_FRONT );
break;
}
......
......@@ -106,7 +106,7 @@ void WinEDA_PcbFrame::ExportToGenCAD( wxCommandEvent& event )
for( module = GetBoard()->m_Modules; module != NULL; module = module->Next() )
{
module->flag = 0;
if( module->GetLayer() == COPPER_LAYER_N )
if( module->GetLayer() == LAYER_N_BACK )
{
module->Flip( module->m_Pos );
module->flag = 1;
......@@ -356,14 +356,14 @@ void CreateShapesSection( FILE* file, BOARD* pcb )
layer = "ALL";
if( ( pad->m_Masque_Layer & ALL_CU_LAYERS ) == CUIVRE_LAYER )
{
if( module->GetLayer() == CMP_N )
if( module->GetLayer() == LAYER_N_FRONT )
layer = "BOTTOM";
else
layer = "TOP";
}
else if( ( pad->m_Masque_Layer & ALL_CU_LAYERS ) == CMP_LAYER )
{
if( module->GetLayer() == CMP_N )
if( module->GetLayer() == LAYER_N_FRONT )
layer = "TOP";
else
layer = "BOTTOM";
......
......@@ -297,8 +297,8 @@ void GenDrillReportFile( FILE* aFile, BOARD* aPcb,
{
unsigned TotalHoleCount;
char line[1024];
int layer1 = COPPER_LAYER_N;
int layer2 = LAYER_CMP_N;
int layer1 = LAYER_N_BACK;
int layer2 = LAYER_N_FRONT;
bool gen_through_holes = true;
......@@ -334,7 +334,7 @@ void GenDrillReportFile( FILE* aFile, BOARD* aPcb,
}
else
{
if( layer1 == COPPER_LAYER_N ) // First partial hole list
if( layer1 == LAYER_N_BACK ) // First partial hole list
{
sprintf( line, "Drill report for buried and blind vias :\n\n" );
fputs( line, aFile );
......@@ -395,12 +395,12 @@ void GenDrillReportFile( FILE* aFile, BOARD* aPcb,
layer2 = layer1 + 1;
else
{
if( layer2 >= LAYER_CMP_N ) // no more layer pair to consider
if( layer2 >= LAYER_N_FRONT ) // no more layer pair to consider
break;
layer1++; layer2++; // use next layer pair
if( layer2 == g_DesignSettings.GetCopperLayerCount() - 1 )
layer2 = LAYER_CMP_N; // the last layer is always the
layer2 = LAYER_N_FRONT; // the last layer is always the
// component layer
}
gen_through_holes = false;
......
......@@ -87,8 +87,8 @@ void Build_Holes_List( BOARD* aPcb,
if( (new_hole.m_Hole_Top_Layer < aLastLayer) && (aLastLayer >= 0) )
continue;
if( aExcludeThroughHoles && (new_hole.m_Hole_Bottom_Layer == COPPER_LAYER_N)
&& (new_hole.m_Hole_Top_Layer == LAYER_CMP_N) )
if( aExcludeThroughHoles && (new_hole.m_Hole_Bottom_Layer == LAYER_N_BACK)
&& (new_hole.m_Hole_Top_Layer == LAYER_N_FRONT) )
continue;
aHoleListBuffer.push_back( new_hole );
......@@ -117,8 +117,8 @@ void Build_Holes_List( BOARD* aPcb,
new_hole.m_Hole_SizeY = pad->m_Drill.y;
new_hole.m_Hole_Pos_X = pad->m_Pos.x;
new_hole.m_Hole_Pos_Y = pad->m_Pos.y; // hole position
new_hole.m_Hole_Bottom_Layer = COPPER_LAYER_N;
new_hole.m_Hole_Top_Layer = LAYER_CMP_N; // pad holes are through holes
new_hole.m_Hole_Bottom_Layer = LAYER_N_BACK;
new_hole.m_Hole_Top_Layer = LAYER_N_FRONT; // pad holes are through holes
aHoleListBuffer.push_back( new_hole );
}
}
......
......@@ -120,7 +120,7 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
#endif
}
if( module->GetLayer() == COPPER_LAYER_N )
if( module->GetLayer() == LAYER_N_BACK )
doBoardBack = true;
moduleCount++;
......@@ -133,7 +133,7 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
}
fnFront = GetScreen()->m_FileName;
frontLayerName = GetBoard()->GetLayerName( CMP_N );
frontLayerName = GetBoard()->GetLayerName( LAYER_N_FRONT );
fnFront.SetName( fnFront.GetName() + frontLayerName );
fnFront.SetExt( wxT( "pos") );
......@@ -148,7 +148,7 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
if( doBoardBack )
{
fnBack = GetScreen()->m_FileName;
backLayerName = GetBoard()->GetLayerName( COPPER_LAYER_N );
backLayerName = GetBoard()->GetLayerName( LAYER_N_BACK );
fnBack.SetName( fnBack.GetName() + backLayerName );
fnBack.SetExt( wxT( "pos" ) );
......@@ -252,15 +252,15 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
int layer = Liste[ii].m_Module->GetLayer();
wxASSERT( layer==CMP_N || layer==COPPER_LAYER_N );
wxASSERT( layer==LAYER_N_FRONT || layer==LAYER_N_BACK );
if( layer == CMP_N )
if( layer == LAYER_N_FRONT )
{
strcat( line, CONV_TO_UTF8( frontLayerName ) );
strcat( line, "\n" );
fputs( line, fpFront );
}
else if( layer == COPPER_LAYER_N )
else if( layer == LAYER_N_BACK )
{
strcat( line, CONV_TO_UTF8( backLayerName ) );
strcat( line, "\n" );
......@@ -396,9 +396,9 @@ void WinEDA_PcbFrame::GenModuleReport( wxCommandEvent& event )
fputs( line, rptfile );
sprintf( line, "orientation %.2f\n", (double) Module->m_Orient / 10 );
if( Module->GetLayer() == CMP_N )
if( Module->GetLayer() == LAYER_N_FRONT )
strcat( line, "layer component\n" );
else if( Module->GetLayer() == COPPER_LAYER_N )
else if( Module->GetLayer() == LAYER_N_BACK )
strcat( line, "layer copper\n" );
else
strcat( line, "layer other\n" );
......
......@@ -264,8 +264,8 @@ void WinEDA_DrillFrame::GenDrillFiles( wxCommandEvent& event )
bool ExistsBuriedVias = false; /* If true, drill files are created
* layer pair by layer pair for
* buried vias */
int layer1 = COPPER_LAYER_N;
int layer2 = LAYER_CMP_N;
int layer1 = LAYER_N_BACK;
int layer2 = LAYER_N_FRONT;
bool gen_through_holes = true;
UpdateConfig(); /* set params and Save drill options */
......@@ -293,11 +293,11 @@ void WinEDA_DrillFrame::GenDrillFiles( wxCommandEvent& event )
if( !gen_through_holes )
{
if( layer1 == COPPER_LAYER_N )
if( layer1 == LAYER_N_BACK )
layer_extend << wxT( "-copper" );
else
layer_extend << wxT( "-inner" ) << layer1;
if( layer2 == LAYER_CMP_N )
if( layer2 == LAYER_N_FRONT )
layer_extend << wxT( "-cmp" );
else
layer_extend << wxT( "-inner" ) << layer2;
......@@ -359,13 +359,13 @@ void WinEDA_DrillFrame::GenDrillFiles( wxCommandEvent& event )
layer2 = layer1 + 1;
else
{
if( layer2 >= LAYER_CMP_N ) // no more layer pair to consider
if( layer2 >= LAYER_N_FRONT ) // no more layer pair to consider
break;
layer1++;
layer2++; // use next layer pair
if( layer2 == g_DesignSettings.GetCopperLayerCount() - 1 )
layer2 = LAYER_CMP_N; // the last layer is always the
layer2 = LAYER_N_FRONT; // the last layer is always the
// component layer
}
......
......@@ -231,12 +231,13 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
case HK_SWITCH_LAYER_TO_PREVIOUS:
ll = GetScreen()->m_Active_Layer;
if( (ll <= COPPER_LAYER_N) || (ll > CMP_N) )
if( (ll <= LAYER_N_BACK) || (ll > LAYER_N_FRONT) )
break;
if( GetBoard()->m_BoardSettings->GetCopperLayerCount() < 2 ) // Single layer
ll = COPPER_LAYER_N;
else if( ll == CMP_N )
ll = MAX( COPPER_LAYER_N,
ll = LAYER_N_BACK;
else if( ll == LAYER_N_FRONT )
ll = MAX( LAYER_N_BACK,
GetBoard()->m_BoardSettings->GetCopperLayerCount() - 2 );
else
ll--;
......@@ -245,23 +246,23 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
case HK_SWITCH_LAYER_TO_NEXT:
ll = GetScreen()->m_Active_Layer;
if( (ll < COPPER_LAYER_N) || (ll >= CMP_N) )
if( (ll < LAYER_N_BACK) || (ll >= LAYER_N_FRONT) )
break;
if( GetBoard()->m_BoardSettings->GetCopperLayerCount() < 2 ) // Single layer
ll = COPPER_LAYER_N;
ll = LAYER_N_BACK;
else if( ll >= GetBoard()->m_BoardSettings->GetCopperLayerCount() - 2 )
ll = CMP_N;
ll = LAYER_N_FRONT;
else
ll++;
SwitchLayer( DC, ll );
break;
case HK_SWITCH_LAYER_TO_COMPONENT:
SwitchLayer( DC, CMP_N );
SwitchLayer( DC, LAYER_N_FRONT );
break;
case HK_SWITCH_LAYER_TO_COPPER:
SwitchLayer( DC, COPPER_LAYER_N );
SwitchLayer( DC, LAYER_N_BACK );
break;
case HK_SWITCH_LAYER_TO_INNER1:
......@@ -343,7 +344,7 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
case HK_BACK_SPACE:
if( m_ID_current_state == ID_TRACK_BUTT && GetScreen()->m_Active_Layer
<= CMP_N )
<= LAYER_N_FRONT )
{
if( ItemFree )
{
......@@ -462,7 +463,7 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
break;
case HK_ADD_NEW_TRACK: // Start new track
if( GetScreen()->m_Active_Layer > CMP_N )
if( GetScreen()->m_Active_Layer > LAYER_N_FRONT )
break;
if( m_ID_current_state != ID_TRACK_BUTT && ItemFree )
......@@ -473,8 +474,8 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
if( m_ID_current_state != ID_TRACK_BUTT )
break;
if( ItemFree ) // no track in progress:
if( ItemFree ) // no track in progress:
{
TRACK* track = Begin_Route( NULL, DC );
SetCurItem( track );
......@@ -723,7 +724,7 @@ bool WinEDA_PcbFrame::OnHotkeyDeleteItem( wxDC* DC, EDA_BaseStruct* DrawStruct )
switch( m_ID_current_state )
{
case ID_TRACK_BUTT:
if( GetScreen()->m_Active_Layer > CMP_N )
if( GetScreen()->m_Active_Layer > LAYER_N_FRONT )
return FALSE;
if( ItemFree )
{
......
......@@ -162,8 +162,8 @@ int WinEDA_BasePcbFrame::ReadListeSegmentDescr( FILE* File,
if( makeType == TYPE_VIA ) // Ensure layers are OK when possible:
{
if( newTrack->Shape() == VIA_THROUGH )
( (SEGVIA*) newTrack )->SetLayerPair( LAYER_CMP_N,
COPPER_LAYER_N );
( (SEGVIA*) newTrack )->SetLayerPair( LAYER_N_FRONT,
LAYER_N_BACK );
}
newTrack->SetNet( net_code );
......
......@@ -78,7 +78,7 @@ void WinEDA_ModuleEditFrame::Load_Module_From_BOARD( MODULE* Module )
GetScreen()->m_Curseur.x = GetScreen()->m_Curseur.y = 0;
Place_Module( Module, NULL );
if( Module->GetLayer() != CMP_N )
if( Module->GetLayer() != LAYER_N_FRONT )
Module->Flip( Module->m_Pos );
Rotate_Module( NULL, Module, 0, FALSE );
GetScreen()->ClrModify();
......
......@@ -241,10 +241,10 @@ MODULE* Locate_Prefered_Module( BOARD* Pcb, int typeloc )
layer = pt_module->GetLayer();
if( layer==ADHESIVE_N_CU || layer==SILKSCREEN_N_CU )
layer = COPPER_LAYER_N;
layer = LAYER_N_BACK;
else if( layer==ADHESIVE_N_CMP || layer==SILKSCREEN_N_CMP )
layer = CMP_N;
layer = LAYER_N_FRONT;
/* Test of minimum size to choosing the best candidate. */
......
......@@ -353,8 +353,8 @@ void WinEDA_PcbFrame::Change_Side_Module( MODULE* Module, wxDC* DC )
{
if( Module == NULL )
return;
if( ( Module->GetLayer() != CMP_N )
&& ( Module->GetLayer() != COPPER_LAYER_N ) )
if( ( Module->GetLayer() != LAYER_N_FRONT )
&& ( Module->GetLayer() != LAYER_N_BACK ) )
return;
GetScreen()->SetModify();
......
......@@ -748,7 +748,7 @@ MODULE* WinEDA_PcbFrame::Create_MuWaveComponent( int shape_type )
Module->m_Drawings.PushFront( edge );
edge->m_Shape = S_POLYGON;
edge->SetLayer( LAYER_CMP_N );
edge->SetLayer( LAYER_N_FRONT );
int numPoints = angle / 50 + 3; // Note: angles are in 0.1 degrees
edge->m_PolyPoints.reserve( numPoints );
......@@ -1064,7 +1064,7 @@ MODULE* WinEDA_PcbFrame::Create_MuWavePolygonShape()
Module->m_Drawings.PushFront( edge );
edge->m_Shape = S_POLYGON;
edge->SetLayer( LAYER_CMP_N );
edge->SetLayer( LAYER_N_FRONT );
npoints = PolyEdgesCount;
edge->m_PolyPoints.reserve( 2 * PolyEdgesCount + 2 );
......
......@@ -61,15 +61,15 @@ extern const wxString g_FootprintLibFileWildcard; // Wildcard for footprint li
* Function IsModuleLayerVisible
* expects either of the two layers on which a module can reside, and returns
* whether that layer is visible.
* @param layer One of the two allowed layers for modules: CMP_N or COPPER_LAYER_N
* @param layer One of the two allowed layers for modules: LAYER_N_FRONT or LAYER_N_BACK
* @return bool - true if the layer is visible, else false.
*/
bool inline IsModuleLayerVisible( int layer )
{
if( layer==CMP_N )
if( layer==LAYER_N_FRONT )
return DisplayOpt.Show_Modules_Cmp;
else if( layer==COPPER_LAYER_N )
else if( layer==LAYER_N_BACK )
return DisplayOpt.Show_Modules_Cu;
else
......
......@@ -215,9 +215,9 @@ static void Print_Module( WinEDA_DrawPanel* panel, wxDC* DC,
/* Print footprint graphic shapes */
PtStruct = Module->m_Drawings;
mlayer = g_TabOneLayerMask[Module->GetLayer()];
if( Module->GetLayer() == COPPER_LAYER_N )
if( Module->GetLayer() == LAYER_N_BACK )
mlayer = SILKSCREEN_LAYER_CU;
else if( Module->GetLayer() == CMP_N )
else if( Module->GetLayer() == LAYER_N_FRONT )
mlayer = SILKSCREEN_LAYER_CMP;
if( mlayer & masklayer )
......
......@@ -61,7 +61,7 @@ enum button_types
type_element,
type_visual
};
struct ColorButton
{
......@@ -94,8 +94,8 @@ static ColorButton Layer_1_Butt =
{
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
wxEmptyString,
COPPER_LAYER_N, // Layer
ADR( COPPER_LAYER_N ) // Address of optional parameter
LAYER_N_BACK, // Layer
ADR( LAYER_N_BACK ) // Address of optional parameter
};
static ColorButton Layer_2_Butt =
......@@ -214,8 +214,8 @@ static ColorButton Layer_16_Butt =
{
type_layer, // Toggle ITEM_NOT_SHOW bit of the color variable
wxEmptyString,
CMP_N, // Layer
ADR( CMP_N ) // Address of optional parameter
LAYER_N_FRONT, // Layer
ADR( LAYER_N_FRONT ) // Address of optional parameter
};
......@@ -372,7 +372,7 @@ static ColorButton Ratsnest_Butt =
static ColorButton Pad_Cu_Butt =
{
type_element, // Toggle ITEM_NOT_SHOW bit of the color variable
_( "Pad Cu" ), // Title
_( "Pad Back" ), // Title
PAD_CU_VISIBLE,
&g_PadCUColor // Address of optional parameter
};
......@@ -380,7 +380,7 @@ static ColorButton Pad_Cu_Butt =
static ColorButton Pad_Cmp_Butt =
{
type_element, // Toggle ITEM_NOT_SHOW bit of the color variable
_( "Pad Cmp" ), // Title
_( "Pad Front" ), // Title
PAD_CMP_VISIBLE,
&g_PadCMPColor // Address of optional parameter
};
......@@ -388,7 +388,7 @@ static ColorButton Pad_Cmp_Butt =
static ColorButton Text_Mod_Cu_Butt =
{
type_element, // Toggle ITEM_NOT_SHOW bit of the color variable
_( "Text Module Cu" ), // Title
_( "Text Module Back" ), // Title
MODULE_TEXT_CU_VISIBLE,
&g_ModuleTextCUColor // Address of optional parameter
};
......@@ -396,7 +396,7 @@ static ColorButton Text_Mod_Cu_Butt =
static ColorButton Text_Mod_Cmp_Butt =
{
type_element, // Toggle ITEM_NOT_SHOW bit of the color variable
_( "Text Module Cmp" ), // Title
_( "Text Module Front" ), // Title
MODULE_TEXT_CMP_VISIBLE,
&g_ModuleTextCMPColor // Address of optional parameter
};
......@@ -438,7 +438,7 @@ static ColorButton Show_Pads_Noconnect_Butt =
static ColorButton Show_Modules_Cmp_Butt =
{
type_visual,
_( "Show Modules Cmp" ), // Title
_( "Show Modules Front" ), // Title
-1,
NULL, // Address of optional parameter
&DisplayOpt.Show_Modules_Cmp // Address of boolean display control parameter to toggle
......@@ -447,7 +447,7 @@ static ColorButton Show_Modules_Cmp_Butt =
static ColorButton Show_Modules_Cu_Butt =
{
type_visual,
_( "Show Modules Cu" ), // Title
_( "Show Modules Back" ), // Title
-1,
NULL, // Address of optional parameter
&DisplayOpt.Show_Modules_Cu // Address of boolean display control parameter to toggle
......
......@@ -87,11 +87,11 @@ void SPECCTRA_DB::buildLayerMaps( BOARD* aBoard )
layerIds.clear();
pcbLayer2kicad.resize( layerCount );
kicadLayer2pcb.resize( LAYER_CMP_N+1 );
kicadLayer2pcb.resize( LAYER_N_FRONT+1 );
for( int kiNdx=layerCount-1, pcbNdx=0; kiNdx >= 0; --kiNdx, ++pcbNdx )
{
int kilayer = kiNdx>0 && kiNdx==layerCount-1 ? LAYER_CMP_N : kiNdx;
int kilayer = kiNdx>0 && kiNdx==layerCount-1 ? LAYER_N_FRONT : kiNdx;
// establish bi-directional mapping between kicad's BOARD layer and PCB layer
pcbLayer2kicad[pcbNdx] = kilayer;
......
......@@ -1520,7 +1520,7 @@ void SPECCTRA_DB::FlipMODULEs( BOARD* aBoard )
for( MODULE* module = aBoard->m_Modules; module; module = module->Next() )
{
module->flag = 0;
if( module->GetLayer() == COPPER_LAYER_N )
if( module->GetLayer() == LAYER_N_BACK )
{
module->Flip( module->m_Pos );
module->flag = 1;
......
......@@ -268,7 +268,7 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
via->SetDrillValue( drillDiam );
via->m_Shape = VIA_THROUGH;
via->m_Width = viaDiam;
via->SetLayerPair( CMP_N, COPPER_LAYER_N );
via->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK );
}
else if( shapeCount == copperLayerCount )
{
......@@ -286,7 +286,7 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
via->SetDrillValue( drillDiam );
via->m_Shape = VIA_THROUGH;
via->m_Width = viaDiam;
via->SetLayerPair( CMP_N, COPPER_LAYER_N );
via->SetLayerPair( LAYER_N_FRONT, LAYER_N_BACK );
}
else // VIA_MICROVIA or VIA_BLIND_BURIED
{
......@@ -408,7 +408,7 @@ void SPECCTRA_DB::FromSESSION( BOARD* aBoard ) throw( IOError )
{
// convert from degrees to tenths of degrees used in Kicad.
int orientation = (int) (place->rotation * 10.0);
if( module->GetLayer() != CMP_N )
if( module->GetLayer() != LAYER_N_FRONT )
{
// module is on copper layer (back)
module->Flip( module->m_Pos );
......@@ -418,7 +418,7 @@ void SPECCTRA_DB::FromSESSION( BOARD* aBoard ) throw( IOError )
else if( place->side == T_back )
{
int orientation = (int) ((place->rotation + 180.0) * 10.0);
if( module->GetLayer() != COPPER_LAYER_N )
if( module->GetLayer() != LAYER_N_BACK )
{
// module is on component layer (front)
module->Flip( module->m_Pos );
......
......@@ -159,14 +159,14 @@ void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* DC,
if( !DisplayOpt.Show_Modules_Cmp )
{
if( module->GetLayer() == CMP_N )
if( module->GetLayer() == LAYER_N_FRONT )
display = FALSE;
layerMask &= ~CMP_LAYER;
}
if( !DisplayOpt.Show_Modules_Cu )
{
if( module->GetLayer() == COPPER_LAYER_N )
if( module->GetLayer() == LAYER_N_BACK )
display = FALSE;
layerMask &= ~CUIVRE_LAYER;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment