Loading include/base_struct.h +205 −182 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ enum DrawStructureType { TYPE_NOT_INIT = 0, TYPEPCB, // Items in pcb PCB_EQUIPOT_STRUCT_TYPE, TYPEMODULE, Loading @@ -27,6 +28,7 @@ enum DrawStructureType { TYPESCREEN, TYPEBLOCK, TYPEEDGEZONE, // Draw Items in schematic DRAW_POLYLINE_STRUCT_TYPE, DRAW_JUNCTION_STRUCT_TYPE, Loading @@ -42,9 +44,11 @@ enum DrawStructureType { DRAW_MARKER_STRUCT_TYPE, DRAW_NOCONNECT_STRUCT_TYPE, DRAW_PART_TEXT_STRUCT_TYPE, // General SCREEN_STRUCT_TYPE, BLOCK_LOCATE_STRUCT_TYPE, // Draw Items in library component LIBCOMPONENT_STRUCT_TYPE, COMPONENT_ARC_DRAW_TYPE, Loading @@ -55,6 +59,7 @@ enum DrawStructureType { COMPONENT_LINE_DRAW_TYPE, COMPONENT_PIN_DRAW_TYPE, COMPONENT_FIELD_DRAW_TYPE, // End value MAX_STRUCT_TYPE_ID }; Loading Loading @@ -88,25 +93,36 @@ public: EDA_BaseStruct( EDA_BaseStruct* parent, int idType ); EDA_BaseStruct( int struct_type ); virtual ~EDA_BaseStruct() { }; EDA_BaseStruct* Next( void ) { return Pnext; } /* Gestion de l'etat (status) de la structure (active, deleted..) */ int GetState( int type ); void SetState( int type, int state ); int ReturnStatus( void ) const { return(m_Status); return m_Status; } void SetStatus( int new_status ) { m_Status = new_status; } wxString ReturnClassName( void ); /* addition d'une nouvelle struct a la liste chaine */ /* addition d'une nouvelle struct a la liste chain� */ 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); virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int draw_mode, int Color = -1 ); }; // Text justify: Loading @@ -117,12 +133,14 @@ typedef enum { GR_TEXT_HJUSTIFY_RIGHT = 1 } GRTextHorizJustifyType; typedef enum { GR_TEXT_VJUSTIFY_TOP = -1, GR_TEXT_VJUSTIFY_CENTER = 0, GR_TEXT_VJUSTIFY_BOTTOM = 1 } GRTextVertJustifyType; /* controle des remplissages a l'ecran (Segments textes...)*/ #define FILAIRE 0 #define FILLED 1 Loading @@ -132,7 +150,7 @@ typedef enum { #define DEFAULT_SIZE_TEXT 60 /* Hauteur (en 1/000" par defaut des textes */ /* classe de gestion des textes (labels, textes composants ..) (Non utilisee seule) */ * (Non utilisee seule) */ class EDA_TextStruct { public: Loading @@ -150,25 +168,25 @@ public: int* m_TextDrawings; /* pointeur sur la liste des segments de dessin */ int m_TextDrawingsSize; /* nombre de segments a dessiner */ public: EDA_TextStruct( const wxString& text = wxEmptyString ); virtual ~EDA_TextStruct( 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 }; /* 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 { Loading @@ -188,11 +206,11 @@ public: /**************************/ /* Class to hold structures picked by pick events (like block selection) This class has only one useful member: .m_PickedStruct, used as a link. It does not describe really an item. It is used to create a linked list of selected items (in block selection). Each DrawPickedStruct item has is member: .m_PickedStruct pointing the real selected item * This class has only one useful member: .m_PickedStruct, used as a link. * It does not describe really an item. * It is used to create a linked list of selected items (in block selection). * Each DrawPickedStruct item has is member: .m_PickedStruct pointing the * real selected item */ class DrawPickedStruct : public EDA_BaseStruct { Loading @@ -204,13 +222,14 @@ public: ~DrawPickedStruct( void ); void Place( WinEDA_DrawFrame* frame, wxDC* DC ) { }; void DeleteWrapperList( void ); DrawPickedStruct* Next( void ) { return (DrawPickedStruct*) Pnext; } }; /* class to handle component boundary box. This class is similar to wxRect, but some wxRect functions are very curious, so I prefer this suitable class * This class is similar to wxRect, but some wxRect functions are very curious, * so I prefer this suitable class */ class EDA_Rect { Loading @@ -225,8 +244,10 @@ public: 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 bool Inside( int x, int y ) { return Inside( wxPoint( x, y ) ); } wxSize GetSize( void ) { return m_Size; } int GetX( void ) { return m_Pos.x; } Loading @@ -252,6 +273,8 @@ public: { m_Size.x = pos.x - m_Pos.x; m_Size.y = pos.y - m_Pos.y; } EDA_Rect& Inflate( wxCoord dx, wxCoord dy ); }; Loading include/pcbstruct.h +258 −255 Original line number Diff line number Diff line Loading @@ -22,9 +22,9 @@ #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 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 et mises en chaine "DELETED" */ * et mises en chaine "DELETED" */ #define NO_TRACE 0x80 /* l'element ne doit pas etre affiche */ #define SURBRILL 0x20 /* element en surbrillance */ #define DRAG 0x10 /* segment en mode drag */ Loading Loading @@ -147,7 +147,7 @@ public: int m_ViaDrill; // via drill (for the entire board) int m_CurrentViaSize; // Current via size 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_TrackWidhtHistory[HIST0RY_NUMBER]; // Last HIST0RY_NUMBER used track widths int m_DrawSegmentWidth; // current graphic line width (not EDGE layer) Loading @@ -157,7 +157,8 @@ public: int m_TrackClearence; // track to track and track to pads clearance int m_ZoneClearence; // zone to track and zone to pads clearance int m_MaskMargin; // Solder mask margin /* Color options for screen display of the Printed Board: */ // Color options for screen display of the Printed Board: int m_PcbGridColor; // Grid color int m_LayerColor[32]; // Layer colors (tracks and graphic items) int m_ViaColor[4]; // Via color (depending on is type) Loading @@ -168,6 +169,7 @@ public: int m_PadCUColor; // Pad color for the COMPONENT side of the pad int m_PadCMPColor; // Pad color for the COPPER side of the pad // Pad color for the pads of both sides is m_PadCUColor OR m_PadCMPColor (in terms of colors) int m_RatsnestColor; // Ratsnest color public: Loading @@ -180,6 +182,7 @@ enum DisplayViaMode { VIA_SPECIAL_HOLE_SHOW, ALL_VIA_HOLE_SHOW, OPT_VIA_HOLE_END }; class BOARD : public EDA_BaseStruct Loading @@ -187,7 +190,7 @@ class BOARD: public EDA_BaseStruct public: WinEDA_BasePcbFrame* m_PcbFrame; // Window de visualisation 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 EDA_BoardDesignSettings* m_BoardSettings; // Link to current design settings int m_NbNets; // Nombre de nets (equipotentielles) Loading @@ -210,7 +213,7 @@ class BOARD: public EDA_BaseStruct CHEVELU* m_LocalRatsnest; // pointeur liste des chevelus d'un module 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( void ); Loading Loading @@ -308,7 +311,8 @@ public: /************************************/ class MARQUEUR : public EDA_BaseStruct { /* Description d'un marqueur */ { /* Description d'un marqueur */ public: wxPoint m_Pos; char* m_Bitmap; /* Shape (bitmap) */ Loading Loading @@ -337,8 +341,8 @@ public: bool DisplayPcbTrackFill; /* FALSE = sketch , TRUE = filled */ bool DisplayTrackIsol; int m_DisplayViaMode; /* 0 do not show via hole, 1 show via hole for non default value 2 show all via hole */ * 1 show via hole for non default value * 2 show all via hole */ bool DisplayPolarCood; bool DisplayZones; Loading @@ -353,5 +357,4 @@ public: }; #endif /* PCBSTRUCT_H */ Loading
include/base_struct.h +205 −182 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ enum DrawStructureType { TYPE_NOT_INIT = 0, TYPEPCB, // Items in pcb PCB_EQUIPOT_STRUCT_TYPE, TYPEMODULE, Loading @@ -27,6 +28,7 @@ enum DrawStructureType { TYPESCREEN, TYPEBLOCK, TYPEEDGEZONE, // Draw Items in schematic DRAW_POLYLINE_STRUCT_TYPE, DRAW_JUNCTION_STRUCT_TYPE, Loading @@ -42,9 +44,11 @@ enum DrawStructureType { DRAW_MARKER_STRUCT_TYPE, DRAW_NOCONNECT_STRUCT_TYPE, DRAW_PART_TEXT_STRUCT_TYPE, // General SCREEN_STRUCT_TYPE, BLOCK_LOCATE_STRUCT_TYPE, // Draw Items in library component LIBCOMPONENT_STRUCT_TYPE, COMPONENT_ARC_DRAW_TYPE, Loading @@ -55,6 +59,7 @@ enum DrawStructureType { COMPONENT_LINE_DRAW_TYPE, COMPONENT_PIN_DRAW_TYPE, COMPONENT_FIELD_DRAW_TYPE, // End value MAX_STRUCT_TYPE_ID }; Loading Loading @@ -88,25 +93,36 @@ public: EDA_BaseStruct( EDA_BaseStruct* parent, int idType ); EDA_BaseStruct( int struct_type ); virtual ~EDA_BaseStruct() { }; EDA_BaseStruct* Next( void ) { return Pnext; } /* Gestion de l'etat (status) de la structure (active, deleted..) */ int GetState( int type ); void SetState( int type, int state ); int ReturnStatus( void ) const { return(m_Status); return m_Status; } void SetStatus( int new_status ) { m_Status = new_status; } wxString ReturnClassName( void ); /* addition d'une nouvelle struct a la liste chaine */ /* addition d'une nouvelle struct a la liste chain� */ 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); virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int draw_mode, int Color = -1 ); }; // Text justify: Loading @@ -117,12 +133,14 @@ typedef enum { GR_TEXT_HJUSTIFY_RIGHT = 1 } GRTextHorizJustifyType; typedef enum { GR_TEXT_VJUSTIFY_TOP = -1, GR_TEXT_VJUSTIFY_CENTER = 0, GR_TEXT_VJUSTIFY_BOTTOM = 1 } GRTextVertJustifyType; /* controle des remplissages a l'ecran (Segments textes...)*/ #define FILAIRE 0 #define FILLED 1 Loading @@ -132,7 +150,7 @@ typedef enum { #define DEFAULT_SIZE_TEXT 60 /* Hauteur (en 1/000" par defaut des textes */ /* classe de gestion des textes (labels, textes composants ..) (Non utilisee seule) */ * (Non utilisee seule) */ class EDA_TextStruct { public: Loading @@ -150,25 +168,25 @@ public: int* m_TextDrawings; /* pointeur sur la liste des segments de dessin */ int m_TextDrawingsSize; /* nombre de segments a dessiner */ public: EDA_TextStruct( const wxString& text = wxEmptyString ); virtual ~EDA_TextStruct( 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 }; /* 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 { Loading @@ -188,11 +206,11 @@ public: /**************************/ /* Class to hold structures picked by pick events (like block selection) This class has only one useful member: .m_PickedStruct, used as a link. It does not describe really an item. It is used to create a linked list of selected items (in block selection). Each DrawPickedStruct item has is member: .m_PickedStruct pointing the real selected item * This class has only one useful member: .m_PickedStruct, used as a link. * It does not describe really an item. * It is used to create a linked list of selected items (in block selection). * Each DrawPickedStruct item has is member: .m_PickedStruct pointing the * real selected item */ class DrawPickedStruct : public EDA_BaseStruct { Loading @@ -204,13 +222,14 @@ public: ~DrawPickedStruct( void ); void Place( WinEDA_DrawFrame* frame, wxDC* DC ) { }; void DeleteWrapperList( void ); DrawPickedStruct* Next( void ) { return (DrawPickedStruct*) Pnext; } }; /* class to handle component boundary box. This class is similar to wxRect, but some wxRect functions are very curious, so I prefer this suitable class * This class is similar to wxRect, but some wxRect functions are very curious, * so I prefer this suitable class */ class EDA_Rect { Loading @@ -225,8 +244,10 @@ public: 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 bool Inside( int x, int y ) { return Inside( wxPoint( x, y ) ); } wxSize GetSize( void ) { return m_Size; } int GetX( void ) { return m_Pos.x; } Loading @@ -252,6 +273,8 @@ public: { m_Size.x = pos.x - m_Pos.x; m_Size.y = pos.y - m_Pos.y; } EDA_Rect& Inflate( wxCoord dx, wxCoord dy ); }; Loading
include/pcbstruct.h +258 −255 Original line number Diff line number Diff line Loading @@ -22,9 +22,9 @@ #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 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 et mises en chaine "DELETED" */ * et mises en chaine "DELETED" */ #define NO_TRACE 0x80 /* l'element ne doit pas etre affiche */ #define SURBRILL 0x20 /* element en surbrillance */ #define DRAG 0x10 /* segment en mode drag */ Loading Loading @@ -147,7 +147,7 @@ public: int m_ViaDrill; // via drill (for the entire board) int m_CurrentViaSize; // Current via size 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_TrackWidhtHistory[HIST0RY_NUMBER]; // Last HIST0RY_NUMBER used track widths int m_DrawSegmentWidth; // current graphic line width (not EDGE layer) Loading @@ -157,7 +157,8 @@ public: int m_TrackClearence; // track to track and track to pads clearance int m_ZoneClearence; // zone to track and zone to pads clearance int m_MaskMargin; // Solder mask margin /* Color options for screen display of the Printed Board: */ // Color options for screen display of the Printed Board: int m_PcbGridColor; // Grid color int m_LayerColor[32]; // Layer colors (tracks and graphic items) int m_ViaColor[4]; // Via color (depending on is type) Loading @@ -168,6 +169,7 @@ public: int m_PadCUColor; // Pad color for the COMPONENT side of the pad int m_PadCMPColor; // Pad color for the COPPER side of the pad // Pad color for the pads of both sides is m_PadCUColor OR m_PadCMPColor (in terms of colors) int m_RatsnestColor; // Ratsnest color public: Loading @@ -180,6 +182,7 @@ enum DisplayViaMode { VIA_SPECIAL_HOLE_SHOW, ALL_VIA_HOLE_SHOW, OPT_VIA_HOLE_END }; class BOARD : public EDA_BaseStruct Loading @@ -187,7 +190,7 @@ class BOARD: public EDA_BaseStruct public: WinEDA_BasePcbFrame* m_PcbFrame; // Window de visualisation 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 EDA_BoardDesignSettings* m_BoardSettings; // Link to current design settings int m_NbNets; // Nombre de nets (equipotentielles) Loading @@ -210,7 +213,7 @@ class BOARD: public EDA_BaseStruct CHEVELU* m_LocalRatsnest; // pointeur liste des chevelus d'un module 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( void ); Loading Loading @@ -308,7 +311,8 @@ public: /************************************/ class MARQUEUR : public EDA_BaseStruct { /* Description d'un marqueur */ { /* Description d'un marqueur */ public: wxPoint m_Pos; char* m_Bitmap; /* Shape (bitmap) */ Loading Loading @@ -337,8 +341,8 @@ public: bool DisplayPcbTrackFill; /* FALSE = sketch , TRUE = filled */ bool DisplayTrackIsol; int m_DisplayViaMode; /* 0 do not show via hole, 1 show via hole for non default value 2 show all via hole */ * 1 show via hole for non default value * 2 show all via hole */ bool DisplayPolarCood; bool DisplayZones; Loading @@ -353,5 +357,4 @@ public: }; #endif /* PCBSTRUCT_H */