Commit f64b2827 authored by charras's avatar charras

BUGFIX: .mdc is incomplete after 'archive footprint'

parent 94cf5b0d
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#ifndef PCB_INTERNAL_UNIT #ifndef PCB_INTERNAL_UNIT
#define PCB_INTERNAL_UNIT 10000 #define PCB_INTERNAL_UNIT 10000
#endif #endif
...@@ -55,17 +55,17 @@ class WinEDA_BasePcbFrame : public WinEDA_DrawFrame ...@@ -55,17 +55,17 @@ class WinEDA_BasePcbFrame : public WinEDA_DrawFrame
public: public:
bool m_DisplayPadFill; // How show pads bool m_DisplayPadFill; // How show pads
bool m_DisplayPadNum; // show pads numbers bool m_DisplayPadNum; // show pads numbers
int m_DisplayModEdge; // How show module drawings int m_DisplayModEdge; // How show module drawings
int m_DisplayModText; // How show module texts int m_DisplayModText; // How show module texts
bool m_DisplayPcbTrackFill; /* FALSE : tracks are show in sketch mode, TRUE = filled */ bool m_DisplayPcbTrackFill; /* FALSE : tracks are show in sketch mode, TRUE = filled */
WinEDA3D_DrawFrame* m_Draw3DFrame; WinEDA3D_DrawFrame* m_Draw3DFrame;
WinEDA_ModuleEditFrame* m_ModuleEditFrame; WinEDA_ModuleEditFrame* m_ModuleEditFrame;
protected: protected:
GENERAL_COLLECTOR* m_Collector; GENERAL_COLLECTOR* m_Collector;
public: public:
...@@ -82,64 +82,65 @@ public: ...@@ -82,64 +82,65 @@ public:
* BOARD. * BOARD.
* @param aBoard The BOARD to put into the frame. * @param aBoard The BOARD to put into the frame.
*/ */
void SetBoard( BOARD* aBoard ); void SetBoard( BOARD* aBoard );
BOARD* GetBoard() BOARD* GetBoard()
{ {
wxASSERT( m_Pcb ); // phasing out m_Pcb for gerbview wxASSERT( m_Pcb ); // phasing out m_Pcb for gerbview
return m_Pcb; return m_Pcb;
} }
// General // General
virtual void OnCloseWindow( wxCloseEvent& Event ) = 0; virtual void OnCloseWindow( wxCloseEvent& Event ) = 0;
virtual void Process_Special_Functions( wxCommandEvent& event ) = 0; virtual void Process_Special_Functions( wxCommandEvent& event ) = 0;
virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) = 0; virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) = 0;
virtual void ReCreateHToolbar() = 0; virtual void ReCreateHToolbar() = 0;
virtual void ReCreateVToolbar() = 0; virtual void ReCreateVToolbar() = 0;
virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) = 0; virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) = 0;
virtual void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) = 0; virtual void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) = 0;
virtual bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0; virtual bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0;
virtual void ReCreateMenuBar(); virtual void ReCreateMenuBar();
virtual void SetToolID( int id, int new_cursor_id, virtual void SetToolID( int id, int new_cursor_id,
const wxString& title ); const wxString& title );
virtual void Affiche_Status_Box(); virtual void Affiche_Status_Box();
PCB_SCREEN* GetScreen() const { return (PCB_SCREEN*) WinEDA_DrawFrame::GetBaseScreen(); } PCB_SCREEN* GetScreen() const { return (PCB_SCREEN*) WinEDA_DrawFrame::GetBaseScreen(); }
BASE_SCREEN* GetBaseScreen() const; BASE_SCREEN* GetBaseScreen() const;
int BestZoom(); int BestZoom();
void Show3D_Frame( wxCommandEvent& event ); void Show3D_Frame( wxCommandEvent& event );
virtual void GeneralControle( wxDC* DC, wxPoint Mouse ); virtual void GeneralControle( wxDC* DC, wxPoint Mouse );
// Undo and redo functions // Undo and redo functions
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(); virtual void GetComponentFromUndoList();
virtual void GetComponentFromRedoList(); virtual void GetComponentFromRedoList();
public: public:
// Read/write fonctions: // Read/write fonctions:
EDA_BaseStruct* ReadDrawSegmentDescr( FILE* File, int* LineNum ); EDA_BaseStruct* ReadDrawSegmentDescr( FILE* File, int* LineNum );
int ReadListeSegmentDescr( FILE* File, int ReadListeSegmentDescr( 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( FILE* File, int* LineNum ); int ReadGeneralDescrPcb( FILE* File, int* LineNum );
// PCB handling // PCB handling
bool Clear_Pcb( bool query ); bool Clear_Pcb( bool query );
void UnDeleteItem( wxDC* DC ); void UnDeleteItem( wxDC* DC );
BOARD_ITEM* SaveItemEfface( BOARD_ITEM* aItem, int nbitems ); BOARD_ITEM* SaveItemEfface( BOARD_ITEM* aItem, int nbitems );
/** /**
...@@ -156,9 +157,9 @@ public: ...@@ -156,9 +157,9 @@ public:
* type of search to be performed. If zero, then the mouse tools will be * type of search to be performed. If zero, then the mouse tools will be
* tested instead. * tested instead.
*/ */
BOARD_ITEM* PcbGeneralLocateAndDisplay( int aHotKeyCode = 0 ); BOARD_ITEM* PcbGeneralLocateAndDisplay( int aHotKeyCode = 0 );
void ProcessItemSelection( wxCommandEvent& event ); void ProcessItemSelection( wxCommandEvent& event );
/** /**
* Function SetCurItem * Function SetCurItem
...@@ -169,14 +170,14 @@ public: ...@@ -169,14 +170,14 @@ public:
* of selecting an item to displaying it using BOARD_ITEM::Display_Infos(). * of selecting an item to displaying it using BOARD_ITEM::Display_Infos().
* @param aItem The BOARD_ITEM to make the selected item or NULL if none. * @param aItem The BOARD_ITEM to make the selected item or NULL if none.
*/ */
void SetCurItem( BOARD_ITEM* aItem ); void SetCurItem( BOARD_ITEM* aItem );
BOARD_ITEM* GetCurItem(); BOARD_ITEM* GetCurItem();
/** /**
* Function GetCollectorsGuide * Function GetCollectorsGuide
* @return GENERAL_COLLECTORS_GUIDE - that considers the global configuration options. * @return GENERAL_COLLECTORS_GUIDE - that considers the global configuration options.
*/ */
GENERAL_COLLECTORS_GUIDE GetCollectorsGuide(); GENERAL_COLLECTORS_GUIDE GetCollectorsGuide();
/** /**
...@@ -185,126 +186,138 @@ public: ...@@ -185,126 +186,138 @@ public:
* requested point is out of view. * requested point is out of view.
* @param aPos The point to go to. * @param aPos The point to go to.
*/ */
void CursorGoto( const wxPoint& aPos ); void CursorGoto( const wxPoint& aPos );
/* Place un repere sur l'ecran au point de coordonnees PCB pos */ /* Place un repere sur l'ecran au point de coordonnees PCB pos */
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 );
// Gestion des modules // Gestion des modules
void InstallModuleOptionsFrame( MODULE* Module, void InstallModuleOptionsFrame( MODULE* Module,
wxDC* DC, const wxPoint& pos ); wxDC* DC, const wxPoint& pos );
MODULE* Copie_Module( MODULE* module ); MODULE* Copie_Module( MODULE* module );
MODULE* Exchange_Module( wxWindow* winaff, MODULE* Exchange_Module( wxWindow* winaff,
MODULE* old_module, MODULE* old_module,
MODULE* new_module ); MODULE* new_module );
int Save_1_Module( const wxString& LibName, MODULE* Module,
bool Overwrite, bool DisplayDialog ); /** Function Save_Module_In_Library
void Archive_Modules( const wxString& LibName, bool NewModulesOnly ); * Save in an existing library a given footprint
MODULE* Select_1_Module_From_BOARD( BOARD* Pcb ); * @param aLibName = name of the library to use
MODULE* GetModuleByName(); * @param aModule = the given footprint
* @param aOverwrite = true to overwrite an existing footprint, false to abort an existing footprint is found
* @param aDisplayDialog = true to display a dialog to enter or confirm the footprint name
* @param aCreateDocFile = true to creates the associated doc file
* @return : 1 if OK,0 if abort
*/
int Save_Module_In_Library( const wxString& aLibName,
MODULE* aModule, bool aOverwrite,
bool aDisplayDialog, bool aCreateDocFile );
void Archive_Modules( const wxString& LibName, bool NewModulesOnly );
MODULE* Select_1_Module_From_BOARD( BOARD* Pcb );
MODULE* GetModuleByName();
// Modules (footprints) // Modules (footprints)
MODULE* Create_1_Module( wxDC* DC, const wxString& module_name ); MODULE* Create_1_Module( wxDC* DC, const wxString& module_name );
void Edit_Module( MODULE* module, wxDC* DC ); void Edit_Module( MODULE* module, wxDC* DC );
void Rotate_Module( wxDC* DC, void Rotate_Module( wxDC* DC,
MODULE* module, MODULE* module,
int angle, int angle,
bool incremental ); bool incremental );
void Place_Module( MODULE* module, wxDC* DC ); void Place_Module( MODULE* module, wxDC* DC );
void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule, void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule,
wxDC* DC, const wxPoint& pos ); wxDC* DC, const wxPoint& pos );
// Graphic items edition: // Graphic items edition:
void InstallGraphicItemPropertiesDialog(DRAWSEGMENT * aItem, wxDC* aDC); void InstallGraphicItemPropertiesDialog( DRAWSEGMENT* aItem, wxDC* aDC );
// module texts // module texts
void RotateTextModule( TEXTE_MODULE* Text, wxDC* DC ); void RotateTextModule( TEXTE_MODULE* Text, wxDC* DC );
void DeleteTextModule( TEXTE_MODULE* Text, wxDC* DC ); void DeleteTextModule( TEXTE_MODULE* Text, wxDC* DC );
void PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC ); void PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC );
void StartMoveTexteModule( TEXTE_MODULE* Text, wxDC* DC ); void StartMoveTexteModule( TEXTE_MODULE* Text, wxDC* DC );
TEXTE_MODULE* CreateTextModule( MODULE* Module, wxDC* DC ); TEXTE_MODULE* CreateTextModule( MODULE* Module, wxDC* DC );
void InstallPadOptionsFrame( D_PAD* pad, wxDC* DC, const wxPoint& pos ); void InstallPadOptionsFrame( D_PAD* pad, wxDC* DC, const wxPoint& pos );
void InstallTextModOptionsFrame( TEXTE_MODULE* TextMod, void InstallTextModOptionsFrame( TEXTE_MODULE* TextMod,
wxDC* DC, const wxPoint& pos ); wxDC* DC, const wxPoint& pos );
// Pads sur modules // Pads sur modules
void AddPad( MODULE* Module, bool draw ); void AddPad( MODULE* Module, bool draw );
void DeletePad( D_PAD* Pad, wxDC* DC ); void DeletePad( D_PAD* Pad, wxDC* DC );
void StartMovePad( D_PAD* Pad, wxDC* DC ); void StartMovePad( D_PAD* Pad, wxDC* DC );
void RotatePad( D_PAD* Pad, wxDC* DC ); void RotatePad( D_PAD* Pad, wxDC* DC );
void PlacePad( D_PAD* Pad, wxDC* DC ); void PlacePad( D_PAD* Pad, wxDC* DC );
void Export_Pad_Settings( D_PAD* aPad ); void Export_Pad_Settings( D_PAD* aPad );
void Import_Pad_Settings( D_PAD* aPad, bool aDraw ); void Import_Pad_Settings( D_PAD* aPad, bool aDraw );
void Global_Import_Pad_Settings( D_PAD* aPad, bool aDraw ); void Global_Import_Pad_Settings( D_PAD* aPad, bool aDraw );
// loading footprints // loading footprints
MODULE* Get_Librairie_Module( wxWindow* winaff, MODULE* Get_Librairie_Module( wxWindow* winaff,
const wxString& library, const wxString& library,
const wxString& ModuleName, const wxString& ModuleName,
bool show_msg_err ); bool show_msg_err );
wxString Select_1_Module_From_List( wxString Select_1_Module_From_List(
WinEDA_DrawFrame* active_window, const wxString& Library, WinEDA_DrawFrame* active_window, const wxString& Library,
const wxString& Mask, const wxString& KeyWord ); const wxString& Mask, const wxString& KeyWord );
MODULE* Load_Module_From_Library( const wxString& library, wxDC* DC ); MODULE* Load_Module_From_Library( const wxString& library, wxDC* DC );
// ratsnest functions // ratsnest functions
void Compile_Ratsnest( wxDC* DC, bool affiche ); /* Recalcul complet du chevelu */ void Compile_Ratsnest( wxDC* DC, bool affiche ); /* Recalcul complet du chevelu */
void ReCompile_Ratsnest_After_Changes( wxDC* DC ); void ReCompile_Ratsnest_After_Changes( wxDC* DC );
int Test_1_Net_Ratsnest( wxDC* DC, int net_code ); int Test_1_Net_Ratsnest( wxDC* DC, int net_code );
char* build_ratsnest_module( wxDC* DC, MODULE* Module ); char* build_ratsnest_module( wxDC* DC, MODULE* Module );
void trace_ratsnest_module( wxDC* DC ); void trace_ratsnest_module( wxDC* DC );
void Build_Board_Ratsnest( wxDC* DC ); void Build_Board_Ratsnest( wxDC* DC );
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(); /* compute and update the PAD net codes */ void recalcule_pad_net_code(); /* compute and update the PAD net codes */
void build_liste_pads(); void build_liste_pads();
int* build_ratsnest_pad( EDA_BaseStruct* ref, int* build_ratsnest_pad( EDA_BaseStruct* ref,
const wxPoint& refpos, const wxPoint& refpos,
bool init ); bool init );
void Tst_Ratsnest( wxDC* DC, int ref_netcode ); void Tst_Ratsnest( wxDC* DC, int ref_netcode );
void test_connexions( wxDC* DC ); void test_connexions( wxDC* DC );
void test_1_net_connexion( wxDC* DC, int net_code ); void test_1_net_connexion( wxDC* DC, int net_code );
void reattribution_reference_piste( int affiche ); void reattribution_reference_piste( int affiche );
// Plotting // Plotting
void ToPlotter( wxCommandEvent& event ); void ToPlotter( wxCommandEvent& event );
void Plot_Serigraphie( int format_plot, FILE* File, int masque_layer ); void Plot_Serigraphie( int format_plot, FILE* File, int masque_layer );
void Genere_GERBER( const wxString& FullFileName, int Layer, void Genere_GERBER( const wxString& FullFileName, int Layer,
bool PlotOriginIsAuxAxis ); bool PlotOriginIsAuxAxis );
void Genere_HPGL( const wxString& FullFileName, int Layer ); void Genere_HPGL( const wxString& FullFileName, int Layer );
void Genere_PS( const wxString& FullFileName, int Layer, bool useA4 ); void Genere_PS( const wxString& FullFileName, int Layer, bool useA4 );
void Plot_Layer_HPGL( FILE* File, int masque_layer, void Plot_Layer_HPGL( FILE* File, int masque_layer,
int garde, int tracevia, int modetrace ); int garde, int tracevia, int modetrace );
void Plot_Layer_GERBER( FILE* File, int masque_layer, void Plot_Layer_GERBER( FILE* File, int masque_layer,
int garde, int tracevia ); int garde, int tracevia );
void Plot_Layer_PS( FILE* File, int masque_layer, void Plot_Layer_PS( FILE* File, int masque_layer,
int garde, int tracevia, int modetrace ); int garde, int tracevia, int modetrace );
/* Block operations: */ /* Block operations: */
void Block_Delete( wxDC* DC ); void Block_Delete( wxDC* DC );
void Block_Rotate( wxDC* DC ); void Block_Rotate( wxDC* DC );
void Block_Invert( wxDC* DC ); void Block_Invert( wxDC* DC );
void Block_Move( wxDC* DC ); void Block_Move( wxDC* DC );
void Block_Duplicate( wxDC* DC ); void Block_Duplicate( wxDC* DC );
// layerhandling: // layerhandling:
// (See pcbnew/sel_layer.cpp for description of why null_layer parameter is provided) // (See pcbnew/sel_layer.cpp for description of why null_layer parameter is provided)
int SelectLayer( int default_layer, int min_layer, int max_layer, int SelectLayer( int default_layer, int min_layer, int max_layer,
bool null_layer = false ); bool null_layer = false );
void SelectLayerPair(); void SelectLayerPair();
virtual void SwitchLayer( wxDC* DC, int layer ); virtual void SwitchLayer( wxDC* DC, int layer );
// divers // divers
void AddHistory( int value, KICAD_T type ); // Add value in data list history void AddHistory( int value, KICAD_T type ); // Add value in data list history
void InstallGridFrame( const wxPoint& pos ); void InstallGridFrame( const wxPoint& pos );
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
...@@ -329,13 +342,13 @@ private: ...@@ -329,13 +342,13 @@ private:
// we'll use lower case function names for private member functions. // we'll use lower case function names for private member functions.
void createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* aPopMenu ); void createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* aPopMenu );
void createPopUpMenuForFootprints( MODULE* aModule, wxMenu* aPopMenu ); void createPopUpMenuForFootprints( MODULE* aModule, wxMenu* aPopMenu );
void createPopUpMenuForFpTexts( TEXTE_MODULE* aText, wxMenu* aPopMenu ); void createPopUpMenuForFpTexts( TEXTE_MODULE* aText, wxMenu* aPopMenu );
void createPopUpMenuForFpPads( D_PAD* aPad, wxMenu* aPopMenu ); void createPopUpMenuForFpPads( D_PAD* aPad, wxMenu* aPopMenu );
void createPopupMenuForTracks( TRACK* aTrack, wxMenu* aPopMenu ); void createPopupMenuForTracks( TRACK* aTrack, wxMenu* aPopMenu );
void createPopUpMenuForTexts( TEXTE_PCB* Text, wxMenu* menu ); void createPopUpMenuForTexts( TEXTE_PCB* Text, wxMenu* menu );
void createPopUpBlockMenu( wxMenu* menu ); void createPopUpBlockMenu( wxMenu* menu );
public: public:
WinEDA_PcbFrame( wxWindow* father, const wxString& title, WinEDA_PcbFrame( wxWindow* father, const wxString& title,
...@@ -344,40 +357,40 @@ public: ...@@ -344,40 +357,40 @@ public:
~WinEDA_PcbFrame(); ~WinEDA_PcbFrame();
void GetKicadAbout( wxCommandEvent& event ); void GetKicadAbout( wxCommandEvent& event );
// Configurations: // Configurations:
void InstallConfigFrame( const wxPoint& pos ); void InstallConfigFrame( const wxPoint& pos );
void Process_Config( wxCommandEvent& event ); void Process_Config( wxCommandEvent& event );
void Update_config( wxWindow* displayframe ); void Update_config( wxWindow* displayframe );
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 ); bool OnHotkeyDeleteItem( wxDC* DC, EDA_BaseStruct* DrawStruct );
void OnCloseWindow( wxCloseEvent& Event ); void OnCloseWindow( wxCloseEvent& Event );
void Process_Special_Functions( wxCommandEvent& event ); void Process_Special_Functions( wxCommandEvent& event );
void ProcessMuWaveFunctions( wxCommandEvent& event ); void ProcessMuWaveFunctions( wxCommandEvent& event );
void MuWaveCommand( wxDC* DC, const wxPoint& MousePos ); void MuWaveCommand( wxDC* DC, const wxPoint& MousePos );
void RedrawActiveWindow( wxDC* DC, bool EraseBg ); void RedrawActiveWindow( wxDC* DC, bool EraseBg );
void ReCreateHToolbar(); void ReCreateHToolbar();
void ReCreateAuxiliaryToolbar(); void ReCreateAuxiliaryToolbar();
void ReCreateVToolbar(); void ReCreateVToolbar();
void ReCreateAuxVToolbar(); void ReCreateAuxVToolbar();
void ReCreateOptToolbar(); void ReCreateOptToolbar();
void ReCreateMenuBar(); void ReCreateMenuBar();
WinEDAChoiceBox* ReCreateLayerBox( WinEDA_Toolbar* parent ); WinEDAChoiceBox* ReCreateLayerBox( WinEDA_Toolbar* parent );
/** /**
* Function UpdateToolbarLayerInfo * Function UpdateToolbarLayerInfo
* updates the currently selected layer in the layer listbox and * updates the currently selected layer in the layer listbox and
* the colored icon in the toolbar. * the colored icon in the toolbar.
*/ */
void UpdateToolbarLayerInfo(); void UpdateToolbarLayerInfo();
void PrepareLayerIndicator(); void PrepareLayerIndicator();
void OnLeftClick( wxDC* DC, const wxPoint& MousePos ); void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ); void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
/** /**
* Function OnRightClick * Function OnRightClick
...@@ -386,35 +399,35 @@ public: ...@@ -386,35 +399,35 @@ public:
* @param aMousePos The current mouse position * @param aMousePos The current mouse position
* @param aPopMenu The menu to add to. * @param aPopMenu The menu to add to.
*/ */
bool OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ); bool OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu );
void OnSelectOptionToolbar( wxCommandEvent& event ); void OnSelectOptionToolbar( wxCommandEvent& event );
void ToolOnRightClick( wxCommandEvent& event ); void ToolOnRightClick( wxCommandEvent& event );
/* Gestion generale des operations sur block */ /* Gestion generale des operations sur block */
int ReturnBlockCommand( int key ); int ReturnBlockCommand( int key );
void HandleBlockPlace( wxDC* DC ); void HandleBlockPlace( wxDC* DC );
int HandleBlockEnd( wxDC* DC ); int HandleBlockEnd( wxDC* DC );
void SetToolbars(); void SetToolbars();
void Process_Settings( wxCommandEvent& event ); void Process_Settings( wxCommandEvent& event );
void InstallPcbOptionsFrame( const wxPoint& pos, wxDC* DC, int id ); void InstallPcbOptionsFrame( const wxPoint& pos, wxDC* DC, int id );
void InstallPcbGlobalDeleteFrame( const wxPoint& pos ); void InstallPcbGlobalDeleteFrame( const wxPoint& pos );
void GenModulesPosition( wxCommandEvent& event ); void GenModulesPosition( wxCommandEvent& event );
void GenModuleReport( wxCommandEvent& event ); void GenModuleReport( wxCommandEvent& event );
void InstallDrillFrame( wxCommandEvent& event ); void InstallDrillFrame( wxCommandEvent& event );
void ToPostProcess( wxCommandEvent& event ); void ToPostProcess( wxCommandEvent& event );
void Files_io( wxCommandEvent& event ); void Files_io( wxCommandEvent& event );
int LoadOnePcbFile( const wxString& FileName, bool Append ); int LoadOnePcbFile( const wxString& FileName, bool Append );
int ReadPcbFile( FILE* File, bool Append ); int ReadPcbFile( FILE* File, bool Append );
bool SavePcbFile( const wxString& FileName ); bool SavePcbFile( const wxString& FileName );
int SavePcbFormatAscii( FILE* File ); int SavePcbFormatAscii( FILE* File );
bool WriteGeneralDescrPcb( FILE* File ); bool WriteGeneralDescrPcb( FILE* File );
bool RecreateCmpFileFromBoard(); bool RecreateCmpFileFromBoard();
void ExportToGenCAD( wxCommandEvent& event ); void ExportToGenCAD( wxCommandEvent& event );
/** /**
* Function ExporttoSPECCTRA * Function ExporttoSPECCTRA
...@@ -422,7 +435,7 @@ public: ...@@ -422,7 +435,7 @@ public:
* See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the * See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the
* specification. * specification.
*/ */
void ExportToSpecctra( wxCommandEvent& event ); void ExportToSpecctra( wxCommandEvent& event );
/** /**
* Function ImportSpecctraSession * Function ImportSpecctraSession
...@@ -431,7 +444,7 @@ public: ...@@ -431,7 +444,7 @@ public:
* See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the * See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the
* specification. * specification.
*/ */
void ImportSpecctraSession( wxCommandEvent& event ); void ImportSpecctraSession( wxCommandEvent& event );
/** /**
* Function ImportSpecctraDesign * Function ImportSpecctraDesign
...@@ -440,55 +453,55 @@ public: ...@@ -440,55 +453,55 @@ public:
* See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the * See http://www.autotraxeda.com/docs/SPECCTRA/SPECCTRA.pdf for the
* specification. * specification.
*/ */
void ImportSpecctraDesign( wxCommandEvent& event ); void ImportSpecctraDesign( wxCommandEvent& event );
/** /**
* Function Access_to_External_Tool * Function Access_to_External_Tool
* Run an external tool (like freeroute ) * Run an external tool (like freeroute )
*/ */
void Access_to_External_Tool( wxCommandEvent& event ); void Access_to_External_Tool( wxCommandEvent& event );
/* Fonctions specifiques */ /* Fonctions specifiques */
MODULE* ListAndSelectModuleName(); MODULE* ListAndSelectModuleName();
void Liste_Equipot( wxCommandEvent& event ); void Liste_Equipot( wxCommandEvent& event );
void Swap_Layers( wxCommandEvent& event ); void Swap_Layers( wxCommandEvent& event );
void Install_Test_DRC_Frame( wxDC* DC ); void Install_Test_DRC_Frame( wxDC* DC );
// Handling texts on the board // Handling texts on the board
void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
TEXTE_PCB* Create_Texte_Pcb( wxDC* DC ); TEXTE_PCB* Create_Texte_Pcb( wxDC* DC );
void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
void StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC ); void StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC );
void Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); void Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
void InstallTextPCBOptionsFrame( TEXTE_PCB* TextPCB, wxDC* DC ); void InstallTextPCBOptionsFrame( TEXTE_PCB* TextPCB, wxDC* DC );
// Graphic Segments type DRAWSEGMENT // Graphic Segments type DRAWSEGMENT
void Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC ); void Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
void Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC ); void Place_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC );
// Footprint edition (see also WinEDA_BasePcbFrame) // Footprint edition (see also WinEDA_BasePcbFrame)
void StartMove_Module( MODULE* module, wxDC* DC ); void StartMove_Module( MODULE* module, wxDC* DC );
bool Delete_Module( MODULE* module, wxDC* DC, bool aAskBeforeDeleting ); bool Delete_Module( MODULE* module, wxDC* DC, bool aAskBeforeDeleting );
// loading modules: see WinEDA_BasePcbFrame // loading modules: see WinEDA_BasePcbFrame
// Board handling // Board handling
void Erase_Zones( bool query ); void Erase_Zones( bool query );
void Erase_Segments_Pcb( bool is_edges, bool query ); void Erase_Segments_Pcb( bool is_edges, bool query );
void Erase_Pistes( wxDC* DC, int masque_type, bool query ); void Erase_Pistes( wxDC* DC, int masque_type, bool query );
void Erase_Modules( bool query ); void Erase_Modules( bool query );
void Erase_Textes_Pcb( bool query ); void Erase_Textes_Pcb( bool query );
void Erase_Marqueurs(); void Erase_Marqueurs();
void RemoveStruct( BOARD_ITEM* Item, wxDC* DC ); void RemoveStruct( BOARD_ITEM* Item, wxDC* DC );
void Via_Edit_Control( wxDC* DC, int command_type, SEGVIA* via ); void Via_Edit_Control( wxDC* DC, int command_type, SEGVIA* via );
// Hightlight functions: // Hightlight functions:
int Select_High_Light( wxDC* DC ); int Select_High_Light( wxDC* DC );
void Hight_Light( wxDC* DC ); void Hight_Light( wxDC* DC );
void DrawHightLight( wxDC* DC, int NetCode ); void DrawHightLight( wxDC* DC, int NetCode );
// Track and via edition: // Track and via edition:
void DisplayTrackSettings(); void DisplayTrackSettings();
/** /**
* Function Other_Layer_Route * Function Other_Layer_Route
...@@ -502,30 +515,30 @@ public: ...@@ -502,30 +515,30 @@ public:
* @return bool - true if the operation was successful, else false such as * @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 ); bool Other_Layer_Route( TRACK* track, wxDC* DC );
void Affiche_PadsNoConnect( wxDC* DC ); void Affiche_PadsNoConnect( wxDC* DC );
void Affiche_Status_Net( wxDC* DC ); void Affiche_Status_Net( wxDC* DC );
TRACK* Delete_Segment( wxDC* DC, TRACK* Track ); TRACK* Delete_Segment( wxDC* DC, TRACK* Track );
void Delete_Track( wxDC* DC, TRACK* Track ); void Delete_Track( wxDC* DC, TRACK* Track );
void Delete_net( wxDC* DC, TRACK* Track ); void Delete_net( wxDC* DC, TRACK* Track );
void Remove_One_Track( wxDC* DC, TRACK* pt_segm ); void Remove_One_Track( wxDC* DC, TRACK* pt_segm );
bool Resize_Pistes_Vias( wxDC* DC, bool Track, bool Via ); bool Resize_Pistes_Vias( wxDC* DC, bool Track, bool Via );
void Edit_Net_Width( wxDC* DC, int Netcode ); void Edit_Net_Width( wxDC* DC, int Netcode );
void Edit_Track_Width( wxDC* DC, TRACK* Track ); void Edit_Track_Width( wxDC* DC, TRACK* Track );
int Edit_TrackSegm_Width( wxDC* DC, TRACK* segm ); int Edit_TrackSegm_Width( wxDC* DC, TRACK* segm );
TRACK* Begin_Route( TRACK* track, wxDC* DC ); TRACK* Begin_Route( TRACK* track, wxDC* DC );
void End_Route( TRACK* track, wxDC* DC ); void End_Route( TRACK* track, wxDC* DC );
void ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC ); void ExChange_Track_Layer( TRACK* pt_segm, wxDC* DC );
void Attribut_Segment( TRACK* track, wxDC* DC, bool Flag_On ); void Attribut_Segment( TRACK* track, wxDC* DC, bool Flag_On );
void Attribut_Track( 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 Attribut_net( wxDC* DC, int net_code, bool Flag_On );
void Start_MoveOneNodeOrSegment( TRACK* track, wxDC* DC, int command ); void Start_MoveOneNodeOrSegment( TRACK* track, wxDC* DC, int command );
bool PlaceDraggedTrackSegment( TRACK* Track, wxDC* DC ); bool PlaceDraggedTrackSegment( TRACK* Track, wxDC* DC );
bool MergeCollinearTracks( TRACK* track, wxDC* DC, int end ); bool MergeCollinearTracks( TRACK* track, wxDC* DC, int end );
void Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC ); void Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC );
void SwitchLayer( wxDC* DC, int layer ); void SwitchLayer( wxDC* DC, int layer );
bool Add_45_degrees_Segment( wxDC* DC ); bool Add_45_degrees_Segment( wxDC* DC );
bool Genere_Pad_Connexion( wxDC* DC, int layer ); bool Genere_Pad_Connexion( wxDC* DC, int layer );
// zone handling // zone handling
...@@ -536,8 +549,7 @@ public: ...@@ -536,8 +549,7 @@ public:
* @param aZone = zone segment within the zone to delete. Can be NULL * @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( wxDC* DC, SEGZONE* Track, long aTimestamp = 0 ); void Delete_Zone_Fill( wxDC* DC, SEGZONE* Track, long aTimestamp = 0 );
/** Function Delete_LastCreatedCorner /** Function Delete_LastCreatedCorner
...@@ -545,14 +557,14 @@ public: ...@@ -545,14 +557,14 @@ public:
* Remove and delete the current outline segment in progress * Remove and delete the current outline segment in progress
* @return 0 if no corner in list, or corner number * @return 0 if no corner in list, or corner number
*/ */
int Delete_LastCreatedCorner( wxDC* DC); int Delete_LastCreatedCorner( wxDC* DC );
/** /**
* Function Begin_Zone * Function Begin_Zone
* initiates a zone edge creation process, * initiates a zone edge creation process,
* or terminates the current zone edge and creates a new zone edge stub * 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 * Function End_Zone
...@@ -560,7 +572,7 @@ public: ...@@ -560,7 +572,7 @@ public:
* @param DC = current Device Context * @param DC = current Device Context
* @return true if Ok, false if DRC error * @return true if Ok, false if DRC error
*/ */
bool End_Zone( wxDC* DC ); bool End_Zone( wxDC* DC );
/** Function Fill_Zone() /** Function Fill_Zone()
* Calculate the zone filling for the outline zone_container * Calculate the zone filling for the outline zone_container
...@@ -572,7 +584,7 @@ public: ...@@ -572,7 +584,7 @@ public:
* @param verbose = true to show error messages * @param verbose = true to show error messages
* @return error level (0 = no error) * @return error level (0 = no error)
*/ */
int Fill_Zone( wxDC* DC, ZONE_CONTAINER* zone_container, bool verbose = TRUE ); int Fill_Zone( wxDC* DC, ZONE_CONTAINER* zone_container, bool verbose = TRUE );
/** Function Fill_All_Zones() /** Function Fill_All_Zones()
* Fill all zones on the board * Fill all zones on the board
...@@ -580,7 +592,7 @@ public: ...@@ -580,7 +592,7 @@ public:
* @param verbose = true to show error messages * @param verbose = true to show error messages
* @return error level (0 = no error) * @return error level (0 = no error)
*/ */
int Fill_All_Zones( bool verbose = TRUE ); int Fill_All_Zones( bool verbose = TRUE );
/** /**
...@@ -589,7 +601,7 @@ public: ...@@ -589,7 +601,7 @@ public:
* @param DC = current Device Context * @param DC = current Device Context
* @param zone_container = parent zone outline * @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 * Function Add_Similar_Zone
...@@ -598,13 +610,13 @@ public: ...@@ -598,13 +610,13 @@ public:
* @param DC = current Device Context * @param DC = current Device Context
* @param zone_container = parent zone outline * @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 * Function Edit_Zone_Params
* Edit params (layer, clearance, ...) for a zone outline * 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 * Function Start_Move_Zone_Corner
...@@ -612,18 +624,18 @@ public: ...@@ -612,18 +624,18 @@ public:
* called from a move corner command (IsNewCorner = false), * called from a move corner command (IsNewCorner = false),
* or a create new cornet command (IsNewCorner = true ) * or a create new cornet command (IsNewCorner = true )
*/ */
void Start_Move_Zone_Corner( wxDC* DC, void Start_Move_Zone_Corner( wxDC* DC,
ZONE_CONTAINER* zone_container, ZONE_CONTAINER* zone_container,
int corner_id, int corner_id,
bool IsNewCorner ); bool IsNewCorner );
/** /**
* Function Start_Move_Zone_Corner * Function Start_Move_Zone_Corner
* Prepares a drag edge in an existing zone outline, * Prepares a drag edge in an existing zone outline,
*/ */
void Start_Move_Zone_Drag_Outline_Edge( wxDC* DC, void Start_Move_Zone_Drag_Outline_Edge( wxDC* DC,
ZONE_CONTAINER* zone_container, ZONE_CONTAINER* zone_container,
int corner_id ); int corner_id );
/** /**
* Function End_Move_Zone_Corner_Or_Outlines * Function End_Move_Zone_Corner_Or_Outlines
...@@ -631,14 +643,14 @@ public: ...@@ -631,14 +643,14 @@ public:
* @param DC = current Device Context (can be NULL) * @param DC = current Device Context (can be NULL)
* @param zone_container: the given zone * @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 * Function End_Move_Zone_Corner_Or_Outlines
* Remove the currently selected corner in a zone outline * Remove the currently selected corner in a zone outline
* the .m_CornerSelection is used as corner selection * the .m_CornerSelection is used as corner selection
*/ */
void Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_container ); void Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_container );
/** Function Delete_Zone /** Function Delete_Zone
* Remove the zone which include the segment aZone, or the zone which have the given time stamp. * Remove the zone which include the segment aZone, or the zone which have the given time stamp.
...@@ -649,7 +661,7 @@ public: ...@@ -649,7 +661,7 @@ public:
* if the outline is the main outline, all the zone is removed * if the outline is the main outline, all the zone is removed
* otherwise, the hole is deleted * otherwise, the hole is deleted
*/ */
void Delete_Zone_Contour( wxDC* DC, ZONE_CONTAINER* zone_container ); void Delete_Zone_Contour( wxDC* DC, ZONE_CONTAINER* zone_container );
/** /**
* Function Start_Move_Zone_Outlines * Function Start_Move_Zone_Outlines
...@@ -657,67 +669,69 @@ public: ...@@ -657,67 +669,69 @@ public:
* @param DC = current Device Context (can be NULL) * @param DC = current Device Context (can be NULL)
* @param zone_container: the given zone to move * @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 // Target handling
MIREPCB* Create_Mire( wxDC* DC ); MIREPCB* Create_Mire( wxDC* DC );
void Delete_Mire( MIREPCB* MirePcb, wxDC* DC ); void Delete_Mire( MIREPCB* MirePcb, wxDC* DC );
void StartMove_Mire( MIREPCB* MirePcb, wxDC* DC ); void StartMove_Mire( MIREPCB* MirePcb, wxDC* DC );
void Place_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: // Graphic segments type DRAWSEGMENT handling:
DRAWSEGMENT* Begin_DrawSegment( DRAWSEGMENT* Segment, int shape, wxDC* DC ); DRAWSEGMENT* Begin_DrawSegment( DRAWSEGMENT* Segment, int shape, wxDC* DC );
void End_Edge( DRAWSEGMENT* Segment, wxDC* DC ); void End_Edge( DRAWSEGMENT* Segment, wxDC* DC );
void Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC ); void Delete_Segment_Edge( DRAWSEGMENT* Segment, wxDC* DC );
void Delete_Drawings_All_Layer( DRAWSEGMENT* Segment, wxDC* DC ); void Delete_Drawings_All_Layer( DRAWSEGMENT* Segment, wxDC* DC );
// Dimension handling: // 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 ); COTATION* Begin_Cotation( COTATION* Cotation, wxDC* DC );
void Delete_Cotation( COTATION* Cotation, wxDC* DC ); void Delete_Cotation( COTATION* Cotation, wxDC* DC );
// netlist handling: // netlist handling:
void InstallNetlistFrame( wxDC* DC, const wxPoint& pos ); void InstallNetlistFrame( wxDC* DC, const wxPoint& pos );
// Autoplacement: // Autoplacement:
void AutoPlace( wxCommandEvent& event ); void AutoPlace( wxCommandEvent& event );
/** function OnOrientFootprints /** function OnOrientFootprints
* install the dialog box for the comman Orient Footprints * install the dialog box for the comman Orient Footprints
*/ */
void OnOrientFootprints( void ); void OnOrientFootprints( void );
/** function ReOrientModules /** function ReOrientModules
* Set the orientation of footprints * Set the orientation of footprints
* @param ModuleMask = mask (wildcard allowed) selection * @param ModuleMask = mask (wildcard allowed) selection
* @param Orient = new orientation * @param Orient = new orientation
* @param include_fixe = true to orient locked footprints * @param include_fixe = true to orient locked footprints
*/ */
void ReOrientModules( const wxString& ModuleMask, int Orient, void ReOrientModules( const wxString& ModuleMask, int Orient,
bool include_fixe ); bool include_fixe );
void FixeModule( MODULE* Module, bool Fixe ); void FixeModule( MODULE* Module, bool Fixe );
void AutoMoveModulesOnPcb( wxDC* DC, bool PlaceModulesHorsPcb ); void AutoMoveModulesOnPcb( wxDC* DC, bool PlaceModulesHorsPcb );
bool SetBoardBoundaryBoxFromEdgesOnly(); bool SetBoardBoundaryBoxFromEdgesOnly();
void AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ); void AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC );
int RecherchePlacementModule( MODULE* Module, wxDC* DC ); int RecherchePlacementModule( MODULE* Module, wxDC* DC );
void GenModuleOnBoard( MODULE* Module ); void GenModuleOnBoard( MODULE* Module );
float Compute_Ratsnest_PlaceModule( wxDC* DC ); float Compute_Ratsnest_PlaceModule( wxDC* DC );
int GenPlaceBoard(); int GenPlaceBoard();
void DrawInfoPlace( wxDC* DC ); void DrawInfoPlace( wxDC* DC );
// Autorouting: // Autorouting:
int Solve( wxDC* DC, int two_sides ); int Solve( wxDC* DC, int two_sides );
void Reset_Noroutable( wxDC* DC ); void Reset_Noroutable( wxDC* DC );
void Autoroute( wxDC* DC, int mode ); void Autoroute( wxDC* DC, int mode );
void ReadAutoroutedTracks( wxDC* DC ); void ReadAutoroutedTracks( wxDC* DC );
void GlobalRoute( wxDC* DC ); void GlobalRoute( wxDC* DC );
// divers // divers
void Show_1_Ratsnest( EDA_BaseStruct* item, wxDC* DC ); void Show_1_Ratsnest( EDA_BaseStruct* item, wxDC* DC );
void Ratsnest_On_Off( wxDC* DC ); void Ratsnest_On_Off( wxDC* DC );
void Clean_Pcb( wxDC* DC ); void Clean_Pcb( wxDC* DC );
void InstallFindFrame( const wxPoint& pos, wxDC* DC ); void InstallFindFrame( const wxPoint& pos, wxDC* DC );
/** /**
* Function SendMessageToEESCHEMA * Function SendMessageToEESCHEMA
...@@ -725,15 +739,15 @@ public: ...@@ -725,15 +739,15 @@ public:
* to a part with the same reference as the objectToSync * 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 syncronize eeschema.
*/ */
void SendMessageToEESCHEMA( BOARD_ITEM* objectToSync ); void SendMessageToEESCHEMA( BOARD_ITEM* objectToSync );
/* Micro waves functions */ /* Micro waves functions */
void Edit_Gap( wxDC* DC, MODULE* Module ); void Edit_Gap( wxDC* DC, MODULE* Module );
MODULE* Create_MuWaveBasicShape( const wxString& name, int pad_count ); MODULE* Create_MuWaveBasicShape( const wxString& name, int pad_count );
MODULE* Create_MuWaveComponent( int shape_type ); MODULE* Create_MuWaveComponent( int shape_type );
MODULE* Create_MuWavePolygonShape( ); MODULE* Create_MuWavePolygonShape();
void Begin_Self( wxDC* DC ); void Begin_Self( wxDC* DC );
MODULE* Genere_Self( wxDC* DC ); MODULE* Genere_Self( wxDC* DC );
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
...@@ -758,57 +772,57 @@ public: ...@@ -758,57 +772,57 @@ public:
~WinEDA_GerberFrame(); ~WinEDA_GerberFrame();
void Update_config(); void Update_config();
void OnCloseWindow( wxCloseEvent& Event ); void OnCloseWindow( wxCloseEvent& Event );
void Process_Special_Functions( wxCommandEvent& event ); void Process_Special_Functions( wxCommandEvent& event );
void RedrawActiveWindow( wxDC* DC, bool EraseBg ); void RedrawActiveWindow( wxDC* DC, bool EraseBg );
void ReCreateHToolbar(); void ReCreateHToolbar();
void ReCreateVToolbar(); void ReCreateVToolbar();
void ReCreateOptToolbar(); void ReCreateOptToolbar();
void ReCreateMenuBar(); void ReCreateMenuBar();
void OnLeftClick( wxDC* DC, const wxPoint& MousePos ); void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ); void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ); bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu );
int BestZoom(); // Retourne le meilleur zoom int BestZoom(); // Retourne le meilleur zoom
void OnSelectOptionToolbar( wxCommandEvent& event ); void OnSelectOptionToolbar( wxCommandEvent& event );
void OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct ); void OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct );
BOARD_ITEM* GerberGeneralLocateAndDisplay(); BOARD_ITEM* GerberGeneralLocateAndDisplay();
BOARD_ITEM* Locate( int typeloc ); BOARD_ITEM* Locate( int typeloc );
void SetToolbars(); void SetToolbars();
void Process_Settings( wxCommandEvent& event ); void Process_Settings( wxCommandEvent& event );
void Process_Config( wxCommandEvent& event ); void Process_Config( wxCommandEvent& event );
void InstallConfigFrame( const wxPoint& pos ); void InstallConfigFrame( const wxPoint& pos );
void InstallPcbOptionsFrame( const wxPoint& pos, int id ); void InstallPcbOptionsFrame( const wxPoint& pos, int id );
void InstallPcbGlobalDeleteFrame( const wxPoint& pos ); void InstallPcbGlobalDeleteFrame( const wxPoint& pos );
/* handlers for block commands */ /* handlers for block commands */
int ReturnBlockCommand( int key ); int ReturnBlockCommand( int key );
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 );
void Genere_GERBER( const wxString& FullFileName, int Layers ); void Genere_GERBER( const wxString& FullFileName, int Layers );
void Genere_PS( const wxString& FullFileName, int Layers ); void Genere_PS( const wxString& FullFileName, int Layers );
void Plot_Layer_HPGL( FILE* File, int masque_layer, void Plot_Layer_HPGL( FILE* File, int masque_layer,
int garde, int tracevia, int modetrace ); int garde, int tracevia, int modetrace );
void Plot_Layer_GERBER( FILE* File, int masque_layer, void Plot_Layer_GERBER( FILE* File, int masque_layer,
int garde, int tracevia ); int garde, int tracevia );
int Gen_D_CODE_File( const wxString& Name_File ); int Gen_D_CODE_File( const wxString& Name_File );
void Plot_Layer_PS( FILE* File, int masque_layer, void Plot_Layer_PS( FILE* File, int masque_layer,
int garde, int tracevia, int modetrace ); int garde, int tracevia, int modetrace );
void Files_io( wxCommandEvent& event ); void Files_io( wxCommandEvent& event );
int LoadOneGerberFile( const wxString& FileName, wxDC* DC, int mode ); int LoadOneGerberFile( const wxString& FileName, wxDC* DC, int mode );
int ReadGerberFile( wxDC* DC, FILE* File, bool Append ); int ReadGerberFile( wxDC* DC, FILE* File, bool Append );
bool Read_GERBER_File( wxDC* DC, bool Read_GERBER_File( wxDC* DC,
const wxString& GERBER_FullFileName, const wxString& GERBER_FullFileName,
const wxString& D_Code_FullFileName ); const wxString& D_Code_FullFileName );
bool SaveGerberFile( const wxString& FileName, wxDC* DC ); bool SaveGerberFile( const wxString& FileName, wxDC* DC );
/** /**
...@@ -831,36 +845,36 @@ public: ...@@ -831,36 +845,36 @@ public:
* 0 = the \a D_Code_FullFileName is empty, no reading is done but an empty GERBER is put into g_GERBER_List[]<br> * 0 = the \a D_Code_FullFileName is empty, no reading is done but an empty GERBER is put into g_GERBER_List[]<br>
* 1 = read OK<br> * 1 = read OK<br>
*/ */
int Read_D_Code_File( const wxString& D_Code_FullFileName ); int Read_D_Code_File( const wxString& D_Code_FullFileName );
void CopyDCodesSizeToItems(); void CopyDCodesSizeToItems();
void Liste_D_Codes( wxDC* DC ); void Liste_D_Codes( wxDC* DC );
/* Fonctions specifiques */ /* Fonctions specifiques */
void Trace_Gerber( wxDC* DC, int draw_mode, int printmasklayer ); void Trace_Gerber( wxDC* DC, int draw_mode, int printmasklayer );
// Copper texts // Copper texts
void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); void Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
TEXTE_PCB* Create_Texte_Pcb( wxDC* DC ); TEXTE_PCB* Create_Texte_Pcb( wxDC* DC );
void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); void Delete_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
void StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC ); void StartMoveTextePcb( TEXTE_PCB* TextePcb, wxDC* DC );
void Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ); void Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
// PCB handling // PCB handling
bool Clear_Pcb( bool query ); bool Clear_Pcb( bool query );
void Erase_Current_Layer( bool query ); void Erase_Current_Layer( bool query );
void Erase_Zones( bool query ); void Erase_Zones( bool query );
void Erase_Segments_Pcb( bool is_edges, bool query ); void Erase_Segments_Pcb( bool is_edges, bool query );
void Erase_Pistes( int masque_type, bool query ); void Erase_Pistes( int masque_type, bool query );
void Erase_Textes_Pcb( bool query ); void Erase_Textes_Pcb( bool query );
void Delete_DCode_Items( wxDC* DC, int dcode_value, int layer_number ); void Delete_DCode_Items( wxDC* DC, int dcode_value, int layer_number );
TRACK* Begin_Route( TRACK* track, wxDC* DC ); TRACK* Begin_Route( TRACK* track, wxDC* DC );
void End_Route( TRACK* track, wxDC* DC ); void End_Route( TRACK* track, wxDC* DC );
TRACK* Delete_Segment( wxDC* DC, TRACK* Track ); TRACK* Delete_Segment( wxDC* DC, TRACK* Track );
int Edit_TrackSegm_Width( wxDC* DC, TRACK* segm ); int Edit_TrackSegm_Width( wxDC* DC, TRACK* segm );
// Conversion function // Conversion function
void ExportDataInPcbnewFormat( wxCommandEvent& event ); void ExportDataInPcbnewFormat( wxCommandEvent& event );
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
...@@ -885,65 +899,65 @@ public: ...@@ -885,65 +899,65 @@ public:
~WinEDA_ModuleEditFrame(); ~WinEDA_ModuleEditFrame();
void InstallOptionsFrame( const wxPoint& pos ); void InstallOptionsFrame( const wxPoint& pos );
void OnCloseWindow( wxCloseEvent& Event ); void OnCloseWindow( wxCloseEvent& Event );
void Process_Special_Functions( wxCommandEvent& event ); void Process_Special_Functions( wxCommandEvent& event );
void RedrawActiveWindow( wxDC* DC, bool EraseBg ); void RedrawActiveWindow( wxDC* DC, bool EraseBg );
void ReCreateHToolbar(); void ReCreateHToolbar();
void ReCreateVToolbar(); void ReCreateVToolbar();
void ReCreateOptToolbar(); void ReCreateOptToolbar();
void ReCreateAuxiliaryToolbar(); void ReCreateAuxiliaryToolbar();
void OnLeftClick( wxDC* DC, const wxPoint& MousePos ); void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ); void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ); bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu );
void SetToolbars(); void SetToolbars();
void ReCreateMenuBar(); void ReCreateMenuBar();
void ToolOnRightClick( wxCommandEvent& event ); void ToolOnRightClick( wxCommandEvent& event );
void OnSelectOptionToolbar( wxCommandEvent& event ); void OnSelectOptionToolbar( wxCommandEvent& event );
void OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct ); void OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct );
/* handlers for block commands */ /* handlers for block commands */
int ReturnBlockCommand( int key ); int ReturnBlockCommand( int key );
virtual void HandleBlockPlace( wxDC* DC ); virtual void HandleBlockPlace( wxDC* DC );
virtual int HandleBlockEnd( wxDC* DC ); virtual int HandleBlockEnd( wxDC* DC );
BOARD_ITEM* ModeditLocateAndDisplay( int aHotKeyCode = 0 ); BOARD_ITEM* ModeditLocateAndDisplay( int aHotKeyCode = 0 );
/* Undo and redo functions */ /* Undo and redo functions */
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 GetComponentFromUndoList();
void GetComponentFromRedoList(); void GetComponentFromRedoList();
public: public:
// Footprint edition // Footprint edition
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 );
void Transform( MODULE* module, wxDC* DC, int transform ); void Transform( MODULE* module, wxDC* DC, int transform );
// loading Footprint // loading Footprint
MODULE* Import_Module( wxDC* DC ); MODULE* Import_Module( wxDC* DC );
void Export_Module( MODULE* ptmod, bool createlib ); void Export_Module( MODULE* ptmod, bool createlib );
void Load_Module_Module_From_BOARD( MODULE* Module ); void Load_Module_Module_From_BOARD( MODULE* Module );
// functions to edit footprint edges // functions to edit footprint edges
void Edit_Edge_Width( EDGE_MODULE* Edge, wxDC* DC ); void Edit_Edge_Width( EDGE_MODULE* Edge, wxDC* DC );
void Edit_Edge_Layer( EDGE_MODULE* Edge, wxDC* DC ); void Edit_Edge_Layer( EDGE_MODULE* Edge, wxDC* DC );
void Delete_Edge_Module( EDGE_MODULE* Edge, wxDC* DC ); void Delete_Edge_Module( EDGE_MODULE* Edge, wxDC* DC );
EDGE_MODULE* Begin_Edge_Module( EDGE_MODULE* Edge, wxDC* DC, int type_edge ); EDGE_MODULE* Begin_Edge_Module( EDGE_MODULE* Edge, wxDC* DC, int type_edge );
void End_Edge_Module( EDGE_MODULE* Edge, wxDC* DC ); void End_Edge_Module( EDGE_MODULE* Edge, wxDC* DC );
void Enter_Edge_Width( EDGE_MODULE* Edge, wxDC* DC ); void Enter_Edge_Width( EDGE_MODULE* Edge, wxDC* DC );
void Start_Move_EdgeMod( EDGE_MODULE* drawitem, wxDC* DC ); void Start_Move_EdgeMod( EDGE_MODULE* drawitem, wxDC* DC );
void Place_EdgeMod( EDGE_MODULE* drawitem, wxDC* DC ); void Place_EdgeMod( EDGE_MODULE* drawitem, wxDC* DC );
// handlers for libraries: // handlers for libraries:
void Delete_Module_In_Library( const wxString& libname ); void Delete_Module_In_Library( const wxString& libname );
int Create_Librairie( const wxString& LibName ); int Create_Librairie( const wxString& LibName );
void Select_Active_Library(); void Select_Active_Library();
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
......
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
* $EndLIBRARY * $EndLIBRARY
*/ */
#define OLD_EXT wxT( ".bak" ) #define OLD_EXT wxT( ".bak" )
#define FILETMP_EXT wxT( ".$$$" ) #define FILETMP_EXT wxT( ".$$$" )
#define EXPORT_IMPORT_LASTPATH_KEY wxT("import_last_path") #define EXPORT_IMPORT_LASTPATH_KEY wxT( "import_last_path" )
/* Fonctions locales */ /* Fonctions locales */
static bool CreateDocLibrary( const wxString& LibName ); static bool CreateDocLibrary( const wxString& LibName );
...@@ -43,28 +43,29 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( wxDC* DC ) ...@@ -43,28 +43,29 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( wxDC* DC )
* @param DC = Current Device Context (can be NULL) * @param DC = Current Device Context (can be NULL)
*/ */
{ {
int NbLine = 0; int NbLine = 0;
char Line[1024]; char Line[1024];
wxString CmpFullFileName; wxString CmpFullFileName;
FILE* dest; FILE* dest;
MODULE* module = NULL; MODULE* module = NULL;
bool Footprint_Is_GPCB_Format = false; bool Footprint_Is_GPCB_Format = false;
wxString mask = wxT("*.*;"); mask += EXT_CMP_MASK; wxString mask = wxT( "*.*;" ); mask += EXT_CMP_MASK;
wxString LastOpenedPathForLoading;
wxConfig* Config = wxGetApp().m_EDA_Config; wxString LastOpenedPathForLoading;
wxConfig* Config = wxGetApp().m_EDA_Config;
if( Config ) if( Config )
Config->Read( EXPORT_IMPORT_LASTPATH_KEY, &LastOpenedPathForLoading ); Config->Read( EXPORT_IMPORT_LASTPATH_KEY, &LastOpenedPathForLoading );
/* Lecture Fichier module */ /* Lecture Fichier module */
CmpFullFileName = EDA_FileSelector( _( "Import Module:" ), CmpFullFileName = EDA_FileSelector( _( "Import Module:" ),
LastOpenedPathForLoading, /* Chemin par defaut */ LastOpenedPathForLoading, /* Chemin par defaut */
wxEmptyString, /* nom fichier par defaut */ wxEmptyString, /* nom fichier par defaut */
wxEmptyString, /* extension par defaut */ wxEmptyString, /* extension par defaut */
mask, /* Masque d'affichage */ mask, /* Masque d'affichage */
this, this,
wxFD_OPEN, wxFD_OPEN,
TRUE true
); );
if( CmpFullFileName == wxEmptyString ) if( CmpFullFileName == wxEmptyString )
...@@ -78,7 +79,7 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( wxDC* DC ) ...@@ -78,7 +79,7 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( wxDC* DC )
return NULL; return NULL;
} }
if( Config ) // Save file path if( Config ) // Save file path
{ {
LastOpenedPathForLoading = wxPathOnly( CmpFullFileName ); LastOpenedPathForLoading = wxPathOnly( CmpFullFileName );
Config->Write( EXPORT_IMPORT_LASTPATH_KEY, LastOpenedPathForLoading ); Config->Write( EXPORT_IMPORT_LASTPATH_KEY, LastOpenedPathForLoading );
...@@ -99,7 +100,7 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( wxDC* DC ) ...@@ -99,7 +100,7 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( wxDC* DC )
} }
/* Read file: Search the description starting line (skip lib header)*/ /* Read file: Search the description starting line (skip lib header)*/
if ( ! Footprint_Is_GPCB_Format ) if( !Footprint_Is_GPCB_Format )
{ {
while( GetLine( dest, Line, &NbLine ) != NULL ) while( GetLine( dest, Line, &NbLine ) != NULL )
{ {
...@@ -110,10 +111,10 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( wxDC* DC ) ...@@ -110,10 +111,10 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( wxDC* DC )
module = new MODULE( GetBoard() ); module = new MODULE( GetBoard() );
if ( Footprint_Is_GPCB_Format ) if( Footprint_Is_GPCB_Format )
{ {
fclose( dest ); fclose( dest );
module->Read_GPCB_Descr(CmpFullFileName); module->Read_GPCB_Descr( CmpFullFileName );
} }
else else
{ {
...@@ -137,6 +138,7 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( wxDC* DC ) ...@@ -137,6 +138,7 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( wxDC* DC )
/************************************************************************/ /************************************************************************/
void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib ) void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
/************************************************************************/ /************************************************************************/
/** /**
* Function Export_Module * Function Export_Module
* Create a file containing only one footprint. * Create a file containing only one footprint.
...@@ -149,11 +151,11 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib ) ...@@ -149,11 +151,11 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
* false = use current path or last used path to export footprint * false = use current path or last used path to export footprint
*/ */
{ {
wxString FullFileName, Mask( wxT( "*" ) ); wxString FullFileName, Mask( wxT( "*" ) );
char Line[1025]; char Line[1025];
FILE* dest; FILE* dest;
wxString msg, path; wxString msg, path;
wxConfig* Config = wxGetApp().m_EDA_Config; wxConfig* Config = wxGetApp().m_EDA_Config;
if( ptmod == NULL ) if( ptmod == NULL )
return; return;
...@@ -176,7 +178,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib ) ...@@ -176,7 +178,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
Mask, /* Masque d'affichage */ Mask, /* Masque d'affichage */
this, this,
wxFD_SAVE, wxFD_SAVE,
TRUE true
); );
if( FullFileName.IsEmpty() ) if( FullFileName.IsEmpty() )
...@@ -198,7 +200,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib ) ...@@ -198,7 +200,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
return; return;
} }
if( ! createlib && Config ) // Save file path if( !createlib && Config ) // Save file path
{ {
path = wxPathOnly( FullFileName ); path = wxPathOnly( FullFileName );
Config->Write( EXPORT_IMPORT_LASTPATH_KEY, path ); Config->Write( EXPORT_IMPORT_LASTPATH_KEY, path );
...@@ -395,7 +397,7 @@ void WinEDA_BasePcbFrame::Archive_Modules( const wxString& LibName, ...@@ -395,7 +397,7 @@ void WinEDA_BasePcbFrame::Archive_Modules( const wxString& LibName,
/* /*
* Sauve en Librairie: * Sauve en Librairie:
* tous les nouveaux modules ( c.a.d. les modules * tous les nouveaux modules ( c.a.d. les modules
* n'existant pas deja (si NewModulesOnly == TRUE) * n'existant pas deja (si NewModulesOnly == true)
* tous les modules (si NewModulesOnly == FALSE) * tous les modules (si NewModulesOnly == FALSE)
*/ */
{ {
...@@ -420,7 +422,7 @@ void WinEDA_BasePcbFrame::Archive_Modules( const wxString& LibName, ...@@ -420,7 +422,7 @@ void WinEDA_BasePcbFrame::Archive_Modules( const wxString& LibName,
Mask, /* Masque d'affichage */ Mask, /* Masque d'affichage */
this, this,
wxFD_SAVE, wxFD_SAVE,
TRUE true
); );
if( FullFileName.IsEmpty() ) if( FullFileName.IsEmpty() )
...@@ -448,7 +450,7 @@ void WinEDA_BasePcbFrame::Archive_Modules( const wxString& LibName, ...@@ -448,7 +450,7 @@ void WinEDA_BasePcbFrame::Archive_Modules( const wxString& LibName,
DisplayError( this, msg ); DisplayError( this, msg );
return; return;
} }
char Line[256]; char Line[256];
fprintf( lib_module, "%s %s\n", ENTETE_LIBRAIRIE, DateAndTime( Line ) ); fprintf( lib_module, "%s %s\n", ENTETE_LIBRAIRIE, DateAndTime( Line ) );
fputs( "$INDEX\n", lib_module ); fputs( "$INDEX\n", lib_module );
fputs( "$EndINDEX\n", lib_module ); fputs( "$EndINDEX\n", lib_module );
...@@ -467,31 +469,33 @@ void WinEDA_BasePcbFrame::Archive_Modules( const wxString& LibName, ...@@ -467,31 +469,33 @@ void WinEDA_BasePcbFrame::Archive_Modules( const wxString& LibName,
Module = (MODULE*) GetBoard()->m_Modules; Module = (MODULE*) GetBoard()->m_Modules;
for( ii = 1; Module != NULL; ii++, Module = (MODULE*) Module->Next() ) for( ii = 1; Module != NULL; ii++, Module = (MODULE*) Module->Next() )
{ {
if( Save_1_Module( FullFileName, Module, if( Save_Module_In_Library( FullFileName, Module,
NewModulesOnly ? FALSE : TRUE, FALSE ) == 0 ) NewModulesOnly ? FALSE : true, FALSE, false ) == 0 )
break; break;
DisplayActivity( (int) ( ii * Pas), wxEmptyString ); DisplayActivity( (int) ( ii * Pas ), wxEmptyString );
/* Tst demande d'arret de sauvegarde ( key ESCAPE actionnee ) */ /* Tst demande d'arret de sauvegarde ( key ESCAPE actionnee ) */
if( DrawPanel->m_AbortRequest ) if( DrawPanel->m_AbortRequest )
break; break;
} }
CreateDocLibrary( LibName ); CreateDocLibrary( FullFileName );
} }
/*****************************************************************/ /*****************************************************************/
int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName, int WinEDA_BasePcbFrame::Save_Module_In_Library( const wxString& aLibName,
MODULE* Module, bool Overwrite, bool DisplayDialog ) MODULE* aModule, bool aOverwrite,
bool aDisplayDialog, bool aCreateDocFile )
/*****************************************************************/ /*****************************************************************/
/* /** Function Save_Module_In_Library
* sauve en Librairie le module Module: * Save in an existing library a given footprint
* si no_replace == TRUE, s'il est nouveau. * @param aLibName = name of the library to use
* * @param aModule = the given footprint
* retourne * @param aOverwrite = true to overwrite an existing footprint, false to abort an existing footprint is found
* 1 si OK * @param aDisplayDialog = true to display a dialog to enter or confirm the footprint name
* 0 si abort ou probleme * @param aCreateDocFile = true to creates the associated doc file
* @return : 1 if OK, 0 if abort
*/ */
{ {
int newmodule, end; int newmodule, end;
...@@ -500,49 +504,49 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName, ...@@ -500,49 +504,49 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName,
wxString Name_Cmp; wxString Name_Cmp;
wxString NewLib, OldLib, msg; wxString NewLib, OldLib, msg;
FILE* lib_module, * dest; FILE* lib_module, * dest;
bool added = TRUE; bool added = true;
Module->Display_Infos( this ); aModule->Display_Infos( this );
if( !wxFileExists( LibName ) ) if( !wxFileExists( aLibName ) )
{ {
msg.Printf( _( "Library %s not found" ), LibName.GetData() ); msg.Printf( _( "Library %s not found" ), aLibName.GetData() );
DisplayError( this, msg ); DisplayError( this, msg );
return 0; return 0;
} }
/* Demande du nom du composant en librairie */ /* Ask for the footprint name in lib */
Name_Cmp = Module->m_LibRef; Name_Cmp = aModule->m_LibRef;
if( DisplayDialog ) if( aDisplayDialog )
{ {
Get_Message( _( "Name:" ), _("Save module"), Name_Cmp, this ); Get_Message( _( "Name:" ), _( "Save module" ), Name_Cmp, this );
if( Name_Cmp.IsEmpty() ) if( Name_Cmp.IsEmpty() )
return 0; return 0;
Name_Cmp.Trim( TRUE ); Name_Cmp.Trim( true );
Name_Cmp.Trim( FALSE ); Name_Cmp.Trim( FALSE );
Module->m_LibRef = Name_Cmp; aModule->m_LibRef = Name_Cmp;
} }
if( ( lib_module = wxFopen( LibName, wxT( "rt" ) ) ) == NULL ) if( ( lib_module = wxFopen( aLibName, wxT( "rt" ) ) ) == NULL )
{ {
msg.Printf( _( "Unable to open %s" ), LibName.GetData() ); msg.Printf( _( "Unable to open %s" ), aLibName.GetData() );
DisplayError( this, msg ); DisplayError( this, msg );
return 0; return 0;
} }
/* lecture entete : ENTETE_LIBRAIRIE */ /* lRead library file : library header */
GetLine( lib_module, Line, &LineNum ); GetLine( lib_module, Line, &LineNum );
if( strnicmp( Line, ENTETE_LIBRAIRIE, L_ENTETE_LIB ) != 0 ) if( strnicmp( Line, ENTETE_LIBRAIRIE, L_ENTETE_LIB ) != 0 )
{ {
fclose( lib_module ); fclose( lib_module );
msg.Printf( _( "File %s is not a eeschema library" ), LibName.GetData() ); msg.Printf( _( "File %s is not a eeschema library" ), aLibName.GetData() );
DisplayError( this, msg ); DisplayError( this, msg );
return 0; return 0;
} }
/* lecture des noms des composants - verif si le module est deja existant */ /* Reaf footprints in lib: - search for an existing footprint */
newmodule = 1; end = 0; newmodule = 1; end = 0;
while( !end && GetLine( lib_module, Line, &LineNum ) ) while( !end && GetLine( lib_module, Line, &LineNum ) )
{ {
...@@ -560,17 +564,17 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName, ...@@ -560,17 +564,17 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName,
StrPurge( Line ); StrPurge( Line );
msg = CONV_FROM_UTF8( Line ); msg = CONV_FROM_UTF8( Line );
if( Name_Cmp.CmpNoCase( msg ) == 0 ) /* composant trouve */ if( Name_Cmp.CmpNoCase( msg ) == 0 ) /* an existing footprint is found */
{ {
added = FALSE; added = FALSE;
newmodule = 0; newmodule = 0;
if( DisplayDialog ) if( aDisplayDialog )
{ {
msg = _( "Module exists\n Line: " ); msg = _( "Module exists\n Line: " );
msg << LineNum; msg << LineNum;
Affiche_Message( msg ); Affiche_Message( msg );
} }
if( !Overwrite ) /* le module n'est pas a sauver car deja existant */ if( !aOverwrite ) /* lDo not save the given footprint: an old one exists */
{ {
fclose( lib_module ); return 1; fclose( lib_module ); return 1;
} }
...@@ -581,15 +585,15 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName, ...@@ -581,15 +585,15 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName,
fclose( lib_module ); fclose( lib_module );
/* Creation de la nouvelle librairie */ /* Creates the new library */
if( ( lib_module = wxFopen( LibName, wxT( "rt" ) ) ) == NULL ) if( ( lib_module = wxFopen( aLibName, wxT( "rt" ) ) ) == NULL )
{ {
DisplayError( this, wxT( "Librairi.cpp: Error oldlib not found" ) ); DisplayError( this, wxT( "Librairi.cpp: Error oldlib not found" ) );
return 0; return 0;
} }
NewLib = LibName; NewLib = aLibName;
ChangeFileNameExt( NewLib, FILETMP_EXT ); ChangeFileNameExt( NewLib, FILETMP_EXT );
if( ( dest = wxFopen( NewLib, wxT( "w+t" ) ) ) == NULL ) if( ( dest = wxFopen( NewLib, wxT( "w+t" ) ) ) == NULL )
{ {
...@@ -601,7 +605,7 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName, ...@@ -601,7 +605,7 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName,
wxBeginBusyCursor(); wxBeginBusyCursor();
/* Creation de l'entete avec nouvelle date */ /* Create the library header with a new date */
fprintf( dest, ENTETE_LIBRAIRIE ); fprintf( dest, ENTETE_LIBRAIRIE );
fprintf( dest, " %s\n$INDEX\n", DateAndTime( Line ) ); fprintf( dest, " %s\n$INDEX\n", DateAndTime( Line ) );
...@@ -629,7 +633,7 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName, ...@@ -629,7 +633,7 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName,
fprintf( dest, "$EndINDEX\n" ); fprintf( dest, "$EndINDEX\n" );
/* Copie des modules, jusqu'au module a supprimer */ /* Copy footprints, until the old footprint to delete */
while( GetLine( lib_module, Line, &LineNum ) ) while( GetLine( lib_module, Line, &LineNum ) )
{ {
StrPurge( Line ); StrPurge( Line );
...@@ -641,7 +645,7 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName, ...@@ -641,7 +645,7 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName,
msg = CONV_FROM_UTF8( Name ); msg = CONV_FROM_UTF8( Name );
if( msg.CmpNoCase( Name_Cmp ) == 0 ) if( msg.CmpNoCase( Name_Cmp ) == 0 )
{ {
/* suppression ancien module */ /* skip old footprint descr (delete from the lib)*/
while( GetLine( lib_module, Line, &LineNum ) ) while( GetLine( lib_module, Line, &LineNum ) )
{ {
if( strnicmp( Line, "$EndMODULE", 9 ) == 0 ) if( strnicmp( Line, "$EndMODULE", 9 ) == 0 )
...@@ -654,40 +658,42 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName, ...@@ -654,40 +658,42 @@ int WinEDA_BasePcbFrame::Save_1_Module( const wxString& LibName,
fprintf( dest, "%s\n", Line ); fprintf( dest, "%s\n", Line );
} }
/* Ecriture du module ( en fin de librairie ) */ /* Write the new footprint ( append it to the list of footprint ) */
tmp = Module->m_TimeStamp; Module->m_TimeStamp = 0; tmp = aModule->m_TimeStamp; aModule->m_TimeStamp = 0;
Module->Save( dest ); aModule->Save( dest );
fprintf( dest, "$EndLIBRARY\n" ); fprintf( dest, "$EndLIBRARY\n" );
Module->m_TimeStamp = tmp; aModule->m_TimeStamp = tmp;
fclose( dest ); fclose( lib_module ); fclose( dest ); fclose( lib_module );
wxEndBusyCursor(); wxEndBusyCursor();
/* L'ancien fichier librairie est renomme en .bak */ /* The old library file is renamed .bak */
OldLib = LibName; OldLib = aLibName;
ChangeFileNameExt( OldLib, OLD_EXT ); ChangeFileNameExt( OldLib, OLD_EXT );
if( wxFileExists( OldLib ) ) if( wxFileExists( OldLib ) )
wxRemoveFile( OldLib ); wxRemoveFile( OldLib );
if( !wxRenameFile( LibName, OldLib ) ) if( !wxRenameFile( aLibName, OldLib ) )
DisplayError( this, wxT( "Librairi.cpp: rename .bak err" ) ); DisplayError( this, wxT( "Librairi.cpp: rename .bak err" ) );
/* Le nouveau fichier librairie est renomme */ /* The new library file is renamed */
if( !wxRenameFile( NewLib, LibName ) ) if( !wxRenameFile( NewLib, aLibName ) )
{ {
DisplayError( this, wxT( "Librairi.cpp: rename NewLib err" ) ); DisplayError( this, wxT( "Librairi.cpp: rename NewLib err" ) );
return 0; return 0;
} }
CreateDocLibrary( OldLib ); /* creates the new .dcm doc file corresponding to the new library */
if ( aCreateDocFile )
CreateDocLibrary( aLibName );
if( DisplayDialog ) if( aDisplayDialog )
{ {
msg = _( "Component " ); msg += Name_Cmp; msg = _( "Component " ); msg += Name_Cmp;
msg += added ? _( " added in " ) : _( " replaced in " ); msg += added ? _( " added in " ) : _( " replaced in " );
msg += LibName; msg += aLibName;
Affiche_Message( msg ); Affiche_Message( msg );
} }
...@@ -713,15 +719,15 @@ MODULE* WinEDA_BasePcbFrame::Create_1_Module( wxDC* DC, const wxString& module_n ...@@ -713,15 +719,15 @@ MODULE* WinEDA_BasePcbFrame::Create_1_Module( wxDC* DC, const wxString& module_n
/* Ask fo the new module reference */ /* Ask fo the new module reference */
if( module_name.IsEmpty() ) if( module_name.IsEmpty() )
{ {
if( Get_Message( _( "Module Reference:" ), _("Module Creation:"), Line, this ) != 0 ) if( Get_Message( _( "Module Reference:" ), _( "Module Creation:" ), Line, this ) != 0 )
{ {
DisplayInfo(this, _("No reference, aborted")); DisplayInfo( this, _( "No reference, aborted" ) );
return NULL; return NULL;
} }
} }
else else
Line = module_name; Line = module_name;
Line.Trim( TRUE ); Line.Trim( true );
Line.Trim( FALSE ); Line.Trim( FALSE );
// Creates the new module and add it to the head of the linked list of modules // Creates the new module and add it to the head of the linked list of modules
...@@ -747,7 +753,7 @@ MODULE* WinEDA_BasePcbFrame::Create_1_Module( wxDC* DC, const wxString& module_n ...@@ -747,7 +753,7 @@ MODULE* WinEDA_BasePcbFrame::Create_1_Module( wxDC* DC, const wxString& module_n
Module->m_Value->SetWidth( ModuleTextWidth ); Module->m_Value->SetWidth( ModuleTextWidth );
Module->m_Value->m_Size = ModuleTextSize; Module->m_Value->m_Size = ModuleTextSize;
Module->SetPosition( wxPoint(0, 0) ); Module->SetPosition( wxPoint( 0, 0 ) );
Module->Display_Infos( this ); Module->Display_Infos( this );
return Module; return Module;
...@@ -762,7 +768,8 @@ void WinEDA_ModuleEditFrame::Select_Active_Library() ...@@ -762,7 +768,8 @@ void WinEDA_ModuleEditFrame::Select_Active_Library()
return; return;
WinEDAListBox* LibListBox = new WinEDAListBox( this, _( "Active Lib:" ), WinEDAListBox* LibListBox = new WinEDAListBox( this, _( "Active Lib:" ),
NULL, m_CurrentLib, NULL, wxColour( 200, 200, 255 ) ); NULL, m_CurrentLib, NULL,
wxColour( 200, 200, 255 ) );
LibListBox->InsertItems( g_LibName_List ); LibListBox->InsertItems( g_LibName_List );
...@@ -783,7 +790,7 @@ int WinEDA_ModuleEditFrame::Create_Librairie( const wxString& LibName ) ...@@ -783,7 +790,7 @@ int WinEDA_ModuleEditFrame::Create_Librairie( const wxString& LibName )
{ {
FILE* lib_module; FILE* lib_module;
wxString msg; wxString msg;
char cbuf[256]; char cbuf[256];
if( wxFileExists( LibName ) ) if( wxFileExists( LibName ) )
{ {
...@@ -887,7 +894,7 @@ static bool CreateDocLibrary( const wxString& LibName ) ...@@ -887,7 +894,7 @@ static bool CreateDocLibrary( const wxString& LibName )
Doc = CONV_FROM_UTF8( StrPurge( Line + 3 ) ); Doc = CONV_FROM_UTF8( StrPurge( Line + 3 ) );
} }
if( (Name != wxEmptyString) && ( (Doc != wxEmptyString) || (KeyWord != wxEmptyString) ) )/* Generation de la doc du composant */ if( (Name != wxEmptyString) && ( (Doc != wxEmptyString) || (KeyWord != wxEmptyString) ) ) /* Generation de la doc du composant */
{ {
fprintf( LibDoc, "#\n$MODULE %s\n", CONV_TO_UTF8( Name ) ); fprintf( LibDoc, "#\n$MODULE %s\n", CONV_TO_UTF8( Name ) );
fprintf( LibDoc, "Li %s\n", CONV_TO_UTF8( Name ) ); fprintf( LibDoc, "Li %s\n", CONV_TO_UTF8( Name ) );
...@@ -919,5 +926,5 @@ static bool CreateDocLibrary( const wxString& LibName ) ...@@ -919,5 +926,5 @@ static bool CreateDocLibrary( const wxString& LibName )
fclose( LibMod ); fclose( LibMod );
fprintf( LibDoc, "#\n$EndLIBDOC\n" ); fprintf( LibDoc, "#\n$EndLIBDOC\n" );
fclose( LibDoc ); fclose( LibDoc );
return TRUE; return true;
} }
...@@ -192,7 +192,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -192,7 +192,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
switch( id ) // Traitement des commandes switch( id ) // Traitement des commandes
{ {
case ID_EXIT: case ID_EXIT:
Close( TRUE ); Close( true );
break; break;
case ID_LIBEDIT_SELECT_CURRENT_LIB: case ID_LIBEDIT_SELECT_CURRENT_LIB:
...@@ -209,7 +209,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -209,7 +209,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_MODEDIT_NEW_MODULE: case ID_MODEDIT_NEW_MODULE:
{ {
Clear_Pcb( TRUE ); Clear_Pcb( true );
GetScreen()->ClearUndoRedoList(); GetScreen()->ClearUndoRedoList();
SetCurItem( NULL ); SetCurItem( NULL );
GetScreen()->m_Curseur = wxPoint( 0, 0 ); GetScreen()->m_Curseur = wxPoint( 0, 0 );
...@@ -220,7 +220,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -220,7 +220,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
module->SetPosition( wxPoint(0, 0) ); module->SetPosition( wxPoint(0, 0) );
if( GetBoard()->m_Modules ) if( GetBoard()->m_Modules )
GetBoard()->m_Modules->m_Flags = 0; GetBoard()->m_Modules->m_Flags = 0;
Zoom_Automatique( TRUE ); Zoom_Automatique( true );
} }
} }
break; break;
...@@ -229,7 +229,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -229,7 +229,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
{ {
wxString Line; wxString Line;
Line = MakeFileName( g_RealLibDirBuffer, m_CurrentLib.GetData(), LibExtBuffer ); Line = MakeFileName( g_RealLibDirBuffer, m_CurrentLib.GetData(), LibExtBuffer );
Save_1_Module( Line, GetBoard()->m_Modules, TRUE, TRUE ); Save_Module_In_Library( Line, GetBoard()->m_Modules, true, true, true );
GetScreen()->ClrModify(); GetScreen()->ClrModify();
} }
break; break;
...@@ -315,13 +315,13 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -315,13 +315,13 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_LIBEDIT_IMPORT_PART: case ID_LIBEDIT_IMPORT_PART:
GetScreen()->ClearUndoRedoList(); GetScreen()->ClearUndoRedoList();
SetCurItem( NULL ); SetCurItem( NULL );
Clear_Pcb( TRUE ); Clear_Pcb( true );
GetScreen()->m_Curseur = wxPoint( 0, 0 ); GetScreen()->m_Curseur = wxPoint( 0, 0 );
Import_Module( &dc ); Import_Module( &dc );
if( GetBoard()->m_Modules ) if( GetBoard()->m_Modules )
GetBoard()->m_Modules->m_Flags = 0; GetBoard()->m_Modules->m_Flags = 0;
GetScreen()->ClrModify(); GetScreen()->ClrModify();
Zoom_Automatique( TRUE ); Zoom_Automatique( true );
if( m_Draw3DFrame ) if( m_Draw3DFrame )
m_Draw3DFrame->NewDisplay(); m_Draw3DFrame->NewDisplay();
break; break;
...@@ -333,7 +333,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -333,7 +333,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_LIBEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART: case ID_LIBEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART:
if( GetBoard()->m_Modules ) if( GetBoard()->m_Modules )
Export_Module( GetBoard()->m_Modules, TRUE ); Export_Module( GetBoard()->m_Modules, true );
break; break;
case ID_MODEDIT_SHEET_SET: case ID_MODEDIT_SHEET_SET:
...@@ -342,7 +342,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -342,7 +342,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_MODEDIT_LOAD_MODULE: case ID_MODEDIT_LOAD_MODULE:
GetScreen()->ClearUndoRedoList(); GetScreen()->ClearUndoRedoList();
SetCurItem( NULL ); SetCurItem( NULL );
Clear_Pcb( TRUE ); Clear_Pcb( true );
GetScreen()->m_Curseur = wxPoint( 0, 0 ); GetScreen()->m_Curseur = wxPoint( 0, 0 );
Load_Module_From_Library( m_CurrentLib, &dc ); Load_Module_From_Library( m_CurrentLib, &dc );
if( GetBoard()->m_Modules ) if( GetBoard()->m_Modules )
...@@ -365,7 +365,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -365,7 +365,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
} }
} }
GetScreen()->ClrModify(); GetScreen()->ClrModify();
Zoom_Automatique( TRUE ); Zoom_Automatique( true );
if( m_Draw3DFrame ) if( m_Draw3DFrame )
m_Draw3DFrame->NewDisplay(); m_Draw3DFrame->NewDisplay();
break; break;
...@@ -425,12 +425,12 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -425,12 +425,12 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE: case ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE:
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
Rotate_Module( &dc, (MODULE*) GetScreen()->GetCurItem(), 900, TRUE ); Rotate_Module( &dc, (MODULE*) GetScreen()->GetCurItem(), 900, true );
break; break;
case ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE: case ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE:
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
Rotate_Module( &dc, (MODULE*) GetScreen()->GetCurItem(), -900, TRUE ); Rotate_Module( &dc, (MODULE*) GetScreen()->GetCurItem(), -900, true );
break; break;
case ID_POPUP_PCB_EDIT_MODULE: case ID_POPUP_PCB_EDIT_MODULE:
...@@ -587,12 +587,12 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -587,12 +587,12 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_MODEDIT_UNDO: case ID_MODEDIT_UNDO:
GetComponentFromUndoList(); GetComponentFromUndoList();
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( true );
break; break;
case ID_MODEDIT_REDO: case ID_MODEDIT_REDO:
GetComponentFromRedoList(); GetComponentFromRedoList();
DrawPanel->Refresh( TRUE ); DrawPanel->Refresh( true );
break; break;
case ID_POPUP_PLACE_BLOCK: case ID_POPUP_PLACE_BLOCK:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment