|
|
|
@ -40,29 +40,35 @@ class GENERAL_COLLECTORS_GUIDE; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @info see also class WinEDA_BasePcbFrame: Basic class for pcbnew and gerbview |
|
|
|
*/ |
|
|
|
|
|
|
|
* @info see also class WinEDA_BasePcbFrame: Basic class for pcbnew and |
|
|
|
*gerbview |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************/ |
|
|
|
/* class WinEDA_PcbFrame: the main frame for Pcbnew */ |
|
|
|
/*****************************************************/ |
|
|
|
class WinEDA_PcbFrame: public WinEDA_BasePcbFrame |
|
|
|
class WinEDA_PcbFrame : public WinEDA_BasePcbFrame |
|
|
|
{ |
|
|
|
public: |
|
|
|
WinEDAChoiceBox* m_SelLayerBox; // a combo box to display and select active layer |
|
|
|
WinEDAChoiceBox* m_SelTrackWidthBox; // a combo box to display and select current track width |
|
|
|
WinEDAChoiceBox* m_SelViaSizeBox; // a combo box to display and select current via diameter |
|
|
|
wxTextCtrl* m_ClearanceBox; // a text ctrl to display the current tracks and vias clearance |
|
|
|
wxTextCtrl* m_NetClassSelectedBox; // a text ctrl to display the current NetClass |
|
|
|
bool m_TrackAndViasSizesList_Changed; |
|
|
|
|
|
|
|
bool m_show_microwave_tools; |
|
|
|
WinEDAChoiceBox* m_SelLayerBox; // a combo box to display and |
|
|
|
// select active layer |
|
|
|
WinEDAChoiceBox* m_SelTrackWidthBox; // a combo box to display and |
|
|
|
// select current track width |
|
|
|
WinEDAChoiceBox* m_SelViaSizeBox; // a combo box to display and |
|
|
|
// select current via diameter |
|
|
|
wxTextCtrl* m_ClearanceBox; // a text ctrl to display the |
|
|
|
// current tracks and vias |
|
|
|
// clearance |
|
|
|
wxTextCtrl* m_NetClassSelectedBox; // a text ctrl to display the |
|
|
|
// current NetClass |
|
|
|
bool m_TrackAndViasSizesList_Changed; |
|
|
|
|
|
|
|
bool m_show_microwave_tools; |
|
|
|
|
|
|
|
private: |
|
|
|
|
|
|
|
DRC* m_drc; ///< the DRC controller, see drc.cpp |
|
|
|
DRC* m_drc; ///< the DRC controller, see drc.cpp |
|
|
|
|
|
|
|
// we'll use lower case function names for private member functions. |
|
|
|
void createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* aPopMenu ); |
|
|
|
@ -87,6 +93,7 @@ public: |
|
|
|
void InstallConfigFrame( const wxPoint& pos ); |
|
|
|
void Process_Config( wxCommandEvent& event ); |
|
|
|
void Update_config( wxWindow* displayframe ); |
|
|
|
|
|
|
|
/** Function Read_Config |
|
|
|
* Read the project configuration file |
|
|
|
* @param projectFileName = the config filename |
|
|
|
@ -96,7 +103,9 @@ public: |
|
|
|
*/ |
|
|
|
bool Read_Config( const wxString& projectFileName ); |
|
|
|
|
|
|
|
void OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct ); |
|
|
|
void OnHotKey( wxDC* DC, |
|
|
|
int hotkey, |
|
|
|
EDA_BaseStruct* DrawStruct ); |
|
|
|
bool OnHotkeyDeleteItem( wxDC* DC, EDA_BaseStruct* DrawStruct ); |
|
|
|
|
|
|
|
void OnCloseWindow( wxCloseEvent& Event ); |
|
|
|
@ -124,6 +133,7 @@ public: |
|
|
|
void ShowDesignRulesEditor( wxCommandEvent& event ); |
|
|
|
|
|
|
|
/* toolbars update UI functions: */ |
|
|
|
|
|
|
|
/** |
|
|
|
* Function UpdateToolbarLayerInfo |
|
|
|
* updates the currently selected layer in the layer listbox and |
|
|
|
@ -138,14 +148,14 @@ public: |
|
|
|
* update the displayed values on auxiliary horizontal toolbar |
|
|
|
* (track width, via sizes, clearance ... |
|
|
|
*/ |
|
|
|
void AuxiliaryToolBar_Update_UI( ); |
|
|
|
void AuxiliaryToolBar_Update_UI(); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function AuxiliaryToolBar_DesignRules_Update_UI |
|
|
|
* update the displayed values: track width, via sizes, clearance |
|
|
|
* used when a ne netclass is selected |
|
|
|
* used when a new netclass is selected |
|
|
|
*/ |
|
|
|
void AuxiliaryToolBar_DesignRules_Update_UI( ); |
|
|
|
void AuxiliaryToolBar_DesignRules_Update_UI(); |
|
|
|
|
|
|
|
/* mouse functions events: */ |
|
|
|
void OnLeftClick( wxDC* DC, const wxPoint& MousePos ); |
|
|
|
@ -153,7 +163,8 @@ public: |
|
|
|
|
|
|
|
/** |
|
|
|
* Function OnRightClick |
|
|
|
* populates a popup menu with the choices appropriate for the current context. |
|
|
|
* populates a popup menu with the choices appropriate for the current |
|
|
|
*context. |
|
|
|
* The caller will add the ZOOM menu choices afterwards. |
|
|
|
* @param aMousePos The current mouse position |
|
|
|
* @param aPopMenu The menu to add to. |
|
|
|
@ -163,56 +174,70 @@ public: |
|
|
|
void OnSelectOptionToolbar( wxCommandEvent& event ); |
|
|
|
void ToolOnRightClick( wxCommandEvent& event ); |
|
|
|
|
|
|
|
/** Function SaveCopyInUndoList. |
|
|
|
/** Function SaveCopyInUndoList. |
|
|
|
* Creates a new entry in undo list of commands. |
|
|
|
* add a picker to handle aItemToCopy |
|
|
|
* @param aItemToCopy = the board item modified by the command to undo |
|
|
|
* @param aTypeCommand = command type (see enum UndoRedoOpType) |
|
|
|
* @param aTransformPoint = the reference point of the transformation, for commands like move |
|
|
|
* @param aTransformPoint = the reference point of the transformation, for |
|
|
|
*commands like move |
|
|
|
*/ |
|
|
|
virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy, UndoRedoOpType aTypeCommand, |
|
|
|
const wxPoint& aTransformPoint = wxPoint(0,0) ); |
|
|
|
virtual void SaveCopyInUndoList( BOARD_ITEM* aItemToCopy, |
|
|
|
UndoRedoOpType aTypeCommand, |
|
|
|
const wxPoint& aTransformPoint = |
|
|
|
wxPoint( 0, 0 ) ); |
|
|
|
|
|
|
|
/** Function SaveCopyInUndoList (overloaded). |
|
|
|
* Creates a new entry in undo list of commands. |
|
|
|
* add a list of pickers to handle a list of items |
|
|
|
* @param aItemsList = the list of items modified by the command to undo |
|
|
|
* @param aTypeCommand = command type (see enum UndoRedoOpType) |
|
|
|
* @param aTransformPoint = the reference point of the transformation, for commands like move |
|
|
|
* @param aTransformPoint = the reference point of the transformation, for |
|
|
|
*commands like move |
|
|
|
*/ |
|
|
|
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, UndoRedoOpType aTypeCommand, |
|
|
|
const wxPoint& aTransformPoint = wxPoint(0,0) ); |
|
|
|
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, |
|
|
|
UndoRedoOpType aTypeCommand, |
|
|
|
const wxPoint& aTransformPoint = |
|
|
|
wxPoint( 0, 0 ) ); |
|
|
|
|
|
|
|
/** Function PutDataInPreviousState() |
|
|
|
* Used in undo or redo command. |
|
|
|
* Put data pointed by List in the previous state, i.e. the state memorised by List |
|
|
|
* @param aList = a PICKED_ITEMS_LIST pointer to the list of items to undo/redo |
|
|
|
* Put data pointed by List in the previous state, i.e. the state memorized |
|
|
|
* by List |
|
|
|
* @param aList = a PICKED_ITEMS_LIST pointer to the list of items to |
|
|
|
* undo/redo |
|
|
|
* @param aRedoCommand = a bool: true for redo, false for undo |
|
|
|
* @param aRebuildRatsnet = a bool: true to rebuid ratsnet (normal use), false |
|
|
|
* to just retrieve las state (used in abort commands that do not need to rebuild ratsnest) |
|
|
|
* @param aRebuildRatsnet = a bool: true to rebuild ratsnet (normal use), |
|
|
|
* false |
|
|
|
* to just retrieve las state (used in abort commands that do not need to |
|
|
|
* rebuild ratsnest) |
|
|
|
*/ |
|
|
|
void PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRedoCommand, bool aRebuildRatsnet = true ); |
|
|
|
void PutDataInPreviousState( PICKED_ITEMS_LIST* aList, |
|
|
|
bool aRedoCommand, |
|
|
|
bool aRebuildRatsnet = true ); |
|
|
|
|
|
|
|
/** Function GetBoardFromRedoList |
|
|
|
* Redo the last edition: |
|
|
|
* - Save the current board in Undo list |
|
|
|
* - Get an old version of the board from Redo list |
|
|
|
* @return none |
|
|
|
*/ |
|
|
|
void GetBoardFromRedoList(wxCommandEvent& event); |
|
|
|
void GetBoardFromRedoList( wxCommandEvent& event ); |
|
|
|
|
|
|
|
/** Function GetBoardFromUndoList |
|
|
|
* Undo the last edition: |
|
|
|
* - Save the current board in Redo list |
|
|
|
* - Get an old version of the board from Undo list |
|
|
|
* @return none |
|
|
|
*/ |
|
|
|
void GetBoardFromUndoList(wxCommandEvent& event); |
|
|
|
|
|
|
|
/* Gestion generale des operations sur block */ |
|
|
|
int ReturnBlockCommand( int key ); |
|
|
|
void HandleBlockPlace( wxDC* DC ); |
|
|
|
int HandleBlockEnd( wxDC* DC ); |
|
|
|
void GetBoardFromUndoList( wxCommandEvent& event ); |
|
|
|
|
|
|
|
/* Block operations: */ |
|
|
|
|
|
|
|
int ReturnBlockCommand( int key ); |
|
|
|
void HandleBlockPlace( wxDC* DC ); |
|
|
|
int HandleBlockEnd( wxDC* DC ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Block_SelectItems |
|
|
|
* Uses GetScreen()->m_BlockLocate |
|
|
|
@ -220,81 +245,93 @@ public: |
|
|
|
* selected items are put in the pick list |
|
|
|
* @param none |
|
|
|
*/ |
|
|
|
void Block_SelectItems( ); |
|
|
|
void Block_SelectItems(); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Block_Delete |
|
|
|
* deletes all items within the selected block. |
|
|
|
* @param none |
|
|
|
*/ |
|
|
|
void Block_Delete( ); |
|
|
|
void Block_Delete(); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Block_Rotate |
|
|
|
* Rotate all items within the selected block. |
|
|
|
* The rotation centre is the centre of the block |
|
|
|
* The rotation center is the center of the block |
|
|
|
* @param none |
|
|
|
*/ |
|
|
|
void Block_Rotate( ); |
|
|
|
void Block_Rotate(); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Block_Flip |
|
|
|
* Flip items within the selected block. |
|
|
|
* The flip centre is the centre of the block |
|
|
|
* The flip center is the center of the block |
|
|
|
* @param none |
|
|
|
*/ |
|
|
|
void Block_Flip( ); |
|
|
|
void Block_Flip(); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Block_Move |
|
|
|
* move all items within the selected block. |
|
|
|
* New location is determined by the current offset from the selected block's original location. |
|
|
|
* New location is determined by the current offset from the selected |
|
|
|
*block's original location. |
|
|
|
* @param none |
|
|
|
*/ |
|
|
|
void Block_Move( ); |
|
|
|
void Block_Move(); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Block_Mirror_X |
|
|
|
* mirrors all items within the currently selected block in the X axis. |
|
|
|
* @param none |
|
|
|
*/ |
|
|
|
void Block_Mirror_X( ); |
|
|
|
void Block_Mirror_X(); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Block_Duplicate |
|
|
|
* Duplicate all items within the selected block. |
|
|
|
* New location is determined by the current offset from the selected block's original location. |
|
|
|
* New location is determined by the current offset from the selected |
|
|
|
* block's original location. |
|
|
|
* @param none |
|
|
|
*/ |
|
|
|
void Block_Duplicate( ); |
|
|
|
void Block_Duplicate(); |
|
|
|
|
|
|
|
|
|
|
|
void SetToolbars(); |
|
|
|
void Process_Settings( wxCommandEvent& event ); |
|
|
|
void InstallPcbOptionsFrame( const wxPoint& pos, wxDC* DC, int id ); |
|
|
|
void InstallDisplayOptionsDialog( wxCommandEvent& aEvent ); |
|
|
|
void InstallPcbGlobalDeleteFrame( const wxPoint& pos ); |
|
|
|
void SetToolbars(); |
|
|
|
void Process_Settings( wxCommandEvent& event ); |
|
|
|
void InstallPcbOptionsFrame( const wxPoint& pos, |
|
|
|
wxDC* DC, |
|
|
|
int id ); |
|
|
|
void InstallDisplayOptionsDialog( wxCommandEvent& aEvent ); |
|
|
|
void InstallPcbGlobalDeleteFrame( const wxPoint& pos ); |
|
|
|
|
|
|
|
void GenModulesPosition( wxCommandEvent& event ); |
|
|
|
void GenModuleReport( wxCommandEvent& event ); |
|
|
|
void InstallDrillFrame( wxCommandEvent& event ); |
|
|
|
void ToPostProcess( wxCommandEvent& event ); |
|
|
|
void GenModulesPosition( wxCommandEvent& event ); |
|
|
|
void GenModuleReport( wxCommandEvent& event ); |
|
|
|
void InstallDrillFrame( wxCommandEvent& event ); |
|
|
|
void ToPostProcess( wxCommandEvent& event ); |
|
|
|
|
|
|
|
void OnFileHistory( wxCommandEvent& event ); |
|
|
|
void Files_io( wxCommandEvent& event ); |
|
|
|
bool LoadOnePcbFile( const wxString& FileName, bool Append ); |
|
|
|
int ReadPcbFile( FILE* File, bool Append ); |
|
|
|
bool SavePcbFile( const wxString& FileName ); |
|
|
|
int SavePcbFormatAscii( FILE* File ); |
|
|
|
bool WriteGeneralDescrPcb( FILE* File ); |
|
|
|
void OnFileHistory( wxCommandEvent& event ); |
|
|
|
void Files_io( wxCommandEvent& event ); |
|
|
|
bool LoadOnePcbFile( const wxString& FileName, bool Append ); |
|
|
|
int ReadPcbFile( FILE* File, bool Append ); |
|
|
|
bool SavePcbFile( const wxString& FileName ); |
|
|
|
int SavePcbFormatAscii( FILE* File ); |
|
|
|
bool WriteGeneralDescrPcb( FILE* File ); |
|
|
|
|
|
|
|
// BOARD handling |
|
|
|
|
|
|
|
/** function Clear_Pcb() |
|
|
|
* delete all and reinitialize the current board |
|
|
|
* @param aQuery = true to prompt user for confirmation, false to initialize silently |
|
|
|
* @param aQuery = true to prompt user for confirmation, false to |
|
|
|
* initialize silently |
|
|
|
*/ |
|
|
|
bool Clear_Pcb( bool aQuery ); |
|
|
|
bool Clear_Pcb( bool aQuery ); |
|
|
|
|
|
|
|
// Drc control |
|
|
|
|
|
|
|
/* function GetDrcController |
|
|
|
* @return the DRC controller |
|
|
|
*/ |
|
|
|
DRC* GetDrcController() {return m_drc;} ///< return the DRC controller, see drc.cpp |
|
|
|
DRC* GetDrcController() { return m_drc; } |
|
|
|
|
|
|
|
/** |
|
|
|
* Function RecreateBOMFileFromBoard |
|
|
|
@ -302,15 +339,15 @@ public: |
|
|
|
* this is the same as created by cvpcb. |
|
|
|
* can be used if this file is lost |
|
|
|
*/ |
|
|
|
void RecreateCmpFileFromBoard(wxCommandEvent & aEvent); |
|
|
|
void RecreateCmpFileFromBoard( wxCommandEvent& aEvent ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function RecreateBOMFileFromBoard |
|
|
|
* Creates a BOM file from the current loaded board |
|
|
|
*/ |
|
|
|
void RecreateBOMFileFromBoard(wxCommandEvent & aEvent); |
|
|
|
void RecreateBOMFileFromBoard( wxCommandEvent& aEvent ); |
|
|
|
|
|
|
|
void ExportToGenCAD( wxCommandEvent& event ); |
|
|
|
void ExportToGenCAD( wxCommandEvent& event ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function ExporttoSPECCTRA |
|
|
|
@ -318,7 +355,7 @@ public: |
|
|
|
* See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the |
|
|
|
* specification. |
|
|
|
*/ |
|
|
|
void ExportToSpecctra( wxCommandEvent& event ); |
|
|
|
void ExportToSpecctra( wxCommandEvent& event ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function ImportSpecctraSession |
|
|
|
@ -327,99 +364,104 @@ public: |
|
|
|
* See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the |
|
|
|
* specification. |
|
|
|
*/ |
|
|
|
void ImportSpecctraSession( wxCommandEvent& event ); |
|
|
|
void ImportSpecctraSession( wxCommandEvent& event ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function ImportSpecctraDesign |
|
|
|
* will import a specctra *.dsn file and use it to replace an entire BOARD. |
|
|
|
* The new board will not have any graphics, only components, tracks and vias. |
|
|
|
* The new board will not have any graphics, only components, tracks and |
|
|
|
* vias. |
|
|
|
* See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the |
|
|
|
* specification. |
|
|
|
*/ |
|
|
|
void ImportSpecctraDesign( wxCommandEvent& event ); |
|
|
|
void ImportSpecctraDesign( wxCommandEvent& event ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Access_to_External_Tool |
|
|
|
* Run an external tool (like freeroute ) |
|
|
|
*/ |
|
|
|
void Access_to_External_Tool( wxCommandEvent& event ); |
|
|
|
void Access_to_External_Tool( wxCommandEvent& event ); |
|
|
|
|
|
|
|
/* Fonctions specifiques */ |
|
|
|
MODULE* ListAndSelectModuleName(); |
|
|
|
MODULE* ListAndSelectModuleName(); |
|
|
|
|
|
|
|
/** Function ListNetsAndSelect |
|
|
|
* called by a command event |
|
|
|
* displays the sorted list of nets in a dialog frame |
|
|
|
* If a net is selected, it is hightlighted |
|
|
|
* If a net is selected, it is highlighted |
|
|
|
*/ |
|
|
|
void ListNetsAndSelect( wxCommandEvent& event ); |
|
|
|
void ListNetsAndSelect( wxCommandEvent& event ); |
|
|
|
|
|
|
|
void Swap_Layers( wxCommandEvent& event ); |
|
|
|
void Install_Test_DRC_Frame( wxDC* DC ); |
|
|
|
void Swap_Layers( wxCommandEvent& event ); |
|
|
|
void Install_Test_DRC_Frame( wxDC* DC ); |
|
|
|
|
|
|
|
// Handling texts on the board |
|
|
|
void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); |
|
|
|
TEXTE_PCB* Create_Texte_Pcb( wxDC* DC ); |
|
|
|
void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); |
|
|
|
void StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC ); |
|
|
|
void Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); |
|
|
|
void InstallTextPCBOptionsFrame( TEXTE_PCB* TextPCB, wxDC* DC ); |
|
|
|
void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); |
|
|
|
TEXTE_PCB* Create_Texte_Pcb( wxDC* DC ); |
|
|
|
void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); |
|
|
|
void StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC ); |
|
|
|
void Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); |
|
|
|
void InstallTextPCBOptionsFrame( TEXTE_PCB* TextPCB, wxDC* DC ); |
|
|
|
|
|
|
|
// Graphic Segments type DRAWSEGMENT |
|
|
|
void Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC ); |
|
|
|
void Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC ); |
|
|
|
void InstallGraphicItemPropertiesDialog( DRAWSEGMENT* aItem, wxDC* aDC ); // Graphic items edition |
|
|
|
void Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC ); |
|
|
|
void Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC ); |
|
|
|
void InstallGraphicItemPropertiesDialog( DRAWSEGMENT* aItem, |
|
|
|
wxDC* aDC ); |
|
|
|
|
|
|
|
// Footprint edition (see also WinEDA_BasePcbFrame) |
|
|
|
void InstallModuleOptionsFrame( MODULE* Module, wxDC * DC ); |
|
|
|
void StartMove_Module( MODULE* module, wxDC* DC ); |
|
|
|
bool Delete_Module( MODULE* module, wxDC* DC, bool aAskBeforeDeleting ); |
|
|
|
void Change_Side_Module( MODULE* Module, wxDC* DC ); |
|
|
|
void InstallModuleOptionsFrame( MODULE* Module, wxDC* DC ); |
|
|
|
void StartMove_Module( MODULE* module, wxDC* DC ); |
|
|
|
bool Delete_Module( MODULE* module, |
|
|
|
wxDC* DC, |
|
|
|
bool aAskBeforeDeleting ); |
|
|
|
void Change_Side_Module( MODULE* Module, wxDC* DC ); |
|
|
|
|
|
|
|
void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule ); |
|
|
|
|
|
|
|
void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule ); |
|
|
|
/** function Exchange_Module |
|
|
|
* Replaces OldModule by NewModule, using OldModule settings: |
|
|
|
* position, orientation, pad netnames ...) |
|
|
|
* OldModule is deleted or put in undo list. |
|
|
|
* @param aOldModule = footprint to replace |
|
|
|
* @param aNewModule = footprint to put |
|
|
|
* @param aUndoPickList = the undo list used to save OldModule. If null, OldModule is deleted |
|
|
|
* @param aUndoPickList = the undo list used to save OldModule. If null, |
|
|
|
* OldModule is deleted |
|
|
|
*/ |
|
|
|
void Exchange_Module( MODULE* aOldModule, |
|
|
|
MODULE* aNewModule, |
|
|
|
PICKED_ITEMS_LIST* aUndoPickList); |
|
|
|
void Exchange_Module( MODULE* aOldModule, |
|
|
|
MODULE* aNewModule, |
|
|
|
PICKED_ITEMS_LIST* aUndoPickList ); |
|
|
|
|
|
|
|
// loading modules: see WinEDA_BasePcbFrame |
|
|
|
|
|
|
|
// Board handling |
|
|
|
void RemoveStruct( BOARD_ITEM* Item, wxDC* DC ); |
|
|
|
void RemoveStruct( BOARD_ITEM* Item, wxDC* DC ); |
|
|
|
|
|
|
|
// Hightlight functions: |
|
|
|
int Select_High_Light( wxDC* DC ); |
|
|
|
void Hight_Light( wxDC* DC ); |
|
|
|
// Highlight functions: |
|
|
|
int Select_High_Light( wxDC* DC ); |
|
|
|
void Hight_Light( wxDC* DC ); |
|
|
|
|
|
|
|
// Track and via edition: |
|
|
|
void Via_Edit_Control( wxCommandEvent& event ); |
|
|
|
void Via_Edit_Control( wxCommandEvent& event ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Other_Layer_Route |
|
|
|
* operates in one of two ways. If argument track is NULL, then swap the active |
|
|
|
* layer between m_Route_Layer_TOP and m_Route_Layer_BOTTOM. If a track is |
|
|
|
* in progress (track is not NULL), and if DRC allows it, place a via on the end |
|
|
|
* of the current track, and then swap the current active layer and start a new |
|
|
|
* segment on the new layer. |
|
|
|
* operates in one of two ways. If argument track is NULL, then swap the |
|
|
|
* active layer between m_Route_Layer_TOP and m_Route_Layer_BOTTOM. If a |
|
|
|
* track is in progress (track is not NULL), and if DRC allows it, place |
|
|
|
* a via on the end of the current track, and then swap the current active |
|
|
|
* layer and start a new segment on the new layer. |
|
|
|
* @param track A TRACK* to append the via to or NULL. |
|
|
|
* @param DC A device context to draw on. |
|
|
|
* @return bool - true if the operation was successful, else false such as |
|
|
|
* the case where DRC would not allow a via. |
|
|
|
* the case where DRC would not allow a via. |
|
|
|
*/ |
|
|
|
bool Other_Layer_Route( TRACK* track, wxDC* DC ); |
|
|
|
void Affiche_PadsNoConnect( wxDC* DC ); |
|
|
|
void Affiche_Status_Net( wxDC* DC ); |
|
|
|
TRACK* Delete_Segment( wxDC* DC, TRACK* Track ); |
|
|
|
void Delete_Track( wxDC* DC, TRACK* Track ); |
|
|
|
void Delete_net( wxDC* DC, TRACK* Track ); |
|
|
|
void Remove_One_Track( wxDC* DC, TRACK* pt_segm ); |
|
|
|
bool Other_Layer_Route( TRACK* track, wxDC* DC ); |
|
|
|
void Affiche_PadsNoConnect( wxDC* DC ); |
|
|
|
void Affiche_Status_Net( wxDC* DC ); |
|
|
|
TRACK* Delete_Segment( wxDC* DC, TRACK* Track ); |
|
|
|
void Delete_Track( wxDC* DC, TRACK* Track ); |
|
|
|
void Delete_net( wxDC* DC, TRACK* Track ); |
|
|
|
void Remove_One_Track( wxDC* DC, TRACK* pt_segm ); |
|
|
|
|
|
|
|
/** function Reset_All_Tracks_And_Vias_To_Netclass_Values |
|
|
|
* Reset all tracks width and/or vias diameters and drill |
|
|
|
@ -427,76 +469,91 @@ public: |
|
|
|
* @param aTrack : bool true to modify tracks |
|
|
|
* @param aVia : bool true to modify vias |
|
|
|
*/ |
|
|
|
bool Reset_All_Tracks_And_Vias_To_Netclass_Values( bool aTrack, bool aVia ); |
|
|
|
bool Reset_All_Tracks_And_Vias_To_Netclass_Values( bool aTrack, |
|
|
|
bool aVia ); |
|
|
|
|
|
|
|
/** function Change_Net_Tracks_And_Vias_Sizes |
|
|
|
* Reset all tracks width and vias diameters and drill |
|
|
|
* to their default Netclass value ou current values |
|
|
|
* to their default Netclass value or current values |
|
|
|
* @param aNetcode : the netcode of the net to edit |
|
|
|
* @param aUseNetclassValue : bool. True to use netclass values, false to use current values |
|
|
|
* @param aUseNetclassValue : bool. True to use netclass values, false to |
|
|
|
* use current values |
|
|
|
*/ |
|
|
|
bool Change_Net_Tracks_And_Vias_Sizes( int aNetcode, bool aUseNetclassValue ); |
|
|
|
bool Change_Net_Tracks_And_Vias_Sizes( int aNetcode, |
|
|
|
bool aUseNetclassValue ); |
|
|
|
|
|
|
|
/** Function Edit_Track_Width |
|
|
|
* Modify a full track width (using DRC control). |
|
|
|
* a full track is the set of track segments between 2 ends: pads or a point that has more than 2 segments ends connected |
|
|
|
* a full track is the set of track segments between 2 ends: pads or a |
|
|
|
* point that has more than 2 segments ends connected |
|
|
|
* @param DC = the curred device context (can be NULL) |
|
|
|
* @param aTrackSegment = a segment or via on the track to change |
|
|
|
*/ |
|
|
|
void Edit_Track_Width( wxDC* DC, TRACK* Track ); |
|
|
|
void Edit_Track_Width( wxDC* DC, TRACK* Track ); |
|
|
|
|
|
|
|
/** Function Edit_TrackSegm_Width |
|
|
|
* Modify one track segment width or one via diameter (using DRC control). |
|
|
|
* @param DC = the current device context (can be NULL) |
|
|
|
* @param aTrackItem = the track segment or via to modify |
|
|
|
*/ |
|
|
|
void Edit_TrackSegm_Width( wxDC* DC, TRACK* segm ); |
|
|
|
TRACK* Begin_Route( TRACK* track, wxDC* DC ); |
|
|
|
void End_Route( TRACK* track, wxDC* DC ); |
|
|
|
void ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC ); |
|
|
|
void Attribut_Segment( TRACK* track, wxDC* DC, bool Flag_On ); |
|
|
|
void Attribut_Track( TRACK* track, wxDC* DC, bool Flag_On ); |
|
|
|
void Attribut_net( wxDC* DC, int net_code, bool Flag_On ); |
|
|
|
void Start_MoveOneNodeOrSegment( TRACK* track, wxDC* DC, int command ); |
|
|
|
bool PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC ); |
|
|
|
bool MergeCollinearTracks( TRACK* track, wxDC* DC, int end ); |
|
|
|
void Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC ); |
|
|
|
void SwitchLayer( wxDC* DC, int layer ); |
|
|
|
bool Add_45_degrees_Segment( wxDC* DC ); |
|
|
|
bool Genere_Pad_Connexion( wxDC* DC, int layer ); |
|
|
|
void Edit_TrackSegm_Width( wxDC* DC, TRACK* segm ); |
|
|
|
TRACK* Begin_Route( TRACK* track, wxDC* DC ); |
|
|
|
void End_Route( TRACK* track, wxDC* DC ); |
|
|
|
void ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC ); |
|
|
|
void Attribut_Segment( TRACK* track, wxDC* DC, bool Flag_On ); |
|
|
|
void Attribut_Track( TRACK* track, wxDC* DC, bool Flag_On ); |
|
|
|
void Attribut_net( wxDC* DC, int net_code, bool Flag_On ); |
|
|
|
void Start_MoveOneNodeOrSegment( TRACK* track, wxDC* DC, int command ); |
|
|
|
bool PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC ); |
|
|
|
bool MergeCollinearTracks( TRACK* track, wxDC* DC, int end ); |
|
|
|
void Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC ); |
|
|
|
void SwitchLayer( wxDC* DC, int layer ); |
|
|
|
bool Add_45_degrees_Segment( wxDC* DC ); |
|
|
|
bool Genere_Pad_Connexion( wxDC* DC, int layer ); |
|
|
|
|
|
|
|
/** function EraseRedundantTrack |
|
|
|
* Called after creating a track |
|
|
|
* Remove (if exists) the old track that have the same starting and the same ending point as the new created track |
|
|
|
* Remove (if exists) the old track that have the same starting and the |
|
|
|
* same ending point as the new created track |
|
|
|
* (this is the redunding track) |
|
|
|
* @param aDC = the current device context (can be NULL) |
|
|
|
* @param aNewTrack = the new created track (a pointer to a segment of the track list) |
|
|
|
* @param aNewTrack = the new created track (a pointer to a segment of the |
|
|
|
* track list) |
|
|
|
* @param aNewTrackSegmentsCount = number of segments in this new track |
|
|
|
* @param aItemsListPicker = the list picker to use for an undo command (can be NULL) |
|
|
|
* @param aItemsListPicker = the list picker to use for an undo command |
|
|
|
* (can be NULL) |
|
|
|
*/ |
|
|
|
int EraseRedundantTrack( wxDC* aDC, TRACK* aNewTrack, int aNewTrackSegmentsCount, |
|
|
|
PICKED_ITEMS_LIST* aItemsListPicker ); |
|
|
|
int EraseRedundantTrack( wxDC* aDC, |
|
|
|
TRACK* aNewTrack, |
|
|
|
int aNewTrackSegmentsCount, |
|
|
|
PICKED_ITEMS_LIST* aItemsListPicker ); |
|
|
|
|
|
|
|
/** Function SetTrackSegmentWidth |
|
|
|
* Modify one track segment width or one via diameter (using DRC control). |
|
|
|
* Basic routine used by other routines when editing tracks or vias |
|
|
|
* @param aTrackItem = the track segment or via to modify |
|
|
|
* @param aItemsListPicker = the list picker to use for an undo command (can be NULL) |
|
|
|
* @param aUseNetclassValue = true to use NetClass value, false to use g_DesignSettings value |
|
|
|
* @param aItemsListPicker = the list picker to use for an undo command |
|
|
|
* (can be NULL) |
|
|
|
* @param aUseNetclassValue = true to use NetClass value, false to use |
|
|
|
* g_DesignSettings value |
|
|
|
* @return true if done, false if no not change (because DRC error) |
|
|
|
*/ |
|
|
|
bool SetTrackSegmentWidth( TRACK* aTrackItem, PICKED_ITEMS_LIST* aItemsListPicker, bool aUseNetclassValue ); |
|
|
|
bool SetTrackSegmentWidth( TRACK* aTrackItem, |
|
|
|
PICKED_ITEMS_LIST* aItemsListPicker, |
|
|
|
bool aUseNetclassValue ); |
|
|
|
|
|
|
|
|
|
|
|
// zone handling |
|
|
|
|
|
|
|
/** Function Delete_Zone_Fill |
|
|
|
* Remove the zone filling which include the segment aZone, or the zone which have the given time stamp. |
|
|
|
* A zone is a group of segments which have the same TimeStamp |
|
|
|
* Remove the zone filling which include the segment aZone, or the zone |
|
|
|
* which have the given time stamp. A zone is a group of segments which |
|
|
|
* have the same TimeStamp |
|
|
|
* @param aZone = zone segment within the zone to delete. Can be NULL |
|
|
|
* @param aTimestamp = Timestamp for the zone to delete, used if aZone == NULL |
|
|
|
* @param aTimestamp = Timestamp for the zone to delete, used if aZone == |
|
|
|
* NULL |
|
|
|
*/ |
|
|
|
void Delete_Zone_Fill( SEGZONE* Track, long aTimestamp = 0 ); |
|
|
|
void Delete_Zone_Fill( SEGZONE* Track, long aTimestamp = 0 ); |
|
|
|
|
|
|
|
|
|
|
|
/** Function Delete_LastCreatedCorner |
|
|
|
@ -504,14 +561,14 @@ public: |
|
|
|
* Remove and delete the current outline segment in progress |
|
|
|
* @return 0 if no corner in list, or corner number |
|
|
|
*/ |
|
|
|
int Delete_LastCreatedCorner( wxDC* DC ); |
|
|
|
int Delete_LastCreatedCorner( wxDC* DC ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Begin_Zone |
|
|
|
* initiates a zone edge creation process, |
|
|
|
* or terminates the current zone edge and creates a new zone edge stub |
|
|
|
*/ |
|
|
|
int Begin_Zone( wxDC* DC ); |
|
|
|
int Begin_Zone( wxDC* DC ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function End_Zone |
|
|
|
@ -519,7 +576,7 @@ public: |
|
|
|
* @param DC = current Device Context |
|
|
|
* @return true if Ok, false if DRC error |
|
|
|
*/ |
|
|
|
bool End_Zone( wxDC* DC ); |
|
|
|
bool End_Zone( wxDC* DC ); |
|
|
|
|
|
|
|
/** Function Fill_Zone() |
|
|
|
* Calculate the zone filling for the outline zone_container |
|
|
|
@ -530,7 +587,7 @@ public: |
|
|
|
* @param verbose = true to show error messages |
|
|
|
* @return error level (0 = no error) |
|
|
|
*/ |
|
|
|
int Fill_Zone( ZONE_CONTAINER* zone_container, bool verbose = TRUE ); |
|
|
|
int Fill_Zone( ZONE_CONTAINER* zone_container, bool verbose = TRUE ); |
|
|
|
|
|
|
|
/** Function Fill_All_Zones() |
|
|
|
* Fill all zones on the board |
|
|
|
@ -538,7 +595,7 @@ public: |
|
|
|
* @param verbose = true to show error messages |
|
|
|
* @return error level (0 = no error) |
|
|
|
*/ |
|
|
|
int Fill_All_Zones( bool verbose = TRUE ); |
|
|
|
int Fill_All_Zones( bool verbose = TRUE ); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -547,22 +604,22 @@ public: |
|
|
|
* @param DC = current Device Context |
|
|
|
* @param zone_container = parent zone outline |
|
|
|
*/ |
|
|
|
void Add_Zone_Cutout( wxDC* DC, ZONE_CONTAINER* zone_container ); |
|
|
|
void Add_Zone_Cutout( wxDC* DC, ZONE_CONTAINER* zone_container ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Add_Similar_Zone |
|
|
|
* Add a zone to a given zone outline. |
|
|
|
* if the zones are overlappeing they will be merged |
|
|
|
* if the zones are overlapping they will be merged |
|
|
|
* @param DC = current Device Context |
|
|
|
* @param zone_container = parent zone outline |
|
|
|
*/ |
|
|
|
void Add_Similar_Zone( wxDC* DC, ZONE_CONTAINER* zone_container ); |
|
|
|
void Add_Similar_Zone( wxDC* DC, ZONE_CONTAINER* zone_container ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Edit_Zone_Params |
|
|
|
* Edit params (layer, clearance, ...) for a zone outline |
|
|
|
*/ |
|
|
|
void Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* zone_container ); |
|
|
|
void Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* zone_container ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Start_Move_Zone_Corner |
|
|
|
@ -570,18 +627,20 @@ public: |
|
|
|
* called from a move corner command (IsNewCorner = false), |
|
|
|
* or a create new cornet command (IsNewCorner = true ) |
|
|
|
*/ |
|
|
|
void Start_Move_Zone_Corner( wxDC* DC, |
|
|
|
ZONE_CONTAINER* zone_container, |
|
|
|
int corner_id, |
|
|
|
bool IsNewCorner ); |
|
|
|
void Start_Move_Zone_Corner( wxDC* DC, |
|
|
|
ZONE_CONTAINER* zone_container, |
|
|
|
int corner_id, |
|
|
|
bool IsNewCorner ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Start_Move_Zone_Corner |
|
|
|
* Prepares a drag edge in an existing zone outline, |
|
|
|
*/ |
|
|
|
void Start_Move_Zone_Drag_Outline_Edge( wxDC* DC, |
|
|
|
ZONE_CONTAINER* zone_container, |
|
|
|
int corner_id ); |
|
|
|
void Start_Move_Zone_Drag_Outline_Edge( |
|
|
|
wxDC* DC, |
|
|
|
ZONE_CONTAINER* |
|
|
|
zone_container, |
|
|
|
int corner_id ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function End_Move_Zone_Corner_Or_Outlines |
|
|
|
@ -589,7 +648,10 @@ public: |
|
|
|
* @param DC = current Device Context (can be NULL) |
|
|
|
* @param zone_container: the given zone |
|
|
|
*/ |
|
|
|
void End_Move_Zone_Corner_Or_Outlines( wxDC* DC, ZONE_CONTAINER* zone_container ); |
|
|
|
void End_Move_Zone_Corner_Or_Outlines( |
|
|
|
wxDC* DC, |
|
|
|
ZONE_CONTAINER* |
|
|
|
zone_container ); |
|
|
|
|
|
|
|
/** |
|
|
|
* Function End_Move_Zone_Corner_Or_Outlines |
|
|
|
@ -599,8 +661,9 @@ public: |
|
|
|
void Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_container ); |
|
|
|
|
|
|
|
/** Function Delete_Zone |
|
|
|
* Remove the zone which include the segment aZone, or the zone which have the given time stamp. |
|
|
|
* A zone is a group of segments which have the same TimeStamp |
|
|
|
* Remove the zone which include the segment aZone, or the zone which have |
|
|
|
* the given time stamp. A zone is a group of segments which have the |
|
|
|
* same TimeStamp |
|
|
|
* @param DC = current Device Context (can be NULL) |
|
|
|
* @param zone_container = zone to modify |
|
|
|
* the member .m_CornerSelection is used to find the outline to remove. |
|
|
|
@ -611,18 +674,21 @@ public: |
|
|
|
|
|
|
|
/** |
|
|
|
* Function Start_Move_Zone_Outlines |
|
|
|
* Initialise parametres to move an existing zone outlines. |
|
|
|
* Initialize parameters to move an existing zone outlines. |
|
|
|
* @param DC = current Device Context (can be NULL) |
|
|
|
* @param zone_container: the given zone to move |
|
|
|
*/ |
|
|
|
void Start_Move_Zone_Outlines( wxDC* DC, ZONE_CONTAINER* zone_container ); |
|
|
|
void Start_Move_Zone_Outlines( wxDC* DC, |
|
|
|
ZONE_CONTAINER* zone_container ); |
|
|
|
|
|
|
|
// Target handling |
|
|
|
MIREPCB* Create_Mire( wxDC* DC ); |
|
|
|
void Delete_Mire( MIREPCB* MirePcb, wxDC* DC ); |
|
|
|
void StartMove_Mire( MIREPCB* MirePcb, wxDC* DC ); |
|
|
|
void Place_Mire( MIREPCB* MirePcb, wxDC* DC ); |
|
|
|
void InstallMireOptionsFrame( MIREPCB* MirePcb, wxDC* DC, const wxPoint& pos ); |
|
|
|
void InstallMireOptionsFrame( MIREPCB* MirePcb, |
|
|
|
wxDC* DC, |
|
|
|
const wxPoint& pos ); |
|
|
|
|
|
|
|
// Graphic segments type DRAWSEGMENT handling: |
|
|
|
DRAWSEGMENT* Begin_DrawSegment( DRAWSEGMENT* Segment, int shape, wxDC* DC ); |
|
|
|
@ -631,7 +697,9 @@ public: |
|
|
|
void Delete_Drawings_All_Layer( int aLayer ); |
|
|
|
|
|
|
|
// Dimension handling: |
|
|
|
void Install_Edit_Cotation( COTATION* Cotation, wxDC* DC, const wxPoint& pos ); |
|
|
|
void Install_Edit_Cotation( COTATION* Cotation, |
|
|
|
wxDC* DC, |
|
|
|
const wxPoint& pos ); |
|
|
|
COTATION* Begin_Cotation( COTATION* Cotation, wxDC* DC ); |
|
|
|
void Delete_Cotation( COTATION* Cotation, wxDC* DC ); |
|
|
|
|
|
|
|
@ -643,7 +711,7 @@ public: |
|
|
|
void AutoPlace( wxCommandEvent& event ); |
|
|
|
|
|
|
|
/** function OnOrientFootprints |
|
|
|
* install the dialog box for the comman Orient Footprints |
|
|
|
* install the dialog box for the common Orient Footprints |
|
|
|
*/ |
|
|
|
void OnOrientFootprints( void ); |
|
|
|
|
|
|
|
@ -672,7 +740,6 @@ public: |
|
|
|
void ReadAutoroutedTracks( wxDC* DC ); |
|
|
|
void GlobalRoute( wxDC* DC ); |
|
|
|
|
|
|
|
// divers |
|
|
|
void Show_1_Ratsnest( EDA_BaseStruct* item, wxDC* DC ); |
|
|
|
void Ratsnest_On_Off( wxDC* DC ); |
|
|
|
void Clean_Pcb( wxDC* DC ); |
|
|
|
@ -683,7 +750,8 @@ public: |
|
|
|
* Function SendMessageToEESCHEMA |
|
|
|
* sends a message to the schematic editor so that it may move its cursor |
|
|
|
* to a part with the same reference as the objectToSync |
|
|
|
* @param objectToSync The object whose reference is used to syncronize eeschema. |
|
|
|
* @param objectToSync The object whose reference is used to synchronize |
|
|
|
* eeschema. |
|
|
|
*/ |
|
|
|
void SendMessageToEESCHEMA( BOARD_ITEM* objectToSync ); |
|
|
|
|
|
|
|
@ -767,11 +835,13 @@ public: |
|
|
|
void ToPrinter( wxCommandEvent& event ); |
|
|
|
|
|
|
|
// BOARD handling |
|
|
|
|
|
|
|
/** function Clear_Pcb() |
|
|
|
* delete all and reinitialize the current board |
|
|
|
* @param aQuery = true to prompt user for confirmation, false to initialize silently |
|
|
|
* @param aQuery = true to prompt user for confirmation, false to |
|
|
|
* initialize silently |
|
|
|
*/ |
|
|
|
bool Clear_Pcb( bool aQuery ); |
|
|
|
bool Clear_Pcb( bool aQuery ); |
|
|
|
|
|
|
|
/* handlers for block commands */ |
|
|
|
int ReturnBlockCommand( int key ); |
|
|
|
@ -782,51 +852,57 @@ public: |
|
|
|
|
|
|
|
/* Undo and redo functions */ |
|
|
|
public: |
|
|
|
/** Function SaveCopyInUndoList. |
|
|
|
|
|
|
|
/** Function SaveCopyInUndoList. |
|
|
|
* Creates a new entry in undo list of commands. |
|
|
|
* add a picker to handle aItemToCopy |
|
|
|
* @param aItem = the board item modified by the command to undo |
|
|
|
* @param aTypeCommand = command type (see enum UndoRedoOpType) |
|
|
|
* @param aTransformPoint = the reference point of the transformation, for commands like move |
|
|
|
* @param aTransformPoint = the reference point of the transformation, for |
|
|
|
* commands like move |
|
|
|
*/ |
|
|
|
virtual void SaveCopyInUndoList( BOARD_ITEM* aItem, UndoRedoOpType aTypeCommand, |
|
|
|
const wxPoint& aTransformPoint = wxPoint(0,0) ); |
|
|
|
virtual void SaveCopyInUndoList( BOARD_ITEM* aItem, |
|
|
|
UndoRedoOpType aTypeCommand, |
|
|
|
const wxPoint& aTransformPoint = |
|
|
|
wxPoint( 0, 0 ) ); |
|
|
|
|
|
|
|
/** Function SaveCopyInUndoList (overloaded). |
|
|
|
* Creates a new entry in undo list of commands. |
|
|
|
* add a list of pickers to handle a list of items |
|
|
|
* @param aItemsList = the list of items modified by the command to undo |
|
|
|
* @param aTypeCommand = command type (see enum UndoRedoOpType) |
|
|
|
* @param aTransformPoint = the reference point of the transformation, for commands like move |
|
|
|
* @param aTransformPoint = the reference point of the transformation, for |
|
|
|
* commands like move |
|
|
|
*/ |
|
|
|
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, UndoRedoOpType aTypeCommand, |
|
|
|
const wxPoint& aTransformPoint = wxPoint(0,0) ); |
|
|
|
virtual void SaveCopyInUndoList( PICKED_ITEMS_LIST& aItemsList, |
|
|
|
UndoRedoOpType aTypeCommand, |
|
|
|
const wxPoint& aTransformPoint = |
|
|
|
wxPoint( 0, 0 ) ); |
|
|
|
|
|
|
|
private: |
|
|
|
void GetComponentFromUndoList(wxCommandEvent& event); |
|
|
|
void GetComponentFromRedoList(wxCommandEvent& event); |
|
|
|
void GetComponentFromUndoList( wxCommandEvent& event ); |
|
|
|
void GetComponentFromRedoList( wxCommandEvent& event ); |
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
// Footprint edition |
|
|
|
void Place_Ancre( MODULE* module ); |
|
|
|
void RemoveStruct( EDA_BaseStruct* Item ); |
|
|
|
void Transform( MODULE* module, int transform ); |
|
|
|
void Place_Ancre( MODULE* module ); |
|
|
|
void RemoveStruct( EDA_BaseStruct* Item ); |
|
|
|
void Transform( MODULE* module, int transform ); |
|
|
|
|
|
|
|
// loading Footprint |
|
|
|
MODULE* Import_Module( wxDC* DC ); |
|
|
|
void Export_Module( MODULE* ptmod, bool createlib ); |
|
|
|
void Load_Module_From_BOARD( MODULE* Module ); |
|
|
|
MODULE* Import_Module( wxDC* DC ); |
|
|
|
void Export_Module( MODULE* ptmod, bool createlib ); |
|
|
|
void Load_Module_From_BOARD( MODULE* Module ); |
|
|
|
|
|
|
|
// functions to edit footprint edges |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Function Edit_Edge_Width |
|
|
|
* changes the width of module perimeter lines, EDGE_MODULEs. |
|
|
|
* @param ModuleSegmentWidth (global) = new width |
|
|
|
* @param Edge = edge to edit, or NULL. If Edge == NULL change |
|
|
|
* the width of all the footprint's edges |
|
|
|
* the width of all the footprint's edges |
|
|
|
* @param DC = current Device Context |
|
|
|
*/ |
|
|
|
void Edit_Edge_Width( EDGE_MODULE* Edge ); |
|
|
|
|