beautification
This commit is contained in:
parent
803ecc3bbf
commit
7fe80baf55
|
@ -8,55 +8,60 @@
|
||||||
|
|
||||||
/* Id for class identification, at run time */
|
/* Id for class identification, at run time */
|
||||||
enum DrawStructureType {
|
enum DrawStructureType {
|
||||||
TYPE_NOT_INIT = 0,
|
TYPE_NOT_INIT = 0,
|
||||||
TYPEPCB,
|
TYPEPCB,
|
||||||
// Items in pcb
|
|
||||||
PCB_EQUIPOT_STRUCT_TYPE,
|
// Items in pcb
|
||||||
TYPEMODULE,
|
PCB_EQUIPOT_STRUCT_TYPE,
|
||||||
TYPEPAD,
|
TYPEMODULE,
|
||||||
TYPEDRAWSEGMENT,
|
TYPEPAD,
|
||||||
TYPETEXTE,
|
TYPEDRAWSEGMENT,
|
||||||
TYPETEXTEMODULE,
|
TYPETEXTE,
|
||||||
TYPEEDGEMODULE,
|
TYPETEXTEMODULE,
|
||||||
TYPETRACK,
|
TYPEEDGEMODULE,
|
||||||
TYPEZONE,
|
TYPETRACK,
|
||||||
TYPEVIA,
|
TYPEZONE,
|
||||||
TYPEMARQUEUR,
|
TYPEVIA,
|
||||||
TYPECOTATION,
|
TYPEMARQUEUR,
|
||||||
TYPEMIRE,
|
TYPECOTATION,
|
||||||
TYPESCREEN,
|
TYPEMIRE,
|
||||||
TYPEBLOCK,
|
TYPESCREEN,
|
||||||
TYPEEDGEZONE,
|
TYPEBLOCK,
|
||||||
// Draw Items in schematic
|
TYPEEDGEZONE,
|
||||||
DRAW_POLYLINE_STRUCT_TYPE,
|
|
||||||
DRAW_JUNCTION_STRUCT_TYPE,
|
// Draw Items in schematic
|
||||||
DRAW_TEXT_STRUCT_TYPE,
|
DRAW_POLYLINE_STRUCT_TYPE,
|
||||||
DRAW_LABEL_STRUCT_TYPE,
|
DRAW_JUNCTION_STRUCT_TYPE,
|
||||||
DRAW_GLOBAL_LABEL_STRUCT_TYPE,
|
DRAW_TEXT_STRUCT_TYPE,
|
||||||
DRAW_LIB_ITEM_STRUCT_TYPE,
|
DRAW_LABEL_STRUCT_TYPE,
|
||||||
DRAW_PICK_ITEM_STRUCT_TYPE,
|
DRAW_GLOBAL_LABEL_STRUCT_TYPE,
|
||||||
DRAW_SEGMENT_STRUCT_TYPE,
|
DRAW_LIB_ITEM_STRUCT_TYPE,
|
||||||
DRAW_BUSENTRY_STRUCT_TYPE,
|
DRAW_PICK_ITEM_STRUCT_TYPE,
|
||||||
DRAW_SHEET_STRUCT_TYPE,
|
DRAW_SEGMENT_STRUCT_TYPE,
|
||||||
DRAW_SHEETLABEL_STRUCT_TYPE,
|
DRAW_BUSENTRY_STRUCT_TYPE,
|
||||||
DRAW_MARKER_STRUCT_TYPE,
|
DRAW_SHEET_STRUCT_TYPE,
|
||||||
DRAW_NOCONNECT_STRUCT_TYPE,
|
DRAW_SHEETLABEL_STRUCT_TYPE,
|
||||||
DRAW_PART_TEXT_STRUCT_TYPE,
|
DRAW_MARKER_STRUCT_TYPE,
|
||||||
// General
|
DRAW_NOCONNECT_STRUCT_TYPE,
|
||||||
SCREEN_STRUCT_TYPE,
|
DRAW_PART_TEXT_STRUCT_TYPE,
|
||||||
BLOCK_LOCATE_STRUCT_TYPE,
|
|
||||||
// Draw Items in library component
|
// General
|
||||||
LIBCOMPONENT_STRUCT_TYPE,
|
SCREEN_STRUCT_TYPE,
|
||||||
COMPONENT_ARC_DRAW_TYPE,
|
BLOCK_LOCATE_STRUCT_TYPE,
|
||||||
COMPONENT_CIRCLE_DRAW_TYPE,
|
|
||||||
COMPONENT_GRAPHIC_TEXT_DRAW_TYPE,
|
// Draw Items in library component
|
||||||
COMPONENT_RECT_DRAW_TYPE,
|
LIBCOMPONENT_STRUCT_TYPE,
|
||||||
COMPONENT_POLYLINE_DRAW_TYPE,
|
COMPONENT_ARC_DRAW_TYPE,
|
||||||
COMPONENT_LINE_DRAW_TYPE,
|
COMPONENT_CIRCLE_DRAW_TYPE,
|
||||||
COMPONENT_PIN_DRAW_TYPE,
|
COMPONENT_GRAPHIC_TEXT_DRAW_TYPE,
|
||||||
COMPONENT_FIELD_DRAW_TYPE,
|
COMPONENT_RECT_DRAW_TYPE,
|
||||||
// End value
|
COMPONENT_POLYLINE_DRAW_TYPE,
|
||||||
MAX_STRUCT_TYPE_ID
|
COMPONENT_LINE_DRAW_TYPE,
|
||||||
|
COMPONENT_PIN_DRAW_TYPE,
|
||||||
|
COMPONENT_FIELD_DRAW_TYPE,
|
||||||
|
|
||||||
|
// End value
|
||||||
|
MAX_STRUCT_TYPE_ID
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,195 +69,213 @@ enum DrawStructureType {
|
||||||
/* Classes de base: servent a deriver les classes reellement utiles */
|
/* Classes de base: servent a deriver les classes reellement utiles */
|
||||||
/********************************************************************/
|
/********************************************************************/
|
||||||
|
|
||||||
class EDA_BaseStruct /* Basic class, not directly used */
|
class EDA_BaseStruct /* Basic class, not directly used */
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int m_StructType; /* Struct ident for run time identification */
|
int m_StructType; /* Struct ident for run time identification */
|
||||||
EDA_BaseStruct * Pnext; /* Linked list: Link (next struct) */
|
EDA_BaseStruct* Pnext; /* Linked list: Link (next struct) */
|
||||||
EDA_BaseStruct * Pback; /* Linked list: Link (previous struct) */
|
EDA_BaseStruct* Pback; /* Linked list: Link (previous struct) */
|
||||||
EDA_BaseStruct * m_Parent; /* Linked list: Link (parent struct) */
|
EDA_BaseStruct* m_Parent; /* Linked list: Link (parent struct) */
|
||||||
EDA_BaseStruct *m_Son; /* Linked list: Link (son struct) */
|
EDA_BaseStruct* m_Son; /* Linked list: Link (son struct) */
|
||||||
EDA_BaseStruct *m_Image; /* Link to an image copy for undelete or abort command */
|
EDA_BaseStruct* m_Image; /* Link to an image copy for undelete or abort command */
|
||||||
int m_Flags; // flags for editions and other
|
int m_Flags; // flags for editions and other
|
||||||
unsigned long m_TimeStamp; // Time stamp used for logical links
|
unsigned long m_TimeStamp; // Time stamp used for logical links
|
||||||
int m_Selected; /* Used by block commands, and selective editing */
|
int m_Selected; /* Used by block commands, and selective editing */
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_Status;
|
int m_Status;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void InitVars(void);
|
void InitVars( void );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
EDA_BaseStruct(EDA_BaseStruct * parent, int idType);
|
EDA_BaseStruct( EDA_BaseStruct* parent, int idType );
|
||||||
EDA_BaseStruct(int struct_type);
|
EDA_BaseStruct( int struct_type );
|
||||||
virtual ~EDA_BaseStruct() {};
|
virtual ~EDA_BaseStruct() { };
|
||||||
EDA_BaseStruct * Next(void) { return Pnext; }
|
|
||||||
/* Gestion de l'etat (status) de la structure (active, deleted..) */
|
EDA_BaseStruct* Next( void ) { return Pnext; }
|
||||||
int GetState(int type);
|
|
||||||
void SetState(int type, int state );
|
/* Gestion de l'etat (status) de la structure (active, deleted..) */
|
||||||
int ReturnStatus(void) const
|
int GetState( int type );
|
||||||
{
|
void SetState( int type, int state );
|
||||||
return(m_Status);
|
|
||||||
}
|
|
||||||
void SetStatus(int new_status)
|
|
||||||
{
|
|
||||||
m_Status = new_status;
|
|
||||||
}
|
|
||||||
wxString ReturnClassName(void);
|
|
||||||
/* addition d'une nouvelle struct a la liste chainée */
|
|
||||||
void AddToChain(EDA_BaseStruct * laststruct);
|
|
||||||
/* fonction de placement */
|
|
||||||
virtual void Place(WinEDA_DrawFrame * frame, wxDC * DC);
|
|
||||||
virtual void Draw(WinEDA_DrawPanel * panel, wxDC * DC, const wxPoint & offset, int draw_mode, int Color = -1);
|
|
||||||
|
|
||||||
|
int ReturnStatus( void ) const
|
||||||
|
{
|
||||||
|
return m_Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetStatus( int new_status )
|
||||||
|
{
|
||||||
|
m_Status = new_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString ReturnClassName( void );
|
||||||
|
|
||||||
|
/* addition d'une nouvelle struct a la liste chain<69> */
|
||||||
|
void AddToChain( EDA_BaseStruct* laststruct );
|
||||||
|
|
||||||
|
/* fonction de placement */
|
||||||
|
virtual void Place( WinEDA_DrawFrame* frame, wxDC* DC );
|
||||||
|
|
||||||
|
virtual void Draw( WinEDA_DrawPanel* panel,
|
||||||
|
wxDC* DC,
|
||||||
|
const wxPoint& offset,
|
||||||
|
int draw_mode,
|
||||||
|
int Color = -1 );
|
||||||
};
|
};
|
||||||
|
|
||||||
// Text justify:
|
// Text justify:
|
||||||
// Values -1,0,1 are used in computations, do not change them
|
// Values -1,0,1 are used in computations, do not change them
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GR_TEXT_HJUSTIFY_LEFT = -1,
|
GR_TEXT_HJUSTIFY_LEFT = -1,
|
||||||
GR_TEXT_HJUSTIFY_CENTER = 0,
|
GR_TEXT_HJUSTIFY_CENTER = 0,
|
||||||
GR_TEXT_HJUSTIFY_RIGHT = 1
|
GR_TEXT_HJUSTIFY_RIGHT = 1
|
||||||
} GRTextHorizJustifyType;
|
} GRTextHorizJustifyType;
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GR_TEXT_VJUSTIFY_TOP = -1,
|
GR_TEXT_VJUSTIFY_TOP = -1,
|
||||||
GR_TEXT_VJUSTIFY_CENTER = 0,
|
GR_TEXT_VJUSTIFY_CENTER = 0,
|
||||||
GR_TEXT_VJUSTIFY_BOTTOM = 1
|
GR_TEXT_VJUSTIFY_BOTTOM = 1
|
||||||
} GRTextVertJustifyType;
|
} GRTextVertJustifyType;
|
||||||
|
|
||||||
|
|
||||||
/* controle des remplissages a l'ecran (Segments textes...)*/
|
/* controle des remplissages a l'ecran (Segments textes...)*/
|
||||||
#define FILAIRE 0
|
#define FILAIRE 0
|
||||||
#define FILLED 1
|
#define FILLED 1
|
||||||
#define SKETCH 2
|
#define SKETCH 2
|
||||||
|
|
||||||
|
|
||||||
#define DEFAULT_SIZE_TEXT 60 /* Hauteur (en 1/000" par defaut des textes */
|
#define DEFAULT_SIZE_TEXT 60 /* Hauteur (en 1/000" par defaut des textes */
|
||||||
|
|
||||||
/* classe de gestion des textes (labels, textes composants ..)
|
/* classe de gestion des textes (labels, textes composants ..)
|
||||||
(Non utilisee seule) */
|
* (Non utilisee seule) */
|
||||||
class EDA_TextStruct
|
class EDA_TextStruct
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxString m_Text; /* text! */
|
wxString m_Text; /* text! */
|
||||||
int m_Layer; /* couche d'appartenance */
|
int m_Layer; /* couche d'appartenance */
|
||||||
wxPoint m_Pos; /* XY position of anchor text. */
|
wxPoint m_Pos; /* XY position of anchor text. */
|
||||||
wxSize m_Size; /* XY size of text */
|
wxSize m_Size; /* XY size of text */
|
||||||
int m_Width; /* epaisseur du trait */
|
int m_Width; /* epaisseur du trait */
|
||||||
int m_Orient; /* Orient in 0.1 degrees */
|
int m_Orient; /* Orient in 0.1 degrees */
|
||||||
int m_Miroir; // Display Normal / mirror
|
int m_Miroir; // Display Normal / mirror
|
||||||
int m_Attributs; /* controle visibilite */
|
int m_Attributs; /* controle visibilite */
|
||||||
int m_CharType; /* normal, bold, italic ... */
|
int m_CharType; /* normal, bold, italic ... */
|
||||||
int m_HJustify, m_VJustify; /* Justifications Horiz et Vert du texte */
|
int m_HJustify, m_VJustify; /* Justifications Horiz et Vert du texte */
|
||||||
int m_ZoomLevelDrawable; /* Niveau de zoom acceptable pour affichage normal */
|
int m_ZoomLevelDrawable; /* Niveau de zoom acceptable pour affichage normal */
|
||||||
int * m_TextDrawings; /* pointeur sur la liste des segments de dessin */
|
int* m_TextDrawings; /* pointeur sur la liste des segments de dessin */
|
||||||
int m_TextDrawingsSize; /* nombre de segments a dessiner */
|
int m_TextDrawingsSize; /* nombre de segments a dessiner */
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
EDA_TextStruct(const wxString & text = wxEmptyString);
|
EDA_TextStruct( const wxString& text = wxEmptyString );
|
||||||
virtual ~EDA_TextStruct(void);
|
virtual ~EDA_TextStruct( void );
|
||||||
void CreateDrawData(void);
|
void CreateDrawData( void );
|
||||||
int GetLength(void) { return m_Text.Length(); };
|
|
||||||
int Pitch(void); /* retourne le pas entre 2 caracteres */
|
|
||||||
void Draw(WinEDA_DrawPanel * panel, wxDC * DC,
|
|
||||||
const wxPoint & offset, int color,
|
|
||||||
int draw_mode, int display_mode = FILAIRE, int anchor_color = -1);
|
|
||||||
/* locate functions */
|
|
||||||
int Locate(const wxPoint & posref);
|
|
||||||
int Len_Size(void); // Return the text lenght in internal units
|
|
||||||
};
|
|
||||||
|
|
||||||
|
int GetLength( void ) { return m_Text.Length(); };
|
||||||
|
int Pitch( void );/* retourne le pas entre 2 caracteres */
|
||||||
|
void Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
||||||
|
const wxPoint& offset, int color,
|
||||||
|
int draw_mode, int display_mode = FILAIRE, int anchor_color = -1 );
|
||||||
|
|
||||||
|
/* locate functions */
|
||||||
|
int Locate( const wxPoint& posref );
|
||||||
|
int Len_Size( void ); // Return the text lenght in internal units
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Basic class for build items like lines, which have 1 start point and 1 end point.
|
/* Basic class for build items like lines, which have 1 start point and 1 end point.
|
||||||
Arc and circles can use this class.
|
* Arc and circles can use this class.
|
||||||
*/
|
*/
|
||||||
class EDA_BaseLineStruct: public EDA_BaseStruct
|
class EDA_BaseLineStruct : public EDA_BaseStruct
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int m_Layer; // Layer number
|
int m_Layer; // Layer number
|
||||||
int m_Width; // 0 = line, > 0 = tracks, bus ...
|
int m_Width; // 0 = line, > 0 = tracks, bus ...
|
||||||
wxPoint m_Start; // Line start point
|
wxPoint m_Start; // Line start point
|
||||||
wxPoint m_End; // Line end point
|
wxPoint m_End; // Line end point
|
||||||
|
|
||||||
public:
|
public:
|
||||||
EDA_BaseLineStruct(EDA_BaseStruct * StructFather, DrawStructureType idtype);
|
EDA_BaseLineStruct( EDA_BaseStruct* StructFather, DrawStructureType idtype );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**************************/
|
/**************************/
|
||||||
/* class DrawPickedStruct */
|
/* class DrawPickedStruct */
|
||||||
/**************************/
|
/**************************/
|
||||||
|
|
||||||
/* Class to hold structures picked by pick events (like block selection)
|
/* Class to hold structures picked by pick events (like block selection)
|
||||||
This class has only one useful member: .m_PickedStruct, used as a link.
|
* This class has only one useful member: .m_PickedStruct, used as a link.
|
||||||
It does not describe really an item.
|
* It does not describe really an item.
|
||||||
It is used to create a linked list of selected items (in block selection).
|
* It is used to create a linked list of selected items (in block selection).
|
||||||
Each DrawPickedStruct item has is member: .m_PickedStruct pointing the
|
* Each DrawPickedStruct item has is member: .m_PickedStruct pointing the
|
||||||
real selected item
|
* real selected item
|
||||||
*/
|
*/
|
||||||
class DrawPickedStruct: public EDA_BaseStruct
|
class DrawPickedStruct : public EDA_BaseStruct
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EDA_BaseStruct *m_PickedStruct;
|
EDA_BaseStruct* m_PickedStruct;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DrawPickedStruct(EDA_BaseStruct *pickedstruct = NULL);
|
DrawPickedStruct( EDA_BaseStruct* pickedstruct = NULL );
|
||||||
~DrawPickedStruct(void);
|
~DrawPickedStruct( void );
|
||||||
void Place(WinEDA_DrawFrame * frame, wxDC * DC) {};
|
void Place( WinEDA_DrawFrame* frame, wxDC* DC ) { };
|
||||||
void DeleteWrapperList(void);
|
void DeleteWrapperList( void );
|
||||||
DrawPickedStruct * Next(void) { return (DrawPickedStruct*) Pnext; }
|
|
||||||
|
DrawPickedStruct* Next( void ) { return (DrawPickedStruct*) Pnext; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* class to handle component boundary box.
|
/* class to handle component boundary box.
|
||||||
This class is similar to wxRect, but some wxRect functions are very curious,
|
* This class is similar to wxRect, but some wxRect functions are very curious,
|
||||||
so I prefer this suitable class
|
* so I prefer this suitable class
|
||||||
*/
|
*/
|
||||||
class EDA_Rect
|
class EDA_Rect
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxPoint m_Pos; // Rectangle Origin
|
wxPoint m_Pos; // Rectangle Origin
|
||||||
wxSize m_Size; // Rectangle Size
|
wxSize m_Size; // Rectangle Size
|
||||||
|
|
||||||
public:
|
public:
|
||||||
EDA_Rect(void) {};
|
EDA_Rect( void ) { };
|
||||||
wxPoint Centre(void)
|
wxPoint Centre( void )
|
||||||
{
|
{
|
||||||
return wxPoint(m_Pos.x + (m_Size.x>>1), m_Pos.y + (m_Size.y>>1) );
|
return wxPoint( m_Pos.x + (m_Size.x >> 1), m_Pos.y + (m_Size.y >> 1) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Normalize(void); // Ensure the height ant width are >= 0
|
|
||||||
bool Inside(const wxPoint & point); // Return TRUE if point is in Rect
|
void Normalize( void ); // Ensure the height ant width are >= 0
|
||||||
bool Inside(int x, int y) { return Inside(wxPoint(x,y)); }
|
bool Inside( const wxPoint& point ); // Return TRUE if point is in Rect
|
||||||
wxSize GetSize(void) { return m_Size; }
|
|
||||||
int GetX(void) { return m_Pos.x;}
|
bool Inside( int x, int y ) { return Inside( wxPoint( x, y ) ); }
|
||||||
int GetY(void) { return m_Pos.y;}
|
wxSize GetSize( void ) { return m_Size; }
|
||||||
wxPoint GetOrigin(void) { return m_Pos;}
|
int GetX( void ) { return m_Pos.x; }
|
||||||
wxPoint GetPosition(void) { return m_Pos;}
|
int GetY( void ) { return m_Pos.y; }
|
||||||
wxPoint GetEnd(void) { return wxPoint(GetRight(),GetBottom());}
|
wxPoint GetOrigin( void ) { return m_Pos; }
|
||||||
int GetWidth(void) { return m_Size.x; }
|
wxPoint GetPosition( void ) { return m_Pos; }
|
||||||
int GetHeight(void) { return m_Size.y; }
|
wxPoint GetEnd( void ) { return wxPoint( GetRight(), GetBottom() ); }
|
||||||
int GetRight(void) {return m_Pos.x + m_Size.x; }
|
int GetWidth( void ) { return m_Size.x; }
|
||||||
int GetBottom(void) {return m_Pos.y + m_Size.y; }
|
int GetHeight( void ) { return m_Size.y; }
|
||||||
void SetOrigin(const wxPoint & pos) { m_Pos = pos; }
|
int GetRight( void ) { return m_Pos.x + m_Size.x; }
|
||||||
void SetOrigin(int x, int y) { m_Pos.x = x; m_Pos.y = y; }
|
int GetBottom( void ) { return m_Pos.y + m_Size.y; }
|
||||||
void SetSize(const wxSize & size) { m_Size = size; }
|
void SetOrigin( const wxPoint& pos ) { m_Pos = pos; }
|
||||||
void SetSize(int w, int h) { m_Size.x = w; m_Size.y = h; }
|
void SetOrigin( int x, int y ) { m_Pos.x = x; m_Pos.y = y; }
|
||||||
void Offset(int dx, int dy) { m_Pos.x += dx; m_Pos.y += dy; }
|
void SetSize( const wxSize& size ) { m_Size = size; }
|
||||||
void Offset(const wxPoint & offset) { m_Pos.x += offset.x; m_Pos.y += offset.y; }
|
void SetSize( int w, int h ) { m_Size.x = w; m_Size.y = h; }
|
||||||
void SetX(int val) { m_Pos.x = val; }
|
void Offset( int dx, int dy ) { m_Pos.x += dx; m_Pos.y += dy; }
|
||||||
void SetY(int val) { m_Pos.y = val; }
|
void Offset( const wxPoint& offset ) { m_Pos.x += offset.x; m_Pos.y += offset.y; }
|
||||||
void SetWidth(int val) { m_Size.x = val; }
|
void SetX( int val ) { m_Pos.x = val; }
|
||||||
void SetHeight(int val) { m_Size.y = val; }
|
void SetY( int val ) { m_Pos.y = val; }
|
||||||
void SetEnd(const wxPoint & pos)
|
void SetWidth( int val ) { m_Size.x = val; }
|
||||||
{
|
void SetHeight( int val ) { m_Size.y = val; }
|
||||||
m_Size.x = pos.x - m_Pos.x; m_Size.y = pos.y - m_Pos.y;
|
void SetEnd( const wxPoint& pos )
|
||||||
}
|
{
|
||||||
EDA_Rect& Inflate(wxCoord dx, wxCoord dy);
|
m_Size.x = pos.x - m_Pos.x; m_Size.y = pos.y - m_Pos.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
EDA_Rect& Inflate( wxCoord dx, wxCoord dy );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* BASE_STRUCT_H */
|
#endif /* BASE_STRUCT_H */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**************************************************************/
|
/**************************************************************/
|
||||||
/* pcbstruct.h : definition des structures de donnees type PCB */
|
/* pcbstruct.h : definition des structures de donnees type PCB */
|
||||||
/**************************************************************/
|
/**************************************************************/
|
||||||
|
|
||||||
#ifndef PCBSTRUCT_H
|
#ifndef PCBSTRUCT_H
|
||||||
#define PCBSTRUCT_H
|
#define PCBSTRUCT_H
|
||||||
|
@ -9,122 +9,122 @@
|
||||||
|
|
||||||
// Definitions relatives aux libariries
|
// Definitions relatives aux libariries
|
||||||
#define ENTETE_LIBRAIRIE "PCBNEW-LibModule-V1"
|
#define ENTETE_LIBRAIRIE "PCBNEW-LibModule-V1"
|
||||||
#define ENTETE_LIBDOC "PCBNEW-LibDoc----V1"
|
#define ENTETE_LIBDOC "PCBNEW-LibDoc----V1"
|
||||||
#define L_ENTETE_LIB 18
|
#define L_ENTETE_LIB 18
|
||||||
#define EXT_CMP wxT(".emp")
|
#define EXT_CMP wxT( ".emp" )
|
||||||
#define EXT_CMP_MASK wxT("*.emp")
|
#define EXT_CMP_MASK wxT( "*.emp" )
|
||||||
#define EXT_DOC wxT(".mdc")
|
#define EXT_DOC wxT( ".mdc" )
|
||||||
|
|
||||||
|
|
||||||
/* Bits indicateurs du membre .Status, pour pistes, modules... */
|
/* Bits indicateurs du membre .Status, pour pistes, modules... */
|
||||||
#define FLAG1 0x2000 /* flag libre pour calculs locaux */
|
#define FLAG1 0x2000 /* flag libre pour calculs locaux */
|
||||||
#define FLAG0 0x1000 /* flag libre pour calculs locaux */
|
#define FLAG0 0x1000 /* flag libre pour calculs locaux */
|
||||||
#define BEGIN_ONPAD 0x800 /* flag indiquant un debut de segment sur pad */
|
#define BEGIN_ONPAD 0x800 /* flag indiquant un debut de segment sur pad */
|
||||||
#define END_ONPAD 0x400 /* flag indiquant une fin de segment sur pad */
|
#define END_ONPAD 0x400 /* flag indiquant une fin de segment sur pad */
|
||||||
#define BUSY 0x0200 /* flag indiquant que la structure a deja
|
#define BUSY 0x0200 /* flag indiquant que la structure a deja
|
||||||
ete examinee, dans certaines routines */
|
* ete examinee, dans certaines routines */
|
||||||
#define DELETED 0x0100 /* Bit flag de Status pour structures effacee
|
#define DELETED 0x0100 /* Bit flag de Status pour structures effacee
|
||||||
et mises en chaine "DELETED" */
|
* et mises en chaine "DELETED" */
|
||||||
#define NO_TRACE 0x80 /* l'element ne doit pas etre affiche */
|
#define NO_TRACE 0x80 /* l'element ne doit pas etre affiche */
|
||||||
#define SURBRILL 0x20 /* element en surbrillance */
|
#define SURBRILL 0x20 /* element en surbrillance */
|
||||||
#define DRAG 0x10 /* segment en mode drag */
|
#define DRAG 0x10 /* segment en mode drag */
|
||||||
#define EDIT 0x8 /* element en cours d'edition */
|
#define EDIT 0x8 /* element en cours d'edition */
|
||||||
#define SEGM_FIXE 0x04 /* segment FIXE ( pas d'effacement global ) */
|
#define SEGM_FIXE 0x04 /* segment FIXE ( pas d'effacement global ) */
|
||||||
#define SEGM_AR 0x02 /* segment Auto_Route */
|
#define SEGM_AR 0x02 /* segment Auto_Route */
|
||||||
#define CHAIN 0x01 /* segment marque */
|
#define CHAIN 0x01 /* segment marque */
|
||||||
|
|
||||||
|
|
||||||
/*************************************/
|
/*************************************/
|
||||||
/* constantes de gestion des couches */
|
/* constantes de gestion des couches */
|
||||||
/*************************************/
|
/*************************************/
|
||||||
#define CUIVRE_LAYER 0x00000001 /* Bit layer cuivre */
|
#define CUIVRE_LAYER 0x00000001 /* Bit layer cuivre */
|
||||||
#define LAYER_2 0x00000002 /* Bit layer 2 */
|
#define LAYER_2 0x00000002 /* Bit layer 2 */
|
||||||
#define LAYER_3 0x00000004 /* Bit layer 3 */
|
#define LAYER_3 0x00000004 /* Bit layer 3 */
|
||||||
#define LAYER_4 0x00000008 /* Bit layer 4 */
|
#define LAYER_4 0x00000008 /* Bit layer 4 */
|
||||||
#define LAYER_5 0x00000010 /* Bit layer 5 */
|
#define LAYER_5 0x00000010 /* Bit layer 5 */
|
||||||
#define LAYER_6 0x00000020 /* Bit layer 6 */
|
#define LAYER_6 0x00000020 /* Bit layer 6 */
|
||||||
#define LAYER_7 0x00000040 /* Bit layer 7 */
|
#define LAYER_7 0x00000040 /* Bit layer 7 */
|
||||||
#define LAYER_8 0x00000080 /* Bit layer 8 */
|
#define LAYER_8 0x00000080 /* Bit layer 8 */
|
||||||
#define LAYER_9 0x00000100 /* Bit layer 9 */
|
#define LAYER_9 0x00000100 /* Bit layer 9 */
|
||||||
#define LAYER_10 0x00000200 /* Bit layer 10 */
|
#define LAYER_10 0x00000200 /* Bit layer 10 */
|
||||||
#define LAYER_11 0x00000400 /* Bit layer 11 */
|
#define LAYER_11 0x00000400 /* Bit layer 11 */
|
||||||
#define LAYER_12 0x00000800 /* Bit layer 12 */
|
#define LAYER_12 0x00000800 /* Bit layer 12 */
|
||||||
#define LAYER_13 0x00001000 /* Bit layer 13 */
|
#define LAYER_13 0x00001000 /* Bit layer 13 */
|
||||||
#define LAYER_14 0x00002000 /* Bit layer 14 */
|
#define LAYER_14 0x00002000 /* Bit layer 14 */
|
||||||
#define LAYER_15 0x00004000 /* Bit layer 15 */
|
#define LAYER_15 0x00004000 /* Bit layer 15 */
|
||||||
#define CMP_LAYER 0x00008000 /* Bit layer cmp */
|
#define CMP_LAYER 0x00008000 /* Bit layer cmp */
|
||||||
#define ADHESIVE_LAYER_CU 0x00010000
|
#define ADHESIVE_LAYER_CU 0x00010000
|
||||||
#define ADHESIVE_LAYER_CMP 0x00020000
|
#define ADHESIVE_LAYER_CMP 0x00020000
|
||||||
#define SOLDERPASTE_LAYER_CU 0x00040000
|
#define SOLDERPASTE_LAYER_CU 0x00040000
|
||||||
#define SOLDERPASTE_LAYER_CMP 0x00080000
|
#define SOLDERPASTE_LAYER_CMP 0x00080000
|
||||||
#define SILKSCREEN_LAYER_CU 0x00100000
|
#define SILKSCREEN_LAYER_CU 0x00100000
|
||||||
#define SILKSCREEN_LAYER_CMP 0x00200000
|
#define SILKSCREEN_LAYER_CMP 0x00200000
|
||||||
#define SOLDERMASK_LAYER_CU 0x00400000
|
#define SOLDERMASK_LAYER_CU 0x00400000
|
||||||
#define SOLDERMASK_LAYER_CMP 0x00800000
|
#define SOLDERMASK_LAYER_CMP 0x00800000
|
||||||
#define DRAW_LAYER 0x01000000
|
#define DRAW_LAYER 0x01000000
|
||||||
#define COMMENT_LAYER 0x02000000
|
#define COMMENT_LAYER 0x02000000
|
||||||
#define ECO1_LAYER 0x04000000
|
#define ECO1_LAYER 0x04000000
|
||||||
#define ECO2_LAYER 0x08000000
|
#define ECO2_LAYER 0x08000000
|
||||||
#define EDGE_LAYER 0x10000000
|
#define EDGE_LAYER 0x10000000
|
||||||
#define intS_LAYER 0xE0000000 /* 4 bits MSB = autres flags */
|
#define intS_LAYER 0xE0000000 /* 4 bits MSB = autres flags */
|
||||||
/* masques generaux : */
|
/* masques generaux : */
|
||||||
#define ALL_LAYERS 0x1FFFFFFF
|
#define ALL_LAYERS 0x1FFFFFFF
|
||||||
#define ALL_NO_CU_LAYERS 0x1FFF0000
|
#define ALL_NO_CU_LAYERS 0x1FFF0000
|
||||||
#define ALL_CU_LAYERS 0x0000FFFF
|
#define ALL_CU_LAYERS 0x0000FFFF
|
||||||
#define INTERNAL_LAYERS 0x00007FFE /* Bits layers internes */
|
#define INTERNAL_LAYERS 0x00007FFE /* Bits layers internes */
|
||||||
#define EXTERNAL_LAYERS 0x00008001
|
#define EXTERNAL_LAYERS 0x00008001
|
||||||
/* Flags pour les couches cuivres */
|
/* Flags pour les couches cuivres */
|
||||||
#define LAYER_is_PLAN 0x80000000
|
#define LAYER_is_PLAN 0x80000000
|
||||||
|
|
||||||
/* numero des couches particulieres */
|
/* numero des couches particulieres */
|
||||||
#define LAYER_CUIVRE_N 0
|
#define LAYER_CUIVRE_N 0
|
||||||
#define CUIVRE_N 0
|
#define CUIVRE_N 0
|
||||||
#define LAYER_N_2 1 /* Numero layer 2 */
|
#define LAYER_N_2 1 /* Numero layer 2 */
|
||||||
#define LAYER_N_3 2 /* Numero layer 3 */
|
#define LAYER_N_3 2 /* Numero layer 3 */
|
||||||
#define LAYER_N_4 3 /* Numero layer 4 */
|
#define LAYER_N_4 3 /* Numero layer 4 */
|
||||||
#define LAYER_N_5 4 /* Numero layer 5 */
|
#define LAYER_N_5 4 /* Numero layer 5 */
|
||||||
#define LAYER_N_6 5 /* Numero layer 6 */
|
#define LAYER_N_6 5 /* Numero layer 6 */
|
||||||
#define LAYER_N_7 6 /* Numero layer 7 */
|
#define LAYER_N_7 6 /* Numero layer 7 */
|
||||||
#define LAYER_N_8 7 /* Numero layer 8 */
|
#define LAYER_N_8 7 /* Numero layer 8 */
|
||||||
#define LAYER_N_9 8 /* Numero layer 9 */
|
#define LAYER_N_9 8 /* Numero layer 9 */
|
||||||
#define LAYER_N_10 9 /* Numero layer 10 */
|
#define LAYER_N_10 9 /* Numero layer 10 */
|
||||||
#define LAYER_N_11 10 /* Numero layer 11 */
|
#define LAYER_N_11 10 /* Numero layer 11 */
|
||||||
#define LAYER_N_12 11 /* Numero layer 12 */
|
#define LAYER_N_12 11 /* Numero layer 12 */
|
||||||
#define LAYER_N_13 12 /* Numero layer 13 */
|
#define LAYER_N_13 12 /* Numero layer 13 */
|
||||||
#define LAYER_N_14 13 /* Numero layer 14 */
|
#define LAYER_N_14 13 /* Numero layer 14 */
|
||||||
#define LAYER_N_15 14 /* Numero layer 15 */
|
#define LAYER_N_15 14 /* Numero layer 15 */
|
||||||
#define LAYER_CMP_N 15
|
#define LAYER_CMP_N 15
|
||||||
#define CMP_N 15
|
#define CMP_N 15
|
||||||
#define NB_COPPER_LAYERS (CMP_N+1)
|
#define NB_COPPER_LAYERS (CMP_N + 1)
|
||||||
#define FIRST_NO_COPPER_LAYER 16
|
#define FIRST_NO_COPPER_LAYER 16
|
||||||
#define ADHESIVE_N_CU 16
|
#define ADHESIVE_N_CU 16
|
||||||
#define ADHESIVE_N_CMP 17
|
#define ADHESIVE_N_CMP 17
|
||||||
#define SOLDERPASTE_N_CU 18
|
#define SOLDERPASTE_N_CU 18
|
||||||
#define SOLDERPASTE_N_CMP 19
|
#define SOLDERPASTE_N_CMP 19
|
||||||
#define SILKSCREEN_N_CU 20
|
#define SILKSCREEN_N_CU 20
|
||||||
#define SILKSCREEN_N_CMP 21
|
#define SILKSCREEN_N_CMP 21
|
||||||
#define SOLDERMASK_N_CU 22
|
#define SOLDERMASK_N_CU 22
|
||||||
#define SOLDERMASK_N_CMP 23
|
#define SOLDERMASK_N_CMP 23
|
||||||
#define DRAW_N 24
|
#define DRAW_N 24
|
||||||
#define COMMENT_N 25
|
#define COMMENT_N 25
|
||||||
#define ECO1_N 26
|
#define ECO1_N 26
|
||||||
#define ECO2_N 27
|
#define ECO2_N 27
|
||||||
#define EDGE_N 28
|
#define EDGE_N 28
|
||||||
#define LAST_NO_COPPER_LAYER 28
|
#define LAST_NO_COPPER_LAYER 28
|
||||||
#define NB_LAYERS (EDGE_N+1)
|
#define NB_LAYERS (EDGE_N + 1)
|
||||||
#define LAYER_COUNT 32
|
#define LAYER_COUNT 32
|
||||||
|
|
||||||
/* Forme des segments (pistes, contours ..) ( parametre .shape ) */
|
/* Forme des segments (pistes, contours ..) ( parametre .shape ) */
|
||||||
enum Track_Shapes {
|
enum Track_Shapes {
|
||||||
S_SEGMENT = 0, /* segment rectiligne */
|
S_SEGMENT = 0, /* segment rectiligne */
|
||||||
S_RECT, /* segment forme rect (i.e. bouts non arrondis) */
|
S_RECT, /* segment forme rect (i.e. bouts non arrondis) */
|
||||||
S_ARC, /* segment en arc de cercle (bouts arrondis)*/
|
S_ARC, /* segment en arc de cercle (bouts arrondis)*/
|
||||||
S_CIRCLE, /* segment en cercle (anneau)*/
|
S_CIRCLE, /* segment en cercle (anneau)*/
|
||||||
S_ARC_RECT, /* segment en arc de cercle (bouts droits) (GERBER)*/
|
S_ARC_RECT, /* segment en arc de cercle (bouts droits) (GERBER)*/
|
||||||
S_SPOT_OVALE, /* spot ovale (for GERBER)*/
|
S_SPOT_OVALE, /* spot ovale (for GERBER)*/
|
||||||
S_SPOT_CIRCLE, /* spot rond (for GERBER)*/
|
S_SPOT_CIRCLE, /* spot rond (for GERBER)*/
|
||||||
S_SPOT_RECT, /* spot rect (for GERBER)*/
|
S_SPOT_RECT, /* spot rect (for GERBER)*/
|
||||||
S_POLYGON /* polygon shape */
|
S_POLYGON /* polygon shape */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -143,90 +143,93 @@ class DrawBlockStruct;
|
||||||
class EDA_BoardDesignSettings
|
class EDA_BoardDesignSettings
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int m_CopperLayerCount; // Number of copper layers for this design
|
int m_CopperLayerCount; // Number of copper layers for this design
|
||||||
int m_ViaDrill; // via drill (for the entire board)
|
int m_ViaDrill; // via drill (for the entire board)
|
||||||
int m_CurrentViaSize; // Current via size
|
int m_CurrentViaSize; // Current via size
|
||||||
int m_ViaSizeHistory[HIST0RY_NUMBER]; // Last HIST0RY_NUMBER used via sizes
|
int m_ViaSizeHistory[HIST0RY_NUMBER]; // Last HIST0RY_NUMBER used via sizes
|
||||||
int m_CurrentViaType; /* via type (BLIND, TROUGHT ...), bits 1 and 2 (not 0 and 1)*/
|
int m_CurrentViaType; // via type (BLIND, TROUGHT ...), bits 1 and 2 (not 0 and 1)
|
||||||
int m_CurrentTrackWidth; // current track width
|
int m_CurrentTrackWidth; // current track width
|
||||||
int m_TrackWidhtHistory[HIST0RY_NUMBER]; // Last HIST0RY_NUMBER used track widths
|
int m_TrackWidhtHistory[HIST0RY_NUMBER]; // Last HIST0RY_NUMBER used track widths
|
||||||
int m_DrawSegmentWidth; // current graphic line width (not EDGE layer)
|
int m_DrawSegmentWidth; // current graphic line width (not EDGE layer)
|
||||||
int m_EdgeSegmentWidth; // current graphic line width (EDGE layer only)
|
int m_EdgeSegmentWidth; // current graphic line width (EDGE layer only)
|
||||||
int m_PcbTextWidth; // current Pcb (not module) Text width
|
int m_PcbTextWidth; // current Pcb (not module) Text width
|
||||||
wxSize m_PcbTextSize; // current Pcb (not module) Text size
|
wxSize m_PcbTextSize; // current Pcb (not module) Text size
|
||||||
int m_TrackClearence; // track to track and track to pads clearance
|
int m_TrackClearence; // track to track and track to pads clearance
|
||||||
int m_ZoneClearence; // zone to track and zone to pads clearance
|
int m_ZoneClearence; // zone to track and zone to pads clearance
|
||||||
int m_MaskMargin; // Solder mask margin
|
int m_MaskMargin; // Solder mask margin
|
||||||
/* Color options for screen display of the Printed Board: */
|
|
||||||
int m_PcbGridColor; // Grid color
|
// Color options for screen display of the Printed Board:
|
||||||
int m_LayerColor[32] ; // Layer colors (tracks and graphic items)
|
int m_PcbGridColor; // Grid color
|
||||||
int m_ViaColor[4]; // Via color (depending on is type)
|
int m_LayerColor[32]; // Layer colors (tracks and graphic items)
|
||||||
int m_ModuleTextCMPColor; // Text module color for modules on the COMPONENT layer
|
int m_ViaColor[4]; // Via color (depending on is type)
|
||||||
int m_ModuleTextCUColor; // Text module color for modules on the COPPER layer
|
int m_ModuleTextCMPColor; // Text module color for modules on the COMPONENT layer
|
||||||
int m_ModuleTextNOVColor; // Text module color for "invisible" texts (must be BLACK if really not displayed)
|
int m_ModuleTextCUColor; // Text module color for modules on the COPPER layer
|
||||||
int m_AnchorColor; // Anchor color for modules and texts
|
int m_ModuleTextNOVColor; // Text module color for "invisible" texts (must be BLACK if really not displayed)
|
||||||
int m_PadCUColor; // Pad color for the COMPONENT side of the pad
|
int m_AnchorColor; // Anchor color for modules and texts
|
||||||
int m_PadCMPColor; // Pad color for the COPPER side of the pad
|
int m_PadCUColor; // Pad color for the COMPONENT side of the pad
|
||||||
// Pad color for the pads of both sides is m_PadCUColor OR m_PadCMPColor (in terms of colors)
|
int m_PadCMPColor; // Pad color for the COPPER side of the pad
|
||||||
int m_RatsnestColor; // Ratsnest color
|
// Pad color for the pads of both sides is m_PadCUColor OR m_PadCMPColor (in terms of colors)
|
||||||
|
|
||||||
|
int m_RatsnestColor; // Ratsnest color
|
||||||
|
|
||||||
public:
|
public:
|
||||||
EDA_BoardDesignSettings(void);
|
EDA_BoardDesignSettings( void );
|
||||||
};
|
};
|
||||||
|
|
||||||
// Values for m_DisplayViaMode member:
|
// Values for m_DisplayViaMode member:
|
||||||
enum DisplayViaMode {
|
enum DisplayViaMode {
|
||||||
VIA_HOLE_NOT_SHOW = 0,
|
VIA_HOLE_NOT_SHOW = 0,
|
||||||
VIA_SPECIAL_HOLE_SHOW,
|
VIA_SPECIAL_HOLE_SHOW,
|
||||||
ALL_VIA_HOLE_SHOW,
|
ALL_VIA_HOLE_SHOW,
|
||||||
OPT_VIA_HOLE_END
|
OPT_VIA_HOLE_END
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class BOARD: public EDA_BaseStruct
|
class BOARD : public EDA_BaseStruct
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WinEDA_BasePcbFrame * m_PcbFrame; // Window de visualisation
|
WinEDA_BasePcbFrame* m_PcbFrame; // Window de visualisation
|
||||||
EDA_Rect m_BoundaryBox; // Limites d'encadrement du PCB
|
EDA_Rect m_BoundaryBox; // Limites d'encadrement du PCB
|
||||||
int m_Unused; //
|
int m_Unused;
|
||||||
int m_Status_Pcb; // Mot d'etat: Bit 1 = Chevelu calcule
|
int m_Status_Pcb; // Mot d'etat: Bit 1 = Chevelu calcule
|
||||||
EDA_BoardDesignSettings * m_BoardSettings; // Link to current design settings
|
EDA_BoardDesignSettings* m_BoardSettings; // Link to current design settings
|
||||||
int m_NbNets; // Nombre de nets (equipotentielles)
|
int m_NbNets; // Nombre de nets (equipotentielles)
|
||||||
int m_NbNodes; // nombre de pads connectes
|
int m_NbNodes; // nombre de pads connectes
|
||||||
int m_NbLinks; // nombre de chevelus
|
int m_NbLinks; // nombre de chevelus
|
||||||
int m_NbLoclinks; // nombre de chevelus dans Local ratsnest
|
int m_NbLoclinks; // nombre de chevelus dans Local ratsnest
|
||||||
// minimal de pistes a tracer
|
// minimal de pistes a tracer
|
||||||
int m_NbNoconnect; // nombre de chevelus actifs
|
int m_NbNoconnect; // nombre de chevelus actifs
|
||||||
int m_NbSegmTrack; // nombre d'elements de type segments de piste
|
int m_NbSegmTrack; // nombre d'elements de type segments de piste
|
||||||
int m_NbSegmZone; // nombre d'elements de type segments de zone
|
int m_NbSegmZone; // nombre d'elements de type segments de zone
|
||||||
|
|
||||||
EDA_BaseStruct * m_Drawings; // pointeur sur liste drawings
|
EDA_BaseStruct* m_Drawings; // pointeur sur liste drawings
|
||||||
MODULE * m_Modules; // pointeur sur liste zone modules
|
MODULE* m_Modules; // pointeur sur liste zone modules
|
||||||
EQUIPOT * m_Equipots; // pointeur liste zone equipot
|
EQUIPOT* m_Equipots; // pointeur liste zone equipot
|
||||||
TRACK * m_Track; // pointeur relatif zone piste
|
TRACK* m_Track; // pointeur relatif zone piste
|
||||||
TRACK * m_Zone; // pointeur tableau zone zones de cuivre
|
TRACK* m_Zone; // pointeur tableau zone zones de cuivre
|
||||||
D_PAD ** m_Pads; // pointeur liste d'acces aux pads
|
D_PAD** m_Pads; // pointeur liste d'acces aux pads
|
||||||
int m_NbPads; // nombre total de pads
|
int m_NbPads; // nombre total de pads
|
||||||
CHEVELU * m_Ratsnest; // pointeur liste des chevelus
|
CHEVELU* m_Ratsnest; // pointeur liste des chevelus
|
||||||
CHEVELU * m_LocalRatsnest; // pointeur liste des chevelus d'un module
|
CHEVELU* m_LocalRatsnest; // pointeur liste des chevelus d'un module
|
||||||
|
|
||||||
EDGE_ZONE * m_CurrentLimitZone; /* pointeur sur la liste des segments
|
EDGE_ZONE* m_CurrentLimitZone;/* pointeur sur la liste des segments
|
||||||
de delimitation de la zone en cours de trace */
|
* de delimitation de la zone en cours de trace */
|
||||||
|
|
||||||
BOARD(EDA_BaseStruct * StructFather, WinEDA_BasePcbFrame * frame);
|
BOARD( EDA_BaseStruct* StructFather, WinEDA_BasePcbFrame* frame );
|
||||||
~BOARD(void);
|
~BOARD( void );
|
||||||
|
|
||||||
/* supprime du chainage la structure Struct */
|
/* supprime du chainage la structure Struct */
|
||||||
void UnLink( void );
|
void UnLink( void );
|
||||||
|
|
||||||
/* Routines de calcul des nombres de segments pistes et zones */
|
/* Routines de calcul des nombres de segments pistes et zones */
|
||||||
int GetNumSegmTrack(void);
|
int GetNumSegmTrack( void );
|
||||||
int GetNumSegmZone(void);
|
int GetNumSegmZone( void );
|
||||||
int GetNumNoconnect(void); // retourne le nombre de connexions manquantes
|
int GetNumNoconnect( void ); // retourne le nombre de connexions manquantes
|
||||||
int GetNumRatsnests(void); // retourne le nombre de chevelus
|
int GetNumRatsnests( void ); // retourne le nombre de chevelus
|
||||||
int GetNumNodes(void); // retourne le nombre de pads a netcode > 0
|
int GetNumNodes( void ); // retourne le nombre de pads a netcode > 0
|
||||||
|
|
||||||
// Calcul du rectangle d'encadrement:
|
// Calcul du rectangle d'encadrement:
|
||||||
bool ComputeBoundaryBox(void);
|
bool ComputeBoundaryBox( void );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -234,54 +237,54 @@ class BOARD: public EDA_BaseStruct
|
||||||
class PCB_SCREEN : public BASE_SCREEN
|
class PCB_SCREEN : public BASE_SCREEN
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int m_Active_Layer; /* ref couche active */
|
int m_Active_Layer; /* ref couche active */
|
||||||
int m_Route_Layer_TOP; /* ref couches actives */
|
int m_Route_Layer_TOP; /* ref couches actives */
|
||||||
int m_Route_Layer_BOTTOM; /* pour placement vias et routage 2 couches */
|
int m_Route_Layer_BOTTOM; /* pour placement vias et routage 2 couches */
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PCB_SCREEN(int idscreen);
|
PCB_SCREEN( int idscreen );
|
||||||
~PCB_SCREEN(void);
|
~PCB_SCREEN( void );
|
||||||
PCB_SCREEN * Next(void) { return (PCB_SCREEN *) Pnext;}
|
PCB_SCREEN* Next( void ) { return (PCB_SCREEN*) Pnext; }
|
||||||
void Init(void);
|
void Init( void );
|
||||||
void SetNextZoom(void);
|
void SetNextZoom( void );
|
||||||
void SetPreviousZoom(void);
|
void SetPreviousZoom( void );
|
||||||
void SetLastZoom(void);
|
void SetLastZoom( void );
|
||||||
};
|
};
|
||||||
|
|
||||||
/***************************/
|
/***************************/
|
||||||
/* Description des Modules */
|
/* Description des Modules */
|
||||||
/***************************/
|
/***************************/
|
||||||
|
|
||||||
#include "class_pad.h" /* Description des Pastilles :*/
|
#include "class_pad.h" /* Description des Pastilles :*/
|
||||||
#include "class_edge_mod.h"
|
#include "class_edge_mod.h"
|
||||||
#include "class_text_mod.h"
|
#include "class_text_mod.h"
|
||||||
#include "class_module.h"
|
#include "class_module.h"
|
||||||
#include "class_equipot.h"
|
#include "class_equipot.h"
|
||||||
|
|
||||||
|
|
||||||
/***********************************/
|
/***********************************/
|
||||||
/* Description des elements du PCB */
|
/* Description des elements du PCB */
|
||||||
/***********************************/
|
/***********************************/
|
||||||
|
|
||||||
class DRAWSEGMENT: public EDA_BaseLineStruct
|
class DRAWSEGMENT : public EDA_BaseLineStruct
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int m_Shape; // forme: Segment , Cercle..
|
int m_Shape; // forme: Segment , Cercle..
|
||||||
int m_Type; // numero de sous type ( cotation.. )
|
int m_Type; // numero de sous type ( cotation.. )
|
||||||
int m_Angle; // pour les arcs: "longueur" de l'arc en 1/10 deg
|
int m_Angle; // pour les arcs: "longueur" de l'arc en 1/10 deg
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DRAWSEGMENT(EDA_BaseStruct * StructFather, DrawStructureType idtype = TYPEDRAWSEGMENT);
|
DRAWSEGMENT( EDA_BaseStruct* StructFather, DrawStructureType idtype = TYPEDRAWSEGMENT );
|
||||||
~DRAWSEGMENT(void);
|
~DRAWSEGMENT( void );
|
||||||
|
|
||||||
// Read/write data
|
// Read/write data
|
||||||
bool WriteDrawSegmentDescr(FILE * File);
|
bool WriteDrawSegmentDescr( FILE* File );
|
||||||
bool ReadDrawSegmentDescr(FILE * File, int * LineNum);
|
bool ReadDrawSegmentDescr( FILE* File, int* LineNum );
|
||||||
|
|
||||||
/* supprime du chainage la structure Struct */
|
/* supprime du chainage la structure Struct */
|
||||||
void UnLink( void );
|
void UnLink( void );
|
||||||
|
|
||||||
void Copy(DRAWSEGMENT * source);
|
void Copy( DRAWSEGMENT* source );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -290,68 +293,68 @@ public:
|
||||||
#include "class_mire.h"
|
#include "class_mire.h"
|
||||||
#include "class_track.h"
|
#include "class_track.h"
|
||||||
|
|
||||||
/*******************/
|
/*******************/
|
||||||
/* class EDGE_ZONE */
|
/* class EDGE_ZONE */
|
||||||
/*******************/
|
/*******************/
|
||||||
|
|
||||||
class EDGE_ZONE: public DRAWSEGMENT
|
class EDGE_ZONE : public DRAWSEGMENT
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EDGE_ZONE(EDA_BaseStruct * StructFather);
|
EDGE_ZONE( EDA_BaseStruct* StructFather );
|
||||||
EDGE_ZONE(const EDGE_ZONE & edgezone);
|
EDGE_ZONE( const EDGE_ZONE& edgezone );
|
||||||
~EDGE_ZONE(void);
|
~EDGE_ZONE( void );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/************************************/
|
/************************************/
|
||||||
/* Gestion des marqueurs sur le PCB */
|
/* Gestion des marqueurs sur le PCB */
|
||||||
/************************************/
|
/************************************/
|
||||||
|
|
||||||
class MARQUEUR: public EDA_BaseStruct
|
class MARQUEUR : public EDA_BaseStruct
|
||||||
{ /* Description d'un marqueur */
|
{
|
||||||
|
/* Description d'un marqueur */
|
||||||
public:
|
public:
|
||||||
wxPoint m_Pos;
|
wxPoint m_Pos;
|
||||||
char * m_Bitmap; /* Shape (bitmap) */
|
char* m_Bitmap; /* Shape (bitmap) */
|
||||||
int m_Type;
|
int m_Type;
|
||||||
int m_Color; /* couleur */
|
int m_Color; /* couleur */
|
||||||
wxString m_Diag; /* Associated text (comment) */
|
wxString m_Diag; /* Associated text (comment) */
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MARQUEUR(EDA_BaseStruct * StructFather);
|
MARQUEUR( EDA_BaseStruct* StructFather );
|
||||||
~MARQUEUR(void);
|
~MARQUEUR( void );
|
||||||
void UnLink( void );
|
void UnLink( void );
|
||||||
void Draw( WinEDA_DrawPanel * panel, wxDC * DC, int DrawMode);
|
void Draw( WinEDA_DrawPanel* panel, wxDC* DC, int DrawMode );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class DISPLAY_OPTIONS
|
class DISPLAY_OPTIONS
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool DisplayPadFill;
|
bool DisplayPadFill;
|
||||||
bool DisplayPadNum;
|
bool DisplayPadNum;
|
||||||
bool DisplayPadNoConn;
|
bool DisplayPadNoConn;
|
||||||
bool DisplayPadIsol;
|
bool DisplayPadIsol;
|
||||||
|
|
||||||
int DisplayModEdge;
|
int DisplayModEdge;
|
||||||
int DisplayModText;
|
int DisplayModText;
|
||||||
bool DisplayPcbTrackFill; /* FALSE = sketch , TRUE = filled */
|
bool DisplayPcbTrackFill; /* FALSE = sketch , TRUE = filled */
|
||||||
bool DisplayTrackIsol;
|
bool DisplayTrackIsol;
|
||||||
int m_DisplayViaMode; /* 0 do not show via hole,
|
int m_DisplayViaMode; /* 0 do not show via hole,
|
||||||
1 show via hole for non default value
|
* 1 show via hole for non default value
|
||||||
2 show all via hole */
|
* 2 show all via hole */
|
||||||
|
|
||||||
bool DisplayPolarCood;
|
bool DisplayPolarCood;
|
||||||
bool DisplayZones;
|
bool DisplayZones;
|
||||||
bool Show_Modules_Cmp;
|
bool Show_Modules_Cmp;
|
||||||
bool Show_Modules_Cu;
|
bool Show_Modules_Cu;
|
||||||
|
|
||||||
int DisplayDrawItems;
|
int DisplayDrawItems;
|
||||||
bool ContrastModeDisplay;
|
bool ContrastModeDisplay;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DISPLAY_OPTIONS(void);
|
DISPLAY_OPTIONS( void );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* PCBSTRUCT_H */
|
#endif /* PCBSTRUCT_H */
|
||||||
|
|
2141
include/wxstruct.h
2141
include/wxstruct.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue