Commit f3c324d5 authored by dickelbeck's avatar dickelbeck

EDA_BaseStruct::m_StructType is now type KICAD_T

parent 908f6d93
...@@ -25,8 +25,8 @@ S3D_Vertex::S3D_Vertex(void) ...@@ -25,8 +25,8 @@ S3D_Vertex::S3D_Vertex(void)
/**************************************************************************/ /**************************************************************************/
S3D_Material::S3D_Material(Struct3D_Master * father, const wxString & name): S3D_Material::S3D_Material( Struct3D_Master * father, const wxString & name ):
EDA_BaseStruct( father, -1) EDA_BaseStruct( father, NOT_USED )
/**************************************************************************/ /**************************************************************************/
{ {
m_DiffuseColor.x = m_DiffuseColor.y = m_DiffuseColor.z = 1.0; m_DiffuseColor.x = m_DiffuseColor.y = m_DiffuseColor.z = 1.0;
...@@ -67,7 +67,7 @@ void Struct3D_Master::Copy(Struct3D_Master * pattern) ...@@ -67,7 +67,7 @@ void Struct3D_Master::Copy(Struct3D_Master * pattern)
/***************************************************************/ /***************************************************************/
Struct3D_Master::Struct3D_Master(EDA_BaseStruct * StructFather): Struct3D_Master::Struct3D_Master(EDA_BaseStruct * StructFather):
EDA_BaseStruct( StructFather, -1) EDA_BaseStruct( StructFather, NOT_USED )
/***************************************************************/ /***************************************************************/
{ {
m_MatScale.x = m_MatScale.y = m_MatScale.z = 1.0; m_MatScale.x = m_MatScale.y = m_MatScale.z = 1.0;
...@@ -100,7 +100,7 @@ S3D_Material * nextmat; ...@@ -100,7 +100,7 @@ S3D_Material * nextmat;
/***************************************************************/ /***************************************************************/
Struct3D_Shape::Struct3D_Shape(EDA_BaseStruct * StructFather): Struct3D_Shape::Struct3D_Shape(EDA_BaseStruct * StructFather):
EDA_BaseStruct( StructFather, -1) EDA_BaseStruct( StructFather, NOT_USED )
/***************************************************************/ /***************************************************************/
{ {
m_3D_Coord = NULL; m_3D_Coord = NULL;
......
...@@ -5,6 +5,18 @@ Please add newer entries at the top, list the date and your name with ...@@ -5,6 +5,18 @@ Please add newer entries at the top, list the date and your name with
email address. email address.
2007-Aug-23 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+ eeschema & pcbnew
* Removed class EDA_BaseLineStruct, which brought no behavioral advantage, only data.
Classes which were based on got its data members added and their initializers.
* Changed type of EDA_BaseStruct::m_StructType from int to KICAD_T which is an
enum. This makes debugging easier since gdb will show the name of the
KICAD_T rather than simply a number. Added NOT_USED = -1 to KICAD_T enum for
3d which was using -1.
* More beautification using latest uncrustify and the committed uncrustify.cfg
2007-Aug-24 UPDATE Geoff Harland <gharlandau@yahoo.com.au> 2007-Aug-24 UPDATE Geoff Harland <gharlandau@yahoo.com.au>
================================================================================ ================================================================================
+ pcbnew + pcbnew
...@@ -27,9 +39,6 @@ email address. ...@@ -27,9 +39,6 @@ email address.
tomorrow I will add a new class COLLECTORS_GUIDE which can be used by a tomorrow I will add a new class COLLECTORS_GUIDE which can be used by a
COLLECTOR to control its operation. It adds the concept of layer COLLECTOR to control its operation. It adds the concept of layer
locking, even though PCBNEW does not support that in the UI yet. locking, even though PCBNEW does not support that in the UI yet.
@todo:
add constructor initializers for classes that were derived from
EDA_BaseLineStruct but are now not. Its late, will do tomorrow.
2007-Aug-22 UPDATE Dick Hollenbeck <dick@softplc.com> 2007-Aug-22 UPDATE Dick Hollenbeck <dick@softplc.com>
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#include "macros.h" #include "macros.h"
// DrawStructureType names for error messages only: // KICAD_T names for error messages only:
static wxString DrawStructureTypeName[MAX_STRUCT_TYPE_ID + 1] = { static wxString KICAD_TName[MAX_STRUCT_TYPE_ID + 1] = {
wxT( "Not init" ), wxT( "Not init" ),
wxT( "Pcb" ), wxT( "Pcb" ),
...@@ -74,7 +74,7 @@ enum textbox { ...@@ -74,7 +74,7 @@ enum textbox {
/******************************************************************************/ /******************************************************************************/
EDA_BaseStruct::EDA_BaseStruct( EDA_BaseStruct* parent, int idType ) EDA_BaseStruct::EDA_BaseStruct( EDA_BaseStruct* parent, KICAD_T idType )
/******************************************************************************/ /******************************************************************************/
{ {
InitVars(); InitVars();
...@@ -84,7 +84,7 @@ EDA_BaseStruct::EDA_BaseStruct( EDA_BaseStruct* parent, int idType ) ...@@ -84,7 +84,7 @@ EDA_BaseStruct::EDA_BaseStruct( EDA_BaseStruct* parent, int idType )
/********************************************/ /********************************************/
EDA_BaseStruct::EDA_BaseStruct( int idType ) EDA_BaseStruct::EDA_BaseStruct( KICAD_T idType )
/********************************************/ /********************************************/
{ {
InitVars(); InitVars();
...@@ -183,7 +183,7 @@ wxString EDA_BaseStruct::ReturnClassName() const ...@@ -183,7 +183,7 @@ wxString EDA_BaseStruct::ReturnClassName() const
if( (ii < 0) || (ii > MAX_STRUCT_TYPE_ID) ) if( (ii < 0) || (ii > MAX_STRUCT_TYPE_ID) )
ii = MAX_STRUCT_TYPE_ID; ii = MAX_STRUCT_TYPE_ID;
classname = DrawStructureTypeName[ii]; classname = KICAD_TName[ii];
return classname; return classname;
} }
...@@ -287,16 +287,6 @@ std::ostream& EDA_BaseStruct::NestedSpace( int nestLevel, std::ostream& os ) ...@@ -287,16 +287,6 @@ std::ostream& EDA_BaseStruct::NestedSpace( int nestLevel, std::ostream& os )
/**********************************************************************************************/
EDA_BaseLineStruct::EDA_BaseLineStruct( EDA_BaseStruct* StructFather, DrawStructureType idtype ) :
EDA_BaseStruct( StructFather, idtype )
/**********************************************************************************************/
{
m_Layer = 0;
m_Width = 0; // 0 = line, > 0 = tracks, bus ...
};
/*********************************************************/ /*********************************************************/
/* EDA_TextStruct (classe de base, non utilis� seule */ /* EDA_TextStruct (classe de base, non utilis� seule */
/*********************************************************/ /*********************************************************/
......
/**********************************************************/ /**********************************************************/
/* Routines d'affichage de parametres et caracteristiques */ /* Routines d'affichage de parametres et caracteristiques */
/**********************************************************/ /**********************************************************/
/* Fichier AFFICHE.CPP */ /* Fichier AFFICHE.CPP */
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
...@@ -15,136 +15,175 @@ ...@@ -15,136 +15,175 @@
/***********************************************************/ /***********************************************************/
void DrawSheetStruct::Display_Infos(WinEDA_DrawFrame * frame) void DrawSheetStruct::Display_Infos( WinEDA_DrawFrame* frame )
/************************************************************/ /************************************************************/
{ {
frame->MsgPanel->EraseMsgBox(); frame->MsgPanel->EraseMsgBox();
Affiche_1_Parametre(frame, 1, _("Name"), m_SheetName, CYAN); Affiche_1_Parametre( frame, 1, _( "Name" ), m_SheetName, CYAN );
Affiche_1_Parametre(frame, 30, _("FileName"), m_FileName, BROWN); Affiche_1_Parametre( frame, 30, _( "FileName" ), m_FileName, BROWN );
} }
/***************************************************************/ /***************************************************************/
void EDA_SchComponentStruct::Display_Infos(WinEDA_DrawFrame * frame) void EDA_SchComponentStruct::Display_Infos( WinEDA_DrawFrame* frame )
/***************************************************************/ /***************************************************************/
{ {
EDA_LibComponentStruct * Entry = FindLibPart(m_ChipName.GetData(),wxEmptyString,FIND_ROOT);; EDA_LibComponentStruct* Entry = FindLibPart( m_ChipName.GetData(), wxEmptyString, FIND_ROOT );;
wxString msg;
frame->MsgPanel->EraseMsgBox();
Affiche_1_Parametre(frame, 1, _("Ref"), wxString msg;
m_Field[REFERENCE].m_Text, DARKCYAN);
if (Entry && Entry->m_Options == ENTRY_POWER) frame->MsgPanel->EraseMsgBox();
msg = _("Pwr Symb");
else msg = _("Val");
Affiche_1_Parametre(frame, 10, msg, m_Field[VALUE].m_Text, DARKCYAN);
Affiche_1_Parametre(frame, 28, _("RefLib"), m_ChipName.GetData(), BROWN); Affiche_1_Parametre( frame, 1, _( "Ref" ),
m_Field[REFERENCE].m_Text, DARKCYAN );
msg = FindLibName; if( Entry && Entry->m_Options == ENTRY_POWER )
Affiche_1_Parametre(frame, 40, _("Lib"), msg, DARKRED); msg = _( "Pwr Symb" );
else
msg = _( "Val" );
Affiche_1_Parametre( frame, 10, msg, m_Field[VALUE].m_Text, DARKCYAN );
if( Entry ) Affiche_1_Parametre( frame, 28, _( "RefLib" ), m_ChipName.GetData(), BROWN );
{
Affiche_1_Parametre(frame, 52, Entry->m_Doc, wxEmptyString, DARKCYAN);
Affiche_1_Parametre(frame, 52, wxEmptyString, Entry->m_KeyWord, DARKGREEN);
}
}
msg = FindLibName;
Affiche_1_Parametre( frame, 40, _( "Lib" ), msg, DARKRED );
if( Entry )
{
Affiche_1_Parametre( frame, 52, Entry->m_Doc, wxEmptyString, DARKCYAN );
Affiche_1_Parametre( frame, 52, wxEmptyString, Entry->m_KeyWord, DARKGREEN );
}
}
/*******************************************************/ /*******************************************************/
void LibDrawPin::Display_Infos(WinEDA_DrawFrame * frame) void LibDrawPin::Display_Infos( WinEDA_DrawFrame* frame )
/*******************************************************/ /*******************************************************/
/* Affiche en bas d'ecran les caracteristiques de la pin /* Affiche en bas d'ecran les caracteristiques de la pin
*/ */
{ {
wxString Text; wxString Text;
int ii; int ii;
frame->MsgPanel->EraseMsgBox();
/* Affichage du nom */
Affiche_1_Parametre( frame, 24, _( "PinName" ), m_PinName, DARKCYAN );
frame->MsgPanel->EraseMsgBox(); /* Affichage du numero */
if( m_PinNum == 0 )
Text = wxT( "?" );
else
ReturnPinStringNum( Text );
/* Affichage du nom */ Affiche_1_Parametre( frame, 40, _( "PinNum" ), Text, DARKCYAN );
Affiche_1_Parametre(frame, 24, _("PinName"), m_PinName, DARKCYAN);
/* Affichage du numero */ /* Affichage du type */
if(m_PinNum == 0) Text = wxT("?" ); ii = m_PinType;
else ReturnPinStringNum(Text); Affiche_1_Parametre( frame, 48, _( "PinType" ), MsgPinElectricType[ii], RED );
Affiche_1_Parametre(frame, 40, _("PinNum"), Text, DARKCYAN); /* Affichage de la visiblite */
ii = m_Attributs;
if( ii & 1 )
Text = _( "no" );
else
Text = _( "yes" );
Affiche_1_Parametre( frame, 58, _( "Display" ), Text, DARKGREEN );
/* Affichage du type */ /* Affichage de la longueur */
ii = m_PinType; Text.Printf( wxT( "%d" ), m_PinLen );
Affiche_1_Parametre(frame, 48, _("PinType"), MsgPinElectricType[ii], RED); Affiche_1_Parametre( frame, 66, _( "Lengh" ), Text, MAGENTA );
/* Affichage de la visiblite */ /* Affichage de l'orientation */
ii = m_Attributs; switch( m_Orient )
if( ii & 1 ) Text = _("no"); {
else Text = _("yes"); case PIN_UP:
Affiche_1_Parametre(frame, 58, _("Display"), Text, DARKGREEN); Text = _( "Up" ); break;
/* Affichage de la longueur */ case PIN_DOWN:
Text.Printf( wxT("%d"), m_PinLen); Text = _( "Down" ); break;
Affiche_1_Parametre(frame, 66, _("Lengh"), Text, MAGENTA);
/* Affichage de l'orientation */ case PIN_LEFT:
switch(m_Orient) Text = _( "Left" ); break;
{
case PIN_UP: Text = _("Up"); break;
case PIN_DOWN: Text = _("Down"); break;
case PIN_LEFT: Text = _("Left"); break;
case PIN_RIGHT: Text = _("Right"); break;
default: Text = wxT("??"); break;
}
Affiche_1_Parametre(frame, 72, _("Orient"), Text, MAGENTA); case PIN_RIGHT:
Text = _( "Right" ); break;
default:
Text = wxT( "??" ); break;
}
Affiche_1_Parametre( frame, 72, _( "Orient" ), Text, MAGENTA );
} }
/***********************************************************************/ /***********************************************************************/
void LibEDA_BaseStruct::Display_Infos_DrawEntry(WinEDA_DrawFrame * frame) void LibEDA_BaseStruct::Display_Infos_DrawEntry( WinEDA_DrawFrame* frame )
/***********************************************************************/ /***********************************************************************/
/* Affiche en bas d'ecran les caracteristiques de l'element /* Affiche en bas d'ecran les caracteristiques de l'element
*/ */
{ {
wxString msg; wxString msg;
frame->MsgPanel->EraseMsgBox(); frame->MsgPanel->EraseMsgBox();
/* affichage du type */ /* affichage du type */
msg = wxT("??"); msg = wxT( "??" );
switch( m_StructType )
{
case COMPONENT_ARC_DRAW_TYPE: msg = wxT("Arc"); break;
case COMPONENT_CIRCLE_DRAW_TYPE: msg = wxT("Circle"); break;
case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE: msg = wxT("Text"); break;
case COMPONENT_RECT_DRAW_TYPE: msg = wxT("Rect"); break;
case COMPONENT_POLYLINE_DRAW_TYPE: msg = wxT("PolyLine"); break;
case COMPONENT_LINE_DRAW_TYPE: msg = wxT("Segment"); break;
case COMPONENT_PIN_DRAW_TYPE:
((LibDrawPin*) this)->Display_Infos(frame);
msg = wxT("Pin");
break;
}
Affiche_1_Parametre(frame, 1, wxT("Type"), msg, CYAN);
/* Affichage de l'appartenance */
if( m_Unit == 0 ) msg = _("All");
else msg.Printf( wxT("%d"), m_Unit );
Affiche_1_Parametre(frame, 10, _("Unit"), msg, BROWN);
if( m_Convert == 0 ) msg = _("All" );
else if( m_Convert == 1 ) msg = _("no");
else if( m_Convert == 2 ) msg = _("yes");
else msg = wxT("?");
Affiche_1_Parametre(frame, 16, _("Convert"), msg, BROWN);
if ( m_Width ) valeur_param(m_Width, msg);
else msg = _("default");
Affiche_1_Parametre(frame, 24, _("Width"), msg, BLUE);
}
switch( m_StructType )
{
case COMPONENT_ARC_DRAW_TYPE:
msg = wxT( "Arc" ); break;
case COMPONENT_CIRCLE_DRAW_TYPE:
msg = wxT( "Circle" ); break;
case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE:
msg = wxT( "Text" ); break;
case COMPONENT_RECT_DRAW_TYPE:
msg = wxT( "Rect" ); break;
case COMPONENT_POLYLINE_DRAW_TYPE:
msg = wxT( "PolyLine" ); break;
case COMPONENT_LINE_DRAW_TYPE:
msg = wxT( "Segment" ); break;
case COMPONENT_PIN_DRAW_TYPE:
( (LibDrawPin*) this )->Display_Infos( frame );
msg = wxT( "Pin" );
break;
default:
;
}
Affiche_1_Parametre( frame, 1, wxT( "Type" ), msg, CYAN );
/* Affichage de l'appartenance */
if( m_Unit == 0 )
msg = _( "All" );
else
msg.Printf( wxT( "%d" ), m_Unit );
Affiche_1_Parametre( frame, 10, _( "Unit" ), msg, BROWN );
if( m_Convert == 0 )
msg = _( "All" );
else if( m_Convert == 1 )
msg = _( "no" );
else if( m_Convert == 2 )
msg = _( "yes" );
else
msg = wxT( "?" );
Affiche_1_Parametre( frame, 16, _( "Convert" ), msg, BROWN );
if( m_Width )
valeur_param( m_Width, msg );
else
msg = _( "default" );
Affiche_1_Parametre( frame, 24, _( "Width" ), msg, BLUE );
}
...@@ -841,6 +841,9 @@ static EDA_BaseStruct* CopyStruct( WinEDA_DrawPanel* panel, wxDC* DC, BASE_SCREE ...@@ -841,6 +841,9 @@ static EDA_BaseStruct* CopyStruct( WinEDA_DrawPanel* panel, wxDC* DC, BASE_SCREE
sheet->m_FileName = sheet->m_SheetName + wxT( ".sch" ); sheet->m_FileName = sheet->m_SheetName + wxT( ".sch" );
break; break;
} }
default:
;
} }
SetStructFather( Struct, screen ); SetStructFather( Struct, screen );
......
...@@ -594,6 +594,9 @@ void MoveMarkedItems( EDA_LibComponentStruct* LibEntry, wxPoint offset ) ...@@ -594,6 +594,9 @@ void MoveMarkedItems( EDA_LibComponentStruct* LibEntry, wxPoint offset )
( (LibDrawText*) item )->m_Pos.x += offset.x; ( (LibDrawText*) item )->m_Pos.x += offset.x;
( (LibDrawText*) item )->m_Pos.y += offset.y; ( (LibDrawText*) item )->m_Pos.y += offset.y;
break; break;
default:
;
} }
item->m_Flags = item->m_Selected = 0; item->m_Flags = item->m_Selected = 0;
...@@ -701,6 +704,9 @@ void MirrorMarkedItems( EDA_LibComponentStruct* LibEntry, wxPoint offset ) ...@@ -701,6 +704,9 @@ void MirrorMarkedItems( EDA_LibComponentStruct* LibEntry, wxPoint offset )
case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE: case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE:
SETMIRROR( ( (LibDrawText*) item )->m_Pos.x ); SETMIRROR( ( (LibDrawText*) item )->m_Pos.x );
break; break;
default:
;
} }
item->m_Flags = item->m_Selected = 0; item->m_Flags = item->m_Selected = 0;
......
...@@ -148,7 +148,7 @@ wxString DrawMarkerStruct::GetComment( void ) ...@@ -148,7 +148,7 @@ wxString DrawMarkerStruct::GetComment( void )
/***************************/ /***************************/
EDA_DrawLineStruct::EDA_DrawLineStruct( const wxPoint& pos, int layer ) : EDA_DrawLineStruct::EDA_DrawLineStruct( const wxPoint& pos, int layer ) :
EDA_BaseLineStruct( NULL, DRAW_SEGMENT_STRUCT_TYPE ) EDA_BaseStruct( NULL, DRAW_SEGMENT_STRUCT_TYPE )
{ {
m_Start = pos; m_Start = pos;
m_End = pos; m_End = pos;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
/***************************/ /***************************/
/***********************************************************************************/ /***********************************************************************************/
DrawPartStruct::DrawPartStruct( DrawStructureType struct_type, const wxPoint & pos): DrawPartStruct::DrawPartStruct( KICAD_T struct_type, const wxPoint & pos):
EDA_BaseStruct(struct_type) EDA_BaseStruct(struct_type)
/***********************************************************************************/ /***********************************************************************************/
{ {
......
...@@ -70,7 +70,7 @@ public: ...@@ -70,7 +70,7 @@ public:
wxPoint m_Pos; /* Exact position of part. */ wxPoint m_Pos; /* Exact position of part. */
public: public:
DrawPartStruct( DrawStructureType struct_type, const wxPoint & pos); DrawPartStruct( KICAD_T struct_type, const wxPoint & pos);
~DrawPartStruct(void); ~DrawPartStruct(void);
}; };
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -212,6 +212,8 @@ wxPoint MousePos = m_CurrentScreen->m_MousePosition; ...@@ -212,6 +212,8 @@ wxPoint MousePos = m_CurrentScreen->m_MousePosition;
} }
ChangeTextOrient( (DrawTextStruct*)DrawStruct, DC); ChangeTextOrient( (DrawTextStruct*)DrawStruct, DC);
break; break;
default:;
} }
break; break;
......
This diff is collapsed.
This diff is collapsed.
...@@ -543,6 +543,7 @@ wxClientDC dc(DrawPanel); ...@@ -543,6 +543,7 @@ wxClientDC dc(DrawPanel);
case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE: case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE:
EditSymbolText(&dc, CurrentDrawItem); EditSymbolText(&dc, CurrentDrawItem);
break; break;
default:;
} }
DrawPanel->CursorOn(&dc); DrawPanel->CursorOn(&dc);
} }
......
...@@ -839,6 +839,9 @@ int seuil; ...@@ -839,6 +839,9 @@ int seuil;
return(DrawItem); /* Texte trouve */ return(DrawItem); /* Texte trouve */
} }
break; break;
default:
;
} }
} }
return(NULL); return(NULL);
......
...@@ -290,6 +290,9 @@ wxPoint pos; ...@@ -290,6 +290,9 @@ wxPoint pos;
MyFree(Poly); MyFree(Poly);
} }
break; break;
default:;
} /* Fin Switch */ } /* Fin Switch */
Plume('U'); Plume('U');
} /* Fin Boucle de dessin */ } /* Fin Boucle de dessin */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -14,8 +14,10 @@ extern std::ostream& operator<<( std::ostream& out, const wxPoint& pt ); ...@@ -14,8 +14,10 @@ extern std::ostream& operator<<( std::ostream& out, const wxPoint& pt );
/* Id for class identification, at run time */ /* Id for class identification, at run time */
enum DrawStructureType { enum KICAD_T {
NOT_USED = -1, // the 3d code uses this value
EOT = 0, // search types array terminator (End Of Types) EOT = 0, // search types array terminator (End Of Types)
TYPE_NOT_INIT = 0, TYPE_NOT_INIT = 0,
...@@ -80,7 +82,6 @@ enum SEARCH_RESULT { ...@@ -80,7 +82,6 @@ enum SEARCH_RESULT {
SEARCH_CONTINUE SEARCH_CONTINUE
}; };
typedef DrawStructureType KICAD_T; // shorter name
class EDA_BaseStruct; class EDA_BaseStruct;
class WinEDA_DrawFrame; class WinEDA_DrawFrame;
...@@ -126,7 +127,7 @@ public: ...@@ -126,7 +127,7 @@ public:
class EDA_BaseStruct /* Basic class, not directly used */ class EDA_BaseStruct /* Basic class, not directly used */
{ {
public: public:
int m_StructType; /* Struct ident for run time identification */ KICAD_T m_StructType; /* Struct ident for run time identification */
EDA_BaseStruct* Pnext; /* Linked list: Link (next struct) */ EDA_BaseStruct* Pnext; /* Linked list: Link (next struct) */
EDA_BaseStruct* Pback; /* Linked list: Link (previous struct) */ EDA_BaseStruct* Pback; /* Linked list: Link (previous struct) */
EDA_BaseStruct* m_Parent; /* Linked list: Link (parent struct) */ EDA_BaseStruct* m_Parent; /* Linked list: Link (parent struct) */
...@@ -163,11 +164,11 @@ private: ...@@ -163,11 +164,11 @@ private:
public: public:
EDA_BaseStruct( EDA_BaseStruct* parent, int idType ); EDA_BaseStruct( EDA_BaseStruct* parent, KICAD_T idType );
EDA_BaseStruct( int struct_type ); EDA_BaseStruct( KICAD_T struct_type );
virtual ~EDA_BaseStruct() { }; virtual ~EDA_BaseStruct() { };
EDA_BaseStruct* Next( void ) { return Pnext; } EDA_BaseStruct* Next() { return Pnext; }
/* Gestion de l'etat (status) de la structure (active, deleted..) */ /* Gestion de l'etat (status) de la structure (active, deleted..) */
int GetState( int type ); int GetState( int type );
...@@ -381,7 +382,7 @@ protected: ...@@ -381,7 +382,7 @@ protected:
public: public:
BOARD_ITEM( BOARD_ITEM* StructFather, DrawStructureType idtype ) : BOARD_ITEM( BOARD_ITEM* StructFather, KICAD_T idtype ) :
EDA_BaseStruct( StructFather, idtype ), EDA_BaseStruct( StructFather, idtype ),
m_Layer(0) m_Layer(0)
{ {
...@@ -450,22 +451,6 @@ public: ...@@ -450,22 +451,6 @@ public:
}; };
/* Base class for building items like lines, which have 1 start point and 1 end point.
* Arc and circles can use this class.
*/
class EDA_BaseLineStruct : public EDA_BaseStruct
{
public:
int m_Layer; // Layer number
int m_Width; // 0 = line, > 0 = tracks, bus ...
wxPoint m_Start; // Line start point
wxPoint m_End; // Line end point
public:
EDA_BaseLineStruct( EDA_BaseStruct* StructFather, DrawStructureType idtype );
};
/**************************/ /**************************/
/* class DrawPickedStruct */ /* class DrawPickedStruct */
/**************************/ /**************************/
......
...@@ -358,7 +358,7 @@ public: ...@@ -358,7 +358,7 @@ public:
int m_Angle; // pour les arcs: "longueur" de l'arc en 1/10 deg int m_Angle; // pour les arcs: "longueur" de l'arc en 1/10 deg
public: public:
DRAWSEGMENT( BOARD_ITEM* StructFather, DrawStructureType idtype = TYPEDRAWSEGMENT ); DRAWSEGMENT( BOARD_ITEM* StructFather, KICAD_T idtype = TYPEDRAWSEGMENT );
~DRAWSEGMENT( void ); ~DRAWSEGMENT( void );
// Read/write data // Read/write data
......
...@@ -501,7 +501,7 @@ public: ...@@ -501,7 +501,7 @@ public:
virtual void SwitchLayer( wxDC* DC, int layer ); virtual void SwitchLayer( wxDC* DC, int layer );
// divers // divers
void AddHistory( int value, DrawStructureType type ); // Add value in data list history void AddHistory( int value, KICAD_T type ); // Add value in data list history
void InstallGridFrame( const wxPoint& pos ); void InstallGridFrame( const wxPoint& pos );
}; };
......
...@@ -502,6 +502,9 @@ void MoveMarkedItems( MODULE* module, wxPoint offset ) ...@@ -502,6 +502,9 @@ void MoveMarkedItems( MODULE* module, wxPoint offset )
( (EDGE_MODULE*) item )->m_End0.x += offset.x; ( (EDGE_MODULE*) item )->m_End0.x += offset.x;
( (EDGE_MODULE*) item )->m_End0.y += offset.y; ( (EDGE_MODULE*) item )->m_End0.y += offset.y;
break; break;
default:
;
} }
item->m_Flags = item->m_Selected = 0; item->m_Flags = item->m_Selected = 0;
...@@ -588,6 +591,9 @@ void MirrorMarkedItems( MODULE* module, wxPoint offset ) ...@@ -588,6 +591,9 @@ void MirrorMarkedItems( MODULE* module, wxPoint offset )
SETMIRROR( ( (TEXTE_MODULE*) item )->m_Pos.x ); SETMIRROR( ( (TEXTE_MODULE*) item )->m_Pos.x );
( (TEXTE_MODULE*) item )->m_Pos0.x = ( (TEXTE_MODULE*) item )->m_Pos.x; ( (TEXTE_MODULE*) item )->m_Pos0.x = ( (TEXTE_MODULE*) item )->m_Pos.x;
break; break;
default:
;
} }
item->m_Flags = item->m_Selected = 0; item->m_Flags = item->m_Selected = 0;
...@@ -639,6 +645,9 @@ void RotateMarkedItems( MODULE* module, wxPoint offset ) ...@@ -639,6 +645,9 @@ void RotateMarkedItems( MODULE* module, wxPoint offset )
( (TEXTE_MODULE*) item )->m_Pos0 = ( (TEXTE_MODULE*) item )->m_Pos; ( (TEXTE_MODULE*) item )->m_Pos0 = ( (TEXTE_MODULE*) item )->m_Pos;
( (TEXTE_MODULE*) item )->m_Orient += 900; ( (TEXTE_MODULE*) item )->m_Orient += 900;
break; break;
default:
;
} }
item->m_Flags = item->m_Selected = 0; item->m_Flags = item->m_Selected = 0;
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
EDGE_MODULE::EDGE_MODULE( MODULE* parent ) : EDGE_MODULE::EDGE_MODULE( MODULE* parent ) :
BOARD_ITEM( parent, TYPEEDGEMODULE ) BOARD_ITEM( parent, TYPEEDGEMODULE )
{ {
m_Width = 0;
m_Shape = S_SEGMENT; m_Shape = S_SEGMENT;
m_Angle = 0; m_Angle = 0;
m_Width = 120; m_Width = 120;
......
...@@ -22,9 +22,10 @@ ...@@ -22,9 +22,10 @@
/* Constructeur des classes type pistes, vias et zones */ /* Constructeur des classes type pistes, vias et zones */
TRACK::TRACK( BOARD_ITEM* StructFather, DrawStructureType idtype ) : TRACK::TRACK( BOARD_ITEM* StructFather, KICAD_T idtype ) :
BOARD_ITEM( StructFather, idtype ) BOARD_ITEM( StructFather, idtype )
{ {
m_Width = 0;
m_Shape = S_SEGMENT; m_Shape = S_SEGMENT;
start = end = NULL; start = end = NULL;
m_NetCode = 0; m_NetCode = 0;
......
...@@ -40,7 +40,7 @@ public: ...@@ -40,7 +40,7 @@ public:
int m_Param; // Auxiliary variable ( used in some computations ) int m_Param; // Auxiliary variable ( used in some computations )
public: public:
TRACK( BOARD_ITEM* StructFather, DrawStructureType idtype = TYPETRACK ); TRACK( BOARD_ITEM* StructFather, KICAD_T idtype = TYPETRACK );
TRACK( const TRACK& track ); TRACK( const TRACK& track );
TRACK* Next() { return (TRACK*) Pnext; } TRACK* Next() { return (TRACK*) Pnext; }
......
...@@ -52,10 +52,10 @@ EDGE_ZONE:: ~EDGE_ZONE( void ) ...@@ -52,10 +52,10 @@ EDGE_ZONE:: ~EDGE_ZONE( void )
/**********************/ /**********************/
/* Classe DRAWSEGMENT: constructeur */ /* Classe DRAWSEGMENT: constructeur */
DRAWSEGMENT::DRAWSEGMENT( BOARD_ITEM* StructFather, DrawStructureType idtype ) : DRAWSEGMENT::DRAWSEGMENT( BOARD_ITEM* StructFather, KICAD_T idtype ) :
BOARD_ITEM( StructFather, idtype ) BOARD_ITEM( StructFather, idtype )
{ {
m_Flags = m_Shape = m_Type = m_Angle = 0; m_Width = m_Flags = m_Shape = m_Type = m_Angle = 0;
} }
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
/* Constructeur des classes type pistes, vias et zones */ /* Constructeur des classes type pistes, vias et zones */
TRACK::TRACK( EDA_BaseStruct* StructFather, DrawStructureType idtype ) : TRACK::TRACK( EDA_BaseStruct* StructFather, KICAD_T idtype ) :
SEGDRAW_Struct( StructFather, idtype ) SEGDRAW_Struct( StructFather, idtype )
{ {
m_Shape = S_SEGMENT; m_Shape = S_SEGMENT;
......
...@@ -281,7 +281,7 @@ void WinEDA_PcbTracksDialog::AcceptPcbOptions(wxCommandEvent& event) ...@@ -281,7 +281,7 @@ void WinEDA_PcbTracksDialog::AcceptPcbOptions(wxCommandEvent& event)
/*********************************************************************/ /*********************************************************************/
void WinEDA_BasePcbFrame::AddHistory(int value, DrawStructureType type) void WinEDA_BasePcbFrame::AddHistory(int value, KICAD_T type)
/**********************************************************************/ /**********************************************************************/
// Mise a jour des listes des dernieres epaisseurs de via et track utilisées // Mise a jour des listes des dernieres epaisseurs de via et track utilisées
{ {
......
...@@ -1254,6 +1254,9 @@ int* WinEDA_BasePcbFrame::build_ratsnest_pad( EDA_BaseStruct* ref, ...@@ -1254,6 +1254,9 @@ int* WinEDA_BasePcbFrame::build_ratsnest_pad( EDA_BaseStruct* ref,
conn_number = track_ref->m_Sous_Netcode; conn_number = track_ref->m_Sous_Netcode;
break; break;
} }
default:
;
} }
if( current_net_code <= 0 ) if( current_net_code <= 0 )
......
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