Commit dda28ed6 authored by dickelbeck's avatar dickelbeck

more new search stuff, beautification

parent 6f7209aa
...@@ -231,7 +231,7 @@ std::ostream& EDA_BaseStruct::NestedSpace( int nestLevel, std::ostream& os ) ...@@ -231,7 +231,7 @@ std::ostream& EDA_BaseStruct::NestedSpace( int nestLevel, std::ostream& os )
// see base_struct.h // see base_struct.h
SEARCH_RESULT EDA_BaseStruct::IterateForward( EDA_BaseStruct* listStart, SEARCH_RESULT EDA_BaseStruct::IterateForward( EDA_BaseStruct* listStart,
INSPECTOR* inspector, void* testData, const KICAD_T scanTypes[] ) INSPECTOR* inspector, const void* testData, const KICAD_T scanTypes[] )
{ {
EDA_BaseStruct* p = listStart; EDA_BaseStruct* p = listStart;
for( ; p; p = p->Pnext ) for( ; p; p = p->Pnext )
...@@ -245,7 +245,7 @@ SEARCH_RESULT EDA_BaseStruct::IterateForward( EDA_BaseStruct* listStart, ...@@ -245,7 +245,7 @@ SEARCH_RESULT EDA_BaseStruct::IterateForward( EDA_BaseStruct* listStart,
// see base_struct.h // see base_struct.h
SEARCH_RESULT EDA_BaseStruct::Traverse( INSPECTOR* inspector, void* testData, SEARCH_RESULT EDA_BaseStruct::Traverse( INSPECTOR* inspector, const void* testData,
const KICAD_T scanTypes[] ) const KICAD_T scanTypes[] )
{ {
KICAD_T stype; KICAD_T stype;
......
...@@ -88,7 +88,7 @@ class EDA_BaseStruct; ...@@ -88,7 +88,7 @@ class EDA_BaseStruct;
* Class INSPECTOR * Class INSPECTOR
* is an abstract class that is used to inspect and possibly collect the * is an abstract class that is used to inspect and possibly collect the
* (search) results of Iterating over a list or tree of KICAD_T objects. * (search) results of Iterating over a list or tree of KICAD_T objects.
* Extend from this class and implment the Inspect function and provide for * Extend from this class and implement the Inspect function and provide for
* a way for the extension to collect the results of the search/scan data and * a way for the extension to collect the results of the search/scan data and
* provide them to the caller. * provide them to the caller.
*/ */
...@@ -99,15 +99,18 @@ public: ...@@ -99,15 +99,18 @@ public:
/** /**
* Function Inspect * Function Inspect
* is the function type that can be passed to the Iterate function, * is the examining function within the INSPECTOR which is passed to the
* used primarily for searching, but not exclusively. * Iterate function. It is used primarily for searching, but not limited to
* that. It can also collect or modify the scanned objects.
*
* @param testItem An EDA_BaseStruct to examine.
* @param testData is arbitrary data needed by the inspector to determine * @param testData is arbitrary data needed by the inspector to determine
* if the EDA_BaseStruct under test meets its match criteria. * if the EDA_BaseStruct under test meets its match criteria.
* @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan, * @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan,
* else SCAN_CONTINUE; * else SCAN_CONTINUE;
*/ */
SEARCH_RESULT virtual Inspect( EDA_BaseStruct* testItem, SEARCH_RESULT virtual Inspect( EDA_BaseStruct* testItem,
void* testData ) = 0; const void* testData ) = 0;
// derived classes add more functions for collecting and subsequent // derived classes add more functions for collecting and subsequent
// retrieval here. // retrieval here.
...@@ -199,27 +202,27 @@ public: ...@@ -199,27 +202,27 @@ public:
/** /**
* Function IterateForward * Function IterateForward
* walks through the object tree calling the testFunc on each object * walks through the object tree calling the testFunc on each object
* type requested in structTypes. * type requested in scanTypes.
* *
* @param listStart The first in a list of EDA_BaseStructs to iterate over. * @param listStart The first in a list of EDA_BaseStructs to iterate over.
* @param inspector Is an INSPECTOR to call on each object that is of one of * @param inspector Is an INSPECTOR to call on each object that is one of
* the requested itemTypes. * the requested scanTypes.
* @param testData Is an aid to testFunc, and should be sufficient to * @param testData Is an aid to testFunc, and should be sufficient to
* allow it to fully determine if an item meets the match criteria, but it * allow it to fully determine if an item meets the match criteria, but it
* may also be used to collect output. * may also be used to collect output.
* @param scanTypes Is a char array of KICAD_T that is EOT * @param scanTypes A KICAD_T array that is EOT
* terminated, and provides both the order and interest level of of * terminated, and provides both the order and interest level of of
* the types of objects to be iterated over. * the types of objects to be iterated over.
* @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan, * @return SEARCH_RESULT - SEARCH_QUIT if the called INSPECTOR returned
* else SCAN_CONTINUE; * SEARCH_QUIT, else SCAN_CONTINUE;
*/ */
static SEARCH_RESULT IterateForward( EDA_BaseStruct* listStart, static SEARCH_RESULT IterateForward( EDA_BaseStruct* listStart,
INSPECTOR* inspector, void* testData, const KICAD_T scanTypes[] ); INSPECTOR* inspector, const void* testData, const KICAD_T scanTypes[] );
/** /**
* Function Traverse * Function Traverse
* should be re-implemented for each derrived class in order to handle * should be re-implemented for each derived class in order to handle
* all the types given by its member data. Implementations should call * all the types given by its member data. Implementations should call
* inspector->Inspect() on types in scanTypes[], and may use IterateForward() * inspector->Inspect() on types in scanTypes[], and may use IterateForward()
* to do so on lists of such data. * to do so on lists of such data.
...@@ -230,7 +233,7 @@ public: ...@@ -230,7 +233,7 @@ public:
* @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan, * @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan,
* else SCAN_CONTINUE; * else SCAN_CONTINUE;
*/ */
virtual SEARCH_RESULT Traverse( INSPECTOR* inspector, void* testData, virtual SEARCH_RESULT Traverse( INSPECTOR* inspector, const void* testData,
const KICAD_T scanTypes[] ); const KICAD_T scanTypes[] );
......
...@@ -300,7 +300,7 @@ public: ...@@ -300,7 +300,7 @@ public:
{ {
} }
SEARCH_RESULT Inspect( EDA_BaseStruct* testItem, void* testData ) SEARCH_RESULT Inspect( EDA_BaseStruct* testItem, const void* testData )
{ {
const wxPoint* refPos = (const wxPoint*) testData; const wxPoint* refPos = (const wxPoint*) testData;
...@@ -336,9 +336,9 @@ EDA_BaseStruct* BOARD::FindModuleOrPad( const wxPoint& refPos ) ...@@ -336,9 +336,9 @@ EDA_BaseStruct* BOARD::FindModuleOrPad( const wxPoint& refPos )
{ {
ModuleOrPad inspector; ModuleOrPad inspector;
static const KICAD_T scanTypes[] = { TYPEMODULE, TYPEPAD, EOT }; static const KICAD_T scanTypes[] = { TYPEPAD, TYPEMODULE, EOT };
if( SEARCH_QUIT == IterateForward( m_Modules, &inspector, (void*) &refPos, scanTypes ) ) if( SEARCH_QUIT == IterateForward( m_Modules, &inspector, &refPos, scanTypes ) )
return inspector.found; return inspector.found;
return NULL; return NULL;
......
...@@ -1188,7 +1188,7 @@ void MODULE::Show( int nestLevel, std::ostream& os ) ...@@ -1188,7 +1188,7 @@ void MODULE::Show( int nestLevel, std::ostream& os )
// see class_module.h // see class_module.h
SEARCH_RESULT MODULE::Traverse( INSPECTOR* inspector, void* testData, SEARCH_RESULT MODULE::Traverse( INSPECTOR* inspector, const void* testData,
const KICAD_T scanTypes[] ) const KICAD_T scanTypes[] )
{ {
KICAD_T stype; KICAD_T stype;
......
...@@ -157,7 +157,7 @@ public: ...@@ -157,7 +157,7 @@ public:
* @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan, * @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan,
* else SCAN_CONTINUE; * else SCAN_CONTINUE;
*/ */
virtual SEARCH_RESULT Traverse( INSPECTOR* inspector, void* testData, virtual SEARCH_RESULT Traverse( INSPECTOR* inspector, const void* testData,
const KICAD_T scanTypes[] ); const KICAD_T scanTypes[] );
#endif #endif
......
...@@ -19,305 +19,320 @@ ...@@ -19,305 +19,320 @@
/**************************************************************/ /**************************************************************/
void EDA_BaseStruct::Place(WinEDA_DrawFrame * frame, wxDC * DC) void EDA_BaseStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC )
/**************************************************************/ /**************************************************************/
/* fonction virtuelle de placement: non utilisee en pcbnew (utilisee eeschema) /* fonction virtuelle de placement: non utilisee en pcbnew (utilisee eeschema)
---- A mieux utiliser (TODO...) * ---- A mieux utiliser (TODO...)
*/ */
{ {
} }
/**********************/
/**********************/ /* Classe EDGE_ZONE */
/* Classe EDGE_ZONE */ /**********************/
/**********************/
/* Classe EDGE_ZONE: constructeur */ /* Classe EDGE_ZONE: constructeur */
EDGE_ZONE::EDGE_ZONE(EDA_BaseStruct * parent): EDGE_ZONE::EDGE_ZONE( EDA_BaseStruct* parent ) :
DRAWSEGMENT( parent, TYPEEDGEZONE) DRAWSEGMENT( parent, TYPEEDGEZONE )
{ {
} }
/* Effacement memoire de la structure */ /* Effacement memoire de la structure */
EDGE_ZONE:: ~EDGE_ZONE(void) EDGE_ZONE:: ~EDGE_ZONE( void )
{ {
} }
/**********************/
/* Classe DRAWSEGMENT */ /**********************/
/**********************/ /* Classe DRAWSEGMENT */
/**********************/
/* Classe DRAWSEGMENT: constructeur */ /* Classe DRAWSEGMENT: constructeur */
DRAWSEGMENT::DRAWSEGMENT(EDA_BaseStruct * StructFather, DrawStructureType idtype): DRAWSEGMENT::DRAWSEGMENT( EDA_BaseStruct* StructFather, DrawStructureType idtype ) :
EDA_BaseLineStruct( StructFather, idtype) EDA_BaseLineStruct( StructFather, idtype )
{ {
m_Flags = m_Shape = m_Type = m_Angle = 0; m_Flags = m_Shape = m_Type = m_Angle = 0;
} }
/* Effacement memoire de la structure */ /* Effacement memoire de la structure */
DRAWSEGMENT:: ~DRAWSEGMENT(void) DRAWSEGMENT:: ~DRAWSEGMENT( void )
{ {
} }
void DRAWSEGMENT::UnLink( void ) void DRAWSEGMENT::UnLink( void )
{ {
/* Modification du chainage arriere */ /* Modification du chainage arriere */
if( Pback ) if( Pback )
{ {
if( Pback->m_StructType != TYPEPCB) if( Pback->m_StructType != TYPEPCB )
{ {
Pback->Pnext = Pnext; Pback->Pnext = Pnext;
} }
else /* Le chainage arriere pointe sur la structure "Pere" */
else /* Le chainage arriere pointe sur la structure "Pere" */ {
{ ( (BOARD*) Pback )->m_Drawings = Pnext;
((BOARD*)Pback)->m_Drawings = Pnext; }
} }
}
/* Modification du chainage avant */
/* Modification du chainage avant */ if( Pnext )
if( Pnext) Pnext->Pback = Pback; Pnext->Pback = Pback;
Pnext = Pback = NULL; Pnext = Pback = NULL;
} }
/*******************************************/ /*******************************************/
void DRAWSEGMENT::Copy(DRAWSEGMENT * source) void DRAWSEGMENT::Copy( DRAWSEGMENT* source )
/*******************************************/ /*******************************************/
{ {
m_Type = source->m_Type; m_Type = source->m_Type;
m_Layer = source->m_Layer; m_Layer = source->m_Layer;
m_Width = source->m_Width; m_Width = source->m_Width;
m_Start = source->m_Start; m_Start = source->m_Start;
m_End = source->m_End; m_End = source->m_End;
m_Shape = source->m_Shape; m_Shape = source->m_Shape;
m_Angle = source->m_Angle; m_Angle = source->m_Angle;
m_TimeStamp = source->m_TimeStamp; m_TimeStamp = source->m_TimeStamp;
} }
/********************************************************/ /********************************************************/
bool DRAWSEGMENT::WriteDrawSegmentDescr(FILE * File) bool DRAWSEGMENT::WriteDrawSegmentDescr( FILE* File )
/********************************************************/ /********************************************************/
{ {
if( GetState(DELETED) ) return FALSE; if( GetState( DELETED ) )
return FALSE;
fprintf( File, "$DRAWSEGMENT\n");
fprintf( File,"Po %d %d %d %d %d %d\n", fprintf( File, "$DRAWSEGMENT\n" );
m_Shape, fprintf( File, "Po %d %d %d %d %d %d\n",
m_Start.x, m_Start.y, m_Shape,
m_End.x, m_End.y, m_Width ); m_Start.x, m_Start.y,
fprintf( File,"De %d %d %d %lX %X\n", m_End.x, m_End.y, m_Width );
m_Layer, m_Type, m_Angle, fprintf( File, "De %d %d %d %lX %X\n",
m_TimeStamp, ReturnStatus()); m_Layer, m_Type, m_Angle,
fprintf( File, "$EndDRAWSEGMENT\n"); m_TimeStamp, ReturnStatus() );
return TRUE; fprintf( File, "$EndDRAWSEGMENT\n" );
return TRUE;
} }
/******************************************************************/ /******************************************************************/
bool DRAWSEGMENT::ReadDrawSegmentDescr(FILE * File, int * LineNum) bool DRAWSEGMENT::ReadDrawSegmentDescr( FILE* File, int* LineNum )
/******************************************************************/ /******************************************************************/
/* Lecture de la description de 1 segment type Drawing PCB /* Lecture de la description de 1 segment type Drawing PCB
*/ */
{ {
char Line[2048]; char Line[2048];
while( GetLine(File, Line, LineNum ) != NULL ) while( GetLine( File, Line, LineNum ) != NULL )
{ {
if(strnicmp(Line,"$End",4 ) == 0 ) return TRUE; /* fin de liste */ if( strnicmp( Line, "$End", 4 ) == 0 )
if(Line[0] == 'P') return TRUE; /* fin de liste */
{ if( Line[0] == 'P' )
sscanf( Line+2," %d %d %d %d %d %d", {
&m_Shape, &m_Start.x, &m_Start.y, sscanf( Line + 2, " %d %d %d %d %d %d",
&m_End.x, &m_End.y, &m_Width ); &m_Shape, &m_Start.x, &m_Start.y,
if ( m_Width < 0 ) m_Width = 0; &m_End.x, &m_End.y, &m_Width );
} if( m_Width < 0 )
m_Width = 0;
if(Line[0] == 'D') }
{
int status; if( Line[0] == 'D' )
sscanf( Line+2," %d %d %d %lX %X", {
&m_Layer, &m_Type, &m_Angle, int status;
&m_TimeStamp, &status); sscanf( Line + 2, " %d %d %d %lX %X",
&m_Layer, &m_Type, &m_Angle,
if ( m_Layer < FIRST_NO_COPPER_LAYER ) &m_TimeStamp, &status );
m_Layer = FIRST_NO_COPPER_LAYER;
if ( m_Layer > LAST_NO_COPPER_LAYER ) if( m_Layer < FIRST_NO_COPPER_LAYER )
m_Layer = LAST_NO_COPPER_LAYER; m_Layer = FIRST_NO_COPPER_LAYER;
if( m_Layer > LAST_NO_COPPER_LAYER )
SetState(status, ON); m_Layer = LAST_NO_COPPER_LAYER;
}
SetState( status, ON );
} }
return FALSE; }
return FALSE;
} }
/*******************/
/* Classe MARQUEUR */
/*******************/
/*******************/ MARQUEUR::MARQUEUR( EDA_BaseStruct* StructFather ) :
/* Classe MARQUEUR */ EDA_BaseStruct( StructFather, TYPEMARQUEUR )
/*******************/
MARQUEUR::MARQUEUR(EDA_BaseStruct * StructFather):
EDA_BaseStruct( StructFather, TYPEMARQUEUR)
{ {
m_Bitmap = NULL; m_Bitmap = NULL;
m_Type = 0; m_Type = 0;
m_Color = RED; m_Color = RED;
} }
/* Effacement memoire de la structure */ /* Effacement memoire de la structure */
MARQUEUR:: ~MARQUEUR(void) MARQUEUR:: ~MARQUEUR( void )
{ {
} }
/* supprime du chainage la structure Struct /* supprime du chainage la structure Struct
les structures arrieres et avant sont chainees directement * les structures arrieres et avant sont chainees directement
*/ */
void MARQUEUR::UnLink( void ) void MARQUEUR::UnLink( void )
{ {
/* Modification du chainage arriere */ /* Modification du chainage arriere */
if( Pback ) if( Pback )
{ {
if( Pback->m_StructType != TYPEPCB) if( Pback->m_StructType != TYPEPCB )
{ {
Pback->Pnext = Pnext; Pback->Pnext = Pnext;
} }
else /* Le chainage arriere pointe sur la structure "Pere" */
else /* Le chainage arriere pointe sur la structure "Pere" */ {
{ ( (BOARD*) Pback )->m_Drawings = Pnext;
((BOARD*)Pback)->m_Drawings = Pnext; }
} }
}
/* Modification du chainage avant */
/* Modification du chainage avant */ if( Pnext )
if( Pnext) Pnext->Pback = Pback; Pnext->Pback = Pback;
Pnext = Pback = NULL; Pnext = Pback = NULL;
} }
/**************************************************/
/**************************************************/ /* Class SCREEN: classe de gestion d'un affichage */
/* Class SCREEN: classe de gestion d'un affichage */ /***************************************************/
/***************************************************/
/* Constructeur de SCREEN */ /* Constructeur de SCREEN */
PCB_SCREEN::PCB_SCREEN(int idscreen): BASE_SCREEN(TYPESCREEN) PCB_SCREEN::PCB_SCREEN( int idscreen ) : BASE_SCREEN( TYPESCREEN )
{ {
int zoom_list[] = {1,2,4,8,16,32,64,128,256,512,1024,2048,0}; int zoom_list[] = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 0 };
m_Type = idscreen;
SetGridList(g_GridList); m_Type = idscreen;
SetZoomList(zoom_list); SetGridList( g_GridList );
Init(); SetZoomList( zoom_list );
Init();
} }
/***************************/ /***************************/
PCB_SCREEN::~PCB_SCREEN(void) PCB_SCREEN::~PCB_SCREEN( void )
/***************************/ /***************************/
{ {
} }
/*************************/ /*************************/
void PCB_SCREEN::Init(void) void PCB_SCREEN::Init( void )
/*************************/ /*************************/
{ {
InitDatas(); InitDatas();
m_Active_Layer = CUIVRE_N; /* ref couche active 0.. 31 */ m_Active_Layer = CUIVRE_N; /* ref couche active 0.. 31 */
m_Route_Layer_TOP = CMP_N; /* ref couches par defaut pour vias (Cu.. Cmp) */ m_Route_Layer_TOP = CMP_N; /* ref couches par defaut pour vias (Cu.. Cmp) */
m_Route_Layer_BOTTOM = CUIVRE_N; m_Route_Layer_BOTTOM = CUIVRE_N;
m_Zoom = 128; /* valeur */ m_Zoom = 128; /* valeur */
m_Grid = wxSize(500,500); /* pas de la grille en 1/10000 "*/ m_Grid = wxSize( 500, 500 ); /* pas de la grille en 1/10000 "*/
} }
/*************************/ /*************************/
/* class DISPLAY_OPTIONS */ /* class DISPLAY_OPTIONS */
/*************************/ /*************************/
/* /*
Options diverses d'affichage l'cran: * Options diverses d'affichage �l'�ran:
*/ */
DISPLAY_OPTIONS::DISPLAY_OPTIONS(void) DISPLAY_OPTIONS::DISPLAY_OPTIONS( void )
{ {
DisplayPadFill = TRUE; DisplayPadFill = TRUE;
DisplayPadNum = TRUE; DisplayPadNum = TRUE;
DisplayPadNoConn = TRUE; DisplayPadNoConn = TRUE;
DisplayPadIsol = TRUE; DisplayPadIsol = TRUE;
DisplayModEdge = TRUE; DisplayModEdge = TRUE;
DisplayModText = TRUE; DisplayModText = TRUE;
DisplayPcbTrackFill = TRUE; /* FALSE = sketch , TRUE = rempli */ DisplayPcbTrackFill = TRUE; /* FALSE = sketch , TRUE = rempli */
DisplayTrackIsol = FALSE; DisplayTrackIsol = FALSE;
m_DisplayViaMode = VIA_HOLE_NOT_SHOW; m_DisplayViaMode = VIA_HOLE_NOT_SHOW;
DisplayPolarCood = TRUE; DisplayPolarCood = TRUE;
DisplayZones = TRUE; DisplayZones = TRUE;
Show_Modules_Cmp = TRUE; Show_Modules_Cmp = TRUE;
Show_Modules_Cu = TRUE; Show_Modules_Cu = TRUE;
DisplayDrawItems = TRUE; DisplayDrawItems = TRUE;
ContrastModeDisplay = FALSE; ContrastModeDisplay = FALSE;
} }
/*****************************************************/ /*****************************************************/
EDA_BoardDesignSettings::EDA_BoardDesignSettings(void) EDA_BoardDesignSettings::EDA_BoardDesignSettings( void )
/*****************************************************/ /*****************************************************/
// Default values for designing boards // Default values for designing boards
{ {
int ii; int ii;
int default_layer_color[32]= { int default_layer_color[32] = {
GREEN, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, GREEN, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY,
LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY,
LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY,
LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, RED, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, RED,
LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY,
LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY,
MAGENTA, CYAN, MAGENTA, CYAN,
LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY,
LIGHTGRAY, LIGHTGRAY,
LIGHTGRAY, LIGHTGRAY,
LIGHTGRAY, LIGHTGRAY, LIGHTGRAY, LIGHTGRAY,
LIGHTGRAY, LIGHTGRAY,
LIGHTGRAY, LIGHTGRAY,
LIGHTGRAY, LIGHTGRAY,
LIGHTGRAY }; LIGHTGRAY
};
m_CopperLayerCount = 2; // Default design is a double sided board
m_ViaDrill = 250; // via drill (for the entire board) m_CopperLayerCount = 2; // Default design is a double sided board
m_CurrentViaSize = 450; // Current via size m_ViaDrill = 250; // via drill (for the entire board)
m_CurrentViaType = VIA_NORMALE; /* via type (BLIND, TROUGHT ...), bits 1 and 2 (not 0 and 1)*/ m_CurrentViaSize = 450; // Current via size
m_CurrentTrackWidth = 170; // current track width m_CurrentViaType = VIA_NORMALE; /* via type (BLIND, TROUGHT ...), bits 1 and 2 (not 0 and 1)*/
for ( ii = 0; ii < HIST0RY_NUMBER; ii ++ ) m_CurrentTrackWidth = 170; // current track width
{ for( ii = 0; ii < HIST0RY_NUMBER; ii++ )
m_TrackWidhtHistory[ii] = 0; // Last HIST0RY_NUMBER used track widths {
m_ViaSizeHistory[ii] = 0; // Last HIST0RY_NUMBER used via sizes m_TrackWidhtHistory[ii] = 0; // Last HIST0RY_NUMBER used track widths
} m_ViaSizeHistory[ii] = 0; // Last HIST0RY_NUMBER used via sizes
m_DrawSegmentWidth = 100; // current graphic line width (not EDGE layer) }
m_EdgeSegmentWidth = 100; // current graphic line width (EDGE layer only)
m_PcbTextWidth = 100; // current Pcb (not module) Text width m_DrawSegmentWidth = 100; // current graphic line width (not EDGE layer)
m_PcbTextSize = wxSize(500,500); // current Pcb (not module) Text size m_EdgeSegmentWidth = 100; // current graphic line width (EDGE layer only)
m_TrackClearence = 100; // track to track and track to pads clearance m_PcbTextWidth = 100; // current Pcb (not module) Text width
m_ZoneClearence = 150; // zone to track and zone to pads clearance m_PcbTextSize = wxSize( 500, 500 ); // current Pcb (not module) Text size
m_MaskMargin = 150; // Solder mask margin m_TrackClearence = 100; // track to track and track to pads clearance
/* Color options for screen display of the Printed Board: */ m_ZoneClearence = 150; // zone to track and zone to pads clearance
m_PcbGridColor = DARKGRAY; // Grid color m_MaskMargin = 150; // Solder mask margin
for ( ii = 0; ii < 32; ii ++ ) /* Color options for screen display of the Printed Board: */
m_LayerColor[ii] = default_layer_color[ii]; // Layer colors (tracks and graphic items) m_PcbGridColor = DARKGRAY; // Grid color
m_ViaColor[VIA_BORGNE] = CYAN; for( ii = 0; ii < 32; ii++ )
m_ViaColor[VIA_ENTERREE] = BROWN; m_LayerColor[ii] = default_layer_color[ii];
m_ViaColor[VIA_NORMALE] = WHITE;
m_ModuleTextCMPColor = LIGHTGRAY; // Text module color for modules on the COMPONENT layer // Layer colors (tracks and graphic items)
m_ModuleTextCUColor = MAGENTA; // Text module color for modules on the COPPER layer m_ViaColor[VIA_BORGNE] = CYAN;
m_ModuleTextNOVColor = DARKGRAY; // Text module color for "invisible" texts (must be BLACK if really not displayed) m_ViaColor[VIA_ENTERREE] = BROWN;
m_AnchorColor = BLUE; // Anchor color for modules and texts m_ViaColor[VIA_NORMALE] = WHITE;
m_PadCUColor = GREEN; // Pad color for the COMPONENT side of the pad m_ModuleTextCMPColor = LIGHTGRAY; // Text module color for modules on the COMPONENT layer
m_PadCMPColor = RED; // Pad color for the COPPER side of the pad m_ModuleTextCUColor = MAGENTA; // Text module color for modules on the COPPER layer
m_RatsnestColor = WHITE; // Ratsnest color m_ModuleTextNOVColor = DARKGRAY; // Text module color for "invisible" texts (must be BLACK if really not displayed)
m_AnchorColor = BLUE; // Anchor color for modules and texts
m_PadCUColor = GREEN; // Pad color for the COMPONENT side of the pad
m_PadCMPColor = RED; // Pad color for the COPPER side of the pad
m_RatsnestColor = WHITE; // Ratsnest color
} }
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