beautification
This commit is contained in:
parent
803ecc3bbf
commit
7fe80baf55
|
@ -10,6 +10,7 @@
|
|||
enum DrawStructureType {
|
||||
TYPE_NOT_INIT = 0,
|
||||
TYPEPCB,
|
||||
|
||||
// Items in pcb
|
||||
PCB_EQUIPOT_STRUCT_TYPE,
|
||||
TYPEMODULE,
|
||||
|
@ -27,6 +28,7 @@ enum DrawStructureType {
|
|||
TYPESCREEN,
|
||||
TYPEBLOCK,
|
||||
TYPEEDGEZONE,
|
||||
|
||||
// Draw Items in schematic
|
||||
DRAW_POLYLINE_STRUCT_TYPE,
|
||||
DRAW_JUNCTION_STRUCT_TYPE,
|
||||
|
@ -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,
|
||||
|
@ -55,6 +59,7 @@ enum DrawStructureType {
|
|||
COMPONENT_LINE_DRAW_TYPE,
|
||||
COMPONENT_PIN_DRAW_TYPE,
|
||||
COMPONENT_FIELD_DRAW_TYPE,
|
||||
|
||||
// End value
|
||||
MAX_STRUCT_TYPE_ID
|
||||
};
|
||||
|
@ -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 chainée */
|
||||
|
||||
/* 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);
|
||||
|
||||
virtual void Draw( WinEDA_DrawPanel* panel,
|
||||
wxDC* DC,
|
||||
const wxPoint& offset,
|
||||
int draw_mode,
|
||||
int Color = -1 );
|
||||
};
|
||||
|
||||
// Text justify:
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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; }
|
||||
|
@ -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 );
|
||||
};
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -180,6 +182,7 @@ enum DisplayViaMode {
|
|||
VIA_SPECIAL_HOLE_SHOW,
|
||||
ALL_VIA_HOLE_SHOW,
|
||||
OPT_VIA_HOLE_END
|
||||
|
||||
};
|
||||
|
||||
class BOARD : public EDA_BaseStruct
|
||||
|
@ -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)
|
||||
|
@ -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 );
|
||||
|
@ -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) */
|
||||
|
@ -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;
|
||||
|
@ -353,5 +357,4 @@ public:
|
|||
};
|
||||
|
||||
|
||||
|
||||
#endif /* PCBSTRUCT_H */
|
||||
|
|
|
@ -97,8 +97,7 @@ class PARAM_CFG_BASE;
|
|||
class Ki_PageDescr;
|
||||
|
||||
|
||||
enum id_librarytype
|
||||
{
|
||||
enum id_librarytype {
|
||||
LIBRARY_TYPE_EESCHEMA,
|
||||
LIBRARY_TYPE_PCBNEW,
|
||||
LIBRARY_TYPE_DOC
|
||||
|
@ -126,6 +125,7 @@ enum id_toolbar {
|
|||
TOOLBAR_AUX
|
||||
};
|
||||
|
||||
|
||||
/**********************/
|
||||
/* Classes pour WXWIN */
|
||||
/**********************/
|
||||
|
@ -158,6 +158,7 @@ public:
|
|||
// It is "SchematicFrame", "PcbFrame" ....
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_BasicFrame( wxWindow* father, int idtype, WinEDA_App* parent,
|
||||
const wxString& title,
|
||||
|
@ -166,8 +167,8 @@ public:
|
|||
WinEDA_BasicFrame( const WinEDA_BasicFrame& ) { } // Should throw!!
|
||||
WinEDA_BasicFrame() { } // Should throw!!
|
||||
#endif
|
||||
|
||||
~WinEDA_BasicFrame( void );
|
||||
|
||||
void GetKicadHelp( wxCommandEvent& event );
|
||||
void GetKicadAbout( wxCommandEvent& event );
|
||||
void PrintMsg( const wxString& text );
|
||||
|
@ -209,6 +210,7 @@ public:
|
|||
|
||||
int m_InternalUnits; // nombre d'unites internes pour 1 pouce
|
||||
// = 1000 pour schema, = 10000 pour PCB
|
||||
|
||||
int m_UnitType; // Internal Unit type (0 = inch)
|
||||
bool m_Draw_Axis; // TRUE pour avoir les axes dessines
|
||||
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_Draw_Auxiliary_Axis; // TRUE pour avoir les axes auxiliaires dessines
|
||||
wxPoint m_Auxiliary_Axis_Position; /* origine de l'axe auxiliaire (app:
|
||||
dans la generation les fichiers de positionnement
|
||||
des composants) */
|
||||
* dans la generation les fichiers de positionnement
|
||||
* des composants) */
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_DrawFrame( wxWindow* father, int idtype, WinEDA_App* parent,
|
||||
const wxString& title,
|
||||
const wxPoint& pos, const wxSize& size );
|
||||
|
||||
~WinEDA_DrawFrame( void );
|
||||
|
||||
BASE_SCREEN* GetScreen( void ) { return m_CurrentScreen; }
|
||||
|
||||
void OnMenuOpen( wxMenuEvent& event );
|
||||
|
@ -253,6 +257,7 @@ public:
|
|||
virtual void GeneralControle( wxDC* DC, wxPoint Mouse );
|
||||
virtual void OnSize( wxSizeEvent& event );
|
||||
void OnEraseBackground( wxEraseEvent& SizeEvent );
|
||||
|
||||
// void OnChar(wxKeyEvent& event);
|
||||
void SetToolbarBgColor( int color_num );
|
||||
void OnZoom( int zoom_type );
|
||||
|
@ -260,14 +265,16 @@ public:
|
|||
void OnGrid( int grid_type );
|
||||
void Recadre_Trace( bool ToMouse );
|
||||
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 );
|
||||
|
||||
/* 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 );
|
||||
|
||||
/* 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
|
||||
|
||||
void ToPrinter( wxCommandEvent& event );
|
||||
|
@ -309,7 +316,6 @@ public:
|
|||
EVT_ACTIVATE( WinEDA_DrawFrame::OnActivate )
|
||||
|
||||
|
||||
|
||||
/**************************************************************/
|
||||
/* class WinEDA_BasePcbFrame: classe de base commune */
|
||||
/* aux classes d'affichage de PCB, et de l'editeur de Modules */
|
||||
|
@ -357,27 +363,31 @@ public:
|
|||
public:
|
||||
virtual void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy,
|
||||
int flag_type_command = 0 );
|
||||
|
||||
private:
|
||||
virtual void GetComponentFromUndoList( void );
|
||||
virtual void GetComponentFromRedoList( void );
|
||||
|
||||
|
||||
public:
|
||||
// Read/write fonctions:
|
||||
EDA_BaseStruct* ReadDrawSegmentDescr( FILE* File, int* LineNum );
|
||||
int ReadListeSegmentDescr( wxDC* DC, FILE* File,
|
||||
TRACK* PtSegm, int StructType,
|
||||
int* LineNum, int NumSegm );
|
||||
|
||||
int ReadSetup( FILE* File, int* LineNum );
|
||||
int ReadGeneralDescrPcb( wxDC* DC, FILE* File, int* LineNum );
|
||||
|
||||
// Gestion du PCB
|
||||
bool Clear_Pcb( wxDC* DC, bool query );
|
||||
EDA_BaseStruct * PcbGeneralLocateAndDisplay(void);
|
||||
EDA_BaseStruct* PcbGeneralLocateAndDisplay();
|
||||
EDA_BaseStruct* Locate( int typeloc, int LayerSearch );
|
||||
|
||||
// Gestion du curseur
|
||||
void place_marqueur( wxDC* DC, const wxPoint& pos, char* pt_bitmap,
|
||||
int DrawMode, int color, int type );
|
||||
|
||||
/* 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 trace_ratsnest_pad( wxDC* DC );
|
||||
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 );
|
||||
int* build_ratsnest_pad( EDA_BaseStruct* ref, const wxPoint& refpos, bool init );
|
||||
|
||||
|
@ -487,7 +497,6 @@ public:
|
|||
};
|
||||
|
||||
|
||||
|
||||
/*****************************************************/
|
||||
/* class WinEDA_PcbFrame: public WinEDA_BasePcbFrame */
|
||||
/*****************************************************/
|
||||
|
@ -702,6 +711,7 @@ public:
|
|||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
||||
/****************************************************/
|
||||
/* class WinEDA_GerberFrame: public WinEDA_PcbFrame */
|
||||
/****************************************************/
|
||||
|
@ -749,7 +759,6 @@ public:
|
|||
virtual void HandleBlockPlace( wxDC* DC );
|
||||
virtual int HandleBlockEnd( wxDC* DC );
|
||||
|
||||
|
||||
void InstallDrillFrame( wxCommandEvent& event );
|
||||
void ToPostProcess( wxCommandEvent& event );
|
||||
void Genere_HPGL( const wxString& FullFileName, int Layers );
|
||||
|
@ -802,7 +811,6 @@ public:
|
|||
// Conversion function
|
||||
void ExportDataInPcbnewFormat( wxCommandEvent& event );
|
||||
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
@ -852,11 +860,13 @@ public:
|
|||
|
||||
public:
|
||||
void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, int flag_type_command = 0 );
|
||||
|
||||
private:
|
||||
void GetComponentFromUndoList( void );
|
||||
void GetComponentFromRedoList( void );
|
||||
|
||||
public:
|
||||
|
||||
// Gestion des modules
|
||||
void Place_Ancre( MODULE* module, wxDC* DC );
|
||||
void RemoveStruct( EDA_BaseStruct* Item, wxDC* DC );
|
||||
|
@ -891,8 +901,7 @@ public:
|
|||
/*******************************/
|
||||
|
||||
/* enum utilis<69> dans RotationMiroir() */
|
||||
enum fl_rot_cmp
|
||||
{
|
||||
enum fl_rot_cmp {
|
||||
CMP_NORMAL, // orientation normale (O, pas de miroir)
|
||||
CMP_ROTATE_CLOCKWISE, // 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_MIROIR_X = 0x100, // miroir selon axe X
|
||||
CMP_MIROIR_Y = 0x200 // miroir selon axe Y
|
||||
|
||||
};
|
||||
|
||||
class WinEDA_SchematicFrame : public WinEDA_DrawFrame
|
||||
|
@ -930,6 +940,7 @@ public:
|
|||
void ReCreateOptToolbar( void );
|
||||
void ReCreateMenuBar( void );
|
||||
void SetToolbars( void );
|
||||
|
||||
SCH_SCREEN* GetScreen( void ) { return (SCH_SCREEN*) m_CurrentScreen; }
|
||||
|
||||
void InstallConfigFrame( const wxPoint& pos );
|
||||
|
@ -942,7 +953,8 @@ public:
|
|||
int BestZoom( void ); // Retourne le meilleur zoom
|
||||
|
||||
EDA_BaseStruct* SchematicGeneralLocateAndDisplay( bool IncludePin = TRUE );
|
||||
EDA_BaseStruct * SchematicGeneralLocateAndDisplay(const wxPoint & refpoint, bool IncludePin);
|
||||
EDA_BaseStruct* SchematicGeneralLocateAndDisplay( const wxPoint& refpoint,
|
||||
bool IncludePin );
|
||||
|
||||
/* netlist generation */
|
||||
void* BuildNetListBase( void );
|
||||
|
@ -970,7 +982,9 @@ private:
|
|||
|
||||
// Bus Entry
|
||||
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 );
|
||||
void StartMoveBusEntry( DrawBusEntryStruct* DrawLibItem, wxDC* DC );
|
||||
|
||||
|
@ -979,7 +993,8 @@ private:
|
|||
|
||||
// Junction
|
||||
DrawJunctionStruct* CreateNewJunctionStruct( wxDC* DC,
|
||||
const wxPoint & pos, bool PutInUndoList = FALSE);
|
||||
const wxPoint& pos,
|
||||
bool PutInUndoList = FALSE );
|
||||
|
||||
// Text ,label, glabel
|
||||
EDA_BaseStruct* CreateNewText( wxDC* DC, int type );
|
||||
|
@ -1004,8 +1019,10 @@ private:
|
|||
void InstallHierarchyFrame( wxDC* DC, wxPoint& pos );
|
||||
DrawSheetStruct* CreateSheet( wxDC* DC );
|
||||
void ReSizeSheet( DrawSheetStruct* Sheet, wxDC* DC );
|
||||
|
||||
public:
|
||||
bool EditSheet( DrawSheetStruct* Sheet, wxDC* DC );
|
||||
|
||||
private:
|
||||
void StartMoveSheet( DrawSheetStruct* sheet, wxDC* DC );
|
||||
DrawSheetLabelStruct* Create_PinSheet( DrawSheetStruct* Sheet, wxDC* DC );
|
||||
|
@ -1013,17 +1030,23 @@ private:
|
|||
void StartMove_PinSheet( DrawSheetLabelStruct* SheetLabel, wxDC* DC );
|
||||
void Place_PinSheet( DrawSheetLabelStruct* SheetLabel, wxDC* DC );
|
||||
DrawSheetLabelStruct* Import_PinSheet( DrawSheetStruct* Sheet, wxDC* DC );
|
||||
|
||||
public:
|
||||
void DeleteSheetLabel( wxDC* DC, DrawSheetLabelStruct* SheetLabelToDel );
|
||||
|
||||
private:
|
||||
|
||||
// Component
|
||||
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 );
|
||||
|
||||
public:
|
||||
void CmpRotationMiroir(
|
||||
EDA_SchComponentStruct* DrawComponent, wxDC* DC, int type_rotate );
|
||||
|
||||
private:
|
||||
void SelPartUnit( EDA_SchComponentStruct* DrawComponent, int unit, wxDC* DC );
|
||||
void ConvertPart( EDA_SchComponentStruct* DrawComponent, wxDC* DC );
|
||||
|
@ -1036,9 +1059,12 @@ private:
|
|||
|
||||
/* Operations sur bloc */
|
||||
void PasteStruct( wxDC* DC );
|
||||
|
||||
/* Undo - redo */
|
||||
public:
|
||||
void SaveCopyInUndoList(EDA_BaseStruct * ItemToCopy, int flag_type_command = 0);
|
||||
void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy,
|
||||
int flag_type_command = 0 );
|
||||
|
||||
private:
|
||||
void PutDataInPreviousState( DrawPickedStruct* List );
|
||||
void GetSchematicFromRedoList( void );
|
||||
|
@ -1066,7 +1092,6 @@ public:
|
|||
};
|
||||
|
||||
|
||||
|
||||
/*****************************/
|
||||
/* class WinEDA_LibeditFrame */
|
||||
/*****************************/
|
||||
|
@ -1095,10 +1120,12 @@ public:
|
|||
int BestZoom( void ); // Retourne le meilleur zoom
|
||||
void SetToolbars( void );
|
||||
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
|
||||
|
||||
SCH_SCREEN* GetScreen( void ) { return (SCH_SCREEN*) m_CurrentScreen; }
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// General:
|
||||
void CreateNewLibraryPart( void );
|
||||
void DeleteOnePart( void );
|
||||
|
@ -1117,6 +1144,7 @@ private:
|
|||
// General editing
|
||||
public:
|
||||
void SaveCopyInUndoList( EDA_BaseStruct* ItemToCopy, int flag_type_command = 0 );
|
||||
|
||||
private:
|
||||
void GetComponentFromUndoList( void );
|
||||
void GetComponentFromRedoList( void );
|
||||
|
@ -1161,6 +1189,7 @@ public:
|
|||
void PlacePin( wxDC* DC );
|
||||
void InitEditOnePin( void );
|
||||
void GlobalSetPins( wxDC* DC, LibDrawPin* MasterPin, int id );
|
||||
|
||||
// Repetition automatique de placement de pins
|
||||
void RepeatPinItem( wxDC* DC, LibDrawPin* Pin );
|
||||
|
||||
|
@ -1168,7 +1197,6 @@ public:
|
|||
};
|
||||
|
||||
|
||||
|
||||
class LibraryStruct;
|
||||
class WinEDA_ViewlibFrame : public WinEDA_DrawFrame
|
||||
{
|
||||
|
@ -1177,10 +1205,8 @@ public:
|
|||
|
||||
wxListBox* m_LibList;
|
||||
wxSize m_LibListSize;
|
||||
|
||||
wxListBox* m_CmpList;
|
||||
wxSize m_CmpListSize;
|
||||
|
||||
wxSemaphore* m_Semaphore; // != NULL if the frame must emulate a modal dialog
|
||||
|
||||
public:
|
||||
|
@ -1203,6 +1229,7 @@ public:
|
|||
int BestZoom( void ); // Retourne le meilleur zoom
|
||||
void ClickOnLibList( wxCommandEvent& event );
|
||||
void ClickOnCmpList( wxCommandEvent& event );
|
||||
|
||||
SCH_SCREEN* GetScreen( void ) { return (SCH_SCREEN*) m_CurrentScreen; }
|
||||
|
||||
private:
|
||||
|
@ -1216,7 +1243,6 @@ private:
|
|||
};
|
||||
|
||||
|
||||
|
||||
/****************************************************/
|
||||
/* classe representant un ecran graphique de dessin */
|
||||
/****************************************************/
|
||||
|
@ -1224,8 +1250,6 @@ private:
|
|||
#include "drawpanel_wxstruct.h"
|
||||
|
||||
|
||||
|
||||
|
||||
/*********************************************************/
|
||||
/* classe representant un ecran d'affichage des messages */
|
||||
/*********************************************************/
|
||||
|
@ -1237,6 +1261,7 @@ public:
|
|||
int m_BgColor; // couleur de fond
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_MsgPanel( WinEDA_DrawFrame* parent, int id, const wxPoint& pos, const wxSize& size );
|
||||
~WinEDA_MsgPanel( void );
|
||||
|
@ -1266,6 +1291,7 @@ private:
|
|||
wxStaticText* m_Title;
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_EnterText( wxWindow* parent, const wxString& Title,
|
||||
const wxString& TextToEdit, wxBoxSizer* BoxSizer,
|
||||
|
@ -1275,14 +1301,18 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
wxString GetValue( void );
|
||||
void GetValue( char* buffer, int lenmax );
|
||||
void SetValue( const wxString& new_text );
|
||||
void Enable( bool enbl );
|
||||
|
||||
void SetFocus( void ) { m_FrameText->SetFocus(); }
|
||||
void SetInsertionPoint( int n ) { m_FrameText->SetInsertionPoint( n ); }
|
||||
void SetSelection(int n, int m) {
|
||||
m_FrameText->SetSelection(n, m); }
|
||||
void SetSelection( int n, int m )
|
||||
{
|
||||
m_FrameText->SetSelection( n, m );
|
||||
}
|
||||
};
|
||||
|
||||
/*********************************************************************/
|
||||
|
@ -1299,6 +1329,7 @@ private:
|
|||
wxStaticText* m_Title;
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_GraphicTextCtrl( wxWindow* parent, const wxString& Title,
|
||||
const wxString& TextToEdit, int textsize,
|
||||
|
@ -1311,6 +1342,7 @@ public:
|
|||
int GetTextSize( void );
|
||||
void Enable( bool state );
|
||||
void SetTitle( const wxString& title );
|
||||
|
||||
void SetFocus( void ) { m_FrameText->SetFocus(); }
|
||||
void SetValue( const wxString& value );
|
||||
void SetValue( int value );
|
||||
|
@ -1332,6 +1364,7 @@ private:
|
|||
wxStaticText* m_TextX, * m_TextY;
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_PositionCtrl( wxWindow* parent, const wxString& title,
|
||||
const wxPoint& pos_to_edit,
|
||||
|
@ -1351,6 +1384,7 @@ public:
|
|||
class WinEDA_SizeCtrl : public WinEDA_PositionCtrl
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_SizeCtrl( wxWindow* parent, const wxString& title,
|
||||
const wxSize& size_to_edit,
|
||||
|
@ -1365,9 +1399,10 @@ public:
|
|||
/*****************************************************************/
|
||||
/* Classe pour afficher et editer une valeur en INCHES ou MM */
|
||||
/*****************************************************************/
|
||||
|
||||
/* internal_unit est le nombre d'unites internes par inch
|
||||
- 1000 sur EESchema
|
||||
- 10000 sur PcbNew
|
||||
* - 1000 sur EESchema
|
||||
* - 10000 sur PcbNew
|
||||
*/
|
||||
class WinEDA_ValueCtrl
|
||||
{
|
||||
|
@ -1380,6 +1415,7 @@ private:
|
|||
wxStaticText* m_Text;
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_ValueCtrl( wxWindow* parent, const wxString& title, int value,
|
||||
int units, wxBoxSizer* BoxSizer,
|
||||
|
@ -1390,6 +1426,7 @@ public:
|
|||
int GetValue( void );
|
||||
void SetValue( int new_value );
|
||||
void Enable( bool enbl );
|
||||
|
||||
void SetToolTip( const wxString& text )
|
||||
{
|
||||
m_ValueCtrl->SetToolTip( text );
|
||||
|
@ -1408,6 +1445,7 @@ private:
|
|||
wxStaticText* m_Text;
|
||||
|
||||
public:
|
||||
|
||||
// Constructor and destructor
|
||||
WinEDA_DFloatValueCtrl( wxWindow* parent, const wxString& title,
|
||||
double value, wxBoxSizer* BoxSizer );
|
||||
|
@ -1417,6 +1455,7 @@ public:
|
|||
double GetValue( void );
|
||||
void SetValue( double new_value );
|
||||
void Enable( bool enbl );
|
||||
|
||||
void SetToolTip( const wxString& text )
|
||||
{
|
||||
m_ValueCtrl->SetToolTip( text );
|
||||
|
@ -1481,6 +1520,7 @@ private:
|
|||
void ClickOnList( wxCommandEvent& event );
|
||||
void D_ClickOnList( wxCommandEvent& event );
|
||||
void OnKeyEvent( wxKeyEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
@ -1488,11 +1528,12 @@ private:
|
|||
/*************************/
|
||||
/* class WinEDAChoiceBox */
|
||||
/*************************/
|
||||
|
||||
/* class to display a choice list.
|
||||
This is a wrapper to wxComboBox (or wxChoice)
|
||||
but because they have some problems, WinEDAChoiceBox uses workarounds:
|
||||
- in wxGTK 2.6.2 wxGetSelection() does not work properly,
|
||||
- and wxChoice crashes if compiled in non unicode mode and uses utf8 codes
|
||||
* This is a wrapper to wxComboBox (or wxChoice)
|
||||
* but because they have some problems, WinEDAChoiceBox uses workarounds:
|
||||
* - in wxGTK 2.6.2 wxGetSelection() does not work properly,
|
||||
* - and wxChoice crashes if compiled in non unicode mode and uses utf8 codes
|
||||
*/
|
||||
|
||||
#define EVT_KICAD_CHOICEBOX EVT_COMBOBOX
|
||||
|
@ -1508,6 +1549,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
WinEDAChoiceBox( wxWindow* parent, wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size,
|
||||
const wxArrayString& choices ) :
|
||||
|
@ -1516,10 +1558,11 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
int GetChoice(void){
|
||||
|
||||
int GetChoice( void )
|
||||
{
|
||||
return GetCurrentSelection();
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* WXSTRUCT_H */
|
||||
|
||||
|
|
Loading…
Reference in New Issue