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,
/*************************************/
Pcb3D_GLCanvas::~Pcb3D_GLCanvas( void )
Pcb3D_GLCanvas::~Pcb3D_GLCanvas()
/*************************************/
{
ClearLists();
......@@ -88,7 +88,7 @@ Pcb3D_GLCanvas::~Pcb3D_GLCanvas( void )
/*************************************/
void Pcb3D_GLCanvas::ClearLists( void )
void Pcb3D_GLCanvas::ClearLists()
/*************************************/
{
if( m_gllist > 0 )
......@@ -448,7 +448,7 @@ void Pcb3D_GLCanvas::OnPopUpMenu( wxCommandEvent& event )
/***************************************/
void Pcb3D_GLCanvas::DisplayStatus( void )
void Pcb3D_GLCanvas::DisplayStatus()
/***************************************/
{
wxString msg;
......@@ -573,7 +573,7 @@ void Pcb3D_GLCanvas::InitGL()
/***********************************/
void Pcb3D_GLCanvas::SetLights( void )
void Pcb3D_GLCanvas::SetLights()
/***********************************/
/* Init sources lumineuses pour OPENGL
......
......@@ -168,7 +168,7 @@ glEnable(GL_FOG);
/* Trac des pistes : */
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);
else Draw3D_Track( pt_piste);
}
......@@ -178,7 +178,7 @@ EDA_BaseStruct * PtStruct;
for ( PtStruct = pcb->m_Drawings; PtStruct != NULL; PtStruct = PtStruct->Pnext)
{
#define STRUCT ((DRAWSEGMENT *) PtStruct)
if( PtStruct->m_StructType != TYPEDRAWSEGMENT ) continue;
if( PtStruct->Type() != TYPEDRAWSEGMENT ) continue;
Draw3D_DrawSegment(STRUCT);
}
......@@ -358,7 +358,7 @@ bool As3dShape = FALSE;
glNormal3f( 0.0, 0.0, 1.0); // Normal is Z axis
for( ;Struct != NULL; Struct = Struct->Pnext )
{
switch( Struct->m_StructType )
switch( Struct->Type() )
{
case TYPETEXTEMODULE:
break;
......
......@@ -97,7 +97,7 @@ public:
void OnEnterWindow( wxMouseEvent& event );
void Render( void );
void Render();
GLuint CreateDrawGL_List(void);
void InitGL(void);
void SetLights(void);
......
......@@ -4,6 +4,19 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
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>
================================================================================
+ pcbnew
......
......@@ -16,7 +16,8 @@
/*******************************************************/
/* 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 */
m_Type = idscreen;
......@@ -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 )
......@@ -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 */
......@@ -121,7 +122,7 @@ wxPoint BASE_SCREEN::CursorRealPosition( const wxPoint& ScreenPos )
/***************************************/
int BASE_SCREEN::GetInternalUnits( void )
int BASE_SCREEN::GetInternalUnits()
/***************************************/
{
switch( m_Type )
......@@ -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
......@@ -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*/
{
......@@ -208,7 +209,7 @@ void BASE_SCREEN::SetFirstZoom( void )
/****************************/
int BASE_SCREEN::GetZoom( void )
int BASE_SCREEN::GetZoom()
/****************************/
/* retourne le coeff de zoom */
{
......@@ -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
......@@ -249,7 +250,7 @@ void BASE_SCREEN::SetNextZoom( void )
/*************************************/
void BASE_SCREEN::SetPreviousZoom( void )
void BASE_SCREEN::SetPreviousZoom()
/*************************************/
/* Selectionne le precedent coeff de zoom
......@@ -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
......@@ -326,7 +327,7 @@ void BASE_SCREEN::SetGrid( const wxSize& size )
/*********************************/
wxSize BASE_SCREEN::GetGrid( void )
wxSize BASE_SCREEN::GetGrid()
/*********************************/
{
wxSize grid = m_Grid;
......@@ -351,7 +352,7 @@ wxSize BASE_SCREEN::GetGrid( void )
/*********************************/
void BASE_SCREEN::SetNextGrid( void )
void BASE_SCREEN::SetNextGrid()
/*********************************/
/* Selectionne la prochaine grille
......@@ -376,7 +377,7 @@ void BASE_SCREEN::SetNextGrid( void )
/*************************************/
void BASE_SCREEN::SetPreviousGrid( void )
void BASE_SCREEN::SetPreviousGrid()
/*************************************/
/* Selectionne le precedent coeff de grille
......@@ -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
......@@ -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
......@@ -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
......@@ -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;
......@@ -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;
......
......@@ -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;
......@@ -151,7 +151,7 @@ void EDA_BaseStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& off
msg.Printf( wxT(
"EDA_BaseStruct::Draw() error. Method for struct type %d used but not implemented (" ),
m_StructType );
Type() );
msg += ReturnClassName() + wxT( ")\n" );
printf( CONV_TO_UTF8( msg ) );
}
......@@ -175,10 +175,10 @@ wxString EDA_BaseStruct::ReturnClassName() const
/*********************************************/
/* 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;
if( (ii < 0) || (ii > MAX_STRUCT_TYPE_ID) )
......@@ -218,7 +218,7 @@ SEARCH_RESULT EDA_BaseStruct::Visit( INSPECTOR* inspector, const void* testData,
for( const KICAD_T* p = scanTypes; (stype=*p) != EOT; ++p )
{
// If caller wants to inspect my type
if( stype == m_StructType )
if( stype == Type() )
{
if( SEARCH_QUIT == inspector->Inspect( this, testData ) )
return SEARCH_QUIT;
......@@ -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 */
{
......@@ -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
......@@ -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
......@@ -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..)
......@@ -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
......@@ -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
......
......@@ -17,7 +17,7 @@
/*******************/
/****************************************************************************/
DrawBlockStruct::DrawBlockStruct( void ) :
DrawBlockStruct::DrawBlockStruct() :
EDA_BaseStruct( BLOCK_LOCATE_STRUCT_TYPE )
, EDA_Rect()
/****************************************************************************/
......@@ -30,7 +30,7 @@ DrawBlockStruct::DrawBlockStruct( void ) :
/****************************************/
DrawBlockStruct::~DrawBlockStruct( void )
DrawBlockStruct::~DrawBlockStruct()
/****************************************/
{
}
......@@ -219,7 +219,7 @@ void AbortBlockCurrentCommand( WinEDA_DrawPanel* Panel, wxDC* DC )
if( (screen->BlockLocate.m_Command != BLOCK_PASTE)
&& 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;
PickedList = (DrawPickedStruct*) screen->BlockLocate.m_BlockDrawStruct;
......
......@@ -14,7 +14,7 @@
#include "build_version.h"
/*****************************/
wxString GetBuildVersion( void )
wxString GetBuildVersion()
/*****************************/
/* Return the build date
......@@ -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"
......@@ -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 )
/************************************/
void WinEDAListBox:: SortList( void )
void WinEDAListBox:: SortList()
/************************************/
{
int ii, NbItems = m_List->GetCount();
......
......@@ -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>) */
......@@ -536,7 +536,7 @@ void SetRealLibraryPath( const wxString& shortlibname )
/***********************************/
wxString ReturnKicadDatasPath( void )
wxString ReturnKicadDatasPath()
/***********************************/
/* Retourne le chemin des donnees communes de kicad.
......@@ -605,7 +605,7 @@ wxString ReturnKicadDatasPath( void )
/***************************/
wxString GetEditorName( void )
wxString GetEditorName()
/***************************/
/* Return the prefered editor name
......
......@@ -27,7 +27,7 @@ using namespace boost::python;
/* 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 )
{
......
......@@ -58,7 +58,7 @@ wxString msg;
PtStruct = (EDA_BaseStruct *) GenericStructure;
if( PtStruct == NULL) return ;
typestruct = (int)PtStruct->m_StructType;
typestruct = (int)PtStruct->Type();
IsDeleted = PtStruct->GetState(DELETED);
PtNext = PtStruct->Pnext;
......@@ -167,7 +167,7 @@ wxString msg;
default:
msg.Printf( wxT(" DeleteStructure: Type %d Inattendu"),
PtStruct->m_StructType);
PtStruct->Type());
DisplayError(NULL, msg);
break;
}
......
......@@ -132,7 +132,7 @@ void LibEDA_BaseStruct::Display_Infos_DrawEntry( WinEDA_DrawFrame* frame )
/* affichage du type */
msg = wxT( "??" );
switch( m_StructType )
switch( Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
msg = wxT( "Arc" ); break;
......
......@@ -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
when a true component reannotation is not necessary
......@@ -48,7 +48,7 @@ In order to avoid conflicts the ref number start with a 0:
EDA_BaseStruct *DrawList = screen->EEDrawList;
for ( ; DrawList != NULL ; DrawList = DrawList->Pnext )
{
if ( DrawList->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE )
if ( DrawList->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
continue;
EDA_SchComponentStruct * DrawLibItem = (EDA_SchComponentStruct *) DrawList;
EDA_LibComponentStruct * Entry =
......@@ -194,7 +194,7 @@ EDA_SchComponentStruct *DrawLibItem;
EDA_BaseStruct *DrawList = screen->EEDrawList;
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->ClearAnnotation();
......@@ -224,7 +224,7 @@ EDA_LibComponentStruct *Entry;
while ( DrawList )
{
switch( DrawList->m_StructType )
switch( DrawList->Type() )
{
case DRAW_SEGMENT_STRUCT_TYPE :
case DRAW_JUNCTION_STRUCT_TYPE :
......
This diff is collapsed.
......@@ -81,7 +81,7 @@ int MarkItemsInBloc( EDA_LibComponentStruct* LibComponent,
ItemIsInOtherConvert = TRUE;
if( ItemIsInOtherPart || ItemIsInOtherConvert )
{
if( item->m_StructType == COMPONENT_PIN_DRAW_TYPE )
if( item->Type() == COMPONENT_PIN_DRAW_TYPE )
{ // Specific rules for pins:
if( g_EditPinByPinIsOn )
continue;
......@@ -94,7 +94,7 @@ int MarkItemsInBloc( EDA_LibComponentStruct* LibComponent,
continue;
}
switch( item->m_StructType )
switch( item->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
{
......@@ -545,7 +545,7 @@ void MoveMarkedItems( EDA_LibComponentStruct* LibEntry, wxPoint offset )
if( item->m_Selected == 0 )
continue;
switch( item->m_StructType )
switch( item->Type() )
{
case COMPONENT_PIN_DRAW_TYPE:
( (LibDrawPin*) item )->m_Pos.x += offset.x;
......@@ -647,7 +647,7 @@ void MirrorMarkedItems( EDA_LibComponentStruct* LibEntry, wxPoint offset )
if( item->m_Selected == 0 )
continue;
switch( item->m_StructType )
switch( item->Type() )
{
case COMPONENT_PIN_DRAW_TYPE:
SETMIRROR( ( (LibDrawPin*) item )->m_Pos.x );
......
......@@ -45,7 +45,7 @@ EDA_BaseStruct* SCH_SCREEN::ExtractWires( bool CreateCopy )
{
next_item = item->Pnext;
switch( item->m_StructType )
switch( item->Type() )
{
case DRAW_JUNCTION_STRUCT_TYPE:
case DRAW_SEGMENT_STRUCT_TYPE:
......@@ -54,7 +54,7 @@ EDA_BaseStruct* SCH_SCREEN::ExtractWires( bool CreateCopy )
List = item;
if( CreateCopy )
{
if( item->m_StructType == DRAW_JUNCTION_STRUCT_TYPE )
if( item->Type() == DRAW_JUNCTION_STRUCT_TYPE )
new_item = ( (DrawJunctionStruct*) item )->GenCopy();
else
new_item = ( (EDA_DrawLineStruct*) item )->GenCopy();
......@@ -85,7 +85,7 @@ static void RestoreOldWires( SCH_SCREEN* screen )
{
next_item = item->Pnext;
switch( item->m_StructType )
switch( item->Type() )
{
case DRAW_JUNCTION_STRUCT_TYPE:
case DRAW_SEGMENT_STRUCT_TYPE:
......@@ -123,7 +123,7 @@ void WinEDA_SchematicFrame::BeginSegment( wxDC* DC, int type )
if( GetScreen()->GetCurItem() )
{
switch( GetScreen()->GetCurItem()->m_StructType )
switch( GetScreen()->GetCurItem()->Type() )
{
case DRAW_SEGMENT_STRUCT_TYPE:
case DRAW_POLYLINE_STRUCT_TYPE:
......@@ -337,7 +337,7 @@ void WinEDA_SchematicFrame::EndSegment( wxDC* DC )
EDA_BaseStruct* item = GetScreen()->EEDrawList;
while( item )
{
switch( item->m_StructType )
switch( item->Type() )
{
case DRAW_JUNCTION_STRUCT_TYPE:
case DRAW_SEGMENT_STRUCT_TYPE:
......@@ -510,7 +510,7 @@ void WinEDA_SchematicFrame::DeleteCurrentSegment( wxDC* DC )
}
/* 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 */
}
......@@ -622,7 +622,7 @@ void WinEDA_SchematicFrame::RepeatDrawItem( wxDC* DC )
if( g_ItemToRepeat == NULL )
return;
switch( g_ItemToRepeat->m_StructType )
switch( g_ItemToRepeat->Type() )
{
case DRAW_JUNCTION_STRUCT_TYPE:
#undef STRUCT
......@@ -825,7 +825,7 @@ static bool IsTerminalPoint( SCH_SCREEN* screen, const wxPoint& pos, int layer )
return TRUE;
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.y == pos.y ) )
return TRUE;
......
......@@ -137,7 +137,7 @@ void WinEDA_SchematicFrame::SetBusEntryShape( wxDC* DC,
if( BusEntry == NULL )
return;
if( BusEntry->m_StructType != DRAW_BUSENTRY_STRUCT_TYPE )
if( BusEntry->Type() != DRAW_BUSENTRY_STRUCT_TYPE )
{
DisplayError( this, wxT( "SetBusEntryType: Bad StructType" ) );
return;
......
......@@ -34,7 +34,7 @@
/***********************************************************/
DrawSheetStruct::DrawSheetStruct( const wxPoint& pos ) :
SCH_SCREEN( SCHEMATIC_FRAME )
SCH_SCREEN( DRAW_SHEET_STRUCT_TYPE )
/***********************************************************/
{
m_Label = NULL;
......@@ -42,8 +42,6 @@ DrawSheetStruct::DrawSheetStruct( const wxPoint& pos ) :
m_Layer = LAYER_SHEET;
m_Pos = pos;
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()
/***********************************************/
DrawSheetStruct* DrawSheetStruct::GenCopy( void )
DrawSheetStruct* DrawSheetStruct::GenCopy()
/***********************************************/
/* creates a copy of a sheet
......@@ -226,7 +224,7 @@ DrawSheetLabelStruct::DrawSheetLabelStruct( DrawSheetStruct* parent,
/***********************************************************/
DrawSheetLabelStruct* DrawSheetLabelStruct::GenCopy( void )
DrawSheetLabelStruct* DrawSheetLabelStruct::GenCopy()
/***********************************************************/
{
DrawSheetLabelStruct* newitem =
......
......@@ -17,7 +17,7 @@
void SetStructFather( EDA_BaseStruct* Struct, BASE_SCREEN* Screen )
/******************************************************************/
{
switch( Struct->m_StructType )
switch( Struct->Type() )
{
case DRAW_POLYLINE_STRUCT_TYPE:
case DRAW_JUNCTION_STRUCT_TYPE:
......@@ -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 */
/* 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 */
m_Zoom = 32;
......@@ -94,7 +95,7 @@ SCH_SCREEN::SCH_SCREEN( int screentype ) : BASE_SCREEN( screentype )
/****************************/
SCH_SCREEN::~SCH_SCREEN( void )
SCH_SCREEN::~SCH_SCREEN()
/****************************/
{
ClearUndoRedoList();
......@@ -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.
......@@ -187,7 +188,7 @@ EDA_ScreenList::~EDA_ScreenList()
/*****************************************/
SCH_SCREEN* EDA_ScreenList::GetFirst( void )
SCH_SCREEN* EDA_ScreenList::GetFirst()
/*****************************************/
{
m_Index = 0;
......@@ -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 )
......@@ -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
......@@ -285,7 +286,7 @@ SCH_SCREEN** EDA_ScreenList::BuildScreenList( SCH_SCREEN** ScreenList,
CurrStruct = DrawStruct;
while( CurrStruct )
{
if( CurrStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE )
if( CurrStruct->Type() == DRAW_SHEET_STRUCT_TYPE )
{
HasSubhierarchy = TRUE;
if( ScreenList )
......@@ -306,7 +307,7 @@ SCH_SCREEN** EDA_ScreenList::BuildScreenList( SCH_SCREEN** ScreenList,
CurrStruct = DrawStruct;
while( CurrStruct )
{
if( CurrStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE )
if( CurrStruct->Type() == DRAW_SHEET_STRUCT_TYPE )
{
SCH_SCREEN* Screen = (SCH_SCREEN*) CurrStruct;
......
......@@ -88,10 +88,10 @@ class DrawSheetStruct;
class SCH_SCREEN : public BASE_SCREEN
{
public:
SCH_SCREEN( int idtype );
SCH_SCREEN( int idtype, KICAD_T aType = SCREEN_STRUCT_TYPE );
~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 RemoveFromDrawList( EDA_BaseStruct* DrawStruct );/* remove DrawStruct from EEDrawList. */
......@@ -101,7 +101,7 @@ public:
EDA_BaseStruct* ExtractWires( bool CreateCopy );
/* full undo redo management : */
virtual void ClearUndoRedoList( void );
virtual void ClearUndoRedoList();
virtual void AddItemToUndoList( EDA_BaseStruct* item );
virtual void AddItemToRedoList( EDA_BaseStruct* item );
};
......@@ -119,10 +119,10 @@ public:
const wxPoint& pos = wxPoint( 0, 0 ),
const wxString& text = wxEmptyString );
~DrawSheetLabelStruct( void ) { }
DrawSheetLabelStruct* GenCopy( void );
~DrawSheetLabelStruct() { }
DrawSheetLabelStruct* GenCopy();
DrawSheetLabelStruct* Next( void )
DrawSheetLabelStruct* Next()
{ return (DrawSheetLabelStruct*) Pnext; }
void Place( WinEDA_DrawFrame* frame, wxDC* DC );
......@@ -147,9 +147,9 @@ public:
public:
DrawSheetStruct( const wxPoint& pos = wxPoint( 0, 0 ) );
~DrawSheetStruct( void );
~DrawSheetStruct();
void Place( WinEDA_DrawFrame* frame, wxDC* DC );
DrawSheetStruct* GenCopy( void );
DrawSheetStruct* GenCopy();
void Display_Infos( WinEDA_DrawFrame* frame );
void CleanupSheet( WinEDA_SchematicFrame* frame, wxDC* DC );
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
......@@ -169,11 +169,11 @@ private:
public:
EDA_ScreenList( EDA_BaseStruct* DrawStruct );
~EDA_ScreenList();
int GetCount( void ) { return m_Count; }
SCH_SCREEN* GetFirst( void );
SCH_SCREEN* GetNext( void );
int GetCount() { return m_Count; }
SCH_SCREEN* GetFirst();
SCH_SCREEN* GetNext();
SCH_SCREEN* GetScreen( int index );
void UpdateSheetNumberAndDate( void );
void UpdateSheetNumberAndDate();
private:
SCH_SCREEN** BuildScreenList( SCH_SCREEN** ScreenList,
......
This diff is collapsed.
......@@ -35,12 +35,12 @@ bool Modify = FALSE;
DrawList = EEDrawList;
for ( ;DrawList != NULL; DrawList = DrawList->Pnext )
{
if( DrawList->m_StructType == DRAW_SEGMENT_STRUCT_TYPE )
if( DrawList->Type() == DRAW_SEGMENT_STRUCT_TYPE )
{
TstDrawList = DrawList->Pnext;
while ( TstDrawList )
{
if( TstDrawList->m_StructType == DRAW_SEGMENT_STRUCT_TYPE )
if( TstDrawList->Type() == DRAW_SEGMENT_STRUCT_TYPE )
{
flag = TstAlignSegment( (EDA_DrawLineStruct*)DrawList,
(EDA_DrawLineStruct*)TstDrawList);
......@@ -82,7 +82,7 @@ EDA_BaseStruct *DrawList;
DrawList = Screen->EEDrawList;
while ( DrawList )
{
switch( DrawList->m_StructType )
switch( DrawList->Type() )
{
case DRAW_JUNCTION_STRUCT_TYPE :
#undef STRUCT
......@@ -136,7 +136,7 @@ DrawPickedStruct * List = NULL;
DrawList = screen->EEDrawList;
while ( DrawList )
{
switch( DrawList->m_StructType )
switch( DrawList->Type() )
{
case DRAW_SEGMENT_STRUCT_TYPE :
segment = (EDA_DrawLineStruct*)DrawList;
......
......@@ -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
......@@ -47,7 +47,7 @@ wxPoint DrawBusEntryStruct::m_End( void )
/***************************************************/
DrawBusEntryStruct* DrawBusEntryStruct::GenCopy( void )
DrawBusEntryStruct* DrawBusEntryStruct::GenCopy()
/***************************************************/
{
DrawBusEntryStruct* newitem = new DrawBusEntryStruct( m_Pos, 0, 0 );
......@@ -75,7 +75,7 @@ DrawJunctionStruct::DrawJunctionStruct( const wxPoint& pos ) :
}
DrawJunctionStruct* DrawJunctionStruct::GenCopy( void )
DrawJunctionStruct* DrawJunctionStruct::GenCopy()
{
DrawJunctionStruct* newitem = new DrawJunctionStruct( m_Pos );
......@@ -97,7 +97,7 @@ DrawNoConnectStruct::DrawNoConnectStruct( const wxPoint& pos ) :
}
DrawNoConnectStruct* DrawNoConnectStruct::GenCopy( void )
DrawNoConnectStruct* DrawNoConnectStruct::GenCopy()
{
DrawNoConnectStruct* newitem = new DrawNoConnectStruct( m_Pos );
......@@ -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 );
......@@ -137,7 +137,7 @@ DrawMarkerStruct* DrawMarkerStruct::GenCopy( void )
}
wxString DrawMarkerStruct::GetComment( void )
wxString DrawMarkerStruct::GetComment()
{
return m_Comment;
}
......@@ -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 );
......@@ -234,7 +234,7 @@ DrawPolylineStruct::DrawPolylineStruct( int layer ) :
/********************************************/
DrawPolylineStruct::~DrawPolylineStruct( void )
DrawPolylineStruct::~DrawPolylineStruct()
/*********************************************/
{
if( m_Points )
......@@ -243,7 +243,7 @@ DrawPolylineStruct::~DrawPolylineStruct( void )
/*****************************************************/
DrawPolylineStruct* DrawPolylineStruct::GenCopy( void )
DrawPolylineStruct* DrawPolylineStruct::GenCopy()
/*****************************************************/
{
int memsize;
......
......@@ -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);
......@@ -203,7 +203,7 @@ void EDA_SchComponentStruct::Place(WinEDA_DrawFrame * frame, wxDC * DC)
{
/* save old text in undo list */
if ( g_ItemToUndoCopy &&
(g_ItemToUndoCopy->m_StructType == m_StructType) &&
(g_ItemToUndoCopy->Type() == Type()) &&
((m_Flags & IS_NEW) == 0) )
{
/* restore old values and save new ones */
......
......@@ -95,7 +95,7 @@ public:
wxPoint GetScreenCoord(const wxPoint & coord);
void Display_Infos(WinEDA_DrawFrame * frame);
void ClearAnnotation(void);
EDA_Rect GetBoundaryBox( void );
EDA_Rect GetBoundaryBox();
wxString ReturnFieldName(int FieldNumber);
virtual void Draw(WinEDA_DrawPanel * panel, wxDC * DC, const wxPoint & offset, int draw_mode, int Color = -1);
......
......@@ -87,7 +87,7 @@ SchematicGeneralLocateAndDisplay( bool IncludePin )
return NULL;
/* Cross probing to pcbnew if a pin or a component is found */
switch( DrawStruct->m_StructType )
switch( DrawStruct->Type() )
{
case COMPONENT_FIELD_DRAW_TYPE:
{
......
......@@ -106,7 +106,7 @@ void WinEDA_SchematicFrame::TestDanglingEnds( EDA_BaseStruct* DrawList, wxDC* DC
// Controle des elements
for( DrawItem = DrawList; DrawItem != NULL; DrawItem = DrawItem->Pnext )
{
switch( DrawItem->m_StructType )
switch( DrawItem->Type() )
{
case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
case DRAW_LABEL_STRUCT_TYPE:
......@@ -310,7 +310,7 @@ DanglingEndHandle* RebuildEndList( EDA_BaseStruct* DrawList )
for( DrawItem = DrawList; DrawItem != NULL; DrawItem = DrawItem->Pnext )
{
switch( DrawItem->m_StructType )
switch( DrawItem->Type() )
{
case DRAW_LABEL_STRUCT_TYPE:
break;
......@@ -402,7 +402,7 @@ DanglingEndHandle* RebuildEndList( EDA_BaseStruct* DrawList )
LibEDA_BaseStruct* DrawLibItem = Entry->m_Drawings;
for( ; DrawLibItem != NULL; DrawLibItem = DrawLibItem->Next() )
{
if( DrawLibItem->m_StructType != COMPONENT_PIN_DRAW_TYPE )
if( DrawLibItem->Type() != COMPONENT_PIN_DRAW_TYPE )
continue;
LibDrawPin* Pin = (LibDrawPin*) DrawLibItem;
......
......@@ -36,7 +36,7 @@ int count = 0;
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)
if ( (JUNCTION->m_Pos.x == pos.x) && (JUNCTION->m_Pos.y == pos.y) )
......@@ -44,7 +44,7 @@ int count = 0;
#undef JUNCTION
}
if ( Struct->m_StructType != DRAW_SEGMENT_STRUCT_TYPE ) continue;
if ( Struct->Type() != DRAW_SEGMENT_STRUCT_TYPE ) continue;
#define SEGM ((EDA_DrawLineStruct*)Struct)
if ( SEGM->IsOneEndPointAt(pos) ) count++;
#undef SEGM
......@@ -68,7 +68,7 @@ EDA_BaseStruct * Struct;
for ( Struct = ListStruct; Struct != NULL; Struct = Struct->Pnext)
{
if ( Struct->m_Flags ) continue;
if ( Struct->m_StructType == DRAW_JUNCTION_STRUCT_TYPE )
if ( Struct->Type() == DRAW_JUNCTION_STRUCT_TYPE )
{
#define JUNCTION ((DrawJunctionStruct*)Struct)
if ( segment->IsOneEndPointAt(JUNCTION->m_Pos) ) Struct->m_Flags |= CANDIDATE;
......@@ -76,7 +76,7 @@ EDA_BaseStruct * Struct;
#undef JUNCTION
}
if ( Struct->m_StructType != DRAW_SEGMENT_STRUCT_TYPE ) continue;
if ( Struct->Type() != DRAW_SEGMENT_STRUCT_TYPE ) continue;
#define SEGM ((EDA_DrawLineStruct*)Struct)
if ( segment->IsOneEndPointAt(SEGM->m_Start) )
......@@ -142,7 +142,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL;
{
if ( ! (DelStruct->m_Flags & SELECTEDNODE) ) continue;
#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);
#undef SEGM
}
......@@ -154,7 +154,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL;
if ( DelStruct->m_Flags & STRUCT_DELETED ) 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;
#define SEGM ((EDA_DrawLineStruct*)DelStruct)
/* Test the SEGM->m_Start point: if this point was connected to an STRUCT_DELETED wire,
......@@ -163,7 +163,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL;
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_StructType != DRAW_SEGMENT_STRUCT_TYPE ) continue;
if ( removed_struct->Type() != DRAW_SEGMENT_STRUCT_TYPE ) continue;
#define WIRE ((EDA_DrawLineStruct*)removed_struct)
if ( WIRE->IsOneEndPointAt(SEGM->m_Start) ) break;
}
......@@ -175,7 +175,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL;
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_StructType != DRAW_SEGMENT_STRUCT_TYPE ) continue;
if ( removed_struct->Type() != DRAW_SEGMENT_STRUCT_TYPE ) continue;
if ( WIRE->IsOneEndPointAt(SEGM->m_End) ) break;
}
if ( removed_struct && ! CountConnectedItems(this, GetScreen()->EEDrawList, SEGM->m_End, TRUE) )
......@@ -200,7 +200,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL;
int count;
if ( DelStruct->m_Flags & STRUCT_DELETED ) 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)
count = CountConnectedItems(this, GetScreen()->EEDrawList, JUNCTION->m_Pos, FALSE);
......@@ -221,7 +221,7 @@ DrawPickedStruct * PickedItem, *PickedList = NULL;
for ( DelStruct = GetScreen()->EEDrawList; DelStruct != NULL; DelStruct = DelStruct->Pnext)
{
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;
EDA_BaseStruct * TstStruct =
PickStruct(GetScreen()->m_Curseur, GetScreen()->EEDrawList,WIREITEM|BUSITEM);
......@@ -328,13 +328,13 @@ DrawSheetLabelStruct* SheetLabel, *NextLabel;
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
accessible par la liste globale directement */
DrawList = Screen->EEDrawList;
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 */
SheetLabel = ((DrawSheetStruct *) DrawList)->m_Label;
if (SheetLabel == NULL) continue;
......@@ -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;
while (PickedList)
......@@ -429,7 +429,7 @@ DrawMarkerStruct * Marker;
for ( DrawStruct = screen->EEDrawList; DrawStruct != NULL; DrawStruct = NextStruct)
{
NextStruct = DrawStruct->Pnext;
if(DrawStruct->m_StructType != DRAW_MARKER_STRUCT_TYPE ) continue;
if(DrawStruct->Type() != DRAW_MARKER_STRUCT_TYPE ) continue;
/* Marqueur trouve */
Marker = (DrawMarkerStruct * ) DrawStruct;
if( Marker->m_Type != type ) continue;
......
......@@ -29,7 +29,7 @@ wxString msg;
if( FirstSheet == NULL ) return;
if( FirstSheet->m_StructType != DRAW_SHEET_STRUCT_TYPE)
if( FirstSheet->Type() != DRAW_SHEET_STRUCT_TYPE)
{
DisplayError(NULL,
wxT("DeleteSubHierarchy error(): NOT a Sheet"));
......@@ -54,7 +54,7 @@ wxString msg;
{
DrawStruct = EEDrawList;
EEDrawList = EEDrawList->Pnext;
if( DrawStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE)
if( DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE)
{
DeleteSubHierarchy((DrawSheetStruct *) DrawStruct, confirm_deletion);
}
......@@ -76,7 +76,7 @@ EDA_BaseStruct *DrawStruct;
DrawStruct = DrawList;
DrawList = DrawList->Pnext;
if( DrawStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE)
if( DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE)
{
DeleteSubHierarchy((DrawSheetStruct*) DrawStruct, confirm_deletion);
}
......
......@@ -641,7 +641,7 @@ BASE_SCREEN * screen;
DrawList = screen->EEDrawList;
while ( DrawList )
{
switch( DrawList->m_StructType )
switch( DrawList->Type() )
{
case DRAW_LIB_ITEM_STRUCT_TYPE :
......@@ -685,7 +685,7 @@ BASE_SCREEN * screen;
DrawList = screen->EEDrawList;
while ( DrawList )
{
switch( DrawList->m_StructType )
switch( DrawList->Type() )
{
case DRAW_GLOBAL_LABEL_STRUCT_TYPE :
ItemCount++;
......@@ -981,7 +981,7 @@ wxString msg;
DrawList = List[ii];
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;
if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue;
......@@ -1004,7 +1004,7 @@ wxString msg;
{
DrawSheetStruct * sheet = (DrawSheetStruct *)(DrawLibItem->m_Parent);
wxString sheetname;
if( sheet && sheet->m_StructType == DRAW_SHEET_STRUCT_TYPE )
if( sheet && sheet->Type() == DRAW_SHEET_STRUCT_TYPE )
sheetname = sheet->m_SheetName;
else sheetname = _("Root");
if ( CompactForm )
......@@ -1047,7 +1047,7 @@ wxString msg;
DrawList = List[ii];
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;
if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue;
......
......@@ -71,7 +71,7 @@ LibEDA_BaseStruct * CurrentItem = CurrentDrawItem;
bool show_fill_option = FALSE;
int fill_option = 0;
if( CurrentItem )
switch(CurrentItem->m_StructType)
switch(CurrentItem->Type())
{
case COMPONENT_ARC_DRAW_TYPE:
show_fill_option = TRUE;
......
......@@ -64,7 +64,7 @@ wxString msg;
Create(parent, id, caption, pos, size, style);
m_TextLabel->SetValue(m_CurrentText->m_Text);
m_TextLabel->SetFocus();
switch( m_CurrentText->m_StructType )
switch( m_CurrentText->Type() )
{
case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
SetTitle(_("Global Label properties"));
......@@ -187,7 +187,7 @@ void WinEDA_LabelPropertiesFrame::CreateControls()
m_TextShape->SetValidator( wxGenericValidator(& m_CurrentText->m_Shape) );
////@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);
}
......
......@@ -960,7 +960,7 @@ LibEDA_BaseStruct* DrawItem = NULL, * NextDrawItem;
for ( ; DrawItem != NULL; DrawItem = DrawItem->Next() )
{
/* 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( FlagDel == 0 )
......
......@@ -44,7 +44,7 @@ void InstallCmpeditFrame( WinEDA_SchematicFrame* parent, wxPoint& pos,
*/
{
parent->DrawPanel->m_IgnoreMouseEvents = TRUE;
if( cmp->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE )
if( cmp->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
{
DisplayError( parent,
wxT( "InstallCmpeditFrame() error: This struct is not a component" ) );
......@@ -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,
......@@ -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
......@@ -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
......@@ -172,7 +172,7 @@ void WinEDA_ComponentPropertiesFrame::CopyPanelFieldToData( void )
/*************************************************************/
void WinEDA_ComponentPropertiesFrame::BuildPanelFields( void )
void WinEDA_ComponentPropertiesFrame::BuildPanelFields()
/*************************************************************/
{
int ii, FieldId;
......@@ -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
......@@ -691,7 +691,7 @@ void PartTextStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC )
EDA_SchComponentStruct* Cmp = (EDA_SchComponentStruct*) m_Parent;
/* 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 );
( (WinEDA_SchematicFrame*) frame )->SaveCopyInUndoList( Cmp, IS_CHANGED );
......
......@@ -82,7 +82,7 @@ void WinEDA_SchematicFrame::StartMoveTexte( DrawTextStruct* TextStruct, wxDC* DC
TextStruct->m_Flags |= IS_MOVED;
switch( TextStruct->m_StructType )
switch( TextStruct->Type() )
{
case DRAW_LABEL_STRUCT_TYPE:
case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
......@@ -153,7 +153,7 @@ void WinEDA_SchematicFrame::ChangeTextOrient( DrawTextStruct* TextStruct, wxDC*
RedrawOneStruct( DrawPanel, DC, TextStruct, g_XorMode );
/* Rotation du texte */
switch( TextStruct->m_StructType )
switch( TextStruct->Type() )
{
case DRAW_LABEL_STRUCT_TYPE:
case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
......@@ -193,10 +193,8 @@ EDA_BaseStruct* WinEDA_SchematicFrame::CreateNewText( wxDC* DC, int type )
break;
case LAYER_LOCLABEL:
{
NewText = new DrawLabelStruct( m_CurrentScreen->m_Curseur );
NewText->m_Size.x = NewText->m_Size.y = g_DefaultTextLabelSize;
}
break;
case LAYER_GLOBLABEL:
......@@ -250,7 +248,7 @@ static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
RedrawOneStruct( panel, DC, TextStruct, g_XorMode );
/* Redessin du texte */
switch( TextStruct->m_StructType )
switch( TextStruct->Type() )
{
case DRAW_LABEL_STRUCT_TYPE:
case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
......@@ -295,7 +293,7 @@ static void ExitMoveTexte( WinEDA_DrawPanel* Panel, wxDC* DC )
}
else /* Remise a jour des anciens parametres du texte */
{
switch( Struct->m_StructType )
switch( Struct->Type() )
{
case DRAW_LABEL_STRUCT_TYPE:
case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
......@@ -340,17 +338,17 @@ void WinEDA_SchematicFrame::ConvertTextType( DrawTextStruct* Text,
switch( newtype )
{
case DRAW_LABEL_STRUCT_TYPE:
Text->m_StructType = DRAW_LABEL_STRUCT_TYPE;
Text->SetType( DRAW_LABEL_STRUCT_TYPE );
Text->m_Layer = LAYER_LOCLABEL;
break;
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;
break;
case DRAW_TEXT_STRUCT_TYPE:
Text->m_StructType = DRAW_TEXT_STRUCT_TYPE;
Text->SetType( DRAW_TEXT_STRUCT_TYPE );
Text->m_Layer = LAYER_NOTES;
break;
......
......@@ -86,13 +86,13 @@ public:
// Constructor and destructor
WinEDA_ComponentPropertiesFrame( WinEDA_SchematicFrame* parent, wxPoint& pos,
EDA_SchComponentStruct* cmp );
~WinEDA_ComponentPropertiesFrame( void )
~WinEDA_ComponentPropertiesFrame()
{
}
private:
void BuildPanelBasic( void );
void BuildPanelBasic();
void ComponentPropertiesAccept( wxCommandEvent& event );
void SetInitCmp( wxCommandEvent& event );
void OnQuit( wxCommandEvent& event );
......@@ -116,7 +116,7 @@ void InstallCmpeditFrame( WinEDA_SchematicFrame* parent, wxPoint& pos,
*/
{
parent->DrawPanel->m_IgnoreMouseEvents = TRUE;
if( cmp->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE )
if( cmp->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
{
DisplayError( parent,
wxT( "InstallCmpeditFrame() error: This struct is not a component" ) );
......@@ -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
......
......@@ -18,7 +18,7 @@
void SetStructFather( EDA_BaseStruct* Struct, BASE_SCREEN* Screen )
/************************************************************/
{
switch( Struct->m_StructType )
switch( Struct->Type() )
{
case DRAW_POLYLINE_STRUCT_TYPE:
case DRAW_JUNCTION_STRUCT_TYPE:
......@@ -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();
......@@ -95,7 +95,7 @@ SCH_SCREEN::~SCH_SCREEN( void )
/*************************************/
SCH_SCREEN* SCH_SCREEN::GenCopy( void )
SCH_SCREEN* SCH_SCREEN::GenCopy()
/*************************************/
{
// TODO
......@@ -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.
......
......@@ -37,7 +37,7 @@ void WinEDA_SchematicFrame::BeginSegment( wxDC* DC, int type )
if( GetScreen()->GetCurItem() )
{
switch( GetScreen()->GetCurItem()->m_StructType )
switch( GetScreen()->GetCurItem()->Type() )
{
case DRAW_SEGMENT_STRUCT_TYPE:
case DRAW_POLYLINE_STRUCT_TYPE:
......@@ -254,7 +254,7 @@ void WinEDA_SchematicFrame::DeleteCurrentSegment( wxDC* DC )
}
/* 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 */
}
......@@ -353,7 +353,7 @@ void WinEDA_SchematicFrame::RepeatDrawItem( wxDC* DC )
if( g_ItemToRepeat == NULL )
return;
switch( g_ItemToRepeat->m_StructType )
switch( g_ItemToRepeat->Type() )
{
case DRAW_JUNCTION_STRUCT_TYPE:
#undef STRUCT
......@@ -534,7 +534,7 @@ static bool IsTerminalPoint( SCH_SCREEN* screen, const wxPoint& pos, int layer )
return TRUE;
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.y == pos.y ) )
return TRUE;
......
......@@ -48,7 +48,7 @@ static void DrawLibPartAux( WinEDA_DrawPanel* panel, wxDC* DC,
int DrawMode, int Color = -1, bool DrawPinText = TRUE );
/******************************/
static void CreateDummyCmp( void )
static void CreateDummyCmp()
/******************************/
{
DummyCmp = new EDA_LibComponentStruct( NULL );
......@@ -433,7 +433,7 @@ void DrawLibPartAux( WinEDA_DrawPanel* panel, wxDC* DC,
SetHightColor = (DEntry->m_Selected & IS_SELECTED) ? HIGHT_LIGHT_FLAG : 0;
LineWidth = MAX( DEntry->m_Width, g_DrawMinimunLineWidth );
switch( DEntry->m_StructType )
switch( DEntry->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
{
......@@ -925,7 +925,7 @@ void DrawLibraryDrawStruct( WinEDA_DrawPanel* panel, wxDC* DC,
int LineWidth = MAX( DrawItem->m_Width, g_DrawMinimunLineWidth );
switch( DrawItem->m_StructType )
switch( DrawItem->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
{
......
......@@ -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.
......@@ -806,7 +806,7 @@ LibraryStruct* FindLibrary( const wxString& Name )
/*****************************************************************************
* Routine to find the number of libraries currently loaded. *
*****************************************************************************/
int NumOfLibraries( void )
int NumOfLibraries()
{
int ii;
LibraryStruct* Lib = g_LibraryList;
......@@ -1080,7 +1080,7 @@ static bool ReadLibEntryDateAndTime( EDA_LibComponentStruct* LibEntry, char* Lin
/*******************************************/
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
......@@ -1130,7 +1130,7 @@ int SortItemsFct( const void* ref, const void* item )
int fill_ref = 0, fill_item = 0;
switch( Ref->m_StructType )
switch( Ref->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
{
......@@ -1161,15 +1161,15 @@ int SortItemsFct( const void* ref, const void* item )
}
case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE:
if( Item->m_StructType == COMPONENT_PIN_DRAW_TYPE )
if( Item->Type() == COMPONENT_PIN_DRAW_TYPE )
return BEFORE;
if( Item->m_StructType == COMPONENT_GRAPHIC_TEXT_DRAW_TYPE )
if( Item->Type() == COMPONENT_GRAPHIC_TEXT_DRAW_TYPE )
return 0;
return 1;
break;
case COMPONENT_PIN_DRAW_TYPE:
if( Item->m_StructType == COMPONENT_PIN_DRAW_TYPE )
if( Item->Type() == COMPONENT_PIN_DRAW_TYPE )
{
int ii;
......@@ -1199,7 +1199,7 @@ int SortItemsFct( const void* ref, const void* item )
}
/* Test de l'item */
switch( Item->m_StructType )
switch( Item->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
{
......
......@@ -182,7 +182,7 @@ void LoadSubHierarchy( WinEDA_SchematicFrame* frame, EDA_BaseStruct* DrawList )
while( EEDrawList )
{
if( EEDrawList->m_StructType == DRAW_SHEET_STRUCT_TYPE )
if( EEDrawList->Type() == DRAW_SHEET_STRUCT_TYPE )
{
#undef STRUCT
#define STRUCT ( (DrawSheetStruct*) EEDrawList )
......
......@@ -154,7 +154,7 @@ void RedrawStructList(WinEDA_DrawPanel * panel, wxDC * DC,
{
while (Structs)
{
if (Structs->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE)
if (Structs->Type() == DRAW_PICK_ITEM_STRUCT_TYPE)
{
RedrawOneStruct(panel, DC,
((DrawPickedStruct *) Structs)->m_PickedStruct,
......@@ -353,7 +353,7 @@ int width = g_DrawMinimunLineWidth;
GRSetDrawMode(DC, DrawMode);
switch (DrawStruct->m_StructType)
switch (DrawStruct->Type())
{
case DRAW_POLYLINE_STRUCT_TYPE:
{
......
......@@ -26,7 +26,7 @@
/* Routines locales */
static void CreateScreens( void );
static void CreateScreens();
// Global variables
wxString g_Main_Title( wxT( "EESchema" ) );
......@@ -42,7 +42,7 @@ wxString g_Main_Title( wxT( "EESchema" ) );
// not wxApp)
IMPLEMENT_APP( WinEDA_App )
bool WinEDA_App::OnInit( void )
bool WinEDA_App::OnInit()
{
wxString FFileName;
......@@ -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);
DrawStruct = m_Parent->GetScreen()->EEDrawList;
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 */
Marker = (DrawMarkerStruct * ) DrawStruct;
if( Marker->m_Type == MARQ_ERC )
......@@ -693,7 +693,7 @@ wxString msg;
DrawStruct = Screen->EEDrawList;
for ( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext)
{
if(DrawStruct->m_StructType != DRAW_MARKER_STRUCT_TYPE )
if(DrawStruct->Type() != DRAW_MARKER_STRUCT_TYPE )
continue;
/* Marqueur trouve */
......
......@@ -1063,7 +1063,7 @@ LibEDA_BaseStruct* DrawItem = NULL, * NextDrawItem;
for ( ; DrawItem != NULL; DrawItem = DrawItem->Pnext )
{
/* 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( FlagDel == 0 )
......
......@@ -128,7 +128,7 @@ int Nb = 0;
{
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;
if ( Cmp->m_Field[VALUE].m_Text.GetChar(0) != '#' ) Nb++;
......
......@@ -90,7 +90,7 @@ EDA_BaseStruct* WinEDA_SchematicFrame::FindMarker( int SearchType )
DrawList = Screen->EEDrawList;
while( DrawList && NotFound )
{
if( DrawList->m_StructType == DRAW_MARKER_STRUCT_TYPE )
if( DrawList->Type() == DRAW_MARKER_STRUCT_TYPE )
{
Marker = (DrawMarkerStruct*) DrawList;
NotFound = FALSE;
......@@ -255,7 +255,7 @@ EDA_BaseStruct* WinEDA_SchematicFrame::FindSchematicItem(
DrawList = Screen->EEDrawList;
while( DrawList )
{
switch( DrawList->m_StructType )
switch( DrawList->Type() )
{
case DRAW_LIB_ITEM_STRUCT_TYPE:
EDA_SchComponentStruct* pSch;
......@@ -343,7 +343,7 @@ EDA_BaseStruct* WinEDA_SchematicFrame::FindSchematicItem(
/* If the struct found is a DRAW_LIB_ITEM_STRUCT_TYPE type,
* 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;
......
......@@ -17,7 +17,7 @@
/* Structures pour memo et liste des elements */
typedef struct ListLabel
{
int m_StructType;
int Type();
void * m_Label;
int m_SheetNumber;
} ListLabel;
......@@ -318,7 +318,7 @@ BASE_SCREEN * screen = ScreenSch;
DrawList = screen->EEDrawList;
while ( DrawList )
{
switch( DrawList->m_StructType )
switch( DrawList->Type() )
{
case DRAW_LIB_ITEM_STRUCT_TYPE :
......@@ -359,12 +359,12 @@ BASE_SCREEN * screen = ScreenSch;
DrawList = screen->EEDrawList;
while ( DrawList )
{
switch( DrawList->m_StructType )
switch( DrawList->Type() )
{
case DRAW_GLOBAL_LABEL_STRUCT_TYPE :
if( List )
{
List->m_StructType = DRAW_TEXT_STRUCT_TYPE;
List->Type() = DRAW_TEXT_STRUCT_TYPE;
List->m_SheetNumber = screen->m_SheetNumber;
List->m_Label = DrawList; List++;
}
......@@ -379,7 +379,7 @@ BASE_SCREEN * screen = ScreenSch;
{
if ( List )
{
List->m_StructType = DRAW_SHEETLABEL_STRUCT_TYPE;
List->Type() = DRAW_SHEETLABEL_STRUCT_TYPE;
List->m_SheetNumber = screen->m_SheetNumber;
List->m_Label = SheetLabel;
List++;
......@@ -487,12 +487,12 @@ static int ListTriGLabelByVal(ListLabel *Objet1, ListLabel *Objet2)
int ii;
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;
else
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;
else
Text2 = &((DrawTextStruct *)Objet2->m_Label)->m_Text;
......@@ -523,12 +523,12 @@ const wxString * Text1, *Text2;
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;
else
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;
else
Text2 = &((DrawTextStruct *)Objet2->m_Label)->m_Text;
......@@ -590,7 +590,7 @@ wxString msg;
DrawList = List[ii];
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;
if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue;
......@@ -646,7 +646,7 @@ wxString msg;
DrawList = List[ii];
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;
if( DrawLibItem->m_Field[REFERENCE].m_Text[0] == '#' ) continue;
......@@ -689,7 +689,7 @@ wxString msg;
{
LabelItem = & List[ii];
switch( LabelItem->m_StructType )
switch( LabelItem->Type() )
{
case DRAW_GLOBAL_LABEL_STRUCT_TYPE :
DrawTextItem = (DrawGlobalLabelStruct *)(LabelItem->m_Label);
......
......@@ -466,7 +466,7 @@ void WinEDA_SchematicFrame::StartMovePart( EDA_SchComponentStruct* Component,
{
if( Component == NULL )
return;
if( Component->m_StructType != DRAW_LIB_ITEM_STRUCT_TYPE )
if( Component->Type() != DRAW_LIB_ITEM_STRUCT_TYPE )
return;
if( Component->m_Flags == 0 )
......
......@@ -206,7 +206,7 @@ SCH_SCREEN * Screen;
while( DrawStruct )
{
if(DrawStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE )
if(DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE )
{
#define STRUCT ((DrawSheetStruct*)DrawStruct)
nbsheets++;
......
......@@ -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_StructType == DRAW_SEGMENT_STRUCT_TYPE )
if( DrawStruct->Type() == DRAW_SEGMENT_STRUCT_TYPE )
{
EDA_DrawLineStruct* segment = (EDA_DrawLineStruct*) DrawStruct;
if( segment->m_Layer != LAYER_WIRE )
......@@ -214,13 +214,13 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
GetScreen()->EEDrawList, LIBITEM | TEXTITEM | LABELITEM );
if( DrawStruct == NULL )
break;
if( DrawStruct->m_StructType == DRAW_LIB_ITEM_STRUCT_TYPE )
if( DrawStruct->Type() == DRAW_LIB_ITEM_STRUCT_TYPE )
DrawStruct = LocateSmallestComponent( GetScreen() );
if( DrawStruct == NULL )
break;
}
switch( DrawStruct->m_StructType )
switch( DrawStruct->Type() )
{
case DRAW_LIB_ITEM_STRUCT_TYPE:
if( DrawStruct->m_Flags == 0 )
......@@ -368,7 +368,7 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
case HK_REPEAT_LAST:
if( LibItemToRepeat && (LibItemToRepeat->m_Flags == 0)
&& (LibItemToRepeat->m_StructType == COMPONENT_PIN_DRAW_TYPE) )
&& (LibItemToRepeat->Type() == COMPONENT_PIN_DRAW_TYPE) )
{
RepeatPinItem( DC, (LibDrawPin*) LibItemToRepeat );
}
......
......@@ -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,
}
EDA_LibCmpAliasStruct::~EDA_LibCmpAliasStruct( void )
EDA_LibCmpAliasStruct::~EDA_LibCmpAliasStruct()
{
}
......@@ -187,7 +187,7 @@ EDA_LibComponentStruct:: EDA_LibComponentStruct( const wxChar* CmpName ) :
/******************************************************/
EDA_LibComponentStruct::~EDA_LibComponentStruct( void )
EDA_LibComponentStruct::~EDA_LibComponentStruct()
/******************************************************/
{
LibEDA_BaseStruct* DrawItem, * NextDrawItem;
......@@ -247,7 +247,7 @@ EDA_Rect EDA_LibComponentStruct::GetBoundaryBox( int Unit, int Convert )
if( (Convert > 0) && (Convert != DrawEntry->m_Convert) )
continue;
switch( DrawEntry->m_StructType )
switch( DrawEntry->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
{
......@@ -403,13 +403,13 @@ LibDrawField::LibDrawField( int idfield ) : LibEDA_BaseStruct( COMPONENT_FIELD_D
}
LibDrawField::~LibDrawField( void )
LibDrawField::~LibDrawField()
{
}
// Creation et Duplication d'un field
LibDrawField* LibDrawField::GenCopy( void )
LibDrawField* LibDrawField::GenCopy()
{
LibDrawField* newfield = new LibDrawField( m_FieldId );
......@@ -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 */
......@@ -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
......@@ -582,7 +582,7 @@ void LibDrawPin::SetPinNumFromString( wxString& buffer )
/*************************************/
LibDrawPin* LibDrawPin::GenCopy( void )
LibDrawPin* LibDrawPin::GenCopy()
/*************************************/
{
LibDrawPin* newpin = new LibDrawPin();
......@@ -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;
......@@ -619,7 +619,7 @@ LibDrawArc::LibDrawArc( void ) : LibEDA_BaseStruct( COMPONENT_ARC_DRAW_TYPE )
/************************************/
LibDrawArc* LibDrawArc::GenCopy( void )
LibDrawArc* LibDrawArc::GenCopy()
/************************************/
{
LibDrawArc* newitem = new LibDrawArc();
......@@ -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;
......@@ -649,7 +649,7 @@ LibDrawCircle::LibDrawCircle( void ) : LibEDA_BaseStruct( COMPONENT_CIRCLE_DRAW_
/*******************************************/
LibDrawCircle* LibDrawCircle::GenCopy( void )
LibDrawCircle* LibDrawCircle::GenCopy()
/*******************************************/
{
LibDrawCircle* newitem = new LibDrawCircle();
......@@ -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;
......@@ -677,7 +677,7 @@ LibDrawText::LibDrawText( void ) : LibEDA_BaseStruct( COMPONENT_GRAPHIC_TEXT_DRA
/***************************************/
LibDrawText* LibDrawText::GenCopy( void )
LibDrawText* LibDrawText::GenCopy()
/***************************************/
{
LibDrawText* newitem = new LibDrawText();
......@@ -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_Fill = NO_FILL;
}
LibDrawSquare* LibDrawSquare::GenCopy( void )
LibDrawSquare* LibDrawSquare::GenCopy()
{
LibDrawSquare* newitem = new LibDrawSquare();
......@@ -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;
}
LibDrawSegment* LibDrawSegment::GenCopy( void )
LibDrawSegment* LibDrawSegment::GenCopy()
{
LibDrawSegment* newitem = new LibDrawSegment();
......@@ -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;
PolyList = NULL;
......@@ -747,7 +747,7 @@ LibDrawPolyline::LibDrawPolyline( void ) : LibEDA_BaseStruct( COMPONENT_POLYLINE
/************************************************/
LibDrawPolyline* LibDrawPolyline::GenCopy( void )
LibDrawPolyline* LibDrawPolyline::GenCopy()
/************************************************/
{
LibDrawPolyline* newitem = new LibDrawPolyline();
......
......@@ -177,12 +177,12 @@ public:
int m_Width; /* Width of draw lines */
public:
LibEDA_BaseStruct* Next( void )
LibEDA_BaseStruct* Next()
{
return (LibEDA_BaseStruct*) Pnext;
}
LibEDA_BaseStruct( KICAD_T struct_type );
virtual ~LibEDA_BaseStruct( void ) { }
virtual ~LibEDA_BaseStruct() { }
void Display_Infos_DrawEntry( WinEDA_DrawFrame* frame );
};
......@@ -203,12 +203,12 @@ public:
// short m_PinNumWidth, m_PinNameWidth; /* (Unused) Pin num and Pin name text width */
public:
LibDrawPin( void );
~LibDrawPin( void ) { }
LibDrawPin* GenCopy( void );
LibDrawPin();
~LibDrawPin() { }
LibDrawPin* GenCopy();
bool WriteDescr( FILE* File );
void Display_Infos( WinEDA_DrawFrame* frame );
wxPoint ReturnPinEndPoint( void );
wxPoint ReturnPinEndPoint();
int ReturnPinDrawOrient( int TransMat[2][2] );
void ReturnPinStringNum( wxString& buffer );
void SetPinNumFromString( wxString& buffer );
......@@ -234,9 +234,9 @@ public:
wxPoint m_ArcStart, m_ArcEnd; /* position des 2 extremites de l'arc en coord reelles*/
public:
LibDrawArc( void );
~LibDrawArc( void ) { }
LibDrawArc* GenCopy( void );
LibDrawArc();
~LibDrawArc() { }
LibDrawArc* GenCopy();
bool WriteDescr( FILE* File );
};
......@@ -247,9 +247,9 @@ public:
int m_Fill;
public:
LibDrawCircle( void );
~LibDrawCircle( void ) { }
LibDrawCircle* GenCopy( void );
LibDrawCircle();
~LibDrawCircle() { }
LibDrawCircle* GenCopy();
bool WriteDescr( FILE* File );
};
......@@ -262,9 +262,9 @@ public:
wxString m_Text;
public:
LibDrawText( void );
~LibDrawText( void ) { }
LibDrawText* GenCopy( void );
LibDrawText();
~LibDrawText() { }
LibDrawText* GenCopy();
bool WriteDescr( FILE* File );
};
......@@ -275,9 +275,9 @@ public:
int m_Fill;
public:
LibDrawSquare( void );
~LibDrawSquare( void ) { }
LibDrawSquare* GenCopy( void );
LibDrawSquare();
~LibDrawSquare() { }
LibDrawSquare* GenCopy();
bool WriteDescr( FILE* File );
};
......@@ -287,9 +287,9 @@ public:
wxPoint m_End;
public:
LibDrawSegment( void );
~LibDrawSegment( void ) { }
LibDrawSegment* GenCopy( void );
LibDrawSegment();
~LibDrawSegment() { }
LibDrawSegment* GenCopy();
bool WriteDescr( FILE* File );
};
......@@ -300,12 +300,12 @@ public:
int m_Fill;
public:
LibDrawPolyline( void );
~LibDrawPolyline( void ) {
LibDrawPolyline();
~LibDrawPolyline() {
if( PolyList )
free( PolyList );
}
LibDrawPolyline* GenCopy( void );
LibDrawPolyline* GenCopy();
void AddPoint( const wxPoint& point );
bool WriteDescr( FILE* File );
};
......@@ -327,9 +327,9 @@ public:
public:
LibDrawField( int idfield = 2 );
~LibDrawField( void );
~LibDrawField();
LibDrawField* GenCopy( void );
LibDrawField* GenCopy();
void Copy( LibDrawField* Target );
bool WriteDescr( FILE* File );
};
......@@ -349,7 +349,7 @@ public:
public:
LibCmpEntry( LibrEntryType CmpType, const wxChar * CmpName );
virtual ~LibCmpEntry( void );
virtual ~LibCmpEntry();
bool WriteDescr( FILE* File );
};
......@@ -375,8 +375,8 @@ public:
EDA_LibComponentStruct( const wxChar * CmpName );
EDA_Rect GetBoundaryBox( int Unit, int Convert );/* return Box around the part. */
~EDA_LibComponentStruct( void );
void SortDrawItems( void );
~EDA_LibComponentStruct();
void SortDrawItems();
};
class EDA_LibCmpAliasStruct : public LibCmpEntry
......@@ -386,7 +386,7 @@ public:
public:
EDA_LibCmpAliasStruct( const wxChar * CmpName, const wxChar * CmpRootName );
~EDA_LibCmpAliasStruct( void );
~EDA_LibCmpAliasStruct();
};
/* Variables */
......
......@@ -32,7 +32,7 @@ LibEDA_BaseStruct* DrawEntry = CurrentDrawItem;
if ( DrawEntry && DrawEntry->m_Flags )
{
SaveCopyInUndoList(CurrentLibEntry);
switch (DrawEntry->m_StructType )
switch (DrawEntry->Type() )
{
case COMPONENT_PIN_DRAW_TYPE:
PlacePin(DC);
......@@ -146,7 +146,7 @@ LibEDA_BaseStruct* DrawEntry = CurrentDrawItem;
break;
}
SaveCopyInUndoList(CurrentLibEntry);
if ( DrawEntry->m_StructType == COMPONENT_PIN_DRAW_TYPE )
if ( DrawEntry->Type() == COMPONENT_PIN_DRAW_TYPE )
DeletePin(DC, CurrentLibEntry, (LibDrawPin*)DrawEntry);
else
DeleteOneLibraryDrawStruct(DrawPanel, DC, CurrentLibEntry,DrawEntry, TRUE);
......@@ -233,7 +233,7 @@ LibEDA_BaseStruct* DrawEntry = CurrentDrawItem;
CurrentDrawItem = DrawEntry;
DrawPanel->m_IgnoreMouseEvents = TRUE;
switch ( DrawEntry->m_StructType )
switch ( DrawEntry->Type() )
{
case COMPONENT_PIN_DRAW_TYPE:
if( DrawEntry->m_Flags == 0 ) // Item localis et non en edition: placement commande move
......@@ -282,7 +282,7 @@ LibEDA_BaseStruct* DrawEntry = CurrentDrawItem;
wxString msg;
msg.Printf(
wxT("WinEDA_LibeditFrame::OnLeftDClick Error: unknown StructType %d"),
DrawEntry->m_StructType);
DrawEntry->Type());
DisplayError(this, msg );
break;
}
......
......@@ -90,7 +90,7 @@ bool BlockActive = (m_CurrentScreen->BlockLocate.m_Command != BLOCK_IDLE);
CurrentDrawItem = DrawEntry;
switch ( DrawEntry->m_StructType )
switch ( DrawEntry->Type() )
{
case COMPONENT_PIN_DRAW_TYPE:
AddMenusForPin(PopMenu, (LibDrawPin*)DrawEntry, this);
......@@ -202,7 +202,7 @@ bool BlockActive = (m_CurrentScreen->BlockLocate.m_Command != BLOCK_IDLE);
wxString msg;
msg.Printf(
wxT("WinEDA_LibeditFrame::OnRightClick Error: unknown StructType %d"),
DrawEntry->m_StructType);
DrawEntry->Type());
DisplayError(this, msg );
CurrentDrawItem = NULL;
break;
......
......@@ -1049,7 +1049,7 @@ LibEDA_BaseStruct* DrawItem = NULL, * NextDrawItem;
for ( ; DrawItem != NULL; DrawItem = DrawItem->Next() )
{
/* 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( FlagDel == 0 )
......
......@@ -531,7 +531,7 @@ wxClientDC dc(DrawPanel);
if ( CurrentDrawItem )
{
DrawPanel->CursorOff(&dc);
switch ( CurrentDrawItem->m_StructType )
switch ( CurrentDrawItem->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
case COMPONENT_CIRCLE_DRAW_TYPE:
......@@ -568,7 +568,7 @@ wxClientDC dc(DrawPanel);
DrawPanel->MouseToCursorSchema();
DrawPanel->CursorOff(&dc);
SaveCopyInUndoList(CurrentLibEntry);
if ( CurrentDrawItem->m_StructType == COMPONENT_PIN_DRAW_TYPE )
if ( CurrentDrawItem->Type() == COMPONENT_PIN_DRAW_TYPE )
{
DeletePin(&dc, CurrentLibEntry, (LibDrawPin*)CurrentDrawItem);
}
......@@ -588,9 +588,9 @@ wxClientDC dc(DrawPanel);
case ID_POPUP_LIBEDIT_MOVE_ITEM_REQUEST:
if ( CurrentDrawItem == NULL) break;
DrawPanel->MouseToCursorSchema();
if ( CurrentDrawItem->m_StructType == COMPONENT_PIN_DRAW_TYPE )
if ( CurrentDrawItem->Type() == COMPONENT_PIN_DRAW_TYPE )
StartMovePin(&dc);
else if ( CurrentDrawItem->m_StructType == COMPONENT_FIELD_DRAW_TYPE )
else if ( CurrentDrawItem->Type() == COMPONENT_FIELD_DRAW_TYPE )
StartMoveField(&dc, (LibDrawField *) CurrentDrawItem);
else StartMoveDrawSymbol(&dc);
break;
......@@ -609,7 +609,7 @@ wxClientDC dc(DrawPanel);
if ( CurrentDrawItem == NULL) break;
DrawPanel->CursorOff(&dc);
DrawPanel->MouseToCursorSchema();
if ( CurrentDrawItem->m_StructType == COMPONENT_FIELD_DRAW_TYPE )
if ( CurrentDrawItem->Type() == COMPONENT_FIELD_DRAW_TYPE )
{
SaveCopyInUndoList(CurrentLibEntry);
RotateField(&dc, (LibDrawField *) CurrentDrawItem);
......@@ -620,7 +620,7 @@ wxClientDC dc(DrawPanel);
case ID_POPUP_LIBEDIT_FIELD_EDIT_ITEM:
if ( CurrentDrawItem == NULL) break;
DrawPanel->CursorOff(&dc);
if ( CurrentDrawItem->m_StructType == COMPONENT_FIELD_DRAW_TYPE )
if ( CurrentDrawItem->Type() == COMPONENT_FIELD_DRAW_TYPE )
{
EditField(&dc, (LibDrawField *) CurrentDrawItem);
}
......@@ -631,7 +631,7 @@ wxClientDC dc(DrawPanel);
case ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNAMESIZE_ITEM:
case ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNUMSIZE_ITEM:
if ( (CurrentDrawItem == NULL) ||
(CurrentDrawItem->m_StructType != COMPONENT_PIN_DRAW_TYPE) )
(CurrentDrawItem->Type() != COMPONENT_PIN_DRAW_TYPE) )
break;
SaveCopyInUndoList(CurrentLibEntry);
GlobalSetPins(&dc, (LibDrawPin *) CurrentDrawItem, id);
......
......@@ -202,7 +202,7 @@ int dx, dy;
if(DontSnap) if (DontSnap->m_PickedStruct == DrawList) continue;
switch (DrawList->m_StructType)
switch (DrawList->Type())
{
case DRAW_POLYLINE_STRUCT_TYPE:
#undef STRUCT
......@@ -440,7 +440,7 @@ int dx, dy;
default:
{
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(")");
DisplayError(NULL, msg);
break;
......@@ -463,7 +463,7 @@ int i, *Points, xt1, yt1, xt2, yt2, NumOfPoints2;
int dx, dy;
wxString msg;
switch (DrawStruct->m_StructType)
switch (DrawStruct->Type())
{
case DRAW_POLYLINE_STRUCT_TYPE:
#undef STRUCT
......@@ -612,7 +612,7 @@ wxString msg;
default:
msg.Printf(
wxT("DrawStructInBox() Err: unexpected StructType %d ("),
DrawStruct->m_StructType );
DrawStruct->Type() );
msg << DrawStruct->ReturnClassName() << wxT(")");
DisplayError(NULL, msg );
break;
......@@ -750,7 +750,7 @@ int seuil;
if(Convert && DrawItem->m_Convert && (Convert != DrawItem->m_Convert) )
continue;
switch ( DrawItem->m_StructType )
switch ( DrawItem->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
{
......@@ -988,7 +988,7 @@ int x1, y1, x2, y2;
DrawItem = Entry->m_Drawings;
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;
......@@ -1039,7 +1039,7 @@ int size , dy, minx, maxx;
DrawSheetLabelStruct * SheetLabel;
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;
if (SheetLabel->m_Edge) size = -size ;
......@@ -1067,7 +1067,7 @@ LibDrawPin * Pin = NULL;
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;
LibItem = (EDA_SchComponentStruct *) DrawStruct;
Entry = FindLibPart( LibItem->m_ChipName.GetData(), wxEmptyString, FIND_ROOT);
......@@ -1090,7 +1090,7 @@ DrawSheetLabelStruct * PinSheet = NULL;
for( DrawStruct = DrawList; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext )
{
if( DrawStruct->m_StructType != DRAW_SHEET_STRUCT_TYPE )
if( DrawStruct->Type() != DRAW_SHEET_STRUCT_TYPE )
continue;
PinSheet = LocateSheetLabel( (DrawSheetStruct *) DrawStruct,
RefPos);
......
......@@ -123,7 +123,7 @@ LibEDA_BaseStruct *DEntry;
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;
/* already tested ? : */
......@@ -145,7 +145,7 @@ LibEDA_BaseStruct *DEntry;
DEntry = Entry->m_Drawings;
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 &&
(DEntry->m_Unit != Component->m_Multi) ) continue;
if( DEntry->m_Convert &&
......@@ -336,7 +336,7 @@ EDA_BaseStruct *DrawList;
DrawList = screen->EEDrawList;
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;
Component->m_FlagControlMulti = 0;
......@@ -384,7 +384,7 @@ wxChar bufnum[BUFYPOS_LEN+1];
for ( DrawList = screen->EEDrawList; DrawList != NULL; DrawList = DrawList->Pnext )
{
wxChar ident;
if ( DrawList->m_StructType != DRAW_TEXT_STRUCT_TYPE ) continue;
if ( DrawList->Type() != DRAW_TEXT_STRUCT_TYPE ) continue;
#define DRAWTEXT ((DrawTextStruct *) DrawList)
text = DRAWTEXT->m_Text; if ( text.IsEmpty() ) continue;
ident = text.GetChar(0);
......@@ -685,7 +685,7 @@ SCH_SCREEN * screen;
DrawList = screen->EEDrawList;
while ( DrawList )
{
switch( DrawList->m_StructType )
switch( DrawList->Type() )
{
case DRAW_LIB_ITEM_STRUCT_TYPE :
Component2 = (EDA_SchComponentStruct *) DrawList;
......@@ -705,7 +705,7 @@ SCH_SCREEN * screen;
DEntry = Entry->m_Drawings;
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 &&
(DEntry->m_Unit != Component2->m_Multi) ) continue;
if( DEntry->m_Convert &&
......
......@@ -353,7 +353,7 @@ int NumInclude;
while ( DrawList )
{
switch( DrawList->m_StructType )
switch( DrawList->Type() )
{
case DRAW_SEGMENT_STRUCT_TYPE :
#undef STRUCT
......@@ -465,7 +465,7 @@ int NumInclude;
for ( ;DEntry != NULL; DEntry = DEntry->Next())
{
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 &&
(DEntry->m_Unit != DrawLibItem->m_Multi) ) continue;
if( DEntry->m_Convert &&
......@@ -555,7 +555,7 @@ int NumInclude;
{
wxString msg;
msg.Printf( wxT("Netlist: unexpected type struct %d"),
DrawList->m_StructType);
DrawList->Type());
DisplayError(frame, msg);
break;
}
......
......@@ -35,7 +35,7 @@ void WinEDA_SchematicFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
if( DrawStruct && DrawStruct->m_Flags ) // Commande "POPUP" en cours
{
switch( DrawStruct->m_StructType )
switch( DrawStruct->Type() )
{
case DRAW_LABEL_STRUCT_TYPE:
case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
......@@ -86,7 +86,7 @@ void WinEDA_SchematicFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
if( DrawStruct && DrawStruct->m_Flags )
break;
DrawStruct = SchematicGeneralLocateAndDisplay();
if( DrawStruct && (DrawStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE) )
if( DrawStruct && (DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE) )
{
InstallNextScreen( (DrawSheetStruct*) DrawStruct );
}
......@@ -229,7 +229,7 @@ void WinEDA_SchematicFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
if( DrawStruct == NULL )
break;
if( (DrawStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE)
if( (DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE)
&& (DrawStruct->m_Flags == 0) )
{
if( m_ID_current_state == ID_IMPORT_GLABEL_BUTT )
......@@ -239,7 +239,7 @@ void WinEDA_SchematicFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
m_CurrentScreen->SetCurItem(
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->Place( this, DC );
......@@ -316,7 +316,7 @@ void WinEDA_SchematicFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
break;
// Element localis
switch( DrawStruct->m_StructType )
switch( DrawStruct->Type() )
{
case DRAW_SHEET_STRUCT_TYPE:
InstallNextScreen( (DrawSheetStruct*) DrawStruct );
......
......@@ -96,7 +96,7 @@ void WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
if( (DrawStruct == NULL) || (DrawStruct->m_Flags == 0) )
{
DrawStruct = SchematicGeneralLocateAndDisplay( FALSE );
if( DrawStruct && (DrawStruct->m_StructType == DRAW_SHEET_STRUCT_TYPE) )
if( DrawStruct && (DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE) )
{
DrawSheetLabelStruct* slabel;
slabel = LocateSheetLabel( (DrawSheetStruct*) DrawStruct,
......@@ -148,7 +148,7 @@ void WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
int flags = DrawStruct->m_Flags;
bool is_new = (flags & IS_NEW) ? TRUE : FALSE;
switch( DrawStruct->m_StructType )
switch( DrawStruct->Type() )
{
case DRAW_NOCONNECT_STRUCT_TYPE:
......@@ -243,7 +243,7 @@ void WinEDA_SchematicFrame::OnRightClick( const wxPoint& MousePos,
wxString msg;
msg.Printf(
wxT( "WinEDA_SchematicFrame::OnRightClick Error: unknown DrawType %d" ),
DrawStruct->m_StructType );
DrawStruct->Type() );
DisplayError( this, msg );
break;
}
......
......@@ -36,7 +36,7 @@ void InstallPineditFrame(WinEDA_LibeditFrame * parent, wxDC * DC, const wxPoint
{
wxPoint MousePos = parent->GetScreen()->m_Curseur;
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;
WinEDA_PinPropertiesFrame * frame = new WinEDA_PinPropertiesFrame(parent);
......
......@@ -122,7 +122,7 @@ LibDrawPin * CurrentPin = (LibDrawPin *) CurrentDrawItem;
Pin = (LibDrawPin *) CurrentLibEntry->m_Drawings;
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->m_Pos == CurrentPin->m_Pos) &&
(Pin->m_Orient == CurrentPin->m_Orient) &&
......@@ -179,7 +179,7 @@ bool status;
// Tst for an other pin in same new position:
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( newpos != Pin->m_Pos ) continue;
if ( Pin->m_Flags ) continue;
......@@ -213,7 +213,7 @@ bool status;
Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings;
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;
Pin->m_Pos = CurrentPin->m_Pos;
Pin->m_Flags = 0;
......@@ -270,7 +270,7 @@ wxPoint startPos;
for ( ; Pin != NULL; Pin = (LibDrawPin *)Pin->Pnext )
{
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->m_Pos == CurrentPin->m_Pos) && (Pin->m_Orient == CurrentPin->m_Orient) &&
(g_EditPinByPinIsOn == FALSE ) )
......@@ -345,7 +345,7 @@ LibDrawPin * CurrentPin = (LibDrawPin *) CurrentDrawItem;
Pin = (LibDrawPin *) CurrentLibEntry->m_Drawings;
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_Convert != CurrentPin->m_Convert ) continue;
Pin->m_PinShape = newshape;
......@@ -373,7 +373,7 @@ LibDrawPin * CurrentPin = (LibDrawPin*)CurrentDrawItem;
Pin = (LibDrawPin*)CurrentLibEntry->m_Drawings;
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;
Pin->m_PinType = newtype;
}
......@@ -404,7 +404,7 @@ wxString buf;
Pin = (LibDrawPin *) CurrentLibEntry->m_Drawings;
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 (newsize >= 0 ) Pin->m_PinNameSize = newsize;
Pin->m_PinName = buf;
......@@ -439,7 +439,7 @@ wxString buf;
Pin = (LibDrawPin *) CurrentLibEntry->m_Drawings;
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_Unit != CurrentPin->m_Unit ) continue;
if ( newsize >= 0) Pin->m_PinNumSize = newsize;
......@@ -474,7 +474,7 @@ wxPoint PinPos;
DrawItem = LibEntry->m_Drawings;
for ( ; DrawItem != NULL; )
{
if (DrawItem->m_StructType != COMPONENT_PIN_DRAW_TYPE )
if (DrawItem->Type() != COMPONENT_PIN_DRAW_TYPE )
{
DrawItem = DrawItem->Next(); continue;
}
......@@ -591,7 +591,7 @@ LibDrawPin * Pin, * CurrentPin = (LibDrawPin * ) CurrentDrawItem;
{
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 == CurrentPin) continue;
if(CurrentPin->m_Convert && (CurrentPin->m_Convert != Pin->m_Convert))
......@@ -615,7 +615,7 @@ LibDrawPin * Pin, * CurrentPin = (LibDrawPin * ) CurrentDrawItem;
for ( ; DrawItem != NULL; )
{
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 == CurrentPin) continue;
if( CurrentPin->m_Unit && (CurrentPin->m_Unit != Pin->m_Unit) )
......@@ -672,7 +672,7 @@ LibDrawPin * RefPin, * Pin = (LibDrawPin *) CurrentDrawItem;
Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings;
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_Orient != RefPin->m_Orient) continue;
if( Pin->m_Convert == RefPin->m_Convert ) Pin->m_PinLen = newsize;
......@@ -745,14 +745,14 @@ LibDrawPin * Pin;
bool selected = (MasterPin->m_Selected & IS_SELECTED) != 0;
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();
Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings;
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;
// Is it the "selected mode" ?
if (selected && (Pin->m_Selected & IS_SELECTED) == 0 ) continue;
......@@ -793,7 +793,7 @@ int ox = 0, oy = 0;
if(CurrentLibEntry == 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->Pnext = CurrentLibEntry->m_Drawings;
......@@ -848,13 +848,13 @@ wxString msg;
Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings;
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 *) );
Pin = (LibDrawPin *)CurrentLibEntry->m_Drawings;
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
......
......@@ -180,7 +180,7 @@ wxPoint pos;
if ( (g_PlotFormat == PLOT_FORMAT_POST) && g_PlotPSColorOpt )
SetColorMapPS ( ReturnLayerColor(LAYER_DEVICE) );
switch (DEntry->m_StructType)
switch (DEntry->Type())
{
case COMPONENT_ARC_DRAW_TYPE:
{
......@@ -517,7 +517,7 @@ wxString Text;
int color = -1;
int HalfSize;
switch ( Struct->m_StructType )
switch ( Struct->Type() )
{
case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
case DRAW_LABEL_STRUCT_TYPE:
......@@ -529,7 +529,7 @@ int HalfSize;
pX = ((DrawTextStruct*)Struct)->m_Pos.x;
pY = ((DrawTextStruct*)Struct)->m_Pos.y;
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
if ( (g_PlotFormat == PLOT_FORMAT_POST) && g_PlotPSColorOpt )
color = ReturnLayerColor(((DrawTextStruct*)Struct)->m_Layer);
......@@ -545,7 +545,7 @@ int HalfSize;
switch(Orient)
{
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),
color, Text, TEXT_ORIENT_HORIZ, Size,
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_CENTER);
......@@ -556,7 +556,7 @@ int HalfSize;
break;
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),
color, Text, TEXT_ORIENT_VERT, Size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP);
......@@ -567,7 +567,7 @@ int HalfSize;
break;
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),
color, Text, TEXT_ORIENT_HORIZ, Size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER);
......@@ -578,7 +578,7 @@ int HalfSize;
break;
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),
color, Text, 2700, Size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM);
......@@ -590,7 +590,7 @@ int HalfSize;
}
/* 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;
HalfSize = Size.x / 2;
......
......@@ -574,7 +574,7 @@ wxString msg;
{
Plume('U');
layer = LAYER_NOTES;
switch( DrawList->m_StructType )
switch( DrawList->Type() )
{
case DRAW_BUSENTRY_STRUCT_TYPE :
#undef STRUCT
......@@ -585,7 +585,7 @@ wxString msg;
case DRAW_SEGMENT_STRUCT_TYPE :
#undef STRUCT
#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;
x2 = STRUCT->m_End.x; y2 = STRUCT->m_End.y;
......
......@@ -415,7 +415,7 @@ wxPoint StartPos, EndPos;
{
Plume('U');
layer = LAYER_NOTES;
switch( DrawList->m_StructType )
switch( DrawList->Type() )
{
case DRAW_BUSENTRY_STRUCT_TYPE : /* Struct Raccord et Segment sont identiques */
#undef STRUCT
......@@ -426,7 +426,7 @@ wxPoint StartPos, EndPos;
case DRAW_SEGMENT_STRUCT_TYPE :
#undef STRUCT
#define STRUCT ((EDA_DrawLineStruct*)DrawList)
if ( DrawList->m_StructType == DRAW_SEGMENT_STRUCT_TYPE)
if ( DrawList->Type() == DRAW_SEGMENT_STRUCT_TYPE)
{
StartPos = STRUCT->m_Start;
EndPos = STRUCT->m_End;
......
......@@ -119,13 +119,13 @@ public:
long m_TimeStamp;
public:
ComponentDataClass( void )
ComponentDataClass()
{
InitData();
}
void InitData( void )
void InitData()
{
m_TimeStamp = 0;
m_Reference[0] = 0;
......
......@@ -74,11 +74,11 @@ public:
public:
EDA_DrawLineStruct( const wxPoint &pos, int layer );
~EDA_DrawLineStruct( void ) { }
~EDA_DrawLineStruct() { }
bool IsOneEndPointAt( const wxPoint& pos );
EDA_DrawLineStruct* GenCopy( void );
EDA_DrawLineStruct* GenCopy();
bool IsNull( void )
bool IsNull()
{
return m_Start == m_End;
}
......@@ -98,9 +98,9 @@ public:
public:
DrawMarkerStruct( const wxPoint &pos, const wxString &text );
~DrawMarkerStruct( void );
DrawMarkerStruct* GenCopy( void );
wxString GetComment( void );
~DrawMarkerStruct();
DrawMarkerStruct* GenCopy();
wxString GetComment();
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int draw_mode, int Color = -1 );
};
......@@ -113,8 +113,8 @@ public:
public:
DrawNoConnectStruct( const wxPoint &pos );
~DrawNoConnectStruct( void ) { }
DrawNoConnectStruct* GenCopy( void );
~DrawNoConnectStruct() { }
DrawNoConnectStruct* GenCopy();
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int draw_mode, int Color = -1 );
};
......@@ -134,9 +134,9 @@ public:
public:
DrawBusEntryStruct( const wxPoint &pos, int shape, int id );
~DrawBusEntryStruct( void ) { }
DrawBusEntryStruct* GenCopy( void );
wxPoint m_End( void ); // retourne la coord de fin du raccord
~DrawBusEntryStruct() { }
DrawBusEntryStruct* GenCopy();
wxPoint m_End(); // retourne la coord de fin du raccord
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int draw_mode, int Color = -1 );
};
......@@ -151,8 +151,8 @@ public:
public:
DrawPolylineStruct( int layer );
~DrawPolylineStruct( void );
DrawPolylineStruct* GenCopy( void );
~DrawPolylineStruct();
DrawPolylineStruct* GenCopy();
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int draw_mode, int Color = -1 );
};
......@@ -165,28 +165,37 @@ public:
public:
DrawJunctionStruct( const wxPoint &pos );
~DrawJunctionStruct( void ) { }
DrawJunctionStruct* GenCopy( void );
~DrawJunctionStruct() { }
DrawJunctionStruct* GenCopy();
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int draw_mode, int Color = -1 );
};
class DrawTextStruct : public EDA_BaseStruct, public EDA_TextStruct
{
public:
int m_Layer;
int m_Shape;
bool m_IsDangling; // TRUE si non connect
bool m_IsDangling; // TRUE si non connect
public:
DrawTextStruct( const wxPoint& pos = wxPoint( 0, 0 ), const wxString& text = wxEmptyString );
~DrawTextStruct( void ) { }
DrawTextStruct* GenCopy( void );
DrawTextStruct( const wxPoint& pos = wxPoint( 0, 0 ), const wxString& text = wxEmptyString,
KICAD_T aType = DRAW_TEXT_STRUCT_TYPE );
~DrawTextStruct() { }
DrawTextStruct* GenCopy();
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int draw_mode,
int Color = -1 );
void SwapData( DrawTextStruct* copyitem );
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:
void DrawAsText( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
int draw_mode, int Color );
......@@ -201,7 +210,7 @@ class DrawLabelStruct : public DrawTextStruct
{
public:
DrawLabelStruct( const wxPoint& pos = wxPoint( 0, 0 ), const wxString& text = wxEmptyString );
~DrawLabelStruct( void ) { }
~DrawLabelStruct() { }
};
......@@ -210,7 +219,7 @@ class DrawGlobalLabelStruct : public DrawTextStruct
public:
DrawGlobalLabelStruct( const wxPoint& pos = wxPoint( 0, 0 ),
const wxString& text = wxEmptyString );
~DrawGlobalLabelStruct( void ) { }
~DrawGlobalLabelStruct() { }
};
......
......@@ -297,7 +297,7 @@ void InstallNetlistFrame(WinEDA_SchematicFrame *parent, wxPoint &pos);
/***************/
/* ANNOTATE.CPP */
/***************/
void ReAnnotatePowerSymbolsOnly( void );
void ReAnnotatePowerSymbolsOnly();
void InstallAnnotateFrame(WinEDA_SchematicFrame * parent, wxPoint &pos);
int CheckAnnotate(WinEDA_SchematicFrame * frame, bool OneSheetOnly);
......
......@@ -142,7 +142,7 @@ wxString dirbuf;
Phead = screen->EEDrawList;
while (Phead)
{
switch(Phead->m_StructType)
switch(Phead->Type())
{
case DRAW_LIB_ITEM_STRUCT_TYPE: /* Its a library item. */
SavePartDescr( f, (EDA_SchComponentStruct *) Phead);
......
This diff is collapsed.
......@@ -436,7 +436,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
break;
// 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() ) );
case ID_POPUP_SCH_DELETE:
......@@ -489,7 +489,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_MOVE_CMP_REQUEST:
// 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() ) );
if( m_CurrentScreen->GetCurItem() == NULL )
break;
......@@ -502,7 +502,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_EDIT_CMP:
// 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() ) );
if( m_CurrentScreen->GetCurItem() == NULL )
break;
......@@ -517,7 +517,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_ORIENT_NORMAL_CMP:
// 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() ) );
if( m_CurrentScreen->GetCurItem() == NULL )
break;
......@@ -559,7 +559,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_EDIT_VALUE_CMP:
// 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() ) );
if( m_CurrentScreen->GetCurItem() == NULL )
break;
......@@ -570,7 +570,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_EDIT_REF_CMP:
// 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() ) );
if( m_CurrentScreen->GetCurItem() == NULL )
break;
......@@ -581,7 +581,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_EDIT_CONVERT_CMP:
// 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() ) );
if( m_CurrentScreen->GetCurItem() == NULL )
break;
......@@ -595,7 +595,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
DrawPanel->MouseToCursorSchema();
{
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() ) );
olditem = (EDA_SchComponentStruct*) m_CurrentScreen->GetCurItem();
if( olditem == NULL )
......@@ -638,7 +638,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_SELECT_UNIT26:
// 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() ) );
if( m_CurrentScreen->GetCurItem() == NULL )
break;
......@@ -652,7 +652,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_DISPLAYDOC_CMP:
// 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() ) );
if( m_CurrentScreen->GetCurItem() == NULL )
break;
......@@ -669,7 +669,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_SCH_ENTER_SHEET:
{
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 );
}
......@@ -781,7 +781,7 @@ void WinEDA_SchematicFrame::Process_Move_Item( EDA_BaseStruct* DrawStruct,
DrawPanel->MouseToCursorSchema();
switch( DrawStruct->m_StructType )
switch( DrawStruct->Type() )
{
case DRAW_JUNCTION_STRUCT_TYPE:
break;
......@@ -820,7 +820,7 @@ void WinEDA_SchematicFrame::Process_Move_Item( EDA_BaseStruct* DrawStruct,
wxString msg;
msg.Printf(
wxT( "WinEDA_SchematicFrame::Move_Item Error: Bad DrawType %d" ),
DrawStruct->m_StructType );
DrawStruct->Type() );
DisplayError( this, msg );
break;
}
......
This diff is collapsed.
......@@ -385,7 +385,7 @@ void WinEDA_SchematicFrame::ReSizeSheet( DrawSheetStruct* Sheet, wxDC* DC )
if( Sheet->m_Flags & IS_NEW )
return;
if( Sheet->m_StructType != DRAW_SHEET_STRUCT_TYPE )
if( Sheet->Type() != DRAW_SHEET_STRUCT_TYPE )
{
DisplayError( this, wxT( "WinEDA_SchematicFrame::ReSizeSheet: Bad SructType" ) );
return;
......@@ -420,7 +420,7 @@ void WinEDA_SchematicFrame::ReSizeSheet( 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;
DrawPanel->CursorOff( DC );
......@@ -573,7 +573,7 @@ void DrawSheetStruct::CleanupSheet( WinEDA_SchematicFrame* frame, wxDC* DC )
DrawGlobalLabelStruct* GLabel = NULL;
for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext )
{
if( DrawStruct->m_StructType != DRAW_GLOBAL_LABEL_STRUCT_TYPE )
if( DrawStruct->Type() != DRAW_GLOBAL_LABEL_STRUCT_TYPE )
continue;
GLabel = (DrawGlobalLabelStruct*) DrawStruct;
if( Pinsheet->m_Text.CmpNoCase( GLabel->m_Text ) == 0 )
......
......@@ -54,7 +54,7 @@ public:
WinEDA_PinSheetPropertiesFrame( WinEDA_SchematicFrame* parent,
DrawSheetLabelStruct* curr_pinsheet,
const wxPoint& framepos = wxPoint( -1, -1 ) );
~WinEDA_PinSheetPropertiesFrame( void ) { };
~WinEDA_PinSheetPropertiesFrame() { };
private:
void PinSheetPropertiesAccept( wxCommandEvent& event );
......@@ -371,7 +371,7 @@ DrawSheetLabelStruct* WinEDA_SchematicFrame::Import_PinSheet( DrawSheetStruct* S
GLabel = NULL;
for( ; DrawStruct != NULL; DrawStruct = DrawStruct->Pnext )
{
if( DrawStruct->m_StructType != DRAW_GLOBAL_LABEL_STRUCT_TYPE )
if( DrawStruct->Type() != DRAW_GLOBAL_LABEL_STRUCT_TYPE )
continue;
GLabel = (DrawGlobalLabelStruct*) DrawStruct;
......@@ -437,7 +437,7 @@ void WinEDA_SchematicFrame::DeleteSheetLabel( wxDC* DC,
if( DrawStruct ) // Modification du chainage
{
if( DrawStruct->m_StructType != DRAW_SHEET_STRUCT_TYPE )
if( DrawStruct->Type() != DRAW_SHEET_STRUCT_TYPE )
{
DisplayError( this,
wxT( "DeleteSheetLabel error: m_Parent != DRAW_SHEET_STRUCT_TYPE" ) );
......
......@@ -71,7 +71,7 @@ bodygraphics_PropertiesAccept( wxCommandEvent& event )
CurrentDrawItem->m_Convert = 0;
if( m_Filled )
{
switch( CurrentDrawItem->m_StructType )
switch( CurrentDrawItem->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
( (LibDrawArc*) CurrentDrawItem )->m_Fill = FlSymbol_Fill;
......@@ -143,7 +143,7 @@ static void AbortSymbolTraceOn( WinEDA_DrawPanel* Panel, wxDC* DC )
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 );
}
......@@ -339,7 +339,7 @@ void WinEDA_LibeditFrame::GraphicItemBeginDraw( wxDC* DC )
if( CurrentDrawItem == NULL )
return;
switch( CurrentDrawItem->m_StructType )
switch( CurrentDrawItem->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
if( StateDrawArc == 1 )
......@@ -414,7 +414,7 @@ void MoveLibDrawItemAt( LibEDA_BaseStruct* DrawItem, wxPoint newpos )
int mx = newpos.x, my = newpos.y;
wxSize size;
switch( DrawItem->m_StructType )
switch( DrawItem->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
{
......@@ -485,7 +485,7 @@ void WinEDA_LibeditFrame::StartMoveDrawSymbol( wxDC* DC )
CurrentDrawItem->m_Flags |= IS_MOVED;
StartCursor = m_CurrentScreen->m_Curseur;
switch( CurrentDrawItem->m_StructType )
switch( CurrentDrawItem->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
InitPosition = ( (LibDrawArc*) CurrentDrawItem )->m_Pos;
......@@ -548,7 +548,7 @@ static void SymbolDisplayDraw( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
{
DrawLibraryDrawStruct( panel, DC, CurrentLibEntry, 0, 0,
CurrentDrawItem, CurrentUnit, DrawMode );
if( CurrentDrawItem->m_StructType == COMPONENT_ARC_DRAW_TYPE )
if( CurrentDrawItem->Type() == COMPONENT_ARC_DRAW_TYPE )
{
int Color = ReturnLayerColor( LAYER_DEVICE );
GRDashedLine( &panel->m_ClipBox, DC, ArcStartX, -ArcStartY,
......@@ -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:
if( StateDrawArc == 1 )
......@@ -620,7 +620,7 @@ static void SymbolDisplayDraw( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
{
DrawLibraryDrawStruct( panel, DC, CurrentLibEntry, 0, 0,
CurrentDrawItem, CurrentUnit, DrawMode );
if( CurrentDrawItem->m_StructType == COMPONENT_ARC_DRAW_TYPE )
if( CurrentDrawItem->Type() == COMPONENT_ARC_DRAW_TYPE )
{
int Color = ReturnLayerColor( LAYER_DEVICE );
GRDashedLine( &panel->m_ClipBox, DC, ArcStartX, -ArcStartY,
......@@ -652,7 +652,7 @@ void WinEDA_LibeditFrame::EndDrawGraphicItem( wxDC* DC )
if( CurrentDrawItem == NULL )
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 */
{
......@@ -673,7 +673,7 @@ void WinEDA_LibeditFrame::EndDrawGraphicItem( wxDC* DC )
CurrentDrawItem->Pnext = CurrentLibEntry->m_Drawings;
CurrentLibEntry->m_Drawings = CurrentDrawItem;
switch( CurrentDrawItem->m_StructType )
switch( CurrentDrawItem->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
( (LibDrawArc*) CurrentDrawItem )->m_Fill = FlSymbol_Fill;
......@@ -821,7 +821,7 @@ void WinEDA_LibeditFrame::DeleteDrawPoly( wxDC* DC )
{
if( CurrentDrawItem == NULL )
return;
if( CurrentDrawItem->m_StructType != COMPONENT_POLYLINE_DRAW_TYPE )
if( CurrentDrawItem->Type() != COMPONENT_POLYLINE_DRAW_TYPE )
return;
int* ptpoly;
......
......@@ -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
......@@ -218,7 +218,7 @@ void WinEDA_LibeditFrame::SaveOneSymbol( void )
if( SymbConvert > 1 )
SymbConvert = 1;
switch( DrawEntry->m_StructType )
switch( DrawEntry->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
#define DRAWSTRUCT ( (LibDrawArc*) DrawEntry )
......@@ -323,14 +323,14 @@ static bool CompareSymbols( LibEDA_BaseStruct* DEntryRef,
int* ptref, * ptcomp;
/* Comparaison des proprietes generales */
if( DEntryRef->m_StructType != DEntryCompare->m_StructType )
if( DEntryRef->Type() != DEntryCompare->Type() )
return FALSE;
if( DEntryRef->m_Unit != DEntryCompare->m_Unit )
return FALSE;
if( DEntryRef->m_Convert != DEntryCompare->m_Convert )
return FALSE;
switch( DEntryRef->m_StructType )
switch( DEntryRef->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
#undef REFSTRUCT
......@@ -427,7 +427,7 @@ static bool CompareSymbols( LibEDA_BaseStruct* DEntryRef,
/* d'ancrage ( coord 0,0 ). */
/***************************************************************************/
void WinEDA_LibeditFrame::PlaceAncre( void )
void WinEDA_LibeditFrame::PlaceAncre()
{
int ii, * ptsegm;
int dx, dy; /* Offsets de deplacement */
......@@ -449,7 +449,7 @@ void WinEDA_LibeditFrame::PlaceAncre( void )
DrawEntry = LibEntry->m_Drawings;
while( DrawEntry )
{
switch( DrawEntry->m_StructType )
switch( DrawEntry->Type() )
{
case COMPONENT_ARC_DRAW_TYPE:
#undef STRUCT
......
......@@ -282,7 +282,7 @@ void WinEDA_LibeditFrame::EditSymbolText(wxDC * DC,
int DrawMode = g_XorMode;
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 */
if( ((LibDrawText*)DrawItem)->m_Text && DC)
......
......@@ -35,7 +35,7 @@
/****************************************************/
void WinEDA_LibeditFrame::ReCreateVToolbar( void )
void WinEDA_LibeditFrame::ReCreateVToolbar()
/****************************************************/
{
if( m_VToolBar == NULL )
......@@ -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
......
......@@ -37,7 +37,7 @@
/**************************************************************/
void WinEDA_SchematicFrame::ReCreateHToolbar( void )
void WinEDA_SchematicFrame::ReCreateHToolbar()
/**************************************************************/
/* Create the main Horizontal Toolbar for the schematic editor
......@@ -144,7 +144,7 @@ void WinEDA_SchematicFrame::ReCreateHToolbar( void )
/*************************************************/
void WinEDA_SchematicFrame::ReCreateVToolbar( void )
void WinEDA_SchematicFrame::ReCreateVToolbar()
/*************************************************/
/* Create Vertical Right Toolbar
......@@ -239,7 +239,7 @@ void WinEDA_SchematicFrame::ReCreateVToolbar( void )
/****************************************************************/
void WinEDA_SchematicFrame::ReCreateOptToolbar( void )
void WinEDA_SchematicFrame::ReCreateOptToolbar()
/****************************************************************/
/* Create Vertical Left Toolbar (Option Toolbar)
......
......@@ -25,7 +25,7 @@ void Affiche_Infos_PCB_Texte( WinEDA_BasePcbFrame* frame, TEXTE_PCB* pt_texte )
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 );
else
......@@ -74,7 +74,7 @@ void Affiche_Infos_Piste( WinEDA_BasePcbFrame* frame, TRACK* pt_piste )
d_index = pt_piste->m_NetCode;
pt_D_code = ReturnToolDescr( layer, d_index, &ii );
switch( pt_piste->m_StructType )
switch( pt_piste->Type() )
{
case TYPETRACK:
if( pt_piste->m_Shape < S_SPOT_CIRCLE )
......
......@@ -62,7 +62,7 @@ TRACK* WinEDA_GerberFrame::Delete_Segment( wxDC* DC, TRACK* Track )
g_CurrentTrackSegment = (TRACK*) g_CurrentTrackSegment->Pback;
delete Track; g_TrackSegmentCount--;
if( g_TrackSegmentCount && (g_CurrentTrackSegment->m_StructType == TYPEVIA) )
if( g_TrackSegmentCount && (g_CurrentTrackSegment->Type() == TYPEVIA) )
{
Track = g_CurrentTrackSegment;
g_CurrentTrackSegment = (TRACK*) g_CurrentTrackSegment->Pback;
......
......@@ -30,12 +30,12 @@ void WinEDA_GerberFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
if( DrawStruct && DrawStruct->m_Flags ) // Commande "POPUP" en cours
{
switch( DrawStruct->m_StructType )
switch( DrawStruct->Type() )
{
default:
msg.Printf(
wxT( "WinEDA_GerberFrame::ProcessCommand err: Struct %d, m_Flags = %X" ),
(unsigned) DrawStruct->m_StructType,
(unsigned) DrawStruct->Type(),
(unsigned) DrawStruct->m_Flags );
DisplayError( this, msg );
}
......@@ -60,7 +60,7 @@ void WinEDA_GerberFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
DrawStruct = GerberGeneralLocateAndDisplay();
if( DrawStruct == NULL )
break;
if( DrawStruct->m_StructType == TYPETRACK )
if( DrawStruct->Type() == TYPETRACK )
{
Delete_Segment( DC, (TRACK*) DrawStruct );
GetScreen()->SetCurItem( NULL );
......@@ -309,13 +309,13 @@ static void Process_Move_Item( WinEDA_GerberFrame* frame,
frame->DrawPanel->MouseToCursorSchema();
switch( DrawStruct->m_StructType )
switch( DrawStruct->Type() )
{
default:
wxString msg;
msg.Printf(
wxT( "WinEDA_LibeditFrame::Move_Item Error: Bad DrawType %d" ),
DrawStruct->m_StructType );
DrawStruct->Type() );
DisplayError( frame, msg );
break;
}
......@@ -350,7 +350,7 @@ void WinEDA_GerberFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
break;
// Element localis
switch( DrawStruct->m_StructType )
switch( DrawStruct->Type() )
{
default:
break;
......
This diff is collapsed.
......@@ -115,7 +115,7 @@ void WinEDA_GerberFrame::Erase_Segments_Pcb( wxDC* DC,
{
PtNext = PtStruct->Next();
switch( PtStruct->m_StructType )
switch( PtStruct->Type() )
{
case TYPEDRAWSEGMENT:
case TYPETEXTE:
......@@ -179,7 +179,7 @@ void WinEDA_GerberFrame::Erase_Textes_Pcb( wxDC* DC, bool query )
for( ; PtStruct != NULL; PtStruct = PtNext )
{
PtNext = PtStruct->Next();
if( PtStruct->m_StructType == TYPETEXTE )
if( PtStruct->Type() == TYPETEXTE )
DeleteStructure( PtStruct );
}
......
......@@ -57,7 +57,7 @@ EDA_BaseStruct* WinEDA_GerberFrame::Locate( int typeloc )
while( ( TrackLocate = Locate_Pistes( TrackLocate, layer, typeloc ) ) != NULL )
{
Track = TrackLocate;
if( TrackLocate->m_StructType == TYPEVIA )
if( TrackLocate->Type() == TYPEVIA )
break;
TrackLocate = (TRACK*) TrackLocate->Pnext;
}
......@@ -112,7 +112,7 @@ DRAWSEGMENT* Locate_Segment_Pcb( BOARD* Pcb, int typeloc )
PtStruct = Pcb->m_Drawings;
for( ; PtStruct != NULL; PtStruct = PtStruct->Next() )
{
if( PtStruct->m_StructType != TYPEDRAWSEGMENT )
if( PtStruct->Type() != TYPEDRAWSEGMENT )
continue;
pts = (DRAWSEGMENT*) PtStruct;
ux0 = pts->m_Start.x; uy0 = pts->m_Start.y;
......@@ -198,7 +198,7 @@ TRACK* Locate_Pistes( TRACK* start_adresse, wxPoint ref, int Layer )
dx -= ux0; dy -= 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) )
{
......@@ -289,7 +289,7 @@ TEXTE_PCB* Locate_Texte_Pcb( TEXTE_PCB* pt_txt_pcb, int typeloc )
PtStruct = (EDA_BaseStruct*) pt_txt_pcb;
for( ; PtStruct != NULL; PtStruct = PtStruct->Pnext )
{
if( PtStruct->m_StructType != TYPETEXTE )
if( PtStruct->Type() != TYPETEXTE )
continue;
pt_txt_pcb = (TEXTE_PCB*) PtStruct;
......
......@@ -71,7 +71,7 @@ void WinEDA_GerberFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu
GetScreen()->SetCurItem( DrawStruct );
switch( DrawStruct->m_StructType )
switch( DrawStruct->Type() )
{
case TYPETRACK:
......@@ -84,7 +84,7 @@ void WinEDA_GerberFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu
default:
msg.Printf(
wxT( "WinEDA_GerberFrame::OnRightClick Error: illegal or unknown DrawType %d" ),
DrawStruct->m_StructType );
DrawStruct->Type() );
DisplayError( this, msg );
break;
}
......
......@@ -8,7 +8,7 @@ int * InstallDialogLayerPairChoice(WinEDA_GerberFrame * parent);
/****************/
/* undelete.cpp */
/****************/
EDA_BaseStruct * SaveItemEfface(EDA_BaseStruct * PtItem, int nbitems);
BOARD_ITEM* SaveItemEfface( BOARD_ITEM* PtItem, int nbitems );
/***********/
......
......@@ -28,7 +28,7 @@ wxString msg;
PtNext = PtStruct->Pnext;
PtBack = PtStruct->Pback;
switch( PtStruct->m_StructType )
switch( PtStruct->Type() )
{
case TYPE_NOT_INIT:
DisplayError(NULL, wxT("DeleteStruct: Type NOT_INIT"));
......@@ -69,7 +69,7 @@ wxString msg;
case TYPEPCB:
default:
msg.Printf( wxT("DeleteStructure: unexpected %d type"),
PtStruct->m_StructType);
PtStruct->Type());
DisplayError(NULL, msg);
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