Jean-Pierre's changes for kicad-2007-05-25 release

This commit is contained in:
dickelbeck
2007-05-28 18:09:49 +00:00
parent 1db1374098
commit ae74527bc2
223 changed files with 15290 additions and 6116 deletions
+42 -42
View File
@@ -12,8 +12,8 @@
#include "common.h"
#include "wxstruct.h"
#include "base_struct.h"
#include "grfonte.h"
#include "grfonte.h"
#include "macros.h"
@@ -65,7 +65,7 @@ wxT("lib cmp draw line"),
wxT("lib cmp pin"),
wxT("lib cmp field"),
wxT("unknown"),
wxT("unknown")
wxT("unknown")
};
@@ -84,32 +84,32 @@ EDA_BaseStruct::EDA_BaseStruct(EDA_BaseStruct * parent, int idType)
m_StructType = idType;
m_Parent = parent; /* Chainage hierarchique sur struct racine */
}
/********************************************/
EDA_BaseStruct::EDA_BaseStruct(int idType)
/********************************************/
{
{
InitVars();
m_StructType = idType;
}
/********************************************/
void EDA_BaseStruct::InitVars(void)
void EDA_BaseStruct::InitVars(void)
/********************************************/
{
{
m_StructType = TYPE_NOT_INIT;
Pnext = NULL; /* Linked list: Link (next struct) */
Pback = NULL; /* Linked list: Link (previous struct) */
m_Parent = NULL; /* Linked list: Link (parent struct) */
m_Son = NULL; /* Linked list: Link (son struct) */
m_Son = NULL; /* Linked list: Link (son struct) */
m_Image = NULL; /* Link to an image copy for undelete or abort command */
m_Flags = 0; /* flags for editions and other */
m_TimeStamp = 0; // Time stamp used for logical links
m_Status = 0;
m_Selected = 0; /* Used by block commands, and selective editing */
}
}
/* Gestion de l'etat (status) de la structure (active, deleted..) */
int EDA_BaseStruct::GetState(int type)
@@ -136,20 +136,20 @@ addition d'une nouvelle struct a la liste chain
laststruct->Pnext = this;
}
/**************************************************************************************/
void EDA_BaseStruct::Draw(WinEDA_DrawPanel * panel, wxDC * DC, const wxPoint & offset,
int draw_mode, int Color)
/**************************************************************************************/
/* Virtual
void EDA_BaseStruct::Draw(WinEDA_DrawPanel * panel, wxDC * DC, const wxPoint & offset,
int draw_mode, int Color)
/**************************************************************************************/
/* Virtual
*/
{
wxString msg, name;
msg.Printf( wxT("EDA_BaseStruct::Draw() error. Method for struct type %d used but not implemented ("),
m_StructType);
msg += ReturnClassName() + wxT(")\n");
printf ( CONV_TO_UTF8(msg));
}
{
wxString msg, name;
msg.Printf( wxT("EDA_BaseStruct::Draw() error. Method for struct type %d used but not implemented ("),
m_StructType);
msg += ReturnClassName() + wxT(")\n");
printf ( CONV_TO_UTF8(msg));
}
#if 0
/**************************************************************/
@@ -219,20 +219,20 @@ EDA_TextStruct::~EDA_TextStruct(void)
}
m_TextDrawingsSize = 0; /* nombre de sommets a dessiner */
}
/********************************/
int EDA_TextStruct::Len_Size(void)
/********************************/
// Return the text lenght in internal units
{
int nbchar = m_Text.Len();
int len;
if ( nbchar == 0 ) return 0;
len = ((10 * m_Size.x ) / 9) * nbchar;
return len;
}
/********************************/
int EDA_TextStruct::Len_Size(void)
/********************************/
// Return the text lenght in internal units
{
int nbchar = m_Text.Len();
int len;
if ( nbchar == 0 ) return 0;
len = ((10 * m_Size.x ) / 9) * nbchar;
return len;
}
/*************************************************/
int EDA_TextStruct::Locate(const wxPoint & posref)
@@ -302,7 +302,7 @@ int width;
m_TextDrawings[2] + offset.y + m_Pos.y,
m_TextDrawings[3] + offset.x + m_Pos.x,
m_TextDrawings[4] + offset.y + m_Pos.y,
color);
width, color);
}
else
@@ -317,9 +317,9 @@ int width;
int cY = m_Pos.y - offset.y;
/* trace ancre du texte */
GRLine(&panel->m_ClipBox, DC, cX - anchor_size, cY,
cX + anchor_size, cY, anchor_color);
cX + anchor_size, cY, 0, anchor_color);
GRLine(&panel->m_ClipBox, DC, cX, cY - anchor_size ,
cX, cY + anchor_size , anchor_color);
cX, cY + anchor_size , 0, anchor_color);
}
jj = 5; ii = jj+1;
while (ii < m_TextDrawingsSize)
@@ -352,7 +352,7 @@ int width;
}
}
else
GRPoly(&panel->m_ClipBox, DC, nbpoints, coord, 0, color, color);
GRPoly(&panel->m_ClipBox, DC, nbpoints, coord, 0, 0, color, color);
}
}
@@ -377,7 +377,7 @@ int ii, jj, kk,nbchar, nbpoints, AsciiCode, endcar;
int k1 , k2 , x0 , y0 ;
int size_h , size_v , espacement ;
char f_cod , plume = 'U';
const wxChar * ptr;
const wxChar * ptr;
const SH_CODE * ptcar;
int ux0, uy0, dx, dy; // Coord de trace des segments de texte & variables de calcul */
int cX, cY; // Centre du texte