Commit dff70646 authored by dickelbeck's avatar dickelbeck

see change_log for 2007-Aug-31

parent 726a8ab4
...@@ -80,7 +80,7 @@ Pcb3D_GLCanvas::Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent, wxWindowID id, ...@@ -80,7 +80,7 @@ Pcb3D_GLCanvas::Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent, wxWindowID id,
/*************************************/ /*************************************/
Pcb3D_GLCanvas::~Pcb3D_GLCanvas( void ) Pcb3D_GLCanvas::~Pcb3D_GLCanvas()
/*************************************/ /*************************************/
{ {
ClearLists(); ClearLists();
...@@ -88,7 +88,7 @@ Pcb3D_GLCanvas::~Pcb3D_GLCanvas( void ) ...@@ -88,7 +88,7 @@ Pcb3D_GLCanvas::~Pcb3D_GLCanvas( void )
/*************************************/ /*************************************/
void Pcb3D_GLCanvas::ClearLists( void ) void Pcb3D_GLCanvas::ClearLists()
/*************************************/ /*************************************/
{ {
if( m_gllist > 0 ) if( m_gllist > 0 )
...@@ -448,7 +448,7 @@ void Pcb3D_GLCanvas::OnPopUpMenu( wxCommandEvent& event ) ...@@ -448,7 +448,7 @@ void Pcb3D_GLCanvas::OnPopUpMenu( wxCommandEvent& event )
/***************************************/ /***************************************/
void Pcb3D_GLCanvas::DisplayStatus( void ) void Pcb3D_GLCanvas::DisplayStatus()
/***************************************/ /***************************************/
{ {
wxString msg; wxString msg;
...@@ -573,7 +573,7 @@ void Pcb3D_GLCanvas::InitGL() ...@@ -573,7 +573,7 @@ void Pcb3D_GLCanvas::InitGL()
/***********************************/ /***********************************/
void Pcb3D_GLCanvas::SetLights( void ) void Pcb3D_GLCanvas::SetLights()
/***********************************/ /***********************************/
/* Init sources lumineuses pour OPENGL /* Init sources lumineuses pour OPENGL
......
...@@ -168,7 +168,7 @@ glEnable(GL_FOG); ...@@ -168,7 +168,7 @@ glEnable(GL_FOG);
/* Trac des pistes : */ /* Trac des pistes : */
for (pt_piste = pcb->m_Track ; pt_piste != NULL ; pt_piste = (TRACK*) pt_piste->Pnext ) for (pt_piste = pcb->m_Track ; pt_piste != NULL ; pt_piste = (TRACK*) pt_piste->Pnext )
{ {
if ( pt_piste->m_StructType == TYPEVIA ) if ( pt_piste->Type() == TYPEVIA )
Draw3D_Via((SEGVIA*)pt_piste); Draw3D_Via((SEGVIA*)pt_piste);
else Draw3D_Track( pt_piste); else Draw3D_Track( pt_piste);
} }
...@@ -178,7 +178,7 @@ EDA_BaseStruct * PtStruct; ...@@ -178,7 +178,7 @@ EDA_BaseStruct * PtStruct;
for ( PtStruct = pcb->m_Drawings; PtStruct != NULL; PtStruct = PtStruct->Pnext) for ( PtStruct = pcb->m_Drawings; PtStruct != NULL; PtStruct = PtStruct->Pnext)
{ {
#define STRUCT ((DRAWSEGMENT *) PtStruct) #define STRUCT ((DRAWSEGMENT *) PtStruct)
if( PtStruct->m_StructType != TYPEDRAWSEGMENT ) continue; if( PtStruct->Type() != TYPEDRAWSEGMENT ) continue;
Draw3D_DrawSegment(STRUCT); Draw3D_DrawSegment(STRUCT);
} }
...@@ -358,7 +358,7 @@ bool As3dShape = FALSE; ...@@ -358,7 +358,7 @@ bool As3dShape = FALSE;
glNormal3f( 0.0, 0.0, 1.0); // Normal is Z axis glNormal3f( 0.0, 0.0, 1.0); // Normal is Z axis
for( ;Struct != NULL; Struct = Struct->Pnext ) for( ;Struct != NULL; Struct = Struct->Pnext )
{ {
switch( Struct->m_StructType ) switch( Struct->Type() )
{ {
case TYPETEXTEMODULE: case TYPETEXTEMODULE:
break; break;
......
...@@ -97,7 +97,7 @@ public: ...@@ -97,7 +97,7 @@ public:
void OnEnterWindow( wxMouseEvent& event ); void OnEnterWindow( wxMouseEvent& event );
void Render( void ); void Render();
GLuint CreateDrawGL_List(void); GLuint CreateDrawGL_List(void);
void InitGL(void); void InitGL(void);
void SetLights(void); void SetLights(void);
......
...@@ -4,6 +4,19 @@ Started 2007-June-11 ...@@ -4,6 +4,19 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2007-Aug-31 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+ pcbnew & gerbview
* Added TRACK::Copy() which can copy a SEGVIA or a TRACK.
* Changed export_to_pcbnew.cpp so it created a SEGVIA properly, a significant change.
Moved and changed a big block of code in export_to_pcbnew.cpp so we can
properly construct the SEGVIA(). Not tested.
* Make EDA_BaseStruct::m_StructType private so we can trap where it is being
changed. (It should never be changed after construction, see comment above
EDA_BaseStruct::SetType().)
2007-Aug-30 UPDATE Dick Hollenbeck <dick@softplc.com> 2007-Aug-30 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================ ================================================================================
+ pcbnew + pcbnew
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
/*******************************************************/ /*******************************************************/
/* Class BASE_SCREEN: classe de gestion d'un affichage */ /* Class BASE_SCREEN: classe de gestion d'un affichage */
/*******************************************************/ /*******************************************************/
BASE_SCREEN::BASE_SCREEN( int idscreen ) : EDA_BaseStruct( SCREEN_STRUCT_TYPE ) BASE_SCREEN::BASE_SCREEN( int idscreen, KICAD_T aType ) :
EDA_BaseStruct( aType )
{ {
EEDrawList = NULL; /* Schematic items list */ EEDrawList = NULL; /* Schematic items list */
m_Type = idscreen; m_Type = idscreen;
...@@ -31,7 +32,7 @@ BASE_SCREEN::BASE_SCREEN( int idscreen ) : EDA_BaseStruct( SCREEN_STRUCT_TYPE ) ...@@ -31,7 +32,7 @@ BASE_SCREEN::BASE_SCREEN( int idscreen ) : EDA_BaseStruct( SCREEN_STRUCT_TYPE )
/******************************/ /******************************/
BASE_SCREEN::~BASE_SCREEN( void ) BASE_SCREEN::~BASE_SCREEN()
/******************************/ /******************************/
{ {
if( m_ZoomList ) if( m_ZoomList )
...@@ -43,7 +44,7 @@ BASE_SCREEN::~BASE_SCREEN( void ) ...@@ -43,7 +44,7 @@ BASE_SCREEN::~BASE_SCREEN( void )
/*******************************/ /*******************************/
void BASE_SCREEN::InitDatas( void ) void BASE_SCREEN::InitDatas()
/*******************************/ /*******************************/
{ {
m_SheetNumber = m_NumberOfSheet = 1; /* gestion hierarchie: Root: SheetNumber = 1 */ m_SheetNumber = m_NumberOfSheet = 1; /* gestion hierarchie: Root: SheetNumber = 1 */
...@@ -121,7 +122,7 @@ wxPoint BASE_SCREEN::CursorRealPosition( const wxPoint& ScreenPos ) ...@@ -121,7 +122,7 @@ wxPoint BASE_SCREEN::CursorRealPosition( const wxPoint& ScreenPos )
/***************************************/ /***************************************/
int BASE_SCREEN::GetInternalUnits( void ) int BASE_SCREEN::GetInternalUnits()
/***************************************/ /***************************************/
{ {
switch( m_Type ) switch( m_Type )
...@@ -141,7 +142,7 @@ int BASE_SCREEN::GetInternalUnits( void ) ...@@ -141,7 +142,7 @@ int BASE_SCREEN::GetInternalUnits( void )
/*****************************************/ /*****************************************/
wxSize BASE_SCREEN::ReturnPageSize( void ) wxSize BASE_SCREEN::ReturnPageSize()
/*****************************************/ /*****************************************/
/* Retourne en unites internes la taille de la feuille de dessin /* Retourne en unites internes la taille de la feuille de dessin
...@@ -199,7 +200,7 @@ void BASE_SCREEN::SetZoomList( int* zoomlist ) ...@@ -199,7 +200,7 @@ void BASE_SCREEN::SetZoomList( int* zoomlist )
/***********************************/ /***********************************/
void BASE_SCREEN::SetFirstZoom( void ) void BASE_SCREEN::SetFirstZoom()
/***********************************/ /***********************************/
/* ajuste le coeff de zoom a 1*/ /* ajuste le coeff de zoom a 1*/
{ {
...@@ -208,7 +209,7 @@ void BASE_SCREEN::SetFirstZoom( void ) ...@@ -208,7 +209,7 @@ void BASE_SCREEN::SetFirstZoom( void )
/****************************/ /****************************/
int BASE_SCREEN::GetZoom( void ) int BASE_SCREEN::GetZoom()
/****************************/ /****************************/
/* retourne le coeff de zoom */ /* retourne le coeff de zoom */
{ {
...@@ -228,7 +229,7 @@ void BASE_SCREEN::SetZoom( int coeff ) ...@@ -228,7 +229,7 @@ void BASE_SCREEN::SetZoom( int coeff )
/********************************/ /********************************/
void BASE_SCREEN::SetNextZoom( void ) void BASE_SCREEN::SetNextZoom()
/********************************/ /********************************/
/* Selectionne le prochain coeff de zoom /* Selectionne le prochain coeff de zoom
...@@ -249,7 +250,7 @@ void BASE_SCREEN::SetNextZoom( void ) ...@@ -249,7 +250,7 @@ void BASE_SCREEN::SetNextZoom( void )
/*************************************/ /*************************************/
void BASE_SCREEN::SetPreviousZoom( void ) void BASE_SCREEN::SetPreviousZoom()
/*************************************/ /*************************************/
/* Selectionne le precedent coeff de zoom /* Selectionne le precedent coeff de zoom
...@@ -262,7 +263,7 @@ void BASE_SCREEN::SetPreviousZoom( void ) ...@@ -262,7 +263,7 @@ void BASE_SCREEN::SetPreviousZoom( void )
/**********************************/ /**********************************/
void BASE_SCREEN::SetLastZoom( void ) void BASE_SCREEN::SetLastZoom()
/**********************************/ /**********************************/
/* ajuste le coeff de zoom au max /* ajuste le coeff de zoom au max
...@@ -326,7 +327,7 @@ void BASE_SCREEN::SetGrid( const wxSize& size ) ...@@ -326,7 +327,7 @@ void BASE_SCREEN::SetGrid( const wxSize& size )
/*********************************/ /*********************************/
wxSize BASE_SCREEN::GetGrid( void ) wxSize BASE_SCREEN::GetGrid()
/*********************************/ /*********************************/
{ {
wxSize grid = m_Grid; wxSize grid = m_Grid;
...@@ -351,7 +352,7 @@ wxSize BASE_SCREEN::GetGrid( void ) ...@@ -351,7 +352,7 @@ wxSize BASE_SCREEN::GetGrid( void )
/*********************************/ /*********************************/
void BASE_SCREEN::SetNextGrid( void ) void BASE_SCREEN::SetNextGrid()
/*********************************/ /*********************************/
/* Selectionne la prochaine grille /* Selectionne la prochaine grille
...@@ -376,7 +377,7 @@ void BASE_SCREEN::SetNextGrid( void ) ...@@ -376,7 +377,7 @@ void BASE_SCREEN::SetNextGrid( void )
/*************************************/ /*************************************/
void BASE_SCREEN::SetPreviousGrid( void ) void BASE_SCREEN::SetPreviousGrid()
/*************************************/ /*************************************/
/* Selectionne le precedent coeff de grille /* Selectionne le precedent coeff de grille
...@@ -401,7 +402,7 @@ void BASE_SCREEN::SetPreviousGrid( void ) ...@@ -401,7 +402,7 @@ void BASE_SCREEN::SetPreviousGrid( void )
/**********************************/ /**********************************/
void BASE_SCREEN::SetFirstGrid( void ) void BASE_SCREEN::SetFirstGrid()
/**********************************/ /**********************************/
/* ajuste le coeff de grille a 1 /* ajuste le coeff de grille a 1
...@@ -419,7 +420,7 @@ void BASE_SCREEN::SetFirstGrid( void ) ...@@ -419,7 +420,7 @@ void BASE_SCREEN::SetFirstGrid( void )
/**********************************/ /**********************************/
void BASE_SCREEN::SetLastGrid( void ) void BASE_SCREEN::SetLastGrid()
/**********************************/ /**********************************/
/* ajuste le coeff de grille au max /* ajuste le coeff de grille au max
...@@ -432,7 +433,7 @@ void BASE_SCREEN::SetLastGrid( void ) ...@@ -432,7 +433,7 @@ void BASE_SCREEN::SetLastGrid( void )
/*****************************************/ /*****************************************/
void BASE_SCREEN::ClearUndoRedoList( void ) void BASE_SCREEN::ClearUndoRedoList()
/*****************************************/ /*****************************************/
/* free the undo and the redo lists /* free the undo and the redo lists
...@@ -532,7 +533,7 @@ void BASE_SCREEN::AddItemToRedoList( EDA_BaseStruct* newitem ) ...@@ -532,7 +533,7 @@ void BASE_SCREEN::AddItemToRedoList( EDA_BaseStruct* newitem )
/*****************************************************/ /*****************************************************/
EDA_BaseStruct* BASE_SCREEN::GetItemFromUndoList( void ) EDA_BaseStruct* BASE_SCREEN::GetItemFromUndoList()
/*****************************************************/ /*****************************************************/
{ {
EDA_BaseStruct* item = m_UndoList; EDA_BaseStruct* item = m_UndoList;
...@@ -544,7 +545,7 @@ EDA_BaseStruct* BASE_SCREEN::GetItemFromUndoList( void ) ...@@ -544,7 +545,7 @@ EDA_BaseStruct* BASE_SCREEN::GetItemFromUndoList( void )
/******************************************************/ /******************************************************/
EDA_BaseStruct* BASE_SCREEN::GetItemFromRedoList( void ) EDA_BaseStruct* BASE_SCREEN::GetItemFromRedoList()
/******************************************************/ /******************************************************/
{ {
EDA_BaseStruct* item = m_RedoList; EDA_BaseStruct* item = m_RedoList;
......
...@@ -93,7 +93,7 @@ EDA_BaseStruct::EDA_BaseStruct( KICAD_T idType ) ...@@ -93,7 +93,7 @@ EDA_BaseStruct::EDA_BaseStruct( KICAD_T idType )
/********************************************/ /********************************************/
void EDA_BaseStruct::InitVars( void ) void EDA_BaseStruct::InitVars()
/********************************************/ /********************************************/
{ {
m_StructType = TYPE_NOT_INIT; m_StructType = TYPE_NOT_INIT;
...@@ -151,7 +151,7 @@ void EDA_BaseStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& off ...@@ -151,7 +151,7 @@ void EDA_BaseStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& off
msg.Printf( wxT( msg.Printf( wxT(
"EDA_BaseStruct::Draw() error. Method for struct type %d used but not implemented (" ), "EDA_BaseStruct::Draw() error. Method for struct type %d used but not implemented (" ),
m_StructType ); Type() );
msg += ReturnClassName() + wxT( ")\n" ); msg += ReturnClassName() + wxT( ")\n" );
printf( CONV_TO_UTF8( msg ) ); printf( CONV_TO_UTF8( msg ) );
} }
...@@ -175,10 +175,10 @@ wxString EDA_BaseStruct::ReturnClassName() const ...@@ -175,10 +175,10 @@ wxString EDA_BaseStruct::ReturnClassName() const
/*********************************************/ /*********************************************/
/* Used at run time for diags: return the class name of the item, /* Used at run time for diags: return the class name of the item,
* from its .m_StructType value. * from its .Type() value.
*/ */
{ {
int ii = m_StructType; int ii = Type();
wxString classname; wxString classname;
if( (ii < 0) || (ii > MAX_STRUCT_TYPE_ID) ) if( (ii < 0) || (ii > MAX_STRUCT_TYPE_ID) )
...@@ -218,7 +218,7 @@ SEARCH_RESULT EDA_BaseStruct::Visit( INSPECTOR* inspector, const void* testData, ...@@ -218,7 +218,7 @@ SEARCH_RESULT EDA_BaseStruct::Visit( INSPECTOR* inspector, const void* testData,
for( const KICAD_T* p = scanTypes; (stype=*p) != EOT; ++p ) for( const KICAD_T* p = scanTypes; (stype=*p) != EOT; ++p )
{ {
// If caller wants to inspect my type // If caller wants to inspect my type
if( stype == m_StructType ) if( stype == Type() )
{ {
if( SEARCH_QUIT == inspector->Inspect( this, testData ) ) if( SEARCH_QUIT == inspector->Inspect( this, testData ) )
return SEARCH_QUIT; return SEARCH_QUIT;
...@@ -307,7 +307,7 @@ EDA_TextStruct::EDA_TextStruct( const wxString& text ) ...@@ -307,7 +307,7 @@ EDA_TextStruct::EDA_TextStruct( const wxString& text )
} }
EDA_TextStruct::~EDA_TextStruct( void ) EDA_TextStruct::~EDA_TextStruct()
{ {
if( m_TextDrawings ) /* pointeur sur la liste des segments de dessin */ if( m_TextDrawings ) /* pointeur sur la liste des segments de dessin */
{ {
...@@ -318,7 +318,7 @@ EDA_TextStruct::~EDA_TextStruct( void ) ...@@ -318,7 +318,7 @@ EDA_TextStruct::~EDA_TextStruct( void )
/********************************/ /********************************/
int EDA_TextStruct::Len_Size( void ) int EDA_TextStruct::Len_Size()
/********************************/ /********************************/
// Return the text lenght in internal units // Return the text lenght in internal units
...@@ -364,7 +364,7 @@ bool EDA_TextStruct::HitTest( const wxPoint& posref ) ...@@ -364,7 +364,7 @@ bool EDA_TextStruct::HitTest( const wxPoint& posref )
/*******************************/ /*******************************/
int EDA_TextStruct::Pitch( void ) int EDA_TextStruct::Pitch()
/*******************************/ /*******************************/
/* retourne le pas entre 2 caracteres /* retourne le pas entre 2 caracteres
...@@ -474,7 +474,7 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -474,7 +474,7 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
/****************************************/ /****************************************/
void EDA_TextStruct::CreateDrawData( void ) void EDA_TextStruct::CreateDrawData()
/****************************************/ /****************************************/
/* Cree le tableau de donn�s n�essaire au trace d'un texte (pcb, module..) /* Cree le tableau de donn�s n�essaire au trace d'un texte (pcb, module..)
...@@ -683,7 +683,7 @@ void EDA_TextStruct::CreateDrawData( void ) ...@@ -683,7 +683,7 @@ void EDA_TextStruct::CreateDrawData( void )
/******************************/ /******************************/
void EDA_Rect::Normalize( void ) void EDA_Rect::Normalize()
/******************************/ /******************************/
// Ensure the height ant width are >= 0 // Ensure the height ant width are >= 0
...@@ -785,13 +785,13 @@ DrawPickedStruct::DrawPickedStruct( EDA_BaseStruct* pickedstruct ) : ...@@ -785,13 +785,13 @@ DrawPickedStruct::DrawPickedStruct( EDA_BaseStruct* pickedstruct ) :
} }
DrawPickedStruct::~DrawPickedStruct( void ) DrawPickedStruct::~DrawPickedStruct()
{ {
} }
/*********************************************/ /*********************************************/
void DrawPickedStruct::DeleteWrapperList( void ) void DrawPickedStruct::DeleteWrapperList()
/*********************************************/ /*********************************************/
/* Delete this item all the items of the linked list /* Delete this item all the items of the linked list
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
/*******************/ /*******************/
/****************************************************************************/ /****************************************************************************/
DrawBlockStruct::DrawBlockStruct( void ) : DrawBlockStruct::DrawBlockStruct() :
EDA_BaseStruct( BLOCK_LOCATE_STRUCT_TYPE ) EDA_BaseStruct( BLOCK_LOCATE_STRUCT_TYPE )
, EDA_Rect() , EDA_Rect()
/****************************************************************************/ /****************************************************************************/
...@@ -30,7 +30,7 @@ DrawBlockStruct::DrawBlockStruct( void ) : ...@@ -30,7 +30,7 @@ DrawBlockStruct::DrawBlockStruct( void ) :
/****************************************/ /****************************************/
DrawBlockStruct::~DrawBlockStruct( void ) DrawBlockStruct::~DrawBlockStruct()
/****************************************/ /****************************************/
{ {
} }
...@@ -219,7 +219,7 @@ void AbortBlockCurrentCommand( WinEDA_DrawPanel* Panel, wxDC* DC ) ...@@ -219,7 +219,7 @@ void AbortBlockCurrentCommand( WinEDA_DrawPanel* Panel, wxDC* DC )
if( (screen->BlockLocate.m_Command != BLOCK_PASTE) if( (screen->BlockLocate.m_Command != BLOCK_PASTE)
&& screen->BlockLocate.m_BlockDrawStruct ) && screen->BlockLocate.m_BlockDrawStruct )
{ {
if( screen->BlockLocate.m_BlockDrawStruct->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE ) if( screen->BlockLocate.m_BlockDrawStruct->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
{ {
DrawPickedStruct* PickedList; DrawPickedStruct* PickedList;
PickedList = (DrawPickedStruct*) screen->BlockLocate.m_BlockDrawStruct; PickedList = (DrawPickedStruct*) screen->BlockLocate.m_BlockDrawStruct;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "build_version.h" #include "build_version.h"
/*****************************/ /*****************************/
wxString GetBuildVersion( void ) wxString GetBuildVersion()
/*****************************/ /*****************************/
/* Return the build date /* Return the build date
...@@ -193,7 +193,7 @@ int From_User_Unit( bool is_metric, double val, int internal_unit_value ) ...@@ -193,7 +193,7 @@ int From_User_Unit( bool is_metric, double val, int internal_unit_value )
/**********************/ /**********************/
wxString GenDate( void ) wxString GenDate()
/**********************/ /**********************/
/* Return the string date "day month year" like "23 jun 2005" /* Return the string date "day month year" like "23 jun 2005"
...@@ -427,7 +427,7 @@ void AfficheDoc( WinEDA_DrawFrame* frame, const wxString& Doc, const wxString& K ...@@ -427,7 +427,7 @@ void AfficheDoc( WinEDA_DrawFrame* frame, const wxString& Doc, const wxString& K
/***********************/ /***********************/
int GetTimeStamp( void ) int GetTimeStamp()
/***********************/ /***********************/
/* /*
......
...@@ -233,7 +233,7 @@ static int SortItems( const wxString ** ptr1, const wxString ** ptr2 ) ...@@ -233,7 +233,7 @@ static int SortItems( const wxString ** ptr1, const wxString ** ptr2 )
/************************************/ /************************************/
void WinEDAListBox:: SortList( void ) void WinEDAListBox:: SortList()
/************************************/ /************************************/
{ {
int ii, NbItems = m_List->GetCount(); int ii, NbItems = m_List->GetCount();
......
...@@ -312,7 +312,7 @@ wxString EDA_FileSelector( const wxString& Title, /* Dialog ti ...@@ -312,7 +312,7 @@ wxString EDA_FileSelector( const wxString& Title, /* Dialog ti
/********************************************************/ /********************************************************/
wxString FindKicadHelpPath( void ) wxString FindKicadHelpPath()
/********************************************************/ /********************************************************/
/* Find absolute path for kicad/help (or kicad/help/<language>) */ /* Find absolute path for kicad/help (or kicad/help/<language>) */
...@@ -536,7 +536,7 @@ void SetRealLibraryPath( const wxString& shortlibname ) ...@@ -536,7 +536,7 @@ void SetRealLibraryPath( const wxString& shortlibname )
/***********************************/ /***********************************/
wxString ReturnKicadDatasPath( void ) wxString ReturnKicadDatasPath()
/***********************************/ /***********************************/
/* Retourne le chemin des donnees communes de kicad. /* Retourne le chemin des donnees communes de kicad.
...@@ -605,7 +605,7 @@ wxString ReturnKicadDatasPath( void ) ...@@ -605,7 +605,7 @@ wxString ReturnKicadDatasPath( void )
/***************************/ /***************************/
wxString GetEditorName( void ) wxString GetEditorName()
/***************************/ /***************************/
/* Return the prefered editor name /* Return the prefered editor name
......
...@@ -27,7 +27,7 @@ using namespace boost::python; ...@@ -27,7 +27,7 @@ using namespace boost::python;
/* Common Python Binding */ /* Common Python Binding */
/*****************************************************************************/ /*****************************************************************************/
static int GetLastID( void ) { return ID_END_LIST; } static int GetLastID() { return ID_END_LIST; }
static object ChooseFile( str objTitle, str objMask, object objOpen ) static object ChooseFile( str objTitle, str objMask, object objOpen )
{ {
......
...@@ -58,7 +58,7 @@ wxString msg; ...@@ -58,7 +58,7 @@ wxString msg;
PtStruct = (EDA_BaseStruct *) GenericStructure; PtStruct = (EDA_BaseStruct *) GenericStructure;
if( PtStruct == NULL) return ; if( PtStruct == NULL) return ;
typestruct = (int)PtStruct->m_StructType; typestruct = (int)PtStruct->Type();
IsDeleted = PtStruct->GetState(DELETED); IsDeleted = PtStruct->GetState(DELETED);
PtNext = PtStruct->Pnext; PtNext = PtStruct->Pnext;
...@@ -167,7 +167,7 @@ wxString msg; ...@@ -167,7 +167,7 @@ wxString msg;
default: default:
msg.Printf( wxT(" DeleteStructure: Type %d Inattendu"), msg.Printf( wxT(" DeleteStructure: Type %d Inattendu"),
PtStruct->m_StructType); PtStruct->Type());
DisplayError(NULL, msg); DisplayError(NULL, msg);
break; break;
} }
......
...@@ -132,7 +132,7 @@ void LibEDA_BaseStruct::Display_Infos_DrawEntry( WinEDA_DrawFrame* frame ) ...@@ -132,7 +132,7 @@ void LibEDA_BaseStruct::Display_Infos_DrawEntry( WinEDA_DrawFrame* frame )
/* affichage du type */ /* affichage du type */
msg = wxT( "??" ); msg = wxT( "??" );
switch( m_StructType ) switch( Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
msg = wxT( "Arc" ); break; msg = wxT( "Arc" ); break;
......
...@@ -26,7 +26,7 @@ static bool SortByPosition = TRUE; ...@@ -26,7 +26,7 @@ static bool SortByPosition = TRUE;
/**************************************/ /**************************************/
void ReAnnotatePowerSymbolsOnly( void ) void ReAnnotatePowerSymbolsOnly()
/**************************************/ /**************************************/
/* Used to reannotate the power symbols, before testing erc or computing netlist /* Used to reannotate the power symbols, before testing erc or computing netlist
when a true component reannotation is not necessary when a true component reannotation is not necessary
...@@ -48,7 +48,7 @@ In order to avoid conflicts the ref number start with a 0: ...@@ -48,7 +48,7 @@ In order to avoid conflicts the ref number start with a 0:
EDA_BaseStruct *DrawList = screen->EEDrawList; EDA_BaseStruct *DrawList = screen->EEDrawList;
for ( ; DrawList != NULL ; DrawList = DrawList->Pnext ) for ( ; DrawList != NULL ; DrawList = DrawList->Pnext )
{ {
if ( DrawList->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if ( DrawList->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
continue; continue;
EDA_SchComponentStruct * DrawLibItem = (EDA_SchComponentStruct *) DrawList; EDA_SchComponentStruct * DrawLibItem = (EDA_SchComponentStruct *) DrawList;
EDA_LibComponentStruct * Entry = EDA_LibComponentStruct * Entry =
...@@ -194,7 +194,7 @@ EDA_SchComponentStruct *DrawLibItem; ...@@ -194,7 +194,7 @@ EDA_SchComponentStruct *DrawLibItem;
EDA_BaseStruct *DrawList = screen->EEDrawList; EDA_BaseStruct *DrawList = screen->EEDrawList;
for ( ; DrawList != NULL ; DrawList = DrawList->Pnext ) for ( ; DrawList != NULL ; DrawList = DrawList->Pnext )
{ {
if ( DrawList->m_StructType == DRAW_LIB_ITEM_STRUCT_TYPE ) if ( DrawList->Type() == DRAW_LIB_ITEM_STRUCT_TYPE )
{ {
DrawLibItem = (EDA_SchComponentStruct *) DrawList; DrawLibItem = (EDA_SchComponentStruct *) DrawList;
DrawLibItem->ClearAnnotation(); DrawLibItem->ClearAnnotation();
...@@ -224,7 +224,7 @@ EDA_LibComponentStruct *Entry; ...@@ -224,7 +224,7 @@ EDA_LibComponentStruct *Entry;
while ( DrawList ) while ( DrawList )
{ {
switch( DrawList->m_StructType ) switch( DrawList->Type() )
{ {
case DRAW_SEGMENT_STRUCT_TYPE : case DRAW_SEGMENT_STRUCT_TYPE :
case DRAW_JUNCTION_STRUCT_TYPE : case DRAW_JUNCTION_STRUCT_TYPE :
......
This diff is collapsed.
...@@ -81,7 +81,7 @@ int MarkItemsInBloc( EDA_LibComponentStruct* LibComponent, ...@@ -81,7 +81,7 @@ int MarkItemsInBloc( EDA_LibComponentStruct* LibComponent,
ItemIsInOtherConvert = TRUE; ItemIsInOtherConvert = TRUE;
if( ItemIsInOtherPart || ItemIsInOtherConvert ) if( ItemIsInOtherPart || ItemIsInOtherConvert )
{ {
if( item->m_StructType == COMPONENT_PIN_DRAW_TYPE ) if( item->Type() == COMPONENT_PIN_DRAW_TYPE )
{ // Specific rules for pins: { // Specific rules for pins:
if( g_EditPinByPinIsOn ) if( g_EditPinByPinIsOn )
continue; continue;
...@@ -94,7 +94,7 @@ int MarkItemsInBloc( EDA_LibComponentStruct* LibComponent, ...@@ -94,7 +94,7 @@ int MarkItemsInBloc( EDA_LibComponentStruct* LibComponent,
continue; continue;
} }
switch( item->m_StructType ) switch( item->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
{ {
...@@ -545,7 +545,7 @@ void MoveMarkedItems( EDA_LibComponentStruct* LibEntry, wxPoint offset ) ...@@ -545,7 +545,7 @@ void MoveMarkedItems( EDA_LibComponentStruct* LibEntry, wxPoint offset )
if( item->m_Selected == 0 ) if( item->m_Selected == 0 )
continue; continue;
switch( item->m_StructType ) switch( item->Type() )
{ {
case COMPONENT_PIN_DRAW_TYPE: case COMPONENT_PIN_DRAW_TYPE:
( (LibDrawPin*) item )->m_Pos.x += offset.x; ( (LibDrawPin*) item )->m_Pos.x += offset.x;
...@@ -647,7 +647,7 @@ void MirrorMarkedItems( EDA_LibComponentStruct* LibEntry, wxPoint offset ) ...@@ -647,7 +647,7 @@ void MirrorMarkedItems( EDA_LibComponentStruct* LibEntry, wxPoint offset )
if( item->m_Selected == 0 ) if( item->m_Selected == 0 )
continue; continue;
switch( item->m_StructType ) switch( item->Type() )
{ {
case COMPONENT_PIN_DRAW_TYPE: case COMPONENT_PIN_DRAW_TYPE:
SETMIRROR( ( (LibDrawPin*) item )->m_Pos.x ); SETMIRROR( ( (LibDrawPin*) item )->m_Pos.x );
......
...@@ -45,7 +45,7 @@ EDA_BaseStruct* SCH_SCREEN::ExtractWires( bool CreateCopy ) ...@@ -45,7 +45,7 @@ EDA_BaseStruct* SCH_SCREEN::ExtractWires( bool CreateCopy )
{ {
next_item = item->Pnext; next_item = item->Pnext;
switch( item->m_StructType ) switch( item->Type() )
{ {
case DRAW_JUNCTION_STRUCT_TYPE: case DRAW_JUNCTION_STRUCT_TYPE:
case DRAW_SEGMENT_STRUCT_TYPE: case DRAW_SEGMENT_STRUCT_TYPE:
...@@ -54,7 +54,7 @@ EDA_BaseStruct* SCH_SCREEN::ExtractWires( bool CreateCopy ) ...@@ -54,7 +54,7 @@ EDA_BaseStruct* SCH_SCREEN::ExtractWires( bool CreateCopy )
List = item; List = item;
if( CreateCopy ) if( CreateCopy )
{ {
if( item->m_StructType == DRAW_JUNCTION_STRUCT_TYPE ) if( item->Type() == DRAW_JUNCTION_STRUCT_TYPE )
new_item = ( (DrawJunctionStruct*) item )->GenCopy(); new_item = ( (DrawJunctionStruct*) item )->GenCopy();
else else
new_item = ( (EDA_DrawLineStruct*) item )->GenCopy(); new_item = ( (EDA_DrawLineStruct*) item )->GenCopy();
...@@ -85,7 +85,7 @@ static void RestoreOldWires( SCH_SCREEN* screen ) ...@@ -85,7 +85,7 @@ static void RestoreOldWires( SCH_SCREEN* screen )
{ {
next_item = item->Pnext; next_item = item->Pnext;
switch( item->m_StructType ) switch( item->Type() )
{ {
case DRAW_JUNCTION_STRUCT_TYPE: case DRAW_JUNCTION_STRUCT_TYPE:
case DRAW_SEGMENT_STRUCT_TYPE: case DRAW_SEGMENT_STRUCT_TYPE:
...@@ -123,7 +123,7 @@ void WinEDA_SchematicFrame::BeginSegment( wxDC* DC, int type ) ...@@ -123,7 +123,7 @@ void WinEDA_SchematicFrame::BeginSegment( wxDC* DC, int type )
if( GetScreen()->GetCurItem() ) if( GetScreen()->GetCurItem() )
{ {
switch( GetScreen()->GetCurItem()->m_StructType ) switch( GetScreen()->GetCurItem()->Type() )
{ {
case DRAW_SEGMENT_STRUCT_TYPE: case DRAW_SEGMENT_STRUCT_TYPE:
case DRAW_POLYLINE_STRUCT_TYPE: case DRAW_POLYLINE_STRUCT_TYPE:
...@@ -337,7 +337,7 @@ void WinEDA_SchematicFrame::EndSegment( wxDC* DC ) ...@@ -337,7 +337,7 @@ void WinEDA_SchematicFrame::EndSegment( wxDC* DC )
EDA_BaseStruct* item = GetScreen()->EEDrawList; EDA_BaseStruct* item = GetScreen()->EEDrawList;
while( item ) while( item )
{ {
switch( item->m_StructType ) switch( item->Type() )
{ {
case DRAW_JUNCTION_STRUCT_TYPE: case DRAW_JUNCTION_STRUCT_TYPE:
case DRAW_SEGMENT_STRUCT_TYPE: case DRAW_SEGMENT_STRUCT_TYPE:
...@@ -510,7 +510,7 @@ void WinEDA_SchematicFrame::DeleteCurrentSegment( wxDC* DC ) ...@@ -510,7 +510,7 @@ void WinEDA_SchematicFrame::DeleteCurrentSegment( wxDC* DC )
} }
/* Trace en cours: annulation */ /* Trace en cours: annulation */
if( GetScreen()->GetCurItem()->m_StructType == DRAW_POLYLINE_STRUCT_TYPE ) if( GetScreen()->GetCurItem()->Type() == DRAW_POLYLINE_STRUCT_TYPE )
{ {
Show_Polyline_in_Ghost( DrawPanel, DC, FALSE ); /* Effacement du trace en cours */ Show_Polyline_in_Ghost( DrawPanel, DC, FALSE ); /* Effacement du trace en cours */
} }
...@@ -622,7 +622,7 @@ void WinEDA_SchematicFrame::RepeatDrawItem( wxDC* DC ) ...@@ -622,7 +622,7 @@ void WinEDA_SchematicFrame::RepeatDrawItem( wxDC* DC )
if( g_ItemToRepeat == NULL ) if( g_ItemToRepeat == NULL )
return; return;
switch( g_ItemToRepeat->m_StructType ) switch( g_ItemToRepeat->Type() )
{ {
case DRAW_JUNCTION_STRUCT_TYPE: case DRAW_JUNCTION_STRUCT_TYPE:
#undef STRUCT #undef STRUCT
...@@ -825,7 +825,7 @@ static bool IsTerminalPoint( SCH_SCREEN* screen, const wxPoint& pos, int layer ) ...@@ -825,7 +825,7 @@ static bool IsTerminalPoint( SCH_SCREEN* screen, const wxPoint& pos, int layer )
return TRUE; return TRUE;
item = PickStruct( pos, screen->EEDrawList, LABELITEM ); item = PickStruct( pos, screen->EEDrawList, LABELITEM );
if( item && (item->m_StructType != DRAW_TEXT_STRUCT_TYPE) if( item && (item->Type() != DRAW_TEXT_STRUCT_TYPE)
&& ( ( (DrawGlobalLabelStruct*) item )->m_Pos.x == pos.x ) && ( ( (DrawGlobalLabelStruct*) item )->m_Pos.x == pos.x )
&& ( ( (DrawGlobalLabelStruct*) item )->m_Pos.y == pos.y ) ) && ( ( (DrawGlobalLabelStruct*) item )->m_Pos.y == pos.y ) )
return TRUE; return TRUE;
......
...@@ -137,7 +137,7 @@ void WinEDA_SchematicFrame::SetBusEntryShape( wxDC* DC, ...@@ -137,7 +137,7 @@ void WinEDA_SchematicFrame::SetBusEntryShape( wxDC* DC,
if( BusEntry == NULL ) if( BusEntry == NULL )
return; return;
if( BusEntry->m_StructType != DRAW_BUSENTRY_STRUCT_TYPE ) if( BusEntry->Type() != DRAW_BUSENTRY_STRUCT_TYPE )
{ {
DisplayError( this, wxT( "SetBusEntryType: Bad StructType" ) ); DisplayError( this, wxT( "SetBusEntryType: Bad StructType" ) );
return; return;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
/***********************************************************/ /***********************************************************/
DrawSheetStruct::DrawSheetStruct( const wxPoint& pos ) : DrawSheetStruct::DrawSheetStruct( const wxPoint& pos ) :
SCH_SCREEN( SCHEMATIC_FRAME ) SCH_SCREEN( DRAW_SHEET_STRUCT_TYPE )
/***********************************************************/ /***********************************************************/
{ {
m_Label = NULL; m_Label = NULL;
...@@ -42,8 +42,6 @@ DrawSheetStruct::DrawSheetStruct( const wxPoint& pos ) : ...@@ -42,8 +42,6 @@ DrawSheetStruct::DrawSheetStruct( const wxPoint& pos ) :
m_Layer = LAYER_SHEET; m_Layer = LAYER_SHEET;
m_Pos = pos; m_Pos = pos;
m_SheetNameSize = m_FileNameSize = 60; m_SheetNameSize = m_FileNameSize = 60;
/* change the struct type: SCREEN_STRUCT_TYPE to DRAW_SHEET_STRUCT_TYPE */
m_StructType = DRAW_SHEET_STRUCT_TYPE;
} }
...@@ -63,7 +61,7 @@ DrawSheetStruct::~DrawSheetStruct() ...@@ -63,7 +61,7 @@ DrawSheetStruct::~DrawSheetStruct()
/***********************************************/ /***********************************************/
DrawSheetStruct* DrawSheetStruct::GenCopy( void ) DrawSheetStruct* DrawSheetStruct::GenCopy()
/***********************************************/ /***********************************************/
/* creates a copy of a sheet /* creates a copy of a sheet
...@@ -226,7 +224,7 @@ DrawSheetLabelStruct::DrawSheetLabelStruct( DrawSheetStruct* parent, ...@@ -226,7 +224,7 @@ DrawSheetLabelStruct::DrawSheetLabelStruct( DrawSheetStruct* parent,
/***********************************************************/ /***********************************************************/
DrawSheetLabelStruct* DrawSheetLabelStruct::GenCopy( void ) DrawSheetLabelStruct* DrawSheetLabelStruct::GenCopy()
/***********************************************************/ /***********************************************************/
{ {
DrawSheetLabelStruct* newitem = DrawSheetLabelStruct* newitem =
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
void SetStructFather( EDA_BaseStruct* Struct, BASE_SCREEN* Screen ) void SetStructFather( EDA_BaseStruct* Struct, BASE_SCREEN* Screen )
/******************************************************************/ /******************************************************************/
{ {
switch( Struct->m_StructType ) switch( Struct->Type() )
{ {
case DRAW_POLYLINE_STRUCT_TYPE: case DRAW_POLYLINE_STRUCT_TYPE:
case DRAW_JUNCTION_STRUCT_TYPE: case DRAW_JUNCTION_STRUCT_TYPE:
...@@ -82,7 +82,8 @@ void EDA_BaseStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC ) ...@@ -82,7 +82,8 @@ void EDA_BaseStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC )
static int table_zoom[] = { 1, 2, 4, 8, 16, 32, 64, 128, 0 }; /* Valeurs standards du zoom */ static int table_zoom[] = { 1, 2, 4, 8, 16, 32, 64, 128, 0 }; /* Valeurs standards du zoom */
/* Constructeur de SCREEN */ /* Constructeur de SCREEN */
SCH_SCREEN::SCH_SCREEN( int screentype ) : BASE_SCREEN( screentype ) SCH_SCREEN::SCH_SCREEN( int screentype, KICAD_T aType ) :
BASE_SCREEN( screentype, aType )
{ {
EEDrawList = NULL; /* Schematic items list */ EEDrawList = NULL; /* Schematic items list */
m_Zoom = 32; m_Zoom = 32;
...@@ -94,7 +95,7 @@ SCH_SCREEN::SCH_SCREEN( int screentype ) : BASE_SCREEN( screentype ) ...@@ -94,7 +95,7 @@ SCH_SCREEN::SCH_SCREEN( int screentype ) : BASE_SCREEN( screentype )
/****************************/ /****************************/
SCH_SCREEN::~SCH_SCREEN( void ) SCH_SCREEN::~SCH_SCREEN()
/****************************/ /****************************/
{ {
ClearUndoRedoList(); ClearUndoRedoList();
...@@ -103,7 +104,7 @@ SCH_SCREEN::~SCH_SCREEN( void ) ...@@ -103,7 +104,7 @@ SCH_SCREEN::~SCH_SCREEN( void )
/***********************************/ /***********************************/
void SCH_SCREEN::FreeDrawList( void ) void SCH_SCREEN::FreeDrawList()
/***********************************/ /***********************************/
/* Routine to clear (free) EESchema drawing list of a screen. /* Routine to clear (free) EESchema drawing list of a screen.
...@@ -187,7 +188,7 @@ EDA_ScreenList::~EDA_ScreenList() ...@@ -187,7 +188,7 @@ EDA_ScreenList::~EDA_ScreenList()
/*****************************************/ /*****************************************/
SCH_SCREEN* EDA_ScreenList::GetFirst( void ) SCH_SCREEN* EDA_ScreenList::GetFirst()
/*****************************************/ /*****************************************/
{ {
m_Index = 0; m_Index = 0;
...@@ -199,7 +200,7 @@ SCH_SCREEN* EDA_ScreenList::GetFirst( void ) ...@@ -199,7 +200,7 @@ SCH_SCREEN* EDA_ScreenList::GetFirst( void )
/*****************************************/ /*****************************************/
SCH_SCREEN* EDA_ScreenList::GetNext( void ) SCH_SCREEN* EDA_ScreenList::GetNext()
/*****************************************/ /*****************************************/
{ {
if( m_Index < m_Count ) if( m_Index < m_Count )
...@@ -231,7 +232,7 @@ SCH_SCREEN* EDA_ScreenList::GetScreen( int index ) ...@@ -231,7 +232,7 @@ SCH_SCREEN* EDA_ScreenList::GetScreen( int index )
/**************************************************/ /**************************************************/
void EDA_ScreenList::UpdateSheetNumberAndDate( void ) void EDA_ScreenList::UpdateSheetNumberAndDate()
/**************************************************/ /**************************************************/
/* Update the sheet number, the sheet count and the date for all sheets in list /* Update the sheet number, the sheet count and the date for all sheets in list
...@@ -285,7 +286,7 @@ SCH_SCREEN** EDA_ScreenList::BuildScreenList( SCH_SCREEN** ScreenList, ...@@ -285,7 +286,7 @@ SCH_SCREEN** EDA_ScreenList::BuildScreenList( SCH_SCREEN** ScreenList,
CurrStruct = DrawStruct; CurrStruct = DrawStruct;
while( CurrStruct ) while( CurrStruct )
{ {
if( CurrStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE ) if( CurrStruct->Type() == DRAW_SHEET_STRUCT_TYPE )
{ {
HasSubhierarchy = TRUE; HasSubhierarchy = TRUE;
if( ScreenList ) if( ScreenList )
...@@ -306,7 +307,7 @@ SCH_SCREEN** EDA_ScreenList::BuildScreenList( SCH_SCREEN** ScreenList, ...@@ -306,7 +307,7 @@ SCH_SCREEN** EDA_ScreenList::BuildScreenList( SCH_SCREEN** ScreenList,
CurrStruct = DrawStruct; CurrStruct = DrawStruct;
while( CurrStruct ) while( CurrStruct )
{ {
if( CurrStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE ) if( CurrStruct->Type() == DRAW_SHEET_STRUCT_TYPE )
{ {
SCH_SCREEN* Screen = (SCH_SCREEN*) CurrStruct; SCH_SCREEN* Screen = (SCH_SCREEN*) CurrStruct;
......
...@@ -88,10 +88,10 @@ class DrawSheetStruct; ...@@ -88,10 +88,10 @@ class DrawSheetStruct;
class SCH_SCREEN : public BASE_SCREEN class SCH_SCREEN : public BASE_SCREEN
{ {
public: public:
SCH_SCREEN( int idtype ); SCH_SCREEN( int idtype, KICAD_T aType = SCREEN_STRUCT_TYPE );
~SCH_SCREEN(); ~SCH_SCREEN();
void FreeDrawList( void ); // Free EESchema drawing list (does not delete the sub hierarchies) void FreeDrawList(); // Free EESchema drawing list (does not delete the sub hierarchies)
void Place( WinEDA_DrawFrame* frame, wxDC* DC ) { }; void Place( WinEDA_DrawFrame* frame, wxDC* DC ) { };
void RemoveFromDrawList( EDA_BaseStruct* DrawStruct );/* remove DrawStruct from EEDrawList. */ void RemoveFromDrawList( EDA_BaseStruct* DrawStruct );/* remove DrawStruct from EEDrawList. */
...@@ -101,7 +101,7 @@ public: ...@@ -101,7 +101,7 @@ public:
EDA_BaseStruct* ExtractWires( bool CreateCopy ); EDA_BaseStruct* ExtractWires( bool CreateCopy );
/* full undo redo management : */ /* full undo redo management : */
virtual void ClearUndoRedoList( void ); virtual void ClearUndoRedoList();
virtual void AddItemToUndoList( EDA_BaseStruct* item ); virtual void AddItemToUndoList( EDA_BaseStruct* item );
virtual void AddItemToRedoList( EDA_BaseStruct* item ); virtual void AddItemToRedoList( EDA_BaseStruct* item );
}; };
...@@ -119,10 +119,10 @@ public: ...@@ -119,10 +119,10 @@ public:
const wxPoint& pos = wxPoint( 0, 0 ), const wxPoint& pos = wxPoint( 0, 0 ),
const wxString& text = wxEmptyString ); const wxString& text = wxEmptyString );
~DrawSheetLabelStruct( void ) { } ~DrawSheetLabelStruct() { }
DrawSheetLabelStruct* GenCopy( void ); DrawSheetLabelStruct* GenCopy();
DrawSheetLabelStruct* Next( void ) DrawSheetLabelStruct* Next()
{ return (DrawSheetLabelStruct*) Pnext; } { return (DrawSheetLabelStruct*) Pnext; }
void Place( WinEDA_DrawFrame* frame, wxDC* DC ); void Place( WinEDA_DrawFrame* frame, wxDC* DC );
...@@ -147,9 +147,9 @@ public: ...@@ -147,9 +147,9 @@ public:
public: public:
DrawSheetStruct( const wxPoint& pos = wxPoint( 0, 0 ) ); DrawSheetStruct( const wxPoint& pos = wxPoint( 0, 0 ) );
~DrawSheetStruct( void ); ~DrawSheetStruct();
void Place( WinEDA_DrawFrame* frame, wxDC* DC ); void Place( WinEDA_DrawFrame* frame, wxDC* DC );
DrawSheetStruct* GenCopy( void ); DrawSheetStruct* GenCopy();
void Display_Infos( WinEDA_DrawFrame* frame ); void Display_Infos( WinEDA_DrawFrame* frame );
void CleanupSheet( WinEDA_SchematicFrame* frame, wxDC* DC ); void CleanupSheet( WinEDA_SchematicFrame* frame, wxDC* DC );
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
...@@ -169,11 +169,11 @@ private: ...@@ -169,11 +169,11 @@ private:
public: public:
EDA_ScreenList( EDA_BaseStruct* DrawStruct ); EDA_ScreenList( EDA_BaseStruct* DrawStruct );
~EDA_ScreenList(); ~EDA_ScreenList();
int GetCount( void ) { return m_Count; } int GetCount() { return m_Count; }
SCH_SCREEN* GetFirst( void ); SCH_SCREEN* GetFirst();
SCH_SCREEN* GetNext( void ); SCH_SCREEN* GetNext();
SCH_SCREEN* GetScreen( int index ); SCH_SCREEN* GetScreen( int index );
void UpdateSheetNumberAndDate( void ); void UpdateSheetNumberAndDate();
private: private:
SCH_SCREEN** BuildScreenList( SCH_SCREEN** ScreenList, SCH_SCREEN** BuildScreenList( SCH_SCREEN** ScreenList,
......
This diff is collapsed.
...@@ -35,12 +35,12 @@ bool Modify = FALSE; ...@@ -35,12 +35,12 @@ bool Modify = FALSE;
DrawList = EEDrawList; DrawList = EEDrawList;
for ( ;DrawList != NULL; DrawList = DrawList->Pnext ) for ( ;DrawList != NULL; DrawList = DrawList->Pnext )
{ {
if( DrawList->m_StructType == DRAW_SEGMENT_STRUCT_TYPE ) if( DrawList->Type() == DRAW_SEGMENT_STRUCT_TYPE )
{ {
TstDrawList = DrawList->Pnext; TstDrawList = DrawList->Pnext;
while ( TstDrawList ) while ( TstDrawList )
{ {
if( TstDrawList->m_StructType == DRAW_SEGMENT_STRUCT_TYPE ) if( TstDrawList->Type() == DRAW_SEGMENT_STRUCT_TYPE )
{ {
flag = TstAlignSegment( (EDA_DrawLineStruct*)DrawList, flag = TstAlignSegment( (EDA_DrawLineStruct*)DrawList,
(EDA_DrawLineStruct*)TstDrawList); (EDA_DrawLineStruct*)TstDrawList);
...@@ -82,7 +82,7 @@ EDA_BaseStruct *DrawList; ...@@ -82,7 +82,7 @@ EDA_BaseStruct *DrawList;
DrawList = Screen->EEDrawList; DrawList = Screen->EEDrawList;
while ( DrawList ) while ( DrawList )
{ {
switch( DrawList->m_StructType ) switch( DrawList->Type() )
{ {
case DRAW_JUNCTION_STRUCT_TYPE : case DRAW_JUNCTION_STRUCT_TYPE :
#undef STRUCT #undef STRUCT
...@@ -136,7 +136,7 @@ DrawPickedStruct * List = NULL; ...@@ -136,7 +136,7 @@ DrawPickedStruct * List = NULL;
DrawList = screen->EEDrawList; DrawList = screen->EEDrawList;
while ( DrawList ) while ( DrawList )
{ {
switch( DrawList->m_StructType ) switch( DrawList->Type() )
{ {
case DRAW_SEGMENT_STRUCT_TYPE : case DRAW_SEGMENT_STRUCT_TYPE :
segment = (EDA_DrawLineStruct*)DrawList; segment = (EDA_DrawLineStruct*)DrawList;
......
...@@ -37,7 +37,7 @@ DrawBusEntryStruct::DrawBusEntryStruct( const wxPoint& pos, int shape, int id ) ...@@ -37,7 +37,7 @@ DrawBusEntryStruct::DrawBusEntryStruct( const wxPoint& pos, int shape, int id )
/*************************************/ /*************************************/
wxPoint DrawBusEntryStruct::m_End( void ) wxPoint DrawBusEntryStruct::m_End()
/*************************************/ /*************************************/
// retourne la coord de fin du raccord // retourne la coord de fin du raccord
...@@ -47,7 +47,7 @@ wxPoint DrawBusEntryStruct::m_End( void ) ...@@ -47,7 +47,7 @@ wxPoint DrawBusEntryStruct::m_End( void )
/***************************************************/ /***************************************************/
DrawBusEntryStruct* DrawBusEntryStruct::GenCopy( void ) DrawBusEntryStruct* DrawBusEntryStruct::GenCopy()
/***************************************************/ /***************************************************/
{ {
DrawBusEntryStruct* newitem = new DrawBusEntryStruct( m_Pos, 0, 0 ); DrawBusEntryStruct* newitem = new DrawBusEntryStruct( m_Pos, 0, 0 );
...@@ -75,7 +75,7 @@ DrawJunctionStruct::DrawJunctionStruct( const wxPoint& pos ) : ...@@ -75,7 +75,7 @@ DrawJunctionStruct::DrawJunctionStruct( const wxPoint& pos ) :
} }
DrawJunctionStruct* DrawJunctionStruct::GenCopy( void ) DrawJunctionStruct* DrawJunctionStruct::GenCopy()
{ {
DrawJunctionStruct* newitem = new DrawJunctionStruct( m_Pos ); DrawJunctionStruct* newitem = new DrawJunctionStruct( m_Pos );
...@@ -97,7 +97,7 @@ DrawNoConnectStruct::DrawNoConnectStruct( const wxPoint& pos ) : ...@@ -97,7 +97,7 @@ DrawNoConnectStruct::DrawNoConnectStruct( const wxPoint& pos ) :
} }
DrawNoConnectStruct* DrawNoConnectStruct::GenCopy( void ) DrawNoConnectStruct* DrawNoConnectStruct::GenCopy()
{ {
DrawNoConnectStruct* newitem = new DrawNoConnectStruct( m_Pos ); DrawNoConnectStruct* newitem = new DrawNoConnectStruct( m_Pos );
...@@ -121,12 +121,12 @@ DrawMarkerStruct::DrawMarkerStruct( const wxPoint& pos, const wxString& text ) : ...@@ -121,12 +121,12 @@ DrawMarkerStruct::DrawMarkerStruct( const wxPoint& pos, const wxString& text ) :
} }
DrawMarkerStruct::~DrawMarkerStruct( void ) DrawMarkerStruct::~DrawMarkerStruct()
{ {
} }
DrawMarkerStruct* DrawMarkerStruct::GenCopy( void ) DrawMarkerStruct* DrawMarkerStruct::GenCopy()
{ {
DrawMarkerStruct* newitem = new DrawMarkerStruct( m_Pos, m_Comment ); DrawMarkerStruct* newitem = new DrawMarkerStruct( m_Pos, m_Comment );
...@@ -137,7 +137,7 @@ DrawMarkerStruct* DrawMarkerStruct::GenCopy( void ) ...@@ -137,7 +137,7 @@ DrawMarkerStruct* DrawMarkerStruct::GenCopy( void )
} }
wxString DrawMarkerStruct::GetComment( void ) wxString DrawMarkerStruct::GetComment()
{ {
return m_Comment; return m_Comment;
} }
...@@ -175,7 +175,7 @@ EDA_DrawLineStruct::EDA_DrawLineStruct( const wxPoint& pos, int layer ) : ...@@ -175,7 +175,7 @@ EDA_DrawLineStruct::EDA_DrawLineStruct( const wxPoint& pos, int layer ) :
/***************************************************/ /***************************************************/
EDA_DrawLineStruct* EDA_DrawLineStruct::GenCopy( void ) EDA_DrawLineStruct* EDA_DrawLineStruct::GenCopy()
/***************************************************/ /***************************************************/
{ {
EDA_DrawLineStruct* newitem = new EDA_DrawLineStruct( m_Start, m_Layer ); EDA_DrawLineStruct* newitem = new EDA_DrawLineStruct( m_Start, m_Layer );
...@@ -234,7 +234,7 @@ DrawPolylineStruct::DrawPolylineStruct( int layer ) : ...@@ -234,7 +234,7 @@ DrawPolylineStruct::DrawPolylineStruct( int layer ) :
/********************************************/ /********************************************/
DrawPolylineStruct::~DrawPolylineStruct( void ) DrawPolylineStruct::~DrawPolylineStruct()
/*********************************************/ /*********************************************/
{ {
if( m_Points ) if( m_Points )
...@@ -243,7 +243,7 @@ DrawPolylineStruct::~DrawPolylineStruct( void ) ...@@ -243,7 +243,7 @@ DrawPolylineStruct::~DrawPolylineStruct( void )
/*****************************************************/ /*****************************************************/
DrawPolylineStruct* DrawPolylineStruct::GenCopy( void ) DrawPolylineStruct* DrawPolylineStruct::GenCopy()
/*****************************************************/ /*****************************************************/
{ {
int memsize; int memsize;
......
...@@ -109,7 +109,7 @@ int ii; ...@@ -109,7 +109,7 @@ int ii;
/**********************************************************************/ /**********************************************************************/
EDA_Rect EDA_SchComponentStruct::GetBoundaryBox( void ) EDA_Rect EDA_SchComponentStruct::GetBoundaryBox()
/**********************************************************************/ /**********************************************************************/
{ {
EDA_LibComponentStruct * Entry = FindLibPart(m_ChipName.GetData(), wxEmptyString, FIND_ROOT); EDA_LibComponentStruct * Entry = FindLibPart(m_ChipName.GetData(), wxEmptyString, FIND_ROOT);
...@@ -203,7 +203,7 @@ void EDA_SchComponentStruct::Place(WinEDA_DrawFrame * frame, wxDC * DC) ...@@ -203,7 +203,7 @@ void EDA_SchComponentStruct::Place(WinEDA_DrawFrame * frame, wxDC * DC)
{ {
/* save old text in undo list */ /* save old text in undo list */
if ( g_ItemToUndoCopy && if ( g_ItemToUndoCopy &&
(g_ItemToUndoCopy->m_StructType == m_StructType) && (g_ItemToUndoCopy->Type() == Type()) &&
((m_Flags & IS_NEW) == 0) ) ((m_Flags & IS_NEW) == 0) )
{ {
/* restore old values and save new ones */ /* restore old values and save new ones */
......
...@@ -95,7 +95,7 @@ public: ...@@ -95,7 +95,7 @@ public:
wxPoint GetScreenCoord(const wxPoint & coord); wxPoint GetScreenCoord(const wxPoint & coord);
void Display_Infos(WinEDA_DrawFrame * frame); void Display_Infos(WinEDA_DrawFrame * frame);
void ClearAnnotation(void); void ClearAnnotation(void);
EDA_Rect GetBoundaryBox( void ); EDA_Rect GetBoundaryBox();
wxString ReturnFieldName(int FieldNumber); wxString ReturnFieldName(int FieldNumber);
virtual void Draw(WinEDA_DrawPanel * panel, wxDC * DC, const wxPoint & offset, int draw_mode, int Color = -1); virtual void Draw(WinEDA_DrawPanel * panel, wxDC * DC, const wxPoint & offset, int draw_mode, int Color = -1);
......
...@@ -87,7 +87,7 @@ SchematicGeneralLocateAndDisplay( bool IncludePin ) ...@@ -87,7 +87,7 @@ SchematicGeneralLocateAndDisplay( bool IncludePin )
return NULL; return NULL;
/* Cross probing to pcbnew if a pin or a component is found */ /* Cross probing to pcbnew if a pin or a component is found */
switch( DrawStruct->m_StructType ) switch( DrawStruct->Type() )
{ {
case COMPONENT_FIELD_DRAW_TYPE: case COMPONENT_FIELD_DRAW_TYPE:
{ {
......
...@@ -106,7 +106,7 @@ void WinEDA_SchematicFrame::TestDanglingEnds( EDA_BaseStruct* DrawList, wxDC* DC ...@@ -106,7 +106,7 @@ void WinEDA_SchematicFrame::TestDanglingEnds( EDA_BaseStruct* DrawList, wxDC* DC
// Controle des elements // Controle des elements
for( DrawItem = DrawList; DrawItem != NULL; DrawItem = DrawItem->Pnext ) for( DrawItem = DrawList; DrawItem != NULL; DrawItem = DrawItem->Pnext )
{ {
switch( DrawItem->m_StructType ) switch( DrawItem->Type() )
{ {
case DRAW_GLOBAL_LABEL_STRUCT_TYPE: case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
case DRAW_LABEL_STRUCT_TYPE: case DRAW_LABEL_STRUCT_TYPE:
...@@ -310,7 +310,7 @@ DanglingEndHandle* RebuildEndList( EDA_BaseStruct* DrawList ) ...@@ -310,7 +310,7 @@ DanglingEndHandle* RebuildEndList( EDA_BaseStruct* DrawList )
for( DrawItem = DrawList; DrawItem != NULL; DrawItem = DrawItem->Pnext ) for( DrawItem = DrawList; DrawItem != NULL; DrawItem = DrawItem->Pnext )
{ {
switch( DrawItem->m_StructType ) switch( DrawItem->Type() )
{ {
case DRAW_LABEL_STRUCT_TYPE: case DRAW_LABEL_STRUCT_TYPE:
break; break;
...@@ -402,7 +402,7 @@ DanglingEndHandle* RebuildEndList( EDA_BaseStruct* DrawList ) ...@@ -402,7 +402,7 @@ DanglingEndHandle* RebuildEndList( EDA_BaseStruct* DrawList )
LibEDA_BaseStruct* DrawLibItem = Entry->m_Drawings; LibEDA_BaseStruct* DrawLibItem = Entry->m_Drawings;
for( ; DrawLibItem != NULL; DrawLibItem = DrawLibItem->Next() ) for( ; DrawLibItem != NULL; DrawLibItem = DrawLibItem->Next() )
{ {
if( DrawLibItem->m_StructType != COMPONENT_PIN_DRAW_TYPE ) if( DrawLibItem->Type() != COMPONENT_PIN_DRAW_TYPE )
continue; continue;
LibDrawPin* Pin = (LibDrawPin*) DrawLibItem; LibDrawPin* Pin = (LibDrawPin*) DrawLibItem;
......
...@@ -36,7 +36,7 @@ int count = 0; ...@@ -36,7 +36,7 @@ int count = 0;
if ( Struct->m_Flags & SKIP_STRUCT ) continue; if ( Struct->m_Flags & SKIP_STRUCT ) continue;
if ( TstJunction && (Struct->m_StructType == DRAW_JUNCTION_STRUCT_TYPE) ) if ( TstJunction && (Struct->Type() == DRAW_JUNCTION_STRUCT_TYPE) )
{ {
#define JUNCTION ((DrawJunctionStruct*)Struct) #define JUNCTION ((DrawJunctionStruct*)Struct)
if ( (JUNCTION->m_Pos.x == pos.x) && (JUNCTION->m_Pos.y == pos.y) ) if ( (JUNCTION->m_Pos.x == pos.x) && (JUNCTION->m_Pos.y == pos.y) )
...@@ -44,7 +44,7 @@ int count = 0; ...@@ -44,7 +44,7 @@ int count = 0;
#undef JUNCTION #undef JUNCTION
} }
if ( Struct->m_StructType != DRAW_SEGMENT_STRUCT_TYPE ) continue; if ( Struct->Type() != DRAW_SEGMENT_STRUCT_TYPE ) continue;
#define SEGM ((EDA_DrawLineStruct*)Struct) #define SEGM ((EDA_DrawLineStruct*)Struct)
if ( SEGM->IsOneEndPointAt(pos) ) count++; if ( SEGM->IsOneEndPointAt(pos) ) count++;
#undef SEGM #undef SEGM
...@@ -68,7 +68,7 @@ EDA_BaseStruct * Struct; ...@@ -68,7 +68,7 @@ EDA_BaseStruct * Struct;
for ( Struct = ListStruct; Struct != NULL; Struct = Struct->Pnext) for ( Struct = ListStruct; Struct != NULL; Struct = Struct->Pnext)
{ {
if ( Struct->m_Flags ) continue; if ( Struct->m_Flags ) continue;
if ( Struct->m_StructType == DRAW_JUNCTION_STRUCT_TYPE ) if ( Struct->Type() == DRAW_JUNCTION_STRUCT_TYPE )
{ {
#define JUNCTION ((DrawJunctionStruct*)Struct) #define JUNCTION ((DrawJunctionStruct*)Struct)
if ( segment->IsOneEndPointAt(JUNCTION->m_Pos) ) Struct->m_Flags |= CANDIDATE; if ( segment->IsOneEndPointAt(JUNCTION->m_Pos) ) Struct->m_Flags |= CANDIDATE;
...@@ -76,7 +76,7 @@ EDA_BaseStruct * Struct; ...@@ -76,7 +76,7 @@ EDA_BaseStruct * Struct;
#undef JUNCTION #undef JUNCTION
} }
if ( Struct->m_StructType != DRAW_SEGMENT_STRUCT_TYPE ) continue; if ( Struct->Type() != DRAW_SEGMENT_STRUCT_TYPE ) continue;
#define SEGM ((EDA_DrawLineStruct*)Struct) #define SEGM ((EDA_DrawLineStruct*)Struct)
if ( segment->IsOneEndPointAt(SEGM->m_Start) ) if ( segment->IsOneEndPointAt(SEGM->m_Start) )
...@@ -142,7 +142,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL; ...@@ -142,7 +142,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL;
{ {
if ( ! (DelStruct->m_Flags & SELECTEDNODE) ) continue; if ( ! (DelStruct->m_Flags & SELECTEDNODE) ) continue;
#define SEGM ((EDA_DrawLineStruct*)DelStruct) #define SEGM ((EDA_DrawLineStruct*)DelStruct)
if ( DelStruct->m_StructType != DRAW_SEGMENT_STRUCT_TYPE ) continue; if ( DelStruct->Type() != DRAW_SEGMENT_STRUCT_TYPE ) continue;
MarkConnected(this, GetScreen()->EEDrawList, SEGM); MarkConnected(this, GetScreen()->EEDrawList, SEGM);
#undef SEGM #undef SEGM
} }
...@@ -154,7 +154,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL; ...@@ -154,7 +154,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL;
if ( DelStruct->m_Flags & STRUCT_DELETED ) continue; // Already seen if ( DelStruct->m_Flags & STRUCT_DELETED ) continue; // Already seen
if ( ! (DelStruct->m_Flags & CANDIDATE) ) continue; // Already seen if ( ! (DelStruct->m_Flags & CANDIDATE) ) continue; // Already seen
if ( DelStruct->m_StructType != DRAW_SEGMENT_STRUCT_TYPE ) continue; if ( DelStruct->Type() != DRAW_SEGMENT_STRUCT_TYPE ) continue;
DelStruct->m_Flags |= SKIP_STRUCT; DelStruct->m_Flags |= SKIP_STRUCT;
#define SEGM ((EDA_DrawLineStruct*)DelStruct) #define SEGM ((EDA_DrawLineStruct*)DelStruct)
/* Test the SEGM->m_Start point: if this point was connected to an STRUCT_DELETED wire, /* Test the SEGM->m_Start point: if this point was connected to an STRUCT_DELETED wire,
...@@ -163,7 +163,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL; ...@@ -163,7 +163,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL;
for ( removed_struct = GetScreen()->EEDrawList; removed_struct != NULL; removed_struct = removed_struct->Pnext) for ( removed_struct = GetScreen()->EEDrawList; removed_struct != NULL; removed_struct = removed_struct->Pnext)
{ {
if( (removed_struct->m_Flags & STRUCT_DELETED) == 0 ) continue; if( (removed_struct->m_Flags & STRUCT_DELETED) == 0 ) continue;
if ( removed_struct->m_StructType != DRAW_SEGMENT_STRUCT_TYPE ) continue; if ( removed_struct->Type() != DRAW_SEGMENT_STRUCT_TYPE ) continue;
#define WIRE ((EDA_DrawLineStruct*)removed_struct) #define WIRE ((EDA_DrawLineStruct*)removed_struct)
if ( WIRE->IsOneEndPointAt(SEGM->m_Start) ) break; if ( WIRE->IsOneEndPointAt(SEGM->m_Start) ) break;
} }
...@@ -175,7 +175,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL; ...@@ -175,7 +175,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL;
for ( removed_struct = GetScreen()->EEDrawList; removed_struct != NULL; removed_struct = removed_struct->Pnext) for ( removed_struct = GetScreen()->EEDrawList; removed_struct != NULL; removed_struct = removed_struct->Pnext)
{ {
if( (removed_struct->m_Flags & STRUCT_DELETED) == 0 ) continue; if( (removed_struct->m_Flags & STRUCT_DELETED) == 0 ) continue;
if ( removed_struct->m_StructType != DRAW_SEGMENT_STRUCT_TYPE ) continue; if ( removed_struct->Type() != DRAW_SEGMENT_STRUCT_TYPE ) continue;
if ( WIRE->IsOneEndPointAt(SEGM->m_End) ) break; if ( WIRE->IsOneEndPointAt(SEGM->m_End) ) break;
} }
if ( removed_struct && ! CountConnectedItems(this, GetScreen()->EEDrawList, SEGM->m_End, TRUE) ) if ( removed_struct && ! CountConnectedItems(this, GetScreen()->EEDrawList, SEGM->m_End, TRUE) )
...@@ -200,7 +200,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL; ...@@ -200,7 +200,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL;
int count; int count;
if ( DelStruct->m_Flags & STRUCT_DELETED ) continue; if ( DelStruct->m_Flags & STRUCT_DELETED ) continue;
if ( ! (DelStruct->m_Flags & CANDIDATE) ) continue; if ( ! (DelStruct->m_Flags & CANDIDATE) ) continue;
if ( DelStruct->m_StructType == DRAW_JUNCTION_STRUCT_TYPE ) if ( DelStruct->Type() == DRAW_JUNCTION_STRUCT_TYPE )
{ {
#define JUNCTION ((DrawJunctionStruct*)DelStruct) #define JUNCTION ((DrawJunctionStruct*)DelStruct)
count = CountConnectedItems(this, GetScreen()->EEDrawList, JUNCTION->m_Pos, FALSE); count = CountConnectedItems(this, GetScreen()->EEDrawList, JUNCTION->m_Pos, FALSE);
...@@ -221,7 +221,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL; ...@@ -221,7 +221,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL;
for ( DelStruct = GetScreen()->EEDrawList; DelStruct != NULL; DelStruct = DelStruct->Pnext) for ( DelStruct = GetScreen()->EEDrawList; DelStruct != NULL; DelStruct = DelStruct->Pnext)
{ {
if ( DelStruct->m_Flags & STRUCT_DELETED ) continue; if ( DelStruct->m_Flags & STRUCT_DELETED ) continue;
if ( DelStruct->m_StructType != DRAW_LABEL_STRUCT_TYPE ) continue; if ( DelStruct->Type() != DRAW_LABEL_STRUCT_TYPE ) continue;
GetScreen()->m_Curseur = ((DrawTextStruct*)DelStruct)->m_Pos; GetScreen()->m_Curseur = ((DrawTextStruct*)DelStruct)->m_Pos;
EDA_BaseStruct * TstStruct = EDA_BaseStruct * TstStruct =
PickStruct(GetScreen()->m_Curseur, GetScreen()->EEDrawList,WIREITEM|BUSITEM); PickStruct(GetScreen()->m_Curseur, GetScreen()->EEDrawList,WIREITEM|BUSITEM);
...@@ -328,13 +328,13 @@ DrawSheetLabelStruct* SheetLabel, *NextLabel; ...@@ -328,13 +328,13 @@ DrawSheetLabelStruct* SheetLabel, *NextLabel;
Screen->SetModify(); Screen->SetModify();
if (DrawStruct->m_StructType == DRAW_SHEETLABEL_STRUCT_TYPE) if (DrawStruct->Type() == DRAW_SHEETLABEL_STRUCT_TYPE)
{ /* Cette stucture est rattachee a une feuille, et n'est pas { /* Cette stucture est rattachee a une feuille, et n'est pas
accessible par la liste globale directement */ accessible par la liste globale directement */
DrawList = Screen->EEDrawList; DrawList = Screen->EEDrawList;
for ( ; DrawList != NULL; DrawList = DrawList->Pnext ) for ( ; DrawList != NULL; DrawList = DrawList->Pnext )
{ {
if(DrawList->m_StructType != DRAW_SHEET_STRUCT_TYPE) continue; if(DrawList->Type() != DRAW_SHEET_STRUCT_TYPE) continue;
/* Examen de la Sheet */ /* Examen de la Sheet */
SheetLabel = ((DrawSheetStruct *) DrawList)->m_Label; SheetLabel = ((DrawSheetStruct *) DrawList)->m_Label;
if (SheetLabel == NULL) continue; if (SheetLabel == NULL) continue;
...@@ -361,7 +361,7 @@ DrawSheetLabelStruct* SheetLabel, *NextLabel; ...@@ -361,7 +361,7 @@ DrawSheetLabelStruct* SheetLabel, *NextLabel;
} }
if (DrawStruct->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE) if (DrawStruct->Type() == DRAW_PICK_ITEM_STRUCT_TYPE)
{ {
PickedList = (DrawPickedStruct *) DrawStruct; PickedList = (DrawPickedStruct *) DrawStruct;
while (PickedList) while (PickedList)
...@@ -429,7 +429,7 @@ DrawMarkerStruct * Marker; ...@@ -429,7 +429,7 @@ DrawMarkerStruct * Marker;
for ( DrawStruct = screen->EEDrawList; DrawStruct != NULL; DrawStruct = NextStruct) for ( DrawStruct = screen->EEDrawList; DrawStruct != NULL; DrawStruct = NextStruct)
{ {
NextStruct = DrawStruct->Pnext; NextStruct = DrawStruct->Pnext;
if(DrawStruct->m_StructType != DRAW_MARKER_STRUCT_TYPE ) continue; if(DrawStruct->Type() != DRAW_MARKER_STRUCT_TYPE ) continue;
/* Marqueur trouve */ /* Marqueur trouve */
Marker = (DrawMarkerStruct * ) DrawStruct; Marker = (DrawMarkerStruct * ) DrawStruct;
if( Marker->m_Type != type ) continue; if( Marker->m_Type != type ) continue;
......
...@@ -29,7 +29,7 @@ wxString msg; ...@@ -29,7 +29,7 @@ wxString msg;
if( FirstSheet == NULL ) return; if( FirstSheet == NULL ) return;
if( FirstSheet->m_StructType != DRAW_SHEET_STRUCT_TYPE) if( FirstSheet->Type() != DRAW_SHEET_STRUCT_TYPE)
{ {
DisplayError(NULL, DisplayError(NULL,
wxT("DeleteSubHierarchy error(): NOT a Sheet")); wxT("DeleteSubHierarchy error(): NOT a Sheet"));
...@@ -54,7 +54,7 @@ wxString msg; ...@@ -54,7 +54,7 @@ wxString msg;
{ {
DrawStruct = EEDrawList; DrawStruct = EEDrawList;
EEDrawList = EEDrawList->Pnext; EEDrawList = EEDrawList->Pnext;
if( DrawStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE) if( DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE)
{ {
DeleteSubHierarchy((DrawSheetStruct *) DrawStruct, confirm_deletion); DeleteSubHierarchy((DrawSheetStruct *) DrawStruct, confirm_deletion);
} }
...@@ -76,7 +76,7 @@ EDA_BaseStruct *DrawStruct; ...@@ -76,7 +76,7 @@ EDA_BaseStruct *DrawStruct;
DrawStruct = DrawList; DrawStruct = DrawList;
DrawList = DrawList->Pnext; DrawList = DrawList->Pnext;
if( DrawStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE) if( DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE)
{ {
DeleteSubHierarchy((DrawSheetStruct*) DrawStruct, confirm_deletion); DeleteSubHierarchy((DrawSheetStruct*) DrawStruct, confirm_deletion);
} }
......
...@@ -641,7 +641,7 @@ BASE_SCREEN * screen; ...@@ -641,7 +641,7 @@ BASE_SCREEN * screen;
DrawList = screen->EEDrawList; DrawList = screen->EEDrawList;
while ( DrawList ) while ( DrawList )
{ {
switch( DrawList->m_StructType ) switch( DrawList->Type() )
{ {
case DRAW_LIB_ITEM_STRUCT_TYPE : case DRAW_LIB_ITEM_STRUCT_TYPE :
...@@ -685,7 +685,7 @@ BASE_SCREEN * screen; ...@@ -685,7 +685,7 @@ BASE_SCREEN * screen;
DrawList = screen->EEDrawList; DrawList = screen->EEDrawList;
while ( DrawList ) while ( DrawList )
{ {
switch( DrawList->m_StructType ) switch( DrawList->Type() )
{ {
case DRAW_GLOBAL_LABEL_STRUCT_TYPE : case DRAW_GLOBAL_LABEL_STRUCT_TYPE :
ItemCount++; ItemCount++;
...@@ -981,7 +981,7 @@ wxString msg; ...@@ -981,7 +981,7 @@ wxString msg;
DrawList = List[ii]; DrawList = List[ii];
if( DrawList == NULL ) continue; if( DrawList == NULL ) continue;
if( DrawList->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) continue; if( DrawList->Type() != DRAW_LIB_ITEM_STRUCT_TYPE ) continue;
DrawLibItem = (EDA_SchComponentStruct *) DrawList; DrawLibItem = (EDA_SchComponentStruct *) DrawList;
if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue; if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue;
...@@ -1004,7 +1004,7 @@ wxString msg; ...@@ -1004,7 +1004,7 @@ wxString msg;
{ {
DrawSheetStruct * sheet = (DrawSheetStruct *)(DrawLibItem->m_Parent); DrawSheetStruct * sheet = (DrawSheetStruct *)(DrawLibItem->m_Parent);
wxString sheetname; wxString sheetname;
if( sheet && sheet->m_StructType == DRAW_SHEET_STRUCT_TYPE ) if( sheet && sheet->Type() == DRAW_SHEET_STRUCT_TYPE )
sheetname = sheet->m_SheetName; sheetname = sheet->m_SheetName;
else sheetname = _("Root"); else sheetname = _("Root");
if ( CompactForm ) if ( CompactForm )
...@@ -1047,7 +1047,7 @@ wxString msg; ...@@ -1047,7 +1047,7 @@ wxString msg;
DrawList = List[ii]; DrawList = List[ii];
if( DrawList == NULL ) continue; if( DrawList == NULL ) continue;
if( DrawList->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) continue; if( DrawList->Type() != DRAW_LIB_ITEM_STRUCT_TYPE ) continue;
DrawLibItem = (EDA_SchComponentStruct *) DrawList; DrawLibItem = (EDA_SchComponentStruct *) DrawList;
if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue; if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue;
......
...@@ -71,7 +71,7 @@ LibEDA_BaseStruct * CurrentItem = CurrentDrawItem; ...@@ -71,7 +71,7 @@ LibEDA_BaseStruct * CurrentItem = CurrentDrawItem;
bool show_fill_option = FALSE; bool show_fill_option = FALSE;
int fill_option = 0; int fill_option = 0;
if( CurrentItem ) if( CurrentItem )
switch(CurrentItem->m_StructType) switch(CurrentItem->Type())
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
show_fill_option = TRUE; show_fill_option = TRUE;
......
...@@ -64,7 +64,7 @@ wxString msg; ...@@ -64,7 +64,7 @@ wxString msg;
Create(parent, id, caption, pos, size, style); Create(parent, id, caption, pos, size, style);
m_TextLabel->SetValue(m_CurrentText->m_Text); m_TextLabel->SetValue(m_CurrentText->m_Text);
m_TextLabel->SetFocus(); m_TextLabel->SetFocus();
switch( m_CurrentText->m_StructType ) switch( m_CurrentText->Type() )
{ {
case DRAW_GLOBAL_LABEL_STRUCT_TYPE: case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
SetTitle(_("Global Label properties")); SetTitle(_("Global Label properties"));
...@@ -187,7 +187,7 @@ void WinEDA_LabelPropertiesFrame::CreateControls() ...@@ -187,7 +187,7 @@ void WinEDA_LabelPropertiesFrame::CreateControls()
m_TextShape->SetValidator( wxGenericValidator(& m_CurrentText->m_Shape) ); m_TextShape->SetValidator( wxGenericValidator(& m_CurrentText->m_Shape) );
////@end WinEDA_LabelPropertiesFrame content construction ////@end WinEDA_LabelPropertiesFrame content construction
if (m_CurrentText->m_StructType == DRAW_GLOBAL_LABEL_STRUCT_TYPE ) if (m_CurrentText->Type() == DRAW_GLOBAL_LABEL_STRUCT_TYPE )
m_TextShape->Show(true); m_TextShape->Show(true);
} }
......
...@@ -960,7 +960,7 @@ LibEDA_BaseStruct* DrawItem = NULL, * NextDrawItem; ...@@ -960,7 +960,7 @@ LibEDA_BaseStruct* DrawItem = NULL, * NextDrawItem;
for ( ; DrawItem != NULL; DrawItem = DrawItem->Next() ) for ( ; DrawItem != NULL; DrawItem = DrawItem->Next() )
{ {
/* Duplication des items pour autres elements */ /* Duplication des items pour autres elements */
if( DrawItem->m_StructType != COMPONENT_PIN_DRAW_TYPE ) continue; if( DrawItem->Type() != COMPONENT_PIN_DRAW_TYPE ) continue;
if( DrawItem->m_Convert == 1 ) if( DrawItem->m_Convert == 1 )
{ {
if( FlagDel == 0 ) if( FlagDel == 0 )
......
...@@ -44,7 +44,7 @@ void InstallCmpeditFrame( WinEDA_SchematicFrame* parent, wxPoint& pos, ...@@ -44,7 +44,7 @@ void InstallCmpeditFrame( WinEDA_SchematicFrame* parent, wxPoint& pos,
*/ */
{ {
parent->DrawPanel->m_IgnoreMouseEvents = TRUE; parent->DrawPanel->m_IgnoreMouseEvents = TRUE;
if( cmp->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if( cmp->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
{ {
DisplayError( parent, DisplayError( parent,
wxT( "InstallCmpeditFrame() error: This struct is not a component" ) ); wxT( "InstallCmpeditFrame() error: This struct is not a component" ) );
...@@ -62,7 +62,7 @@ void InstallCmpeditFrame( WinEDA_SchematicFrame* parent, wxPoint& pos, ...@@ -62,7 +62,7 @@ void InstallCmpeditFrame( WinEDA_SchematicFrame* parent, wxPoint& pos,
/*****************************************************/ /*****************************************************/
void WinEDA_ComponentPropertiesFrame::InitBuffers( void ) void WinEDA_ComponentPropertiesFrame::InitBuffers()
/*****************************************************/ /*****************************************************/
/* Init the buffers to a default value, /* Init the buffers to a default value,
...@@ -105,7 +105,7 @@ void WinEDA_ComponentPropertiesFrame::InitBuffers( void ) ...@@ -105,7 +105,7 @@ void WinEDA_ComponentPropertiesFrame::InitBuffers( void )
/****************************************************************/ /****************************************************************/
void WinEDA_ComponentPropertiesFrame::CopyDataToPanelField( void ) void WinEDA_ComponentPropertiesFrame::CopyDataToPanelField()
/****************************************************************/ /****************************************************************/
/* Set the values displayed on the panel field according to /* Set the values displayed on the panel field according to
...@@ -153,7 +153,7 @@ void WinEDA_ComponentPropertiesFrame::CopyDataToPanelField( void ) ...@@ -153,7 +153,7 @@ void WinEDA_ComponentPropertiesFrame::CopyDataToPanelField( void )
/****************************************************************/ /****************************************************************/
void WinEDA_ComponentPropertiesFrame::CopyPanelFieldToData( void ) void WinEDA_ComponentPropertiesFrame::CopyPanelFieldToData()
/****************************************************************/ /****************************************************************/
/* Copy the values displayed on the panel field to the buffers according to /* Copy the values displayed on the panel field to the buffers according to
...@@ -172,7 +172,7 @@ void WinEDA_ComponentPropertiesFrame::CopyPanelFieldToData( void ) ...@@ -172,7 +172,7 @@ void WinEDA_ComponentPropertiesFrame::CopyPanelFieldToData( void )
/*************************************************************/ /*************************************************************/
void WinEDA_ComponentPropertiesFrame::BuildPanelFields( void ) void WinEDA_ComponentPropertiesFrame::BuildPanelFields()
/*************************************************************/ /*************************************************************/
{ {
int ii, FieldId; int ii, FieldId;
...@@ -226,7 +226,7 @@ void WinEDA_ComponentPropertiesFrame::BuildPanelFields( void ) ...@@ -226,7 +226,7 @@ void WinEDA_ComponentPropertiesFrame::BuildPanelFields( void )
/**********************************************************/ /**********************************************************/
void WinEDA_ComponentPropertiesFrame::BuildPanelBasic( void ) void WinEDA_ComponentPropertiesFrame::BuildPanelBasic()
/**********************************************************/ /**********************************************************/
/* create the basic panel for component properties editing /* create the basic panel for component properties editing
...@@ -691,7 +691,7 @@ void PartTextStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC ) ...@@ -691,7 +691,7 @@ void PartTextStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC )
EDA_SchComponentStruct* Cmp = (EDA_SchComponentStruct*) m_Parent; EDA_SchComponentStruct* Cmp = (EDA_SchComponentStruct*) m_Parent;
/* save old cmp in undo list */ /* save old cmp in undo list */
if( g_ItemToUndoCopy && ( g_ItemToUndoCopy->m_StructType == Cmp->m_StructType) ) if( g_ItemToUndoCopy && ( g_ItemToUndoCopy->Type() == Cmp->Type()) )
{ {
Cmp->SwapData( (EDA_SchComponentStruct*) g_ItemToUndoCopy ); Cmp->SwapData( (EDA_SchComponentStruct*) g_ItemToUndoCopy );
( (WinEDA_SchematicFrame*) frame )->SaveCopyInUndoList( Cmp, IS_CHANGED ); ( (WinEDA_SchematicFrame*) frame )->SaveCopyInUndoList( Cmp, IS_CHANGED );
......
...@@ -82,7 +82,7 @@ void WinEDA_SchematicFrame::StartMoveTexte( DrawTextStruct* TextStruct, wxDC* DC ...@@ -82,7 +82,7 @@ void WinEDA_SchematicFrame::StartMoveTexte( DrawTextStruct* TextStruct, wxDC* DC
TextStruct->m_Flags |= IS_MOVED; TextStruct->m_Flags |= IS_MOVED;
switch( TextStruct->m_StructType ) switch( TextStruct->Type() )
{ {
case DRAW_LABEL_STRUCT_TYPE: case DRAW_LABEL_STRUCT_TYPE:
case DRAW_GLOBAL_LABEL_STRUCT_TYPE: case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
...@@ -153,7 +153,7 @@ void WinEDA_SchematicFrame::ChangeTextOrient( DrawTextStruct* TextStruct, wxDC* ...@@ -153,7 +153,7 @@ void WinEDA_SchematicFrame::ChangeTextOrient( DrawTextStruct* TextStruct, wxDC*
RedrawOneStruct( DrawPanel, DC, TextStruct, g_XorMode ); RedrawOneStruct( DrawPanel, DC, TextStruct, g_XorMode );
/* Rotation du texte */ /* Rotation du texte */
switch( TextStruct->m_StructType ) switch( TextStruct->Type() )
{ {
case DRAW_LABEL_STRUCT_TYPE: case DRAW_LABEL_STRUCT_TYPE:
case DRAW_GLOBAL_LABEL_STRUCT_TYPE: case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
...@@ -193,10 +193,8 @@ EDA_BaseStruct* WinEDA_SchematicFrame::CreateNewText( wxDC* DC, int type ) ...@@ -193,10 +193,8 @@ EDA_BaseStruct* WinEDA_SchematicFrame::CreateNewText( wxDC* DC, int type )
break; break;
case LAYER_LOCLABEL: case LAYER_LOCLABEL:
{
NewText = new DrawLabelStruct( m_CurrentScreen->m_Curseur ); NewText = new DrawLabelStruct( m_CurrentScreen->m_Curseur );
NewText->m_Size.x = NewText->m_Size.y = g_DefaultTextLabelSize; NewText->m_Size.x = NewText->m_Size.y = g_DefaultTextLabelSize;
}
break; break;
case LAYER_GLOBLABEL: case LAYER_GLOBLABEL:
...@@ -250,7 +248,7 @@ static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) ...@@ -250,7 +248,7 @@ static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
RedrawOneStruct( panel, DC, TextStruct, g_XorMode ); RedrawOneStruct( panel, DC, TextStruct, g_XorMode );
/* Redessin du texte */ /* Redessin du texte */
switch( TextStruct->m_StructType ) switch( TextStruct->Type() )
{ {
case DRAW_LABEL_STRUCT_TYPE: case DRAW_LABEL_STRUCT_TYPE:
case DRAW_GLOBAL_LABEL_STRUCT_TYPE: case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
...@@ -295,7 +293,7 @@ static void ExitMoveTexte( WinEDA_DrawPanel* Panel, wxDC* DC ) ...@@ -295,7 +293,7 @@ static void ExitMoveTexte( WinEDA_DrawPanel* Panel, wxDC* DC )
} }
else /* Remise a jour des anciens parametres du texte */ else /* Remise a jour des anciens parametres du texte */
{ {
switch( Struct->m_StructType ) switch( Struct->Type() )
{ {
case DRAW_LABEL_STRUCT_TYPE: case DRAW_LABEL_STRUCT_TYPE:
case DRAW_GLOBAL_LABEL_STRUCT_TYPE: case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
...@@ -340,17 +338,17 @@ void WinEDA_SchematicFrame::ConvertTextType( DrawTextStruct* Text, ...@@ -340,17 +338,17 @@ void WinEDA_SchematicFrame::ConvertTextType( DrawTextStruct* Text,
switch( newtype ) switch( newtype )
{ {
case DRAW_LABEL_STRUCT_TYPE: case DRAW_LABEL_STRUCT_TYPE:
Text->m_StructType = DRAW_LABEL_STRUCT_TYPE; Text->SetType( DRAW_LABEL_STRUCT_TYPE );
Text->m_Layer = LAYER_LOCLABEL; Text->m_Layer = LAYER_LOCLABEL;
break; break;
case DRAW_GLOBAL_LABEL_STRUCT_TYPE: case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
Text->m_StructType = DRAW_GLOBAL_LABEL_STRUCT_TYPE; Text->SetType( DRAW_GLOBAL_LABEL_STRUCT_TYPE );
Text->m_Layer = LAYER_GLOBLABEL; Text->m_Layer = LAYER_GLOBLABEL;
break; break;
case DRAW_TEXT_STRUCT_TYPE: case DRAW_TEXT_STRUCT_TYPE:
Text->m_StructType = DRAW_TEXT_STRUCT_TYPE; Text->SetType( DRAW_TEXT_STRUCT_TYPE );
Text->m_Layer = LAYER_NOTES; Text->m_Layer = LAYER_NOTES;
break; break;
......
...@@ -86,13 +86,13 @@ public: ...@@ -86,13 +86,13 @@ public:
// Constructor and destructor // Constructor and destructor
WinEDA_ComponentPropertiesFrame( WinEDA_SchematicFrame* parent, wxPoint& pos, WinEDA_ComponentPropertiesFrame( WinEDA_SchematicFrame* parent, wxPoint& pos,
EDA_SchComponentStruct* cmp ); EDA_SchComponentStruct* cmp );
~WinEDA_ComponentPropertiesFrame( void ) ~WinEDA_ComponentPropertiesFrame()
{ {
} }
private: private:
void BuildPanelBasic( void ); void BuildPanelBasic();
void ComponentPropertiesAccept( wxCommandEvent& event ); void ComponentPropertiesAccept( wxCommandEvent& event );
void SetInitCmp( wxCommandEvent& event ); void SetInitCmp( wxCommandEvent& event );
void OnQuit( wxCommandEvent& event ); void OnQuit( wxCommandEvent& event );
...@@ -116,7 +116,7 @@ void InstallCmpeditFrame( WinEDA_SchematicFrame* parent, wxPoint& pos, ...@@ -116,7 +116,7 @@ void InstallCmpeditFrame( WinEDA_SchematicFrame* parent, wxPoint& pos,
*/ */
{ {
parent->DrawPanel->m_IgnoreMouseEvents = TRUE; parent->DrawPanel->m_IgnoreMouseEvents = TRUE;
if( cmp->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if( cmp->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
{ {
DisplayError( parent, DisplayError( parent,
wxT( "InstallCmpeditFrame() error: This struct is not a component" ) ); wxT( "InstallCmpeditFrame() error: This struct is not a component" ) );
...@@ -265,7 +265,7 @@ void WinEDA_ComponentPropertiesFrame::OnQuit( wxCommandEvent& WXUNUSED (event) ) ...@@ -265,7 +265,7 @@ void WinEDA_ComponentPropertiesFrame::OnQuit( wxCommandEvent& WXUNUSED (event) )
/**********************************************************/ /**********************************************************/
void WinEDA_ComponentPropertiesFrame::BuildPanelBasic( void ) void WinEDA_ComponentPropertiesFrame::BuildPanelBasic()
/**********************************************************/ /**********************************************************/
/* create the basic panel for component properties editing /* create the basic panel for component properties editing
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
void SetStructFather( EDA_BaseStruct* Struct, BASE_SCREEN* Screen ) void SetStructFather( EDA_BaseStruct* Struct, BASE_SCREEN* Screen )
/************************************************************/ /************************************************************/
{ {
switch( Struct->m_StructType ) switch( Struct->Type() )
{ {
case DRAW_POLYLINE_STRUCT_TYPE: case DRAW_POLYLINE_STRUCT_TYPE:
case DRAW_JUNCTION_STRUCT_TYPE: case DRAW_JUNCTION_STRUCT_TYPE:
...@@ -86,7 +86,7 @@ SCH_SCREEN::SCH_SCREEN( EDA_BaseStruct* parent, WinEDA_DrawFrame* frame_source, ...@@ -86,7 +86,7 @@ SCH_SCREEN::SCH_SCREEN( EDA_BaseStruct* parent, WinEDA_DrawFrame* frame_source,
/****************************/ /****************************/
SCH_SCREEN::~SCH_SCREEN( void ) SCH_SCREEN::~SCH_SCREEN()
/****************************/ /****************************/
{ {
ClearUndoRedoList(); ClearUndoRedoList();
...@@ -95,7 +95,7 @@ SCH_SCREEN::~SCH_SCREEN( void ) ...@@ -95,7 +95,7 @@ SCH_SCREEN::~SCH_SCREEN( void )
/*************************************/ /*************************************/
SCH_SCREEN* SCH_SCREEN::GenCopy( void ) SCH_SCREEN* SCH_SCREEN::GenCopy()
/*************************************/ /*************************************/
{ {
// TODO // TODO
...@@ -104,7 +104,7 @@ SCH_SCREEN* SCH_SCREEN::GenCopy( void ) ...@@ -104,7 +104,7 @@ SCH_SCREEN* SCH_SCREEN::GenCopy( void )
/***********************************/ /***********************************/
void SCH_SCREEN::FreeDrawList( void ) void SCH_SCREEN::FreeDrawList()
/***********************************/ /***********************************/
/* Routine to clear EESchema drawing list of a screen. /* Routine to clear EESchema drawing list of a screen.
......
...@@ -37,7 +37,7 @@ void WinEDA_SchematicFrame::BeginSegment( wxDC* DC, int type ) ...@@ -37,7 +37,7 @@ void WinEDA_SchematicFrame::BeginSegment( wxDC* DC, int type )
if( GetScreen()->GetCurItem() ) if( GetScreen()->GetCurItem() )
{ {
switch( GetScreen()->GetCurItem()->m_StructType ) switch( GetScreen()->GetCurItem()->Type() )
{ {
case DRAW_SEGMENT_STRUCT_TYPE: case DRAW_SEGMENT_STRUCT_TYPE:
case DRAW_POLYLINE_STRUCT_TYPE: case DRAW_POLYLINE_STRUCT_TYPE:
...@@ -254,7 +254,7 @@ void WinEDA_SchematicFrame::DeleteCurrentSegment( wxDC* DC ) ...@@ -254,7 +254,7 @@ void WinEDA_SchematicFrame::DeleteCurrentSegment( wxDC* DC )
} }
/* Trace en cours: annulation */ /* Trace en cours: annulation */
if( GetScreen()->GetCurItem()->m_StructType == DRAW_POLYLINE_STRUCT_TYPE ) if( GetScreen()->GetCurItem()->Type() == DRAW_POLYLINE_STRUCT_TYPE )
{ {
Polyline_in_Ghost( DrawPanel, DC, FALSE ); /* Effacement du trace en cours */ Polyline_in_Ghost( DrawPanel, DC, FALSE ); /* Effacement du trace en cours */
} }
...@@ -353,7 +353,7 @@ void WinEDA_SchematicFrame::RepeatDrawItem( wxDC* DC ) ...@@ -353,7 +353,7 @@ void WinEDA_SchematicFrame::RepeatDrawItem( wxDC* DC )
if( g_ItemToRepeat == NULL ) if( g_ItemToRepeat == NULL )
return; return;
switch( g_ItemToRepeat->m_StructType ) switch( g_ItemToRepeat->Type() )
{ {
case DRAW_JUNCTION_STRUCT_TYPE: case DRAW_JUNCTION_STRUCT_TYPE:
#undef STRUCT #undef STRUCT
...@@ -534,7 +534,7 @@ static bool IsTerminalPoint( SCH_SCREEN* screen, const wxPoint& pos, int layer ) ...@@ -534,7 +534,7 @@ static bool IsTerminalPoint( SCH_SCREEN* screen, const wxPoint& pos, int layer )
return TRUE; return TRUE;
item = PickStruct( screen, LABELITEM ); item = PickStruct( screen, LABELITEM );
if( item && (item->m_StructType != DRAW_TEXT_STRUCT_TYPE) if( item && (item->Type() != DRAW_TEXT_STRUCT_TYPE)
&& ( ( (DrawGlobalLabelStruct*) item )->m_Pos.x == pos.x ) && ( ( (DrawGlobalLabelStruct*) item )->m_Pos.x == pos.x )
&& ( ( (DrawGlobalLabelStruct*) item )->m_Pos.y == pos.y ) ) && ( ( (DrawGlobalLabelStruct*) item )->m_Pos.y == pos.y ) )
return TRUE; return TRUE;
......
...@@ -48,7 +48,7 @@ static void DrawLibPartAux( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -48,7 +48,7 @@ static void DrawLibPartAux( WinEDA_DrawPanel* panel, wxDC* DC,
int DrawMode, int Color = -1, bool DrawPinText = TRUE ); int DrawMode, int Color = -1, bool DrawPinText = TRUE );
/******************************/ /******************************/
static void CreateDummyCmp( void ) static void CreateDummyCmp()
/******************************/ /******************************/
{ {
DummyCmp = new EDA_LibComponentStruct( NULL ); DummyCmp = new EDA_LibComponentStruct( NULL );
...@@ -433,7 +433,7 @@ void DrawLibPartAux( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -433,7 +433,7 @@ void DrawLibPartAux( WinEDA_DrawPanel* panel, wxDC* DC,
SetHightColor = (DEntry->m_Selected & IS_SELECTED) ? HIGHT_LIGHT_FLAG : 0; SetHightColor = (DEntry->m_Selected & IS_SELECTED) ? HIGHT_LIGHT_FLAG : 0;
LineWidth = MAX( DEntry->m_Width, g_DrawMinimunLineWidth ); LineWidth = MAX( DEntry->m_Width, g_DrawMinimunLineWidth );
switch( DEntry->m_StructType ) switch( DEntry->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
{ {
...@@ -925,7 +925,7 @@ void DrawLibraryDrawStruct( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -925,7 +925,7 @@ void DrawLibraryDrawStruct( WinEDA_DrawPanel* panel, wxDC* DC,
int LineWidth = MAX( DrawItem->m_Width, g_DrawMinimunLineWidth ); int LineWidth = MAX( DrawItem->m_Width, g_DrawMinimunLineWidth );
switch( DrawItem->m_StructType ) switch( DrawItem->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
{ {
......
...@@ -237,7 +237,7 @@ void FreeCmpLibrary( wxWindow* frame, const wxString& LibName ) ...@@ -237,7 +237,7 @@ void FreeCmpLibrary( wxWindow* frame, const wxString& LibName )
/******************************/ /******************************/
const wxChar** GetLibNames( void ) const wxChar** GetLibNames()
/******************************/ /******************************/
/* Routine to return pointers to all library names. /* Routine to return pointers to all library names.
...@@ -806,7 +806,7 @@ LibraryStruct* FindLibrary( const wxString& Name ) ...@@ -806,7 +806,7 @@ LibraryStruct* FindLibrary( const wxString& Name )
/***************************************************************************** /*****************************************************************************
* Routine to find the number of libraries currently loaded. * * Routine to find the number of libraries currently loaded. *
*****************************************************************************/ *****************************************************************************/
int NumOfLibraries( void ) int NumOfLibraries()
{ {
int ii; int ii;
LibraryStruct* Lib = g_LibraryList; LibraryStruct* Lib = g_LibraryList;
...@@ -1080,7 +1080,7 @@ static bool ReadLibEntryDateAndTime( EDA_LibComponentStruct* LibEntry, char* Lin ...@@ -1080,7 +1080,7 @@ static bool ReadLibEntryDateAndTime( EDA_LibComponentStruct* LibEntry, char* Lin
/*******************************************/ /*******************************************/
static int SortItemsFct( const void* ref, const void* item ); static int SortItemsFct( const void* ref, const void* item );
void EDA_LibComponentStruct::SortDrawItems( void ) void EDA_LibComponentStruct::SortDrawItems()
/*******************************************/ /*******************************************/
/* Trie les lments graphiques d'un composant lib pour amliorer /* Trie les lments graphiques d'un composant lib pour amliorer
...@@ -1130,7 +1130,7 @@ int SortItemsFct( const void* ref, const void* item ) ...@@ -1130,7 +1130,7 @@ int SortItemsFct( const void* ref, const void* item )
int fill_ref = 0, fill_item = 0; int fill_ref = 0, fill_item = 0;
switch( Ref->m_StructType ) switch( Ref->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
{ {
...@@ -1161,15 +1161,15 @@ int SortItemsFct( const void* ref, const void* item ) ...@@ -1161,15 +1161,15 @@ int SortItemsFct( const void* ref, const void* item )
} }
case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE: case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE:
if( Item->m_StructType == COMPONENT_PIN_DRAW_TYPE ) if( Item->Type() == COMPONENT_PIN_DRAW_TYPE )
return BEFORE; return BEFORE;
if( Item->m_StructType == COMPONENT_GRAPHIC_TEXT_DRAW_TYPE ) if( Item->Type() == COMPONENT_GRAPHIC_TEXT_DRAW_TYPE )
return 0; return 0;
return 1; return 1;
break; break;
case COMPONENT_PIN_DRAW_TYPE: case COMPONENT_PIN_DRAW_TYPE:
if( Item->m_StructType == COMPONENT_PIN_DRAW_TYPE ) if( Item->Type() == COMPONENT_PIN_DRAW_TYPE )
{ {
int ii; int ii;
...@@ -1199,7 +1199,7 @@ int SortItemsFct( const void* ref, const void* item ) ...@@ -1199,7 +1199,7 @@ int SortItemsFct( const void* ref, const void* item )
} }
/* Test de l'item */ /* Test de l'item */
switch( Item->m_StructType ) switch( Item->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
{ {
......
...@@ -182,7 +182,7 @@ void LoadSubHierarchy( WinEDA_SchematicFrame* frame, EDA_BaseStruct* DrawList ) ...@@ -182,7 +182,7 @@ void LoadSubHierarchy( WinEDA_SchematicFrame* frame, EDA_BaseStruct* DrawList )
while( EEDrawList ) while( EEDrawList )
{ {
if( EEDrawList->m_StructType == DRAW_SHEET_STRUCT_TYPE ) if( EEDrawList->Type() == DRAW_SHEET_STRUCT_TYPE )
{ {
#undef STRUCT #undef STRUCT
#define STRUCT ( (DrawSheetStruct*) EEDrawList ) #define STRUCT ( (DrawSheetStruct*) EEDrawList )
......
...@@ -154,7 +154,7 @@ void RedrawStructList(WinEDA_DrawPanel * panel, wxDC * DC, ...@@ -154,7 +154,7 @@ void RedrawStructList(WinEDA_DrawPanel * panel, wxDC * DC,
{ {
while (Structs) while (Structs)
{ {
if (Structs->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE) if (Structs->Type() == DRAW_PICK_ITEM_STRUCT_TYPE)
{ {
RedrawOneStruct(panel, DC, RedrawOneStruct(panel, DC,
((DrawPickedStruct *) Structs)->m_PickedStruct, ((DrawPickedStruct *) Structs)->m_PickedStruct,
...@@ -353,7 +353,7 @@ int width = g_DrawMinimunLineWidth; ...@@ -353,7 +353,7 @@ int width = g_DrawMinimunLineWidth;
GRSetDrawMode(DC, DrawMode); GRSetDrawMode(DC, DrawMode);
switch (DrawStruct->m_StructType) switch (DrawStruct->Type())
{ {
case DRAW_POLYLINE_STRUCT_TYPE: case DRAW_POLYLINE_STRUCT_TYPE:
{ {
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
/* Routines locales */ /* Routines locales */
static void CreateScreens( void ); static void CreateScreens();
// Global variables // Global variables
wxString g_Main_Title( wxT( "EESchema" ) ); wxString g_Main_Title( wxT( "EESchema" ) );
...@@ -42,7 +42,7 @@ wxString g_Main_Title( wxT( "EESchema" ) ); ...@@ -42,7 +42,7 @@ wxString g_Main_Title( wxT( "EESchema" ) );
// not wxApp) // not wxApp)
IMPLEMENT_APP( WinEDA_App ) IMPLEMENT_APP( WinEDA_App )
bool WinEDA_App::OnInit( void ) bool WinEDA_App::OnInit()
{ {
wxString FFileName; wxString FFileName;
...@@ -108,7 +108,7 @@ bool WinEDA_App::OnInit( void ) ...@@ -108,7 +108,7 @@ bool WinEDA_App::OnInit( void )
/******************************/ /******************************/
static void CreateScreens( void ) static void CreateScreens()
/******************************/ /******************************/
/* /*
......
...@@ -413,7 +413,7 @@ wxClientDC dc(m_Parent->DrawPanel); ...@@ -413,7 +413,7 @@ wxClientDC dc(m_Parent->DrawPanel);
DrawStruct = m_Parent->GetScreen()->EEDrawList; DrawStruct = m_Parent->GetScreen()->EEDrawList;
for ( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext ) for ( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext )
{ {
if(DrawStruct->m_StructType != DRAW_MARKER_STRUCT_TYPE ) continue; if(DrawStruct->Type() != DRAW_MARKER_STRUCT_TYPE ) continue;
/* Marqueur trouve */ /* Marqueur trouve */
Marker = (DrawMarkerStruct * ) DrawStruct; Marker = (DrawMarkerStruct * ) DrawStruct;
if( Marker->m_Type == MARQ_ERC ) if( Marker->m_Type == MARQ_ERC )
...@@ -693,7 +693,7 @@ wxString msg; ...@@ -693,7 +693,7 @@ wxString msg;
DrawStruct = Screen->EEDrawList; DrawStruct = Screen->EEDrawList;
for ( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext) for ( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext)
{ {
if(DrawStruct->m_StructType != DRAW_MARKER_STRUCT_TYPE ) if(DrawStruct->Type() != DRAW_MARKER_STRUCT_TYPE )
continue; continue;
/* Marqueur trouve */ /* Marqueur trouve */
......
...@@ -1063,7 +1063,7 @@ LibEDA_BaseStruct* DrawItem = NULL, * NextDrawItem; ...@@ -1063,7 +1063,7 @@ LibEDA_BaseStruct* DrawItem = NULL, * NextDrawItem;
for ( ; DrawItem != NULL; DrawItem = DrawItem->Pnext ) for ( ; DrawItem != NULL; DrawItem = DrawItem->Pnext )
{ {
/* Duplication des items pour autres elements */ /* Duplication des items pour autres elements */
if( DrawItem->m_StructType != PIN_DRAW_TYPE ) continue; if( DrawItem->Type() != PIN_DRAW_TYPE ) continue;
if( DrawItem->m_Convert == 1 ) if( DrawItem->m_Convert == 1 )
{ {
if( FlagDel == 0 ) if( FlagDel == 0 )
......
...@@ -128,7 +128,7 @@ int Nb = 0; ...@@ -128,7 +128,7 @@ int Nb = 0;
{ {
for( Phead=Window->EEDrawList; Phead != NULL; Phead=Phead->Pnext) for( Phead=Window->EEDrawList; Phead != NULL; Phead=Phead->Pnext)
{ {
if (Phead->m_StructType == DRAW_LIB_ITEM_STRUCT_TYPE) if (Phead->Type() == DRAW_LIB_ITEM_STRUCT_TYPE)
{ {
DrawPartStruct * Cmp = (DrawPartStruct *) Phead; DrawPartStruct * Cmp = (DrawPartStruct *) Phead;
if ( Cmp->m_Field[VALUE].m_Text.GetChar(0) != '#' ) Nb++; if ( Cmp->m_Field[VALUE].m_Text.GetChar(0) != '#' ) Nb++;
......
...@@ -90,7 +90,7 @@ EDA_BaseStruct* WinEDA_SchematicFrame::FindMarker( int SearchType ) ...@@ -90,7 +90,7 @@ EDA_BaseStruct* WinEDA_SchematicFrame::FindMarker( int SearchType )
DrawList = Screen->EEDrawList; DrawList = Screen->EEDrawList;
while( DrawList && NotFound ) while( DrawList && NotFound )
{ {
if( DrawList->m_StructType == DRAW_MARKER_STRUCT_TYPE ) if( DrawList->Type() == DRAW_MARKER_STRUCT_TYPE )
{ {
Marker = (DrawMarkerStruct*) DrawList; Marker = (DrawMarkerStruct*) DrawList;
NotFound = FALSE; NotFound = FALSE;
...@@ -255,7 +255,7 @@ EDA_BaseStruct* WinEDA_SchematicFrame::FindSchematicItem( ...@@ -255,7 +255,7 @@ EDA_BaseStruct* WinEDA_SchematicFrame::FindSchematicItem(
DrawList = Screen->EEDrawList; DrawList = Screen->EEDrawList;
while( DrawList ) while( DrawList )
{ {
switch( DrawList->m_StructType ) switch( DrawList->Type() )
{ {
case DRAW_LIB_ITEM_STRUCT_TYPE: case DRAW_LIB_ITEM_STRUCT_TYPE:
EDA_SchComponentStruct* pSch; EDA_SchComponentStruct* pSch;
...@@ -343,7 +343,7 @@ EDA_BaseStruct* WinEDA_SchematicFrame::FindSchematicItem( ...@@ -343,7 +343,7 @@ EDA_BaseStruct* WinEDA_SchematicFrame::FindSchematicItem(
/* If the struct found is a DRAW_LIB_ITEM_STRUCT_TYPE type, /* If the struct found is a DRAW_LIB_ITEM_STRUCT_TYPE type,
* coordinates must be computed according to its orientation matrix * coordinates must be computed according to its orientation matrix
*/ */
if( Struct->m_StructType == DRAW_LIB_ITEM_STRUCT_TYPE ) if( Struct->Type() == DRAW_LIB_ITEM_STRUCT_TYPE )
{ {
EDA_SchComponentStruct* pSch = (EDA_SchComponentStruct*) Struct; EDA_SchComponentStruct* pSch = (EDA_SchComponentStruct*) Struct;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
/* Structures pour memo et liste des elements */ /* Structures pour memo et liste des elements */
typedef struct ListLabel typedef struct ListLabel
{ {
int m_StructType; int Type();
void * m_Label; void * m_Label;
int m_SheetNumber; int m_SheetNumber;
} ListLabel; } ListLabel;
...@@ -318,7 +318,7 @@ BASE_SCREEN * screen = ScreenSch; ...@@ -318,7 +318,7 @@ BASE_SCREEN * screen = ScreenSch;
DrawList = screen->EEDrawList; DrawList = screen->EEDrawList;
while ( DrawList ) while ( DrawList )
{ {
switch( DrawList->m_StructType ) switch( DrawList->Type() )
{ {
case DRAW_LIB_ITEM_STRUCT_TYPE : case DRAW_LIB_ITEM_STRUCT_TYPE :
...@@ -359,12 +359,12 @@ BASE_SCREEN * screen = ScreenSch; ...@@ -359,12 +359,12 @@ BASE_SCREEN * screen = ScreenSch;
DrawList = screen->EEDrawList; DrawList = screen->EEDrawList;
while ( DrawList ) while ( DrawList )
{ {
switch( DrawList->m_StructType ) switch( DrawList->Type() )
{ {
case DRAW_GLOBAL_LABEL_STRUCT_TYPE : case DRAW_GLOBAL_LABEL_STRUCT_TYPE :
if( List ) if( List )
{ {
List->m_StructType = DRAW_TEXT_STRUCT_TYPE; List->Type() = DRAW_TEXT_STRUCT_TYPE;
List->m_SheetNumber = screen->m_SheetNumber; List->m_SheetNumber = screen->m_SheetNumber;
List->m_Label = DrawList; List++; List->m_Label = DrawList; List++;
} }
...@@ -379,7 +379,7 @@ BASE_SCREEN * screen = ScreenSch; ...@@ -379,7 +379,7 @@ BASE_SCREEN * screen = ScreenSch;
{ {
if ( List ) if ( List )
{ {
List->m_StructType = DRAW_SHEETLABEL_STRUCT_TYPE; List->Type() = DRAW_SHEETLABEL_STRUCT_TYPE;
List->m_SheetNumber = screen->m_SheetNumber; List->m_SheetNumber = screen->m_SheetNumber;
List->m_Label = SheetLabel; List->m_Label = SheetLabel;
List++; List++;
...@@ -487,12 +487,12 @@ static int ListTriGLabelByVal(ListLabel *Objet1, ListLabel *Objet2) ...@@ -487,12 +487,12 @@ static int ListTriGLabelByVal(ListLabel *Objet1, ListLabel *Objet2)
int ii; int ii;
const wxString * Text1, *Text2; const wxString * Text1, *Text2;
if( Objet1->m_StructType == DRAW_SHEETLABEL_STRUCT_TYPE ) if( Objet1->Type() == DRAW_SHEETLABEL_STRUCT_TYPE )
Text1 = &((DrawSheetLabelStruct *)Objet1->m_Label)->m_Text; Text1 = &((DrawSheetLabelStruct *)Objet1->m_Label)->m_Text;
else else
Text1 = &((DrawTextStruct *)Objet1->m_Label)->m_Text; Text1 = &((DrawTextStruct *)Objet1->m_Label)->m_Text;
if( Objet2->m_StructType == DRAW_SHEETLABEL_STRUCT_TYPE ) if( Objet2->Type() == DRAW_SHEETLABEL_STRUCT_TYPE )
Text2 = &((DrawSheetLabelStruct *)Objet2->m_Label)->m_Text; Text2 = &((DrawSheetLabelStruct *)Objet2->m_Label)->m_Text;
else else
Text2 = &((DrawTextStruct *)Objet2->m_Label)->m_Text; Text2 = &((DrawTextStruct *)Objet2->m_Label)->m_Text;
...@@ -523,12 +523,12 @@ const wxString * Text1, *Text2; ...@@ -523,12 +523,12 @@ const wxString * Text1, *Text2;
if ( ii == 0 ) if ( ii == 0 )
{ {
if( Objet1->m_StructType == DRAW_SHEETLABEL_STRUCT_TYPE ) if( Objet1->Type() == DRAW_SHEETLABEL_STRUCT_TYPE )
Text1 = &((DrawSheetLabelStruct *)Objet1->m_Label)->m_Text; Text1 = &((DrawSheetLabelStruct *)Objet1->m_Label)->m_Text;
else else
Text1 = &((DrawTextStruct *)Objet1->m_Label)->m_Text; Text1 = &((DrawTextStruct *)Objet1->m_Label)->m_Text;
if( Objet2->m_StructType == DRAW_SHEETLABEL_STRUCT_TYPE ) if( Objet2->Type() == DRAW_SHEETLABEL_STRUCT_TYPE )
Text2 = &((DrawSheetLabelStruct *)Objet2->m_Label)->m_Text; Text2 = &((DrawSheetLabelStruct *)Objet2->m_Label)->m_Text;
else else
Text2 = &((DrawTextStruct *)Objet2->m_Label)->m_Text; Text2 = &((DrawTextStruct *)Objet2->m_Label)->m_Text;
...@@ -590,7 +590,7 @@ wxString msg; ...@@ -590,7 +590,7 @@ wxString msg;
DrawList = List[ii]; DrawList = List[ii];
if( DrawList == NULL ) continue; if( DrawList == NULL ) continue;
if( DrawList->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) continue; if( DrawList->Type() != DRAW_LIB_ITEM_STRUCT_TYPE ) continue;
DrawLibItem = (EDA_SchComponentStruct *) DrawList; DrawLibItem = (EDA_SchComponentStruct *) DrawList;
if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue; if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue;
...@@ -646,7 +646,7 @@ wxString msg; ...@@ -646,7 +646,7 @@ wxString msg;
DrawList = List[ii]; DrawList = List[ii];
if( DrawList == NULL ) continue; if( DrawList == NULL ) continue;
if( DrawList->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) continue; if( DrawList->Type() != DRAW_LIB_ITEM_STRUCT_TYPE ) continue;
DrawLibItem = (EDA_SchComponentStruct *) DrawList; DrawLibItem = (EDA_SchComponentStruct *) DrawList;
if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue; if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue;
...@@ -689,7 +689,7 @@ wxString msg; ...@@ -689,7 +689,7 @@ wxString msg;
{ {
LabelItem = & List[ii]; LabelItem = & List[ii];
switch( LabelItem->m_StructType ) switch( LabelItem->Type() )
{ {
case DRAW_GLOBAL_LABEL_STRUCT_TYPE : case DRAW_GLOBAL_LABEL_STRUCT_TYPE :
DrawTextItem = (DrawGlobalLabelStruct *)(LabelItem->m_Label); DrawTextItem = (DrawGlobalLabelStruct *)(LabelItem->m_Label);
......
...@@ -466,7 +466,7 @@ void WinEDA_SchematicFrame::StartMovePart( EDA_SchComponentStruct* Component, ...@@ -466,7 +466,7 @@ void WinEDA_SchematicFrame::StartMovePart( EDA_SchComponentStruct* Component,
{ {
if( Component == NULL ) if( Component == NULL )
return; return;
if( Component->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if( Component->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
return; return;
if( Component->m_Flags == 0 ) if( Component->m_Flags == 0 )
......
...@@ -206,7 +206,7 @@ SCH_SCREEN * Screen; ...@@ -206,7 +206,7 @@ SCH_SCREEN * Screen;
while( DrawStruct ) while( DrawStruct )
{ {
if(DrawStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE ) if(DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE )
{ {
#define STRUCT ((DrawSheetStruct*)DrawStruct) #define STRUCT ((DrawSheetStruct*)DrawStruct)
nbsheets++; nbsheets++;
......
...@@ -190,7 +190,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, ...@@ -190,7 +190,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
{ {
if( DrawStruct->m_Flags ) // Item selected and edition in progress if( DrawStruct->m_Flags ) // Item selected and edition in progress
{ {
if( DrawStruct->m_StructType == DRAW_SEGMENT_STRUCT_TYPE ) if( DrawStruct->Type() == DRAW_SEGMENT_STRUCT_TYPE )
{ {
EDA_DrawLineStruct* segment = (EDA_DrawLineStruct*) DrawStruct; EDA_DrawLineStruct* segment = (EDA_DrawLineStruct*) DrawStruct;
if( segment->m_Layer != LAYER_WIRE ) if( segment->m_Layer != LAYER_WIRE )
...@@ -214,13 +214,13 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, ...@@ -214,13 +214,13 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
GetScreen()->EEDrawList, LIBITEM | TEXTITEM | LABELITEM ); GetScreen()->EEDrawList, LIBITEM | TEXTITEM | LABELITEM );
if( DrawStruct == NULL ) if( DrawStruct == NULL )
break; break;
if( DrawStruct->m_StructType == DRAW_LIB_ITEM_STRUCT_TYPE ) if( DrawStruct->Type() == DRAW_LIB_ITEM_STRUCT_TYPE )
DrawStruct = LocateSmallestComponent( GetScreen() ); DrawStruct = LocateSmallestComponent( GetScreen() );
if( DrawStruct == NULL ) if( DrawStruct == NULL )
break; break;
} }
switch( DrawStruct->m_StructType ) switch( DrawStruct->Type() )
{ {
case DRAW_LIB_ITEM_STRUCT_TYPE: case DRAW_LIB_ITEM_STRUCT_TYPE:
if( DrawStruct->m_Flags == 0 ) if( DrawStruct->m_Flags == 0 )
...@@ -368,7 +368,7 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey, ...@@ -368,7 +368,7 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
case HK_REPEAT_LAST: case HK_REPEAT_LAST:
if( LibItemToRepeat && (LibItemToRepeat->m_Flags == 0) if( LibItemToRepeat && (LibItemToRepeat->m_Flags == 0)
&& (LibItemToRepeat->m_StructType == COMPONENT_PIN_DRAW_TYPE) ) && (LibItemToRepeat->Type() == COMPONENT_PIN_DRAW_TYPE) )
{ {
RepeatPinItem( DC, (LibDrawPin*) LibItemToRepeat ); RepeatPinItem( DC, (LibDrawPin*) LibItemToRepeat );
} }
......
...@@ -130,7 +130,7 @@ LibCmpEntry::LibCmpEntry( LibrEntryType CmpType, const wxChar* CmpName ) : ...@@ -130,7 +130,7 @@ LibCmpEntry::LibCmpEntry( LibrEntryType CmpType, const wxChar* CmpName ) :
/******************************/ /******************************/
LibCmpEntry::~LibCmpEntry( void ) LibCmpEntry::~LibCmpEntry()
/******************************/ /******************************/
{ {
} }
...@@ -159,7 +159,7 @@ EDA_LibCmpAliasStruct:: EDA_LibCmpAliasStruct( const wxChar* CmpName, ...@@ -159,7 +159,7 @@ EDA_LibCmpAliasStruct:: EDA_LibCmpAliasStruct( const wxChar* CmpName,
} }
EDA_LibCmpAliasStruct::~EDA_LibCmpAliasStruct( void ) EDA_LibCmpAliasStruct::~EDA_LibCmpAliasStruct()
{ {
} }
...@@ -187,7 +187,7 @@ EDA_LibComponentStruct:: EDA_LibComponentStruct( const wxChar* CmpName ) : ...@@ -187,7 +187,7 @@ EDA_LibComponentStruct:: EDA_LibComponentStruct( const wxChar* CmpName ) :
/******************************************************/ /******************************************************/
EDA_LibComponentStruct::~EDA_LibComponentStruct( void ) EDA_LibComponentStruct::~EDA_LibComponentStruct()
/******************************************************/ /******************************************************/
{ {
LibEDA_BaseStruct* DrawItem, * NextDrawItem; LibEDA_BaseStruct* DrawItem, * NextDrawItem;
...@@ -247,7 +247,7 @@ EDA_Rect EDA_LibComponentStruct::GetBoundaryBox( int Unit, int Convert ) ...@@ -247,7 +247,7 @@ EDA_Rect EDA_LibComponentStruct::GetBoundaryBox( int Unit, int Convert )
if( (Convert > 0) && (Convert != DrawEntry->m_Convert) ) if( (Convert > 0) && (Convert != DrawEntry->m_Convert) )
continue; continue;
switch( DrawEntry->m_StructType ) switch( DrawEntry->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
{ {
...@@ -403,13 +403,13 @@ LibDrawField::LibDrawField( int idfield ) : LibEDA_BaseStruct( COMPONENT_FIELD_D ...@@ -403,13 +403,13 @@ LibDrawField::LibDrawField( int idfield ) : LibEDA_BaseStruct( COMPONENT_FIELD_D
} }
LibDrawField::~LibDrawField( void ) LibDrawField::~LibDrawField()
{ {
} }
// Creation et Duplication d'un field // Creation et Duplication d'un field
LibDrawField* LibDrawField::GenCopy( void ) LibDrawField* LibDrawField::GenCopy()
{ {
LibDrawField* newfield = new LibDrawField( m_FieldId ); LibDrawField* newfield = new LibDrawField( m_FieldId );
...@@ -447,7 +447,7 @@ LibEDA_BaseStruct::LibEDA_BaseStruct( KICAD_T struct_type ) : ...@@ -447,7 +447,7 @@ LibEDA_BaseStruct::LibEDA_BaseStruct( KICAD_T struct_type ) :
/***************************************************************/ /***************************************************************/
LibDrawPin::LibDrawPin( void ) : LibEDA_BaseStruct( COMPONENT_PIN_DRAW_TYPE ) LibDrawPin::LibDrawPin() : LibEDA_BaseStruct( COMPONENT_PIN_DRAW_TYPE )
/***************************************************************/ /***************************************************************/
{ {
m_PinLen = 300; /* default Pin len */ m_PinLen = 300; /* default Pin len */
...@@ -465,7 +465,7 @@ LibDrawPin::LibDrawPin( void ) : LibEDA_BaseStruct( COMPONENT_PIN_DRAW_TYPE ) ...@@ -465,7 +465,7 @@ LibDrawPin::LibDrawPin( void ) : LibEDA_BaseStruct( COMPONENT_PIN_DRAW_TYPE )
/******************************************/ /******************************************/
wxPoint LibDrawPin::ReturnPinEndPoint( void ) wxPoint LibDrawPin::ReturnPinEndPoint()
/******************************************/ /******************************************/
/* return the pin end position, for a component in normal orient /* return the pin end position, for a component in normal orient
...@@ -582,7 +582,7 @@ void LibDrawPin::SetPinNumFromString( wxString& buffer ) ...@@ -582,7 +582,7 @@ void LibDrawPin::SetPinNumFromString( wxString& buffer )
/*************************************/ /*************************************/
LibDrawPin* LibDrawPin::GenCopy( void ) LibDrawPin* LibDrawPin::GenCopy()
/*************************************/ /*************************************/
{ {
LibDrawPin* newpin = new LibDrawPin(); LibDrawPin* newpin = new LibDrawPin();
...@@ -608,7 +608,7 @@ LibDrawPin* LibDrawPin::GenCopy( void ) ...@@ -608,7 +608,7 @@ LibDrawPin* LibDrawPin::GenCopy( void )
/**************************************************************/ /**************************************************************/
LibDrawArc::LibDrawArc( void ) : LibEDA_BaseStruct( COMPONENT_ARC_DRAW_TYPE ) LibDrawArc::LibDrawArc() : LibEDA_BaseStruct( COMPONENT_ARC_DRAW_TYPE )
/**************************************************************/ /**************************************************************/
{ {
m_Rayon = 0; m_Rayon = 0;
...@@ -619,7 +619,7 @@ LibDrawArc::LibDrawArc( void ) : LibEDA_BaseStruct( COMPONENT_ARC_DRAW_TYPE ) ...@@ -619,7 +619,7 @@ LibDrawArc::LibDrawArc( void ) : LibEDA_BaseStruct( COMPONENT_ARC_DRAW_TYPE )
/************************************/ /************************************/
LibDrawArc* LibDrawArc::GenCopy( void ) LibDrawArc* LibDrawArc::GenCopy()
/************************************/ /************************************/
{ {
LibDrawArc* newitem = new LibDrawArc(); LibDrawArc* newitem = new LibDrawArc();
...@@ -640,7 +640,7 @@ LibDrawArc* LibDrawArc::GenCopy( void ) ...@@ -640,7 +640,7 @@ LibDrawArc* LibDrawArc::GenCopy( void )
/**********************************************************************/ /**********************************************************************/
LibDrawCircle::LibDrawCircle( void ) : LibEDA_BaseStruct( COMPONENT_CIRCLE_DRAW_TYPE ) LibDrawCircle::LibDrawCircle() : LibEDA_BaseStruct( COMPONENT_CIRCLE_DRAW_TYPE )
/**********************************************************************/ /**********************************************************************/
{ {
m_Rayon = 0; m_Rayon = 0;
...@@ -649,7 +649,7 @@ LibDrawCircle::LibDrawCircle( void ) : LibEDA_BaseStruct( COMPONENT_CIRCLE_DRAW_ ...@@ -649,7 +649,7 @@ LibDrawCircle::LibDrawCircle( void ) : LibEDA_BaseStruct( COMPONENT_CIRCLE_DRAW_
/*******************************************/ /*******************************************/
LibDrawCircle* LibDrawCircle::GenCopy( void ) LibDrawCircle* LibDrawCircle::GenCopy()
/*******************************************/ /*******************************************/
{ {
LibDrawCircle* newitem = new LibDrawCircle(); LibDrawCircle* newitem = new LibDrawCircle();
...@@ -666,7 +666,7 @@ LibDrawCircle* LibDrawCircle::GenCopy( void ) ...@@ -666,7 +666,7 @@ LibDrawCircle* LibDrawCircle::GenCopy( void )
/*****************************************************************/ /*****************************************************************/
LibDrawText::LibDrawText( void ) : LibEDA_BaseStruct( COMPONENT_GRAPHIC_TEXT_DRAW_TYPE ) LibDrawText::LibDrawText() : LibEDA_BaseStruct( COMPONENT_GRAPHIC_TEXT_DRAW_TYPE )
/*****************************************************************/ /*****************************************************************/
{ {
m_Horiz = TEXT_ORIENT_HORIZ; m_Horiz = TEXT_ORIENT_HORIZ;
...@@ -677,7 +677,7 @@ LibDrawText::LibDrawText( void ) : LibEDA_BaseStruct( COMPONENT_GRAPHIC_TEXT_DRA ...@@ -677,7 +677,7 @@ LibDrawText::LibDrawText( void ) : LibEDA_BaseStruct( COMPONENT_GRAPHIC_TEXT_DRA
/***************************************/ /***************************************/
LibDrawText* LibDrawText::GenCopy( void ) LibDrawText* LibDrawText::GenCopy()
/***************************************/ /***************************************/
{ {
LibDrawText* newitem = new LibDrawText(); LibDrawText* newitem = new LibDrawText();
...@@ -695,14 +695,14 @@ LibDrawText* LibDrawText::GenCopy( void ) ...@@ -695,14 +695,14 @@ LibDrawText* LibDrawText::GenCopy( void )
} }
LibDrawSquare::LibDrawSquare( void ) : LibEDA_BaseStruct( COMPONENT_RECT_DRAW_TYPE ) LibDrawSquare::LibDrawSquare() : LibEDA_BaseStruct( COMPONENT_RECT_DRAW_TYPE )
{ {
m_Width = 0; m_Width = 0;
m_Fill = NO_FILL; m_Fill = NO_FILL;
} }
LibDrawSquare* LibDrawSquare::GenCopy( void ) LibDrawSquare* LibDrawSquare::GenCopy()
{ {
LibDrawSquare* newitem = new LibDrawSquare(); LibDrawSquare* newitem = new LibDrawSquare();
...@@ -717,13 +717,13 @@ LibDrawSquare* LibDrawSquare::GenCopy( void ) ...@@ -717,13 +717,13 @@ LibDrawSquare* LibDrawSquare::GenCopy( void )
} }
LibDrawSegment::LibDrawSegment( void ) : LibEDA_BaseStruct( COMPONENT_LINE_DRAW_TYPE ) LibDrawSegment::LibDrawSegment() : LibEDA_BaseStruct( COMPONENT_LINE_DRAW_TYPE )
{ {
m_Width = 0; m_Width = 0;
} }
LibDrawSegment* LibDrawSegment::GenCopy( void ) LibDrawSegment* LibDrawSegment::GenCopy()
{ {
LibDrawSegment* newitem = new LibDrawSegment(); LibDrawSegment* newitem = new LibDrawSegment();
...@@ -737,7 +737,7 @@ LibDrawSegment* LibDrawSegment::GenCopy( void ) ...@@ -737,7 +737,7 @@ LibDrawSegment* LibDrawSegment::GenCopy( void )
} }
LibDrawPolyline::LibDrawPolyline( void ) : LibEDA_BaseStruct( COMPONENT_POLYLINE_DRAW_TYPE ) LibDrawPolyline::LibDrawPolyline() : LibEDA_BaseStruct( COMPONENT_POLYLINE_DRAW_TYPE )
{ {
n = 0; n = 0;
PolyList = NULL; PolyList = NULL;
...@@ -747,7 +747,7 @@ LibDrawPolyline::LibDrawPolyline( void ) : LibEDA_BaseStruct( COMPONENT_POLYLINE ...@@ -747,7 +747,7 @@ LibDrawPolyline::LibDrawPolyline( void ) : LibEDA_BaseStruct( COMPONENT_POLYLINE
/************************************************/ /************************************************/
LibDrawPolyline* LibDrawPolyline::GenCopy( void ) LibDrawPolyline* LibDrawPolyline::GenCopy()
/************************************************/ /************************************************/
{ {
LibDrawPolyline* newitem = new LibDrawPolyline(); LibDrawPolyline* newitem = new LibDrawPolyline();
......
...@@ -177,12 +177,12 @@ public: ...@@ -177,12 +177,12 @@ public:
int m_Width; /* Width of draw lines */ int m_Width; /* Width of draw lines */
public: public:
LibEDA_BaseStruct* Next( void ) LibEDA_BaseStruct* Next()
{ {
return (LibEDA_BaseStruct*) Pnext; return (LibEDA_BaseStruct*) Pnext;
} }
LibEDA_BaseStruct( KICAD_T struct_type ); LibEDA_BaseStruct( KICAD_T struct_type );
virtual ~LibEDA_BaseStruct( void ) { } virtual ~LibEDA_BaseStruct() { }
void Display_Infos_DrawEntry( WinEDA_DrawFrame* frame ); void Display_Infos_DrawEntry( WinEDA_DrawFrame* frame );
}; };
...@@ -203,12 +203,12 @@ public: ...@@ -203,12 +203,12 @@ public:
// short m_PinNumWidth, m_PinNameWidth; /* (Unused) Pin num and Pin name text width */ // short m_PinNumWidth, m_PinNameWidth; /* (Unused) Pin num and Pin name text width */
public: public:
LibDrawPin( void ); LibDrawPin();
~LibDrawPin( void ) { } ~LibDrawPin() { }
LibDrawPin* GenCopy( void ); LibDrawPin* GenCopy();
bool WriteDescr( FILE* File ); bool WriteDescr( FILE* File );
void Display_Infos( WinEDA_DrawFrame* frame ); void Display_Infos( WinEDA_DrawFrame* frame );
wxPoint ReturnPinEndPoint( void ); wxPoint ReturnPinEndPoint();
int ReturnPinDrawOrient( int TransMat[2][2] ); int ReturnPinDrawOrient( int TransMat[2][2] );
void ReturnPinStringNum( wxString& buffer ); void ReturnPinStringNum( wxString& buffer );
void SetPinNumFromString( wxString& buffer ); void SetPinNumFromString( wxString& buffer );
...@@ -234,9 +234,9 @@ public: ...@@ -234,9 +234,9 @@ public:
wxPoint m_ArcStart, m_ArcEnd; /* position des 2 extremites de l'arc en coord reelles*/ wxPoint m_ArcStart, m_ArcEnd; /* position des 2 extremites de l'arc en coord reelles*/
public: public:
LibDrawArc( void ); LibDrawArc();
~LibDrawArc( void ) { } ~LibDrawArc() { }
LibDrawArc* GenCopy( void ); LibDrawArc* GenCopy();
bool WriteDescr( FILE* File ); bool WriteDescr( FILE* File );
}; };
...@@ -247,9 +247,9 @@ public: ...@@ -247,9 +247,9 @@ public:
int m_Fill; int m_Fill;
public: public:
LibDrawCircle( void ); LibDrawCircle();
~LibDrawCircle( void ) { } ~LibDrawCircle() { }
LibDrawCircle* GenCopy( void ); LibDrawCircle* GenCopy();
bool WriteDescr( FILE* File ); bool WriteDescr( FILE* File );
}; };
...@@ -262,9 +262,9 @@ public: ...@@ -262,9 +262,9 @@ public:
wxString m_Text; wxString m_Text;
public: public:
LibDrawText( void ); LibDrawText();
~LibDrawText( void ) { } ~LibDrawText() { }
LibDrawText* GenCopy( void ); LibDrawText* GenCopy();
bool WriteDescr( FILE* File ); bool WriteDescr( FILE* File );
}; };
...@@ -275,9 +275,9 @@ public: ...@@ -275,9 +275,9 @@ public:
int m_Fill; int m_Fill;
public: public:
LibDrawSquare( void ); LibDrawSquare();
~LibDrawSquare( void ) { } ~LibDrawSquare() { }
LibDrawSquare* GenCopy( void ); LibDrawSquare* GenCopy();
bool WriteDescr( FILE* File ); bool WriteDescr( FILE* File );
}; };
...@@ -287,9 +287,9 @@ public: ...@@ -287,9 +287,9 @@ public:
wxPoint m_End; wxPoint m_End;
public: public:
LibDrawSegment( void ); LibDrawSegment();
~LibDrawSegment( void ) { } ~LibDrawSegment() { }
LibDrawSegment* GenCopy( void ); LibDrawSegment* GenCopy();
bool WriteDescr( FILE* File ); bool WriteDescr( FILE* File );
}; };
...@@ -300,12 +300,12 @@ public: ...@@ -300,12 +300,12 @@ public:
int m_Fill; int m_Fill;
public: public:
LibDrawPolyline( void ); LibDrawPolyline();
~LibDrawPolyline( void ) { ~LibDrawPolyline() {
if( PolyList ) if( PolyList )
free( PolyList ); free( PolyList );
} }
LibDrawPolyline* GenCopy( void ); LibDrawPolyline* GenCopy();
void AddPoint( const wxPoint& point ); void AddPoint( const wxPoint& point );
bool WriteDescr( FILE* File ); bool WriteDescr( FILE* File );
}; };
...@@ -327,9 +327,9 @@ public: ...@@ -327,9 +327,9 @@ public:
public: public:
LibDrawField( int idfield = 2 ); LibDrawField( int idfield = 2 );
~LibDrawField( void ); ~LibDrawField();
LibDrawField* GenCopy( void ); LibDrawField* GenCopy();
void Copy( LibDrawField* Target ); void Copy( LibDrawField* Target );
bool WriteDescr( FILE* File ); bool WriteDescr( FILE* File );
}; };
...@@ -349,7 +349,7 @@ public: ...@@ -349,7 +349,7 @@ public:
public: public:
LibCmpEntry( LibrEntryType CmpType, const wxChar * CmpName ); LibCmpEntry( LibrEntryType CmpType, const wxChar * CmpName );
virtual ~LibCmpEntry( void ); virtual ~LibCmpEntry();
bool WriteDescr( FILE* File ); bool WriteDescr( FILE* File );
}; };
...@@ -375,8 +375,8 @@ public: ...@@ -375,8 +375,8 @@ public:
EDA_LibComponentStruct( const wxChar * CmpName ); EDA_LibComponentStruct( const wxChar * CmpName );
EDA_Rect GetBoundaryBox( int Unit, int Convert );/* return Box around the part. */ EDA_Rect GetBoundaryBox( int Unit, int Convert );/* return Box around the part. */
~EDA_LibComponentStruct( void ); ~EDA_LibComponentStruct();
void SortDrawItems( void ); void SortDrawItems();
}; };
class EDA_LibCmpAliasStruct : public LibCmpEntry class EDA_LibCmpAliasStruct : public LibCmpEntry
...@@ -386,7 +386,7 @@ public: ...@@ -386,7 +386,7 @@ public:
public: public:
EDA_LibCmpAliasStruct( const wxChar * CmpName, const wxChar * CmpRootName ); EDA_LibCmpAliasStruct( const wxChar * CmpName, const wxChar * CmpRootName );
~EDA_LibCmpAliasStruct( void ); ~EDA_LibCmpAliasStruct();
}; };
/* Variables */ /* Variables */
......
...@@ -32,7 +32,7 @@ LibEDA_BaseStruct* DrawEntry = CurrentDrawItem; ...@@ -32,7 +32,7 @@ LibEDA_BaseStruct* DrawEntry = CurrentDrawItem;
if ( DrawEntry && DrawEntry->m_Flags ) if ( DrawEntry && DrawEntry->m_Flags )
{ {
SaveCopyInUndoList(CurrentLibEntry); SaveCopyInUndoList(CurrentLibEntry);
switch (DrawEntry->m_StructType ) switch (DrawEntry->Type() )
{ {
case COMPONENT_PIN_DRAW_TYPE: case COMPONENT_PIN_DRAW_TYPE:
PlacePin(DC); PlacePin(DC);
...@@ -146,7 +146,7 @@ LibEDA_BaseStruct* DrawEntry = CurrentDrawItem; ...@@ -146,7 +146,7 @@ LibEDA_BaseStruct* DrawEntry = CurrentDrawItem;
break; break;
} }
SaveCopyInUndoList(CurrentLibEntry); SaveCopyInUndoList(CurrentLibEntry);
if ( DrawEntry->m_StructType == COMPONENT_PIN_DRAW_TYPE ) if ( DrawEntry->Type() == COMPONENT_PIN_DRAW_TYPE )
DeletePin(DC, CurrentLibEntry, (LibDrawPin*)DrawEntry); DeletePin(DC, CurrentLibEntry, (LibDrawPin*)DrawEntry);
else else
DeleteOneLibraryDrawStruct(DrawPanel, DC, CurrentLibEntry,DrawEntry, TRUE); DeleteOneLibraryDrawStruct(DrawPanel, DC, CurrentLibEntry,DrawEntry, TRUE);
...@@ -233,7 +233,7 @@ LibEDA_BaseStruct* DrawEntry = CurrentDrawItem; ...@@ -233,7 +233,7 @@ LibEDA_BaseStruct* DrawEntry = CurrentDrawItem;
CurrentDrawItem = DrawEntry; CurrentDrawItem = DrawEntry;
DrawPanel->m_IgnoreMouseEvents = TRUE; DrawPanel->m_IgnoreMouseEvents = TRUE;
switch ( DrawEntry->m_StructType ) switch ( DrawEntry->Type() )
{ {
case COMPONENT_PIN_DRAW_TYPE: case COMPONENT_PIN_DRAW_TYPE:
if( DrawEntry->m_Flags == 0 ) // Item localis et non en edition: placement commande move if( DrawEntry->m_Flags == 0 ) // Item localis et non en edition: placement commande move
...@@ -282,7 +282,7 @@ LibEDA_BaseStruct* DrawEntry = CurrentDrawItem; ...@@ -282,7 +282,7 @@ LibEDA_BaseStruct* DrawEntry = CurrentDrawItem;
wxString msg; wxString msg;
msg.Printf( msg.Printf(
wxT("WinEDA_LibeditFrame::OnLeftDClick Error: unknown StructType %d"), wxT("WinEDA_LibeditFrame::OnLeftDClick Error: unknown StructType %d"),
DrawEntry->m_StructType); DrawEntry->Type());
DisplayError(this, msg ); DisplayError(this, msg );
break; break;
} }
......
...@@ -90,7 +90,7 @@ bool BlockActive = (m_CurrentScreen->BlockLocate.m_Command != BLOCK_IDLE); ...@@ -90,7 +90,7 @@ bool BlockActive = (m_CurrentScreen->BlockLocate.m_Command != BLOCK_IDLE);
CurrentDrawItem = DrawEntry; CurrentDrawItem = DrawEntry;
switch ( DrawEntry->m_StructType ) switch ( DrawEntry->Type() )
{ {
case COMPONENT_PIN_DRAW_TYPE: case COMPONENT_PIN_DRAW_TYPE:
AddMenusForPin(PopMenu, (LibDrawPin*)DrawEntry, this); AddMenusForPin(PopMenu, (LibDrawPin*)DrawEntry, this);
...@@ -202,7 +202,7 @@ bool BlockActive = (m_CurrentScreen->BlockLocate.m_Command != BLOCK_IDLE); ...@@ -202,7 +202,7 @@ bool BlockActive = (m_CurrentScreen->BlockLocate.m_Command != BLOCK_IDLE);
wxString msg; wxString msg;
msg.Printf( msg.Printf(
wxT("WinEDA_LibeditFrame::OnRightClick Error: unknown StructType %d"), wxT("WinEDA_LibeditFrame::OnRightClick Error: unknown StructType %d"),
DrawEntry->m_StructType); DrawEntry->Type());
DisplayError(this, msg ); DisplayError(this, msg );
CurrentDrawItem = NULL; CurrentDrawItem = NULL;
break; break;
......
...@@ -1049,7 +1049,7 @@ LibEDA_BaseStruct* DrawItem = NULL, * NextDrawItem; ...@@ -1049,7 +1049,7 @@ LibEDA_BaseStruct* DrawItem = NULL, * NextDrawItem;
for ( ; DrawItem != NULL; DrawItem = DrawItem->Next() ) for ( ; DrawItem != NULL; DrawItem = DrawItem->Next() )
{ {
/* Duplication des items pour autres elements */ /* Duplication des items pour autres elements */
if( DrawItem->m_StructType != COMPONENT_PIN_DRAW_TYPE ) continue; if( DrawItem->Type() != COMPONENT_PIN_DRAW_TYPE ) continue;
if( DrawItem->m_Convert == 1 ) if( DrawItem->m_Convert == 1 )
{ {
if( FlagDel == 0 ) if( FlagDel == 0 )
......
...@@ -531,7 +531,7 @@ wxClientDC dc(DrawPanel); ...@@ -531,7 +531,7 @@ wxClientDC dc(DrawPanel);
if ( CurrentDrawItem ) if ( CurrentDrawItem )
{ {
DrawPanel->CursorOff(&dc); DrawPanel->CursorOff(&dc);
switch ( CurrentDrawItem->m_StructType ) switch ( CurrentDrawItem->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
case COMPONENT_CIRCLE_DRAW_TYPE: case COMPONENT_CIRCLE_DRAW_TYPE:
...@@ -568,7 +568,7 @@ wxClientDC dc(DrawPanel); ...@@ -568,7 +568,7 @@ wxClientDC dc(DrawPanel);
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
DrawPanel->CursorOff(&dc); DrawPanel->CursorOff(&dc);
SaveCopyInUndoList(CurrentLibEntry); SaveCopyInUndoList(CurrentLibEntry);
if ( CurrentDrawItem->m_StructType == COMPONENT_PIN_DRAW_TYPE ) if ( CurrentDrawItem->Type() == COMPONENT_PIN_DRAW_TYPE )
{ {
DeletePin(&dc, CurrentLibEntry, (LibDrawPin*)CurrentDrawItem); DeletePin(&dc, CurrentLibEntry, (LibDrawPin*)CurrentDrawItem);
} }
...@@ -588,9 +588,9 @@ wxClientDC dc(DrawPanel); ...@@ -588,9 +588,9 @@ wxClientDC dc(DrawPanel);
case ID_POPUP_LIBEDIT_MOVE_ITEM_REQUEST: case ID_POPUP_LIBEDIT_MOVE_ITEM_REQUEST:
if ( CurrentDrawItem == NULL) break; if ( CurrentDrawItem == NULL) break;
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
if ( CurrentDrawItem->m_StructType == COMPONENT_PIN_DRAW_TYPE ) if ( CurrentDrawItem->Type() == COMPONENT_PIN_DRAW_TYPE )
StartMovePin(&dc); StartMovePin(&dc);
else if ( CurrentDrawItem->m_StructType == COMPONENT_FIELD_DRAW_TYPE ) else if ( CurrentDrawItem->Type() == COMPONENT_FIELD_DRAW_TYPE )
StartMoveField(&dc, (LibDrawField *) CurrentDrawItem); StartMoveField(&dc, (LibDrawField *) CurrentDrawItem);
else StartMoveDrawSymbol(&dc); else StartMoveDrawSymbol(&dc);
break; break;
...@@ -609,7 +609,7 @@ wxClientDC dc(DrawPanel); ...@@ -609,7 +609,7 @@ wxClientDC dc(DrawPanel);
if ( CurrentDrawItem == NULL) break; if ( CurrentDrawItem == NULL) break;
DrawPanel->CursorOff(&dc); DrawPanel->CursorOff(&dc);
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
if ( CurrentDrawItem->m_StructType == COMPONENT_FIELD_DRAW_TYPE ) if ( CurrentDrawItem->Type() == COMPONENT_FIELD_DRAW_TYPE )
{ {
SaveCopyInUndoList(CurrentLibEntry); SaveCopyInUndoList(CurrentLibEntry);
RotateField(&dc, (LibDrawField *) CurrentDrawItem); RotateField(&dc, (LibDrawField *) CurrentDrawItem);
...@@ -620,7 +620,7 @@ wxClientDC dc(DrawPanel); ...@@ -620,7 +620,7 @@ wxClientDC dc(DrawPanel);
case ID_POPUP_LIBEDIT_FIELD_EDIT_ITEM: case ID_POPUP_LIBEDIT_FIELD_EDIT_ITEM:
if ( CurrentDrawItem == NULL) break; if ( CurrentDrawItem == NULL) break;
DrawPanel->CursorOff(&dc); DrawPanel->CursorOff(&dc);
if ( CurrentDrawItem->m_StructType == COMPONENT_FIELD_DRAW_TYPE ) if ( CurrentDrawItem->Type() == COMPONENT_FIELD_DRAW_TYPE )
{ {
EditField(&dc, (LibDrawField *) CurrentDrawItem); EditField(&dc, (LibDrawField *) CurrentDrawItem);
} }
...@@ -631,7 +631,7 @@ wxClientDC dc(DrawPanel); ...@@ -631,7 +631,7 @@ wxClientDC dc(DrawPanel);
case ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNAMESIZE_ITEM: case ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNAMESIZE_ITEM:
case ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNUMSIZE_ITEM: case ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNUMSIZE_ITEM:
if ( (CurrentDrawItem == NULL) || if ( (CurrentDrawItem == NULL) ||
(CurrentDrawItem->m_StructType != COMPONENT_PIN_DRAW_TYPE) ) (CurrentDrawItem->Type() != COMPONENT_PIN_DRAW_TYPE) )
break; break;
SaveCopyInUndoList(CurrentLibEntry); SaveCopyInUndoList(CurrentLibEntry);
GlobalSetPins(&dc, (LibDrawPin *) CurrentDrawItem, id); GlobalSetPins(&dc, (LibDrawPin *) CurrentDrawItem, id);
......
...@@ -202,7 +202,7 @@ int dx, dy; ...@@ -202,7 +202,7 @@ int dx, dy;
if(DontSnap) if (DontSnap->m_PickedStruct == DrawList) continue; if(DontSnap) if (DontSnap->m_PickedStruct == DrawList) continue;
switch (DrawList->m_StructType) switch (DrawList->Type())
{ {
case DRAW_POLYLINE_STRUCT_TYPE: case DRAW_POLYLINE_STRUCT_TYPE:
#undef STRUCT #undef STRUCT
...@@ -440,7 +440,7 @@ int dx, dy; ...@@ -440,7 +440,7 @@ int dx, dy;
default: default:
{ {
wxString msg; wxString msg;
msg.Printf(wxT("SnapPoint2() error: unexpected strct type %d ("), DrawList->m_StructType); msg.Printf(wxT("SnapPoint2() error: unexpected strct type %d ("), DrawList->Type());
msg << DrawList->ReturnClassName() << wxT(")"); msg << DrawList->ReturnClassName() << wxT(")");
DisplayError(NULL, msg); DisplayError(NULL, msg);
break; break;
...@@ -463,7 +463,7 @@ int i, *Points, xt1, yt1, xt2, yt2, NumOfPoints2; ...@@ -463,7 +463,7 @@ int i, *Points, xt1, yt1, xt2, yt2, NumOfPoints2;
int dx, dy; int dx, dy;
wxString msg; wxString msg;
switch (DrawStruct->m_StructType) switch (DrawStruct->Type())
{ {
case DRAW_POLYLINE_STRUCT_TYPE: case DRAW_POLYLINE_STRUCT_TYPE:
#undef STRUCT #undef STRUCT
...@@ -612,7 +612,7 @@ wxString msg; ...@@ -612,7 +612,7 @@ wxString msg;
default: default:
msg.Printf( msg.Printf(
wxT("DrawStructInBox() Err: unexpected StructType %d ("), wxT("DrawStructInBox() Err: unexpected StructType %d ("),
DrawStruct->m_StructType ); DrawStruct->Type() );
msg << DrawStruct->ReturnClassName() << wxT(")"); msg << DrawStruct->ReturnClassName() << wxT(")");
DisplayError(NULL, msg ); DisplayError(NULL, msg );
break; break;
...@@ -750,7 +750,7 @@ int seuil; ...@@ -750,7 +750,7 @@ int seuil;
if(Convert && DrawItem->m_Convert && (Convert != DrawItem->m_Convert) ) if(Convert && DrawItem->m_Convert && (Convert != DrawItem->m_Convert) )
continue; continue;
switch ( DrawItem->m_StructType ) switch ( DrawItem->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
{ {
...@@ -988,7 +988,7 @@ int x1, y1, x2, y2; ...@@ -988,7 +988,7 @@ int x1, y1, x2, y2;
DrawItem = Entry->m_Drawings; DrawItem = Entry->m_Drawings;
for ( ; DrawItem != NULL; DrawItem = DrawItem->Next()) for ( ; DrawItem != NULL; DrawItem = DrawItem->Next())
{ {
if(DrawItem->m_StructType == COMPONENT_PIN_DRAW_TYPE) /* Pin Trouvee */ if(DrawItem->Type() == COMPONENT_PIN_DRAW_TYPE) /* Pin Trouvee */
{ {
Pin = (LibDrawPin *) DrawItem; Pin = (LibDrawPin *) DrawItem;
...@@ -1039,7 +1039,7 @@ int size , dy, minx, maxx; ...@@ -1039,7 +1039,7 @@ int size , dy, minx, maxx;
DrawSheetLabelStruct * SheetLabel; DrawSheetLabelStruct * SheetLabel;
SheetLabel = Sheet->m_Label; SheetLabel = Sheet->m_Label;
while((SheetLabel) && (SheetLabel->m_StructType==DRAW_SHEETLABEL_STRUCT_TYPE)) while((SheetLabel) && (SheetLabel->Type()==DRAW_SHEETLABEL_STRUCT_TYPE))
{ {
size = ( SheetLabel->GetLength()+1 ) * SheetLabel->m_Size.x; size = ( SheetLabel->GetLength()+1 ) * SheetLabel->m_Size.x;
if (SheetLabel->m_Edge) size = -size ; if (SheetLabel->m_Edge) size = -size ;
...@@ -1067,7 +1067,7 @@ LibDrawPin * Pin = NULL; ...@@ -1067,7 +1067,7 @@ LibDrawPin * Pin = NULL;
for(DrawStruct = DrawList; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext ) for(DrawStruct = DrawList; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext )
{ {
if( DrawStruct->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if( DrawStruct->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
continue; continue;
LibItem = (EDA_SchComponentStruct *) DrawStruct; LibItem = (EDA_SchComponentStruct *) DrawStruct;
Entry = FindLibPart( LibItem->m_ChipName.GetData(), wxEmptyString, FIND_ROOT); Entry = FindLibPart( LibItem->m_ChipName.GetData(), wxEmptyString, FIND_ROOT);
...@@ -1090,7 +1090,7 @@ DrawSheetLabelStruct * PinSheet = NULL; ...@@ -1090,7 +1090,7 @@ DrawSheetLabelStruct * PinSheet = NULL;
for( DrawStruct = DrawList; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext ) for( DrawStruct = DrawList; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext )
{ {
if( DrawStruct->m_StructType != DRAW_SHEET_STRUCT_TYPE ) if( DrawStruct->Type() != DRAW_SHEET_STRUCT_TYPE )
continue; continue;
PinSheet = LocateSheetLabel( (DrawSheetStruct *) DrawStruct, PinSheet = LocateSheetLabel( (DrawSheetStruct *) DrawStruct,
RefPos); RefPos);
......
...@@ -123,7 +123,7 @@ LibEDA_BaseStruct *DEntry; ...@@ -123,7 +123,7 @@ LibEDA_BaseStruct *DEntry;
for ( ; DrawList != NULL; DrawList = DrawList->Next() ) for ( ; DrawList != NULL; DrawList = DrawList->Next() )
{ {
if ( DrawList->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) continue; if ( DrawList->Type() != DRAW_LIB_ITEM_STRUCT_TYPE ) continue;
Component = (EDA_SchComponentStruct *) DrawList; Component = (EDA_SchComponentStruct *) DrawList;
/* already tested ? : */ /* already tested ? : */
...@@ -145,7 +145,7 @@ LibEDA_BaseStruct *DEntry; ...@@ -145,7 +145,7 @@ LibEDA_BaseStruct *DEntry;
DEntry = Entry->m_Drawings; DEntry = Entry->m_Drawings;
for ( ;DEntry != NULL; DEntry = DEntry->Next()) for ( ;DEntry != NULL; DEntry = DEntry->Next())
{ {
if ( DEntry->m_StructType != COMPONENT_PIN_DRAW_TYPE) continue; if ( DEntry->Type() != COMPONENT_PIN_DRAW_TYPE) continue;
if( DEntry->m_Unit && if( DEntry->m_Unit &&
(DEntry->m_Unit != Component->m_Multi) ) continue; (DEntry->m_Unit != Component->m_Multi) ) continue;
if( DEntry->m_Convert && if( DEntry->m_Convert &&
...@@ -336,7 +336,7 @@ EDA_BaseStruct *DrawList; ...@@ -336,7 +336,7 @@ EDA_BaseStruct *DrawList;
DrawList = screen->EEDrawList; DrawList = screen->EEDrawList;
while ( DrawList ) while ( DrawList )
{ {
if( DrawList->m_StructType == DRAW_LIB_ITEM_STRUCT_TYPE) if( DrawList->Type() == DRAW_LIB_ITEM_STRUCT_TYPE)
{ {
EDA_SchComponentStruct * Component = (EDA_SchComponentStruct *) DrawList; EDA_SchComponentStruct * Component = (EDA_SchComponentStruct *) DrawList;
Component->m_FlagControlMulti = 0; Component->m_FlagControlMulti = 0;
...@@ -384,7 +384,7 @@ wxChar bufnum[BUFYPOS_LEN+1]; ...@@ -384,7 +384,7 @@ wxChar bufnum[BUFYPOS_LEN+1];
for ( DrawList = screen->EEDrawList; DrawList != NULL; DrawList = DrawList->Pnext ) for ( DrawList = screen->EEDrawList; DrawList != NULL; DrawList = DrawList->Pnext )
{ {
wxChar ident; wxChar ident;
if ( DrawList->m_StructType != DRAW_TEXT_STRUCT_TYPE ) continue; if ( DrawList->Type() != DRAW_TEXT_STRUCT_TYPE ) continue;
#define DRAWTEXT ((DrawTextStruct *) DrawList) #define DRAWTEXT ((DrawTextStruct *) DrawList)
text = DRAWTEXT->m_Text; if ( text.IsEmpty() ) continue; text = DRAWTEXT->m_Text; if ( text.IsEmpty() ) continue;
ident = text.GetChar(0); ident = text.GetChar(0);
...@@ -685,7 +685,7 @@ SCH_SCREEN * screen; ...@@ -685,7 +685,7 @@ SCH_SCREEN * screen;
DrawList = screen->EEDrawList; DrawList = screen->EEDrawList;
while ( DrawList ) while ( DrawList )
{ {
switch( DrawList->m_StructType ) switch( DrawList->Type() )
{ {
case DRAW_LIB_ITEM_STRUCT_TYPE : case DRAW_LIB_ITEM_STRUCT_TYPE :
Component2 = (EDA_SchComponentStruct *) DrawList; Component2 = (EDA_SchComponentStruct *) DrawList;
...@@ -705,7 +705,7 @@ SCH_SCREEN * screen; ...@@ -705,7 +705,7 @@ SCH_SCREEN * screen;
DEntry = Entry->m_Drawings; DEntry = Entry->m_Drawings;
for ( ;DEntry != NULL; DEntry = DEntry->Next()) for ( ;DEntry != NULL; DEntry = DEntry->Next())
{ {
if ( DEntry->m_StructType != COMPONENT_PIN_DRAW_TYPE) continue; if ( DEntry->Type() != COMPONENT_PIN_DRAW_TYPE) continue;
if( DEntry->m_Unit && if( DEntry->m_Unit &&
(DEntry->m_Unit != Component2->m_Multi) ) continue; (DEntry->m_Unit != Component2->m_Multi) ) continue;
if( DEntry->m_Convert && if( DEntry->m_Convert &&
......
...@@ -353,7 +353,7 @@ int NumInclude; ...@@ -353,7 +353,7 @@ int NumInclude;
while ( DrawList ) while ( DrawList )
{ {
switch( DrawList->m_StructType ) switch( DrawList->Type() )
{ {
case DRAW_SEGMENT_STRUCT_TYPE : case DRAW_SEGMENT_STRUCT_TYPE :
#undef STRUCT #undef STRUCT
...@@ -465,7 +465,7 @@ int NumInclude; ...@@ -465,7 +465,7 @@ int NumInclude;
for ( ;DEntry != NULL; DEntry = DEntry->Next()) for ( ;DEntry != NULL; DEntry = DEntry->Next())
{ {
LibDrawPin * Pin = (LibDrawPin *) DEntry; LibDrawPin * Pin = (LibDrawPin *) DEntry;
if( DEntry->m_StructType != COMPONENT_PIN_DRAW_TYPE) continue; if( DEntry->Type() != COMPONENT_PIN_DRAW_TYPE) continue;
if( DEntry->m_Unit && if( DEntry->m_Unit &&
(DEntry->m_Unit != DrawLibItem->m_Multi) ) continue; (DEntry->m_Unit != DrawLibItem->m_Multi) ) continue;
if( DEntry->m_Convert && if( DEntry->m_Convert &&
...@@ -555,7 +555,7 @@ int NumInclude; ...@@ -555,7 +555,7 @@ int NumInclude;
{ {
wxString msg; wxString msg;
msg.Printf( wxT("Netlist: unexpected type struct %d"), msg.Printf( wxT("Netlist: unexpected type struct %d"),
DrawList->m_StructType); DrawList->Type());
DisplayError(frame, msg); DisplayError(frame, msg);
break; break;
} }
......
...@@ -35,7 +35,7 @@ void WinEDA_SchematicFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -35,7 +35,7 @@ void WinEDA_SchematicFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
if( DrawStruct && DrawStruct->m_Flags ) // Commande "POPUP" en cours if( DrawStruct && DrawStruct->m_Flags ) // Commande "POPUP" en cours
{ {
switch( DrawStruct->m_StructType ) switch( DrawStruct->Type() )
{ {
case DRAW_LABEL_STRUCT_TYPE: case DRAW_LABEL_STRUCT_TYPE:
case DRAW_GLOBAL_LABEL_STRUCT_TYPE: case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
...@@ -86,7 +86,7 @@ void WinEDA_SchematicFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -86,7 +86,7 @@ void WinEDA_SchematicFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
if( DrawStruct && DrawStruct->m_Flags ) if( DrawStruct && DrawStruct->m_Flags )
break; break;
DrawStruct = SchematicGeneralLocateAndDisplay(); DrawStruct = SchematicGeneralLocateAndDisplay();
if( DrawStruct && (DrawStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE) ) if( DrawStruct && (DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE) )
{ {
InstallNextScreen( (DrawSheetStruct*) DrawStruct ); InstallNextScreen( (DrawSheetStruct*) DrawStruct );
} }
...@@ -229,7 +229,7 @@ void WinEDA_SchematicFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -229,7 +229,7 @@ void WinEDA_SchematicFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
if( DrawStruct == NULL ) if( DrawStruct == NULL )
break; break;
if( (DrawStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE) if( (DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE)
&& (DrawStruct->m_Flags == 0) ) && (DrawStruct->m_Flags == 0) )
{ {
if( m_ID_current_state == ID_IMPORT_GLABEL_BUTT ) if( m_ID_current_state == ID_IMPORT_GLABEL_BUTT )
...@@ -239,7 +239,7 @@ void WinEDA_SchematicFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -239,7 +239,7 @@ void WinEDA_SchematicFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
m_CurrentScreen->SetCurItem( m_CurrentScreen->SetCurItem(
Create_PinSheet( (DrawSheetStruct*) DrawStruct, DC ) ); Create_PinSheet( (DrawSheetStruct*) DrawStruct, DC ) );
} }
else if( (DrawStruct->m_StructType == DRAW_SHEETLABEL_STRUCT_TYPE) else if( (DrawStruct->Type() == DRAW_SHEETLABEL_STRUCT_TYPE)
&& (DrawStruct->m_Flags != 0) ) && (DrawStruct->m_Flags != 0) )
{ {
DrawStruct->Place( this, DC ); DrawStruct->Place( this, DC );
...@@ -316,7 +316,7 @@ void WinEDA_SchematicFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -316,7 +316,7 @@ void WinEDA_SchematicFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
break; break;
// Element localis // Element localis
switch( DrawStruct->m_StructType ) switch( DrawStruct->Type() )
{ {
case DRAW_SHEET_STRUCT_TYPE: case DRAW_SHEET_STRUCT_TYPE:
InstallNextScreen( (DrawSheetStruct*) DrawStruct ); InstallNextScreen( (DrawSheetStruct*) DrawStruct );
......
...@@ -96,7 +96,7 @@ void WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, ...@@ -96,7 +96,7 @@ void WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
if( (DrawStruct == NULL) || (DrawStruct->m_Flags == 0) ) if( (DrawStruct == NULL) || (DrawStruct->m_Flags == 0) )
{ {
DrawStruct = SchematicGeneralLocateAndDisplay( FALSE ); DrawStruct = SchematicGeneralLocateAndDisplay( FALSE );
if( DrawStruct && (DrawStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE) ) if( DrawStruct && (DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE) )
{ {
DrawSheetLabelStruct* slabel; DrawSheetLabelStruct* slabel;
slabel = LocateSheetLabel( (DrawSheetStruct*) DrawStruct, slabel = LocateSheetLabel( (DrawSheetStruct*) DrawStruct,
...@@ -148,7 +148,7 @@ void WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, ...@@ -148,7 +148,7 @@ void WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
int flags = DrawStruct->m_Flags; int flags = DrawStruct->m_Flags;
bool is_new = (flags & IS_NEW) ? TRUE : FALSE; bool is_new = (flags & IS_NEW) ? TRUE : FALSE;
switch( DrawStruct->m_StructType ) switch( DrawStruct->Type() )
{ {
case DRAW_NOCONNECT_STRUCT_TYPE: case DRAW_NOCONNECT_STRUCT_TYPE:
...@@ -243,7 +243,7 @@ void WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos, ...@@ -243,7 +243,7 @@ void WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
wxString msg; wxString msg;
msg.Printf( msg.Printf(
wxT( "WinEDA_SchematicFrame::OnRightClick Error: unknown DrawType %d" ), wxT( "WinEDA_SchematicFrame::OnRightClick Error: unknown DrawType %d" ),
DrawStruct->m_StructType ); DrawStruct->Type() );
DisplayError( this, msg ); DisplayError( this, msg );
break; break;
} }
......
...@@ -36,7 +36,7 @@ void InstallPineditFrame(WinEDA_LibeditFrame * parent, wxDC * DC, const wxPoint ...@@ -36,7 +36,7 @@ void InstallPineditFrame(WinEDA_LibeditFrame * parent, wxDC * DC, const wxPoint
{ {
wxPoint MousePos = parent->GetScreen()->m_Curseur; wxPoint MousePos = parent->GetScreen()->m_Curseur;
int accept = TRUE; int accept = TRUE;
if ( (CurrentDrawItem == NULL) || (CurrentDrawItem->m_StructType == COMPONENT_PIN_DRAW_TYPE) ) if ( (CurrentDrawItem == NULL) || (CurrentDrawItem->Type() == COMPONENT_PIN_DRAW_TYPE) )
{ {
LibDrawPin * Pin = (LibDrawPin *) CurrentDrawItem; LibDrawPin * Pin = (LibDrawPin *) CurrentDrawItem;
WinEDA_PinPropertiesFrame * frame = new WinEDA_PinPropertiesFrame(parent); WinEDA_PinPropertiesFrame * frame = new WinEDA_PinPropertiesFrame(parent);
......
...@@ -122,7 +122,7 @@ LibDrawPin * CurrentPin = (LibDrawPin *) CurrentDrawItem; ...@@ -122,7 +122,7 @@ LibDrawPin * CurrentPin = (LibDrawPin *) CurrentDrawItem;
Pin = (LibDrawPin *) CurrentLibEntry->m_Drawings; Pin = (LibDrawPin *) CurrentLibEntry->m_Drawings;
for ( ; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext ) for ( ; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext )
{ {
if (Pin->m_StructType != COMPONENT_PIN_DRAW_TYPE ) continue; if (Pin->Type() != COMPONENT_PIN_DRAW_TYPE ) continue;
if ( Pin == CurrentPin ) continue; if ( Pin == CurrentPin ) continue;
if( (Pin->m_Pos == CurrentPin->m_Pos) && if( (Pin->m_Pos == CurrentPin->m_Pos) &&
(Pin->m_Orient == CurrentPin->m_Orient) && (Pin->m_Orient == CurrentPin->m_Orient) &&
...@@ -179,7 +179,7 @@ bool status; ...@@ -179,7 +179,7 @@ bool status;
// Tst for an other pin in same new position: // Tst for an other pin in same new position:
for ( ; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext) for ( ; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext)
{ {
if ( Pin->m_StructType != COMPONENT_PIN_DRAW_TYPE ) continue; if ( Pin->Type() != COMPONENT_PIN_DRAW_TYPE ) continue;
if ( Pin == CurrentPin ) continue; if ( Pin == CurrentPin ) continue;
if( newpos != Pin->m_Pos ) continue; if( newpos != Pin->m_Pos ) continue;
if ( Pin->m_Flags ) continue; if ( Pin->m_Flags ) continue;
...@@ -213,7 +213,7 @@ bool status; ...@@ -213,7 +213,7 @@ bool status;
Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings; Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings;
for ( ; Pin != NULL; Pin = (LibDrawPin *)Pin->Pnext) for ( ; Pin != NULL; Pin = (LibDrawPin *)Pin->Pnext)
{ {
if(Pin->m_StructType != COMPONENT_PIN_DRAW_TYPE ) continue; if(Pin->Type() != COMPONENT_PIN_DRAW_TYPE ) continue;
if( Pin->m_Flags == 0 ) continue; if( Pin->m_Flags == 0 ) continue;
Pin->m_Pos = CurrentPin->m_Pos; Pin->m_Pos = CurrentPin->m_Pos;
Pin->m_Flags = 0; Pin->m_Flags = 0;
...@@ -270,7 +270,7 @@ wxPoint startPos; ...@@ -270,7 +270,7 @@ wxPoint startPos;
for ( ; Pin != NULL; Pin = (LibDrawPin *)Pin->Pnext ) for ( ; Pin != NULL; Pin = (LibDrawPin *)Pin->Pnext )
{ {
Pin->m_Flags = 0; Pin->m_Flags = 0;
if (Pin->m_StructType != COMPONENT_PIN_DRAW_TYPE ) continue; if (Pin->Type() != COMPONENT_PIN_DRAW_TYPE ) continue;
if ( Pin == CurrentPin) continue; if ( Pin == CurrentPin) continue;
if ( (Pin->m_Pos == CurrentPin->m_Pos) && (Pin->m_Orient == CurrentPin->m_Orient) && if ( (Pin->m_Pos == CurrentPin->m_Pos) && (Pin->m_Orient == CurrentPin->m_Orient) &&
(g_EditPinByPinIsOn == FALSE ) ) (g_EditPinByPinIsOn == FALSE ) )
...@@ -345,7 +345,7 @@ LibDrawPin * CurrentPin = (LibDrawPin *) CurrentDrawItem; ...@@ -345,7 +345,7 @@ LibDrawPin * CurrentPin = (LibDrawPin *) CurrentDrawItem;
Pin = (LibDrawPin *) CurrentLibEntry->m_Drawings; Pin = (LibDrawPin *) CurrentLibEntry->m_Drawings;
for ( ; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext) for ( ; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext)
{ {
if(Pin->m_StructType != COMPONENT_PIN_DRAW_TYPE ) continue; if(Pin->Type() != COMPONENT_PIN_DRAW_TYPE ) continue;
if( Pin->m_Flags == 0 ) continue; if( Pin->m_Flags == 0 ) continue;
if( Pin->m_Convert != CurrentPin->m_Convert ) continue; if( Pin->m_Convert != CurrentPin->m_Convert ) continue;
Pin->m_PinShape = newshape; Pin->m_PinShape = newshape;
...@@ -373,7 +373,7 @@ LibDrawPin * CurrentPin = (LibDrawPin*)CurrentDrawItem; ...@@ -373,7 +373,7 @@ LibDrawPin * CurrentPin = (LibDrawPin*)CurrentDrawItem;
Pin = (LibDrawPin*)CurrentLibEntry->m_Drawings; Pin = (LibDrawPin*)CurrentLibEntry->m_Drawings;
for ( ; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext) for ( ; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext)
{ {
if(Pin->m_StructType != COMPONENT_PIN_DRAW_TYPE ) continue; if(Pin->Type() != COMPONENT_PIN_DRAW_TYPE ) continue;
if( Pin->m_Flags == 0 ) continue; if( Pin->m_Flags == 0 ) continue;
Pin->m_PinType = newtype; Pin->m_PinType = newtype;
} }
...@@ -404,7 +404,7 @@ wxString buf; ...@@ -404,7 +404,7 @@ wxString buf;
Pin = (LibDrawPin *) CurrentLibEntry->m_Drawings; Pin = (LibDrawPin *) CurrentLibEntry->m_Drawings;
for ( ; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext) for ( ; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext)
{ {
if (Pin->m_StructType != COMPONENT_PIN_DRAW_TYPE ) continue; if (Pin->Type() != COMPONENT_PIN_DRAW_TYPE ) continue;
if( (Pin->m_Flags & IS_LINKED) == 0 ) continue; if( (Pin->m_Flags & IS_LINKED) == 0 ) continue;
if (newsize >= 0 ) Pin->m_PinNameSize = newsize; if (newsize >= 0 ) Pin->m_PinNameSize = newsize;
Pin->m_PinName = buf; Pin->m_PinName = buf;
...@@ -439,7 +439,7 @@ wxString buf; ...@@ -439,7 +439,7 @@ wxString buf;
Pin = (LibDrawPin *) CurrentLibEntry->m_Drawings; Pin = (LibDrawPin *) CurrentLibEntry->m_Drawings;
for ( ; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext) for ( ; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext)
{ {
if (Pin->m_StructType != COMPONENT_PIN_DRAW_TYPE ) continue; if (Pin->Type() != COMPONENT_PIN_DRAW_TYPE ) continue;
if( (Pin->m_Flags & IS_LINKED) == 0 ) continue; if( (Pin->m_Flags & IS_LINKED) == 0 ) continue;
if( Pin->m_Unit != CurrentPin->m_Unit ) continue; if( Pin->m_Unit != CurrentPin->m_Unit ) continue;
if ( newsize >= 0) Pin->m_PinNumSize = newsize; if ( newsize >= 0) Pin->m_PinNumSize = newsize;
...@@ -474,7 +474,7 @@ wxPoint PinPos; ...@@ -474,7 +474,7 @@ wxPoint PinPos;
DrawItem = LibEntry->m_Drawings; DrawItem = LibEntry->m_Drawings;
for ( ; DrawItem != NULL; ) for ( ; DrawItem != NULL; )
{ {
if (DrawItem->m_StructType != COMPONENT_PIN_DRAW_TYPE ) if (DrawItem->Type() != COMPONENT_PIN_DRAW_TYPE )
{ {
DrawItem = DrawItem->Next(); continue; DrawItem = DrawItem->Next(); continue;
} }
...@@ -591,7 +591,7 @@ LibDrawPin * Pin, * CurrentPin = (LibDrawPin * ) CurrentDrawItem; ...@@ -591,7 +591,7 @@ LibDrawPin * Pin, * CurrentPin = (LibDrawPin * ) CurrentDrawItem;
{ {
Pin = (LibDrawPin *)DrawItem; Pin = (LibDrawPin *)DrawItem;
DrawItem = DrawItem->Next(); DrawItem = DrawItem->Next();
if( Pin->m_StructType != COMPONENT_PIN_DRAW_TYPE) continue; if( Pin->Type() != COMPONENT_PIN_DRAW_TYPE) continue;
if( Pin->m_Flags == 0 ) continue; if( Pin->m_Flags == 0 ) continue;
if( Pin == CurrentPin) continue; if( Pin == CurrentPin) continue;
if(CurrentPin->m_Convert && (CurrentPin->m_Convert != Pin->m_Convert)) if(CurrentPin->m_Convert && (CurrentPin->m_Convert != Pin->m_Convert))
...@@ -615,7 +615,7 @@ LibDrawPin * Pin, * CurrentPin = (LibDrawPin * ) CurrentDrawItem; ...@@ -615,7 +615,7 @@ LibDrawPin * Pin, * CurrentPin = (LibDrawPin * ) CurrentDrawItem;
for ( ; DrawItem != NULL; ) for ( ; DrawItem != NULL; )
{ {
Pin = (LibDrawPin *)DrawItem; DrawItem = DrawItem->Next(); Pin = (LibDrawPin *)DrawItem; DrawItem = DrawItem->Next();
if(Pin->m_StructType != COMPONENT_PIN_DRAW_TYPE) continue; if(Pin->Type() != COMPONENT_PIN_DRAW_TYPE) continue;
if( Pin->m_Flags == 0 ) continue; if( Pin->m_Flags == 0 ) continue;
if( Pin == CurrentPin) continue; if( Pin == CurrentPin) continue;
if( CurrentPin->m_Unit && (CurrentPin->m_Unit != Pin->m_Unit) ) if( CurrentPin->m_Unit && (CurrentPin->m_Unit != Pin->m_Unit) )
...@@ -672,7 +672,7 @@ LibDrawPin * RefPin, * Pin = (LibDrawPin *) CurrentDrawItem; ...@@ -672,7 +672,7 @@ LibDrawPin * RefPin, * Pin = (LibDrawPin *) CurrentDrawItem;
Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings; Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings;
for ( ; Pin != NULL; Pin = (LibDrawPin *)Pin->Pnext ) for ( ; Pin != NULL; Pin = (LibDrawPin *)Pin->Pnext )
{ {
if (Pin->m_StructType != COMPONENT_PIN_DRAW_TYPE ) continue; if (Pin->Type() != COMPONENT_PIN_DRAW_TYPE ) continue;
if( Pin->m_Pos != RefPin->m_Pos ) continue; if( Pin->m_Pos != RefPin->m_Pos ) continue;
if(Pin->m_Orient != RefPin->m_Orient) continue; if(Pin->m_Orient != RefPin->m_Orient) continue;
if( Pin->m_Convert == RefPin->m_Convert ) Pin->m_PinLen = newsize; if( Pin->m_Convert == RefPin->m_Convert ) Pin->m_PinLen = newsize;
...@@ -745,14 +745,14 @@ LibDrawPin * Pin; ...@@ -745,14 +745,14 @@ LibDrawPin * Pin;
bool selected = (MasterPin->m_Selected & IS_SELECTED) != 0; bool selected = (MasterPin->m_Selected & IS_SELECTED) != 0;
if( (CurrentLibEntry == NULL) || (MasterPin == NULL) ) return; if( (CurrentLibEntry == NULL) || (MasterPin == NULL) ) return;
if(MasterPin->m_StructType != COMPONENT_PIN_DRAW_TYPE ) return; if(MasterPin->Type() != COMPONENT_PIN_DRAW_TYPE ) return;
GetScreen()->SetModify(); GetScreen()->SetModify();
Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings; Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings;
for( ; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext ) for( ; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext )
{ {
if ( Pin->m_StructType != COMPONENT_PIN_DRAW_TYPE ) continue; if ( Pin->Type() != COMPONENT_PIN_DRAW_TYPE ) continue;
if ( (Pin->m_Convert) && (Pin->m_Convert != CurrentConvert) ) continue; if ( (Pin->m_Convert) && (Pin->m_Convert != CurrentConvert) ) continue;
// Is it the "selected mode" ? // Is it the "selected mode" ?
if (selected && (Pin->m_Selected & IS_SELECTED) == 0 ) continue; if (selected && (Pin->m_Selected & IS_SELECTED) == 0 ) continue;
...@@ -793,7 +793,7 @@ int ox = 0, oy = 0; ...@@ -793,7 +793,7 @@ int ox = 0, oy = 0;
if(CurrentLibEntry == NULL ) return; if(CurrentLibEntry == NULL ) return;
if(SourcePin == NULL ) return; if(SourcePin == NULL ) return;
if(SourcePin->m_StructType != COMPONENT_PIN_DRAW_TYPE ) return; if(SourcePin->Type() != COMPONENT_PIN_DRAW_TYPE ) return;
Pin = SourcePin->GenCopy(); Pin = SourcePin->GenCopy();
Pin->Pnext = CurrentLibEntry->m_Drawings; Pin->Pnext = CurrentLibEntry->m_Drawings;
...@@ -848,13 +848,13 @@ wxString msg; ...@@ -848,13 +848,13 @@ wxString msg;
Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings; Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings;
for( nb_pins = 0; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext ) for( nb_pins = 0; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext )
{ {
if ( Pin->m_StructType == COMPONENT_PIN_DRAW_TYPE ) nb_pins++; if ( Pin->Type() == COMPONENT_PIN_DRAW_TYPE ) nb_pins++;
} }
PinList = (LibDrawPin **) MyZMalloc( (nb_pins+1) * sizeof(LibDrawPin *) ); PinList = (LibDrawPin **) MyZMalloc( (nb_pins+1) * sizeof(LibDrawPin *) );
Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings; Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings;
for( ii = 0; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext ) for( ii = 0; Pin != NULL; Pin = (LibDrawPin *) Pin->Pnext )
{ {
if ( Pin->m_StructType == COMPONENT_PIN_DRAW_TYPE ) PinList[ii++] = Pin; if ( Pin->Type() == COMPONENT_PIN_DRAW_TYPE ) PinList[ii++] = Pin;
} }
// Classement des pins par numero de pin // Classement des pins par numero de pin
......
...@@ -180,7 +180,7 @@ wxPoint pos; ...@@ -180,7 +180,7 @@ wxPoint pos;
if ( (g_PlotFormat == PLOT_FORMAT_POST) && g_PlotPSColorOpt ) if ( (g_PlotFormat == PLOT_FORMAT_POST) && g_PlotPSColorOpt )
SetColorMapPS ( ReturnLayerColor(LAYER_DEVICE) ); SetColorMapPS ( ReturnLayerColor(LAYER_DEVICE) );
switch (DEntry->m_StructType) switch (DEntry->Type())
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
{ {
...@@ -517,7 +517,7 @@ wxString Text; ...@@ -517,7 +517,7 @@ wxString Text;
int color = -1; int color = -1;
int HalfSize; int HalfSize;
switch ( Struct->m_StructType ) switch ( Struct->Type() )
{ {
case DRAW_GLOBAL_LABEL_STRUCT_TYPE: case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
case DRAW_LABEL_STRUCT_TYPE: case DRAW_LABEL_STRUCT_TYPE:
...@@ -529,7 +529,7 @@ int HalfSize; ...@@ -529,7 +529,7 @@ int HalfSize;
pX = ((DrawTextStruct*)Struct)->m_Pos.x; pX = ((DrawTextStruct*)Struct)->m_Pos.x;
pY = ((DrawTextStruct*)Struct)->m_Pos.y; pY = ((DrawTextStruct*)Struct)->m_Pos.y;
offset = TXTMARGE; offset = TXTMARGE;
if ( Struct->m_StructType == DRAW_GLOBAL_LABEL_STRUCT_TYPE) if ( Struct->Type() == DRAW_GLOBAL_LABEL_STRUCT_TYPE)
offset += Size.x; // We must draw the Glabel graphoc symbol offset += Size.x; // We must draw the Glabel graphoc symbol
if ( (g_PlotFormat == PLOT_FORMAT_POST) && g_PlotPSColorOpt ) if ( (g_PlotFormat == PLOT_FORMAT_POST) && g_PlotPSColorOpt )
color = ReturnLayerColor(((DrawTextStruct*)Struct)->m_Layer); color = ReturnLayerColor(((DrawTextStruct*)Struct)->m_Layer);
...@@ -545,7 +545,7 @@ int HalfSize; ...@@ -545,7 +545,7 @@ int HalfSize;
switch(Orient) switch(Orient)
{ {
case 0: /* Orientation horiz normale */ case 0: /* Orientation horiz normale */
if( Struct->m_StructType == DRAW_GLOBAL_LABEL_STRUCT_TYPE ) if( Struct->Type() == DRAW_GLOBAL_LABEL_STRUCT_TYPE )
PlotGraphicText(g_PlotFormat, wxPoint(pX - offset, pY), PlotGraphicText(g_PlotFormat, wxPoint(pX - offset, pY),
color, Text, TEXT_ORIENT_HORIZ, Size, color, Text, TEXT_ORIENT_HORIZ, Size,
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_CENTER); GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_CENTER);
...@@ -556,7 +556,7 @@ int HalfSize; ...@@ -556,7 +556,7 @@ int HalfSize;
break; break;
case 1: /* Orientation vert UP */ case 1: /* Orientation vert UP */
if( Struct->m_StructType == DRAW_GLOBAL_LABEL_STRUCT_TYPE ) if( Struct->Type() == DRAW_GLOBAL_LABEL_STRUCT_TYPE )
PlotGraphicText(g_PlotFormat, wxPoint(pX, pY + offset), PlotGraphicText(g_PlotFormat, wxPoint(pX, pY + offset),
color, Text, TEXT_ORIENT_VERT, Size, color, Text, TEXT_ORIENT_VERT, Size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP); GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP);
...@@ -567,7 +567,7 @@ int HalfSize; ...@@ -567,7 +567,7 @@ int HalfSize;
break; break;
case 2: /* Orientation horiz inverse */ case 2: /* Orientation horiz inverse */
if( Struct->m_StructType == DRAW_GLOBAL_LABEL_STRUCT_TYPE) if( Struct->Type() == DRAW_GLOBAL_LABEL_STRUCT_TYPE)
PlotGraphicText(g_PlotFormat, wxPoint(pX + offset, pY), PlotGraphicText(g_PlotFormat, wxPoint(pX + offset, pY),
color, Text, TEXT_ORIENT_HORIZ, Size, color, Text, TEXT_ORIENT_HORIZ, Size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER); GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER);
...@@ -578,7 +578,7 @@ int HalfSize; ...@@ -578,7 +578,7 @@ int HalfSize;
break; break;
case 3: /* Orientation vert BOTTOM */ case 3: /* Orientation vert BOTTOM */
if( Struct->m_StructType == DRAW_GLOBAL_LABEL_STRUCT_TYPE) if( Struct->Type() == DRAW_GLOBAL_LABEL_STRUCT_TYPE)
PlotGraphicText(g_PlotFormat, wxPoint(pX, pY - offset), PlotGraphicText(g_PlotFormat, wxPoint(pX, pY - offset),
color, Text, 2700, Size, color, Text, 2700, Size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM); GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM);
...@@ -590,7 +590,7 @@ int HalfSize; ...@@ -590,7 +590,7 @@ int HalfSize;
} }
/* Trace du symbole associe au label global */ /* Trace du symbole associe au label global */
if( Struct->m_StructType == DRAW_GLOBAL_LABEL_STRUCT_TYPE) if( Struct->Type() == DRAW_GLOBAL_LABEL_STRUCT_TYPE)
{ {
int jj, imax; int jj, imax;
HalfSize = Size.x / 2; HalfSize = Size.x / 2;
......
...@@ -574,7 +574,7 @@ wxString msg; ...@@ -574,7 +574,7 @@ wxString msg;
{ {
Plume('U'); Plume('U');
layer = LAYER_NOTES; layer = LAYER_NOTES;
switch( DrawList->m_StructType ) switch( DrawList->Type() )
{ {
case DRAW_BUSENTRY_STRUCT_TYPE : case DRAW_BUSENTRY_STRUCT_TYPE :
#undef STRUCT #undef STRUCT
...@@ -585,7 +585,7 @@ wxString msg; ...@@ -585,7 +585,7 @@ wxString msg;
case DRAW_SEGMENT_STRUCT_TYPE : case DRAW_SEGMENT_STRUCT_TYPE :
#undef STRUCT #undef STRUCT
#define STRUCT ((EDA_DrawLineStruct*)DrawList) #define STRUCT ((EDA_DrawLineStruct*)DrawList)
if ( DrawList->m_StructType == DRAW_SEGMENT_STRUCT_TYPE) if ( DrawList->Type() == DRAW_SEGMENT_STRUCT_TYPE)
{ {
x1 = STRUCT->m_Start.x; y1 = STRUCT->m_Start.y; x1 = STRUCT->m_Start.x; y1 = STRUCT->m_Start.y;
x2 = STRUCT->m_End.x; y2 = STRUCT->m_End.y; x2 = STRUCT->m_End.x; y2 = STRUCT->m_End.y;
......
...@@ -415,7 +415,7 @@ wxPoint StartPos, EndPos; ...@@ -415,7 +415,7 @@ wxPoint StartPos, EndPos;
{ {
Plume('U'); Plume('U');
layer = LAYER_NOTES; layer = LAYER_NOTES;
switch( DrawList->m_StructType ) switch( DrawList->Type() )
{ {
case DRAW_BUSENTRY_STRUCT_TYPE : /* Struct Raccord et Segment sont identiques */ case DRAW_BUSENTRY_STRUCT_TYPE : /* Struct Raccord et Segment sont identiques */
#undef STRUCT #undef STRUCT
...@@ -426,7 +426,7 @@ wxPoint StartPos, EndPos; ...@@ -426,7 +426,7 @@ wxPoint StartPos, EndPos;
case DRAW_SEGMENT_STRUCT_TYPE : case DRAW_SEGMENT_STRUCT_TYPE :
#undef STRUCT #undef STRUCT
#define STRUCT ((EDA_DrawLineStruct*)DrawList) #define STRUCT ((EDA_DrawLineStruct*)DrawList)
if ( DrawList->m_StructType == DRAW_SEGMENT_STRUCT_TYPE) if ( DrawList->Type() == DRAW_SEGMENT_STRUCT_TYPE)
{ {
StartPos = STRUCT->m_Start; StartPos = STRUCT->m_Start;
EndPos = STRUCT->m_End; EndPos = STRUCT->m_End;
......
...@@ -119,13 +119,13 @@ public: ...@@ -119,13 +119,13 @@ public:
long m_TimeStamp; long m_TimeStamp;
public: public:
ComponentDataClass( void ) ComponentDataClass()
{ {
InitData(); InitData();
} }
void InitData( void ) void InitData()
{ {
m_TimeStamp = 0; m_TimeStamp = 0;
m_Reference[0] = 0; m_Reference[0] = 0;
......
...@@ -74,11 +74,11 @@ public: ...@@ -74,11 +74,11 @@ public:
public: public:
EDA_DrawLineStruct( const wxPoint &pos, int layer ); EDA_DrawLineStruct( const wxPoint &pos, int layer );
~EDA_DrawLineStruct( void ) { } ~EDA_DrawLineStruct() { }
bool IsOneEndPointAt( const wxPoint& pos ); bool IsOneEndPointAt( const wxPoint& pos );
EDA_DrawLineStruct* GenCopy( void ); EDA_DrawLineStruct* GenCopy();
bool IsNull( void ) bool IsNull()
{ {
return m_Start == m_End; return m_Start == m_End;
} }
...@@ -98,9 +98,9 @@ public: ...@@ -98,9 +98,9 @@ public:
public: public:
DrawMarkerStruct( const wxPoint &pos, const wxString &text ); DrawMarkerStruct( const wxPoint &pos, const wxString &text );
~DrawMarkerStruct( void ); ~DrawMarkerStruct();
DrawMarkerStruct* GenCopy( void ); DrawMarkerStruct* GenCopy();
wxString GetComment( void ); wxString GetComment();
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int draw_mode, int Color = -1 ); int draw_mode, int Color = -1 );
}; };
...@@ -113,8 +113,8 @@ public: ...@@ -113,8 +113,8 @@ public:
public: public:
DrawNoConnectStruct( const wxPoint &pos ); DrawNoConnectStruct( const wxPoint &pos );
~DrawNoConnectStruct( void ) { } ~DrawNoConnectStruct() { }
DrawNoConnectStruct* GenCopy( void ); DrawNoConnectStruct* GenCopy();
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int draw_mode, int Color = -1 ); int draw_mode, int Color = -1 );
}; };
...@@ -134,9 +134,9 @@ public: ...@@ -134,9 +134,9 @@ public:
public: public:
DrawBusEntryStruct( const wxPoint &pos, int shape, int id ); DrawBusEntryStruct( const wxPoint &pos, int shape, int id );
~DrawBusEntryStruct( void ) { } ~DrawBusEntryStruct() { }
DrawBusEntryStruct* GenCopy( void ); DrawBusEntryStruct* GenCopy();
wxPoint m_End( void ); // retourne la coord de fin du raccord wxPoint m_End(); // retourne la coord de fin du raccord
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int draw_mode, int Color = -1 ); int draw_mode, int Color = -1 );
}; };
...@@ -151,8 +151,8 @@ public: ...@@ -151,8 +151,8 @@ public:
public: public:
DrawPolylineStruct( int layer ); DrawPolylineStruct( int layer );
~DrawPolylineStruct( void ); ~DrawPolylineStruct();
DrawPolylineStruct* GenCopy( void ); DrawPolylineStruct* GenCopy();
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int draw_mode, int Color = -1 ); int draw_mode, int Color = -1 );
}; };
...@@ -165,28 +165,37 @@ public: ...@@ -165,28 +165,37 @@ public:
public: public:
DrawJunctionStruct( const wxPoint &pos ); DrawJunctionStruct( const wxPoint &pos );
~DrawJunctionStruct( void ) { } ~DrawJunctionStruct() { }
DrawJunctionStruct* GenCopy( void ); DrawJunctionStruct* GenCopy();
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int draw_mode, int Color = -1 ); int draw_mode, int Color = -1 );
}; };
class DrawTextStruct : public EDA_BaseStruct, public EDA_TextStruct class DrawTextStruct : public EDA_BaseStruct, public EDA_TextStruct
{ {
public: public:
int m_Layer; int m_Layer;
int m_Shape; int m_Shape;
bool m_IsDangling; // TRUE si non connect bool m_IsDangling; // TRUE si non connect
public: public:
DrawTextStruct( const wxPoint& pos = wxPoint( 0, 0 ), const wxString& text = wxEmptyString ); DrawTextStruct( const wxPoint& pos = wxPoint( 0, 0 ), const wxString& text = wxEmptyString,
~DrawTextStruct( void ) { } KICAD_T aType = DRAW_TEXT_STRUCT_TYPE );
DrawTextStruct* GenCopy( void ); ~DrawTextStruct() { }
DrawTextStruct* GenCopy();
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int draw_mode, virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int draw_mode,
int Color = -1 ); int Color = -1 );
void SwapData( DrawTextStruct* copyitem ); void SwapData( DrawTextStruct* copyitem );
virtual void Place( WinEDA_DrawFrame* frame, wxDC* DC ); virtual void Place( WinEDA_DrawFrame* frame, wxDC* DC );
// selectively give public access to a very dangerous protected function:
void SetType( KICAD_T aType ) { EDA_BaseStruct::SetType( aType ); }
private: private:
void DrawAsText( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, void DrawAsText( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int draw_mode, int Color ); int draw_mode, int Color );
...@@ -201,7 +210,7 @@ class DrawLabelStruct : public DrawTextStruct ...@@ -201,7 +210,7 @@ class DrawLabelStruct : public DrawTextStruct
{ {
public: public:
DrawLabelStruct( const wxPoint& pos = wxPoint( 0, 0 ), const wxString& text = wxEmptyString ); DrawLabelStruct( const wxPoint& pos = wxPoint( 0, 0 ), const wxString& text = wxEmptyString );
~DrawLabelStruct( void ) { } ~DrawLabelStruct() { }
}; };
...@@ -210,7 +219,7 @@ class DrawGlobalLabelStruct : public DrawTextStruct ...@@ -210,7 +219,7 @@ class DrawGlobalLabelStruct : public DrawTextStruct
public: public:
DrawGlobalLabelStruct( const wxPoint& pos = wxPoint( 0, 0 ), DrawGlobalLabelStruct( const wxPoint& pos = wxPoint( 0, 0 ),
const wxString& text = wxEmptyString ); const wxString& text = wxEmptyString );
~DrawGlobalLabelStruct( void ) { } ~DrawGlobalLabelStruct() { }
}; };
......
...@@ -297,7 +297,7 @@ void InstallNetlistFrame(WinEDA_SchematicFrame *parent, wxPoint &pos); ...@@ -297,7 +297,7 @@ void InstallNetlistFrame(WinEDA_SchematicFrame *parent, wxPoint &pos);
/***************/ /***************/
/* ANNOTATE.CPP */ /* ANNOTATE.CPP */
/***************/ /***************/
void ReAnnotatePowerSymbolsOnly( void ); void ReAnnotatePowerSymbolsOnly();
void InstallAnnotateFrame(WinEDA_SchematicFrame * parent, wxPoint &pos); void InstallAnnotateFrame(WinEDA_SchematicFrame * parent, wxPoint &pos);
int CheckAnnotate(WinEDA_SchematicFrame * frame, bool OneSheetOnly); int CheckAnnotate(WinEDA_SchematicFrame * frame, bool OneSheetOnly);
......
...@@ -142,7 +142,7 @@ wxString dirbuf; ...@@ -142,7 +142,7 @@ wxString dirbuf;
Phead = screen->EEDrawList; Phead = screen->EEDrawList;
while (Phead) while (Phead)
{ {
switch(Phead->m_StructType) switch(Phead->Type())
{ {
case DRAW_LIB_ITEM_STRUCT_TYPE: /* Its a library item. */ case DRAW_LIB_ITEM_STRUCT_TYPE: /* Its a library item. */
SavePartDescr( f, (EDA_SchComponentStruct *) Phead); SavePartDescr( f, (EDA_SchComponentStruct *) Phead);
......
This diff is collapsed.
...@@ -436,7 +436,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -436,7 +436,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
break; break;
// Ensure the struct is a component (could be a struct of a component, like Field, text..) // Ensure the struct is a component (could be a struct of a component, like Field, text..)
if( m_CurrentScreen->GetCurItem()->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if( m_CurrentScreen->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) ); m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) );
case ID_POPUP_SCH_DELETE: case ID_POPUP_SCH_DELETE:
...@@ -489,7 +489,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -489,7 +489,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_MOVE_CMP_REQUEST: case ID_POPUP_SCH_MOVE_CMP_REQUEST:
// Ensure the struct is a component (could be a struct of a component, like Field, text..) // Ensure the struct is a component (could be a struct of a component, like Field, text..)
if( m_CurrentScreen->GetCurItem()->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if( m_CurrentScreen->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) ); m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) );
if( m_CurrentScreen->GetCurItem() == NULL ) if( m_CurrentScreen->GetCurItem() == NULL )
break; break;
...@@ -502,7 +502,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -502,7 +502,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_EDIT_CMP: case ID_POPUP_SCH_EDIT_CMP:
// Ensure the struct is a component (could be a struct of a component, like Field, text..) // Ensure the struct is a component (could be a struct of a component, like Field, text..)
if( m_CurrentScreen->GetCurItem()->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if( m_CurrentScreen->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) ); m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) );
if( m_CurrentScreen->GetCurItem() == NULL ) if( m_CurrentScreen->GetCurItem() == NULL )
break; break;
...@@ -517,7 +517,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -517,7 +517,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_ORIENT_NORMAL_CMP: case ID_POPUP_SCH_ORIENT_NORMAL_CMP:
// Ensure the struct is a component (could be a struct of a component, like Field, text..) // Ensure the struct is a component (could be a struct of a component, like Field, text..)
if( m_CurrentScreen->GetCurItem()->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if( m_CurrentScreen->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) ); m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) );
if( m_CurrentScreen->GetCurItem() == NULL ) if( m_CurrentScreen->GetCurItem() == NULL )
break; break;
...@@ -559,7 +559,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -559,7 +559,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_EDIT_VALUE_CMP: case ID_POPUP_SCH_EDIT_VALUE_CMP:
// Ensure the struct is a component (could be a struct of a component, like Field, text..) // Ensure the struct is a component (could be a struct of a component, like Field, text..)
if( m_CurrentScreen->GetCurItem()->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if( m_CurrentScreen->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) ); m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) );
if( m_CurrentScreen->GetCurItem() == NULL ) if( m_CurrentScreen->GetCurItem() == NULL )
break; break;
...@@ -570,7 +570,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -570,7 +570,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_EDIT_REF_CMP: case ID_POPUP_SCH_EDIT_REF_CMP:
// Ensure the struct is a component (could be a struct of a component, like Field, text..) // Ensure the struct is a component (could be a struct of a component, like Field, text..)
if( m_CurrentScreen->GetCurItem()->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if( m_CurrentScreen->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) ); m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) );
if( m_CurrentScreen->GetCurItem() == NULL ) if( m_CurrentScreen->GetCurItem() == NULL )
break; break;
...@@ -581,7 +581,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -581,7 +581,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_EDIT_CONVERT_CMP: case ID_POPUP_SCH_EDIT_CONVERT_CMP:
// Ensure the struct is a component (could be a struct of a component, like Field, text..) // Ensure the struct is a component (could be a struct of a component, like Field, text..)
if( m_CurrentScreen->GetCurItem()->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if( m_CurrentScreen->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) ); m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) );
if( m_CurrentScreen->GetCurItem() == NULL ) if( m_CurrentScreen->GetCurItem() == NULL )
break; break;
...@@ -595,7 +595,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -595,7 +595,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
{ {
EDA_SchComponentStruct* olditem, * newitem; EDA_SchComponentStruct* olditem, * newitem;
if( m_CurrentScreen->GetCurItem()->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if( m_CurrentScreen->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) ); m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) );
olditem = (EDA_SchComponentStruct*) m_CurrentScreen->GetCurItem(); olditem = (EDA_SchComponentStruct*) m_CurrentScreen->GetCurItem();
if( olditem == NULL ) if( olditem == NULL )
...@@ -638,7 +638,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -638,7 +638,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_SELECT_UNIT26: case ID_POPUP_SCH_SELECT_UNIT26:
// Ensure the struct is a component (could be a struct of a component, like Field, text..) // Ensure the struct is a component (could be a struct of a component, like Field, text..)
if( m_CurrentScreen->GetCurItem()->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if( m_CurrentScreen->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) ); m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) );
if( m_CurrentScreen->GetCurItem() == NULL ) if( m_CurrentScreen->GetCurItem() == NULL )
break; break;
...@@ -652,7 +652,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -652,7 +652,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_DISPLAYDOC_CMP: case ID_POPUP_SCH_DISPLAYDOC_CMP:
// Ensure the struct is a component (could be a piece of a component, like Field, text..) // Ensure the struct is a component (could be a piece of a component, like Field, text..)
if( m_CurrentScreen->GetCurItem()->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE ) if( m_CurrentScreen->GetCurItem()->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) ); m_CurrentScreen->SetCurItem( LocateSmallestComponent( GetScreen() ) );
if( m_CurrentScreen->GetCurItem() == NULL ) if( m_CurrentScreen->GetCurItem() == NULL )
break; break;
...@@ -669,7 +669,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -669,7 +669,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_ENTER_SHEET: case ID_POPUP_SCH_ENTER_SHEET:
{ {
EDA_BaseStruct* DrawStruct = m_CurrentScreen->GetCurItem(); EDA_BaseStruct* DrawStruct = m_CurrentScreen->GetCurItem();
if( DrawStruct && (DrawStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE) ) if( DrawStruct && (DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE) )
{ {
InstallNextScreen( (DrawSheetStruct*) DrawStruct ); InstallNextScreen( (DrawSheetStruct*) DrawStruct );
} }
...@@ -781,7 +781,7 @@ void WinEDA_SchematicFrame::Process_Move_Item( EDA_BaseStruct* DrawStruct, ...@@ -781,7 +781,7 @@ void WinEDA_SchematicFrame::Process_Move_Item( EDA_BaseStruct* DrawStruct,
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
switch( DrawStruct->m_StructType ) switch( DrawStruct->Type() )
{ {
case DRAW_JUNCTION_STRUCT_TYPE: case DRAW_JUNCTION_STRUCT_TYPE:
break; break;
...@@ -820,7 +820,7 @@ void WinEDA_SchematicFrame::Process_Move_Item( EDA_BaseStruct* DrawStruct, ...@@ -820,7 +820,7 @@ void WinEDA_SchematicFrame::Process_Move_Item( EDA_BaseStruct* DrawStruct,
wxString msg; wxString msg;
msg.Printf( msg.Printf(
wxT( "WinEDA_SchematicFrame::Move_Item Error: Bad DrawType %d" ), wxT( "WinEDA_SchematicFrame::Move_Item Error: Bad DrawType %d" ),
DrawStruct->m_StructType ); DrawStruct->Type() );
DisplayError( this, msg ); DisplayError( this, msg );
break; break;
} }
......
This diff is collapsed.
...@@ -385,7 +385,7 @@ void WinEDA_SchematicFrame::ReSizeSheet( DrawSheetStruct* Sheet, wxDC* DC ) ...@@ -385,7 +385,7 @@ void WinEDA_SchematicFrame::ReSizeSheet( DrawSheetStruct* Sheet, wxDC* DC )
if( Sheet->m_Flags & IS_NEW ) if( Sheet->m_Flags & IS_NEW )
return; return;
if( Sheet->m_StructType != DRAW_SHEET_STRUCT_TYPE ) if( Sheet->Type() != DRAW_SHEET_STRUCT_TYPE )
{ {
DisplayError( this, wxT( "WinEDA_SchematicFrame::ReSizeSheet: Bad SructType" ) ); DisplayError( this, wxT( "WinEDA_SchematicFrame::ReSizeSheet: Bad SructType" ) );
return; return;
...@@ -420,7 +420,7 @@ void WinEDA_SchematicFrame::ReSizeSheet( DrawSheetStruct* Sheet, wxDC* DC ) ...@@ -420,7 +420,7 @@ void WinEDA_SchematicFrame::ReSizeSheet( DrawSheetStruct* Sheet, wxDC* DC )
void WinEDA_SchematicFrame::StartMoveSheet( DrawSheetStruct* Sheet, wxDC* DC ) void WinEDA_SchematicFrame::StartMoveSheet( DrawSheetStruct* Sheet, wxDC* DC )
/*********************************************************************************/ /*********************************************************************************/
{ {
if( (Sheet == NULL) || ( Sheet->m_StructType != DRAW_SHEET_STRUCT_TYPE) ) if( (Sheet == NULL) || ( Sheet->Type() != DRAW_SHEET_STRUCT_TYPE) )
return; return;
DrawPanel->CursorOff( DC ); DrawPanel->CursorOff( DC );
...@@ -573,7 +573,7 @@ void DrawSheetStruct::CleanupSheet( WinEDA_SchematicFrame* frame, wxDC* DC ) ...@@ -573,7 +573,7 @@ void DrawSheetStruct::CleanupSheet( WinEDA_SchematicFrame* frame, wxDC* DC )
DrawGlobalLabelStruct* GLabel = NULL; DrawGlobalLabelStruct* GLabel = NULL;
for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext ) for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext )
{ {
if( DrawStruct->m_StructType != DRAW_GLOBAL_LABEL_STRUCT_TYPE ) if( DrawStruct->Type() != DRAW_GLOBAL_LABEL_STRUCT_TYPE )
continue; continue;
GLabel = (DrawGlobalLabelStruct*) DrawStruct; GLabel = (DrawGlobalLabelStruct*) DrawStruct;
if( Pinsheet->m_Text.CmpNoCase( GLabel->m_Text ) == 0 ) if( Pinsheet->m_Text.CmpNoCase( GLabel->m_Text ) == 0 )
......
...@@ -54,7 +54,7 @@ public: ...@@ -54,7 +54,7 @@ public:
WinEDA_PinSheetPropertiesFrame( WinEDA_SchematicFrame* parent, WinEDA_PinSheetPropertiesFrame( WinEDA_SchematicFrame* parent,
DrawSheetLabelStruct* curr_pinsheet, DrawSheetLabelStruct* curr_pinsheet,
const wxPoint& framepos = wxPoint( -1, -1 ) ); const wxPoint& framepos = wxPoint( -1, -1 ) );
~WinEDA_PinSheetPropertiesFrame( void ) { }; ~WinEDA_PinSheetPropertiesFrame() { };
private: private:
void PinSheetPropertiesAccept( wxCommandEvent& event ); void PinSheetPropertiesAccept( wxCommandEvent& event );
...@@ -371,7 +371,7 @@ DrawSheetLabelStruct* WinEDA_SchematicFrame::Import_PinSheet( DrawSheetStruct* S ...@@ -371,7 +371,7 @@ DrawSheetLabelStruct* WinEDA_SchematicFrame::Import_PinSheet( DrawSheetStruct* S
GLabel = NULL; GLabel = NULL;
for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext ) for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext )
{ {
if( DrawStruct->m_StructType != DRAW_GLOBAL_LABEL_STRUCT_TYPE ) if( DrawStruct->Type() != DRAW_GLOBAL_LABEL_STRUCT_TYPE )
continue; continue;
GLabel = (DrawGlobalLabelStruct*) DrawStruct; GLabel = (DrawGlobalLabelStruct*) DrawStruct;
...@@ -437,7 +437,7 @@ void WinEDA_SchematicFrame::DeleteSheetLabel( wxDC* DC, ...@@ -437,7 +437,7 @@ void WinEDA_SchematicFrame::DeleteSheetLabel( wxDC* DC,
if( DrawStruct ) // Modification du chainage if( DrawStruct ) // Modification du chainage
{ {
if( DrawStruct->m_StructType != DRAW_SHEET_STRUCT_TYPE ) if( DrawStruct->Type() != DRAW_SHEET_STRUCT_TYPE )
{ {
DisplayError( this, DisplayError( this,
wxT( "DeleteSheetLabel error: m_Parent != DRAW_SHEET_STRUCT_TYPE" ) ); wxT( "DeleteSheetLabel error: m_Parent != DRAW_SHEET_STRUCT_TYPE" ) );
......
...@@ -71,7 +71,7 @@ bodygraphics_PropertiesAccept( wxCommandEvent& event ) ...@@ -71,7 +71,7 @@ bodygraphics_PropertiesAccept( wxCommandEvent& event )
CurrentDrawItem->m_Convert = 0; CurrentDrawItem->m_Convert = 0;
if( m_Filled ) if( m_Filled )
{ {
switch( CurrentDrawItem->m_StructType ) switch( CurrentDrawItem->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
( (LibDrawArc*) CurrentDrawItem )->m_Fill = FlSymbol_Fill; ( (LibDrawArc*) CurrentDrawItem )->m_Fill = FlSymbol_Fill;
...@@ -143,7 +143,7 @@ static void AbortSymbolTraceOn( WinEDA_DrawPanel* Panel, wxDC* DC ) ...@@ -143,7 +143,7 @@ static void AbortSymbolTraceOn( WinEDA_DrawPanel* Panel, wxDC* DC )
if( CurrentDrawItem->m_Flags & IS_NEW ) if( CurrentDrawItem->m_Flags & IS_NEW )
{ {
if( CurrentDrawItem->m_StructType == COMPONENT_ARC_DRAW_TYPE ) if( CurrentDrawItem->Type() == COMPONENT_ARC_DRAW_TYPE )
{ {
Panel->m_Parent->RedrawActiveWindow( DC, TRUE ); Panel->m_Parent->RedrawActiveWindow( DC, TRUE );
} }
...@@ -339,7 +339,7 @@ void WinEDA_LibeditFrame::GraphicItemBeginDraw( wxDC* DC ) ...@@ -339,7 +339,7 @@ void WinEDA_LibeditFrame::GraphicItemBeginDraw( wxDC* DC )
if( CurrentDrawItem == NULL ) if( CurrentDrawItem == NULL )
return; return;
switch( CurrentDrawItem->m_StructType ) switch( CurrentDrawItem->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
if( StateDrawArc == 1 ) if( StateDrawArc == 1 )
...@@ -414,7 +414,7 @@ void MoveLibDrawItemAt( LibEDA_BaseStruct* DrawItem, wxPoint newpos ) ...@@ -414,7 +414,7 @@ void MoveLibDrawItemAt( LibEDA_BaseStruct* DrawItem, wxPoint newpos )
int mx = newpos.x, my = newpos.y; int mx = newpos.x, my = newpos.y;
wxSize size; wxSize size;
switch( DrawItem->m_StructType ) switch( DrawItem->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
{ {
...@@ -485,7 +485,7 @@ void WinEDA_LibeditFrame::StartMoveDrawSymbol( wxDC* DC ) ...@@ -485,7 +485,7 @@ void WinEDA_LibeditFrame::StartMoveDrawSymbol( wxDC* DC )
CurrentDrawItem->m_Flags |= IS_MOVED; CurrentDrawItem->m_Flags |= IS_MOVED;
StartCursor = m_CurrentScreen->m_Curseur; StartCursor = m_CurrentScreen->m_Curseur;
switch( CurrentDrawItem->m_StructType ) switch( CurrentDrawItem->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
InitPosition = ( (LibDrawArc*) CurrentDrawItem )->m_Pos; InitPosition = ( (LibDrawArc*) CurrentDrawItem )->m_Pos;
...@@ -548,7 +548,7 @@ static void SymbolDisplayDraw( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) ...@@ -548,7 +548,7 @@ static void SymbolDisplayDraw( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
{ {
DrawLibraryDrawStruct( panel, DC, CurrentLibEntry, 0, 0, DrawLibraryDrawStruct( panel, DC, CurrentLibEntry, 0, 0,
CurrentDrawItem, CurrentUnit, DrawMode ); CurrentDrawItem, CurrentUnit, DrawMode );
if( CurrentDrawItem->m_StructType == COMPONENT_ARC_DRAW_TYPE ) if( CurrentDrawItem->Type() == COMPONENT_ARC_DRAW_TYPE )
{ {
int Color = ReturnLayerColor( LAYER_DEVICE ); int Color = ReturnLayerColor( LAYER_DEVICE );
GRDashedLine( &panel->m_ClipBox, DC, ArcStartX, -ArcStartY, GRDashedLine( &panel->m_ClipBox, DC, ArcStartX, -ArcStartY,
...@@ -563,7 +563,7 @@ static void SymbolDisplayDraw( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) ...@@ -563,7 +563,7 @@ static void SymbolDisplayDraw( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
} }
} }
switch( CurrentDrawItem->m_StructType ) switch( CurrentDrawItem->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
if( StateDrawArc == 1 ) if( StateDrawArc == 1 )
...@@ -620,7 +620,7 @@ static void SymbolDisplayDraw( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) ...@@ -620,7 +620,7 @@ static void SymbolDisplayDraw( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
{ {
DrawLibraryDrawStruct( panel, DC, CurrentLibEntry, 0, 0, DrawLibraryDrawStruct( panel, DC, CurrentLibEntry, 0, 0,
CurrentDrawItem, CurrentUnit, DrawMode ); CurrentDrawItem, CurrentUnit, DrawMode );
if( CurrentDrawItem->m_StructType == COMPONENT_ARC_DRAW_TYPE ) if( CurrentDrawItem->Type() == COMPONENT_ARC_DRAW_TYPE )
{ {
int Color = ReturnLayerColor( LAYER_DEVICE ); int Color = ReturnLayerColor( LAYER_DEVICE );
GRDashedLine( &panel->m_ClipBox, DC, ArcStartX, -ArcStartY, GRDashedLine( &panel->m_ClipBox, DC, ArcStartX, -ArcStartY,
...@@ -652,7 +652,7 @@ void WinEDA_LibeditFrame::EndDrawGraphicItem( wxDC* DC ) ...@@ -652,7 +652,7 @@ void WinEDA_LibeditFrame::EndDrawGraphicItem( wxDC* DC )
if( CurrentDrawItem == NULL ) if( CurrentDrawItem == NULL )
return; return;
if( CurrentDrawItem->m_StructType == COMPONENT_ARC_DRAW_TYPE ) if( CurrentDrawItem->Type() == COMPONENT_ARC_DRAW_TYPE )
{ {
if( StateDrawArc == 1 ) /* Trace d'arc en cours: doit etre termine */ if( StateDrawArc == 1 ) /* Trace d'arc en cours: doit etre termine */
{ {
...@@ -673,7 +673,7 @@ void WinEDA_LibeditFrame::EndDrawGraphicItem( wxDC* DC ) ...@@ -673,7 +673,7 @@ void WinEDA_LibeditFrame::EndDrawGraphicItem( wxDC* DC )
CurrentDrawItem->Pnext = CurrentLibEntry->m_Drawings; CurrentDrawItem->Pnext = CurrentLibEntry->m_Drawings;
CurrentLibEntry->m_Drawings = CurrentDrawItem; CurrentLibEntry->m_Drawings = CurrentDrawItem;
switch( CurrentDrawItem->m_StructType ) switch( CurrentDrawItem->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
( (LibDrawArc*) CurrentDrawItem )->m_Fill = FlSymbol_Fill; ( (LibDrawArc*) CurrentDrawItem )->m_Fill = FlSymbol_Fill;
...@@ -821,7 +821,7 @@ void WinEDA_LibeditFrame::DeleteDrawPoly( wxDC* DC ) ...@@ -821,7 +821,7 @@ void WinEDA_LibeditFrame::DeleteDrawPoly( wxDC* DC )
{ {
if( CurrentDrawItem == NULL ) if( CurrentDrawItem == NULL )
return; return;
if( CurrentDrawItem->m_StructType != COMPONENT_POLYLINE_DRAW_TYPE ) if( CurrentDrawItem->Type() != COMPONENT_POLYLINE_DRAW_TYPE )
return; return;
int* ptpoly; int* ptpoly;
......
...@@ -127,7 +127,7 @@ void WinEDA_LibeditFrame::LoadOneSymbol( wxDC* DC ) ...@@ -127,7 +127,7 @@ void WinEDA_LibeditFrame::LoadOneSymbol( wxDC* DC )
/********************************************/ /********************************************/
void WinEDA_LibeditFrame::SaveOneSymbol( void ) void WinEDA_LibeditFrame::SaveOneSymbol()
/********************************************/ /********************************************/
/* Save in file the current symbol /* Save in file the current symbol
...@@ -218,7 +218,7 @@ void WinEDA_LibeditFrame::SaveOneSymbol( void ) ...@@ -218,7 +218,7 @@ void WinEDA_LibeditFrame::SaveOneSymbol( void )
if( SymbConvert > 1 ) if( SymbConvert > 1 )
SymbConvert = 1; SymbConvert = 1;
switch( DrawEntry->m_StructType ) switch( DrawEntry->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
#define DRAWSTRUCT ( (LibDrawArc*) DrawEntry ) #define DRAWSTRUCT ( (LibDrawArc*) DrawEntry )
...@@ -323,14 +323,14 @@ static bool CompareSymbols( LibEDA_BaseStruct* DEntryRef, ...@@ -323,14 +323,14 @@ static bool CompareSymbols( LibEDA_BaseStruct* DEntryRef,
int* ptref, * ptcomp; int* ptref, * ptcomp;
/* Comparaison des proprietes generales */ /* Comparaison des proprietes generales */
if( DEntryRef->m_StructType != DEntryCompare->m_StructType ) if( DEntryRef->Type() != DEntryCompare->Type() )
return FALSE; return FALSE;
if( DEntryRef->m_Unit != DEntryCompare->m_Unit ) if( DEntryRef->m_Unit != DEntryCompare->m_Unit )
return FALSE; return FALSE;
if( DEntryRef->m_Convert != DEntryCompare->m_Convert ) if( DEntryRef->m_Convert != DEntryCompare->m_Convert )
return FALSE; return FALSE;
switch( DEntryRef->m_StructType ) switch( DEntryRef->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
#undef REFSTRUCT #undef REFSTRUCT
...@@ -427,7 +427,7 @@ static bool CompareSymbols( LibEDA_BaseStruct* DEntryRef, ...@@ -427,7 +427,7 @@ static bool CompareSymbols( LibEDA_BaseStruct* DEntryRef,
/* d'ancrage ( coord 0,0 ). */ /* d'ancrage ( coord 0,0 ). */
/***************************************************************************/ /***************************************************************************/
void WinEDA_LibeditFrame::PlaceAncre( void ) void WinEDA_LibeditFrame::PlaceAncre()
{ {
int ii, * ptsegm; int ii, * ptsegm;
int dx, dy; /* Offsets de deplacement */ int dx, dy; /* Offsets de deplacement */
...@@ -449,7 +449,7 @@ void WinEDA_LibeditFrame::PlaceAncre( void ) ...@@ -449,7 +449,7 @@ void WinEDA_LibeditFrame::PlaceAncre( void )
DrawEntry = LibEntry->m_Drawings; DrawEntry = LibEntry->m_Drawings;
while( DrawEntry ) while( DrawEntry )
{ {
switch( DrawEntry->m_StructType ) switch( DrawEntry->Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
#undef STRUCT #undef STRUCT
......
...@@ -282,7 +282,7 @@ void WinEDA_LibeditFrame::EditSymbolText(wxDC * DC, ...@@ -282,7 +282,7 @@ void WinEDA_LibeditFrame::EditSymbolText(wxDC * DC,
int DrawMode = g_XorMode; int DrawMode = g_XorMode;
if ( DrawItem == NULL ) return; if ( DrawItem == NULL ) return;
if ( DrawItem->m_StructType != COMPONENT_GRAPHIC_TEXT_DRAW_TYPE ) return; if ( DrawItem->Type() != COMPONENT_GRAPHIC_TEXT_DRAW_TYPE ) return;
/* Effacement ancien texte */ /* Effacement ancien texte */
if( ((LibDrawText*)DrawItem)->m_Text && DC) if( ((LibDrawText*)DrawItem)->m_Text && DC)
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
/****************************************************/ /****************************************************/
void WinEDA_LibeditFrame::ReCreateVToolbar( void ) void WinEDA_LibeditFrame::ReCreateVToolbar()
/****************************************************/ /****************************************************/
{ {
if( m_VToolBar == NULL ) if( m_VToolBar == NULL )
...@@ -100,7 +100,7 @@ void WinEDA_LibeditFrame::ReCreateVToolbar( void ) ...@@ -100,7 +100,7 @@ void WinEDA_LibeditFrame::ReCreateVToolbar( void )
/*************************************************/ /*************************************************/
void WinEDA_LibeditFrame::ReCreateHToolbar( void ) void WinEDA_LibeditFrame::ReCreateHToolbar()
/*************************************************/ /*************************************************/
/* Create or update the main Horizontal Toolbar for the schematic library editor /* Create or update the main Horizontal Toolbar for the schematic library editor
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
/**************************************************************/ /**************************************************************/
void WinEDA_SchematicFrame::ReCreateHToolbar( void ) void WinEDA_SchematicFrame::ReCreateHToolbar()
/**************************************************************/ /**************************************************************/
/* Create the main Horizontal Toolbar for the schematic editor /* Create the main Horizontal Toolbar for the schematic editor
...@@ -144,7 +144,7 @@ void WinEDA_SchematicFrame::ReCreateHToolbar( void ) ...@@ -144,7 +144,7 @@ void WinEDA_SchematicFrame::ReCreateHToolbar( void )
/*************************************************/ /*************************************************/
void WinEDA_SchematicFrame::ReCreateVToolbar( void ) void WinEDA_SchematicFrame::ReCreateVToolbar()
/*************************************************/ /*************************************************/
/* Create Vertical Right Toolbar /* Create Vertical Right Toolbar
...@@ -239,7 +239,7 @@ void WinEDA_SchematicFrame::ReCreateVToolbar( void ) ...@@ -239,7 +239,7 @@ void WinEDA_SchematicFrame::ReCreateVToolbar( void )
/****************************************************************/ /****************************************************************/
void WinEDA_SchematicFrame::ReCreateOptToolbar( void ) void WinEDA_SchematicFrame::ReCreateOptToolbar()
/****************************************************************/ /****************************************************************/
/* Create Vertical Left Toolbar (Option Toolbar) /* Create Vertical Left Toolbar (Option Toolbar)
......
...@@ -25,7 +25,7 @@ void Affiche_Infos_PCB_Texte( WinEDA_BasePcbFrame* frame, TEXTE_PCB* pt_texte ) ...@@ -25,7 +25,7 @@ void Affiche_Infos_PCB_Texte( WinEDA_BasePcbFrame* frame, TEXTE_PCB* pt_texte )
frame->MsgPanel->EraseMsgBox(); frame->MsgPanel->EraseMsgBox();
if( pt_texte->m_StructType == TYPECOTATION ) if( pt_texte->Type() == TYPECOTATION )
Affiche_1_Parametre( frame, 1, _( "COTATION" ), pt_texte->m_Text, DARKGREEN ); Affiche_1_Parametre( frame, 1, _( "COTATION" ), pt_texte->m_Text, DARKGREEN );
else else
...@@ -74,7 +74,7 @@ void Affiche_Infos_Piste( WinEDA_BasePcbFrame* frame, TRACK* pt_piste ) ...@@ -74,7 +74,7 @@ void Affiche_Infos_Piste( WinEDA_BasePcbFrame* frame, TRACK* pt_piste )
d_index = pt_piste->m_NetCode; d_index = pt_piste->m_NetCode;
pt_D_code = ReturnToolDescr( layer, d_index, &ii ); pt_D_code = ReturnToolDescr( layer, d_index, &ii );
switch( pt_piste->m_StructType ) switch( pt_piste->Type() )
{ {
case TYPETRACK: case TYPETRACK:
if( pt_piste->m_Shape < S_SPOT_CIRCLE ) if( pt_piste->m_Shape < S_SPOT_CIRCLE )
......
...@@ -62,7 +62,7 @@ TRACK* WinEDA_GerberFrame::Delete_Segment( wxDC* DC, TRACK* Track ) ...@@ -62,7 +62,7 @@ TRACK* WinEDA_GerberFrame::Delete_Segment( wxDC* DC, TRACK* Track )
g_CurrentTrackSegment = (TRACK*) g_CurrentTrackSegment->Pback; g_CurrentTrackSegment = (TRACK*) g_CurrentTrackSegment->Pback;
delete Track; g_TrackSegmentCount--; delete Track; g_TrackSegmentCount--;
if( g_TrackSegmentCount && (g_CurrentTrackSegment->m_StructType == TYPEVIA) ) if( g_TrackSegmentCount && (g_CurrentTrackSegment->Type() == TYPEVIA) )
{ {
Track = g_CurrentTrackSegment; Track = g_CurrentTrackSegment;
g_CurrentTrackSegment = (TRACK*) g_CurrentTrackSegment->Pback; g_CurrentTrackSegment = (TRACK*) g_CurrentTrackSegment->Pback;
......
...@@ -30,12 +30,12 @@ void WinEDA_GerberFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -30,12 +30,12 @@ void WinEDA_GerberFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{ {
if( DrawStruct && DrawStruct->m_Flags ) // Commande "POPUP" en cours if( DrawStruct && DrawStruct->m_Flags ) // Commande "POPUP" en cours
{ {
switch( DrawStruct->m_StructType ) switch( DrawStruct->Type() )
{ {
default: default:
msg.Printf( msg.Printf(
wxT( "WinEDA_GerberFrame::ProcessCommand err: Struct %d, m_Flags = %X" ), wxT( "WinEDA_GerberFrame::ProcessCommand err: Struct %d, m_Flags = %X" ),
(unsigned) DrawStruct->m_StructType, (unsigned) DrawStruct->Type(),
(unsigned) DrawStruct->m_Flags ); (unsigned) DrawStruct->m_Flags );
DisplayError( this, msg ); DisplayError( this, msg );
} }
...@@ -60,7 +60,7 @@ void WinEDA_GerberFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -60,7 +60,7 @@ void WinEDA_GerberFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
DrawStruct = GerberGeneralLocateAndDisplay(); DrawStruct = GerberGeneralLocateAndDisplay();
if( DrawStruct == NULL ) if( DrawStruct == NULL )
break; break;
if( DrawStruct->m_StructType == TYPETRACK ) if( DrawStruct->Type() == TYPETRACK )
{ {
Delete_Segment( DC, (TRACK*) DrawStruct ); Delete_Segment( DC, (TRACK*) DrawStruct );
GetScreen()->SetCurItem( NULL ); GetScreen()->SetCurItem( NULL );
...@@ -309,13 +309,13 @@ static void Process_Move_Item( WinEDA_GerberFrame* frame, ...@@ -309,13 +309,13 @@ static void Process_Move_Item( WinEDA_GerberFrame* frame,
frame->DrawPanel->MouseToCursorSchema(); frame->DrawPanel->MouseToCursorSchema();
switch( DrawStruct->m_StructType ) switch( DrawStruct->Type() )
{ {
default: default:
wxString msg; wxString msg;
msg.Printf( msg.Printf(
wxT( "WinEDA_LibeditFrame::Move_Item Error: Bad DrawType %d" ), wxT( "WinEDA_LibeditFrame::Move_Item Error: Bad DrawType %d" ),
DrawStruct->m_StructType ); DrawStruct->Type() );
DisplayError( frame, msg ); DisplayError( frame, msg );
break; break;
} }
...@@ -350,7 +350,7 @@ void WinEDA_GerberFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -350,7 +350,7 @@ void WinEDA_GerberFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
break; break;
// Element localis // Element localis
switch( DrawStruct->m_StructType ) switch( DrawStruct->Type() )
{ {
default: default:
break; break;
......
This diff is collapsed.
...@@ -115,7 +115,7 @@ void WinEDA_GerberFrame::Erase_Segments_Pcb( wxDC* DC, ...@@ -115,7 +115,7 @@ void WinEDA_GerberFrame::Erase_Segments_Pcb( wxDC* DC,
{ {
PtNext = PtStruct->Next(); PtNext = PtStruct->Next();
switch( PtStruct->m_StructType ) switch( PtStruct->Type() )
{ {
case TYPEDRAWSEGMENT: case TYPEDRAWSEGMENT:
case TYPETEXTE: case TYPETEXTE:
...@@ -179,7 +179,7 @@ void WinEDA_GerberFrame::Erase_Textes_Pcb( wxDC* DC, bool query ) ...@@ -179,7 +179,7 @@ void WinEDA_GerberFrame::Erase_Textes_Pcb( wxDC* DC, bool query )
for( ; PtStruct != NULL; PtStruct = PtNext ) for( ; PtStruct != NULL; PtStruct = PtNext )
{ {
PtNext = PtStruct->Next(); PtNext = PtStruct->Next();
if( PtStruct->m_StructType == TYPETEXTE ) if( PtStruct->Type() == TYPETEXTE )
DeleteStructure( PtStruct ); DeleteStructure( PtStruct );
} }
......
...@@ -57,7 +57,7 @@ EDA_BaseStruct* WinEDA_GerberFrame::Locate( int typeloc ) ...@@ -57,7 +57,7 @@ EDA_BaseStruct* WinEDA_GerberFrame::Locate( int typeloc )
while( ( TrackLocate = Locate_Pistes( TrackLocate, layer, typeloc ) ) != NULL ) while( ( TrackLocate = Locate_Pistes( TrackLocate, layer, typeloc ) ) != NULL )
{ {
Track = TrackLocate; Track = TrackLocate;
if( TrackLocate->m_StructType == TYPEVIA ) if( TrackLocate->Type() == TYPEVIA )
break; break;
TrackLocate = (TRACK*) TrackLocate->Pnext; TrackLocate = (TRACK*) TrackLocate->Pnext;
} }
...@@ -112,7 +112,7 @@ DRAWSEGMENT* Locate_Segment_Pcb( BOARD* Pcb, int typeloc ) ...@@ -112,7 +112,7 @@ DRAWSEGMENT* Locate_Segment_Pcb( BOARD* Pcb, int typeloc )
PtStruct = Pcb->m_Drawings; PtStruct = Pcb->m_Drawings;
for( ; PtStruct != NULL; PtStruct = PtStruct->Next() ) for( ; PtStruct != NULL; PtStruct = PtStruct->Next() )
{ {
if( PtStruct->m_StructType != TYPEDRAWSEGMENT ) if( PtStruct->Type() != TYPEDRAWSEGMENT )
continue; continue;
pts = (DRAWSEGMENT*) PtStruct; pts = (DRAWSEGMENT*) PtStruct;
ux0 = pts->m_Start.x; uy0 = pts->m_Start.y; ux0 = pts->m_Start.x; uy0 = pts->m_Start.y;
...@@ -198,7 +198,7 @@ TRACK* Locate_Pistes( TRACK* start_adresse, wxPoint ref, int Layer ) ...@@ -198,7 +198,7 @@ TRACK* Locate_Pistes( TRACK* start_adresse, wxPoint ref, int Layer )
dx -= ux0; dy -= uy0; dx -= ux0; dy -= uy0;
spot_cX = ref.x - ux0; spot_cY = ref.y - uy0; spot_cX = ref.x - ux0; spot_cY = ref.y - uy0;
if( Track->m_StructType == TYPEVIA ) /* VIA rencontree */ if( Track->Type() == TYPEVIA ) /* VIA rencontree */
{ {
if( (abs( spot_cX ) <= l_piste ) && (abs( spot_cY ) <=l_piste) ) if( (abs( spot_cX ) <= l_piste ) && (abs( spot_cY ) <=l_piste) )
{ {
...@@ -289,7 +289,7 @@ TEXTE_PCB* Locate_Texte_Pcb( TEXTE_PCB* pt_txt_pcb, int typeloc ) ...@@ -289,7 +289,7 @@ TEXTE_PCB* Locate_Texte_Pcb( TEXTE_PCB* pt_txt_pcb, int typeloc )
PtStruct = (EDA_BaseStruct*) pt_txt_pcb; PtStruct = (EDA_BaseStruct*) pt_txt_pcb;
for( ; PtStruct != NULL; PtStruct = PtStruct->Pnext ) for( ; PtStruct != NULL; PtStruct = PtStruct->Pnext )
{ {
if( PtStruct->m_StructType != TYPETEXTE ) if( PtStruct->Type() != TYPETEXTE )
continue; continue;
pt_txt_pcb = (TEXTE_PCB*) PtStruct; pt_txt_pcb = (TEXTE_PCB*) PtStruct;
......
...@@ -71,7 +71,7 @@ void WinEDA_GerberFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ...@@ -71,7 +71,7 @@ void WinEDA_GerberFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu
GetScreen()->SetCurItem( DrawStruct ); GetScreen()->SetCurItem( DrawStruct );
switch( DrawStruct->m_StructType ) switch( DrawStruct->Type() )
{ {
case TYPETRACK: case TYPETRACK:
...@@ -84,7 +84,7 @@ void WinEDA_GerberFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ...@@ -84,7 +84,7 @@ void WinEDA_GerberFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu
default: default:
msg.Printf( msg.Printf(
wxT( "WinEDA_GerberFrame::OnRightClick Error: illegal or unknown DrawType %d" ), wxT( "WinEDA_GerberFrame::OnRightClick Error: illegal or unknown DrawType %d" ),
DrawStruct->m_StructType ); DrawStruct->Type() );
DisplayError( this, msg ); DisplayError( this, msg );
break; break;
} }
......
...@@ -8,7 +8,7 @@ int * InstallDialogLayerPairChoice(WinEDA_GerberFrame * parent); ...@@ -8,7 +8,7 @@ int * InstallDialogLayerPairChoice(WinEDA_GerberFrame * parent);
/****************/ /****************/
/* undelete.cpp */ /* undelete.cpp */
/****************/ /****************/
EDA_BaseStruct * SaveItemEfface(EDA_BaseStruct * PtItem, int nbitems); BOARD_ITEM* SaveItemEfface( BOARD_ITEM* PtItem, int nbitems );
/***********/ /***********/
......
...@@ -28,7 +28,7 @@ wxString msg; ...@@ -28,7 +28,7 @@ wxString msg;
PtNext = PtStruct->Pnext; PtNext = PtStruct->Pnext;
PtBack = PtStruct->Pback; PtBack = PtStruct->Pback;
switch( PtStruct->m_StructType ) switch( PtStruct->Type() )
{ {
case TYPE_NOT_INIT: case TYPE_NOT_INIT:
DisplayError(NULL, wxT("DeleteStruct: Type NOT_INIT")); DisplayError(NULL, wxT("DeleteStruct: Type NOT_INIT"));
...@@ -69,7 +69,7 @@ wxString msg; ...@@ -69,7 +69,7 @@ wxString msg;
case TYPEPCB: case TYPEPCB:
default: default:
msg.Printf( wxT("DeleteStructure: unexpected %d type"), msg.Printf( wxT("DeleteStructure: unexpected %d type"),
PtStruct->m_StructType); PtStruct->Type());
DisplayError(NULL, msg); DisplayError(NULL, msg);
break; break;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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