see change_log for 2007-Aug-31
This commit is contained in:
parent
726a8ab4df
commit
dff70646a2
|
@ -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<6E>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 :
|
||||
|
|
|
@ -371,7 +371,7 @@ void WinEDA_SchematicFrame::HandleBlockEndByPopUp( int Command, wxDC* DC )
|
|||
DrawPanel->ManageCurseur( DrawPanel, DC, FALSE );
|
||||
if( block->m_BlockDrawStruct )
|
||||
{
|
||||
if( block->m_BlockDrawStruct->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
if( block->m_BlockDrawStruct->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{ /* Delete the picked wrapper if this is a picked list. */
|
||||
DrawPickedStruct* PickedList;
|
||||
PickedList = (DrawPickedStruct*) block->m_BlockDrawStruct;
|
||||
|
@ -490,7 +490,7 @@ static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC,
|
|||
PtBlock->Offset( -PtBlock->m_MoveVector.x, -PtBlock->m_MoveVector.y );
|
||||
|
||||
/* Effacement ancien affichage */
|
||||
if( PtBlock->m_BlockDrawStruct->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
if( PtBlock->m_BlockDrawStruct->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
PickedList = (DrawPickedStruct*) PtBlock->m_BlockDrawStruct;
|
||||
while( PickedList )
|
||||
|
@ -523,7 +523,7 @@ static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC,
|
|||
|
||||
if( PtBlock->m_BlockDrawStruct )
|
||||
{
|
||||
if( PtBlock->m_BlockDrawStruct->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
if( PtBlock->m_BlockDrawStruct->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
PickedList = (DrawPickedStruct*) PtBlock->m_BlockDrawStruct;
|
||||
while( PickedList )
|
||||
|
@ -558,7 +558,7 @@ bool MoveStruct( WinEDA_DrawPanel* panel, wxDC* DC, EDA_BaseStruct* DrawStruct )
|
|||
if( !DrawStruct )
|
||||
return FALSE;
|
||||
|
||||
if( DrawStruct->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
if( DrawStruct->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
if( DC )
|
||||
RedrawStructList( panel, DC, DrawStruct, g_XorMode );
|
||||
|
@ -613,7 +613,7 @@ void MirrorOneStruct( EDA_BaseStruct* DrawStruct, wxPoint& Center )
|
|||
if( !DrawStruct )
|
||||
return;
|
||||
|
||||
switch( DrawStruct->m_StructType )
|
||||
switch( DrawStruct->Type() )
|
||||
{
|
||||
case TYPE_NOT_INIT:
|
||||
break;
|
||||
|
@ -756,7 +756,7 @@ bool MirrorStruct( WinEDA_DrawPanel* panel, wxDC* DC, EDA_BaseStruct* DrawStruct
|
|||
if( !DrawStruct )
|
||||
return FALSE;
|
||||
|
||||
if( DrawStruct->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
if( DrawStruct->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
if( DC )
|
||||
RedrawStructList( panel, DC, DrawStruct, g_XorMode );
|
||||
|
@ -813,14 +813,14 @@ static EDA_BaseStruct* CopyStruct( WinEDA_DrawPanel* panel, wxDC* DC, BASE_SCREE
|
|||
|
||||
PlaceStruct( screen, NewDrawStruct );
|
||||
/* Draw the new structure and chain it in: */
|
||||
if( NewDrawStruct->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
if( NewDrawStruct->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
PickedList = (DrawPickedStruct*) NewDrawStruct;
|
||||
while( PickedList ) // Clear annotation for new components
|
||||
{
|
||||
EDA_BaseStruct* Struct = PickedList->m_PickedStruct;
|
||||
|
||||
switch( Struct->m_StructType )
|
||||
switch( Struct->Type() )
|
||||
{
|
||||
case DRAW_LIB_ITEM_STRUCT_TYPE:
|
||||
{
|
||||
|
@ -862,7 +862,7 @@ static EDA_BaseStruct* CopyStruct( WinEDA_DrawPanel* panel, wxDC* DC, BASE_SCREE
|
|||
}
|
||||
else
|
||||
{
|
||||
switch( NewDrawStruct->m_StructType )
|
||||
switch( NewDrawStruct->Type() )
|
||||
{
|
||||
case DRAW_POLYLINE_STRUCT_TYPE:
|
||||
case DRAW_JUNCTION_STRUCT_TYPE:
|
||||
|
@ -905,7 +905,7 @@ static EDA_BaseStruct* CopyStruct( WinEDA_DrawPanel* panel, wxDC* DC, BASE_SCREE
|
|||
}
|
||||
|
||||
/* Free the original DrawPickedStruct chain: */
|
||||
if( DrawStruct->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
if( DrawStruct->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
PickedList = (DrawPickedStruct*) DrawStruct;
|
||||
PickedList->DeleteWrapperList();
|
||||
|
@ -931,7 +931,7 @@ void DeleteStruct( WinEDA_DrawPanel* panel, wxDC* DC, EDA_BaseStruct* DrawStruct
|
|||
return;
|
||||
|
||||
|
||||
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 */
|
||||
frame->SaveCopyInUndoList( ( (DrawSheetLabelStruct*) DrawStruct )->m_Parent, IS_CHANGED );
|
||||
|
@ -939,7 +939,7 @@ void DeleteStruct( WinEDA_DrawPanel* panel, wxDC* DC, EDA_BaseStruct* DrawStruct
|
|||
return;
|
||||
}
|
||||
|
||||
if( DrawStruct->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
if( DrawStruct->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
/* Unlink all picked structs from current EEDrawList */
|
||||
PickedList = (DrawPickedStruct*) DrawStruct;
|
||||
|
@ -988,7 +988,7 @@ EDA_BaseStruct* SaveStructListForPaste( EDA_BaseStruct* DrawStruct )
|
|||
/* Make a copy of the original picked item. */
|
||||
DrawStructCopy = DuplicateStruct( DrawStruct );
|
||||
|
||||
if( DrawStruct->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
if( DrawStruct->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
/* Delete the picked wrapper if this is a picked list. */
|
||||
PickedList = (DrawPickedStruct*) DrawStruct;
|
||||
|
@ -1036,12 +1036,12 @@ void WinEDA_SchematicFrame::PasteStruct( wxDC* DC )
|
|||
RedrawStructList( DrawPanel, DC, DrawStruct, GR_DEFAULT_DRAWMODE );
|
||||
|
||||
// Clear annotation and init new time stamp for the new components:
|
||||
if( DrawStruct->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
if( DrawStruct->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
for( PickedList = (DrawPickedStruct*) DrawStruct; PickedList != NULL; ) // Clear annotation for new components
|
||||
{
|
||||
EDA_BaseStruct* Struct = PickedList->m_PickedStruct;
|
||||
if( Struct->m_StructType == DRAW_LIB_ITEM_STRUCT_TYPE )
|
||||
if( Struct->Type() == DRAW_LIB_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
( (EDA_SchComponentStruct*) Struct )->m_TimeStamp = GetTimeStamp();
|
||||
( (EDA_SchComponentStruct*) Struct )->ClearAnnotation();
|
||||
|
@ -1065,7 +1065,7 @@ void WinEDA_SchematicFrame::PasteStruct( wxDC* DC )
|
|||
}
|
||||
else
|
||||
{
|
||||
if( DrawStruct->m_StructType == DRAW_LIB_ITEM_STRUCT_TYPE )
|
||||
if( DrawStruct->Type() == DRAW_LIB_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
( (EDA_SchComponentStruct*) DrawStruct )->m_TimeStamp = GetTimeStamp();
|
||||
( (EDA_SchComponentStruct*) DrawStruct )->ClearAnnotation();
|
||||
|
@ -1104,7 +1104,7 @@ bool PlaceStruct( BASE_SCREEN* screen, EDA_BaseStruct* DrawStruct )
|
|||
move_vector.y = screen->m_Curseur.y -
|
||||
screen->BlockLocate.m_BlockLastCursorPosition.y;
|
||||
|
||||
switch( DrawStruct->m_StructType )
|
||||
switch( DrawStruct->Type() )
|
||||
{
|
||||
default:
|
||||
case TYPE_NOT_INIT:
|
||||
|
@ -1161,7 +1161,7 @@ void MoveOneStruct( EDA_BaseStruct* DrawStruct, const wxPoint& move_vector )
|
|||
if( !DrawStruct )
|
||||
return;
|
||||
|
||||
switch( DrawStruct->m_StructType )
|
||||
switch( DrawStruct->Type() )
|
||||
{
|
||||
case TYPE_NOT_INIT:
|
||||
break;
|
||||
|
@ -1276,7 +1276,7 @@ EDA_BaseStruct* DuplicateStruct( EDA_BaseStruct* DrawStruct )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
switch( DrawStruct->m_StructType )
|
||||
switch( DrawStruct->Type() )
|
||||
{
|
||||
case DRAW_POLYLINE_STRUCT_TYPE:
|
||||
NewDrawStruct = ( (DrawPolylineStruct*) DrawStruct )->GenCopy();
|
||||
|
@ -1350,7 +1350,7 @@ EDA_BaseStruct* DuplicateStruct( EDA_BaseStruct* DrawStruct )
|
|||
{
|
||||
wxString msg;
|
||||
msg << wxT( "DuplicateStruct error: unexpected StructType " ) <<
|
||||
DrawStruct->m_StructType << wxT( " " ) << DrawStruct->ReturnClassName();
|
||||
DrawStruct->Type() << wxT( " " ) << DrawStruct->ReturnClassName();
|
||||
DisplayError( NULL, msg );
|
||||
}
|
||||
break;
|
||||
|
@ -1374,10 +1374,10 @@ static void CollectStructsToDrag( SCH_SCREEN* screen )
|
|||
for( Struct = screen->EEDrawList; Struct != NULL; Struct = Struct->Pnext )
|
||||
Struct->m_Flags = 0;
|
||||
|
||||
if( screen->BlockLocate.m_BlockDrawStruct->m_StructType == DRAW_SEGMENT_STRUCT_TYPE )
|
||||
if( screen->BlockLocate.m_BlockDrawStruct->Type() == DRAW_SEGMENT_STRUCT_TYPE )
|
||||
screen->BlockLocate.m_BlockDrawStruct->m_Flags = SELECTED;
|
||||
|
||||
else if( screen->BlockLocate.m_BlockDrawStruct->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
else if( screen->BlockLocate.m_BlockDrawStruct->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
DrawStructs = (DrawPickedStruct*) screen->BlockLocate.m_BlockDrawStruct;
|
||||
while( DrawStructs )
|
||||
|
@ -1403,7 +1403,7 @@ static void CollectStructsToDrag( SCH_SCREEN* screen )
|
|||
|
||||
/* Pour Drag Block: remise sous forme de liste de structure, s'il n'y
|
||||
* a qu'un seul element ( pour homogeneiser les traitements ulterieurs */
|
||||
if( screen->BlockLocate.m_BlockDrawStruct->m_StructType != DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
if( screen->BlockLocate.m_BlockDrawStruct->Type() != DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
DrawStructs = new DrawPickedStruct( screen->BlockLocate.m_BlockDrawStruct );
|
||||
screen->BlockLocate.m_BlockDrawStruct = DrawStructs;
|
||||
|
@ -1416,7 +1416,7 @@ static void CollectStructsToDrag( SCH_SCREEN* screen )
|
|||
{
|
||||
Struct = DrawStructs->m_PickedStruct;
|
||||
DrawStructs = (DrawPickedStruct*) DrawStructs->Pnext;
|
||||
if( Struct->m_StructType == DRAW_SEGMENT_STRUCT_TYPE )
|
||||
if( Struct->Type() == DRAW_SEGMENT_STRUCT_TYPE )
|
||||
{
|
||||
SegmStruct = (EDA_DrawLineStruct*) Struct;
|
||||
if( (SegmStruct->m_Start.x < ox) || (SegmStruct->m_Start.x > fx)
|
||||
|
@ -1438,7 +1438,7 @@ static void CollectStructsToDrag( SCH_SCREEN* screen )
|
|||
{
|
||||
Struct = DrawStructs->m_PickedStruct;
|
||||
DrawStructs = (DrawPickedStruct*) DrawStructs->Pnext;
|
||||
if( Struct->m_StructType == DRAW_LIB_ITEM_STRUCT_TYPE )
|
||||
if( Struct->Type() == DRAW_LIB_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
LibEDA_BaseStruct* DrawItem;
|
||||
int x, y;
|
||||
|
@ -1452,18 +1452,18 @@ static void CollectStructsToDrag( SCH_SCREEN* screen )
|
|||
}
|
||||
}
|
||||
|
||||
if( Struct->m_StructType == DRAW_SHEET_STRUCT_TYPE )
|
||||
if( Struct->Type() == DRAW_SHEET_STRUCT_TYPE )
|
||||
{
|
||||
DrawSheetLabelStruct* SLabel = ( (DrawSheetStruct*) Struct )->m_Label;
|
||||
while( SLabel )
|
||||
{
|
||||
if( SLabel->m_StructType == DRAW_SHEETLABEL_STRUCT_TYPE )
|
||||
if( SLabel->Type() == DRAW_SHEETLABEL_STRUCT_TYPE )
|
||||
AddPickedItem( screen, SLabel->m_Pos.x, SLabel->m_Pos.y );
|
||||
SLabel = (DrawSheetLabelStruct*) SLabel->Pnext;
|
||||
}
|
||||
}
|
||||
|
||||
if( Struct->m_StructType == DRAW_BUSENTRY_STRUCT_TYPE )
|
||||
if( Struct->Type() == DRAW_BUSENTRY_STRUCT_TYPE )
|
||||
{
|
||||
DrawBusEntryStruct* item = (DrawBusEntryStruct*) Struct;
|
||||
AddPickedItem( screen, item->m_Pos.x, item->m_Pos.y );
|
||||
|
@ -1487,7 +1487,7 @@ static void AddPickedItem( SCH_SCREEN* screen, int px, int py )
|
|||
Struct = DrawStructs->m_PickedStruct;
|
||||
DrawStructs = (DrawPickedStruct*) DrawStructs->Pnext;
|
||||
|
||||
switch( Struct->m_StructType )
|
||||
switch( Struct->Type() )
|
||||
{
|
||||
case DRAW_SEGMENT_STRUCT_TYPE:
|
||||
#undef STRUCT
|
||||
|
@ -1509,7 +1509,7 @@ static void AddPickedItem( SCH_SCREEN* screen, int px, int py )
|
|||
Struct = screen->EEDrawList;
|
||||
while( Struct )
|
||||
{
|
||||
switch( Struct->m_StructType )
|
||||
switch( Struct->Type() )
|
||||
{
|
||||
case TYPE_NOT_INIT:
|
||||
break;
|
||||
|
@ -1684,7 +1684,7 @@ static LibEDA_BaseStruct* GetNextPinPosition( EDA_SchComponentStruct* DrawLibIte
|
|||
continue;
|
||||
if( convert && DEntry->m_Convert && (DEntry->m_Convert != convert) )
|
||||
continue;
|
||||
if( DEntry->m_StructType != COMPONENT_PIN_DRAW_TYPE )
|
||||
if( DEntry->Type() != COMPONENT_PIN_DRAW_TYPE )
|
||||
continue;
|
||||
|
||||
Pin = (LibDrawPin*) DEntry;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -14,16 +14,16 @@
|
|||
#include "protos.h"
|
||||
|
||||
|
||||
/************************/
|
||||
/* class DrawTextStruct */
|
||||
/* class DrawLabelStruct */
|
||||
/* class DrawGlobalLabelStruct */
|
||||
/************************/
|
||||
/************************/
|
||||
/* class DrawTextStruct */
|
||||
/* class DrawLabelStruct */
|
||||
/* class DrawGlobalLabelStruct */
|
||||
/************************/
|
||||
|
||||
/**************************************************************************/
|
||||
DrawTextStruct::DrawTextStruct(const wxPoint & pos, const wxString & text):
|
||||
EDA_BaseStruct(DRAW_TEXT_STRUCT_TYPE),
|
||||
EDA_TextStruct(text)
|
||||
DrawTextStruct::DrawTextStruct( const wxPoint& pos, const wxString& text, KICAD_T aType ) :
|
||||
EDA_BaseStruct( aType ),
|
||||
EDA_TextStruct( text )
|
||||
/**************************************************************************/
|
||||
{
|
||||
m_Layer = LAYER_NOTES;
|
||||
|
@ -32,13 +32,28 @@ DrawTextStruct::DrawTextStruct(const wxPoint & pos, const wxString & text):
|
|||
m_IsDangling = FALSE;
|
||||
}
|
||||
|
||||
|
||||
/*********************************************/
|
||||
DrawTextStruct * DrawTextStruct::GenCopy(void)
|
||||
DrawTextStruct* DrawTextStruct::GenCopy()
|
||||
/*********************************************/
|
||||
{
|
||||
DrawTextStruct * newitem = new DrawTextStruct(m_Pos, m_Text);
|
||||
DrawTextStruct* newitem;
|
||||
|
||||
switch( Type() )
|
||||
{
|
||||
case DRAW_TEXT_STRUCT_TYPE:
|
||||
newitem = new DrawTextStruct( m_Pos, m_Text );
|
||||
break;
|
||||
case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
|
||||
newitem = new DrawGlobalLabelStruct( m_Pos, m_Text );
|
||||
break;
|
||||
case DRAW_LABEL_STRUCT_TYPE:
|
||||
newitem = new DrawLabelStruct( m_Pos, m_Text );
|
||||
break;
|
||||
default:
|
||||
newitem = 0; // will crash below
|
||||
}
|
||||
|
||||
newitem->m_StructType = m_StructType;
|
||||
newitem->m_Layer = m_Layer;
|
||||
newitem->m_Shape = m_Shape;
|
||||
newitem->m_Orient = m_Orient;
|
||||
|
@ -46,67 +61,76 @@ DrawTextStruct * newitem = new DrawTextStruct(m_Pos, m_Text);
|
|||
newitem->m_Width = m_Width;
|
||||
newitem->m_HJustify = m_HJustify;
|
||||
newitem->m_VJustify = m_VJustify;
|
||||
newitem->m_IsDangling = m_IsDangling ;
|
||||
newitem->m_IsDangling = m_IsDangling;
|
||||
|
||||
return newitem;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************/
|
||||
void DrawTextStruct::SwapData(DrawTextStruct * copyitem)
|
||||
void DrawTextStruct::SwapData( DrawTextStruct* copyitem )
|
||||
/********************************************************/
|
||||
{
|
||||
EXCHG(m_Text, copyitem->m_Text);
|
||||
EXCHG(m_Pos, copyitem->m_Pos);
|
||||
EXCHG(m_Size, copyitem->m_Size);
|
||||
EXCHG(m_Width, copyitem->m_Width);
|
||||
EXCHG(m_Shape, copyitem->m_Shape);
|
||||
EXCHG(m_Orient, copyitem->m_Orient);
|
||||
EXCHG(m_StructType, copyitem->m_StructType);
|
||||
EXCHG(m_Layer, copyitem->m_Layer);
|
||||
EXCHG(m_HJustify, copyitem->m_HJustify);
|
||||
EXCHG(m_VJustify, copyitem->m_VJustify);
|
||||
EXCHG(m_IsDangling, copyitem->m_IsDangling);
|
||||
EXCHG( m_Text, copyitem->m_Text );
|
||||
EXCHG( m_Pos, copyitem->m_Pos );
|
||||
EXCHG( m_Size, copyitem->m_Size );
|
||||
EXCHG( m_Width, copyitem->m_Width );
|
||||
EXCHG( m_Shape, copyitem->m_Shape );
|
||||
EXCHG( m_Orient, copyitem->m_Orient );
|
||||
|
||||
// EXCHG( m_StructType, copyitem->m_StructType );
|
||||
// how can you swap a type, it is what it was created as!
|
||||
// this is a very bad usage of m_StructType.
|
||||
KICAD_T aType = copyitem->Type();
|
||||
copyitem->SetType( Type() );
|
||||
SetType( aType );
|
||||
|
||||
EXCHG( m_Layer, copyitem->m_Layer );
|
||||
EXCHG( m_HJustify, copyitem->m_HJustify );
|
||||
EXCHG( m_VJustify, copyitem->m_VJustify );
|
||||
EXCHG( m_IsDangling, copyitem->m_IsDangling );
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************/
|
||||
void DrawTextStruct::Place(WinEDA_DrawFrame * frame, wxDC * DC)
|
||||
void DrawTextStruct::Place( WinEDA_DrawFrame* frame, wxDC* DC )
|
||||
/***************************************************************/
|
||||
{
|
||||
/* save old text in undo list */
|
||||
if ( g_ItemToUndoCopy && ((m_Flags & IS_NEW) == 0) )
|
||||
if( g_ItemToUndoCopy && ( (m_Flags & IS_NEW) == 0 ) )
|
||||
{
|
||||
/* restore old values and save new ones */
|
||||
SwapData( (DrawTextStruct*)g_ItemToUndoCopy);
|
||||
SwapData( (DrawTextStruct*) g_ItemToUndoCopy );
|
||||
|
||||
/* save in undo list */
|
||||
((WinEDA_SchematicFrame*)frame)->SaveCopyInUndoList(this, IS_CHANGED);
|
||||
( (WinEDA_SchematicFrame*) frame )->SaveCopyInUndoList( this, IS_CHANGED );
|
||||
|
||||
/* restore new values */
|
||||
SwapData((DrawTextStruct*)g_ItemToUndoCopy);
|
||||
SwapData( (DrawTextStruct*) g_ItemToUndoCopy );
|
||||
|
||||
delete g_ItemToUndoCopy;
|
||||
g_ItemToUndoCopy = NULL;
|
||||
}
|
||||
|
||||
EDA_BaseStruct::Place(frame, DC);
|
||||
EDA_BaseStruct::Place( frame, DC );
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
DrawLabelStruct::DrawLabelStruct(const wxPoint & pos, const wxString & text):
|
||||
DrawTextStruct(pos, text)
|
||||
DrawLabelStruct::DrawLabelStruct( const wxPoint& pos, const wxString& text ) :
|
||||
DrawTextStruct( pos, text, DRAW_LABEL_STRUCT_TYPE )
|
||||
/****************************************************************************/
|
||||
{
|
||||
m_StructType = DRAW_LABEL_STRUCT_TYPE;
|
||||
m_Layer = LAYER_LOCLABEL;
|
||||
m_IsDangling = TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************************/
|
||||
DrawGlobalLabelStruct::DrawGlobalLabelStruct(const wxPoint & pos, const wxString & text):
|
||||
DrawTextStruct(pos, text)
|
||||
DrawGlobalLabelStruct::DrawGlobalLabelStruct( const wxPoint& pos, const wxString& text ) :
|
||||
DrawTextStruct( pos, text, DRAW_GLOBAL_LABEL_STRUCT_TYPE )
|
||||
/***********************************************************************************/
|
||||
{
|
||||
m_StructType = DRAW_GLOBAL_LABEL_STRUCT_TYPE;
|
||||
m_Layer = LAYER_GLOBLABEL;
|
||||
m_Shape = NET_INPUT;
|
||||
m_IsDangling = TRUE;
|
||||
|
@ -114,133 +138,144 @@ DrawGlobalLabelStruct::DrawGlobalLabelStruct(const wxPoint & pos, const wxString
|
|||
|
||||
|
||||
/***************************************************************/
|
||||
void DrawTextStruct::Draw(WinEDA_DrawPanel * panel,wxDC * DC, const wxPoint & offset,
|
||||
int DrawMode, int Color)
|
||||
void DrawTextStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
|
||||
int DrawMode, int Color )
|
||||
/***************************************************************/
|
||||
|
||||
/* Les textes type label ou notes peuvent avoir 4 directions, mais
|
||||
sont tj cadres par rapport a la 1ere lettre du texte
|
||||
*/
|
||||
* sont tj cadres par rapport a la 1ere lettre du texte
|
||||
*/
|
||||
{
|
||||
switch ( m_StructType )
|
||||
switch( Type() )
|
||||
{
|
||||
case DRAW_GLOBAL_LABEL_STRUCT_TYPE:
|
||||
DrawAsGlobalLabel(panel, DC, offset, DrawMode, Color);
|
||||
DrawAsGlobalLabel( panel, DC, offset, DrawMode, Color );
|
||||
break;
|
||||
|
||||
case DRAW_LABEL_STRUCT_TYPE:
|
||||
DrawAsLabel(panel, DC, offset, DrawMode, Color);
|
||||
DrawAsLabel( panel, DC, offset, DrawMode, Color );
|
||||
break;
|
||||
|
||||
default:
|
||||
DrawAsText(panel, DC, offset, DrawMode, Color);
|
||||
DrawAsText( panel, DC, offset, DrawMode, Color );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************************/
|
||||
void DrawTextStruct::DrawAsText(WinEDA_DrawPanel * panel,wxDC * DC, const wxPoint & offset,
|
||||
int DrawMode, int Color)
|
||||
void DrawTextStruct::DrawAsText( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
|
||||
int DrawMode, int Color )
|
||||
/*******************************************************************************************/
|
||||
|
||||
/* Texts type Label or Comment (text on layer "NOTE") have 4 directions, and the Text origin is the first letter
|
||||
*/
|
||||
*/
|
||||
{
|
||||
int color;
|
||||
int width = MAX(m_Width, g_DrawMinimunLineWidth);
|
||||
int color;
|
||||
int width = MAX( m_Width, g_DrawMinimunLineWidth );
|
||||
|
||||
if( Color >= 0 ) color = Color;
|
||||
else color = ReturnLayerColor(m_Layer);
|
||||
GRSetDrawMode(DC, DrawMode);
|
||||
if( Color >= 0 )
|
||||
color = Color;
|
||||
else
|
||||
color = ReturnLayerColor( m_Layer );
|
||||
GRSetDrawMode( DC, DrawMode );
|
||||
|
||||
switch(m_Orient)
|
||||
switch( m_Orient )
|
||||
{
|
||||
case 0: /* Orientation horiz normale */
|
||||
DrawGraphicText(panel, DC,
|
||||
wxPoint(m_Pos.x + offset.x, m_Pos.y - TXTMARGE + offset.y),
|
||||
DrawGraphicText( panel, DC,
|
||||
wxPoint( m_Pos.x + offset.x, m_Pos.y - TXTMARGE + offset.y ),
|
||||
color,
|
||||
m_Text, m_Orient*900, m_Size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_BOTTOM, width);
|
||||
m_Text, m_Orient * 900, m_Size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_BOTTOM, width );
|
||||
break;
|
||||
|
||||
case 1: /* Orientation vert UP */
|
||||
DrawGraphicText(panel, DC,
|
||||
wxPoint(m_Pos.x - TXTMARGE + offset.x, m_Pos.y + offset.y), color,
|
||||
m_Text, m_Orient*900, m_Size,
|
||||
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_BOTTOM, width);
|
||||
DrawGraphicText( panel, DC,
|
||||
wxPoint( m_Pos.x - TXTMARGE + offset.x, m_Pos.y + offset.y ), color,
|
||||
m_Text, m_Orient * 900, m_Size,
|
||||
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_BOTTOM, width );
|
||||
break;
|
||||
|
||||
case 2: /* Orientation horiz inverse */
|
||||
DrawGraphicText(panel, DC,
|
||||
wxPoint(m_Pos.x + offset.x, m_Pos.y + TXTMARGE + offset.y), color,
|
||||
m_Text, m_Orient*900, m_Size,
|
||||
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_TOP, width);
|
||||
DrawGraphicText( panel, DC,
|
||||
wxPoint( m_Pos.x + offset.x, m_Pos.y + TXTMARGE + offset.y ), color,
|
||||
m_Text, m_Orient * 900, m_Size,
|
||||
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_TOP, width );
|
||||
break;
|
||||
|
||||
case 3: /* Orientation vert BOTTOM */
|
||||
DrawGraphicText(panel, DC,
|
||||
wxPoint(m_Pos.x + TXTMARGE + offset.y, m_Pos.y + offset.y), color,
|
||||
m_Text, m_Orient*900, m_Size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_TOP, width);
|
||||
DrawGraphicText( panel, DC,
|
||||
wxPoint( m_Pos.x + TXTMARGE + offset.y, m_Pos.y + offset.y ), color,
|
||||
m_Text, m_Orient * 900, m_Size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_TOP, width );
|
||||
break;
|
||||
}
|
||||
if ( m_IsDangling )
|
||||
DrawDanglingSymbol(panel, DC, m_Pos + offset, color);
|
||||
|
||||
if( m_IsDangling )
|
||||
DrawDanglingSymbol( panel, DC, m_Pos + offset, color );
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************/
|
||||
void DrawTextStruct::DrawAsLabel(WinEDA_DrawPanel * panel,wxDC * DC, const wxPoint & offset,
|
||||
int DrawMode, int Color)
|
||||
void DrawTextStruct::DrawAsLabel( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
|
||||
int DrawMode, int Color )
|
||||
/***************************************************************/
|
||||
{
|
||||
DrawAsText(panel, DC, offset, DrawMode, Color);
|
||||
DrawAsText( panel, DC, offset, DrawMode, Color );
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
void DrawTextStruct::DrawAsGlobalLabel(WinEDA_DrawPanel * panel, wxDC * DC, const wxPoint& offset,
|
||||
int DrawMode, int Color)
|
||||
void DrawTextStruct::DrawAsGlobalLabel( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
|
||||
int DrawMode, int Color )
|
||||
/*****************************************************************************/
|
||||
|
||||
/* Texts type Global Label have 4 directions, and the Text origin is the graphic icon
|
||||
*/
|
||||
*/
|
||||
{
|
||||
int * Template;
|
||||
int Poly[12];
|
||||
int ii, jj, imax, color, HalfSize;
|
||||
wxSize Size = m_Size;
|
||||
int width = MAX(m_Width, g_DrawMinimunLineWidth);
|
||||
int* Template;
|
||||
int Poly[12];
|
||||
int ii, jj, imax, color, HalfSize;
|
||||
wxSize Size = m_Size;
|
||||
int width = MAX( m_Width, g_DrawMinimunLineWidth );
|
||||
|
||||
if( Color >= 0 ) color = Color;
|
||||
else color = ReturnLayerColor(m_Layer);
|
||||
if( Color >= 0 )
|
||||
color = Color;
|
||||
else
|
||||
color = ReturnLayerColor( m_Layer );
|
||||
|
||||
GRSetDrawMode(DC, DrawMode);
|
||||
GRSetDrawMode( DC, DrawMode );
|
||||
|
||||
HalfSize = Size.x / 2; ii = Size.x + TXTMARGE;
|
||||
|
||||
switch(m_Orient)
|
||||
switch( m_Orient )
|
||||
{
|
||||
case 0: /* Orientation horiz normale */
|
||||
DrawGraphicText(panel, DC,
|
||||
wxPoint(m_Pos.x - ii + offset.x, m_Pos.y + offset.y), color,
|
||||
DrawGraphicText( panel, DC,
|
||||
wxPoint( m_Pos.x - ii + offset.x, m_Pos.y + offset.y ), color,
|
||||
m_Text, TEXT_ORIENT_HORIZ, Size,
|
||||
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_CENTER, width);
|
||||
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_CENTER, width );
|
||||
break;
|
||||
|
||||
case 1: /* Orientation vert UP */
|
||||
DrawGraphicText(panel, DC,
|
||||
wxPoint(m_Pos.x + offset.x, m_Pos.y + ii + offset.y), color,
|
||||
DrawGraphicText( panel, DC,
|
||||
wxPoint( m_Pos.x + offset.x, m_Pos.y + ii + offset.y ), color,
|
||||
m_Text, TEXT_ORIENT_VERT, Size,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, width);
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, width );
|
||||
break;
|
||||
|
||||
case 2: /* Orientation horiz inverse */
|
||||
DrawGraphicText(panel, DC,
|
||||
wxPoint(m_Pos.x + ii + offset.x, m_Pos.y + offset.y), color,
|
||||
DrawGraphicText( panel, DC,
|
||||
wxPoint( m_Pos.x + ii + offset.x, m_Pos.y + offset.y ), color,
|
||||
m_Text, TEXT_ORIENT_HORIZ, Size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width);
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width );
|
||||
break;
|
||||
|
||||
case 3: /* Orientation vert BOTTOM */
|
||||
DrawGraphicText(panel, DC,
|
||||
wxPoint(m_Pos.x + offset.x, m_Pos.y - ii + offset.y), color,
|
||||
DrawGraphicText( panel, DC,
|
||||
wxPoint( m_Pos.x + offset.x, m_Pos.y - ii + offset.y ), color,
|
||||
m_Text, TEXT_ORIENT_VERT, Size,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM, width);
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM, width );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -248,7 +283,7 @@ int width = MAX(m_Width, g_DrawMinimunLineWidth);
|
|||
Template = TemplateShape[m_Shape][m_Orient];
|
||||
|
||||
imax = *Template; Template++;
|
||||
for ( ii = 0, jj = 0; ii < imax ; ii++ )
|
||||
for( ii = 0, jj = 0; ii < imax; ii++ )
|
||||
{
|
||||
Poly[jj] = ( HalfSize * (*Template) ) + m_Pos.x + offset.x;
|
||||
jj++; Template++;
|
||||
|
@ -257,8 +292,8 @@ int width = MAX(m_Width, g_DrawMinimunLineWidth);
|
|||
}
|
||||
|
||||
// GRPoly(&panel->m_ClipBox, DC, imax,Poly,1, width, color, color ); /* Polygne Rempli */
|
||||
GRPoly(&panel->m_ClipBox, DC, imax,Poly,0, width, color, color ); /* Polygne Non Rempli */
|
||||
GRPoly( &panel->m_ClipBox, DC, imax, Poly, 0, width, color, color ); /* Polygne Non Rempli */
|
||||
|
||||
if ( m_IsDangling )
|
||||
DrawDanglingSymbol(panel, DC, m_Pos + offset, color);
|
||||
if( m_IsDangling )
|
||||
DrawDanglingSymbol( panel, DC, m_Pos + offset, color );
|
||||
}
|
||||
|
|
|
@ -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 éléments graphiques d'un composant lib pour améliorer
|
||||
|
@ -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,12 +165,13 @@ 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:
|
||||
|
@ -179,14 +180,22 @@ public:
|
|||
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);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/****************************/
|
||||
/* EESchema - eesavlib.cpp */
|
||||
/****************************/
|
||||
/****************************/
|
||||
/* EESchema - eesavlib.cpp */
|
||||
/****************************/
|
||||
|
||||
/* Write Routines to save schematic libraries and library components (::WriteDescr() members)
|
||||
*/
|
||||
*/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
|
@ -20,244 +20,290 @@
|
|||
/* Variables locales */
|
||||
|
||||
|
||||
static bool WriteLibEntryDateAndTime(FILE * ExportFile,
|
||||
EDA_LibComponentStruct * LibEntry);
|
||||
static bool WriteLibEntryDateAndTime( FILE* ExportFile,
|
||||
EDA_LibComponentStruct* LibEntry );
|
||||
|
||||
|
||||
static int fill_tab[3] = { 'N', 'F', 'f' };
|
||||
|
||||
/***********************************************/
|
||||
bool LibDrawArc::WriteDescr( FILE * ExportFile )
|
||||
bool LibDrawArc::WriteDescr( FILE* ExportFile )
|
||||
/***********************************************/
|
||||
/* format
|
||||
A centre_posx centre_posy rayon start_angle end_angle unit convert fill('N', 'F' ou 'f') startx starty endx endy
|
||||
*/
|
||||
{
|
||||
int x1 = t1; if(x1 > 1800) x1 -= 3600;
|
||||
int x2 = t2; if(x2 > 1800) x2 -= 3600;
|
||||
|
||||
fprintf(ExportFile,"A %d %d %d %d %d %d %d %d %c %d %d %d %d\n",
|
||||
/* format
|
||||
* A centre_posx centre_posy rayon start_angle end_angle unit convert fill('N', 'F' ou 'f') startx starty endx endy
|
||||
*/
|
||||
{
|
||||
int x1 = t1; if( x1 > 1800 )
|
||||
x1 -= 3600;
|
||||
|
||||
int x2 = t2; if( x2 > 1800 )
|
||||
x2 -= 3600;
|
||||
|
||||
fprintf( ExportFile, "A %d %d %d %d %d %d %d %d %c %d %d %d %d\n",
|
||||
m_Pos.x, m_Pos.y,
|
||||
m_Rayon, x1, x2,
|
||||
m_Unit,m_Convert,
|
||||
m_Unit, m_Convert,
|
||||
m_Width, fill_tab[m_Fill],
|
||||
m_ArcStart.x, m_ArcStart.y, m_ArcEnd.x, m_ArcEnd.y);
|
||||
m_ArcStart.x, m_ArcStart.y, m_ArcEnd.x, m_ArcEnd.y );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************/
|
||||
bool LibDrawCircle::WriteDescr( FILE * ExportFile )
|
||||
bool LibDrawCircle::WriteDescr( FILE* ExportFile )
|
||||
/***************************************************/
|
||||
{
|
||||
fprintf(ExportFile,"C %d %d %d %d %d %d %c\n",
|
||||
fprintf( ExportFile, "C %d %d %d %d %d %d %c\n",
|
||||
m_Pos.x, m_Pos.y,
|
||||
m_Rayon,
|
||||
m_Unit,m_Convert,
|
||||
m_Width, fill_tab[m_Fill]);
|
||||
m_Unit, m_Convert,
|
||||
m_Width, fill_tab[m_Fill] );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/************************************************/
|
||||
bool LibDrawText::WriteDescr( FILE * ExportFile )
|
||||
bool LibDrawText::WriteDescr( FILE* ExportFile )
|
||||
/************************************************/
|
||||
{
|
||||
wxString text = m_Text;
|
||||
wxString text = m_Text;
|
||||
|
||||
text.Replace( wxT(" "), wxT("~") ); // Spaces are not allowed: changed to '~'
|
||||
text.Replace( wxT( " " ), wxT( "~" ) ); // Spaces are not allowed: changed to '~'
|
||||
|
||||
fprintf(ExportFile,"T %d %d %d %d %d %d %d %s\n",
|
||||
fprintf( ExportFile, "T %d %d %d %d %d %d %d %s\n",
|
||||
m_Horiz,
|
||||
m_Pos.x, m_Pos.y,
|
||||
m_Size.x, m_Type,
|
||||
m_Unit,m_Convert,
|
||||
CONV_TO_UTF8(text) );
|
||||
m_Unit, m_Convert,
|
||||
CONV_TO_UTF8( text ) );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/***************************************************/
|
||||
bool LibDrawSquare::WriteDescr( FILE * ExportFile )
|
||||
bool LibDrawSquare::WriteDescr( FILE* ExportFile )
|
||||
/***************************************************/
|
||||
{
|
||||
fprintf(ExportFile,"S %d %d %d %d %d %d %d %c\n",
|
||||
fprintf( ExportFile, "S %d %d %d %d %d %d %d %c\n",
|
||||
m_Pos.x, m_Pos.y, m_End.x, m_End.y,
|
||||
m_Unit,m_Convert,
|
||||
m_Width, fill_tab[m_Fill]);
|
||||
m_Unit, m_Convert,
|
||||
m_Width, fill_tab[m_Fill] );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/************************************************/
|
||||
bool LibDrawPin::WriteDescr( FILE * ExportFile )
|
||||
bool LibDrawPin::WriteDescr( FILE* ExportFile )
|
||||
/************************************************/
|
||||
{
|
||||
int Etype = 'I';
|
||||
wxString StringPinNum;
|
||||
int Etype = 'I';
|
||||
wxString StringPinNum;
|
||||
|
||||
switch(m_PinType)
|
||||
switch( m_PinType )
|
||||
{
|
||||
case PIN_INPUT: Etype = 'I'; break;
|
||||
case PIN_OUTPUT: Etype = 'O'; break;
|
||||
case PIN_BIDI: Etype = 'B'; break;
|
||||
case PIN_TRISTATE: Etype = 'T'; break;
|
||||
case PIN_PASSIVE: Etype = 'P'; break;
|
||||
case PIN_UNSPECIFIED: Etype = 'U'; break;
|
||||
case PIN_POWER_IN: Etype = 'W'; break;
|
||||
case PIN_POWER_OUT: Etype = 'w'; break;
|
||||
case PIN_OPENCOLLECTOR: Etype = 'C'; break;
|
||||
case PIN_OPENEMITTER: Etype = 'E'; break;
|
||||
case PIN_INPUT:
|
||||
Etype = 'I'; break;
|
||||
|
||||
case PIN_OUTPUT:
|
||||
Etype = 'O'; break;
|
||||
|
||||
case PIN_BIDI:
|
||||
Etype = 'B'; break;
|
||||
|
||||
case PIN_TRISTATE:
|
||||
Etype = 'T'; break;
|
||||
|
||||
case PIN_PASSIVE:
|
||||
Etype = 'P'; break;
|
||||
|
||||
case PIN_UNSPECIFIED:
|
||||
Etype = 'U'; break;
|
||||
|
||||
case PIN_POWER_IN:
|
||||
Etype = 'W'; break;
|
||||
|
||||
case PIN_POWER_OUT:
|
||||
Etype = 'w'; break;
|
||||
|
||||
case PIN_OPENCOLLECTOR:
|
||||
Etype = 'C'; break;
|
||||
|
||||
case PIN_OPENEMITTER:
|
||||
Etype = 'E'; break;
|
||||
}
|
||||
|
||||
ReturnPinStringNum(StringPinNum);
|
||||
if ( StringPinNum.IsEmpty() ) StringPinNum = wxT("~");
|
||||
ReturnPinStringNum( StringPinNum );
|
||||
if( StringPinNum.IsEmpty() )
|
||||
StringPinNum = wxT( "~" );
|
||||
|
||||
if( ! m_PinName.IsEmpty() )
|
||||
fprintf(ExportFile,"X %s", CONV_TO_UTF8(m_PinName) );
|
||||
else fprintf(ExportFile,"X ~");
|
||||
if( !m_PinName.IsEmpty() )
|
||||
fprintf( ExportFile, "X %s", CONV_TO_UTF8( m_PinName ) );
|
||||
else
|
||||
fprintf( ExportFile, "X ~" );
|
||||
|
||||
fprintf(ExportFile," %s %d %d %d %c %d %d %d %d %c",
|
||||
CONV_TO_UTF8(StringPinNum),
|
||||
fprintf( ExportFile, " %s %d %d %d %c %d %d %d %d %c",
|
||||
CONV_TO_UTF8( StringPinNum ),
|
||||
m_Pos.x, m_Pos.y,
|
||||
(int)m_PinLen, (int)m_Orient,
|
||||
(int) m_PinLen, (int) m_Orient,
|
||||
m_PinNumSize, m_PinNameSize,
|
||||
m_Unit,m_Convert, Etype);
|
||||
m_Unit, m_Convert, Etype );
|
||||
|
||||
if( (m_PinShape) || (m_Attributs & PINNOTDRAW) )
|
||||
fprintf(ExportFile," ");
|
||||
if (m_Attributs & PINNOTDRAW) fprintf(ExportFile,"N");
|
||||
if (m_PinShape & INVERT) fprintf(ExportFile,"I");
|
||||
if (m_PinShape & CLOCK) fprintf(ExportFile,"C");
|
||||
if (m_PinShape & LOWLEVEL_IN) fprintf(ExportFile,"L");
|
||||
if (m_PinShape & LOWLEVEL_OUT) fprintf(ExportFile,"V");
|
||||
fprintf( ExportFile, " " );
|
||||
if( m_Attributs & PINNOTDRAW )
|
||||
fprintf( ExportFile, "N" );
|
||||
if( m_PinShape & INVERT )
|
||||
fprintf( ExportFile, "I" );
|
||||
if( m_PinShape & CLOCK )
|
||||
fprintf( ExportFile, "C" );
|
||||
if( m_PinShape & LOWLEVEL_IN )
|
||||
fprintf( ExportFile, "L" );
|
||||
if( m_PinShape & LOWLEVEL_OUT )
|
||||
fprintf( ExportFile, "V" );
|
||||
|
||||
fprintf(ExportFile,"\n");
|
||||
fprintf( ExportFile, "\n" );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************/
|
||||
bool LibDrawPolyline::WriteDescr( FILE * ExportFile )
|
||||
bool LibDrawPolyline::WriteDescr( FILE* ExportFile )
|
||||
/****************************************************/
|
||||
{
|
||||
int ii, *ptpoly;
|
||||
int ii, * ptpoly;
|
||||
|
||||
fprintf(ExportFile,"P %d %d %d %d",
|
||||
fprintf( ExportFile, "P %d %d %d %d",
|
||||
n,
|
||||
m_Unit,m_Convert,
|
||||
m_Width);
|
||||
m_Unit, m_Convert,
|
||||
m_Width );
|
||||
ptpoly = PolyList;
|
||||
for( ii = n ; ii > 0; ii-- )
|
||||
for( ii = n; ii > 0; ii-- )
|
||||
{
|
||||
fprintf(ExportFile," %d %d", *ptpoly, *(ptpoly+1) );
|
||||
fprintf( ExportFile, " %d %d", *ptpoly, *(ptpoly + 1) );
|
||||
ptpoly += 2;
|
||||
}
|
||||
fprintf(ExportFile," %c\n", fill_tab[m_Fill]);
|
||||
|
||||
fprintf( ExportFile, " %c\n", fill_tab[m_Fill] );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************/
|
||||
bool LibDrawField::WriteDescr( FILE * ExportFile )
|
||||
bool LibDrawField::WriteDescr( FILE* ExportFile )
|
||||
/**************************************************/
|
||||
{
|
||||
int hjustify, vjustify;
|
||||
wxString text = m_Text;
|
||||
int hjustify, vjustify;
|
||||
wxString text = m_Text;
|
||||
|
||||
hjustify = 'C';
|
||||
if ( m_HJustify == GR_TEXT_HJUSTIFY_LEFT ) hjustify = 'L';
|
||||
else if ( m_HJustify == GR_TEXT_HJUSTIFY_RIGHT ) hjustify = 'R';
|
||||
if( m_HJustify == GR_TEXT_HJUSTIFY_LEFT )
|
||||
hjustify = 'L';
|
||||
else if( m_HJustify == GR_TEXT_HJUSTIFY_RIGHT )
|
||||
hjustify = 'R';
|
||||
vjustify = 'C';
|
||||
if ( m_VJustify == GR_TEXT_VJUSTIFY_BOTTOM) vjustify = 'B';
|
||||
else if ( m_VJustify == GR_TEXT_VJUSTIFY_TOP) vjustify = 'T';
|
||||
if ( text.IsEmpty() ) text = wxT("~");
|
||||
fprintf(ExportFile,"F%d \"%s\" %d %d %d %c %c %c %c",
|
||||
m_FieldId, CONV_TO_UTF8(text),
|
||||
if( m_VJustify == GR_TEXT_VJUSTIFY_BOTTOM )
|
||||
vjustify = 'B';
|
||||
else if( m_VJustify == GR_TEXT_VJUSTIFY_TOP )
|
||||
vjustify = 'T';
|
||||
if( text.IsEmpty() )
|
||||
text = wxT( "~" );
|
||||
fprintf( ExportFile, "F%d \"%s\" %d %d %d %c %c %c %c",
|
||||
m_FieldId, CONV_TO_UTF8( text ),
|
||||
m_Pos.x, m_Pos.y,
|
||||
m_Size.x,
|
||||
m_Orient == 0 ? 'H' : 'V',
|
||||
(m_Attributs & TEXT_NO_VISIBLE )? 'I' : 'V',
|
||||
(m_Attributs & TEXT_NO_VISIBLE ) ? 'I' : 'V',
|
||||
hjustify, vjustify );
|
||||
// Save field name, if necessary
|
||||
if ( m_FieldId >= FIELD1 && ! m_Name.IsEmpty() )
|
||||
fprintf(ExportFile," \"%s\"", CONV_TO_UTF8(m_Name) );
|
||||
|
||||
fprintf(ExportFile,"\n");
|
||||
// Save field name, if necessary
|
||||
if( m_FieldId >= FIELD1 && !m_Name.IsEmpty() )
|
||||
fprintf( ExportFile, " \"%s\"", CONV_TO_UTF8( m_Name ) );
|
||||
|
||||
fprintf( ExportFile, "\n" );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**********************************************************/
|
||||
LibEDA_BaseStruct * CopyDrawEntryStruct( wxWindow * frame,
|
||||
LibEDA_BaseStruct * DrawItem)
|
||||
/**********************************************************/
|
||||
/* Routine de Duplication d'une structure DrawLibItem d'une partlib
|
||||
Parametres d'entree:
|
||||
DrawEntry = pointeur sur la structure a dupliquer
|
||||
La structure nouvelle est creee, mais n'est pas inseree dans le
|
||||
chainage
|
||||
Retourne:
|
||||
Pointeur sur la structure creee
|
||||
*/
|
||||
{
|
||||
LibEDA_BaseStruct * NewDrawItem = NULL;
|
||||
wxString msg;
|
||||
|
||||
switch(DrawItem->m_StructType)
|
||||
/**********************************************************/
|
||||
LibEDA_BaseStruct* CopyDrawEntryStruct( wxWindow* frame,
|
||||
LibEDA_BaseStruct* DrawItem )
|
||||
/**********************************************************/
|
||||
|
||||
/* Routine de Duplication d'une structure DrawLibItem d'une partlib
|
||||
* Parametres d'entree:
|
||||
* DrawEntry = pointeur sur la structure a dupliquer
|
||||
* La structure nouvelle est creee, mais n'est pas inseree dans le
|
||||
* chainage
|
||||
* Retourne:
|
||||
* Pointeur sur la structure creee
|
||||
*/
|
||||
{
|
||||
LibEDA_BaseStruct* NewDrawItem = NULL;
|
||||
wxString msg;
|
||||
|
||||
switch( DrawItem->Type() )
|
||||
{
|
||||
case COMPONENT_ARC_DRAW_TYPE:
|
||||
NewDrawItem = ((LibDrawArc*)DrawItem)->GenCopy();
|
||||
NewDrawItem = ( (LibDrawArc*) DrawItem )->GenCopy();
|
||||
break;
|
||||
|
||||
case COMPONENT_CIRCLE_DRAW_TYPE:
|
||||
NewDrawItem = ((LibDrawCircle*)DrawItem)->GenCopy();
|
||||
NewDrawItem = ( (LibDrawCircle*) DrawItem )->GenCopy();
|
||||
break;
|
||||
|
||||
case COMPONENT_RECT_DRAW_TYPE:
|
||||
NewDrawItem = ((LibDrawSquare*)DrawItem)->GenCopy();
|
||||
NewDrawItem = ( (LibDrawSquare*) DrawItem )->GenCopy();
|
||||
break;
|
||||
|
||||
case COMPONENT_PIN_DRAW_TYPE:
|
||||
NewDrawItem = ((LibDrawPin*)DrawItem)->GenCopy();
|
||||
NewDrawItem = ( (LibDrawPin*) DrawItem )->GenCopy();
|
||||
break;
|
||||
|
||||
case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE:
|
||||
NewDrawItem = ((LibDrawText*)DrawItem)->GenCopy();
|
||||
NewDrawItem = ( (LibDrawText*) DrawItem )->GenCopy();
|
||||
break;
|
||||
|
||||
case COMPONENT_POLYLINE_DRAW_TYPE:
|
||||
NewDrawItem = ((LibDrawPolyline*)DrawItem)->GenCopy();
|
||||
NewDrawItem = ( (LibDrawPolyline*) DrawItem )->GenCopy();
|
||||
break;
|
||||
|
||||
default:
|
||||
msg.Printf( wxT("CopyDrawLibEntryStruct: unknown Draw Type %d"),
|
||||
DrawItem->m_StructType);
|
||||
DisplayError(frame, msg);
|
||||
msg.Printf( wxT( "CopyDrawLibEntryStruct: unknown Draw Type %d" ),
|
||||
DrawItem->Type() );
|
||||
DisplayError( frame, msg );
|
||||
break;
|
||||
}
|
||||
|
||||
return(NewDrawItem);
|
||||
return NewDrawItem;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************************************/
|
||||
EDA_LibComponentStruct * CopyLibEntryStruct ( wxWindow * frame, EDA_LibComponentStruct * OldEntry)
|
||||
EDA_LibComponentStruct* CopyLibEntryStruct( wxWindow* frame, EDA_LibComponentStruct* OldEntry )
|
||||
/*************************************************************************************************/
|
||||
|
||||
/* Routine de copie d'une partlib
|
||||
Parametres d'entree: pointeur sur la structure de depart
|
||||
Parametres de sortie: pointeur sur la structure creee
|
||||
Do not copy new items ( i.e. with m_Flag & IS_NEW)
|
||||
*/
|
||||
* Parametres d'entree: pointeur sur la structure de depart
|
||||
* Parametres de sortie: pointeur sur la structure creee
|
||||
* Do not copy new items ( i.e. with m_Flag & IS_NEW)
|
||||
*/
|
||||
{
|
||||
EDA_LibComponentStruct * NewStruct;
|
||||
LibEDA_BaseStruct * NewDrawings, * OldDrawings;
|
||||
LibEDA_BaseStruct * LastItem;
|
||||
LibDrawField * OldField, * NewField;
|
||||
EDA_LibComponentStruct* NewStruct;
|
||||
LibEDA_BaseStruct* NewDrawings, * OldDrawings;
|
||||
LibEDA_BaseStruct* LastItem;
|
||||
LibDrawField* OldField, * NewField;
|
||||
|
||||
if( OldEntry->Type != ROOT )
|
||||
{
|
||||
DisplayError(frame, wxT("CopyLibEntryStruct(): Type != ROOT"));
|
||||
return(NULL);
|
||||
DisplayError( frame, wxT( "CopyLibEntryStruct(): Type != ROOT" ) );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
NewStruct = new EDA_LibComponentStruct(NULL);
|
||||
OldEntry->m_Prefix.Copy(&NewStruct->m_Prefix);
|
||||
OldEntry->m_Name.Copy(&NewStruct->m_Name);
|
||||
NewStruct = new EDA_LibComponentStruct( NULL );
|
||||
|
||||
OldEntry->m_Prefix.Copy( &NewStruct->m_Prefix );
|
||||
OldEntry->m_Name.Copy( &NewStruct->m_Name );
|
||||
|
||||
NewStruct->m_UnitCount = OldEntry->m_UnitCount;
|
||||
NewStruct->m_TextInside = OldEntry->m_TextInside;
|
||||
|
@ -273,8 +319,8 @@ LibDrawField * OldField, * NewField;
|
|||
NewStruct->m_DocFile = OldEntry->m_DocFile;
|
||||
|
||||
/* Copie des champs */
|
||||
for(OldField = OldEntry->Fields; OldField != NULL;
|
||||
OldField = (LibDrawField*)OldField->Pnext)
|
||||
for( OldField = OldEntry->Fields; OldField != NULL;
|
||||
OldField = (LibDrawField*) OldField->Pnext )
|
||||
{
|
||||
NewField = OldField->GenCopy();
|
||||
NewField->Pnext = NewStruct->Fields;
|
||||
|
@ -283,321 +329,339 @@ LibDrawField * OldField, * NewField;
|
|||
|
||||
/* Copie des elements type Drawing */
|
||||
LastItem = NULL;
|
||||
for(OldDrawings = OldEntry->m_Drawings; OldDrawings != NULL; OldDrawings = OldDrawings->Next())
|
||||
for( OldDrawings = OldEntry->m_Drawings; OldDrawings != NULL; OldDrawings = OldDrawings->Next() )
|
||||
{
|
||||
if ( ( OldDrawings->m_Flags & IS_NEW) != 0 ) continue;
|
||||
NewDrawings = CopyDrawEntryStruct(frame, OldDrawings);
|
||||
if ( NewDrawings )
|
||||
if( ( OldDrawings->m_Flags & IS_NEW) != 0 )
|
||||
continue;
|
||||
|
||||
NewDrawings = CopyDrawEntryStruct( frame, OldDrawings );
|
||||
if( NewDrawings )
|
||||
{
|
||||
if (LastItem == NULL ) NewStruct->m_Drawings = NewDrawings;
|
||||
else LastItem->Pnext = NewDrawings;
|
||||
if( LastItem == NULL )
|
||||
NewStruct->m_Drawings = NewDrawings;
|
||||
else
|
||||
LastItem->Pnext = NewDrawings;
|
||||
|
||||
LastItem = NewDrawings;
|
||||
NewDrawings->Pnext = NULL;
|
||||
}
|
||||
else // Probleme rencontré: arret de copie
|
||||
{
|
||||
OldDrawings->m_StructType = TYPE_NOT_INIT;
|
||||
DisplayError(frame, wxT("CopyLibEntryStruct(): error: aborted"));
|
||||
/* why this? m_StructType is not a flag, it is a type indicator!
|
||||
OldDrawings->Type() = TYPE_NOT_INIT;
|
||||
*/
|
||||
|
||||
DisplayError( frame, wxT( "CopyLibEntryStruct(): error: aborted" ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Copy the footprint filter list */
|
||||
for ( unsigned ii = 0 ; ii < OldEntry->m_FootprintList.GetCount(); ii++ )
|
||||
NewStruct->m_FootprintList.Add(OldEntry->m_FootprintList[ii]);
|
||||
for( unsigned ii = 0; ii < OldEntry->m_FootprintList.GetCount(); ii++ )
|
||||
NewStruct->m_FootprintList.Add( OldEntry->m_FootprintList[ii] );
|
||||
|
||||
return(NewStruct);
|
||||
return NewStruct;
|
||||
}
|
||||
|
||||
|
||||
/********************************************************/
|
||||
int WriteOneLibEntry(wxWindow * frame, FILE * ExportFile,
|
||||
EDA_LibComponentStruct * LibEntry)
|
||||
int WriteOneLibEntry( wxWindow* frame, FILE* ExportFile,
|
||||
EDA_LibComponentStruct* LibEntry )
|
||||
/********************************************************/
|
||||
|
||||
/* Routine d'ecriture du composant pointe par LibEntry
|
||||
dans le fichier ExportFile( qui doit etre deja ouvert)
|
||||
return: 0 si Ok
|
||||
-1 si err write
|
||||
1 si composant non ecrit ( type ALIAS )
|
||||
*/
|
||||
* dans le fichier ExportFile( qui doit etre deja ouvert)
|
||||
* return: 0 si Ok
|
||||
* -1 si err write
|
||||
* 1 si composant non ecrit ( type ALIAS )
|
||||
*/
|
||||
#define UNUSED 0
|
||||
{
|
||||
LibEDA_BaseStruct *DrawEntry;
|
||||
LibDrawField * Field;
|
||||
LibEDA_BaseStruct* DrawEntry;
|
||||
LibDrawField* Field;
|
||||
|
||||
if( LibEntry->Type != ROOT ) return(1);
|
||||
if( LibEntry->Type != ROOT )
|
||||
return 1;
|
||||
|
||||
/* Creation du commentaire donnant le nom du composant */
|
||||
fprintf(ExportFile,"#\n# %s\n#\n", CONV_TO_UTF8(LibEntry->m_Name.m_Text));
|
||||
fprintf( ExportFile, "#\n# %s\n#\n", CONV_TO_UTF8( LibEntry->m_Name.m_Text ) );
|
||||
|
||||
/* Generation des lignes utiles */
|
||||
fprintf(ExportFile,"DEF");
|
||||
if( (LibEntry->m_Name.m_Attributs & TEXT_NO_VISIBLE) == 0)
|
||||
fprintf(ExportFile," %s", CONV_TO_UTF8(LibEntry->m_Name.m_Text));
|
||||
else fprintf(ExportFile," ~%s", CONV_TO_UTF8(LibEntry->m_Name.m_Text));
|
||||
fprintf( ExportFile, "DEF" );
|
||||
if( (LibEntry->m_Name.m_Attributs & TEXT_NO_VISIBLE) == 0 )
|
||||
fprintf( ExportFile, " %s", CONV_TO_UTF8( LibEntry->m_Name.m_Text ) );
|
||||
else
|
||||
fprintf( ExportFile, " ~%s", CONV_TO_UTF8( LibEntry->m_Name.m_Text ) );
|
||||
|
||||
if( ! LibEntry->m_Prefix.m_Text.IsEmpty())
|
||||
fprintf(ExportFile," %s", CONV_TO_UTF8(LibEntry->m_Prefix.m_Text));
|
||||
else fprintf(ExportFile," ~");
|
||||
fprintf(ExportFile," %d %d %c %c %d %c %c\n",
|
||||
if( !LibEntry->m_Prefix.m_Text.IsEmpty() )
|
||||
fprintf( ExportFile, " %s", CONV_TO_UTF8( LibEntry->m_Prefix.m_Text ) );
|
||||
else
|
||||
fprintf( ExportFile, " ~" );
|
||||
fprintf( ExportFile, " %d %d %c %c %d %c %c\n",
|
||||
UNUSED, LibEntry->m_TextInside,
|
||||
LibEntry->m_DrawPinNum ? 'Y' : 'N',
|
||||
LibEntry->m_DrawPinName ? 'Y' : 'N',
|
||||
LibEntry->m_UnitCount, LibEntry->m_UnitSelectionLocked ? 'L' : 'F',
|
||||
LibEntry->m_Options == ENTRY_POWER ? 'P' : 'N');
|
||||
LibEntry->m_Options == ENTRY_POWER ? 'P' : 'N' );
|
||||
|
||||
WriteLibEntryDateAndTime(ExportFile, LibEntry);
|
||||
WriteLibEntryDateAndTime( ExportFile, LibEntry );
|
||||
|
||||
/* Position / orientation / visibilite des champs */
|
||||
LibEntry->m_Prefix.WriteDescr( ExportFile );
|
||||
LibEntry->m_Name.WriteDescr( ExportFile );
|
||||
|
||||
for ( Field = LibEntry->Fields; Field!= NULL;
|
||||
Field = (LibDrawField*)Field->Pnext )
|
||||
for( Field = LibEntry->Fields; Field!= NULL;
|
||||
Field = (LibDrawField*) Field->Pnext )
|
||||
{
|
||||
if( Field->m_Text.IsEmpty() && Field->m_Name.IsEmpty() ) continue;
|
||||
if( Field->m_Text.IsEmpty() && Field->m_Name.IsEmpty() )
|
||||
continue;
|
||||
Field->WriteDescr( ExportFile );
|
||||
}
|
||||
|
||||
/* Sauvegarde de la ligne "ALIAS" */
|
||||
if( LibEntry->m_AliasList.GetCount() != 0)
|
||||
if( LibEntry->m_AliasList.GetCount() != 0 )
|
||||
{
|
||||
fprintf(ExportFile,"ALIAS");
|
||||
fprintf( ExportFile, "ALIAS" );
|
||||
unsigned ii;
|
||||
for ( ii = 0; ii < LibEntry->m_AliasList.GetCount(); ii++ )
|
||||
fprintf(ExportFile," %s", CONV_TO_UTF8(LibEntry->m_AliasList[ii]));
|
||||
fprintf(ExportFile,"\n");
|
||||
for( ii = 0; ii < LibEntry->m_AliasList.GetCount(); ii++ )
|
||||
fprintf( ExportFile, " %s", CONV_TO_UTF8( LibEntry->m_AliasList[ii] ) );
|
||||
|
||||
fprintf( ExportFile, "\n" );
|
||||
}
|
||||
|
||||
/* Write the footprint filter list */
|
||||
if( LibEntry->m_FootprintList.GetCount() != 0)
|
||||
if( LibEntry->m_FootprintList.GetCount() != 0 )
|
||||
{
|
||||
fprintf(ExportFile,"$FPLIST\n");
|
||||
fprintf( ExportFile, "$FPLIST\n" );
|
||||
unsigned ii;
|
||||
for ( ii = 0; ii < LibEntry->m_FootprintList.GetCount(); ii++ )
|
||||
fprintf(ExportFile," %s\n", CONV_TO_UTF8(LibEntry->m_FootprintList[ii]));
|
||||
fprintf(ExportFile,"$ENDFPLIST\n");
|
||||
for( ii = 0; ii < LibEntry->m_FootprintList.GetCount(); ii++ )
|
||||
fprintf( ExportFile, " %s\n", CONV_TO_UTF8( LibEntry->m_FootprintList[ii] ) );
|
||||
|
||||
fprintf( ExportFile, "$ENDFPLIST\n" );
|
||||
}
|
||||
|
||||
/* Sauvegarde des elements de trace */
|
||||
DrawEntry = LibEntry->m_Drawings;
|
||||
if(LibEntry->m_Drawings)
|
||||
if( LibEntry->m_Drawings )
|
||||
{
|
||||
/* we sort the draw items, in order to have an edition more easy,
|
||||
when a file editing "by hand" is made */
|
||||
* when a file editing "by hand" is made */
|
||||
LibEntry->SortDrawItems();
|
||||
|
||||
fprintf(ExportFile,"DRAW\n");
|
||||
fprintf( ExportFile, "DRAW\n" );
|
||||
DrawEntry = LibEntry->m_Drawings;
|
||||
while( DrawEntry )
|
||||
{
|
||||
switch( DrawEntry->m_StructType)
|
||||
switch( DrawEntry->Type() )
|
||||
{
|
||||
case COMPONENT_ARC_DRAW_TYPE:
|
||||
#define DRAWSTRUCT ((LibDrawArc *) DrawEntry)
|
||||
#define DRAWSTRUCT ( (LibDrawArc*) DrawEntry )
|
||||
DRAWSTRUCT->WriteDescr( ExportFile );
|
||||
break;
|
||||
|
||||
case COMPONENT_CIRCLE_DRAW_TYPE:
|
||||
#undef DRAWSTRUCT
|
||||
#define DRAWSTRUCT ((LibDrawCircle *) DrawEntry)
|
||||
#define DRAWSTRUCT ( (LibDrawCircle*) DrawEntry )
|
||||
DRAWSTRUCT->WriteDescr( ExportFile );
|
||||
break;
|
||||
|
||||
case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE:
|
||||
#undef DRAWSTRUCT
|
||||
#define DRAWSTRUCT ((LibDrawText *) DrawEntry)
|
||||
#define DRAWSTRUCT ( (LibDrawText*) DrawEntry )
|
||||
DRAWSTRUCT->WriteDescr( ExportFile );
|
||||
break;
|
||||
|
||||
case COMPONENT_RECT_DRAW_TYPE:
|
||||
#undef DRAWSTRUCT
|
||||
#define DRAWSTRUCT ((LibDrawSquare *) DrawEntry)
|
||||
#define DRAWSTRUCT ( (LibDrawSquare*) DrawEntry )
|
||||
DRAWSTRUCT->WriteDescr( ExportFile );
|
||||
break;
|
||||
|
||||
case COMPONENT_PIN_DRAW_TYPE:
|
||||
#undef DRAWSTRUCT
|
||||
#define DRAWSTRUCT ((LibDrawPin *) DrawEntry)
|
||||
#define DRAWSTRUCT ( (LibDrawPin*) DrawEntry )
|
||||
DRAWSTRUCT->WriteDescr( ExportFile );
|
||||
break;
|
||||
|
||||
case COMPONENT_POLYLINE_DRAW_TYPE:
|
||||
#undef DRAWSTRUCT
|
||||
#define DRAWSTRUCT ((LibDrawPolyline *) DrawEntry)
|
||||
#define DRAWSTRUCT ( (LibDrawPolyline*) DrawEntry )
|
||||
DRAWSTRUCT->WriteDescr( ExportFile );
|
||||
break;
|
||||
|
||||
default: DisplayError(frame, wxT("Save Lib: Unknown Draw Type"));
|
||||
default:
|
||||
DisplayError( frame, wxT( "Save Lib: Unknown Draw Type" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
DrawEntry = DrawEntry->Next();
|
||||
}
|
||||
fprintf(ExportFile,"ENDDRAW\n");
|
||||
fprintf( ExportFile, "ENDDRAW\n" );
|
||||
}
|
||||
|
||||
fprintf(ExportFile,"ENDDEF\n");
|
||||
fprintf( ExportFile, "ENDDEF\n" );
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
int WriteOneDocLibEntry(FILE * ExportFile, EDA_LibComponentStruct * LibEntry)
|
||||
int WriteOneDocLibEntry( FILE* ExportFile, EDA_LibComponentStruct* LibEntry )
|
||||
/*************************************************************************/
|
||||
|
||||
/* Routine d'ecriture de la doc du composant pointe par LibEntry
|
||||
dans le fichier ExportFile( qui doit etre deja ouvert)
|
||||
return: 0 si Ok
|
||||
1 si err write
|
||||
Cependant, si i tous les Pointeurs sur textes sont nulls ( pas de Doc )
|
||||
rien ne sera ecrit.
|
||||
*/
|
||||
* dans le fichier ExportFile( qui doit etre deja ouvert)
|
||||
* return: 0 si Ok
|
||||
* 1 si err write
|
||||
* Cependant, si i tous les Pointeurs sur textes sont nulls ( pas de Doc )
|
||||
* rien ne sera ecrit.
|
||||
*/
|
||||
{
|
||||
|
||||
if( (LibEntry->m_Doc.IsEmpty() ) &&
|
||||
(LibEntry->m_KeyWord.IsEmpty() ) &&
|
||||
(LibEntry->m_DocFile.IsEmpty() ) )
|
||||
return(0);
|
||||
if( ( LibEntry->m_Doc.IsEmpty() )
|
||||
&& ( LibEntry->m_KeyWord.IsEmpty() )
|
||||
&& ( LibEntry->m_DocFile.IsEmpty() ) )
|
||||
return 0;
|
||||
|
||||
/* Generation des lignes utiles */
|
||||
fprintf(ExportFile,"#\n$CMP %s\n", CONV_TO_UTF8(LibEntry->m_Name.m_Text));
|
||||
fprintf( ExportFile, "#\n$CMP %s\n", CONV_TO_UTF8( LibEntry->m_Name.m_Text ) );
|
||||
|
||||
if( ! LibEntry->m_Doc.IsEmpty())
|
||||
fprintf(ExportFile,"D %s\n", CONV_TO_UTF8(LibEntry->m_Doc));
|
||||
if( !LibEntry->m_Doc.IsEmpty() )
|
||||
fprintf( ExportFile, "D %s\n", CONV_TO_UTF8( LibEntry->m_Doc ) );
|
||||
|
||||
if( ! LibEntry->m_KeyWord.IsEmpty())
|
||||
fprintf(ExportFile,"K %s\n", CONV_TO_UTF8(LibEntry->m_KeyWord));
|
||||
if( !LibEntry->m_KeyWord.IsEmpty() )
|
||||
fprintf( ExportFile, "K %s\n", CONV_TO_UTF8( LibEntry->m_KeyWord ) );
|
||||
|
||||
if( ! LibEntry->m_DocFile.IsEmpty())
|
||||
fprintf(ExportFile,"F %s\n", CONV_TO_UTF8(LibEntry->m_DocFile));
|
||||
if( !LibEntry->m_DocFile.IsEmpty() )
|
||||
fprintf( ExportFile, "F %s\n", CONV_TO_UTF8( LibEntry->m_DocFile ) );
|
||||
|
||||
fprintf(ExportFile,"$ENDCMP\n");
|
||||
return(0);
|
||||
fprintf( ExportFile, "$ENDCMP\n" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************************/
|
||||
int SaveOneLibrary(wxWindow * frame, const wxString & FullFileName, LibraryStruct * Library)
|
||||
int SaveOneLibrary( wxWindow* frame, const wxString& FullFileName, LibraryStruct* Library )
|
||||
/*********************************************************************************/
|
||||
|
||||
/* Sauvegarde en fichier la librairie pointee par Library, sous le nom
|
||||
FullFileName.
|
||||
2 fichiers sont crees
|
||||
- La librarie
|
||||
- le fichier de documentation
|
||||
|
||||
une sauvegarde .bak de l'ancien fichier librairie est cree
|
||||
une sauvegarde .bck de l'ancien fichier documentation est cree
|
||||
|
||||
return:
|
||||
0 si OK
|
||||
1 si erreur
|
||||
*/
|
||||
* FullFileName.
|
||||
* 2 fichiers sont crees
|
||||
* - La librarie
|
||||
* - le fichier de documentation
|
||||
*
|
||||
* une sauvegarde .bak de l'ancien fichier librairie est cree
|
||||
* une sauvegarde .bck de l'ancien fichier documentation est cree
|
||||
*
|
||||
* return:
|
||||
* 0 si OK
|
||||
* 1 si erreur
|
||||
*/
|
||||
{
|
||||
FILE * SaveFile, * SaveDocFile;
|
||||
EDA_LibComponentStruct *LibEntry;
|
||||
char Line[1024];
|
||||
int err = 1;
|
||||
wxString Name,DocName,BakName, msg;
|
||||
FILE* SaveFile, * SaveDocFile;
|
||||
EDA_LibComponentStruct* LibEntry;
|
||||
char Line[1024];
|
||||
int err = 1;
|
||||
wxString Name, DocName, BakName, msg;
|
||||
|
||||
if(Library == NULL) return(err);
|
||||
if( Library == NULL )
|
||||
return err;
|
||||
|
||||
Name = FullFileName;
|
||||
|
||||
/* L'ancien fichier lib est renomme en .bak */
|
||||
if( wxFileExists(Name) )
|
||||
if( wxFileExists( Name ) )
|
||||
{
|
||||
BakName = Name; ChangeFileNameExt(BakName, wxT(".bak"));
|
||||
wxRemoveFile(BakName);
|
||||
if( ! wxRenameFile(Name, BakName) )
|
||||
BakName = Name; ChangeFileNameExt( BakName, wxT( ".bak" ) );
|
||||
wxRemoveFile( BakName );
|
||||
if( !wxRenameFile( Name, BakName ) )
|
||||
{
|
||||
msg = wxT("Failed to rename old lib file ") + BakName;
|
||||
DisplayError(frame, msg, 20);
|
||||
msg = wxT( "Failed to rename old lib file " ) + BakName;
|
||||
DisplayError( frame, msg, 20 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DocName = Name; ChangeFileNameExt(DocName,DOC_EXT);
|
||||
DocName = Name; ChangeFileNameExt( DocName, DOC_EXT );
|
||||
/* L'ancien fichier doc lib est renomme en .bck */
|
||||
if( wxFileExists(DocName) )
|
||||
if( wxFileExists( DocName ) )
|
||||
{
|
||||
BakName = DocName; ChangeFileNameExt(BakName, wxT(".bck") );
|
||||
wxRemoveFile(BakName);
|
||||
if( ! wxRenameFile(DocName, BakName) )
|
||||
BakName = DocName; ChangeFileNameExt( BakName, wxT( ".bck" ) );
|
||||
wxRemoveFile( BakName );
|
||||
if( !wxRenameFile( DocName, BakName ) )
|
||||
{
|
||||
msg = wxT("Failed to save old doc lib file ") + BakName;
|
||||
DisplayError(frame, msg, 20);
|
||||
msg = wxT( "Failed to save old doc lib file " ) + BakName;
|
||||
DisplayError( frame, msg, 20 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SaveFile = wxFopen(Name, wxT("wt") );
|
||||
if (SaveFile == NULL)
|
||||
SaveFile = wxFopen( Name, wxT( "wt" ) );
|
||||
if( SaveFile == NULL )
|
||||
{
|
||||
msg = wxT("Failed to create Lib File ") + Name;
|
||||
DisplayError(frame, msg, 20);
|
||||
return(err);
|
||||
msg = wxT( "Failed to create Lib File " ) + Name;
|
||||
DisplayError( frame, msg, 20 );
|
||||
return err;
|
||||
}
|
||||
|
||||
SaveDocFile = wxFopen(DocName, wxT("wt") );
|
||||
if (SaveDocFile == NULL)
|
||||
SaveDocFile = wxFopen( DocName, wxT( "wt" ) );
|
||||
if( SaveDocFile == NULL )
|
||||
{
|
||||
msg = wxT("Failed to create DocLib File ") + DocName;
|
||||
DisplayError(frame, msg, 20);
|
||||
return(err);
|
||||
msg = wxT( "Failed to create DocLib File " ) + DocName;
|
||||
DisplayError( frame, msg, 20 );
|
||||
return err;
|
||||
}
|
||||
|
||||
Library->m_Modified = 0;
|
||||
|
||||
/* Creation de l'entete de la librairie */
|
||||
Library->m_TimeStamp = GetTimeStamp();
|
||||
Library->WriteHeader(SaveFile);
|
||||
fprintf(SaveDocFile,"%s Date: %s\n", DOCFILE_IDENT,
|
||||
DateAndTime(Line) );
|
||||
Library->WriteHeader( SaveFile );
|
||||
fprintf( SaveDocFile, "%s Date: %s\n", DOCFILE_IDENT,
|
||||
DateAndTime( Line ) );
|
||||
|
||||
|
||||
/* Sauvegarde des composant: */
|
||||
PQCompFunc((PQCompFuncType) LibraryEntryCompare);
|
||||
LibEntry = (EDA_LibComponentStruct *) PQFirst(&Library->m_Entries, FALSE);
|
||||
PQCompFunc( (PQCompFuncType) LibraryEntryCompare );
|
||||
LibEntry = (EDA_LibComponentStruct*) PQFirst( &Library->m_Entries, FALSE );
|
||||
|
||||
while( LibEntry )
|
||||
{
|
||||
err = WriteOneLibEntry(frame, SaveFile, LibEntry);
|
||||
err = WriteOneDocLibEntry(SaveDocFile, LibEntry);
|
||||
err = WriteOneLibEntry( frame, SaveFile, LibEntry );
|
||||
err = WriteOneDocLibEntry( SaveDocFile, LibEntry );
|
||||
|
||||
LibEntry = (EDA_LibComponentStruct *)
|
||||
PQNext(Library->m_Entries, LibEntry, NULL);
|
||||
LibEntry = (EDA_LibComponentStruct*)
|
||||
PQNext( Library->m_Entries, LibEntry, NULL );
|
||||
}
|
||||
|
||||
fprintf(SaveFile,"#\n#End Library\n");
|
||||
fprintf(SaveDocFile,"#\n#End Doc Library\n");
|
||||
fclose(SaveFile);
|
||||
fclose(SaveDocFile);
|
||||
return(err);
|
||||
fprintf( SaveFile, "#\n#End Library\n" );
|
||||
fprintf( SaveDocFile, "#\n#End Doc Library\n" );
|
||||
fclose( SaveFile );
|
||||
fclose( SaveDocFile );
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************************/
|
||||
static bool WriteLibEntryDateAndTime(FILE * ExportFile, EDA_LibComponentStruct * LibEntry)
|
||||
static bool WriteLibEntryDateAndTime( FILE* ExportFile, EDA_LibComponentStruct* LibEntry )
|
||||
/*************************************************************************************/
|
||||
/* lit date et time de modif composant sous le format:
|
||||
"Ti yy/mm/jj hh:mm:ss"
|
||||
*/
|
||||
{
|
||||
int year,mon,day,hour,min,sec;
|
||||
|
||||
if ( LibEntry->m_LastDate == 0 ) return TRUE;
|
||||
/* lit date et time de modif composant sous le format:
|
||||
* "Ti yy/mm/jj hh:mm:ss"
|
||||
*/
|
||||
{
|
||||
int year, mon, day, hour, min, sec;
|
||||
|
||||
if( LibEntry->m_LastDate == 0 )
|
||||
return TRUE;
|
||||
|
||||
sec = LibEntry->m_LastDate & 63;
|
||||
min = (LibEntry->m_LastDate >> 6) & 63 ;
|
||||
min = (LibEntry->m_LastDate >> 6) & 63;
|
||||
hour = (LibEntry->m_LastDate >> 12) & 31;
|
||||
day = (LibEntry->m_LastDate >> 17) & 31;
|
||||
mon = (LibEntry->m_LastDate >> 22) & 15;
|
||||
year = (LibEntry->m_LastDate >> 26) + 1990;
|
||||
|
||||
fprintf(ExportFile,"Ti %d/%d/%d %d:%d:%d\n",year,mon,day,hour,min,sec);
|
||||
fprintf( ExportFile, "Ti %d/%d/%d %d:%d:%d\n", year, mon, day, hour, min, sec );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************/
|
||||
/* library editor: undo and redo functions */
|
||||
/********************************************/
|
||||
/********************************************/
|
||||
/* library editor: undo and redo functions */
|
||||
/********************************************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
|
@ -14,75 +14,78 @@
|
|||
#include "protos.h"
|
||||
|
||||
/* Functions to undo and redo edit commands.
|
||||
commmands to undo are in CurrentScreen->m_UndoList
|
||||
commmands to redo are in CurrentScreen->m_RedoList
|
||||
|
||||
m_UndoList and m_RedoList are a linked list of DrawPickedStruct.
|
||||
each DrawPickedStruct has its .m_Son member pointing to an item to undo or redo,
|
||||
or to a list of DrawPickedStruct which points (.m_PickedStruct membre)
|
||||
the items to undo or redo
|
||||
|
||||
there are 3 cases:
|
||||
- delete item(s) command
|
||||
- change item(s) command
|
||||
- add item(s) command
|
||||
|
||||
Undo command
|
||||
- delete item(s) command:
|
||||
deleted items are moved in undo list
|
||||
|
||||
- change item(s) command
|
||||
A copy of item(s) is made (a DrawPickedStruct list of wrappers)
|
||||
the .m_Image member of each wrapper points the modified item.
|
||||
|
||||
- add item(s) command
|
||||
A list of item(s) is made
|
||||
the .m_Image member of each wrapper points the new item.
|
||||
|
||||
Redo command
|
||||
- delete item(s) old command:
|
||||
deleted items are moved in EEDrawList list
|
||||
|
||||
- change item(s) command
|
||||
the copy of item(s) is moved in Undo list
|
||||
|
||||
- add item(s) command
|
||||
The list of item(s) is used to create a deleted list in undo list
|
||||
(same as a delete command)
|
||||
|
||||
A problem is the hierarchical sheet handling.
|
||||
the data associated (subhierarchy, uno/redo list) is deleted only
|
||||
when the sheet is really deleted (i.e. when deleted from undo or redo list)
|
||||
and not when it is a copy.
|
||||
*/
|
||||
* commmands to undo are in CurrentScreen->m_UndoList
|
||||
* commmands to redo are in CurrentScreen->m_RedoList
|
||||
*
|
||||
* m_UndoList and m_RedoList are a linked list of DrawPickedStruct.
|
||||
* each DrawPickedStruct has its .m_Son member pointing to an item to undo or redo,
|
||||
* or to a list of DrawPickedStruct which points (.m_PickedStruct membre)
|
||||
* the items to undo or redo
|
||||
*
|
||||
* there are 3 cases:
|
||||
* - delete item(s) command
|
||||
* - change item(s) command
|
||||
* - add item(s) command
|
||||
*
|
||||
* Undo command
|
||||
* - delete item(s) command:
|
||||
* deleted items are moved in undo list
|
||||
*
|
||||
* - change item(s) command
|
||||
* A copy of item(s) is made (a DrawPickedStruct list of wrappers)
|
||||
* the .m_Image member of each wrapper points the modified item.
|
||||
*
|
||||
* - add item(s) command
|
||||
* A list of item(s) is made
|
||||
* the .m_Image member of each wrapper points the new item.
|
||||
*
|
||||
* Redo command
|
||||
* - delete item(s) old command:
|
||||
* deleted items are moved in EEDrawList list
|
||||
*
|
||||
* - change item(s) command
|
||||
* the copy of item(s) is moved in Undo list
|
||||
*
|
||||
* - add item(s) command
|
||||
* The list of item(s) is used to create a deleted list in undo list
|
||||
* (same as a delete command)
|
||||
*
|
||||
* A problem is the hierarchical sheet handling.
|
||||
* the data associated (subhierarchy, uno/redo list) is deleted only
|
||||
* when the sheet is really deleted (i.e. when deleted from undo or redo list)
|
||||
* and not when it is a copy.
|
||||
*/
|
||||
|
||||
|
||||
/************************************/
|
||||
void SwapData(EDA_BaseStruct * Item)
|
||||
void SwapData( EDA_BaseStruct* Item )
|
||||
/************************************/
|
||||
|
||||
/* Used if undo / redo command:
|
||||
swap data between Item and its copy, pointed by its .m_Image member
|
||||
*/
|
||||
* swap data between Item and its copy, pointed by its .m_Image member
|
||||
*/
|
||||
{
|
||||
if ( Item == NULL ) return;
|
||||
EDA_BaseStruct * image = Item->m_Image;
|
||||
if (image == NULL ) return;
|
||||
if( Item == NULL )
|
||||
return;
|
||||
EDA_BaseStruct* image = Item->m_Image;
|
||||
if( image == NULL )
|
||||
return;
|
||||
|
||||
switch ( Item->m_StructType )
|
||||
switch( Item->Type() )
|
||||
{
|
||||
case DRAW_POLYLINE_STRUCT_TYPE:
|
||||
#undef SOURCE
|
||||
#undef DEST
|
||||
#define SOURCE ((DrawPolylineStruct*)Item)
|
||||
#define DEST ((DrawPolylineStruct*)image)
|
||||
#define SOURCE ( (DrawPolylineStruct*) Item )
|
||||
#define DEST ( (DrawPolylineStruct*) image )
|
||||
break;
|
||||
|
||||
case DRAW_JUNCTION_STRUCT_TYPE:
|
||||
#undef SOURCE
|
||||
#undef DEST
|
||||
#define SOURCE ((DrawJunctionStruct*)Item)
|
||||
#define DEST ((DrawJunctionStruct*)image)
|
||||
EXCHG(SOURCE->m_Pos, DEST->m_Pos);
|
||||
#define SOURCE ( (DrawJunctionStruct*) Item )
|
||||
#define DEST ( (DrawJunctionStruct*) image )
|
||||
EXCHG( SOURCE->m_Pos, DEST->m_Pos );
|
||||
break;
|
||||
|
||||
case DRAW_LABEL_STRUCT_TYPE:
|
||||
|
@ -90,135 +93,139 @@ void SwapData(EDA_BaseStruct * Item)
|
|||
case DRAW_TEXT_STRUCT_TYPE:
|
||||
#undef SOURCE
|
||||
#undef DEST
|
||||
#define SOURCE ((DrawTextStruct*)Item)
|
||||
#define DEST ((DrawTextStruct*)image)
|
||||
DEST->SwapData(SOURCE);
|
||||
#define SOURCE ( (DrawTextStruct*) Item )
|
||||
#define DEST ( (DrawTextStruct*) image )
|
||||
DEST->SwapData( SOURCE );
|
||||
break;
|
||||
|
||||
case DRAW_LIB_ITEM_STRUCT_TYPE:
|
||||
#undef SOURCE
|
||||
#undef DEST
|
||||
#define SOURCE ((EDA_SchComponentStruct*)Item)
|
||||
#define DEST ((EDA_SchComponentStruct*)image)
|
||||
DEST->SwapData(SOURCE);
|
||||
#define SOURCE ( (EDA_SchComponentStruct*) Item )
|
||||
#define DEST ( (EDA_SchComponentStruct*) image )
|
||||
DEST->SwapData( SOURCE );
|
||||
break;
|
||||
|
||||
case DRAW_SEGMENT_STRUCT_TYPE:
|
||||
#undef SOURCE
|
||||
#undef DEST
|
||||
#define SOURCE ((EDA_DrawLineStruct*)Item)
|
||||
#define DEST ((EDA_DrawLineStruct*)image)
|
||||
EXCHG(SOURCE->m_Start, DEST->m_Start);
|
||||
EXCHG(SOURCE->m_End, DEST->m_End);
|
||||
#define SOURCE ( (EDA_DrawLineStruct*) Item )
|
||||
#define DEST ( (EDA_DrawLineStruct*) image )
|
||||
EXCHG( SOURCE->m_Start, DEST->m_Start );
|
||||
EXCHG( SOURCE->m_End, DEST->m_End );
|
||||
break;
|
||||
|
||||
case DRAW_BUSENTRY_STRUCT_TYPE:
|
||||
#undef SOURCE
|
||||
#undef DEST
|
||||
#define SOURCE ((DrawBusEntryStruct*)Item)
|
||||
#define DEST ((DrawBusEntryStruct*)image)
|
||||
EXCHG(SOURCE->m_Pos, DEST->m_Pos);
|
||||
EXCHG(SOURCE->m_Size, DEST->m_Size);
|
||||
#define SOURCE ( (DrawBusEntryStruct*) Item )
|
||||
#define DEST ( (DrawBusEntryStruct*) image )
|
||||
EXCHG( SOURCE->m_Pos, DEST->m_Pos );
|
||||
EXCHG( SOURCE->m_Size, DEST->m_Size );
|
||||
break;
|
||||
|
||||
case DRAW_SHEET_STRUCT_TYPE:
|
||||
#undef SOURCE
|
||||
#undef DEST
|
||||
#define SOURCE ((DrawSheetStruct*)Item)
|
||||
#define DEST ((DrawSheetStruct*)image)
|
||||
DEST->SwapData(SOURCE);
|
||||
#define SOURCE ( (DrawSheetStruct*) Item )
|
||||
#define DEST ( (DrawSheetStruct*) image )
|
||||
DEST->SwapData( SOURCE );
|
||||
break;
|
||||
|
||||
case DRAW_MARKER_STRUCT_TYPE:
|
||||
#undef SOURCE
|
||||
#undef DEST
|
||||
#define SOURCE ((DrawMarkerStruct*)Item)
|
||||
#define DEST ((DrawMarkerStruct*)image)
|
||||
EXCHG(SOURCE->m_Pos, DEST->m_Pos);
|
||||
#define SOURCE ( (DrawMarkerStruct*) Item )
|
||||
#define DEST ( (DrawMarkerStruct*) image )
|
||||
EXCHG( SOURCE->m_Pos, DEST->m_Pos );
|
||||
break;
|
||||
|
||||
case DRAW_SHEETLABEL_STRUCT_TYPE:
|
||||
#undef SOURCE
|
||||
#undef DEST
|
||||
#define SOURCE ((DrawSheetLabelStruct*)Item)
|
||||
#define DEST ((DrawSheetLabelStruct*)image)
|
||||
EXCHG(SOURCE->m_Edge, DEST->m_Edge);
|
||||
EXCHG(SOURCE->m_Shape, DEST->m_Shape);
|
||||
#define SOURCE ( (DrawSheetLabelStruct*) Item )
|
||||
#define DEST ( (DrawSheetLabelStruct*) image )
|
||||
EXCHG( SOURCE->m_Edge, DEST->m_Edge );
|
||||
EXCHG( SOURCE->m_Shape, DEST->m_Shape );
|
||||
break;
|
||||
|
||||
case DRAW_NOCONNECT_STRUCT_TYPE:
|
||||
#undef SOURCE
|
||||
#undef DEST
|
||||
#define SOURCE ((DrawNoConnectStruct*)Item)
|
||||
#define DEST ((DrawNoConnectStruct*)image)
|
||||
EXCHG(SOURCE->m_Pos, DEST->m_Pos);
|
||||
#define SOURCE ( (DrawNoConnectStruct*) Item )
|
||||
#define DEST ( (DrawNoConnectStruct*) image )
|
||||
EXCHG( SOURCE->m_Pos, DEST->m_Pos );
|
||||
break;
|
||||
|
||||
case DRAW_PART_TEXT_STRUCT_TYPE:
|
||||
#undef SOURCE
|
||||
#undef DEST
|
||||
#define SOURCE ((DrawPolylineStruct*)Item)
|
||||
#define DEST ((DrawPolylineStruct*)image)
|
||||
#define SOURCE ( (DrawPolylineStruct*) Item )
|
||||
#define DEST ( (DrawPolylineStruct*) image )
|
||||
break;
|
||||
|
||||
// not directly used in schematic:
|
||||
default:
|
||||
DisplayInfo(NULL, wxT("SwapData() error: unexpected type"));
|
||||
DisplayInfo( NULL, wxT( "SwapData() error: unexpected type" ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
void WinEDA_SchematicFrame::SaveCopyInUndoList(EDA_BaseStruct * ItemToCopy,
|
||||
int flag_type_command)
|
||||
void WinEDA_SchematicFrame::SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy,
|
||||
int flag_type_command )
|
||||
/***********************************************************************/
|
||||
|
||||
/* Create a copy of the current schematic draw list, and put it in the undo list.
|
||||
A DrawPickedStruct wrapper is created to handle the draw list.
|
||||
the .m_Son of this wrapper points the list of items
|
||||
|
||||
flag_type_command =
|
||||
0 (unspecified)
|
||||
IS_CHANGED
|
||||
IS_NEW
|
||||
IS_DELETED
|
||||
IS_WIRE_IMAGE
|
||||
|
||||
for 0: only a wrapper is created. The used must init the .Flags member of the
|
||||
wrapper, and add the item list to the wrapper
|
||||
If it is a delete command, items are put on list with the .Flags member set to IS_DELETED.
|
||||
When it will be really deleted, the EEDrawList and the subhierarchy will be deleted.
|
||||
If it is only a copy, the EEDrawList and the subhierarchy must NOT be deleted.
|
||||
|
||||
Note:
|
||||
Edit wires and busses is a bit complex.
|
||||
because when a new wire is added, modifications in wire list
|
||||
(wire concatenation) there are modified items, deleted items and new items
|
||||
so flag_type_command is IS_WIRE_IMAGE: the struct ItemToCopy is a list of wires
|
||||
saved in Undo List (for Undo or Redo commands, saved wires will be exchanged with current wire list
|
||||
*/
|
||||
* A DrawPickedStruct wrapper is created to handle the draw list.
|
||||
* the .m_Son of this wrapper points the list of items
|
||||
*
|
||||
* flag_type_command =
|
||||
* 0 (unspecified)
|
||||
* IS_CHANGED
|
||||
* IS_NEW
|
||||
* IS_DELETED
|
||||
* IS_WIRE_IMAGE
|
||||
*
|
||||
* for 0: only a wrapper is created. The used must init the .Flags member of the
|
||||
* wrapper, and add the item list to the wrapper
|
||||
* If it is a delete command, items are put on list with the .Flags member set to IS_DELETED.
|
||||
* When it will be really deleted, the EEDrawList and the subhierarchy will be deleted.
|
||||
* If it is only a copy, the EEDrawList and the subhierarchy must NOT be deleted.
|
||||
*
|
||||
* Note:
|
||||
* Edit wires and busses is a bit complex.
|
||||
* because when a new wire is added, modifications in wire list
|
||||
* (wire concatenation) there are modified items, deleted items and new items
|
||||
* so flag_type_command is IS_WIRE_IMAGE: the struct ItemToCopy is a list of wires
|
||||
* saved in Undo List (for Undo or Redo commands, saved wires will be exchanged with current wire list
|
||||
*/
|
||||
{
|
||||
EDA_BaseStruct * CopyItem;
|
||||
EDA_BaseStruct* CopyItem;
|
||||
|
||||
DrawPickedStruct* NewList = new DrawPickedStruct( NULL );
|
||||
|
||||
DrawPickedStruct * NewList = new DrawPickedStruct(NULL);
|
||||
NewList->m_Flags = flag_type_command;
|
||||
|
||||
if ( ItemToCopy )
|
||||
if( ItemToCopy )
|
||||
{
|
||||
switch ( flag_type_command )
|
||||
switch( flag_type_command )
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
|
||||
case IS_CHANGED: /* Create a copy of schematic */
|
||||
NewList->m_Son = CopyItem = DuplicateStruct(ItemToCopy);
|
||||
if ( ItemToCopy->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE)
|
||||
NewList->m_Son = CopyItem = DuplicateStruct( ItemToCopy );
|
||||
if( ItemToCopy->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
DrawPickedStruct * PickedList = (DrawPickedStruct *) CopyItem;
|
||||
while (PickedList)
|
||||
DrawPickedStruct* PickedList = (DrawPickedStruct*) CopyItem;
|
||||
while( PickedList )
|
||||
{
|
||||
CopyItem = PickedList->m_PickedStruct;
|
||||
CopyItem->m_Flags = flag_type_command;
|
||||
PickedList->m_Image = CopyItem->m_Image;
|
||||
PickedList = (DrawPickedStruct *)PickedList->Pnext;
|
||||
PickedList = (DrawPickedStruct*) PickedList->Pnext;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -229,17 +236,17 @@ EDA_BaseStruct * CopyItem;
|
|||
break;
|
||||
|
||||
case IS_NEW:
|
||||
if ( ItemToCopy->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE)
|
||||
if( ItemToCopy->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
NewList->m_Son = ItemToCopy;
|
||||
DrawPickedStruct * PickedList = (DrawPickedStruct *) ItemToCopy;
|
||||
while (PickedList)
|
||||
DrawPickedStruct* PickedList = (DrawPickedStruct*) ItemToCopy;
|
||||
while( PickedList )
|
||||
{
|
||||
CopyItem = PickedList->m_PickedStruct;
|
||||
PickedList->m_Image = CopyItem;
|
||||
PickedList->m_PickedStruct = NULL;
|
||||
PickedList->m_Flags = flag_type_command;
|
||||
PickedList = (DrawPickedStruct *)PickedList->Pnext;
|
||||
PickedList = (DrawPickedStruct*) PickedList->Pnext;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -248,7 +255,7 @@ EDA_BaseStruct * CopyItem;
|
|||
}
|
||||
break;
|
||||
|
||||
case IS_NEW|IS_CHANGED:
|
||||
case IS_NEW | IS_CHANGED:
|
||||
case IS_WIRE_IMAGE:
|
||||
NewList->m_Son = ItemToCopy;
|
||||
break;
|
||||
|
@ -256,47 +263,50 @@ EDA_BaseStruct * CopyItem;
|
|||
case IS_DELETED:
|
||||
NewList->m_Son = ItemToCopy;
|
||||
ItemToCopy->m_Flags = flag_type_command;
|
||||
if ( ItemToCopy->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
if( ItemToCopy->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
DrawPickedStruct * PickedList = (DrawPickedStruct *) ItemToCopy;
|
||||
while (PickedList)
|
||||
DrawPickedStruct* PickedList = (DrawPickedStruct*) ItemToCopy;
|
||||
while( PickedList )
|
||||
{
|
||||
CopyItem = PickedList->m_PickedStruct;
|
||||
CopyItem->m_Flags = flag_type_command;
|
||||
PickedList->m_Flags = flag_type_command;
|
||||
PickedList = (DrawPickedStruct *)PickedList->Pnext;
|
||||
PickedList = (DrawPickedStruct*) PickedList->Pnext;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
DisplayError(this, wxT("SaveCopyInUndoList() error"));
|
||||
DisplayError( this, wxT( "SaveCopyInUndoList() error" ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Save the copy in undo list */
|
||||
GetScreen()->AddItemToUndoList(NewList);
|
||||
GetScreen()->AddItemToUndoList( NewList );
|
||||
|
||||
/* Clear redo list, because after new save there is no redo to do */
|
||||
GetScreen()->ClearUndoORRedoList(GetScreen()->m_RedoList);
|
||||
GetScreen()->ClearUndoORRedoList( GetScreen()->m_RedoList );
|
||||
GetScreen()->m_RedoList = NULL;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************/
|
||||
void WinEDA_SchematicFrame::GetSchematicFromRedoList(void)
|
||||
void WinEDA_SchematicFrame::GetSchematicFromRedoList()
|
||||
/**********************************************************/
|
||||
|
||||
/* Redo the last edition:
|
||||
- Save the current schematic in undo list
|
||||
- Get the old version
|
||||
*/
|
||||
* - Save the current schematic in undo list
|
||||
* - Get the old version
|
||||
*/
|
||||
{
|
||||
if ( GetScreen()->m_RedoList == NULL ) return;
|
||||
if( GetScreen()->m_RedoList == NULL )
|
||||
return;
|
||||
|
||||
/* Get the old wrapper and put it in UndoList */
|
||||
DrawPickedStruct * List = (DrawPickedStruct *)GetScreen()->GetItemFromRedoList();
|
||||
GetScreen()->AddItemToUndoList(List);
|
||||
DrawPickedStruct* List = (DrawPickedStruct*) GetScreen()->GetItemFromRedoList();
|
||||
GetScreen()->AddItemToUndoList( List );
|
||||
/* Redo the command: */
|
||||
PutDataInPreviousState(List);
|
||||
PutDataInPreviousState( List );
|
||||
|
||||
CurrentDrawItem = NULL;
|
||||
GetScreen()->SetModify();
|
||||
|
@ -306,48 +316,49 @@ void WinEDA_SchematicFrame::GetSchematicFromRedoList(void)
|
|||
|
||||
|
||||
/***************************************************************************/
|
||||
void WinEDA_SchematicFrame::PutDataInPreviousState(DrawPickedStruct * List)
|
||||
void WinEDA_SchematicFrame::PutDataInPreviousState( DrawPickedStruct* List )
|
||||
/***************************************************************************/
|
||||
/* Used in undo or redo command.
|
||||
Put data pointed by List in the previous state, i.e. the state memorised by List
|
||||
*/
|
||||
{
|
||||
EDA_BaseStruct * FirstItem = List->m_Son;
|
||||
EDA_BaseStruct * item;
|
||||
DrawPickedStruct * PickedList;
|
||||
|
||||
switch ( List->m_Flags )
|
||||
/* Used in undo or redo command.
|
||||
* Put data pointed by List in the previous state, i.e. the state memorised by List
|
||||
*/
|
||||
{
|
||||
EDA_BaseStruct* FirstItem = List->m_Son;
|
||||
EDA_BaseStruct* item;
|
||||
DrawPickedStruct* PickedList;
|
||||
|
||||
switch( List->m_Flags )
|
||||
{
|
||||
case IS_CHANGED: /* Exchange old and new data for each item */
|
||||
if ( FirstItem == NULL )
|
||||
if( FirstItem == NULL )
|
||||
{
|
||||
DisplayError(this, wxT("PutDataInPreviousState() error : Null item"));
|
||||
DisplayError( this, wxT( "PutDataInPreviousState() error : Null item" ) );
|
||||
break;
|
||||
}
|
||||
if ( FirstItem->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE)
|
||||
if( FirstItem->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
DrawPickedStruct * PickedList = (DrawPickedStruct *) FirstItem;
|
||||
while ( PickedList )
|
||||
DrawPickedStruct* PickedList = (DrawPickedStruct*) FirstItem;
|
||||
while( PickedList )
|
||||
{
|
||||
SwapData(PickedList->m_PickedStruct);
|
||||
SwapData( PickedList->m_PickedStruct );
|
||||
PickedList = PickedList->Next();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SwapData(FirstItem);
|
||||
SwapData( FirstItem );
|
||||
}
|
||||
break;
|
||||
|
||||
case IS_NEW: /* new items are deleted */
|
||||
List->m_Flags = IS_DELETED;
|
||||
if ( FirstItem && FirstItem->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE)
|
||||
if( FirstItem && FirstItem->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
PickedList = (DrawPickedStruct *) FirstItem;
|
||||
while ( PickedList )
|
||||
PickedList = (DrawPickedStruct*) FirstItem;
|
||||
while( PickedList )
|
||||
{
|
||||
item = PickedList->m_Image;
|
||||
GetScreen()->RemoveFromDrawList(item);
|
||||
GetScreen()->RemoveFromDrawList( item );
|
||||
item->m_Flags = IS_DELETED;
|
||||
PickedList->m_PickedStruct = item;
|
||||
PickedList->m_Flags = IS_DELETED;
|
||||
|
@ -357,7 +368,7 @@ DrawPickedStruct * PickedList;
|
|||
else
|
||||
{
|
||||
FirstItem = List->m_Image;
|
||||
GetScreen()->RemoveFromDrawList(FirstItem);
|
||||
GetScreen()->RemoveFromDrawList( FirstItem );
|
||||
FirstItem->m_Flags = IS_DELETED;
|
||||
List->m_Son = FirstItem;
|
||||
}
|
||||
|
@ -365,10 +376,10 @@ DrawPickedStruct * PickedList;
|
|||
|
||||
case IS_DELETED: /* deleted items are put in EEdrawList, as new items */
|
||||
List->m_Flags = IS_NEW;
|
||||
if ( FirstItem->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE)
|
||||
if( FirstItem->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
PickedList = (DrawPickedStruct *) FirstItem;
|
||||
while ( PickedList )
|
||||
PickedList = (DrawPickedStruct*) FirstItem;
|
||||
while( PickedList )
|
||||
{
|
||||
item = PickedList->m_PickedStruct;
|
||||
item->Pnext = GetScreen()->EEDrawList;
|
||||
|
@ -392,36 +403,37 @@ DrawPickedStruct * PickedList;
|
|||
|
||||
case IS_WIRE_IMAGE:
|
||||
/* Exchange the current wires and the oild wires */
|
||||
List->m_Son = GetScreen()->ExtractWires(FALSE);
|
||||
while ( FirstItem )
|
||||
List->m_Son = GetScreen()->ExtractWires( FALSE );
|
||||
while( FirstItem )
|
||||
{
|
||||
EDA_BaseStruct * nextitem = FirstItem->Pnext;
|
||||
EDA_BaseStruct* nextitem = FirstItem->Pnext;
|
||||
FirstItem->Pnext = GetScreen()->EEDrawList;
|
||||
GetScreen()->EEDrawList = FirstItem;
|
||||
FirstItem->m_Flags = 0;
|
||||
FirstItem = nextitem;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case IS_NEW|IS_CHANGED:
|
||||
case IS_DELETED|IS_CHANGED:
|
||||
if ( !FirstItem || FirstItem->m_StructType != DRAW_PICK_ITEM_STRUCT_TYPE)
|
||||
case IS_NEW | IS_CHANGED:
|
||||
case IS_DELETED | IS_CHANGED:
|
||||
if( !FirstItem || FirstItem->Type() != DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
DisplayError(this, wxT("GetSchematicFromUndoList() error: Pickstruct expected"));
|
||||
DisplayError( this, wxT( "GetSchematicFromUndoList() error: Pickstruct expected" ) );
|
||||
break;
|
||||
}
|
||||
PickedList = (DrawPickedStruct *) FirstItem;
|
||||
while ( PickedList )
|
||||
PickedList = (DrawPickedStruct*) FirstItem;
|
||||
while( PickedList )
|
||||
{
|
||||
switch (PickedList->m_Flags)
|
||||
switch( PickedList->m_Flags )
|
||||
{
|
||||
case IS_CHANGED:
|
||||
SwapData(PickedList->m_PickedStruct);
|
||||
SwapData( PickedList->m_PickedStruct );
|
||||
break;
|
||||
|
||||
case IS_NEW:
|
||||
item = PickedList->m_Image;
|
||||
GetScreen()->RemoveFromDrawList(item);
|
||||
GetScreen()->RemoveFromDrawList( item );
|
||||
item->m_Flags = IS_DELETED;
|
||||
PickedList->m_PickedStruct = item;
|
||||
PickedList->m_Flags = IS_DELETED;
|
||||
|
@ -437,31 +449,36 @@ DrawPickedStruct * PickedList;
|
|||
PickedList->m_Flags = IS_NEW;
|
||||
break;
|
||||
}
|
||||
|
||||
PickedList = PickedList->Next();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
DisplayError(this, wxT("GetSchematicFromUndoList() error: Unknown cmd"));
|
||||
DisplayError( this, wxT( "GetSchematicFromUndoList() error: Unknown cmd" ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************/
|
||||
void WinEDA_SchematicFrame::GetSchematicFromUndoList(void)
|
||||
void WinEDA_SchematicFrame::GetSchematicFromUndoList()
|
||||
/**********************************************************/
|
||||
|
||||
/* Undo the last edition:
|
||||
- Save the current schematic in Redo list
|
||||
- Get an old version of the schematic
|
||||
*/
|
||||
* - Save the current schematic in Redo list
|
||||
* - Get an old version of the schematic
|
||||
*/
|
||||
{
|
||||
if ( GetScreen()->m_UndoList == NULL ) return;
|
||||
if( GetScreen()->m_UndoList == NULL )
|
||||
return;
|
||||
|
||||
/* Get the old wrapper and put it in RedoList (the real data list is the m_Son member) */
|
||||
DrawPickedStruct * List = (DrawPickedStruct *)GetScreen()->GetItemFromUndoList();
|
||||
GetScreen()->AddItemToRedoList(List);
|
||||
DrawPickedStruct* List = (DrawPickedStruct*) GetScreen()->GetItemFromUndoList();
|
||||
GetScreen()->AddItemToRedoList( List );
|
||||
/* Undo the command */
|
||||
PutDataInPreviousState(List);
|
||||
PutDataInPreviousState( List );
|
||||
|
||||
CurrentDrawItem = NULL;
|
||||
GetScreen()->SetModify();
|
||||
|
@ -471,21 +488,23 @@ void WinEDA_SchematicFrame::GetSchematicFromUndoList(void)
|
|||
|
||||
|
||||
/*********************************************************/
|
||||
void SCH_SCREEN::ClearUndoORRedoList(EDA_BaseStruct *List)
|
||||
void SCH_SCREEN::ClearUndoORRedoList( EDA_BaseStruct* List )
|
||||
/*********************************************************/
|
||||
|
||||
/* free the undo or redo list from List element
|
||||
Wrappers are deleted.
|
||||
datas pointed by wrappers are deleted if not flagged IS_NEW
|
||||
because they are copy of used data or they are not in use (DELETED)
|
||||
*/
|
||||
* Wrappers are deleted.
|
||||
* datas pointed by wrappers are deleted if not flagged IS_NEW
|
||||
* because they are copy of used data or they are not in use (DELETED)
|
||||
*/
|
||||
{
|
||||
EDA_BaseStruct *nextitem;
|
||||
EDA_BaseStruct * FirstItem;
|
||||
int CmdType;
|
||||
EDA_BaseStruct* nextitem;
|
||||
EDA_BaseStruct* FirstItem;
|
||||
int CmdType;
|
||||
|
||||
if ( List == NULL ) return;
|
||||
if( List == NULL )
|
||||
return;
|
||||
|
||||
for ( ; List != NULL; List = nextitem )
|
||||
for( ; List != NULL; List = nextitem )
|
||||
{
|
||||
nextitem = List->Pnext;
|
||||
FirstItem = List->m_Son;
|
||||
|
@ -493,27 +512,28 @@ int CmdType;
|
|||
|
||||
delete List;
|
||||
|
||||
if (FirstItem == NULL ) continue;
|
||||
if( FirstItem == NULL )
|
||||
continue;
|
||||
|
||||
if ( FirstItem->m_StructType == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
if( FirstItem->Type() == DRAW_PICK_ITEM_STRUCT_TYPE )
|
||||
{
|
||||
EDA_BaseStruct * item;
|
||||
DrawPickedStruct * PickedList = (DrawPickedStruct *) FirstItem;
|
||||
while ( PickedList ) // delete wrapper list and copies
|
||||
EDA_BaseStruct* item;
|
||||
DrawPickedStruct* PickedList = (DrawPickedStruct*) FirstItem;
|
||||
while( PickedList ) // delete wrapper list and copies
|
||||
{
|
||||
item = PickedList->m_PickedStruct;
|
||||
if ( item )
|
||||
if( item )
|
||||
{
|
||||
if ( item->m_StructType == DRAW_SHEET_STRUCT_TYPE )
|
||||
if( item->Type() == DRAW_SHEET_STRUCT_TYPE )
|
||||
{
|
||||
DrawSheetStruct * sheet = (DrawSheetStruct*)item;
|
||||
DrawSheetStruct* sheet = (DrawSheetStruct*) item;
|
||||
/* Delete sub hierarchy if the sheet must be deleted */
|
||||
if ( (sheet->m_Flags & IS_DELETED) != 0 )
|
||||
DeleteSubHierarchy(sheet, FALSE);
|
||||
if( (sheet->m_Flags & IS_DELETED) != 0 )
|
||||
DeleteSubHierarchy( sheet, FALSE );
|
||||
else /* EEDrawList, UndoList and Redo list are shared, and are deleted
|
||||
only if sheet is deleted */
|
||||
* only if sheet is deleted */
|
||||
{
|
||||
if ( (item->m_Flags & IS_NEW) == 0 )
|
||||
if( (item->m_Flags & IS_NEW) == 0 )
|
||||
{
|
||||
sheet->EEDrawList = NULL;
|
||||
sheet->m_UndoList = NULL;
|
||||
|
@ -521,35 +541,36 @@ int CmdType;
|
|||
}
|
||||
}
|
||||
}
|
||||
if ( (item->m_Flags & IS_NEW) == 0 ) delete item;
|
||||
if( (item->m_Flags & IS_NEW) == 0 )
|
||||
delete item;
|
||||
}
|
||||
DrawPickedStruct * wrapper = PickedList;
|
||||
DrawPickedStruct* wrapper = PickedList;
|
||||
PickedList = PickedList->Next();
|
||||
delete wrapper;
|
||||
}
|
||||
}
|
||||
else // This is a single item: deleted copy
|
||||
{
|
||||
if ( CmdType == IS_WIRE_IMAGE )
|
||||
if( CmdType == IS_WIRE_IMAGE )
|
||||
{
|
||||
while ( FirstItem )
|
||||
while( FirstItem )
|
||||
{
|
||||
EDA_BaseStruct * nextitem = FirstItem->Pnext;
|
||||
EDA_BaseStruct* nextitem = FirstItem->Pnext;
|
||||
delete FirstItem;
|
||||
FirstItem = nextitem;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( FirstItem->m_StructType == DRAW_SHEET_STRUCT_TYPE )
|
||||
if( FirstItem->Type() == DRAW_SHEET_STRUCT_TYPE )
|
||||
{
|
||||
DrawSheetStruct * sheet = (DrawSheetStruct*)FirstItem;
|
||||
DrawSheetStruct* sheet = (DrawSheetStruct*) FirstItem;
|
||||
/* Delete hierarchy if the sheet must be deleted */
|
||||
if ( (sheet->m_Flags & IS_DELETED) == IS_DELETED )
|
||||
DeleteSubHierarchy(sheet, FALSE);
|
||||
if( (sheet->m_Flags & IS_DELETED) == IS_DELETED )
|
||||
DeleteSubHierarchy( sheet, FALSE );
|
||||
else
|
||||
{
|
||||
if ( (FirstItem->m_Flags & IS_NEW) == 0 )
|
||||
if( (FirstItem->m_Flags & IS_NEW) == 0 )
|
||||
{
|
||||
sheet->EEDrawList = NULL;
|
||||
sheet->m_UndoList = NULL;
|
||||
|
@ -557,80 +578,92 @@ int CmdType;
|
|||
}
|
||||
}
|
||||
}
|
||||
if ( (FirstItem->m_Flags & IS_NEW) == 0 ) delete FirstItem;
|
||||
if( (FirstItem->m_Flags & IS_NEW) == 0 )
|
||||
delete FirstItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*****************************************/
|
||||
void SCH_SCREEN::ClearUndoRedoList(void)
|
||||
void SCH_SCREEN::ClearUndoRedoList()
|
||||
/*****************************************/
|
||||
|
||||
/* free the undo and the redo lists
|
||||
*/
|
||||
*/
|
||||
{
|
||||
ClearUndoORRedoList(m_UndoList); m_UndoList = NULL;
|
||||
ClearUndoORRedoList(m_RedoList); m_RedoList = NULL;
|
||||
ClearUndoORRedoList( m_UndoList ); m_UndoList = NULL;
|
||||
ClearUndoORRedoList( m_RedoList ); m_RedoList = NULL;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************/
|
||||
void SCH_SCREEN::AddItemToUndoList(EDA_BaseStruct * newitem)
|
||||
void SCH_SCREEN::AddItemToUndoList( EDA_BaseStruct* newitem )
|
||||
/************************************************************/
|
||||
|
||||
/* Put newitem in head of undo list
|
||||
Deletes olds items if > count max.
|
||||
*/
|
||||
* Deletes olds items if > count max.
|
||||
*/
|
||||
{
|
||||
int ii;
|
||||
EDA_BaseStruct * item, *nextitem;
|
||||
int ii;
|
||||
EDA_BaseStruct* item, * nextitem;
|
||||
|
||||
if ( newitem == NULL ) return;
|
||||
if( newitem == NULL )
|
||||
return;
|
||||
|
||||
if ( m_UndoList ) m_UndoList->Pback = newitem;
|
||||
if( m_UndoList )
|
||||
m_UndoList->Pback = newitem;
|
||||
newitem->Pnext = m_UndoList;
|
||||
newitem->Pback = NULL;
|
||||
m_UndoList = newitem;
|
||||
|
||||
/* Free oldest items, if count max reached */
|
||||
for ( ii = 0, item = m_UndoList; ii < m_UndoRedoCountMax; ii++ )
|
||||
for( ii = 0, item = m_UndoList; ii < m_UndoRedoCountMax; ii++ )
|
||||
{
|
||||
if ( item->Pnext == NULL ) return;
|
||||
if( item->Pnext == NULL )
|
||||
return;
|
||||
item = item->Pnext;
|
||||
}
|
||||
|
||||
if ( item == NULL ) return;
|
||||
if( item == NULL )
|
||||
return;
|
||||
|
||||
nextitem = item->Pnext;
|
||||
item->Pnext = NULL; // Set end of chain
|
||||
|
||||
// Delete the extra items
|
||||
ClearUndoORRedoList(nextitem);
|
||||
ClearUndoORRedoList( nextitem );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************/
|
||||
void SCH_SCREEN::AddItemToRedoList(EDA_BaseStruct * newitem)
|
||||
void SCH_SCREEN::AddItemToRedoList( EDA_BaseStruct* newitem )
|
||||
/***********************************************************/
|
||||
{
|
||||
int ii;
|
||||
EDA_BaseStruct * item, *nextitem;
|
||||
int ii;
|
||||
EDA_BaseStruct* item, * nextitem;
|
||||
|
||||
if ( newitem == NULL ) return;
|
||||
if( newitem == NULL )
|
||||
return;
|
||||
|
||||
newitem->Pback = NULL;
|
||||
newitem->Pnext = m_RedoList;
|
||||
m_RedoList = newitem;
|
||||
/* Free first items, if count max reached */
|
||||
for ( ii = 0, item = m_RedoList; ii < m_UndoRedoCountMax; ii++ )
|
||||
for( ii = 0, item = m_RedoList; ii < m_UndoRedoCountMax; ii++ )
|
||||
{
|
||||
if ( item->Pnext == NULL ) break;
|
||||
if( item->Pnext == NULL )
|
||||
break;
|
||||
item = item->Pnext;
|
||||
}
|
||||
|
||||
if ( item == NULL ) return;
|
||||
if( item == NULL )
|
||||
return;
|
||||
|
||||
nextitem = item->Pnext;
|
||||
item->Pnext = NULL; // Set end of chain
|
||||
|
||||
// Delete the extra items
|
||||
ClearUndoORRedoList(nextitem);
|
||||
ClearUndoORRedoList( nextitem );
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* export_to_pcbnew.cpp */
|
||||
|
||||
/*
|
||||
* Export des couches vers pcbnew
|
||||
* Export the layers to pcbnew
|
||||
*/
|
||||
|
||||
#include "fctsys.h"
|
||||
|
@ -119,7 +119,8 @@ static int SavePcbFormatAscii( WinEDA_GerberFrame* frame, FILE* File,
|
|||
*/
|
||||
{
|
||||
char Line[256];
|
||||
TRACK* track, * next_track;
|
||||
TRACK* track;
|
||||
TRACK* next_track;
|
||||
BOARD_ITEM* PtStruct;
|
||||
BOARD_ITEM* NextStruct;
|
||||
BOARD* GerberPcb = frame->m_Pcb;
|
||||
|
@ -136,6 +137,7 @@ static int SavePcbFormatAscii( WinEDA_GerberFrame* frame, FILE* File,
|
|||
int pcb_layer_number = LayerLookUpTable[layer];
|
||||
if( pcb_layer_number < 0 )
|
||||
continue;
|
||||
|
||||
if( pcb_layer_number > CMP_N )
|
||||
{
|
||||
DRAWSEGMENT* drawitem = new DRAWSEGMENT( NULL, TYPEDRAWSEGMENT );
|
||||
|
@ -149,47 +151,57 @@ static int SavePcbFormatAscii( WinEDA_GerberFrame* frame, FILE* File,
|
|||
}
|
||||
else
|
||||
{
|
||||
TRACK* newtrack = new TRACK( * track );
|
||||
TRACK* newtrack;
|
||||
|
||||
// replace spots with vias when possible
|
||||
if( (track->m_Shape == S_SPOT_CIRCLE)
|
||||
|| (track->m_Shape == S_SPOT_RECT)
|
||||
|| (track->m_Shape == S_SPOT_OVALE) )
|
||||
{
|
||||
newtrack = new SEGVIA( (const SEGVIA&) *track );
|
||||
|
||||
// A spot is found, and can be a via: change it to via, and delete other
|
||||
// spots at same location
|
||||
newtrack->m_Shape = VIA_NORMALE;
|
||||
|
||||
newtrack->SetLayer( 0x0F ); // Layers are 0 to 15 (Cu/Cmp)
|
||||
|
||||
newtrack->m_Drill = -1;
|
||||
|
||||
// Compute the via position from track position ( Via position is the
|
||||
// position of the middle of the track segment )
|
||||
newtrack->m_Start.x = (newtrack->m_Start.x + newtrack->m_End.x) / 2;
|
||||
newtrack->m_Start.y = (newtrack->m_Start.y + newtrack->m_End.y) / 2;
|
||||
newtrack->m_End = newtrack->m_Start;
|
||||
}
|
||||
else // a true TRACK
|
||||
{
|
||||
newtrack = new TRACK( *track );
|
||||
newtrack->SetLayer( pcb_layer_number );
|
||||
}
|
||||
|
||||
newtrack->Insert( Pcb, NULL );
|
||||
}
|
||||
}
|
||||
|
||||
/* replace spots by vias when possible */
|
||||
for( track = Pcb->m_Track; track != NULL; track = (TRACK*) track->Pnext )
|
||||
{
|
||||
if( (track->m_Shape != S_SPOT_CIRCLE) && (track->m_Shape != S_SPOT_RECT) &&
|
||||
(track->m_Shape != S_SPOT_OVALE) )
|
||||
continue;
|
||||
|
||||
/* A spot is found, and can be a via: change it for via, and delete others
|
||||
* spots at same location */
|
||||
track->m_Shape = VIA_NORMALE;
|
||||
track->m_StructType = TYPEVIA;
|
||||
track->SetLayer( 0x0F ); // Layers are 0 to 15 (Cu/Cmp)
|
||||
track->m_Drill = -1;
|
||||
/* Compute the via position from track position ( Via position is the position of the middle of the track segment */
|
||||
track->m_Start.x = (track->m_Start.x + track->m_End.x) / 2;
|
||||
track->m_Start.y = (track->m_Start.y + track->m_End.y) / 2;
|
||||
track->m_End = track->m_Start;
|
||||
}
|
||||
|
||||
/* delete redundant vias */
|
||||
// delete redundant vias
|
||||
for( track = Pcb->m_Track; track != NULL; track = track->Next() )
|
||||
{
|
||||
if( track->m_Shape != VIA_NORMALE )
|
||||
continue;
|
||||
/* Search and delete others vias*/
|
||||
|
||||
// Search and delete others vias
|
||||
TRACK* alt_track = track->Next();
|
||||
for( ; alt_track != NULL; alt_track = next_track )
|
||||
{
|
||||
next_track = (TRACK*) alt_track->Pnext;
|
||||
next_track = alt_track->Next();
|
||||
if( alt_track->m_Shape != VIA_NORMALE )
|
||||
continue;
|
||||
|
||||
if( alt_track->m_Start != track->m_Start )
|
||||
continue;
|
||||
/* delete track */
|
||||
|
||||
// delete track
|
||||
alt_track->UnLink();
|
||||
delete alt_track;
|
||||
}
|
||||
|
@ -197,17 +209,18 @@ static int SavePcbFormatAscii( WinEDA_GerberFrame* frame, FILE* File,
|
|||
|
||||
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
|
||||
setlocale( LC_NUMERIC, "C" );
|
||||
/* Ecriture de l'entete PCB : */
|
||||
|
||||
// write the PCB heading
|
||||
fprintf( File, "PCBNEW-BOARD Version %d date %s\n\n", g_CurrentVersionPCB,
|
||||
DateAndTime( Line ) );
|
||||
WriteGeneralDescrPcb( Pcb, File );
|
||||
WriteSetup( File, Pcb );
|
||||
|
||||
/* Ecriture des donnes utiles du pcb */
|
||||
// write the useful part of the pcb
|
||||
PtStruct = Pcb->m_Drawings;
|
||||
for( ; PtStruct != NULL; PtStruct = PtStruct->Next() )
|
||||
{
|
||||
switch( PtStruct->m_StructType )
|
||||
switch( PtStruct->Type() )
|
||||
{
|
||||
case TYPETEXTE:
|
||||
( (TEXTE_PCB*) PtStruct )->WriteTextePcbDescr( File );
|
||||
|
@ -232,7 +245,7 @@ static int SavePcbFormatAscii( WinEDA_GerberFrame* frame, FILE* File,
|
|||
|
||||
fprintf( File, "$EndBOARD\n" );
|
||||
|
||||
/* Delete the copy */
|
||||
// Delete the copy
|
||||
for( PtStruct = Pcb->m_Drawings; PtStruct != NULL; PtStruct = NextStruct )
|
||||
{
|
||||
NextStruct = PtStruct->Next();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/********************************************************/
|
||||
/* Effacements : Routines de sauvegarde et d'effacement */
|
||||
/********************************************************/
|
||||
/********************************************************/
|
||||
/* Effacements : Routines de sauvegarde et d'effacement */
|
||||
/********************************************************/
|
||||
|
||||
#include "fctsys.h"
|
||||
|
||||
|
@ -14,95 +14,104 @@
|
|||
/* Routines Locales */
|
||||
|
||||
/***********************************************/
|
||||
void WinEDA_GerberFrame::UnDeleteItem(wxDC * DC)
|
||||
void WinEDA_GerberFrame::UnDeleteItem( wxDC* DC )
|
||||
/***********************************************/
|
||||
|
||||
/* Restitution d'un element (MODULE ou TRACK ) Efface
|
||||
*/
|
||||
*/
|
||||
{
|
||||
EDA_BaseStruct * PtStruct, *PtNext;
|
||||
TRACK * pt_track;
|
||||
int net_code;
|
||||
EDA_BaseStruct* PtStruct, * PtNext;
|
||||
TRACK* pt_track;
|
||||
int net_code;
|
||||
|
||||
if( ! g_UnDeleteStackPtr ) return;
|
||||
if( !g_UnDeleteStackPtr )
|
||||
return;
|
||||
|
||||
g_UnDeleteStackPtr --;
|
||||
g_UnDeleteStackPtr--;
|
||||
PtStruct = g_UnDeleteStack[g_UnDeleteStackPtr];
|
||||
if ( PtStruct == NULL ) return; // Ne devrait pas se produire
|
||||
if( PtStruct == NULL )
|
||||
return; // Ne devrait pas se produire
|
||||
|
||||
switch(PtStruct->m_StructType)
|
||||
switch( PtStruct->Type() )
|
||||
{
|
||||
case TYPEVIA:
|
||||
case TYPETRACK:
|
||||
for( ; PtStruct != NULL; PtStruct = PtNext)
|
||||
for( ; PtStruct != NULL; PtStruct = PtNext )
|
||||
{
|
||||
PtNext = PtStruct->Pnext;
|
||||
PtStruct->SetState(DELETED,OFF); /* Effacement du bit DELETED */
|
||||
Trace_Segment(DrawPanel, DC, (TRACK*) PtStruct, GR_OR);
|
||||
PtStruct->SetState( DELETED, OFF ); /* Effacement du bit DELETED */
|
||||
Trace_Segment( DrawPanel, DC, (TRACK*) PtStruct, GR_OR );
|
||||
}
|
||||
|
||||
PtStruct = g_UnDeleteStack[g_UnDeleteStackPtr];
|
||||
net_code = ((TRACK*)PtStruct)->m_NetCode;
|
||||
pt_track = ( (TRACK*) PtStruct)->GetBestInsertPoint(m_Pcb);
|
||||
((TRACK*)PtStruct)->Insert(m_Pcb, pt_track);
|
||||
net_code = ( (TRACK*) PtStruct )->m_NetCode;
|
||||
pt_track = ( (TRACK*) PtStruct )->GetBestInsertPoint( m_Pcb );
|
||||
( (TRACK*) PtStruct )->Insert( m_Pcb, pt_track );
|
||||
|
||||
g_UnDeleteStack[g_UnDeleteStackPtr] = NULL;
|
||||
break;
|
||||
|
||||
default:
|
||||
DisplayError(this, wxT("Undelete struct: type Struct inattendu"));
|
||||
DisplayError( this, wxT( "Undelete struct: type Struct inattendu" ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************/
|
||||
EDA_BaseStruct * SaveItemEfface(EDA_BaseStruct * PtItem, int nbitems)
|
||||
BOARD_ITEM* SaveItemEfface( BOARD_ITEM* PtItem, int nbitems )
|
||||
/********************************************************************/
|
||||
/* Sauvegarde d'un element aux fins de restitution par Undelete
|
||||
Supporte actuellement : Module et segments de piste
|
||||
*/
|
||||
{
|
||||
EDA_BaseStruct * NextS, * PtStruct = PtItem;
|
||||
int ii;
|
||||
if( (PtItem == NULL) || (nbitems == 0) ) return NULL;
|
||||
|
||||
if (g_UnDeleteStackPtr >= UNDELETE_STACK_SIZE )
|
||||
/* Sauvegarde d'un element aux fins de restitution par Undelete
|
||||
* Supporte actuellement : Module et segments de piste
|
||||
*/
|
||||
{
|
||||
BOARD_ITEM* NextS, * PtStruct = PtItem;
|
||||
int ii;
|
||||
|
||||
if( (PtItem == NULL) || (nbitems == 0) )
|
||||
return NULL;
|
||||
|
||||
if( g_UnDeleteStackPtr >= UNDELETE_STACK_SIZE )
|
||||
{
|
||||
/* Delete last deleted item, and shift stack. */
|
||||
DeleteStructure(g_UnDeleteStack[0]);
|
||||
for (ii = 0; ii < (g_UnDeleteStackPtr-1); ii++)
|
||||
DeleteStructure( g_UnDeleteStack[0] );
|
||||
for( ii = 0; ii < (g_UnDeleteStackPtr - 1); ii++ )
|
||||
{
|
||||
g_UnDeleteStack[ii] = g_UnDeleteStack[ii + 1];
|
||||
}
|
||||
|
||||
g_UnDeleteStackPtr--;;
|
||||
}
|
||||
g_UnDeleteStack[g_UnDeleteStackPtr++] = PtItem;
|
||||
|
||||
switch ( PtStruct->m_StructType )
|
||||
switch( PtStruct->Type() )
|
||||
{
|
||||
case TYPEVIA:
|
||||
case TYPETRACK:
|
||||
{
|
||||
EDA_BaseStruct * Back = NULL;
|
||||
g_UnDeleteStack[g_UnDeleteStackPtr-1] = PtStruct;
|
||||
EDA_BaseStruct* Back = NULL;
|
||||
g_UnDeleteStack[g_UnDeleteStackPtr - 1] = PtStruct;
|
||||
|
||||
for ( ; nbitems > 0; nbitems--, PtStruct = NextS)
|
||||
for( ; nbitems > 0; nbitems--, PtStruct = NextS )
|
||||
{
|
||||
NextS = PtStruct->Pnext;
|
||||
((TRACK*)PtStruct)->UnLink();
|
||||
PtStruct->SetState(DELETED, ON);
|
||||
if( nbitems <= 1 ) NextS = NULL; /* fin de chaine */
|
||||
NextS = PtStruct->Next();
|
||||
( (TRACK*) PtStruct )->UnLink();
|
||||
|
||||
PtStruct->SetState( DELETED, ON );
|
||||
if( nbitems <= 1 )
|
||||
NextS = NULL; /* fin de chaine */
|
||||
PtStruct->Pnext = NextS;
|
||||
PtStruct->Pback = Back; Back = PtStruct;
|
||||
if(NextS == NULL) break;
|
||||
if( NextS == NULL )
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default: break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return(g_UnDeleteStack[g_UnDeleteStackPtr-1]);
|
||||
return g_UnDeleteStack[g_UnDeleteStackPtr - 1];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -60,21 +60,21 @@ public:
|
|||
bool m_PdfBrowserIsDefault; // True if the pdf browser is the default (m_PdfBrowser not used)
|
||||
|
||||
public:
|
||||
WinEDA_App( void );
|
||||
~WinEDA_App( void );
|
||||
bool OnInit( void );
|
||||
int OnRun( void );
|
||||
WinEDA_App();
|
||||
~WinEDA_App();
|
||||
bool OnInit();
|
||||
int OnRun();
|
||||
|
||||
bool SetBinDir( void );
|
||||
bool SetBinDir();
|
||||
void InitEDA_Appl( const wxString& name );
|
||||
bool SetLanguage( bool first_time = FALSE );
|
||||
wxMenu* SetLanguageList( wxMenu* MasterMenu );
|
||||
void SetLanguageIdentifier( int menu_id );
|
||||
void InitOnLineHelp( void );
|
||||
void InitOnLineHelp();
|
||||
|
||||
// Sauvegarde de configurations et options:
|
||||
void GetSettings( void );
|
||||
void SaveSettings( void );
|
||||
void GetSettings();
|
||||
void SaveSettings();
|
||||
void SetLastProject( const wxString& FullFileName );
|
||||
void WriteProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName, PARAM_CFG_BASE** List );
|
||||
|
@ -83,8 +83,8 @@ public:
|
|||
const wxString& GroupName, PARAM_CFG_BASE** List,
|
||||
bool Load_Only_if_New );
|
||||
|
||||
void ReadPdfBrowserInfos( void );
|
||||
void WritePdfBrowserInfos( void );
|
||||
void ReadPdfBrowserInfos();
|
||||
void WritePdfBrowserInfos();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -126,8 +126,14 @@ public:
|
|||
|
||||
class EDA_BaseStruct /* Basic class, not directly used */
|
||||
{
|
||||
private:
|
||||
/**
|
||||
* Run time identification, _keep private_ so it can never be changed after
|
||||
* a constructor sets it. See comment near SetType() regarding virtual functions.
|
||||
*/
|
||||
KICAD_T m_StructType;
|
||||
|
||||
public:
|
||||
KICAD_T m_StructType; /* Struct ident for run time identification */
|
||||
EDA_BaseStruct* Pnext; /* Linked list: Link (next struct) */
|
||||
EDA_BaseStruct* Pback; /* Linked list: Link (previous struct) */
|
||||
EDA_BaseStruct* m_Parent; /* Linked list: Link (parent struct) */
|
||||
|
@ -162,22 +168,43 @@ private:
|
|||
private:
|
||||
void InitVars();
|
||||
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Function SetType
|
||||
* is dangerous and should not be used. It is here to work around a design
|
||||
* issue in the DrawTextStruct -> DrawLabelStruct and
|
||||
* DrawTextStruct -> DrawGlobalLabelStruct class hierarchy of eeschema.
|
||||
* Only constructors should set m_StructType and once set, there should be
|
||||
* no reason to change an object's type. For if you do, you risk mis-matching
|
||||
* the virtual functions of the object with its Type() function, because the
|
||||
* virtual function table is set in the call to a constructor and cannot be
|
||||
* changed later without doing an "in place constructor" call (ugly and dangerous).
|
||||
*/
|
||||
void SetType( KICAD_T aType ) { m_StructType = aType; }
|
||||
|
||||
public:
|
||||
|
||||
EDA_BaseStruct( EDA_BaseStruct* parent, KICAD_T idType );
|
||||
EDA_BaseStruct( KICAD_T struct_type );
|
||||
virtual ~EDA_BaseStruct() { };
|
||||
|
||||
EDA_BaseStruct* Next() { return Pnext; }
|
||||
/**
|
||||
* Function Type
|
||||
* returns the type of object. This attribute should never be changed after
|
||||
* a constructor sets it, so there is no public "setter" method.
|
||||
* @return KICAD_T - the type of object.
|
||||
*/
|
||||
KICAD_T Type() const { return m_StructType; }
|
||||
|
||||
|
||||
EDA_BaseStruct* Next() const { return Pnext; }
|
||||
|
||||
/* Gestion de l'etat (status) de la structure (active, deleted..) */
|
||||
int GetState( int type );
|
||||
void SetState( int type, int state );
|
||||
|
||||
int ReturnStatus() const
|
||||
{
|
||||
return m_Status;
|
||||
}
|
||||
int ReturnStatus() const { return m_Status; }
|
||||
|
||||
void SetStatus( int new_status )
|
||||
{
|
||||
|
@ -389,12 +416,14 @@ public:
|
|||
}
|
||||
|
||||
BOARD_ITEM( const BOARD_ITEM& src ) :
|
||||
EDA_BaseStruct( src.m_Parent, src.m_StructType ),
|
||||
EDA_BaseStruct( src.m_Parent, src.Type() ),
|
||||
m_Layer( src.m_Layer )
|
||||
{
|
||||
}
|
||||
|
||||
BOARD_ITEM* Next() const { return (BOARD_ITEM*) Pnext; }
|
||||
BOARD_ITEM* Back() const { return (BOARD_ITEM*) Pback; }
|
||||
|
||||
BOARD_ITEM* GetParent() const { return (BOARD_ITEM*) m_Parent; }
|
||||
|
||||
/**
|
||||
|
|
|
@ -57,16 +57,16 @@ public:
|
|||
|
||||
// Constructor and destructor
|
||||
WinEDA_DrawPanel( WinEDA_DrawFrame* parent, int id, const wxPoint& pos, const wxSize& size );
|
||||
~WinEDA_DrawPanel( void ) { }
|
||||
~WinEDA_DrawPanel() { }
|
||||
/****************************/
|
||||
BASE_SCREEN* GetScreen( void ) { return m_Parent->m_CurrentScreen; }
|
||||
BASE_SCREEN* GetScreen() { return m_Parent->m_CurrentScreen; }
|
||||
|
||||
void PrepareGraphicContext( wxDC* DC );
|
||||
wxPoint CalcAbsolutePosition( const wxPoint& rel_pos );
|
||||
bool IsPointOnDisplay( wxPoint ref_pos );
|
||||
void OnPaint( wxPaintEvent& event );
|
||||
void OnSize( wxSizeEvent& event );
|
||||
void SetBoundaryBox( void );
|
||||
void SetBoundaryBox();
|
||||
void ReDraw( wxDC* DC, bool erasebg = TRUE );
|
||||
void PrintPage( wxDC* DC, bool Print_Sheet_Ref, int PrintMask );
|
||||
void DrawBackGround( wxDC* DC );
|
||||
|
@ -86,18 +86,18 @@ public:
|
|||
void OnScroll( wxScrollWinEvent& event );
|
||||
|
||||
void SetZoom( int mode );
|
||||
int GetZoom( void );
|
||||
int GetZoom();
|
||||
void SetGrid( const wxSize& size );
|
||||
wxSize GetGrid( void );
|
||||
wxSize GetGrid();
|
||||
|
||||
void AddMenuZoom( wxMenu* MasterMenu );
|
||||
void OnRightClick( wxMouseEvent& event );
|
||||
void Process_Popup_Zoom( wxCommandEvent& event );
|
||||
void Process_Special_Functions( wxCommandEvent& event );
|
||||
wxPoint CursorRealPosition( const wxPoint& ScreenPos );
|
||||
wxPoint CursorScreenPosition( void );
|
||||
wxPoint GetScreenCenterRealPosition( void );
|
||||
void MouseToCursorSchema( void );
|
||||
wxPoint CursorScreenPosition();
|
||||
wxPoint GetScreenCenterRealPosition();
|
||||
void MouseToCursorSchema();
|
||||
void MouseTo( const wxPoint& Mouse );
|
||||
|
||||
/* Cursor functions */
|
||||
|
@ -156,8 +156,8 @@ public:
|
|||
* = 0,0 in block paste */
|
||||
|
||||
public:
|
||||
DrawBlockStruct( void );
|
||||
~DrawBlockStruct( void );
|
||||
DrawBlockStruct();
|
||||
~DrawBlockStruct();
|
||||
void SetMessageBlock( WinEDA_DrawFrame* frame );
|
||||
void Draw( WinEDA_DrawPanel* panel, wxDC* DC );
|
||||
};
|
||||
|
@ -229,32 +229,32 @@ public:
|
|||
int m_Zoom; /* coeff de ZOOM */
|
||||
|
||||
public:
|
||||
BASE_SCREEN( int idscreen );
|
||||
~BASE_SCREEN( void );
|
||||
BASE_SCREEN( int idscreen, KICAD_T aType = SCREEN_STRUCT_TYPE );
|
||||
~BASE_SCREEN();
|
||||
|
||||
void InitDatas( void );/* Inits completes des variables */
|
||||
wxSize ReturnPageSize( void );
|
||||
int GetInternalUnits( void );
|
||||
void InitDatas();/* Inits completes des variables */
|
||||
wxSize ReturnPageSize();
|
||||
int GetInternalUnits();
|
||||
|
||||
wxPoint CursorRealPosition( const wxPoint& ScreenPos );
|
||||
|
||||
/* general Undo/Redo command control */
|
||||
virtual void ClearUndoRedoList( void );
|
||||
virtual void ClearUndoRedoList();
|
||||
virtual void AddItemToUndoList( EDA_BaseStruct* item );
|
||||
virtual void AddItemToRedoList( EDA_BaseStruct* item );
|
||||
virtual EDA_BaseStruct* GetItemFromUndoList( void );
|
||||
virtual EDA_BaseStruct* GetItemFromRedoList( void );
|
||||
virtual EDA_BaseStruct* GetItemFromUndoList();
|
||||
virtual EDA_BaseStruct* GetItemFromRedoList();
|
||||
|
||||
/* Manipulation des flags */
|
||||
void SetRefreshReq( void ) { m_FlagRefreshReq = 1; }
|
||||
void ClrRefreshReq( void ) { m_FlagRefreshReq = 0; }
|
||||
void SetModify( void ) { m_FlagModified = 1; m_FlagSave = 0; }
|
||||
void ClrModify( void ) { m_FlagModified = 0; m_FlagSave = 1; }
|
||||
void SetSave( void ) { m_FlagSave = 1; }
|
||||
void ClrSave( void ) { m_FlagSave = 0; }
|
||||
int IsModify( void ) { return m_FlagModified & 1; }
|
||||
int IsRefreshReq( void ) { return m_FlagRefreshReq & 1; }
|
||||
int IsSave( void ) { return m_FlagSave & 1; }
|
||||
void SetRefreshReq() { m_FlagRefreshReq = 1; }
|
||||
void ClrRefreshReq() { m_FlagRefreshReq = 0; }
|
||||
void SetModify() { m_FlagModified = 1; m_FlagSave = 0; }
|
||||
void ClrModify() { m_FlagModified = 0; m_FlagSave = 1; }
|
||||
void SetSave() { m_FlagSave = 1; }
|
||||
void ClrSave() { m_FlagSave = 0; }
|
||||
int IsModify() { return m_FlagModified & 1; }
|
||||
int IsRefreshReq() { return m_FlagRefreshReq & 1; }
|
||||
int IsSave() { return m_FlagSave & 1; }
|
||||
|
||||
|
||||
/**
|
||||
|
@ -268,22 +268,22 @@ public:
|
|||
EDA_BaseStruct* GetCurItem() const { return m_CurrentItem; }
|
||||
|
||||
/* fonctions relatives au zoom */
|
||||
int GetZoom( void ); /* retourne le coeff de zoom */
|
||||
int GetZoom(); /* retourne le coeff de zoom */
|
||||
void SetZoom( int coeff ); /* ajuste le coeff de zoom a coeff */
|
||||
void SetZoomList( int* zoomlist ); /* init liste des zoom (NULL terminated) */
|
||||
void SetNextZoom( void ); /* ajuste le prochain coeff de zoom */
|
||||
void SetPreviousZoom( void ); /* ajuste le precedent coeff de zoom */
|
||||
void SetFirstZoom( void ); /* ajuste le coeff de zoom a 1*/
|
||||
void SetLastZoom( void ); /* ajuste le coeff de zoom au max */
|
||||
void SetNextZoom(); /* ajuste le prochain coeff de zoom */
|
||||
void SetPreviousZoom(); /* ajuste le precedent coeff de zoom */
|
||||
void SetFirstZoom(); /* ajuste le coeff de zoom a 1*/
|
||||
void SetLastZoom(); /* ajuste le coeff de zoom au max */
|
||||
|
||||
/* fonctions relatives a la grille */
|
||||
wxSize GetGrid( void ); /* retourne la grille */
|
||||
wxSize GetGrid(); /* retourne la grille */
|
||||
void SetGrid( const wxSize& size );
|
||||
void SetGridList( wxSize* sizelist ); /* init liste des grilles (NULL terminated) */
|
||||
void SetNextGrid( void ); /* ajuste le prochain coeff de grille */
|
||||
void SetPreviousGrid( void ); /* ajuste le precedent coeff de grille */
|
||||
void SetFirstGrid( void ); /* ajuste la grille au mini*/
|
||||
void SetLastGrid( void ); /* ajuste la grille au max */
|
||||
void SetNextGrid(); /* ajuste le prochain coeff de grille */
|
||||
void SetPreviousGrid(); /* ajuste le precedent coeff de grille */
|
||||
void SetFirstGrid(); /* ajuste la grille au mini*/
|
||||
void SetLastGrid(); /* ajuste la grille au max */
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -169,13 +169,13 @@ public:
|
|||
WinEDA_BasicFrame( const WinEDA_BasicFrame& ) { } // Should throw!!
|
||||
WinEDA_BasicFrame() { } // Should throw!!
|
||||
#endif
|
||||
~WinEDA_BasicFrame( void );
|
||||
~WinEDA_BasicFrame();
|
||||
|
||||
void GetKicadHelp( wxCommandEvent& event );
|
||||
void GetKicadAbout( wxCommandEvent& event );
|
||||
void PrintMsg( const wxString& text );
|
||||
void GetSettings( void );
|
||||
void SaveSettings( void );
|
||||
void GetSettings();
|
||||
void SaveSettings();
|
||||
int WriteHotkeyConfigFile(const wxString & Filename, Ki_HotkeyInfo ** List, bool verbose);
|
||||
int ReadHotkeyConfigFile(const wxString & Filename, Ki_HotkeyInfo ** List, bool verbose);
|
||||
void SetLanguage( wxCommandEvent& event );
|
||||
|
@ -184,7 +184,7 @@ public:
|
|||
wxString GetLastProject( int rang );
|
||||
void SetLastProject( const wxString& FullFileName );
|
||||
void DisplayActivity( int PerCent, const wxString& Text );
|
||||
virtual void ReCreateMenuBar( void );
|
||||
virtual void ReCreateMenuBar();
|
||||
};
|
||||
|
||||
|
||||
|
@ -233,9 +233,9 @@ public:
|
|||
const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size );
|
||||
|
||||
~WinEDA_DrawFrame( void );
|
||||
~WinEDA_DrawFrame();
|
||||
|
||||
BASE_SCREEN* GetScreen( void ) { return m_CurrentScreen; }
|
||||
BASE_SCREEN* GetScreen() { return m_CurrentScreen; }
|
||||
|
||||
void OnMenuOpen( wxMenuEvent& event );
|
||||
void OnMouseEvent( wxMouseEvent& event );
|
||||
|
@ -244,15 +244,15 @@ public:
|
|||
void ProcessFontPreferences( wxCommandEvent& event );
|
||||
|
||||
void Affiche_Message( const wxString& message );
|
||||
void EraseMsgBox( void );
|
||||
void EraseMsgBox();
|
||||
void Process_PageSettings( wxCommandEvent& event );
|
||||
void SetDrawBgColor( int color_num );
|
||||
virtual void SetToolbars( void );
|
||||
virtual void SetToolbars();
|
||||
void SetLanguage( wxCommandEvent& event );
|
||||
virtual void ReCreateHToolbar( void ) = 0;
|
||||
virtual void ReCreateVToolbar( void ) = 0;
|
||||
virtual void ReCreateMenuBar( void );
|
||||
virtual void ReCreateAuxiliaryToolbar( void );
|
||||
virtual void ReCreateHToolbar() = 0;
|
||||
virtual void ReCreateVToolbar() = 0;
|
||||
virtual void ReCreateMenuBar();
|
||||
virtual void ReCreateAuxiliaryToolbar();
|
||||
void SetToolID( int id, int new_cursor_id, const wxString& title );
|
||||
|
||||
virtual void OnSelectGrid( wxCommandEvent& event );
|
||||
|
@ -279,13 +279,13 @@ public:
|
|||
|
||||
/* Recalcule le zoom et les offsets pour que l'affichage se fasse dans la
|
||||
* fenetre de coord x0, y0 a x1, y1 */
|
||||
virtual int BestZoom( void ) = 0; // Retourne le meilleur zoom
|
||||
virtual int BestZoom() = 0; // Retourne le meilleur zoom
|
||||
|
||||
void ToPrinter( wxCommandEvent& event );
|
||||
void SVG_Print( wxCommandEvent& event );
|
||||
|
||||
void OnActivate( wxActivateEvent& event );
|
||||
void ReDrawPanel( void );
|
||||
void ReDrawPanel();
|
||||
void TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width );
|
||||
void DisplayToolMsg( const wxString msg );
|
||||
void Process_Zoom( wxCommandEvent& event );
|
||||
|
@ -296,9 +296,9 @@ public:
|
|||
virtual void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
|
||||
virtual void OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0;
|
||||
virtual void ToolOnRightClick( wxCommandEvent& event );
|
||||
void AdjustScrollBars( void );
|
||||
void Affiche_Status_Box( void );/* Affichage des coord curseur, zoom .. */
|
||||
void DisplayUnitsMsg( void );
|
||||
void AdjustScrollBars();
|
||||
void Affiche_Status_Box();/* Affichage des coord curseur, zoom .. */
|
||||
void DisplayUnitsMsg();
|
||||
|
||||
/* Gestion generale des operations sur block */
|
||||
virtual int ReturnBlockCommand( int key );
|
||||
|
@ -343,21 +343,21 @@ public:
|
|||
const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size );
|
||||
|
||||
~WinEDA_BasePcbFrame( void );
|
||||
~WinEDA_BasePcbFrame();
|
||||
|
||||
// General
|
||||
virtual void OnCloseWindow( wxCloseEvent& Event ) = 0;
|
||||
virtual void Process_Special_Functions( wxCommandEvent& event ) = 0;
|
||||
virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) = 0;
|
||||
virtual void ReCreateHToolbar( void ) = 0;
|
||||
virtual void ReCreateVToolbar( void ) = 0;
|
||||
virtual void ReCreateHToolbar() = 0;
|
||||
virtual void ReCreateVToolbar() = 0;
|
||||
virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) = 0;
|
||||
virtual void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) = 0;
|
||||
virtual void OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0;
|
||||
virtual void ReCreateMenuBar( void );
|
||||
virtual void ReCreateMenuBar();
|
||||
|
||||
PCB_SCREEN* GetScreen( void ) { return (PCB_SCREEN*) m_CurrentScreen; }
|
||||
int BestZoom( void ); // Retourne le meilleur zoom
|
||||
PCB_SCREEN* GetScreen() { return (PCB_SCREEN*) m_CurrentScreen; }
|
||||
int BestZoom(); // Retourne le meilleur zoom
|
||||
|
||||
void Show3D_Frame( wxCommandEvent& event );
|
||||
|
||||
|
@ -369,8 +369,8 @@ public:
|
|||
int flag_type_command = 0 );
|
||||
|
||||
private:
|
||||
virtual void GetComponentFromUndoList( void );
|
||||
virtual void GetComponentFromRedoList( void );
|
||||
virtual void GetComponentFromUndoList();
|
||||
virtual void GetComponentFromRedoList();
|
||||
|
||||
#if defined(DEBUG)
|
||||
protected:
|
||||
|
@ -409,7 +409,7 @@ public:
|
|||
bool Overwrite, bool DisplayDialog );
|
||||
void Archive_Modules( const wxString& LibName, bool NewModulesOnly );
|
||||
MODULE* Select_1_Module_From_BOARD( BOARD* Pcb );
|
||||
MODULE* GetModuleByName( void );
|
||||
MODULE* GetModuleByName();
|
||||
|
||||
// Modules
|
||||
MODULE* Create_1_Module( wxDC* DC, const wxString& module_name );
|
||||
|
@ -459,9 +459,9 @@ public:
|
|||
void Build_Board_Ratsnest( wxDC* DC );
|
||||
void DrawGeneralRatsnest( wxDC* DC, int net_code = 0 );
|
||||
void trace_ratsnest_pad( wxDC* DC );
|
||||
void recalcule_pad_net_code( void );/* Routine de
|
||||
void recalcule_pad_net_code();/* Routine de
|
||||
* calcul et de mise a jour des net_codes des PADS */
|
||||
void build_liste_pads( void );
|
||||
void build_liste_pads();
|
||||
int* build_ratsnest_pad( EDA_BaseStruct* ref, const wxPoint& refpos, bool init );
|
||||
|
||||
void Tst_Ratsnest( wxDC* DC, int ref_netcode );
|
||||
|
@ -497,7 +497,7 @@ public:
|
|||
|
||||
// Gestion des layers:
|
||||
int SelectLayer( int default_layer, int min_layer, int max_layer );
|
||||
void SelectLayerPair( void );
|
||||
void SelectLayerPair();
|
||||
virtual void SwitchLayer( wxDC* DC, int layer );
|
||||
|
||||
// divers
|
||||
|
@ -526,7 +526,7 @@ public:
|
|||
WinEDA_PcbFrame( wxWindow* father, WinEDA_App* parent, const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size );
|
||||
|
||||
~WinEDA_PcbFrame( void );
|
||||
~WinEDA_PcbFrame();
|
||||
|
||||
// Configurations:
|
||||
void InstallConfigFrame( const wxPoint& pos );
|
||||
|
@ -541,14 +541,14 @@ public:
|
|||
void MuWaveCommand( wxDC* DC, const wxPoint& MousePos );
|
||||
|
||||
void RedrawActiveWindow( wxDC* DC, bool EraseBg );
|
||||
void ReCreateHToolbar( void );
|
||||
void ReCreateAuxiliaryToolbar( void );
|
||||
void ReCreateVToolbar( void );
|
||||
void ReCreateAuxVToolbar( void );
|
||||
void ReCreateOptToolbar( void );
|
||||
void ReCreateMenuBar( void );
|
||||
void ReCreateHToolbar();
|
||||
void ReCreateAuxiliaryToolbar();
|
||||
void ReCreateVToolbar();
|
||||
void ReCreateAuxVToolbar();
|
||||
void ReCreateOptToolbar();
|
||||
void ReCreateMenuBar();
|
||||
WinEDAChoiceBox* ReCreateLayerBox( WinEDA_Toolbar* parent );
|
||||
void PrepareLayerIndicator( void );
|
||||
void PrepareLayerIndicator();
|
||||
void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
|
||||
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
|
||||
void OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu );
|
||||
|
@ -560,7 +560,7 @@ public:
|
|||
void HandleBlockPlace( wxDC* DC );
|
||||
int HandleBlockEnd( wxDC* DC );
|
||||
|
||||
void SetToolbars( void );
|
||||
void SetToolbars();
|
||||
void Process_Settings( wxCommandEvent& event );
|
||||
void InstallPcbOptionsFrame( const wxPoint& pos, wxDC* DC, int id );
|
||||
void InstallPcbGlobalDeleteFrame( const wxPoint& pos );
|
||||
|
@ -576,12 +576,12 @@ public:
|
|||
bool SavePcbFile( const wxString& FileName );
|
||||
int SavePcbFormatAscii( FILE* File );
|
||||
bool WriteGeneralDescrPcb( FILE* File );
|
||||
bool RecreateCmpFileFromBoard( void );
|
||||
bool RecreateCmpFileFromBoard();
|
||||
|
||||
void ExportToGenCAD( wxCommandEvent& event );
|
||||
|
||||
/* Fonctions specifiques */
|
||||
MODULE* ListAndSelectModuleName( void );
|
||||
MODULE* ListAndSelectModuleName();
|
||||
void Liste_Equipot( wxCommandEvent& event );
|
||||
void Swap_Layers( wxCommandEvent& event );
|
||||
int Test_DRC( wxDC* DC, bool TestPad2Pad, bool TestZone );
|
||||
|
@ -614,7 +614,7 @@ public:
|
|||
void Erase_Pistes( wxDC* DC, int masque_type, bool query );
|
||||
void Erase_Modules( wxDC* DC, bool query );
|
||||
void Erase_Textes_Pcb( wxDC* DC, bool query );
|
||||
void Erase_Marqueurs( void );
|
||||
void Erase_Marqueurs();
|
||||
void UnDeleteItem( wxDC* DC );
|
||||
void RemoveStruct( EDA_BaseStruct* Item, wxDC* DC );
|
||||
void Via_Edit_Control( wxDC* DC, int command_type, SEGVIA* via );
|
||||
|
@ -625,7 +625,7 @@ public:
|
|||
void DrawHightLight( wxDC* DC, int NetCode );
|
||||
|
||||
// Track and via edition:
|
||||
void DisplayTrackSettings( void );
|
||||
void DisplayTrackSettings();
|
||||
void Other_Layer_Route( TRACK* track, wxDC* DC );
|
||||
void Affiche_PadsNoConnect( wxDC* DC );
|
||||
void Affiche_Status_Net( wxDC* DC );
|
||||
|
@ -653,7 +653,7 @@ public:
|
|||
// Edition des zones
|
||||
EDGE_ZONE* Del_SegmEdgeZone( wxDC* DC, EDGE_ZONE* edge_zone );
|
||||
void CaptureNetName( wxDC* DC );
|
||||
EDGE_ZONE* Begin_Zone( void );
|
||||
EDGE_ZONE* Begin_Zone();
|
||||
void End_Zone( wxDC* DC );
|
||||
void Fill_Zone( wxDC* DC );
|
||||
|
||||
|
@ -686,12 +686,12 @@ public:
|
|||
bool include_fixe, wxDC* DC );
|
||||
void FixeModule( MODULE* Module, bool Fixe );
|
||||
void AutoMoveModulesOnPcb( wxDC* DC, bool PlaceModulesHorsPcb );
|
||||
bool SetBoardBoundaryBoxFromEdgesOnly( void );
|
||||
bool SetBoardBoundaryBoxFromEdgesOnly();
|
||||
void AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC );
|
||||
int RecherchePlacementModule( MODULE* Module, wxDC* DC );
|
||||
void GenModuleOnBoard( MODULE* Module );
|
||||
float Compute_Ratsnest_PlaceModule( wxDC* DC );
|
||||
int GenPlaceBoard( void );
|
||||
int GenPlaceBoard();
|
||||
void DrawInfoPlace( wxDC* DC );
|
||||
|
||||
// Autoroutage:
|
||||
|
@ -705,7 +705,7 @@ public:
|
|||
void Show_1_Ratsnest( EDA_BaseStruct* item, wxDC* DC );
|
||||
void Ratsnest_On_Off( wxDC* DC );
|
||||
void Clean_Pcb( wxDC* DC );
|
||||
EDA_BaseStruct* SaveItemEfface( EDA_BaseStruct* PtItem, int nbitems );
|
||||
BOARD_ITEM* SaveItemEfface( BOARD_ITEM* PtItem, int nbitems );
|
||||
|
||||
// divers
|
||||
void InstallFindFrame( const wxPoint& pos, wxDC* DC );
|
||||
|
@ -746,26 +746,26 @@ public:
|
|||
WinEDA_GerberFrame( wxWindow* father, WinEDA_App* parent, const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size );
|
||||
|
||||
~WinEDA_GerberFrame( void );
|
||||
~WinEDA_GerberFrame();
|
||||
|
||||
void Update_config( void );
|
||||
void Update_config();
|
||||
void OnCloseWindow( wxCloseEvent& Event );
|
||||
void Process_Special_Functions( wxCommandEvent& event );
|
||||
void RedrawActiveWindow( wxDC* DC, bool EraseBg );
|
||||
void ReCreateHToolbar( void );
|
||||
void ReCreateVToolbar( void );
|
||||
void ReCreateOptToolbar( void );
|
||||
void ReCreateMenuBar( void );
|
||||
void ReCreateHToolbar();
|
||||
void ReCreateVToolbar();
|
||||
void ReCreateOptToolbar();
|
||||
void ReCreateMenuBar();
|
||||
void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
|
||||
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
|
||||
void OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu );
|
||||
int BestZoom( void ); // Retourne le meilleur zoom
|
||||
int BestZoom(); // Retourne le meilleur zoom
|
||||
void OnSelectOptionToolbar( wxCommandEvent& event );
|
||||
|
||||
EDA_BaseStruct* GerberGeneralLocateAndDisplay( void );
|
||||
EDA_BaseStruct* GerberGeneralLocateAndDisplay();
|
||||
EDA_BaseStruct* Locate( int typeloc );
|
||||
|
||||
void SetToolbars( void );
|
||||
void SetToolbars();
|
||||
void Process_Settings( wxCommandEvent& event );
|
||||
void Process_Config( wxCommandEvent& event );
|
||||
void InstallConfigFrame( const wxPoint& pos );
|
||||
|
@ -798,7 +798,7 @@ public:
|
|||
const wxString& D_Code_FullFileName );
|
||||
bool SaveGerberFile( const wxString& FileName, wxDC* DC );
|
||||
int Read_D_Code_File( const wxString& D_Code_FullFileName );
|
||||
void CopyDCodesSizeToItems( void );
|
||||
void CopyDCodesSizeToItems();
|
||||
void Liste_D_Codes( wxDC* DC );
|
||||
|
||||
/* Fonctions specifiques */
|
||||
|
@ -849,22 +849,22 @@ public:
|
|||
const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size );
|
||||
|
||||
~WinEDA_ModuleEditFrame( void );
|
||||
~WinEDA_ModuleEditFrame();
|
||||
|
||||
void InstallOptionsFrame( const wxPoint& pos );
|
||||
|
||||
void OnCloseWindow( wxCloseEvent& Event );
|
||||
void Process_Special_Functions( wxCommandEvent& event );
|
||||
void RedrawActiveWindow( wxDC* DC, bool EraseBg );
|
||||
void ReCreateHToolbar( void );
|
||||
void ReCreateVToolbar( void );
|
||||
void ReCreateOptToolbar( void );
|
||||
void ReCreateAuxiliaryToolbar( void );
|
||||
void ReCreateHToolbar();
|
||||
void ReCreateVToolbar();
|
||||
void ReCreateOptToolbar();
|
||||
void ReCreateAuxiliaryToolbar();
|
||||
void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
|
||||
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
|
||||
void OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu );
|
||||
void SetToolbars( void );
|
||||
void ReCreateMenuBar( void );
|
||||
void SetToolbars();
|
||||
void ReCreateMenuBar();
|
||||
void ToolOnRightClick( wxCommandEvent& event );
|
||||
void OnSelectOptionToolbar( wxCommandEvent& event );
|
||||
void OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct );
|
||||
|
@ -874,14 +874,14 @@ public:
|
|||
virtual void HandleBlockPlace( wxDC* DC );
|
||||
virtual int HandleBlockEnd( wxDC* DC );
|
||||
|
||||
EDA_BaseStruct* ModeditLocateAndDisplay( void );
|
||||
EDA_BaseStruct* ModeditLocateAndDisplay();
|
||||
|
||||
public:
|
||||
void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, int flag_type_command = 0 );
|
||||
|
||||
private:
|
||||
void GetComponentFromUndoList( void );
|
||||
void GetComponentFromRedoList( void );
|
||||
void GetComponentFromUndoList();
|
||||
void GetComponentFromRedoList();
|
||||
|
||||
public:
|
||||
|
||||
|
@ -908,7 +908,7 @@ public:
|
|||
// Gestion des librairies:
|
||||
void Delete_Module_In_Library( const wxString& libname );
|
||||
int Create_Librairie( const wxString& LibName );
|
||||
void Select_Active_Library( void );
|
||||
void Select_Active_Library();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
@ -944,7 +944,7 @@ public:
|
|||
const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size );
|
||||
|
||||
~WinEDA_SchematicFrame( void );
|
||||
~WinEDA_SchematicFrame();
|
||||
|
||||
void OnCloseWindow( wxCloseEvent& Event );
|
||||
void Process_Special_Functions( wxCommandEvent& event );
|
||||
|
@ -953,13 +953,13 @@ public:
|
|||
|
||||
void RedrawActiveWindow( wxDC* DC, bool EraseBg );
|
||||
|
||||
void ReCreateHToolbar( void );
|
||||
void ReCreateVToolbar( void );
|
||||
void ReCreateOptToolbar( void );
|
||||
void ReCreateMenuBar( void );
|
||||
void SetToolbars( void );
|
||||
void ReCreateHToolbar();
|
||||
void ReCreateVToolbar();
|
||||
void ReCreateOptToolbar();
|
||||
void ReCreateMenuBar();
|
||||
void SetToolbars();
|
||||
|
||||
SCH_SCREEN* GetScreen( void ) { return (SCH_SCREEN*) m_CurrentScreen; }
|
||||
SCH_SCREEN* GetScreen() { return (SCH_SCREEN*) m_CurrentScreen; }
|
||||
|
||||
void InstallConfigFrame( const wxPoint& pos );
|
||||
|
||||
|
@ -968,17 +968,17 @@ public:
|
|||
void OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu );
|
||||
void OnSelectOptionToolbar( wxCommandEvent& event );
|
||||
void ToolOnRightClick( wxCommandEvent& event );
|
||||
int BestZoom( void ); // Retourne le meilleur zoom
|
||||
int BestZoom(); // Retourne le meilleur zoom
|
||||
|
||||
EDA_BaseStruct* SchematicGeneralLocateAndDisplay( bool IncludePin = TRUE );
|
||||
EDA_BaseStruct* SchematicGeneralLocateAndDisplay( const wxPoint& refpoint,
|
||||
bool IncludePin );
|
||||
|
||||
/* netlist generation */
|
||||
void* BuildNetListBase( void );
|
||||
void* BuildNetListBase();
|
||||
|
||||
// FUnctions used for hierarchy handling
|
||||
void InstallPreviousScreen( void );
|
||||
void InstallPreviousScreen();
|
||||
void InstallNextScreen( DrawSheetStruct* Sheet );
|
||||
|
||||
void ToPlot_PS( wxCommandEvent& event );
|
||||
|
@ -1095,8 +1095,8 @@ public:
|
|||
|
||||
private:
|
||||
void PutDataInPreviousState( DrawPickedStruct* List );
|
||||
void GetSchematicFromRedoList( void );
|
||||
void GetSchematicFromUndoList( void );
|
||||
void GetSchematicFromRedoList();
|
||||
void GetSchematicFromUndoList();
|
||||
|
||||
|
||||
public:
|
||||
|
@ -1135,32 +1135,32 @@ public:
|
|||
const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size );
|
||||
|
||||
~WinEDA_LibeditFrame( void );
|
||||
~WinEDA_LibeditFrame();
|
||||
|
||||
void Process_Special_Functions( wxCommandEvent& event );
|
||||
void DisplayLibInfos( void );
|
||||
void DisplayLibInfos();
|
||||
void RedrawActiveWindow( wxDC* DC, bool EraseBg );
|
||||
void OnCloseWindow( wxCloseEvent& Event );
|
||||
void ReCreateHToolbar( void );
|
||||
void ReCreateVToolbar( void );
|
||||
void ReCreateHToolbar();
|
||||
void ReCreateVToolbar();
|
||||
void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
|
||||
void OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu );
|
||||
int BestZoom( void ); // Retourne le meilleur zoom
|
||||
void SetToolbars( void );
|
||||
int BestZoom(); // Retourne le meilleur zoom
|
||||
void SetToolbars();
|
||||
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
|
||||
SCH_SCREEN* GetScreen( void ) { return (SCH_SCREEN*) m_CurrentScreen; }
|
||||
SCH_SCREEN* GetScreen() { return (SCH_SCREEN*) m_CurrentScreen; }
|
||||
void OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct );
|
||||
|
||||
private:
|
||||
|
||||
// General:
|
||||
void CreateNewLibraryPart( void );
|
||||
void DeleteOnePart( void );
|
||||
void SaveOnePartInMemory( void );
|
||||
void SelectActiveLibrary( void );
|
||||
bool LoadOneLibraryPart( void );
|
||||
void SaveActiveLibrary( void );
|
||||
void ImportOnePart( void );
|
||||
void CreateNewLibraryPart();
|
||||
void DeleteOnePart();
|
||||
void SaveOnePartInMemory();
|
||||
void SelectActiveLibrary();
|
||||
bool LoadOneLibraryPart();
|
||||
void SaveActiveLibrary();
|
||||
void ImportOnePart();
|
||||
void ExportOnePart( bool create_lib );
|
||||
int LoadOneLibraryPartAux( EDA_LibComponentStruct* LibEntry,
|
||||
LibraryStruct* Library, int noMsg = 0 );
|
||||
|
@ -1173,8 +1173,8 @@ public:
|
|||
void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, int flag_type_command = 0 );
|
||||
|
||||
private:
|
||||
void GetComponentFromUndoList( void );
|
||||
void GetComponentFromRedoList( void );
|
||||
void GetComponentFromUndoList();
|
||||
void GetComponentFromRedoList();
|
||||
|
||||
// Edition des Pins:
|
||||
void CreatePin( wxDC* DC );
|
||||
|
@ -1187,7 +1187,7 @@ private:
|
|||
bool TestPins( EDA_LibComponentStruct* LibEntry );
|
||||
|
||||
// Edition de l'ancre
|
||||
void PlaceAncre( void );
|
||||
void PlaceAncre();
|
||||
|
||||
// Edition des graphismes:
|
||||
LibEDA_BaseStruct* CreateGraphicItem( wxDC* DC );
|
||||
|
@ -1195,7 +1195,7 @@ private:
|
|||
void StartMoveDrawSymbol( wxDC* DC );
|
||||
void EndDrawGraphicItem( wxDC* DC );
|
||||
void LoadOneSymbol( wxDC* DC );
|
||||
void SaveOneSymbol( void );
|
||||
void SaveOneSymbol();
|
||||
void EditGraphicSymbol( wxDC* DC, LibEDA_BaseStruct* DrawItem );
|
||||
void EditSymbolText( wxDC* DC, LibEDA_BaseStruct* DrawItem );
|
||||
void RotateSymbolText( wxDC* DC );
|
||||
|
@ -1214,7 +1214,7 @@ public:
|
|||
|
||||
void DeletePartInLib( LibraryStruct* Library, EDA_LibComponentStruct* Entry );
|
||||
void PlacePin( wxDC* DC );
|
||||
void InitEditOnePin( void );
|
||||
void InitEditOnePin();
|
||||
void GlobalSetPins( wxDC* DC, LibDrawPin* MasterPin, int id );
|
||||
|
||||
// Repetition automatique de placement de pins
|
||||
|
@ -1241,26 +1241,26 @@ public:
|
|||
LibraryStruct* Library = NULL,
|
||||
wxSemaphore* semaphore = NULL );
|
||||
|
||||
~WinEDA_ViewlibFrame( void );
|
||||
~WinEDA_ViewlibFrame();
|
||||
|
||||
void OnSize( wxSizeEvent& event );
|
||||
void ReCreateListLib( void );
|
||||
void ReCreateListCmp( void );
|
||||
void ReCreateListLib();
|
||||
void ReCreateListCmp();
|
||||
void Process_Special_Functions( wxCommandEvent& event );
|
||||
void DisplayLibInfos( void );
|
||||
void DisplayLibInfos();
|
||||
void RedrawActiveWindow( wxDC* DC, bool EraseBg );
|
||||
void OnCloseWindow( wxCloseEvent& Event );
|
||||
void ReCreateHToolbar( void );
|
||||
void ReCreateVToolbar( void );
|
||||
void ReCreateHToolbar();
|
||||
void ReCreateVToolbar();
|
||||
void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
|
||||
int BestZoom( void ); // Retourne le meilleur zoom
|
||||
int BestZoom(); // Retourne le meilleur zoom
|
||||
void ClickOnLibList( wxCommandEvent& event );
|
||||
void ClickOnCmpList( wxCommandEvent& event );
|
||||
|
||||
SCH_SCREEN* GetScreen( void ) { return (SCH_SCREEN*) m_CurrentScreen; }
|
||||
SCH_SCREEN* GetScreen() { return (SCH_SCREEN*) m_CurrentScreen; }
|
||||
|
||||
private:
|
||||
void SelectCurrentLibrary( void );
|
||||
void SelectCurrentLibrary();
|
||||
void SelectAndViewLibraryPart( int option );
|
||||
void ExportToSchematicLibraryPart( wxCommandEvent& event );
|
||||
void ViewOneLibraryContent( LibraryStruct* Lib, int Flag );
|
||||
|
@ -1291,10 +1291,10 @@ public:
|
|||
|
||||
// Constructor and destructor
|
||||
WinEDA_MsgPanel( WinEDA_DrawFrame* parent, int id, const wxPoint& pos, const wxSize& size );
|
||||
~WinEDA_MsgPanel( void );
|
||||
~WinEDA_MsgPanel();
|
||||
|
||||
void OnPaint( wxPaintEvent& event );
|
||||
void EraseMsgBox( void );
|
||||
void EraseMsgBox();
|
||||
void EraseMsgBox( wxDC* DC );
|
||||
void Affiche_1_Parametre( int pos_X, const wxString& texte_H,
|
||||
const wxString& texte_L, int color );
|
||||
|
@ -1324,17 +1324,17 @@ public:
|
|||
const wxString& TextToEdit, wxBoxSizer* BoxSizer,
|
||||
const wxSize& Size );
|
||||
|
||||
~WinEDA_EnterText( void )
|
||||
~WinEDA_EnterText()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
wxString GetValue( void );
|
||||
wxString GetValue();
|
||||
void GetValue( char* buffer, int lenmax );
|
||||
void SetValue( const wxString& new_text );
|
||||
void Enable( bool enbl );
|
||||
|
||||
void SetFocus( void ) { m_FrameText->SetFocus(); }
|
||||
void SetFocus() { m_FrameText->SetFocus(); }
|
||||
void SetInsertionPoint( int n ) { m_FrameText->SetInsertionPoint( n ); }
|
||||
void SetSelection( int n, int m )
|
||||
{
|
||||
|
@ -1363,14 +1363,14 @@ public:
|
|||
int units, wxBoxSizer* BoxSizer, int framelen = 200,
|
||||
int internal_unit = EESCHEMA_INTERNAL_UNIT );
|
||||
|
||||
~WinEDA_GraphicTextCtrl( void );
|
||||
~WinEDA_GraphicTextCtrl();
|
||||
|
||||
wxString GetText( void );
|
||||
int GetTextSize( void );
|
||||
wxString GetText();
|
||||
int GetTextSize();
|
||||
void Enable( bool state );
|
||||
void SetTitle( const wxString& title );
|
||||
|
||||
void SetFocus( void ) { m_FrameText->SetFocus(); }
|
||||
void SetFocus() { m_FrameText->SetFocus(); }
|
||||
void SetValue( const wxString& value );
|
||||
void SetValue( int value );
|
||||
};
|
||||
|
@ -1398,11 +1398,11 @@ public:
|
|||
int units, wxBoxSizer* BoxSizer,
|
||||
int internal_unit = EESCHEMA_INTERNAL_UNIT );
|
||||
|
||||
~WinEDA_PositionCtrl( void );
|
||||
~WinEDA_PositionCtrl();
|
||||
|
||||
void Enable( bool x_win_on, bool y_win_on );
|
||||
void SetValue( int x_value, int y_value );
|
||||
wxPoint GetValue( void );
|
||||
wxPoint GetValue();
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
|
@ -1418,8 +1418,8 @@ public:
|
|||
int units, wxBoxSizer* BoxSizer,
|
||||
int internal_unit = EESCHEMA_INTERNAL_UNIT );
|
||||
|
||||
~WinEDA_SizeCtrl( void ) { }
|
||||
wxSize GetValue( void );
|
||||
~WinEDA_SizeCtrl() { }
|
||||
wxSize GetValue();
|
||||
};
|
||||
|
||||
|
||||
|
@ -1448,9 +1448,9 @@ public:
|
|||
int units, wxBoxSizer* BoxSizer,
|
||||
int internal_unit = EESCHEMA_INTERNAL_UNIT );
|
||||
|
||||
~WinEDA_ValueCtrl( void );
|
||||
~WinEDA_ValueCtrl();
|
||||
|
||||
int GetValue( void );
|
||||
int GetValue();
|
||||
void SetValue( int new_value );
|
||||
void Enable( bool enbl );
|
||||
|
||||
|
@ -1477,9 +1477,9 @@ public:
|
|||
WinEDA_DFloatValueCtrl( wxWindow* parent, const wxString& title,
|
||||
double value, wxBoxSizer* BoxSizer );
|
||||
|
||||
~WinEDA_DFloatValueCtrl( void );
|
||||
~WinEDA_DFloatValueCtrl();
|
||||
|
||||
double GetValue( void );
|
||||
double GetValue();
|
||||
void SetValue( double new_value );
|
||||
void Enable( bool enbl );
|
||||
|
||||
|
@ -1506,7 +1506,7 @@ public:
|
|||
public:
|
||||
WinEDA_Toolbar( id_toolbar type, wxWindow* parent,
|
||||
wxWindowID id, bool horizontal );
|
||||
WinEDA_Toolbar* Next( void ) { return Pnext; }
|
||||
WinEDA_Toolbar* Next() { return Pnext; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -1532,13 +1532,13 @@ public:
|
|||
void (* movefct)(wxString& Text) = NULL,
|
||||
const wxColour& colour = wxNullColour,
|
||||
wxPoint dialog_position = wxDefaultPosition );
|
||||
~WinEDAListBox( void );
|
||||
~WinEDAListBox();
|
||||
|
||||
void SortList( void );
|
||||
void SortList();
|
||||
void Append( const wxString& item );
|
||||
void InsertItems( const wxArrayString& itemlist, int position = 0 );
|
||||
void MoveMouseToOrigin( void );
|
||||
wxString GetTextSelection( void );
|
||||
void MoveMouseToOrigin();
|
||||
wxString GetTextSelection();
|
||||
|
||||
private:
|
||||
void OnClose( wxCloseEvent& event );
|
||||
|
@ -1586,7 +1586,7 @@ public:
|
|||
}
|
||||
|
||||
|
||||
int GetChoice( void )
|
||||
int GetChoice()
|
||||
{
|
||||
return GetCurrentSelection();
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ void Affiche_Infos_Equipot( int netcode, WinEDA_BasePcbFrame* frame )
|
|||
for( ii = 0, Struct = frame->m_Pcb->m_Track; Struct != NULL; Struct = Struct->Pnext )
|
||||
{
|
||||
ii++;
|
||||
if( Struct->m_StructType == TYPEVIA )
|
||||
if( Struct->Type() == TYPEVIA )
|
||||
if( ( (SEGVIA*) Struct )->m_NetCode == netcode )
|
||||
nb_vias++;
|
||||
}
|
||||
|
|
|
@ -50,18 +50,18 @@ void TraceArc(int ux0,int uy0,int ux1,int uy1, int ArcAngle, int lg,int layer,
|
|||
|
||||
/* QUEUE.CPP */
|
||||
void FreeQueue(void); /* Libere la memoire de la queue de recherche */
|
||||
void InitQueue( void );
|
||||
void InitQueue();
|
||||
void GetQueue( int *, int *, int *, int *, int * );
|
||||
int SetQueue( int, int, int, int, int, int, int );
|
||||
void ReSetQueue( int, int, int, int, int, int, int );
|
||||
|
||||
|
||||
/* WORK.CPP */
|
||||
void InitWork( void );
|
||||
void ReInitWork( void );
|
||||
void InitWork();
|
||||
void ReInitWork();
|
||||
int SetWork( int, int, int , int, int, CHEVELU *, int );
|
||||
void GetWork( int *, int *, int *, int *, int *, CHEVELU ** );
|
||||
void SortWork( void ); /* order the work items; shortest first */
|
||||
void SortWork(); /* order the work items; shortest first */
|
||||
|
||||
/* DIST.CPP */
|
||||
int GetApxDist( int, int, int, int );
|
||||
|
|
|
@ -41,7 +41,7 @@ void WinEDA_PcbFrame::Attribut_Track( TRACK* track, wxDC* DC, bool Flag_On )
|
|||
TRACK* Track;
|
||||
int nb_segm;
|
||||
|
||||
if( (track == NULL ) || (track->m_StructType == TYPEZONE) )
|
||||
if( (track == NULL ) || (track->Type() == TYPEZONE) )
|
||||
return;
|
||||
|
||||
DrawPanel->CursorOff( DC ); // Erase cursor shape
|
||||
|
|
|
@ -368,7 +368,7 @@ void WinEDA_PcbFrame::DrawInfoPlace( wxDC* DC )
|
|||
|
||||
|
||||
/***************************************/
|
||||
int WinEDA_PcbFrame::GenPlaceBoard( void )
|
||||
int WinEDA_PcbFrame::GenPlaceBoard()
|
||||
/***************************************/
|
||||
|
||||
/* Routine de generation du board ( cote composant + cote cuivre ) :
|
||||
|
@ -455,7 +455,7 @@ int WinEDA_PcbFrame::GenPlaceBoard( void )
|
|||
{
|
||||
DRAWSEGMENT* DrawSegm;
|
||||
|
||||
switch( PtStruct->m_StructType )
|
||||
switch( PtStruct->Type() )
|
||||
{
|
||||
case TYPEDRAWSEGMENT:
|
||||
DrawSegm = (DRAWSEGMENT*) PtStruct;
|
||||
|
@ -1181,7 +1181,7 @@ static MODULE* PickModule( WinEDA_PcbFrame* pcbframe, wxDC* DC )
|
|||
|
||||
|
||||
/*******************************************************/
|
||||
bool WinEDA_PcbFrame::SetBoardBoundaryBoxFromEdgesOnly( void )
|
||||
bool WinEDA_PcbFrame::SetBoardBoundaryBoxFromEdgesOnly()
|
||||
/*******************************************************/
|
||||
|
||||
/* Determine le rectangle d'encadrement du pcb, selon les contours
|
||||
|
@ -1207,7 +1207,7 @@ bool WinEDA_PcbFrame::SetBoardBoundaryBoxFromEdgesOnly( void )
|
|||
PtStruct = m_Pcb->m_Drawings;
|
||||
for( ; PtStruct != NULL; PtStruct = PtStruct->Next() )
|
||||
{
|
||||
if( PtStruct->m_StructType != TYPEDRAWSEGMENT )
|
||||
if( PtStruct->Type() != TYPEDRAWSEGMENT )
|
||||
continue;
|
||||
succes = TRUE;
|
||||
ptr = (DRAWSEGMENT*) PtStruct;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue