beautification
This commit is contained in:
parent
803ecc3bbf
commit
7fe80baf55
|
@ -10,6 +10,7 @@
|
||||||
enum DrawStructureType {
|
enum DrawStructureType {
|
||||||
TYPE_NOT_INIT = 0,
|
TYPE_NOT_INIT = 0,
|
||||||
TYPEPCB,
|
TYPEPCB,
|
||||||
|
|
||||||
// Items in pcb
|
// Items in pcb
|
||||||
PCB_EQUIPOT_STRUCT_TYPE,
|
PCB_EQUIPOT_STRUCT_TYPE,
|
||||||
TYPEMODULE,
|
TYPEMODULE,
|
||||||
|
@ -27,6 +28,7 @@ enum DrawStructureType {
|
||||||
TYPESCREEN,
|
TYPESCREEN,
|
||||||
TYPEBLOCK,
|
TYPEBLOCK,
|
||||||
TYPEEDGEZONE,
|
TYPEEDGEZONE,
|
||||||
|
|
||||||
// Draw Items in schematic
|
// Draw Items in schematic
|
||||||
DRAW_POLYLINE_STRUCT_TYPE,
|
DRAW_POLYLINE_STRUCT_TYPE,
|
||||||
DRAW_JUNCTION_STRUCT_TYPE,
|
DRAW_JUNCTION_STRUCT_TYPE,
|
||||||
|
@ -42,9 +44,11 @@ enum DrawStructureType {
|
||||||
DRAW_MARKER_STRUCT_TYPE,
|
DRAW_MARKER_STRUCT_TYPE,
|
||||||
DRAW_NOCONNECT_STRUCT_TYPE,
|
DRAW_NOCONNECT_STRUCT_TYPE,
|
||||||
DRAW_PART_TEXT_STRUCT_TYPE,
|
DRAW_PART_TEXT_STRUCT_TYPE,
|
||||||
|
|
||||||
// General
|
// General
|
||||||
SCREEN_STRUCT_TYPE,
|
SCREEN_STRUCT_TYPE,
|
||||||
BLOCK_LOCATE_STRUCT_TYPE,
|
BLOCK_LOCATE_STRUCT_TYPE,
|
||||||
|
|
||||||
// Draw Items in library component
|
// Draw Items in library component
|
||||||
LIBCOMPONENT_STRUCT_TYPE,
|
LIBCOMPONENT_STRUCT_TYPE,
|
||||||
COMPONENT_ARC_DRAW_TYPE,
|
COMPONENT_ARC_DRAW_TYPE,
|
||||||
|
@ -55,6 +59,7 @@ enum DrawStructureType {
|
||||||
COMPONENT_LINE_DRAW_TYPE,
|
COMPONENT_LINE_DRAW_TYPE,
|
||||||
COMPONENT_PIN_DRAW_TYPE,
|
COMPONENT_PIN_DRAW_TYPE,
|
||||||
COMPONENT_FIELD_DRAW_TYPE,
|
COMPONENT_FIELD_DRAW_TYPE,
|
||||||
|
|
||||||
// End value
|
// End value
|
||||||
MAX_STRUCT_TYPE_ID
|
MAX_STRUCT_TYPE_ID
|
||||||
};
|
};
|
||||||
|
@ -88,25 +93,36 @@ 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; }
|
EDA_BaseStruct* Next( void ) { return Pnext; }
|
||||||
|
|
||||||
/* Gestion de l'etat (status) de la structure (active, deleted..) */
|
/* Gestion de l'etat (status) de la structure (active, deleted..) */
|
||||||
int GetState( int type );
|
int GetState( int type );
|
||||||
void SetState( int type, int state );
|
void SetState( int type, int state );
|
||||||
|
|
||||||
int ReturnStatus( void ) const
|
int ReturnStatus( void ) const
|
||||||
{
|
{
|
||||||
return(m_Status);
|
return m_Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetStatus( int new_status )
|
void SetStatus( int new_status )
|
||||||
{
|
{
|
||||||
m_Status = new_status;
|
m_Status = new_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString ReturnClassName( void );
|
wxString ReturnClassName( void );
|
||||||
/* addition d'une nouvelle struct a la liste chainée */
|
|
||||||
|
/* addition d'une nouvelle struct a la liste chain<69> */
|
||||||
void AddToChain( EDA_BaseStruct* laststruct );
|
void AddToChain( EDA_BaseStruct* laststruct );
|
||||||
|
|
||||||
/* fonction de placement */
|
/* fonction de placement */
|
||||||
virtual void Place( WinEDA_DrawFrame* frame, wxDC* DC );
|
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:
|
// Text justify:
|
||||||
|
@ -117,12 +133,14 @@ typedef enum {
|
||||||
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
|
||||||
|
@ -132,7 +150,7 @@ typedef enum {
|
||||||
#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:
|
||||||
|
@ -150,25 +168,25 @@ public:
|
||||||
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 GetLength( void ) { return m_Text.Length(); };
|
||||||
int Pitch( void );/* retourne le pas entre 2 caracteres */
|
int Pitch( void );/* retourne le pas entre 2 caracteres */
|
||||||
void Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
void Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
||||||
const wxPoint& offset, int color,
|
const wxPoint& offset, int color,
|
||||||
int draw_mode, int display_mode = FILAIRE, int anchor_color = -1 );
|
int draw_mode, int display_mode = FILAIRE, int anchor_color = -1 );
|
||||||
|
|
||||||
/* locate functions */
|
/* locate functions */
|
||||||
int Locate( const wxPoint& posref );
|
int Locate( const wxPoint& posref );
|
||||||
int Len_Size( void ); // Return the text lenght in internal units
|
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
|
||||||
{
|
{
|
||||||
|
@ -188,11 +206,11 @@ public:
|
||||||
/**************************/
|
/**************************/
|
||||||
|
|
||||||
/* 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
|
||||||
{
|
{
|
||||||
|
@ -204,13 +222,14 @@ public:
|
||||||
~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
|
||||||
{
|
{
|
||||||
|
@ -225,8 +244,10 @@ public:
|
||||||
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
|
void Normalize( void ); // Ensure the height ant width are >= 0
|
||||||
bool Inside( const wxPoint& point ); // Return TRUE if point is in Rect
|
bool Inside( const wxPoint& point ); // Return TRUE if point is in Rect
|
||||||
|
|
||||||
bool Inside( int x, int y ) { return Inside( wxPoint( x, y ) ); }
|
bool Inside( int x, int y ) { return Inside( wxPoint( x, y ) ); }
|
||||||
wxSize GetSize( void ) { return m_Size; }
|
wxSize GetSize( void ) { return m_Size; }
|
||||||
int GetX( void ) { return m_Pos.x; }
|
int GetX( void ) { return m_Pos.x; }
|
||||||
|
@ -252,6 +273,8 @@ public:
|
||||||
{
|
{
|
||||||
m_Size.x = pos.x - m_Pos.x; m_Size.y = pos.y - m_Pos.y;
|
m_Size.x = pos.x - m_Pos.x; m_Size.y = pos.y - m_Pos.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EDA_Rect& Inflate( wxCoord dx, wxCoord dy );
|
EDA_Rect& Inflate( wxCoord dx, wxCoord dy );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
#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 */
|
||||||
|
@ -147,7 +147,7 @@ public:
|
||||||
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)
|
||||||
|
@ -157,7 +157,8 @@ public:
|
||||||
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: */
|
|
||||||
|
// Color options for screen display of the Printed Board:
|
||||||
int m_PcbGridColor; // Grid color
|
int m_PcbGridColor; // Grid color
|
||||||
int m_LayerColor[32]; // Layer colors (tracks and graphic items)
|
int m_LayerColor[32]; // Layer colors (tracks and graphic items)
|
||||||
int m_ViaColor[4]; // Via color (depending on is type)
|
int m_ViaColor[4]; // Via color (depending on is type)
|
||||||
|
@ -168,6 +169,7 @@ public:
|
||||||
int m_PadCUColor; // Pad color for the COMPONENT side of the pad
|
int m_PadCUColor; // Pad color for the COMPONENT side of the pad
|
||||||
int m_PadCMPColor; // Pad color for the COPPER 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)
|
// Pad color for the pads of both sides is m_PadCUColor OR m_PadCMPColor (in terms of colors)
|
||||||
|
|
||||||
int m_RatsnestColor; // Ratsnest color
|
int m_RatsnestColor; // Ratsnest color
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -180,6 +182,7 @@ enum DisplayViaMode {
|
||||||
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
|
||||||
|
@ -187,7 +190,7 @@ 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)
|
||||||
|
@ -210,7 +213,7 @@ class BOARD: public EDA_BaseStruct
|
||||||
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 );
|
||||||
|
@ -308,7 +311,8 @@ public:
|
||||||
/************************************/
|
/************************************/
|
||||||
|
|
||||||
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) */
|
||||||
|
@ -337,8 +341,8 @@ public:
|
||||||
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;
|
||||||
|
@ -353,5 +357,4 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* PCBSTRUCT_H */
|
#endif /* PCBSTRUCT_H */
|
||||||
|
|
|
@ -97,8 +97,7 @@ class PARAM_CFG_BASE;
|
||||||
class Ki_PageDescr;
|
class Ki_PageDescr;
|
||||||
|
|
||||||
|
|
||||||
enum id_librarytype
|
enum id_librarytype {
|
||||||
{
|
|
||||||
LIBRARY_TYPE_EESCHEMA,
|
LIBRARY_TYPE_EESCHEMA,
|
||||||
LIBRARY_TYPE_PCBNEW,
|
LIBRARY_TYPE_PCBNEW,
|
||||||
LIBRARY_TYPE_DOC
|
LIBRARY_TYPE_DOC
|
||||||
|
@ -126,6 +125,7 @@ enum id_toolbar {
|
||||||
TOOLBAR_AUX
|
TOOLBAR_AUX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**********************/
|
/**********************/
|
||||||
/* Classes pour WXWIN */
|
/* Classes pour WXWIN */
|
||||||
/**********************/
|
/**********************/
|
||||||
|
@ -158,6 +158,7 @@ public:
|
||||||
// It is "SchematicFrame", "PcbFrame" ....
|
// It is "SchematicFrame", "PcbFrame" ....
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructor and destructor
|
// Constructor and destructor
|
||||||
WinEDA_BasicFrame( wxWindow* father, int idtype, WinEDA_App* parent,
|
WinEDA_BasicFrame( wxWindow* father, int idtype, WinEDA_App* parent,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
|
@ -166,8 +167,8 @@ public:
|
||||||
WinEDA_BasicFrame( const WinEDA_BasicFrame& ) { } // Should throw!!
|
WinEDA_BasicFrame( const WinEDA_BasicFrame& ) { } // Should throw!!
|
||||||
WinEDA_BasicFrame() { } // Should throw!!
|
WinEDA_BasicFrame() { } // Should throw!!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
~WinEDA_BasicFrame( void );
|
~WinEDA_BasicFrame( void );
|
||||||
|
|
||||||
void GetKicadHelp( wxCommandEvent& event );
|
void GetKicadHelp( wxCommandEvent& event );
|
||||||
void GetKicadAbout( wxCommandEvent& event );
|
void GetKicadAbout( wxCommandEvent& event );
|
||||||
void PrintMsg( const wxString& text );
|
void PrintMsg( const wxString& text );
|
||||||
|
@ -209,6 +210,7 @@ public:
|
||||||
|
|
||||||
int m_InternalUnits; // nombre d'unites internes pour 1 pouce
|
int m_InternalUnits; // nombre d'unites internes pour 1 pouce
|
||||||
// = 1000 pour schema, = 10000 pour PCB
|
// = 1000 pour schema, = 10000 pour PCB
|
||||||
|
|
||||||
int m_UnitType; // Internal Unit type (0 = inch)
|
int m_UnitType; // Internal Unit type (0 = inch)
|
||||||
bool m_Draw_Axis; // TRUE pour avoir les axes dessines
|
bool m_Draw_Axis; // TRUE pour avoir les axes dessines
|
||||||
bool m_Draw_Grid; // TRUE pour avoir la grille dessinee
|
bool m_Draw_Grid; // TRUE pour avoir la grille dessinee
|
||||||
|
@ -217,16 +219,18 @@ public:
|
||||||
bool m_Print_Sheet_Ref; // TRUE pour avoir le cartouche imprim<69>
|
bool m_Print_Sheet_Ref; // TRUE pour avoir le cartouche imprim<69>
|
||||||
bool m_Draw_Auxiliary_Axis; // TRUE pour avoir les axes auxiliaires dessines
|
bool m_Draw_Auxiliary_Axis; // TRUE pour avoir les axes auxiliaires dessines
|
||||||
wxPoint m_Auxiliary_Axis_Position; /* origine de l'axe auxiliaire (app:
|
wxPoint m_Auxiliary_Axis_Position; /* origine de l'axe auxiliaire (app:
|
||||||
dans la generation les fichiers de positionnement
|
* dans la generation les fichiers de positionnement
|
||||||
des composants) */
|
* des composants) */
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructor and destructor
|
// Constructor and destructor
|
||||||
WinEDA_DrawFrame( wxWindow* father, int idtype, WinEDA_App* parent,
|
WinEDA_DrawFrame( wxWindow* father, int idtype, WinEDA_App* parent,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos, const wxSize& size );
|
const wxPoint& pos, const wxSize& size );
|
||||||
|
|
||||||
~WinEDA_DrawFrame( void );
|
~WinEDA_DrawFrame( void );
|
||||||
|
|
||||||
BASE_SCREEN* GetScreen( void ) { return m_CurrentScreen; }
|
BASE_SCREEN* GetScreen( void ) { return m_CurrentScreen; }
|
||||||
|
|
||||||
void OnMenuOpen( wxMenuEvent& event );
|
void OnMenuOpen( wxMenuEvent& event );
|
||||||
|
@ -253,6 +257,7 @@ public:
|
||||||
virtual void GeneralControle( wxDC* DC, wxPoint Mouse );
|
virtual void GeneralControle( wxDC* DC, wxPoint Mouse );
|
||||||
virtual void OnSize( wxSizeEvent& event );
|
virtual void OnSize( wxSizeEvent& event );
|
||||||
void OnEraseBackground( wxEraseEvent& SizeEvent );
|
void OnEraseBackground( wxEraseEvent& SizeEvent );
|
||||||
|
|
||||||
// void OnChar(wxKeyEvent& event);
|
// void OnChar(wxKeyEvent& event);
|
||||||
void SetToolbarBgColor( int color_num );
|
void SetToolbarBgColor( int color_num );
|
||||||
void OnZoom( int zoom_type );
|
void OnZoom( int zoom_type );
|
||||||
|
@ -260,14 +265,16 @@ public:
|
||||||
void OnGrid( int grid_type );
|
void OnGrid( int grid_type );
|
||||||
void Recadre_Trace( bool ToMouse );
|
void Recadre_Trace( bool ToMouse );
|
||||||
void PutOnGrid( wxPoint* coord );/* corrige la valeur de la coordonnee coord
|
void PutOnGrid( wxPoint* coord );/* corrige la valeur de la coordonnee coord
|
||||||
pour etre sur le point de grille le plus proche */
|
* pour etre sur le point de grille le plus proche */
|
||||||
void Zoom_Automatique( bool move_mouse_cursor );
|
void Zoom_Automatique( bool move_mouse_cursor );
|
||||||
|
|
||||||
/* Affiche le schema au meilleur zoom au meilleur centrage pour le dessin
|
/* Affiche le schema au meilleur zoom au meilleur centrage pour le dessin
|
||||||
de facon a avoir tout le circuit affiche a l'ecran */
|
* de facon a avoir tout le circuit affiche a l'ecran */
|
||||||
|
|
||||||
void Window_Zoom( EDA_Rect& Rect );
|
void Window_Zoom( EDA_Rect& Rect );
|
||||||
|
|
||||||
/* Recalcule le zoom et les offsets pour que l'affichage se fasse dans la
|
/* Recalcule le zoom et les offsets pour que l'affichage se fasse dans la
|
||||||
fenetre de coord x0, y0 a x1, y1 */
|
* fenetre de coord x0, y0 a x1, y1 */
|
||||||
virtual int BestZoom( void ) = 0; // Retourne le meilleur zoom
|
virtual int BestZoom( void ) = 0; // Retourne le meilleur zoom
|
||||||
|
|
||||||
void ToPrinter( wxCommandEvent& event );
|
void ToPrinter( wxCommandEvent& event );
|
||||||
|
@ -309,7 +316,6 @@ public:
|
||||||
EVT_ACTIVATE( WinEDA_DrawFrame::OnActivate )
|
EVT_ACTIVATE( WinEDA_DrawFrame::OnActivate )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************/
|
/**************************************************************/
|
||||||
/* class WinEDA_BasePcbFrame: classe de base commune */
|
/* class WinEDA_BasePcbFrame: classe de base commune */
|
||||||
/* aux classes d'affichage de PCB, et de l'editeur de Modules */
|
/* aux classes d'affichage de PCB, et de l'editeur de Modules */
|
||||||
|
@ -357,27 +363,31 @@ public:
|
||||||
public:
|
public:
|
||||||
virtual void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy,
|
virtual void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy,
|
||||||
int flag_type_command = 0 );
|
int flag_type_command = 0 );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void GetComponentFromUndoList( void );
|
virtual void GetComponentFromUndoList( void );
|
||||||
virtual void GetComponentFromRedoList( void );
|
virtual void GetComponentFromRedoList( void );
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Read/write fonctions:
|
// Read/write fonctions:
|
||||||
EDA_BaseStruct* ReadDrawSegmentDescr( FILE* File, int* LineNum );
|
EDA_BaseStruct* ReadDrawSegmentDescr( FILE* File, int* LineNum );
|
||||||
int ReadListeSegmentDescr( wxDC* DC, FILE* File,
|
int ReadListeSegmentDescr( wxDC* DC, FILE* File,
|
||||||
TRACK* PtSegm, int StructType,
|
TRACK* PtSegm, int StructType,
|
||||||
int* LineNum, int NumSegm );
|
int* LineNum, int NumSegm );
|
||||||
|
|
||||||
int ReadSetup( FILE* File, int* LineNum );
|
int ReadSetup( FILE* File, int* LineNum );
|
||||||
int ReadGeneralDescrPcb( wxDC* DC, FILE* File, int* LineNum );
|
int ReadGeneralDescrPcb( wxDC* DC, FILE* File, int* LineNum );
|
||||||
|
|
||||||
// Gestion du PCB
|
// Gestion du PCB
|
||||||
bool Clear_Pcb( wxDC* DC, bool query );
|
bool Clear_Pcb( wxDC* DC, bool query );
|
||||||
EDA_BaseStruct * PcbGeneralLocateAndDisplay(void);
|
EDA_BaseStruct* PcbGeneralLocateAndDisplay();
|
||||||
EDA_BaseStruct* Locate( int typeloc, int LayerSearch );
|
EDA_BaseStruct* Locate( int typeloc, int LayerSearch );
|
||||||
|
|
||||||
// Gestion du curseur
|
// Gestion du curseur
|
||||||
void place_marqueur( wxDC* DC, const wxPoint& pos, char* pt_bitmap,
|
void place_marqueur( wxDC* DC, const wxPoint& pos, char* pt_bitmap,
|
||||||
int DrawMode, int color, int type );
|
int DrawMode, int color, int type );
|
||||||
|
|
||||||
/* Place un repere sur l'ecran au point de coordonnees PCB pos */
|
/* Place un repere sur l'ecran au point de coordonnees PCB pos */
|
||||||
|
|
||||||
|
|
||||||
|
@ -441,7 +451,7 @@ public:
|
||||||
void DrawGeneralRatsnest( wxDC* DC, int net_code = 0 );
|
void DrawGeneralRatsnest( wxDC* DC, int net_code = 0 );
|
||||||
void trace_ratsnest_pad( wxDC* DC );
|
void trace_ratsnest_pad( wxDC* DC );
|
||||||
void recalcule_pad_net_code( void );/* Routine de
|
void recalcule_pad_net_code( void );/* Routine de
|
||||||
calcul et de mise a jour des net_codes des PADS */
|
* calcul et de mise a jour des net_codes des PADS */
|
||||||
void build_liste_pads( void );
|
void build_liste_pads( void );
|
||||||
int* build_ratsnest_pad( EDA_BaseStruct* ref, const wxPoint& refpos, bool init );
|
int* build_ratsnest_pad( EDA_BaseStruct* ref, const wxPoint& refpos, bool init );
|
||||||
|
|
||||||
|
@ -487,7 +497,6 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************/
|
/*****************************************************/
|
||||||
/* class WinEDA_PcbFrame: public WinEDA_BasePcbFrame */
|
/* class WinEDA_PcbFrame: public WinEDA_BasePcbFrame */
|
||||||
/*****************************************************/
|
/*****************************************************/
|
||||||
|
@ -702,6 +711,7 @@ public:
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/****************************************************/
|
/****************************************************/
|
||||||
/* class WinEDA_GerberFrame: public WinEDA_PcbFrame */
|
/* class WinEDA_GerberFrame: public WinEDA_PcbFrame */
|
||||||
/****************************************************/
|
/****************************************************/
|
||||||
|
@ -749,7 +759,6 @@ public:
|
||||||
virtual void HandleBlockPlace( wxDC* DC );
|
virtual void HandleBlockPlace( wxDC* DC );
|
||||||
virtual int HandleBlockEnd( wxDC* DC );
|
virtual int HandleBlockEnd( wxDC* DC );
|
||||||
|
|
||||||
|
|
||||||
void InstallDrillFrame( wxCommandEvent& event );
|
void InstallDrillFrame( wxCommandEvent& event );
|
||||||
void ToPostProcess( wxCommandEvent& event );
|
void ToPostProcess( wxCommandEvent& event );
|
||||||
void Genere_HPGL( const wxString& FullFileName, int Layers );
|
void Genere_HPGL( const wxString& FullFileName, int Layers );
|
||||||
|
@ -802,7 +811,6 @@ public:
|
||||||
// Conversion function
|
// Conversion function
|
||||||
void ExportDataInPcbnewFormat( wxCommandEvent& event );
|
void ExportDataInPcbnewFormat( wxCommandEvent& event );
|
||||||
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -852,11 +860,13 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, int flag_type_command = 0 );
|
void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, int flag_type_command = 0 );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetComponentFromUndoList( void );
|
void GetComponentFromUndoList( void );
|
||||||
void GetComponentFromRedoList( void );
|
void GetComponentFromRedoList( void );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Gestion des modules
|
// Gestion des modules
|
||||||
void Place_Ancre( MODULE* module, wxDC* DC );
|
void Place_Ancre( MODULE* module, wxDC* DC );
|
||||||
void RemoveStruct( EDA_BaseStruct* Item, wxDC* DC );
|
void RemoveStruct( EDA_BaseStruct* Item, wxDC* DC );
|
||||||
|
@ -891,8 +901,7 @@ public:
|
||||||
/*******************************/
|
/*******************************/
|
||||||
|
|
||||||
/* enum utilis<69> dans RotationMiroir() */
|
/* enum utilis<69> dans RotationMiroir() */
|
||||||
enum fl_rot_cmp
|
enum fl_rot_cmp {
|
||||||
{
|
|
||||||
CMP_NORMAL, // orientation normale (O, pas de miroir)
|
CMP_NORMAL, // orientation normale (O, pas de miroir)
|
||||||
CMP_ROTATE_CLOCKWISE, // nouvelle rotation de -90
|
CMP_ROTATE_CLOCKWISE, // nouvelle rotation de -90
|
||||||
CMP_ROTATE_COUNTERCLOCKWISE, // nouvelle rotation de +90
|
CMP_ROTATE_COUNTERCLOCKWISE, // nouvelle rotation de +90
|
||||||
|
@ -902,6 +911,7 @@ enum fl_rot_cmp
|
||||||
CMP_ORIENT_270, // orientation -90, pas de miroir
|
CMP_ORIENT_270, // orientation -90, pas de miroir
|
||||||
CMP_MIROIR_X = 0x100, // miroir selon axe X
|
CMP_MIROIR_X = 0x100, // miroir selon axe X
|
||||||
CMP_MIROIR_Y = 0x200 // miroir selon axe Y
|
CMP_MIROIR_Y = 0x200 // miroir selon axe Y
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class WinEDA_SchematicFrame : public WinEDA_DrawFrame
|
class WinEDA_SchematicFrame : public WinEDA_DrawFrame
|
||||||
|
@ -930,6 +940,7 @@ public:
|
||||||
void ReCreateOptToolbar( void );
|
void ReCreateOptToolbar( void );
|
||||||
void ReCreateMenuBar( void );
|
void ReCreateMenuBar( void );
|
||||||
void SetToolbars( void );
|
void SetToolbars( void );
|
||||||
|
|
||||||
SCH_SCREEN* GetScreen( void ) { return (SCH_SCREEN*) m_CurrentScreen; }
|
SCH_SCREEN* GetScreen( void ) { return (SCH_SCREEN*) m_CurrentScreen; }
|
||||||
|
|
||||||
void InstallConfigFrame( const wxPoint& pos );
|
void InstallConfigFrame( const wxPoint& pos );
|
||||||
|
@ -942,7 +953,8 @@ public:
|
||||||
int BestZoom( void ); // Retourne le meilleur zoom
|
int BestZoom( void ); // Retourne le meilleur zoom
|
||||||
|
|
||||||
EDA_BaseStruct* SchematicGeneralLocateAndDisplay( bool IncludePin = TRUE );
|
EDA_BaseStruct* SchematicGeneralLocateAndDisplay( bool IncludePin = TRUE );
|
||||||
EDA_BaseStruct * SchematicGeneralLocateAndDisplay(const wxPoint & refpoint, bool IncludePin);
|
EDA_BaseStruct* SchematicGeneralLocateAndDisplay( const wxPoint& refpoint,
|
||||||
|
bool IncludePin );
|
||||||
|
|
||||||
/* netlist generation */
|
/* netlist generation */
|
||||||
void* BuildNetListBase( void );
|
void* BuildNetListBase( void );
|
||||||
|
@ -970,7 +982,9 @@ private:
|
||||||
|
|
||||||
// Bus Entry
|
// Bus Entry
|
||||||
DrawBusEntryStruct* CreateBusEntry( wxDC* DC, int entry_type );
|
DrawBusEntryStruct* CreateBusEntry( wxDC* DC, int entry_type );
|
||||||
void SetBusEntryShape(wxDC * DC, DrawBusEntryStruct *BusEntry, int entry_type);
|
void SetBusEntryShape( wxDC* DC,
|
||||||
|
DrawBusEntryStruct* BusEntry,
|
||||||
|
int entry_type );
|
||||||
int GetBusEntryShape( DrawBusEntryStruct* BusEntry );
|
int GetBusEntryShape( DrawBusEntryStruct* BusEntry );
|
||||||
void StartMoveBusEntry( DrawBusEntryStruct* DrawLibItem, wxDC* DC );
|
void StartMoveBusEntry( DrawBusEntryStruct* DrawLibItem, wxDC* DC );
|
||||||
|
|
||||||
|
@ -979,7 +993,8 @@ private:
|
||||||
|
|
||||||
// Junction
|
// Junction
|
||||||
DrawJunctionStruct* CreateNewJunctionStruct( wxDC* DC,
|
DrawJunctionStruct* CreateNewJunctionStruct( wxDC* DC,
|
||||||
const wxPoint & pos, bool PutInUndoList = FALSE);
|
const wxPoint& pos,
|
||||||
|
bool PutInUndoList = FALSE );
|
||||||
|
|
||||||
// Text ,label, glabel
|
// Text ,label, glabel
|
||||||
EDA_BaseStruct* CreateNewText( wxDC* DC, int type );
|
EDA_BaseStruct* CreateNewText( wxDC* DC, int type );
|
||||||
|
@ -1004,8 +1019,10 @@ private:
|
||||||
void InstallHierarchyFrame( wxDC* DC, wxPoint& pos );
|
void InstallHierarchyFrame( wxDC* DC, wxPoint& pos );
|
||||||
DrawSheetStruct* CreateSheet( wxDC* DC );
|
DrawSheetStruct* CreateSheet( wxDC* DC );
|
||||||
void ReSizeSheet( DrawSheetStruct* Sheet, wxDC* DC );
|
void ReSizeSheet( DrawSheetStruct* Sheet, wxDC* DC );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool EditSheet( DrawSheetStruct* Sheet, wxDC* DC );
|
bool EditSheet( DrawSheetStruct* Sheet, wxDC* DC );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void StartMoveSheet( DrawSheetStruct* sheet, wxDC* DC );
|
void StartMoveSheet( DrawSheetStruct* sheet, wxDC* DC );
|
||||||
DrawSheetLabelStruct* Create_PinSheet( DrawSheetStruct* Sheet, wxDC* DC );
|
DrawSheetLabelStruct* Create_PinSheet( DrawSheetStruct* Sheet, wxDC* DC );
|
||||||
|
@ -1013,17 +1030,23 @@ private:
|
||||||
void StartMove_PinSheet( DrawSheetLabelStruct* SheetLabel, wxDC* DC );
|
void StartMove_PinSheet( DrawSheetLabelStruct* SheetLabel, wxDC* DC );
|
||||||
void Place_PinSheet( DrawSheetLabelStruct* SheetLabel, wxDC* DC );
|
void Place_PinSheet( DrawSheetLabelStruct* SheetLabel, wxDC* DC );
|
||||||
DrawSheetLabelStruct* Import_PinSheet( DrawSheetStruct* Sheet, wxDC* DC );
|
DrawSheetLabelStruct* Import_PinSheet( DrawSheetStruct* Sheet, wxDC* DC );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void DeleteSheetLabel( wxDC* DC, DrawSheetLabelStruct* SheetLabelToDel );
|
void DeleteSheetLabel( wxDC* DC, DrawSheetLabelStruct* SheetLabelToDel );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Component
|
// Component
|
||||||
EDA_SchComponentStruct* Load_Component( wxDC* DC,
|
EDA_SchComponentStruct* Load_Component( wxDC* DC,
|
||||||
const wxString & libname, wxArrayString & List, bool UseLibBrowser );
|
const wxString& libname,
|
||||||
|
wxArrayString& List,
|
||||||
|
bool UseLibBrowser );
|
||||||
void StartMovePart( EDA_SchComponentStruct* DrawLibItem, wxDC* DC );
|
void StartMovePart( EDA_SchComponentStruct* DrawLibItem, wxDC* DC );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void CmpRotationMiroir(
|
void CmpRotationMiroir(
|
||||||
EDA_SchComponentStruct* DrawComponent, wxDC* DC, int type_rotate );
|
EDA_SchComponentStruct* DrawComponent, wxDC* DC, int type_rotate );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SelPartUnit( EDA_SchComponentStruct* DrawComponent, int unit, wxDC* DC );
|
void SelPartUnit( EDA_SchComponentStruct* DrawComponent, int unit, wxDC* DC );
|
||||||
void ConvertPart( EDA_SchComponentStruct* DrawComponent, wxDC* DC );
|
void ConvertPart( EDA_SchComponentStruct* DrawComponent, wxDC* DC );
|
||||||
|
@ -1036,9 +1059,12 @@ private:
|
||||||
|
|
||||||
/* Operations sur bloc */
|
/* Operations sur bloc */
|
||||||
void PasteStruct( wxDC* DC );
|
void PasteStruct( wxDC* DC );
|
||||||
|
|
||||||
/* Undo - redo */
|
/* Undo - redo */
|
||||||
public:
|
public:
|
||||||
void SaveCopyInUndoList(EDA_BaseStruct * ItemToCopy, int flag_type_command = 0);
|
void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy,
|
||||||
|
int flag_type_command = 0 );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void PutDataInPreviousState( DrawPickedStruct* List );
|
void PutDataInPreviousState( DrawPickedStruct* List );
|
||||||
void GetSchematicFromRedoList( void );
|
void GetSchematicFromRedoList( void );
|
||||||
|
@ -1066,7 +1092,6 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************/
|
/*****************************/
|
||||||
/* class WinEDA_LibeditFrame */
|
/* class WinEDA_LibeditFrame */
|
||||||
/*****************************/
|
/*****************************/
|
||||||
|
@ -1095,10 +1120,12 @@ public:
|
||||||
int BestZoom( void ); // Retourne le meilleur zoom
|
int BestZoom( void ); // Retourne le meilleur zoom
|
||||||
void SetToolbars( void );
|
void SetToolbars( void );
|
||||||
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
|
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
|
||||||
|
|
||||||
SCH_SCREEN* GetScreen( void ) { return (SCH_SCREEN*) m_CurrentScreen; }
|
SCH_SCREEN* GetScreen( void ) { return (SCH_SCREEN*) m_CurrentScreen; }
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// General:
|
// General:
|
||||||
void CreateNewLibraryPart( void );
|
void CreateNewLibraryPart( void );
|
||||||
void DeleteOnePart( void );
|
void DeleteOnePart( void );
|
||||||
|
@ -1117,6 +1144,7 @@ private:
|
||||||
// General editing
|
// General editing
|
||||||
public:
|
public:
|
||||||
void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, int flag_type_command = 0 );
|
void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, int flag_type_command = 0 );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void GetComponentFromUndoList( void );
|
void GetComponentFromUndoList( void );
|
||||||
void GetComponentFromRedoList( void );
|
void GetComponentFromRedoList( void );
|
||||||
|
@ -1161,6 +1189,7 @@ public:
|
||||||
void PlacePin( wxDC* DC );
|
void PlacePin( wxDC* DC );
|
||||||
void InitEditOnePin( void );
|
void InitEditOnePin( void );
|
||||||
void GlobalSetPins( wxDC* DC, LibDrawPin* MasterPin, int id );
|
void GlobalSetPins( wxDC* DC, LibDrawPin* MasterPin, int id );
|
||||||
|
|
||||||
// Repetition automatique de placement de pins
|
// Repetition automatique de placement de pins
|
||||||
void RepeatPinItem( wxDC* DC, LibDrawPin* Pin );
|
void RepeatPinItem( wxDC* DC, LibDrawPin* Pin );
|
||||||
|
|
||||||
|
@ -1168,7 +1197,6 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class LibraryStruct;
|
class LibraryStruct;
|
||||||
class WinEDA_ViewlibFrame : public WinEDA_DrawFrame
|
class WinEDA_ViewlibFrame : public WinEDA_DrawFrame
|
||||||
{
|
{
|
||||||
|
@ -1177,10 +1205,8 @@ public:
|
||||||
|
|
||||||
wxListBox* m_LibList;
|
wxListBox* m_LibList;
|
||||||
wxSize m_LibListSize;
|
wxSize m_LibListSize;
|
||||||
|
|
||||||
wxListBox* m_CmpList;
|
wxListBox* m_CmpList;
|
||||||
wxSize m_CmpListSize;
|
wxSize m_CmpListSize;
|
||||||
|
|
||||||
wxSemaphore* m_Semaphore; // != NULL if the frame must emulate a modal dialog
|
wxSemaphore* m_Semaphore; // != NULL if the frame must emulate a modal dialog
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -1203,6 +1229,7 @@ public:
|
||||||
int BestZoom( void ); // Retourne le meilleur zoom
|
int BestZoom( void ); // Retourne le meilleur zoom
|
||||||
void ClickOnLibList( wxCommandEvent& event );
|
void ClickOnLibList( wxCommandEvent& event );
|
||||||
void ClickOnCmpList( wxCommandEvent& event );
|
void ClickOnCmpList( wxCommandEvent& event );
|
||||||
|
|
||||||
SCH_SCREEN* GetScreen( void ) { return (SCH_SCREEN*) m_CurrentScreen; }
|
SCH_SCREEN* GetScreen( void ) { return (SCH_SCREEN*) m_CurrentScreen; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -1216,7 +1243,6 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************************/
|
/****************************************************/
|
||||||
/* classe representant un ecran graphique de dessin */
|
/* classe representant un ecran graphique de dessin */
|
||||||
/****************************************************/
|
/****************************************************/
|
||||||
|
@ -1224,8 +1250,6 @@ private:
|
||||||
#include "drawpanel_wxstruct.h"
|
#include "drawpanel_wxstruct.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
/* classe representant un ecran d'affichage des messages */
|
/* classe representant un ecran d'affichage des messages */
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
|
@ -1237,6 +1261,7 @@ public:
|
||||||
int m_BgColor; // couleur de fond
|
int m_BgColor; // couleur de fond
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructor and destructor
|
// Constructor and destructor
|
||||||
WinEDA_MsgPanel( WinEDA_DrawFrame* parent, int id, const wxPoint& pos, const wxSize& size );
|
WinEDA_MsgPanel( WinEDA_DrawFrame* parent, int id, const wxPoint& pos, const wxSize& size );
|
||||||
~WinEDA_MsgPanel( void );
|
~WinEDA_MsgPanel( void );
|
||||||
|
@ -1266,6 +1291,7 @@ private:
|
||||||
wxStaticText* m_Title;
|
wxStaticText* m_Title;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructor and destructor
|
// Constructor and destructor
|
||||||
WinEDA_EnterText( wxWindow* parent, const wxString& Title,
|
WinEDA_EnterText( wxWindow* parent, const wxString& Title,
|
||||||
const wxString& TextToEdit, wxBoxSizer* BoxSizer,
|
const wxString& TextToEdit, wxBoxSizer* BoxSizer,
|
||||||
|
@ -1275,14 +1301,18 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString GetValue( void );
|
wxString GetValue( void );
|
||||||
void GetValue( char* buffer, int lenmax );
|
void GetValue( char* buffer, int lenmax );
|
||||||
void SetValue( const wxString& new_text );
|
void SetValue( const wxString& new_text );
|
||||||
void Enable( bool enbl );
|
void Enable( bool enbl );
|
||||||
|
|
||||||
void SetFocus( void ) { m_FrameText->SetFocus(); }
|
void SetFocus( void ) { m_FrameText->SetFocus(); }
|
||||||
void SetInsertionPoint( int n ) { m_FrameText->SetInsertionPoint( n ); }
|
void SetInsertionPoint( int n ) { m_FrameText->SetInsertionPoint( n ); }
|
||||||
void SetSelection(int n, int m) {
|
void SetSelection( int n, int m )
|
||||||
m_FrameText->SetSelection(n, m); }
|
{
|
||||||
|
m_FrameText->SetSelection( n, m );
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
|
@ -1299,6 +1329,7 @@ private:
|
||||||
wxStaticText* m_Title;
|
wxStaticText* m_Title;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructor and destructor
|
// Constructor and destructor
|
||||||
WinEDA_GraphicTextCtrl( wxWindow* parent, const wxString& Title,
|
WinEDA_GraphicTextCtrl( wxWindow* parent, const wxString& Title,
|
||||||
const wxString& TextToEdit, int textsize,
|
const wxString& TextToEdit, int textsize,
|
||||||
|
@ -1311,6 +1342,7 @@ public:
|
||||||
int GetTextSize( void );
|
int GetTextSize( void );
|
||||||
void Enable( bool state );
|
void Enable( bool state );
|
||||||
void SetTitle( const wxString& title );
|
void SetTitle( const wxString& title );
|
||||||
|
|
||||||
void SetFocus( void ) { m_FrameText->SetFocus(); }
|
void SetFocus( void ) { m_FrameText->SetFocus(); }
|
||||||
void SetValue( const wxString& value );
|
void SetValue( const wxString& value );
|
||||||
void SetValue( int value );
|
void SetValue( int value );
|
||||||
|
@ -1332,6 +1364,7 @@ private:
|
||||||
wxStaticText* m_TextX, * m_TextY;
|
wxStaticText* m_TextX, * m_TextY;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructor and destructor
|
// Constructor and destructor
|
||||||
WinEDA_PositionCtrl( wxWindow* parent, const wxString& title,
|
WinEDA_PositionCtrl( wxWindow* parent, const wxString& title,
|
||||||
const wxPoint& pos_to_edit,
|
const wxPoint& pos_to_edit,
|
||||||
|
@ -1351,6 +1384,7 @@ public:
|
||||||
class WinEDA_SizeCtrl : public WinEDA_PositionCtrl
|
class WinEDA_SizeCtrl : public WinEDA_PositionCtrl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructor and destructor
|
// Constructor and destructor
|
||||||
WinEDA_SizeCtrl( wxWindow* parent, const wxString& title,
|
WinEDA_SizeCtrl( wxWindow* parent, const wxString& title,
|
||||||
const wxSize& size_to_edit,
|
const wxSize& size_to_edit,
|
||||||
|
@ -1365,9 +1399,10 @@ public:
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
/* Classe pour afficher et editer une valeur en INCHES ou MM */
|
/* Classe pour afficher et editer une valeur en INCHES ou MM */
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
|
|
||||||
/* internal_unit est le nombre d'unites internes par inch
|
/* internal_unit est le nombre d'unites internes par inch
|
||||||
- 1000 sur EESchema
|
* - 1000 sur EESchema
|
||||||
- 10000 sur PcbNew
|
* - 10000 sur PcbNew
|
||||||
*/
|
*/
|
||||||
class WinEDA_ValueCtrl
|
class WinEDA_ValueCtrl
|
||||||
{
|
{
|
||||||
|
@ -1380,6 +1415,7 @@ private:
|
||||||
wxStaticText* m_Text;
|
wxStaticText* m_Text;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructor and destructor
|
// Constructor and destructor
|
||||||
WinEDA_ValueCtrl( wxWindow* parent, const wxString& title, int value,
|
WinEDA_ValueCtrl( wxWindow* parent, const wxString& title, int value,
|
||||||
int units, wxBoxSizer* BoxSizer,
|
int units, wxBoxSizer* BoxSizer,
|
||||||
|
@ -1390,6 +1426,7 @@ public:
|
||||||
int GetValue( void );
|
int GetValue( void );
|
||||||
void SetValue( int new_value );
|
void SetValue( int new_value );
|
||||||
void Enable( bool enbl );
|
void Enable( bool enbl );
|
||||||
|
|
||||||
void SetToolTip( const wxString& text )
|
void SetToolTip( const wxString& text )
|
||||||
{
|
{
|
||||||
m_ValueCtrl->SetToolTip( text );
|
m_ValueCtrl->SetToolTip( text );
|
||||||
|
@ -1408,6 +1445,7 @@ private:
|
||||||
wxStaticText* m_Text;
|
wxStaticText* m_Text;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Constructor and destructor
|
// Constructor and destructor
|
||||||
WinEDA_DFloatValueCtrl( wxWindow* parent, const wxString& title,
|
WinEDA_DFloatValueCtrl( wxWindow* parent, const wxString& title,
|
||||||
double value, wxBoxSizer* BoxSizer );
|
double value, wxBoxSizer* BoxSizer );
|
||||||
|
@ -1417,6 +1455,7 @@ public:
|
||||||
double GetValue( void );
|
double GetValue( void );
|
||||||
void SetValue( double new_value );
|
void SetValue( double new_value );
|
||||||
void Enable( bool enbl );
|
void Enable( bool enbl );
|
||||||
|
|
||||||
void SetToolTip( const wxString& text )
|
void SetToolTip( const wxString& text )
|
||||||
{
|
{
|
||||||
m_ValueCtrl->SetToolTip( text );
|
m_ValueCtrl->SetToolTip( text );
|
||||||
|
@ -1481,6 +1520,7 @@ private:
|
||||||
void ClickOnList( wxCommandEvent& event );
|
void ClickOnList( wxCommandEvent& event );
|
||||||
void D_ClickOnList( wxCommandEvent& event );
|
void D_ClickOnList( wxCommandEvent& event );
|
||||||
void OnKeyEvent( wxKeyEvent& event );
|
void OnKeyEvent( wxKeyEvent& event );
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1488,11 +1528,12 @@ private:
|
||||||
/*************************/
|
/*************************/
|
||||||
/* class WinEDAChoiceBox */
|
/* class WinEDAChoiceBox */
|
||||||
/*************************/
|
/*************************/
|
||||||
|
|
||||||
/* class to display a choice list.
|
/* class to display a choice list.
|
||||||
This is a wrapper to wxComboBox (or wxChoice)
|
* This is a wrapper to wxComboBox (or wxChoice)
|
||||||
but because they have some problems, WinEDAChoiceBox uses workarounds:
|
* but because they have some problems, WinEDAChoiceBox uses workarounds:
|
||||||
- in wxGTK 2.6.2 wxGetSelection() does not work properly,
|
* - in wxGTK 2.6.2 wxGetSelection() does not work properly,
|
||||||
- and wxChoice crashes if compiled in non unicode mode and uses utf8 codes
|
* - and wxChoice crashes if compiled in non unicode mode and uses utf8 codes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define EVT_KICAD_CHOICEBOX EVT_COMBOBOX
|
#define EVT_KICAD_CHOICEBOX EVT_COMBOBOX
|
||||||
|
@ -1508,6 +1549,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
WinEDAChoiceBox( wxWindow* parent, wxWindowID id,
|
WinEDAChoiceBox( wxWindow* parent, wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
const wxArrayString& choices ) :
|
const wxArrayString& choices ) :
|
||||||
|
@ -1516,10 +1558,11 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetChoice(void){
|
|
||||||
|
int GetChoice( void )
|
||||||
|
{
|
||||||
return GetCurrentSelection();
|
return GetCurrentSelection();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* WXSTRUCT_H */
|
#endif /* WXSTRUCT_H */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue