diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp index e49bacda08..b0c844d1d3 100644 --- a/3d-viewer/3d_draw.cpp +++ b/3d-viewer/3d_draw.cpp @@ -386,12 +386,12 @@ void Pcb3D_GLCanvas::Draw3D_Track( TRACK* track ) /** * Function Draw3D_SolidPolygonsInZones * draw all solid polygons used as filles areas in a zone - * @param aZone_c = the zone to draw + * @param aZone = the zone to draw */ -void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c ) +void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* aZone ) { double zpos; - int layer = zone_c->GetLayer(); + int layer = aZone->GetLayer(); if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false ) return; @@ -420,7 +420,7 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c ) // Draw solid areas contained in this zone int StartContour = 1; - for( unsigned ii = 0; ii < zone_c->m_FilledPolysList.size(); ii++ ) + for( unsigned ii = 0; ii < aZone->m_FilledPolysList.size(); ii++ ) { if( StartContour == 1 ) { @@ -428,11 +428,11 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c ) gluTessBeginContour( tess ); StartContour = 0; } - v_data[0] = zone_c->m_FilledPolysList[ii].x * g_Parm_3D_Visu.m_BoardScale; - v_data[1] = -zone_c->m_FilledPolysList[ii].y * g_Parm_3D_Visu.m_BoardScale; - gluTessVertex( tess, v_data, &zone_c->m_FilledPolysList[ii] ); + v_data[0] = aZone->m_FilledPolysList[ii].x * g_Parm_3D_Visu.m_BoardScale; + v_data[1] = -aZone->m_FilledPolysList[ii].y * g_Parm_3D_Visu.m_BoardScale; + gluTessVertex( tess, v_data, &aZone->m_FilledPolysList[ii] ); - if( zone_c->m_FilledPolysList[ii].end_contour == 1 ) + if( aZone->m_FilledPolysList[ii].end_contour == 1 ) { gluTessEndContour( tess ); gluTessEndPolygon( tess ); diff --git a/3d-viewer/3d_viewer.h b/3d-viewer/3d_viewer.h index 44ff2598b5..2b1c008b86 100644 --- a/3d-viewer/3d_viewer.h +++ b/3d-viewer/3d_viewer.h @@ -173,9 +173,9 @@ public: /** * Function Draw3D_SolidPolygonsInZones * draw all solid polygons used as filles areas in a zone - * @param aZone_c = the zone to draw + * @param aZone = the zone to draw */ - void Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* aZone_c ); + void Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* aZone ); /** * Function Draw3D_Polygon diff --git a/common/common_plotGERBER_functions.cpp b/common/common_plotGERBER_functions.cpp index 059032ead6..887529e358 100644 --- a/common/common_plotGERBER_functions.cpp +++ b/common/common_plotGERBER_functions.cpp @@ -267,9 +267,11 @@ void GERBER_PLOTTER::rect( wxPoint p1, wxPoint p2, FILL_T fill, int width ) * Plot one circle as segments (6 to 16 depending on its radius * @param aCentre = center coordinates * @param aDiameter = diameter of the circle + * @param aFill = plot option (NO_FILL, FILLED_SHAPE, FILLED_WITH_BG_BODYCOLOR) + * not used here: circles are always not filled the gerber. Filled circles are flashed * @param aWidth = line width */ -void GERBER_PLOTTER::circle( wxPoint aCentre, int aDiameter, FILL_T fill, +void GERBER_PLOTTER::circle( wxPoint aCentre, int aDiameter, FILL_T aFill, int aWidth ) { wxASSERT( output_file ); diff --git a/common/drawpanel.cpp b/common/drawpanel.cpp index 3924a4f567..3e00a05d92 100644 --- a/common/drawpanel.cpp +++ b/common/drawpanel.cpp @@ -944,9 +944,10 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC ) * Function DrawAuxiliaryAxis * Draw the Auxiliary Axis, used in pcbnew which as origin coordinates * for gerber and excellon files - * @param DC = current Device Context + * @param aDC = current Device Context + * @param aDrawMode = draw mode (GR_COPY, GR_OR ..) */ -void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode ) +void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* aDC, int aDrawMode ) { if( m_Parent->m_Auxiliary_Axis_Position == wxPoint( 0, 0 ) ) return; @@ -954,10 +955,10 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode ) int Color = DARKRED; BASE_SCREEN* screen = GetScreen(); - GRSetDrawMode( DC, drawmode ); + GRSetDrawMode( aDC, aDrawMode ); /* Draw the Y axis */ - GRDashedLine( &m_ClipBox, DC, + GRDashedLine( &m_ClipBox, aDC, m_Parent->m_Auxiliary_Axis_Position.x, -screen->ReturnPageSize().y, m_Parent->m_Auxiliary_Axis_Position.x, @@ -965,7 +966,7 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode ) 0, Color ); /* Draw the X axis */ - GRDashedLine( &m_ClipBox, DC, + GRDashedLine( &m_ClipBox, aDC, -screen->ReturnPageSize().x, m_Parent->m_Auxiliary_Axis_Position.y, screen->ReturnPageSize().x, @@ -974,7 +975,7 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode ) } /********************************************************************/ -void WinEDA_DrawPanel::DrawGridAxis( wxDC* DC, int drawmode ) +void WinEDA_DrawPanel::DrawGridAxis( wxDC* aDC, int aDrawMode ) /********************************************************************/ { BASE_SCREEN* screen = GetScreen(); @@ -985,10 +986,10 @@ void WinEDA_DrawPanel::DrawGridAxis( wxDC* DC, int drawmode ) int Color = m_Parent->GetGridColor(); - GRSetDrawMode( DC, drawmode ); + GRSetDrawMode( aDC, aDrawMode ); /* Draw the Y axis */ - GRDashedLine( &m_ClipBox, DC, + GRDashedLine( &m_ClipBox, aDC, screen->m_GridOrigin.x, -screen->ReturnPageSize().y, screen->m_GridOrigin.x, @@ -996,7 +997,7 @@ void WinEDA_DrawPanel::DrawGridAxis( wxDC* DC, int drawmode ) 0, Color ); /* Draw the X axis */ - GRDashedLine( &m_ClipBox, DC, + GRDashedLine( &m_ClipBox, aDC, -screen->ReturnPageSize().x, screen->m_GridOrigin.y, screen->ReturnPageSize().x, diff --git a/eeschema/class_libentry.h b/eeschema/class_libentry.h index bfa7b7d8a2..48d76ec621 100644 --- a/eeschema/class_libentry.h +++ b/eeschema/class_libentry.h @@ -514,7 +514,7 @@ public: * @return The draw object if found. Otherwise NULL. */ LIB_DRAW_ITEM* LocateDrawItem( int aUnit, int aConvert, KICAD_T aType, - const wxPoint& aPoint, const TRANSFORM& aTransfrom ); + const wxPoint& aPoint, const TRANSFORM& aTransform ); /** * Return a reference to the draw item list. diff --git a/eeschema/dialog_erc_listbox.h b/eeschema/dialog_erc_listbox.h index a1eadf6025..4d45b1de76 100644 --- a/eeschema/dialog_erc_listbox.h +++ b/eeschema/dialog_erc_listbox.h @@ -40,10 +40,8 @@ public: /** - * Function SetList - * sets the DRC_ITEM_LIST for this listbox. Ownership of the DRC_ITEM_LIST - * is transferred to this ERC_HTML_LISTBOX. - * @param aList The DRC_ITEM_LIST* containing the DRC_ITEMs which will be + * Function AppendToList + * @param aItem The SCH_MARKER* to add to the current list which will be * displayed in the wxHtmlListBox */ void AppendToList( SCH_MARKER* aItem ) @@ -87,7 +85,7 @@ public: /** - * Function OnGetItem + * Function OnGetItemMarkup * returns the html text associated with the given index 'n'. * @param n An index into the list. * @return wxString - the simple html text to show in the listbox. diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 1bbe03d55a..5fc135c049 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -308,7 +308,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew ) /** * Save the entire project and create an archive for components. * - * The library archive name is -cache.lib + * The library archive name is <root_name>-cache.lib */ void SCH_EDIT_FRAME::SaveProject() { diff --git a/eeschema/lib_circle.cpp b/eeschema/lib_circle.cpp index 2c19f58706..b72d340105 100644 --- a/eeschema/lib_circle.cpp +++ b/eeschema/lib_circle.cpp @@ -70,7 +70,7 @@ bool LIB_CIRCLE::Load( char* aLine, wxString& aErrorMsg ) /** * Function HitTest * tests if the given wxPoint is within the bounds of this object. - * @param aRefPos A wxPoint to test in eeschema space + * @param aPosRef A wxPoint to test in eeschema space * @return - true if a hit, else false */ bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef ) diff --git a/eeschema/lib_circle.h b/eeschema/lib_circle.h index d398c5eb65..2e80e9af55 100644 --- a/eeschema/lib_circle.h +++ b/eeschema/lib_circle.h @@ -50,10 +50,10 @@ public: /** * Test if the given point is within the bounds of this object. * - * @param aRefPos - A wxPoint to test + * @param aPosRef - A wxPoint to test * @return bool - true if a hit, else false */ - virtual bool HitTest( const wxPoint& aRefPos ); + virtual bool HitTest( const wxPoint& aPosRef ); /** * @param aPosRef - a wxPoint to test diff --git a/eeschema/lib_field.h b/eeschema/lib_field.h index bc537a6e8d..02aff83b10 100644 --- a/eeschema/lib_field.h +++ b/eeschema/lib_field.h @@ -140,7 +140,7 @@ public: /** * Test if the given point is within the bounds of this object. * - * @param aPoition A point to test in field coordinate system + * @param aPosition A point to test in field coordinate system * @return True if a hit, else false */ bool HitTest( const wxPoint& aPosition ); diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp index 1c540d3671..29139d0fe9 100644 --- a/eeschema/lib_pin.cpp +++ b/eeschema/lib_pin.cpp @@ -1842,7 +1842,7 @@ wxArrayString LIB_PIN::GetElectricalTypeNames( void ) /** - * Get a list of pin electrical type names. + * Get a list of pin electrical type icons. * @return List of valid pin electrical type bitmaps symbols in .xpm format * for menus and dialogs . */ @@ -1853,7 +1853,7 @@ const char*** LIB_PIN::GetElectricalTypeSymbols( void ) /** - * Get a list of pin electrical type names. + * Get a list of pin orientation icons. * * @return List of valid pin orientation bitmaps symbols in .xpm format * for menus and dialogs . diff --git a/eeschema/lib_pin.h b/eeschema/lib_pin.h index ebb145498e..55256c5e67 100644 --- a/eeschema/lib_pin.h +++ b/eeschema/lib_pin.h @@ -147,7 +147,7 @@ public: * @param aPosRef - a wxPoint to test * @param aThreshold - max distance to this object (usually the half * thickness of a line) - * @param aTransMat - the transform matrix + * @param aTransform - the transform matrix * @return - true if the point aPosRef is near this object */ virtual bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ); diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index 3e80e85502..86f56e1e95 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -240,6 +240,8 @@ public: /** * Function WriteGENERICNetList * creates a generic netlist, now in XML. + * @param frame = the parent SCH_EDIT_FRAME frame + * @param aOutFileName = the full filename of the file to create * @return bool - true if there were no errors, else false. */ bool WriteGENERICNetList( SCH_EDIT_FRAME* frame, const wxString& aOutFileName ); @@ -248,6 +250,8 @@ public: * Function WriteNetListPCBNEW * generates a net list file (Format 2 improves ORCAD PCB) * + * @param frame = the parent SCH_EDIT_FRAME frame + * @param f = the file to write to * @param with_pcbnew if true, then format Pcbnew (OrcadPcb2 + reviews and lists of net),

* else output ORCADPCB2 strict format. */ @@ -291,6 +295,8 @@ public: * Are considered in placing orders in the netlist * [.-] Or PSpice gnucap are beginning * + + Gnucap and PSpice are ultimately NetList + * @param frame = the parent SCH_EDIT_FRAME frame + * @param f = the file to write to * @param use_netnames if true, then nodes are identified by the netname, * else by net number. */ diff --git a/eeschema/netlist_control.cpp b/eeschema/netlist_control.cpp index 69d68c4526..a587a245df 100644 --- a/eeschema/netlist_control.cpp +++ b/eeschema/netlist_control.cpp @@ -81,14 +81,8 @@ END_EVENT_TABLE() /*******************************/ -/** Contructor to create a setup page for one netlist format. +/* Contructor to create a setup page for one netlist format. * Used in Netlist format Dialog box creation - * @param parent = wxNotebook * parent - * @param title = title (name) of the notebook page - * @param id_NetType = netlist type id - * @param idCheckBox = event ID attached to the "format is default" check box - * @param idCreateFile = event ID attached to the "create netlist" button - * @param selected - Please document me. */ EDA_NoteBookPage::EDA_NoteBookPage( wxNotebook* parent, const wxString& title, diff --git a/eeschema/netlist_control.h b/eeschema/netlist_control.h index e61b4a43c5..b71fe0a912 100644 --- a/eeschema/netlist_control.h +++ b/eeschema/netlist_control.h @@ -50,6 +50,16 @@ public: wxBoxSizer* m_RightOptionsBoxSizer; wxBoxSizer* m_LowBoxSizer; + /** Contructor to create a setup page for one netlist format. + * Used in Netlist format Dialog box creation + * @param parent = wxNotebook * parent + * @param title = title (name) of the notebook page + * @param id_NetType = netlist type id + * @param idCheckBox = event ID attached to the "format is default" check box + * @param idCreateFile = event ID attached to the "create netlist" button + * @param selected = true to have this notebook page selected when the dialog is opened + * Only one page can be created with selected = true. + */ EDA_NoteBookPage( wxNotebook* parent, const wxString& title, int id_NetType, int idCheckBox, int idCreateFile, bool selected ); diff --git a/eeschema/transform.h b/eeschema/transform.h index 3cb6270536..9c3fb18cab 100644 --- a/eeschema/transform.h +++ b/eeschema/transform.h @@ -61,7 +61,7 @@ public: /** * Calculate new coordinate according to the transform. * - * @param aPosition = The position to transform + * @param aPoint = The position to transform * @return The transformed coordinate. */ wxPoint TransformCoordinate( const wxPoint& aPoint ) const; diff --git a/gerbview/gerbview.cpp b/gerbview/gerbview.cpp index 1837b4e823..a04e638e52 100644 --- a/gerbview/gerbview.cpp +++ b/gerbview/gerbview.cpp @@ -10,6 +10,7 @@ #include "gestfich.h" #include "gerbview.h" +#include "gerbview_id.h" #include "wxGerberFrame.h" #include "pcbplot.h" #include "bitmaps.h" @@ -78,6 +79,11 @@ bool WinEDA_App::OnInit() wxFileName fn; WinEDA_GerberFrame* frame = NULL; +#ifdef __WXMAC__ + wxApp::s_macAboutMenuItemId = ID_KICAD_ABOUT; + wxApp::s_macPreferencesMenuItemId = ID_GERBVIEW_OPTIONS_SETUP; +#endif /* __WXMAC__ */ + InitEDA_Appl( wxT( "GerbView" ), APP_TYPE_GERBVIEW ); if( m_Checker && m_Checker->IsAnotherRunning() ) diff --git a/include/class_board_item.h b/include/class_board_item.h index df542f82df..239ce2b7eb 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -155,11 +155,11 @@ public: * Function MenuText * returns the text to use in any menu type UI control which must uniquely * identify this item. - * @param aBoard The PCB in which this item resides, needed for Net lookup. + * @param aPcb The PCB in which this item resides, needed for Net lookup. * @return wxString * @todo: maybe: make this virtual and split into each derived class */ - wxString MenuText( const BOARD* aBoard ) const; + wxString MenuText( const BOARD* aPcb ) const; /** diff --git a/include/class_drawpanel.h b/include/class_drawpanel.h index c447044ced..fbf7614edb 100644 --- a/include/class_drawpanel.h +++ b/include/class_drawpanel.h @@ -178,9 +178,9 @@ public: /** * Function CursorRealPosition * @return the position in user units of location ScreenPos - * @param ScreenPos = the screen (in pixel) position to convert + * @param aPosition = the screen (in pixel) position to convert */ - wxPoint CursorRealPosition( const wxPoint& ScreenPos ); + wxPoint CursorRealPosition( const wxPoint& aPosition ); /** * Function CursorScreenPosition diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index ae4b2bbce4..fdc95e06cb 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -300,7 +300,7 @@ public: /** * Function Select_1_Module_From_List * Display a list of modules found in active libraries or a given library - * @param active_window = the current window ( parent window ) + * @param aWindow = the current window ( parent window ) * @param aLibraryFullFilename = library to list (if aLibraryFullFilename * == void, list all modules) * @param aMask = Display filter (wildcart)( Mask = wxEmptyString if not @@ -313,18 +313,52 @@ public: * Ok */ wxString Select_1_Module_From_List( - WinEDA_DrawFrame* active_window, const wxString& aLibraryFullFilename, + WinEDA_DrawFrame* aWindow, const wxString& aLibraryFullFilename, const wxString& aMask, const wxString& aKeyWord ); MODULE* Load_Module_From_Library( const wxString& library, wxDC* DC ); // ratsnest functions - void Compile_Ratsnest( wxDC* DC, bool affiche ); - int Test_1_Net_Ratsnest( wxDC* DC, int net_code ); - void build_ratsnest_module( wxDC* DC, MODULE* Module ); + /** + * Function Compile_Ratsnest + * Create the entire board ratsnest. + * Must be called after a board change (changes for + * pads, footprints or a read netlist ). + * @param aDC = the current device context (can be NULL) + * @param aDisplayStatus : if true, display the computation results + */ + void Compile_Ratsnest( wxDC* aDC, bool aDisplayStatus ); + + /** + * Function Test_1_Net_Ratsnest + * Compute the ratsnest relative to the net "net_code" + * @param aDC - Device context to draw on. + * @param aNetcode = netcode used to compute the ratsnest. + */ + int Test_1_Net_Ratsnest( wxDC* aDC, int aNetcode ); + + /** + * Function build_ratsnest_module + * Build a ratsnest relative to one footprint. This is a simplified computation + * used only in move footprint. It is not optimal, but it is fast and sufficient + * to help a footprint placement + * It shows the connections from a pad to the nearest connected pad + * @param aModule = module to consider. + */ + void build_ratsnest_module( MODULE* aModule ); + void trace_ratsnest_module( wxDC* DC ); void Build_Board_Ratsnest( wxDC* DC ); - void DrawGeneralRatsnest( wxDC* DC, int net_code = 0 ); + + /** + * function Displays the general ratsnest + * Only ratsnest with the status bit CH_VISIBLE is set are displayed + * @param aDC = the current device context (can be NULL) + * @param aNetcode if > 0, Display only the ratsnest relative to the + * corresponding net_code + */ + void DrawGeneralRatsnest( wxDC* aDC, int aNetcode = 0 ); + void trace_ratsnest_pad( wxDC* DC ); void build_ratsnest_pad( BOARD_ITEM* ref, const wxPoint& refpos, diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index cb028a41fe..19355c91be 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -162,12 +162,12 @@ public: * Print the page pointed by ActiveScreen, set by the calling print function * @param aDC = wxDC given by the calling print function * @param aPrint_Sheet_Ref = true to print page references - * @param aPrintMask = not used here - * @param aPrintMirrorMode = not used here (Set when printing in mirror mode) + * @param aPrintMaskLayer = a 32 bits mask: bit n = 1 -> layer n is printed + * @param aPrintMirrorMode = true to plot mirrored * @param aData = a pointer on an auxiliary data (NULL if not used) */ virtual void PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, - int aPrintMask, bool aPrintMirrorMode, + int aPrintMaskLayer, bool aPrintMirrorMode, void * aData = NULL ); void GetKicadAbout( wxCommandEvent& event ); @@ -713,7 +713,17 @@ public: // 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 ); + + /** + * Function Delete Module + * Remove a footprint from m_Modules linked list and put it in undelete buffer + * The ratsnest and pad list are recalculated + * @param aModule = footprint to delete + * @param aDC = currentDevice Context. if NULL: do not redraw new ratsnest + * @param aAskBeforeDeleting : if true: ask for confirmation before deleting + */ + bool Delete_Module( MODULE* aModule, wxDC* aDC, bool aAskBeforeDeleting ); + void Change_Side_Module( MODULE* Module, wxDC* DC ); void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule ); diff --git a/packaging/mac-osx/osx-package.pmdoc/06bitmap-contents.xml b/packaging/mac-osx/osx-package.pmdoc/06bitmap-contents.xml new file mode 100644 index 0000000000..ba0f55e6c3 --- /dev/null +++ b/packaging/mac-osx/osx-package.pmdoc/06bitmap-contents.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packaging/mac-osx/osx-package.pmdoc/06bitmap.xml b/packaging/mac-osx/osx-package.pmdoc/06bitmap.xml new file mode 100644 index 0000000000..15e0a9411e --- /dev/null +++ b/packaging/mac-osx/osx-package.pmdoc/06bitmap.xml @@ -0,0 +1 @@ +net.sourceforge.kicad.kicad.bitmap2component.pkg1.0../../bitmap2component/bitmap2component.app/Applications/KicadinstallFrom.isRelativeTypeinstallTo.pathparentinstallTo06bitmap-contents.xml/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$ \ No newline at end of file diff --git a/packaging/mac-osx/osx-package.pmdoc/index.xml b/packaging/mac-osx/osx-package.pmdoc/index.xml index 415f975d33..65261755d0 100644 --- a/packaging/mac-osx/osx-package.pmdoc/index.xml +++ b/packaging/mac-osx/osx-package.pmdoc/index.xml @@ -1 +1 @@ -Kicad/Users/marco/Development/Kicad-19-Sep-2010.mpkgnet.sourceforge.kicad../../AUTHORS.txt../../CHANGELOG.txt01kicad.xml02gerbview.xml03eeschema.xml04pcbnew.xml05cvpcb.xmlproperties.titleproperties.anywhereDomain \ No newline at end of file +Kicad/Users/marco/Development/Kicad-27-Dec-2010.mpkgnet.sourceforge.kicad../../AUTHORS.txt../../CHANGELOG.txt01kicad.xml02gerbview.xml03eeschema.xml04pcbnew.xml05cvpcb.xml06bitmap.xmlproperties.titleproperties.anywhereDomain \ No newline at end of file diff --git a/pcbnew/autoplac.cpp b/pcbnew/autoplac.cpp index a5e835b564..0a7406c5f8 100644 --- a/pcbnew/autoplac.cpp +++ b/pcbnew/autoplac.cpp @@ -660,7 +660,7 @@ int WinEDA_PcbFrame::RecherchePlacementModule( MODULE* Module, wxDC* DC ) if( Penalite >= 0 ) /* c a d if the module can be placed. */ { error = 0; - build_ratsnest_module( DC, Module ); + build_ratsnest_module( Module ); cout = Compute_Ratsnest_PlaceModule( DC ); DisplayChevelu = 1; Score = cout + (float) Penalite; @@ -1047,7 +1047,7 @@ static MODULE* PickModule( WinEDA_PcbFrame* pcbframe, wxDC* DC ) continue; pcbframe->GetBoard()->m_Status_Pcb &= ~RATSNEST_ITEM_LOCAL_OK; Module->DisplayInfo( pcbframe ); - pcbframe->build_ratsnest_module( DC, Module ); + pcbframe->build_ratsnest_module( Module ); /* Calculate external ratsnet. */ for( unsigned ii = 0; diff --git a/pcbnew/block.cpp b/pcbnew/block.cpp index c96df3cddd..4b26f87bd4 100644 --- a/pcbnew/block.cpp +++ b/pcbnew/block.cpp @@ -378,12 +378,11 @@ bool WinEDA_PcbFrame::HandleBlockEnd( wxDC* DC ) /* Block operations: */ -/** +/* * Function Block_SelectItems * Uses GetScreen()->m_BlockLocate * select items within the selected block. * selected items are put in the pick list - * @param none */ void WinEDA_PcbFrame::Block_SelectItems() { @@ -657,11 +656,10 @@ void WinEDA_PcbFrame::Block_Delete() } -/** +/* * Function Block_Rotate * Rotate all items within the selected block. * The rotation center is the center of the block - * @param none */ void WinEDA_PcbFrame::Block_Rotate() { @@ -726,7 +724,6 @@ void WinEDA_PcbFrame::Block_Rotate() * Function Block_Flip * flips items within the selected block. * The flip center is the center of the block - * @param none */ void WinEDA_PcbFrame::Block_Flip() { @@ -788,12 +785,11 @@ void WinEDA_PcbFrame::Block_Flip() } -/** +/* * Function Block_Move * moves all tracks and segments within the selected block. * New location is determined by the current offset from the selected block's * original location. - * @param none */ void WinEDA_PcbFrame::Block_Move() { @@ -849,12 +845,11 @@ void WinEDA_PcbFrame::Block_Move() } -/** +/* * Function Block_Duplicate * duplicates all items within the selected block. * New location is determined by the current offset from the selected block's * original location. - * @param none */ void WinEDA_PcbFrame::Block_Duplicate() { diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index 723582fc64..a43148b2bc 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -558,6 +558,7 @@ void D_PAD:: TransformShapeWithClearanceToPolygon( std:: vector < CPolyPt>& aCor * @param aCornerBuffer = a buffer to store the polygon * @param aPad = the current pad used to create the thermal shape * @param aThermalGap = gap in thermal shape + * @param aCopperThickness = stubs thickness in thermal shape * @param aMinThicknessValue = min copper thickness allowed * @param aCircleToSegmentsCount = the number of segments to approximate a circle * @param aCorrectionFactor = the correction to apply to circles radius to keep diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 164656dd56..94fa42d435 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -326,22 +326,17 @@ BOARD_ITEM* DuplicateStruct( BOARD_ITEM* aItem ) } -/** +/* * Function SaveCopyInUndoList - * Create a copy of the current schematic item, and put it in the undo list. + * Create a copy of the current board item, and put it in the undo list. * - * flag_type_command = + * aCommandType = * UR_CHANGED * UR_NEW * UR_DELETED * UR_MOVED * UR_FLIPPED * UR_ROTATED - * - * If it is a delete command, items are put on list with the .Flags member set to UR_DELETED. - * When it will be really deleted, the EEDrawList and the subhierarchy will be deleted. - * If it is only a copy, the EEDrawList and the subhierarchy must NOT be deleted. - * */ void WinEDA_PcbFrame::SaveCopyInUndoList( BOARD_ITEM* aItem, UndoRedoOpType aCommandType, diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 97c9679246..4350856caf 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -1180,15 +1180,15 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData, /** * Function FindNet * searches for a net with the given netcode. - * @param anetcode The netcode to search for. + * @param aNetcode The netcode to search for. * @return NETINFO_ITEM* - the net or NULL if not found. */ -NETINFO_ITEM* BOARD::FindNet( int anetcode ) const +NETINFO_ITEM* BOARD::FindNet( int aNetcode ) const { // the first valid netcode is 1 and the last is m_NetInfo->GetCount()-1. // zero is reserved for "no connection" and is not used. // NULL is returned for non valid netcodes - NETINFO_ITEM* net = m_NetInfo->GetNetItem( anetcode ); + NETINFO_ITEM* net = m_NetInfo->GetNetItem( aNetcode ); #if defined(DEBUG) if( net ) // item can be NULL if anetcode is not valid @@ -1196,7 +1196,7 @@ NETINFO_ITEM* BOARD::FindNet( int anetcode ) const if( anetcode != net->GetNet() ) { printf( "FindNet() anetcode %d != GetNet() %d (net: %s)\n", - anetcode, net->GetNet(), CONV_TO_UTF8( net->GetNetname() ) ); + aNetcode, net->GetNet(), CONV_TO_UTF8( net->GetNetname() ) ); } } #endif @@ -1431,7 +1431,7 @@ out: } -/** +/* * Function RedrawAreasOutlines * Redraw all areas outlines on layer aLayer ( redraw all if aLayer < 0 ) */ @@ -1479,7 +1479,7 @@ void BOARD::RedrawFilledAreas( WinEDA_DrawPanel* panel, * zone. * the test is made on zones on layer from aStartLayer to aEndLayer * Note: if a zone has its flag BUSY (in .m_State) is set, it is ignored. - * @param refPos A wxPoint to test + * @param aRefPos A wxPoint to test * @param aStartLayer the first layer to test * @param aEndLayer the last layer (-1 to ignore it) to test * @return ZONE_CONTAINER* return a pointer to the ZONE_CONTAINER found, else diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 30ca836d95..e8918b29de 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -270,7 +270,7 @@ public: * Function SetEnabledLayers * is a proxy function that calls the correspondent function in m_BoardSettings * Changes the bit-mask of enabled layers - * @param aMask = The new bit-mask of enabled layers + * @param aLayerMask = The new bit-mask of enabled layers */ void SetEnabledLayers( int aLayerMask ); @@ -278,7 +278,7 @@ public: * Function IsLayerEnabled * is a proxy function that calls the correspondent function in m_BoardSettings * tests whether a given layer is enabled - * @param aLayerIndex = The index of the layer to be tested + * @param aLayer = The layer to be tested * @return bool - true if the layer is visible. */ bool IsLayerEnabled( int aLayer ) const @@ -310,7 +310,7 @@ public: * Function SetVisibleLayers * is a proxy function that calls the correspondent function in m_BoardSettings * changes the bit-mask of visible layers - * @param aMask = The new bit-mask of visible layers + * @param aLayerMask = The new bit-mask of visible layers */ void SetVisibleLayers( int aLayerMask ); @@ -529,9 +529,10 @@ public: * and turns on or off the brilliance associated with that net according to the * current value of global g_HighLight_Status * @param aDrawPanel is needed for the clipping support. + * @param aDC = the curent device context * @param aNetCode is the net number to highlight or to dim. */ - void DrawHighLight( WinEDA_DrawPanel* aDrawPanel, wxDC* DC, int aNetCode ); + void DrawHighLight( WinEDA_DrawPanel* aDrawPanel, wxDC* aDC, int aNetCode ); /** * Function Visit @@ -596,8 +597,6 @@ public: * Must be called after a Design Rules edition, or after reading a netlist (or editing the list of nets) * Also this function removes the non existing nets in netclasses and add net nets in default netclass * (this happens after reading a netlist) - * @param none - * @return none */ void SynchronizeNetsAndNetClasses(); @@ -713,7 +712,7 @@ public: * tests if the given wxPoint is within the bounds of a filled area of this zone. * the test is made on zones on layer from aStartLayer to aEndLayer * Note: if a zone has its flag BUSY (in .m_State) is set, it is ignored. - * @param refPos A wxPoint to test + * @param aRefPos A wxPoint to test * @param aStartLayer the first layer to test * @param aEndLayer the last layer (-1 to ignore it) to test * @return ZONE_CONTAINER* return a pointer to the ZONE_CONTAINER found, else NULL @@ -726,7 +725,7 @@ public: * Function RedrawAreasOutlines * Redraw all areas outlines on layer aLayer ( redraw all if aLayer < 0 ) */ - void RedrawAreasOutlines( WinEDA_DrawPanel* panel, + void RedrawAreasOutlines( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, int aLayer ); @@ -735,7 +734,7 @@ public: * Function RedrawFilledAreas * Redraw all filled areas on layer aLayer ( redraw all if aLayer < 0 ) */ - void RedrawFilledAreas( WinEDA_DrawPanel* panel, + void RedrawFilledAreas( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, int aLayer ); @@ -869,7 +868,8 @@ public: * @param aModifiedZonesList = a PICKED_ITEMS_LIST * where to store deleted or added areas * (useful in undo commands. Can be NULL * @param modified_area = area to test - * @param bMessageBox : if TRUE, shows message boxes when clipping occurs. + * @param bMessageBoxInt : if TRUE, shows message boxes when clipping occurs. + * @param bMessageBoxArc if true, shows message when clipping can't be done due to arcs. * @return : * -1 if arcs intersect other sides, so polygon can't be clipped * 0 if no intersecting sides diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index 733f5b8622..c4ffe92006 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -264,41 +264,41 @@ void DIMENSION::Move(const wxPoint& offset) /** * Function Rotate - * @param center : Rotation point - * @param angle : Rotation angle in 0.1 degrees + * @param aRotCentre - the rotation point. + * @param aAngle - the rotation angle in 0.1 degree. */ -void DIMENSION::Rotate(const wxPoint& centre, int angle) +void DIMENSION::Rotate(const wxPoint& aRotCentre, int aAngle) { - RotatePoint( &m_Pos, centre, angle ); + RotatePoint( &m_Pos, aRotCentre, aAngle ); - RotatePoint( &m_Text->m_Pos, centre, angle ); - m_Text->m_Orient += angle; + RotatePoint( &m_Text->m_Pos, aRotCentre, aAngle ); + m_Text->m_Orient += aAngle; if( m_Text->m_Orient >= 3600 ) m_Text->m_Orient -= 3600; if( ( m_Text->m_Orient > 900 ) && ( m_Text->m_Orient <2700 ) ) m_Text->m_Orient -= 1800; - RotatePoint( &Barre_ox, &Barre_oy, centre.x, centre.y, angle ); - RotatePoint( &Barre_fx, &Barre_fy, centre.x, centre.y, angle ); - RotatePoint( &TraitG_ox, &TraitG_oy, centre.x, centre.y, angle ); - RotatePoint( &TraitG_fx, &TraitG_fy, centre.x, centre.y, angle ); - RotatePoint( &TraitD_ox, &TraitD_oy, centre.x, centre.y, angle ); - RotatePoint( &TraitD_fx, &TraitD_fy, centre.x, centre.y, angle ); - RotatePoint( &FlecheG1_ox, &FlecheG1_oy, centre.x, centre.y, angle ); - RotatePoint( &FlecheG1_fx, &FlecheG1_fy, centre.x, centre.y, angle ); - RotatePoint( &FlecheG2_ox, &FlecheG2_oy, centre.x, centre.y, angle ); - RotatePoint( &FlecheG2_fx, &FlecheG2_fy, centre.x, centre.y, angle ); - RotatePoint( &FlecheD1_ox, &FlecheD1_oy, centre.x, centre.y, angle ); - RotatePoint( &FlecheD1_fx, &FlecheD1_fy, centre.x, centre.y, angle ); - RotatePoint( &FlecheD2_ox, &FlecheD2_oy, centre.x, centre.y, angle ); - RotatePoint( &FlecheD2_fx, &FlecheD2_fy, centre.x, centre.y, angle ); + RotatePoint( &Barre_ox, &Barre_oy, aRotCentre.x, aRotCentre.y, aAngle ); + RotatePoint( &Barre_fx, &Barre_fy, aRotCentre.x, aRotCentre.y, aAngle ); + RotatePoint( &TraitG_ox, &TraitG_oy, aRotCentre.x, aRotCentre.y, aAngle ); + RotatePoint( &TraitG_fx, &TraitG_fy, aRotCentre.x, aRotCentre.y, aAngle ); + RotatePoint( &TraitD_ox, &TraitD_oy, aRotCentre.x, aRotCentre.y, aAngle ); + RotatePoint( &TraitD_fx, &TraitD_fy, aRotCentre.x, aRotCentre.y, aAngle ); + RotatePoint( &FlecheG1_ox, &FlecheG1_oy, aRotCentre.x, aRotCentre.y, aAngle ); + RotatePoint( &FlecheG1_fx, &FlecheG1_fy, aRotCentre.x, aRotCentre.y, aAngle ); + RotatePoint( &FlecheG2_ox, &FlecheG2_oy, aRotCentre.x, aRotCentre.y, aAngle ); + RotatePoint( &FlecheG2_fx, &FlecheG2_fy, aRotCentre.x, aRotCentre.y, aAngle ); + RotatePoint( &FlecheD1_ox, &FlecheD1_oy, aRotCentre.x, aRotCentre.y, aAngle ); + RotatePoint( &FlecheD1_fx, &FlecheD1_fy, aRotCentre.x, aRotCentre.y, aAngle ); + RotatePoint( &FlecheD2_ox, &FlecheD2_oy, aRotCentre.x, aRotCentre.y, aAngle ); + RotatePoint( &FlecheD2_fx, &FlecheD2_fy, aRotCentre.x, aRotCentre.y, aAngle ); } /** * Function Flip * Flip this object, i.e. change the board side for this object - * @param const wxPoint& aCentre - the rotation point. + * @param aCentre - the rotation point. */ void DIMENSION::Flip(const wxPoint& aCentre ) { @@ -733,7 +733,7 @@ bool DIMENSION::HitTest( const wxPoint& ref_pos ) /** * Function HitTest (overlaid) * tests if the given EDA_Rect intersect this object. - * @param EDA_Rect : the given EDA_Rect + * @param refArea : the given EDA_Rect * @return bool - true if a hit, else false */ bool DIMENSION::HitTest( EDA_Rect& refArea ) diff --git a/pcbnew/class_dimension.h b/pcbnew/class_dimension.h index 3133b56ead..91c44ce852 100644 --- a/pcbnew/class_dimension.h +++ b/pcbnew/class_dimension.h @@ -74,7 +74,7 @@ public: /** * Function Rotate * Rotate this object. - * @param const wxPoint& aRotCentre - the rotation point. + * @param aRotCentre - the rotation point. * @param aAngle - the rotation angle in 0.1 degree. */ virtual void Rotate(const wxPoint& aRotCentre, int aAngle); @@ -82,7 +82,7 @@ public: /** * Function Flip * Flip this object, i.e. change the board side for this object - * @param const wxPoint& aCentre - the rotation point. + * @param aCentre - the rotation point. */ virtual void Flip(const wxPoint& aCentre ); diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index d5cc9ff4ac..1746e54203 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -50,7 +50,7 @@ void DRAWSEGMENT::Copy( DRAWSEGMENT* source ) /** * Function Rotate * Rotate this object. - * @param const wxPoint& aRotCentre - the rotation point. + * @param aRotCentre - the rotation point. * @param aAngle - the rotation angle in 0.1 degree. */ void DRAWSEGMENT::Rotate(const wxPoint& aRotCentre, int aAngle) @@ -62,7 +62,7 @@ void DRAWSEGMENT::Rotate(const wxPoint& aRotCentre, int aAngle) /** * Function Flip * Flip this object, i.e. change the board side for this object - * @param const wxPoint& aCentre - the rotation point. + * @param aCentre - the rotation point. */ void DRAWSEGMENT::Flip(const wxPoint& aCentre ) { @@ -418,10 +418,10 @@ void DRAWSEGMENT::DisplayInfo( WinEDA_DrawFrame* frame ) /** * Function HitTest * tests if the given wxPoint is within the bounds of this object. - * @param ref_pos A wxPoint to test + * @param aRefPos A wxPoint to test * @return bool - true if a hit, else false */ -bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos ) +bool DRAWSEGMENT::HitTest( const wxPoint& aRefPos ) { int ux0 = m_Start.x; int uy0 = m_Start.y; @@ -430,8 +430,8 @@ bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos ) int dx = m_End.x - ux0; int dy = m_End.y - uy0; - int spot_cX = ref_pos.x - ux0; - int spot_cY = ref_pos.y - uy0; + int spot_cX = aRefPos.x - ux0; + int spot_cY = aRefPos.y - uy0; switch(m_Shape){ case S_CIRCLE: @@ -465,7 +465,7 @@ bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos ) case S_CURVE: for( unsigned int i= 1; i < m_BezierPoints.size(); i++) { - if( TestSegmentHit( ref_pos,m_BezierPoints[i-1], + if( TestSegmentHit( aRefPos,m_BezierPoints[i-1], m_BezierPoints[i-1], m_Width / 2 ) ) return true; } diff --git a/pcbnew/class_drawsegment.h b/pcbnew/class_drawsegment.h index 08d390f6a1..849cdd0c5f 100644 --- a/pcbnew/class_drawsegment.h +++ b/pcbnew/class_drawsegment.h @@ -80,16 +80,16 @@ public: /** * Function HitTest * tests if the given wxPoint is within the bounds of this object. - * @param ref_pos A wxPoint to test + * @param aRefPos A wxPoint to test * @return bool - true if a hit, else false */ - bool HitTest( const wxPoint& ref_pos ); + bool HitTest( const wxPoint& aRefPos ); /** * Function HitTest (overlayed) * tests if the given EDA_Rect intersect this object. * For now, an ending point must be inside this rect. - * @param refPos the given EDA_Rect to test + * @param refArea the given EDA_Rect to test * @return bool - true if a hit, else false */ bool HitTest( EDA_Rect& refArea ); @@ -121,7 +121,7 @@ public: /** * Function Move * move this object. - * @param const wxPoint& aMoveVector - the move vector for this object. + * @param aMoveVector - the move vector for this object. */ virtual void Move( const wxPoint& aMoveVector ) { @@ -133,7 +133,7 @@ public: /** * Function Rotate * Rotate this object. - * @param const wxPoint& aRotCentre - the rotation point. + * @param aRotCentre - the rotation point. * @param aAngle - the rotation angle in 0.1 degree. */ virtual void Rotate( const wxPoint& aRotCentre, int aAngle ); @@ -141,7 +141,7 @@ public: /** * Function Flip * Flip this object, i.e. change the board side for this object - * @param const wxPoint& aCentre - the rotation point. + * @param aCentre - the rotation point. */ virtual void Flip( const wxPoint& aCentre ); diff --git a/pcbnew/class_edge_mod.cpp b/pcbnew/class_edge_mod.cpp index 123c4eb51c..ed0d81f615 100644 --- a/pcbnew/class_edge_mod.cpp +++ b/pcbnew/class_edge_mod.cpp @@ -499,7 +499,7 @@ int EDGE_MODULE::ReadDescr( char* Line, FILE* File, * @param refPos A wxPoint to test * @return bool - true if a hit, else false */ -bool EDGE_MODULE::HitTest( const wxPoint& ref_pos ) +bool EDGE_MODULE::HitTest( const wxPoint& refPos ) { int uxf, uyf; int rayon, dist; @@ -515,8 +515,8 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos ) switch( m_Shape ) { case S_SEGMENT: - spot_cX = ref_pos.x - ux0; - spot_cY = ref_pos.y - uy0; + spot_cX = refPos.x - ux0; + spot_cY = refPos.y - uy0; dx = uxf - ux0; dy = uyf - uy0; @@ -526,21 +526,21 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos ) case S_CIRCLE: rayon = (int) hypot( (double) (uxf - ux0), (double) (uyf - uy0) ); - dist = (int) hypot( (double) (ref_pos.x - ux0), - (double) (ref_pos.y - uy0) ); + dist = (int) hypot( (double) (refPos.x - ux0), + (double) (refPos.y - uy0) ); if( abs( rayon - dist ) <= m_Width ) return true; break; case S_ARC: rayon = (int) hypot( (double) (uxf - ux0), (double) (uyf - uy0) ); - dist = (int) hypot( (double) (ref_pos.x - ux0), - (double) (ref_pos.y - uy0) ); + dist = (int) hypot( (double) (refPos.x - ux0), + (double) (refPos.y - uy0) ); if( abs( rayon - dist ) > m_Width ) break; - int mouseAngle = (int) ArcTangente( ref_pos.y - uy0, ref_pos.x - ux0 ); + int mouseAngle = (int) ArcTangente( refPos.y - uy0, refPos.x - ux0 ); int stAngle = (int) ArcTangente( uyf - uy0, uxf - ux0 ); int endAngle = stAngle + m_Angle; diff --git a/pcbnew/class_marker_pcb.cpp b/pcbnew/class_marker_pcb.cpp index 7b003254a0..f44cd0633d 100644 --- a/pcbnew/class_marker_pcb.cpp +++ b/pcbnew/class_marker_pcb.cpp @@ -82,7 +82,7 @@ void MARKER_PCB::DisplayInfo( WinEDA_DrawFrame* frame ) /** * Function Rotate * Rotate this object. - * @param const wxPoint& aRotCentre - the rotation point. + * @param aRotCentre - the rotation point. * @param aAngle - the rotation angle in 0.1 degree. */ void MARKER_PCB::Rotate(const wxPoint& aRotCentre, int aAngle) @@ -95,7 +95,7 @@ void MARKER_PCB::Rotate(const wxPoint& aRotCentre, int aAngle) * Flip this object, i.e. change the board side for this object * this function has not reeally sense for a marker. * It moves just the marker to keep its position on board, when the board is flipped - * @param const wxPoint& aCentre - the rotation point. + * @param aCentre - the rotation point. */ void MARKER_PCB::Flip(const wxPoint& aCentre ) { diff --git a/pcbnew/class_marker_pcb.h b/pcbnew/class_marker_pcb.h index 7bb2141810..903622bf7c 100644 --- a/pcbnew/class_marker_pcb.h +++ b/pcbnew/class_marker_pcb.h @@ -43,7 +43,7 @@ public: /** * Function Move * move this object. - * @param const wxPoint& aMoveVector - the move vector for this object. + * @param aMoveVector - the move vector for this object. */ virtual void Move(const wxPoint& aMoveVector) { @@ -53,7 +53,7 @@ public: /** * Function Rotate * Rotate this object. - * @param const wxPoint& aRotCentre - the rotation point. + * @param aRotCentre - the rotation point. * @param aAngle - the rotation angle in 0.1 degree. */ virtual void Rotate(const wxPoint& aRotCentre, int aAngle); @@ -61,7 +61,7 @@ public: /** * Function Flip * Flip this object, i.e. change the board side for this object - * @param const wxPoint& aCentre - the rotation point. + * @param aCentre - the rotation point. */ virtual void Flip(const wxPoint& aCentre ); diff --git a/pcbnew/class_mire.cpp b/pcbnew/class_mire.cpp index 7f094f1498..91d7442350 100644 --- a/pcbnew/class_mire.cpp +++ b/pcbnew/class_mire.cpp @@ -195,7 +195,7 @@ bool MIREPCB::HitTest( const wxPoint& refPos ) /** * Function HitTest (overlayed) * tests if the given EDA_Rect intersect this object. - * @param EDA_Rect : the given EDA_Rect + * @param refArea : the given EDA_Rect * @return bool - true if a hit, else false */ bool MIREPCB::HitTest( EDA_Rect& refArea ) @@ -209,7 +209,7 @@ bool MIREPCB::HitTest( EDA_Rect& refArea ) /** * Function Rotate * Rotate this object. - * @param const wxPoint& aRotCentre - the rotation point. + * @param aRotCentre - the rotation point. * @param aAngle - the rotation angle in 0.1 degree. */ void MIREPCB::Rotate(const wxPoint& aRotCentre, int aAngle) @@ -221,7 +221,7 @@ void MIREPCB::Rotate(const wxPoint& aRotCentre, int aAngle) /** * Function Flip * Flip this object, i.e. change the board side for this object - * @param const wxPoint& aCentre - the rotation point. + * @param aCentre - the rotation point. */ void MIREPCB::Flip(const wxPoint& aCentre ) { diff --git a/pcbnew/class_mire.h b/pcbnew/class_mire.h index b8ce9d8aa9..e30d855ae8 100644 --- a/pcbnew/class_mire.h +++ b/pcbnew/class_mire.h @@ -31,7 +31,7 @@ public: /** * Function Move * move this object. - * @param const wxPoint& aMoveVector - the move vector for this object. + * @param aMoveVector - the move vector for this object. */ virtual void Move(const wxPoint& aMoveVector) { @@ -41,7 +41,7 @@ public: /** * Function Rotate * Rotate this object. - * @param const wxPoint& aRotCentre - the rotation point. + * @param aRotCentre - the rotation point. * @param aAngle - the rotation angle in 0.1 degree. */ virtual void Rotate(const wxPoint& aRotCentre, int aAngle); @@ -49,7 +49,7 @@ public: /** * Function Flip * Flip this object, i.e. change the board side for this object - * @param const wxPoint& aCentre - the rotation point. + * @param aCentre - the rotation point. */ virtual void Flip(const wxPoint& aCentre ); diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 7c7aabcc29..8daccddc33 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -178,13 +178,13 @@ void MODULE::Copy( MODULE* aModule ) /** * Function Draw * Draws the footprint to the current Device Context - * @param panel = The active Draw Panel (used to know the clip box) - * @param DC = current Device Context - * @param offset = draw offset (usually wxPoint(0,0) - * @param draw_mode = GR_OR, GR_XOR, GR_AND + * @param aPanel = draw panel, Used to know the clip box + * @param aDC = Current Device Context + * @param aDrawMode = GR_OR, GR_XOR.. + * @param aOffset = draw offset (usually wxPoint(0,0) */ -void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, - int draw_mode, const wxPoint& offset ) +void MODULE::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, + int aDrawMode, const wxPoint& aOffset ) { if( (m_Flags & DO_NOT_DRAW) || (m_Flags & IS_MOVED) ) return; @@ -194,25 +194,25 @@ void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, if( pad->m_Flags & IS_MOVED ) continue; - pad->Draw( panel, DC, draw_mode, offset ); + pad->Draw( aPanel, aDC, aDrawMode, aOffset ); } BOARD* brd = GetBoard(); // Draws footprint anchor - DrawAncre( panel, DC, offset, DIM_ANCRE_MODULE, draw_mode ); + DrawAncre( aPanel, aDC, aOffset, DIM_ANCRE_MODULE, aDrawMode ); /* Draw graphic items */ if( brd->IsElementVisible( MOD_REFERENCES_VISIBLE ) ) { if( !(m_Reference->m_Flags & IS_MOVED) ) - m_Reference->Draw( panel, DC, draw_mode, offset ); + m_Reference->Draw( aPanel, aDC, aDrawMode, aOffset ); } if( brd->IsElementVisible( MOD_VALUES_VISIBLE ) ) { if( !(m_Value->m_Flags & IS_MOVED) ) - m_Value->Draw( panel, DC, draw_mode, offset ); + m_Value->Draw( aPanel, aDC, aDrawMode, aOffset ); } for( BOARD_ITEM* item = m_Drawings; item; item = item->Next() ) @@ -224,7 +224,7 @@ void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, { case TYPE_TEXTE_MODULE: case TYPE_EDGE_MODULE: - item->Draw( panel, DC, draw_mode, offset ); + item->Draw( aPanel, aDC, aDrawMode, aOffset ); break; default: diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 6825c18187..257911d12d 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -100,7 +100,7 @@ public: void Copy( MODULE* Module ); // Copy structure - /** + /* * Function Add * adds the given item to this MODULE and takes ownership of its memory. * @param aBoardItem The item to add to this board. @@ -154,14 +154,14 @@ public: /** * Function Move * move this object. - * @param const wxPoint& aMoveVector - the move vector for this object. + * @param aMoveVector - the move vector for this object. */ virtual void Move( const wxPoint& aMoveVector ); /** * Function Rotate * Rotate this object. - * @param const wxPoint& aRotCentre - the rotation point. + * @param aRotCentre - the rotation point. * @param aAngle - the rotation angle in 0.1 degree. */ virtual void Rotate( const wxPoint& aRotCentre, int aAngle ); @@ -169,14 +169,14 @@ public: /** * Function Flip * Flip this object, i.e. change the board side for this object - * @param const wxPoint& aCentre - the rotation point. + * @param aCentre - the rotation point. */ virtual void Flip( const wxPoint& aCentre ); /** * Function IsLocked * (virtual from BOARD_ITEM ) - * @returns bool - true if the MODULE is locked, else false + * @return bool - true if the MODULE is locked, else false */ bool IsLocked() const { @@ -204,7 +204,7 @@ public: * Function Save * writes the data structures for this object out to a FILE in "*.brd" * format. - * a@param aFile The FILE to write to. + * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ bool Save( FILE* aFile ) const; @@ -227,15 +227,15 @@ public: /** * Function Draw * Draw the text according to the footprint pos and orient - * @param panel = draw panel, Used to know the clip box - * @param DC = Current Device Context - * @param offset = draw offset (usually wxPoint(0,0) + * @param aPanel = draw panel, Used to know the clip box + * @param aDC = Current Device Context * @param aDrawMode = GR_OR, GR_XOR.. + * @param aOffset = draw offset (usually wxPoint(0,0) */ - void Draw( WinEDA_DrawPanel* panel, - wxDC* DC, + void Draw( WinEDA_DrawPanel* aPanel, + wxDC* aDC, int aDrawMode, - const wxPoint& offset = ZeroOffset ); + const wxPoint& aOffset = ZeroOffset ); void Draw3D( Pcb3D_GLCanvas* glcanvas ); void DrawEdgesOnly( WinEDA_DrawPanel* panel, wxDC* DC, @@ -293,7 +293,7 @@ public: * Function FindPadByName * returns a D_PAD* with a matching name. Note that names may not be * unique, depending on how the foot print was created. - * @param + * @param aPadName the pad name to find * @return D_PAD* - The first matching name is returned, or NULL if not * found. */ diff --git a/pcbnew/class_module_transform_functions.cpp b/pcbnew/class_module_transform_functions.cpp index 12ab27d18c..18f786fd44 100644 --- a/pcbnew/class_module_transform_functions.cpp +++ b/pcbnew/class_module_transform_functions.cpp @@ -122,7 +122,7 @@ int ChangeSideMaskLayer( int masque ) /** * Function Move (virtual) * move this object. - * @param const wxPoint& aMoveVector - the move vector for this object. + * @param aMoveVector - the move vector for this object. */ void MODULE::Move(const wxPoint& aMoveVector) { @@ -134,7 +134,7 @@ void MODULE::Move(const wxPoint& aMoveVector) /** * Function Rotate * Rotate this object. - * @param const wxPoint& aRotCentre - the rotation point. + * @param aRotCentre - the rotation point. * @param aAngle - the rotation angle in 0.1 degree. */ void MODULE::Rotate(const wxPoint& aRotCentre, int aAngle) @@ -149,7 +149,7 @@ void MODULE::Rotate(const wxPoint& aRotCentre, int aAngle) /** * Function Flip * Flip this object, i.e. change the board side for this object - * @param const wxPoint& aCentre - the rotation point. + * @param aCentre - the rotation point. */ void MODULE::Flip(const wxPoint& aCentre ) { diff --git a/pcbnew/class_netclass.h b/pcbnew/class_netclass.h index bcebaf2a82..8908f3077c 100644 --- a/pcbnew/class_netclass.h +++ b/pcbnew/class_netclass.h @@ -84,6 +84,8 @@ public: /** * Constructor * stuffs a NETCLASS instance with aParent, aName, and optionally the initialParameters + * @param aParent = the parent board + * @param aName = the name of this new netclass * @param initialParameters is a NETCLASS to copy parameters from, or if * NULL tells me to copy from g_DesignSettings. */ @@ -205,6 +207,7 @@ public: * Function ReadDescr * reads the data structures for this object from a FILE in "*.brd" format. * @param aFile The FILE to read to. + * @param aLineNum a pointer to a line number counter * @return bool - true if success reading else false. */ bool ReadDescr( FILE* aFile, int* aLineNum ); diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 00c45a97c4..4f2e184a57 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -361,7 +361,7 @@ public: /** * Function SetNetname - * @param const wxString : the new netname + * @param aNetname : the new netname */ void SetNetname( const wxString& aNetname ); diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index bddd46bbbd..392aa90e1f 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -93,7 +93,7 @@ out: /** * Function SetNetname - * @param const wxString : the new netname + * @param aNetname : the new netname */ void NETINFO_ITEM::SetNetname( const wxString& aNetname ) { diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index cec3ffb092..509121ffb3 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -180,7 +180,7 @@ void D_PAD::SetPadName( const wxString& name ) /** * Function SetNetname - * @param const wxString : the new netname + * @param aNetname: the new netname */ void D_PAD::SetNetname( const wxString& aNetname ) { @@ -772,17 +772,17 @@ bool D_PAD::IsOnLayer( int aLayer ) const /** * Function HitTest * tests if the given wxPoint is within the bounds of this object. - * @param ref_pos A wxPoint to test + * @param refPos A wxPoint to test * @return bool - true if a hit, else false */ -bool D_PAD::HitTest( const wxPoint& ref_pos ) +bool D_PAD::HitTest( const wxPoint& refPos ) { int dx, dy; double dist; wxPoint shape_pos = ReturnShapePos(); - wxPoint delta = ref_pos - shape_pos; + wxPoint delta = refPos - shape_pos; /* Quick test: a test point must be inside the circle. */ if( ( abs( delta.x ) > m_ShapeMaxRadius ) || ( abs( delta.y ) > m_ShapeMaxRadius ) ) diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 25c1282f7d..f6eed1ead9 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -140,7 +140,7 @@ public: /** * Function SetNetname - * @param const wxString : the new netname + * @param aNetname: the new netname */ void SetNetname( const wxString& aNetname ); @@ -230,8 +230,14 @@ public: /* drawing functions */ - void Draw( WinEDA_DrawPanel* panel, wxDC* DC, - int aDrawMode, const wxPoint& offset = ZeroOffset ); + /** Draw a pad: + * @param aPanel = the WinEDA_DrawPanel panel + * @param aDC = the current device context + * @param aDraw_mode = mode: GR_OR, GR_XOR, GR_AND... + * @param aOffset = draw offset + */ + void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, + int aDrawMode, const wxPoint& aOffset = ZeroOffset ); void Draw3D( Pcb3D_GLCanvas* glcanvas ); @@ -247,7 +253,7 @@ public: * Has meaning only for polygonal pads (trapezoid and rectangular) * Build the Corner list of the polygonal shape, * depending on shape, extra size (clearance ...) and orientation - * @param aCoord[4] = a buffer to fill. + * @param aCoord = a buffer to fill (4 corners). * @param aInflateValue = wxSize: the clearance or margin value. value > 0: inflate, < 0 deflate * @param aRotation = full rotation of the polygon */ @@ -341,7 +347,7 @@ public: /** * Function Move * move this object. - * @param const wxPoint& aMoveVector - the move vector for this object. + * @param aMoveVector - the move vector for this object. */ virtual void Move( const wxPoint& aMoveVector ) { diff --git a/pcbnew/class_pad_draw_functions.cpp b/pcbnew/class_pad_draw_functions.cpp index c1d3d39c0b..ab329552d5 100644 --- a/pcbnew/class_pad_draw_functions.cpp +++ b/pcbnew/class_pad_draw_functions.cpp @@ -45,7 +45,7 @@ PAD_DRAWINFO::PAD_DRAWINFO() /** Draw a pad: - * @param aDC = device context + * @param aPanel = the WinEDA_DrawPanel panel * @param aDraw_mode = mode: GR_OR, GR_XOR, GR_AND... * @param aOffset = draw offset */ @@ -663,7 +663,7 @@ int D_PAD::BuildSegmentFromOvalShape(wxPoint& aSegStart, wxPoint& aSegEnd, int a * Has meaning only for polygonal pads (trapeziod and rectangular) * Build the Corner list of the polygonal shape, * depending on shape, extra size (clearance ...) and orientation - * @param aCoord[4] = a buffer to fill. + * @param aCoord = a buffer to fill. * @param aInflateValue = wxSize: the clearance or margin value. value > 0: inflate, < 0 deflate * @param aRotation = full rotation of the polygon, usually m_Orient */ diff --git a/pcbnew/class_pcb_layer_widget.h b/pcbnew/class_pcb_layer_widget.h index 9c1c3dbc7a..0d42ff1097 100644 --- a/pcbnew/class_pcb_layer_widget.h +++ b/pcbnew/class_pcb_layer_widget.h @@ -61,6 +61,8 @@ public: /** * Constructor + * @param aParent is the parent window + * @param aFocusOwner is the window that should be sent the focus after * @param aPointSize is the font point size to use within the widget. This * effectively sets the overal size of the widget via the row height and bitmap * button sizes. diff --git a/pcbnew/class_pcb_text.cpp b/pcbnew/class_pcb_text.cpp index 57347e1645..db170220a0 100644 --- a/pcbnew/class_pcb_text.cpp +++ b/pcbnew/class_pcb_text.cpp @@ -180,9 +180,8 @@ bool TEXTE_PCB::Save( FILE* aFile ) const } -/** +/* * Function Draw - * DrawMode = GR_OR, GR_XOR .. * Like tracks, texts are drawn in filled or sketch mode, never in line mode * because the line mode does not keep the actual size of the text * and the actual size is very important, especially for copper texts @@ -258,7 +257,7 @@ void TEXTE_PCB::DisplayInfo( WinEDA_DrawFrame* frame ) /** * Function Rotate * Rotate this object. - * @param const wxPoint& aRotCentre - the rotation point. + * @param aRotCentre - the rotation point. * @param aAngle - the rotation angle in 0.1 degree. */ void TEXTE_PCB::Rotate(const wxPoint& aRotCentre, int aAngle) @@ -275,7 +274,7 @@ void TEXTE_PCB::Rotate(const wxPoint& aRotCentre, int aAngle) /** * Function Flip * Flip this object, i.e. change the board side for this object - * @param const wxPoint& aCentre - the rotation point. + * @param aCentre - the rotation point. */ void TEXTE_PCB::Flip(const wxPoint& aCentre ) { diff --git a/pcbnew/class_pcb_text.h b/pcbnew/class_pcb_text.h index 81a88dcae7..1f7f8cc793 100644 --- a/pcbnew/class_pcb_text.h +++ b/pcbnew/class_pcb_text.h @@ -28,7 +28,7 @@ public: /** * Function Move * move this object. - * @param const wxPoint& aMoveVector - the move vector for this object. + * @param aMoveVector - the move vector for this object. */ virtual void Move(const wxPoint& aMoveVector) { @@ -38,7 +38,7 @@ public: /** * Function Rotate * Rotate this object. - * @param const wxPoint& aRotCentre - the rotation point. + * @param aRotCentre - the rotation point. * @param aAngle - the rotation angle in 0.1 degree. */ virtual void Rotate(const wxPoint& aRotCentre, int aAngle); @@ -46,7 +46,7 @@ public: /** * Function Flip * Flip this object, i.e. change the board side for this object - * @param const wxPoint& aCentre - the rotation point. + * @param aCentre - the rotation point. */ virtual void Flip(const wxPoint& aCentre ); diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index 47908f2733..a4d2e4c606 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -93,11 +93,11 @@ bool TEXTE_MODULE::Save( FILE* aFile ) const /** - * Function ReadLineDescr + * Function ReadDescr * Read description from a given line in "*.brd" format. * @param aLine The current line which contains the first line of description. * @param aLine The FILE to read next lines (currently not used). - * @param LineNum a point to the line count (currently not used). + * @param aLineNum a point to the line count (currently not used). * @return int - > 0 if success reading else 0. */ int TEXTE_MODULE::ReadDescr( char* aLine, FILE* aFile, int* aLineNum ) @@ -276,10 +276,10 @@ EDA_Rect TEXTE_MODULE::GetTextRect( void ) const /** * Function HitTest * tests if the given wxPoint is within the bounds of this object. - * @param refPos A wxPoint to test + * @param aRefPos A wxPoint to test * @return true if a hit, else false */ -bool TEXTE_MODULE::HitTest( const wxPoint& refPos ) +bool TEXTE_MODULE::HitTest( const wxPoint& aRefPos ) { wxPoint rel_pos; EDA_Rect area = GetTextRect(); @@ -288,7 +288,7 @@ bool TEXTE_MODULE::HitTest( const wxPoint& refPos ) * to test if refPos is within area (which is relative to an horizontal * text) */ - rel_pos = refPos; + rel_pos = aRefPos; RotatePoint( &rel_pos, m_Pos, -GetDrawRotation() ); if( area.Contains( rel_pos ) ) diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h index a28533ce18..00ce82359e 100644 --- a/pcbnew/class_text_mod.h +++ b/pcbnew/class_text_mod.h @@ -80,12 +80,12 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS ); bool Save( FILE* aFile ) const; /** - * Function ReadLineDescr + * Function ReadDescr * Read description from a given line in "*.brd" format. * @param aLine The current line which contains the first line of * description. - * @param aLine The FILE to read next lines (currently not used). - * @param LineNum a point to the line count (currently not used). + * @param aFile The FILE to read next lines (currently not used). + * @param aLineNum a point to the line count (currently not used). * @return int - > 0 if success reading else 0. */ int ReadDescr( char* aLine, FILE* aFile, int* aLineNum = NULL ); @@ -123,10 +123,10 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS ); /** * Function HitTest * tests if the given wxPoint is within the bounds of this object. - * @param posref A wxPoint to test + * @param aRefPos A wxPoint to test * @return bool - true if a hit, else false */ - bool HitTest( const wxPoint& posref ); + bool HitTest( const wxPoint& aRefPos ); /** * Function IsOnLayer @@ -139,12 +139,12 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS ); */ bool IsOnLayer( int aLayer ) const; - /** + /* * Function IsOnOneOfTheseLayers * returns true if this object is on one of the given layers. Is virtual * so objects like D_PAD, which reside on multiple layers, can do their own * form of testing. - * virtual inheritance from BOARD_ITEM. + * virtual inheritance from BOARD_ITEM. (not yet written) * @param aLayerMask The bit-mapped set of layers to test for. * @return bool - true if on one of the given layers, else false. * bool IsOnOneOfTheseLayers( int aLayerMask ) const; diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index b40525b3d8..59e472c9e3 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -271,7 +271,7 @@ EDA_Rect TRACK::GetBoundingBox() const /** * Function Rotate * Rotate this object. - * @param const wxPoint& aRotCentre - the rotation point. + * @param aRotCentre - the rotation point. * @param aAngle - the rotation angle in 0.1 degree. */ void TRACK::Rotate( const wxPoint& aRotCentre, int aAngle ) @@ -284,7 +284,7 @@ void TRACK::Rotate( const wxPoint& aRotCentre, int aAngle ) /** * Function Flip * Flip this object, i.e. change the board side for this object - * @param const wxPoint& aCentre - the rotation point. + * @param aCentre - the rotation point. */ void TRACK::Flip( const wxPoint& aCentre ) { @@ -324,11 +324,6 @@ SEARCH_RESULT TRACK::Visit( INSPECTOR* inspector, const void* testData, bool SEGVIA::IsOnLayer( int layer_number ) const /***********************************************/ { -/** - * @param layer_number = layer number to test - * @return true if the via is on the layer layer_number - */ - int bottom_layer, top_layer; ReturnLayerPair( &top_layer, &bottom_layer ); @@ -343,7 +338,6 @@ bool SEGVIA::IsOnLayer( int layer_number ) const /***********************************/ int TRACK::ReturnMaskLayer() /***********************************/ - /* Return the mask layer for this. * for a via, there is more than one layer used */ @@ -432,22 +426,20 @@ void SEGVIA::ReturnLayerPair( int* top_layer, int* bottom_layer ) const } -/***********************************************/ -TRACK* TRACK::GetBestInsertPoint( BOARD* Pcb ) -/***********************************************/ - -/** +/* + * Function GetBestInsertPoint * Search the "best" insertion point within the track linked list * the best point is the of the corresponding net code section - * @return the item found in the linked list (or NULL if no track) + * return the item found in the linked list (or NULL if no track) */ +TRACK* TRACK::GetBestInsertPoint( BOARD* aPcb ) { TRACK* track; if( Type() == TYPE_ZONE ) - track = Pcb->m_Zone; + track = aPcb->m_Zone; else - track = Pcb->m_Track; + track = aPcb->m_Track; for( ; track; track = track->Next() ) { @@ -1136,10 +1128,10 @@ void TRACK::DisplayInfoBase( WinEDA_DrawFrame* frame ) /** * Function HitTest * tests if the given wxPoint is within the bounds of this object. - * @param ref_pos A wxPoint to test + * @param refPos A wxPoint to test * @return bool - true if a hit, else false */ -bool TRACK::HitTest( const wxPoint& ref_pos ) +bool TRACK::HitTest( const wxPoint& refPos ) { int radius = m_Width >> 1; @@ -1148,8 +1140,8 @@ bool TRACK::HitTest( const wxPoint& ref_pos ) int dy = m_End.y - m_Start.y; // (spot_cX, spot_cY) is a vector from m_Start to ref_pos (an origin of m_Start) - int spot_cX = ref_pos.x - m_Start.x; - int spot_cY = ref_pos.y - m_Start.y; + int spot_cX = refPos.x - m_Start.x; + int spot_cY = refPos.y - m_Start.y; if( Type() == TYPE_VIA ) { @@ -1167,10 +1159,10 @@ bool TRACK::HitTest( const wxPoint& ref_pos ) /** - * Function HitTest (overlayed) + * Function HitTest (overlaid) * tests if the given EDA_Rect intersect this object. * For now, an ending point must be inside this rect. - * @param refArea : the given EDA_Rect + * @param refArea an EDA_Rect to test * @return bool - true if a hit, else false */ bool TRACK::HitTest( EDA_Rect& refArea ) diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index c35ad4518c..0c0904ab4c 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -39,7 +39,6 @@ public: BOARD_ITEM* start; // pointers to a connected item (pad or track) BOARD_ITEM* end; - // chain = 0 indique une connexion non encore traitee int m_Param; // Auxiliary variable ( used in some computations ) protected: @@ -64,7 +63,7 @@ public: /** * Function Move * move this object. - * @param const wxPoint& aMoveVector - the move vector for this object. + * @param aMoveVector - the move vector for this object. */ virtual void Move(const wxPoint& aMoveVector) { @@ -75,7 +74,7 @@ public: /** * Function Rotate * Rotate this object. - * @param const wxPoint& aRotCentre - the rotation point. + * @param aRotCentre - the rotation point. * @param aAngle - the rotation angle in 0.1 degree. */ virtual void Rotate(const wxPoint& aRotCentre, int aAngle); @@ -83,7 +82,7 @@ public: /** * Function Flip * Flip this object, i.e. change the board side for this object - * @param const wxPoint& aCentre - the rotation point. + * @param aCentre - the rotation point. */ virtual void Flip(const wxPoint& aCentre ); @@ -256,10 +255,10 @@ public: bool HitTest( const wxPoint& refPos ); /** - * Function HitTest (overlayed) + * Function HitTest (overlaid) * tests if the given wxRect intersect this object. * For now, an ending point must be inside this rect. - * @param refPos A wxPoint to test + * @param refArea an EDA_Rect to test * @return bool - true if a hit, else false */ bool HitTest( EDA_Rect& refArea ); @@ -346,9 +345,8 @@ public: /** * Function IsOnLayer * tests to see if this object is on the given layer. Is virtual - * from BOARD_ITEM. Tests the starting and ending range of layers for the - * via. - * @param aLayer The layer to test for. + * from BOARD_ITEM. Tests the starting and ending range of layers for the via. + * @param aLayer the layer to test for. * @return bool - true if on given layer, else false. */ bool IsOnLayer( int aLayer ) const; diff --git a/pcbnew/collectors.cpp b/pcbnew/collectors.cpp index 6d0caaf499..47ab6c80d9 100644 --- a/pcbnew/collectors.cpp +++ b/pcbnew/collectors.cpp @@ -128,11 +128,11 @@ const KICAD_T GENERAL_COLLECTOR::Tracks[] = { * that it finds and does not do any displaying. * * @param testItem An EDA_ITEM to examine. - * @param notUsed The const void* testData. + * @param testData The const void* testData, not used here. * @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan, * else SCAN_CONTINUE; */ -SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* notUsed ) +SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testData ) { BOARD_ITEM* item = (BOARD_ITEM*) testItem; MODULE* module = NULL; diff --git a/pcbnew/collectors.h b/pcbnew/collectors.h index 6207ab429b..e0bf69484b 100644 --- a/pcbnew/collectors.h +++ b/pcbnew/collectors.h @@ -378,7 +378,8 @@ public: * Constructor GENERAL_COLLECTORS_GUIDE * grabs stuff from global preferences and uses reasonable defaults. * Add more constructors as needed. - * @param settings The BOARD_DESIGN_SETTINGS to reference. + * @param aVisibleLayerMask = current visible layers (bit mask) + * @param aPreferredLayer = the layer to search first */ GENERAL_COLLECTORS_GUIDE( int aVisibleLayerMask, int aPreferredLayer ) { @@ -403,7 +404,7 @@ public: m_IgnoreMTextsOnCmp = false; m_IgnoreModulesOnCu = true; // !Show_Modules_Cmp; m_IgnoreModulesOnCmp = false; - + m_IgnorePadsOnFront = false; m_IgnorePadsOnBack = false; } diff --git a/pcbnew/dragsegm.cpp b/pcbnew/dragsegm.cpp index c4dccab679..963c008d0d 100644 --- a/pcbnew/dragsegm.cpp +++ b/pcbnew/dragsegm.cpp @@ -41,8 +41,9 @@ void Dessine_Segments_Dragges( WinEDA_DrawPanel* panel, wxDC* DC ) { wxPoint pos; Track = g_DragSegmentList[ii].m_Segm; +#ifndef USE_WX_OVERLAY Track->Draw( panel, DC, GR_XOR ); // erase from screen at old position - +#endif pt_pad = g_DragSegmentList[ii].m_Pad_Start; if( pt_pad ) { diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index bae993e9fc..cef434dbeb 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -140,24 +140,21 @@ int DRC::Drc( TRACK* aRefSegm, TRACK* aList ) } -/**************************************************************/ -int DRC::Drc( ZONE_CONTAINER* aArea, int CornerIndex ) -/*************************************************************/ - /** * Function Drc * tests the outline segment starting at CornerIndex and returns the result and displays the error * in the status panel only if one exists. * Test Edge inside other areas * Test Edge too close other areas - * @param aEdge The areaparent which contains the corner. - * @param CornerIndex The starting point of the segment to test. + * @param aArea The areaparent which contains the corner. + * @param aCornerIndex The starting point of the segment to test. * @return int - BAD_DRC (1) if DRC error or OK_DRC (0) if OK */ +int DRC::Drc( ZONE_CONTAINER* aArea, int aCornerIndex ) { updatePointers(); - if( !doEdgeZoneDrc( aArea, CornerIndex ) ) + if( !doEdgeZoneDrc( aArea, aCornerIndex ) ) { wxASSERT( m_currentMarker ); m_currentMarker->DisplayInfo( m_mainWindow ); diff --git a/pcbnew/drc_stuff.h b/pcbnew/drc_stuff.h index 362302dc5e..408e2f33ea 100644 --- a/pcbnew/drc_stuff.h +++ b/pcbnew/drc_stuff.h @@ -374,11 +374,11 @@ public: * in the status panel only if one exists. * Test Edge inside other areas * Test Edge too close other areas - * @param aEdge The areaparent which contains the corner. - * @param CornerIndex The starting point of the segment to test. + * @param aArea The areaparent which contains the corner. + * @param aCornerIndex The starting point of the segment to test. * @return int - BAD_DRC (1) if DRC error or OK_DRC (0) if OK */ - int Drc( ZONE_CONTAINER* aArea, int CornerIndex ); + int Drc( ZONE_CONTAINER* aArea, int aCornerIndex ); /** * Function DrcBlind diff --git a/pcbnew/edgemod.cpp b/pcbnew/edgemod.cpp index a7d65d758b..80b9e547af 100644 --- a/pcbnew/edgemod.cpp +++ b/pcbnew/edgemod.cpp @@ -210,11 +210,11 @@ void WinEDA_ModuleEditFrame::Edit_Edge_Layer( EDGE_MODULE* Edge ) /** * Function Enter_Edge_Width - * Edition of the edge items width + * Edition of width of module outlines * Ask for a new width. - * Change the width of EDGE_MODULE Edge if aEdge != NULL + * Change the width of EDGE_MODULE aEdge if aEdge != NULL * @param aEdge = edge to edit, or NULL - * @output ModuleSegmentWidth (global) = new width + * changes g_ModuleSegmentWidth (global) = new width */ void WinEDA_ModuleEditFrame::Enter_Edge_Width( EDGE_MODULE* aEdge ) { diff --git a/pcbnew/edit_track_width.cpp b/pcbnew/edit_track_width.cpp index 244a5e86cd..ed0ddc6cc0 100644 --- a/pcbnew/edit_track_width.cpp +++ b/pcbnew/edit_track_width.cpp @@ -110,10 +110,10 @@ bool WinEDA_PcbFrame::SetTrackSegmentWidth( TRACK* aTrackItem, /** * Function Edit_TrackSegm_Width * Modify one track segment width or one via diameter (using DRC control). - * @param DC = the curred device context (can be NULL) + * @param aDC = the curred device context (can be NULL) * @param aTrackItem = the track segment or via to modify */ -void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem ) +void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* aDC, TRACK* aTrackItem ) { PICKED_ITEMS_LIST itemsListPicker; bool change = SetTrackSegmentWidth( aTrackItem, &itemsListPicker, false ); @@ -122,14 +122,14 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem ) return; // No change // The segment has changed: redraw it and save it in undo list - if( DC ) + if( aDC ) { TRACK* oldsegm = (TRACK*) itemsListPicker.GetPickedItemLink( 0 ); wxASSERT( oldsegm ); - DrawPanel->CursorOff( DC ); // Erase cursor shape - oldsegm->Draw( DrawPanel, DC, GR_XOR ); // Erase old track shape - aTrackItem->Draw( DrawPanel, DC, GR_OR ); // Display new track shape - DrawPanel->CursorOn( DC ); // Display cursor shape + DrawPanel->CursorOff( aDC ); // Erase cursor shape + oldsegm->Draw( DrawPanel, aDC, GR_XOR ); // Erase old track shape + aTrackItem->Draw( DrawPanel, aDC, GR_OR ); // Display new track shape + DrawPanel->CursorOn( aDC ); // Display cursor shape } SaveCopyInUndoList( itemsListPicker, UR_CHANGED ); } @@ -139,11 +139,10 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem ) * 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 - * @param DC = the curred device context (can be NULL) + * @param aDC = the curred device context (can be NULL) * @param aTrackSegment = a segment or via on the track to change - * @return none */ -void WinEDA_PcbFrame::Edit_Track_Width( wxDC* DC, TRACK* aTrackSegment ) +void WinEDA_PcbFrame::Edit_Track_Width( wxDC* aDC, TRACK* aTrackSegment ) { TRACK* pt_track; int nb_segm; @@ -166,18 +165,18 @@ void WinEDA_PcbFrame::Edit_Track_Width( wxDC* DC, TRACK* aTrackSegment ) return; // Some segment have changed: redraw them and save in undo list - if( DC ) + if( aDC ) { - DrawPanel->CursorOff( DC ); // Erase cursor shape + DrawPanel->CursorOff( aDC ); // Erase cursor shape for( unsigned ii = 0; ii < itemsListPicker.GetCount(); ii++ ) { TRACK* segm = (TRACK*) itemsListPicker.GetPickedItemLink( ii ); - segm->Draw( DrawPanel, DC, GR_XOR ); // Erase old track shape + segm->Draw( DrawPanel, aDC, GR_XOR ); // Erase old track shape segm = (TRACK*) itemsListPicker.GetPickedItem( ii ); - segm->Draw( DrawPanel, DC, GR_OR ); // Display new track shape + segm->Draw( DrawPanel, aDC, GR_OR ); // Display new track shape } - DrawPanel->CursorOn( DC ); // Display cursor shape + DrawPanel->CursorOn( aDC ); // Display cursor shape } SaveCopyInUndoList( itemsListPicker, UR_CHANGED ); diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index c70de07d64..d3677e8f3c 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -131,7 +131,7 @@ void WinEDA_PcbFrame::Files_io( wxCommandEvent& event ) * * @return False if file load fails or is cancelled by the user, otherwise true. */ -bool WinEDA_PcbFrame::LoadOnePcbFile( const wxString& aFileName, bool Append, +bool WinEDA_PcbFrame::LoadOnePcbFile( const wxString& aFileName, bool aAppend, bool aForceFileDialog ) { int ii; @@ -141,7 +141,7 @@ bool WinEDA_PcbFrame::LoadOnePcbFile( const wxString& aFileName, bool Append, ActiveScreen = GetScreen(); - if( GetScreen()->IsModify() && !Append ) + if( GetScreen()->IsModify() && !aAppend ) { if( !IsOK( this, _( "The current board has been modified. Do you wish to discard \ the changes?" ) ) ) @@ -150,7 +150,7 @@ the changes?" ) ) ) m_TrackAndViasSizesList_Changed = true; - if( Append ) + if( aAppend ) { GetScreen()->m_FileName = wxEmptyString; OnModify(); @@ -182,7 +182,7 @@ the changes?" ) ) ) fileName.SetExt( PcbFileExtension ); } - if( !Append ) + if( !aAppend ) Clear_Pcb( false ); // pass false since we prompted above for a modified board GetScreen()->m_FileName = fileName.GetFullPath(); @@ -224,7 +224,7 @@ this file again." ) ); // Reload the corresponding configuration file: wxSetWorkingDirectory( wxPathOnly( GetScreen()->m_FileName ) ); - if( Append ) + if( aAppend ) ReadPcbFile( source, true ); else { @@ -244,7 +244,7 @@ this file again." ) ); GetScreen()->ClrModify(); /* If append option: change the initial board name to -append.brd */ - if( Append ) + if( aAppend ) { wxString new_filename = GetScreen()->m_FileName.BeforeLast( '.' ); if ( ! new_filename.EndsWith( wxT( "-append" ) ) ) diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index bbf1cc5521..387ea11ad2 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -24,7 +24,7 @@ * ** Commands are case insensitive ** * Some commands are relatives to the item under the mouse cursor * @param aDC = current device context - * @param hotkey = hotkey code (ascii or wxWidget code for special keys) + * @param aHotkeyCode = hotkey code (ascii or wxWidget code for special keys) * @param aItem = NULL or pointer on a EDA_ITEM under the mouse cursor */ void WinEDA_PcbFrame::OnHotKey( wxDC* aDC, int aHotkeyCode, EDA_ITEM* aItem ) diff --git a/pcbnew/layer_widget.h b/pcbnew/layer_widget.h index 7c61afb11b..4ab9ecfa14 100644 --- a/pcbnew/layer_widget.h +++ b/pcbnew/layer_widget.h @@ -188,7 +188,15 @@ protected: public: /** Constructor + * @param aParent is the parent window * @param aFocusOwner is the window that should be sent the focus after + * @param aPointSize is the font point size to use within the widget. This + * effectively sets the overal size of the widget via the row height and bitmap + * button sizes. + * @param id is the wxWindow id ( default = wxID_ANY) + * @param pos is the window position + * @param size is the window size + * @param style is the window style * every operation. */ LAYER_WIDGET( wxWindow* aParent, wxWindow* aFocusOwner, int aPointSize = -1, @@ -315,6 +323,7 @@ public: * not invoke OnRenderEnable(). * @param aId is the same unique id used when adding a ROW to the * Render tab. + * @param isSet = the new checkbox state */ void SetRenderState( int aId, bool isSet ); @@ -350,6 +359,8 @@ public: * Function OnLayerColorChange * is called to notify client code about a layer color change. Derived * classes will handle this accordingly. + * @param aLayer is the board layer to change + * @param aColor is the new color */ virtual void OnLayerColorChange( int aLayer, int aColor ) = 0; @@ -358,6 +369,7 @@ public: * is called to notify client code whenever the user selects a different * layer. Derived classes will handle this accordingly, and can deny * the change by returning false. + * @param aLayer is the board layer to select */ virtual bool OnLayerSelect( int aLayer ) = 0; @@ -365,6 +377,8 @@ public: * Function OnLayerVisible * is called to notify client code about a layer visibility change. * + * @param aLayer is the board layer to select + * @param isVisible is the new vosible state * @param isFinal is true when this is the last of potentially several * such calls, and can be used to decide when to update the screen only * one time instead of several times in the midst of a multiple layer change. @@ -377,6 +391,7 @@ public: * color. * @param aId is the same id that was established in a Rendering row * via the AddRenderRow() function. + * @param aColor is the new color */ virtual void OnRenderColorChange( int aId, int aColor ) = 0; diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index 34d3d9d5c2..798cc1ecb6 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -36,7 +36,7 @@ static const wxString ModExportFileWildcard( static bool CreateDocLibrary( const wxString& LibName ); -/** +/* * Function Import_Module * Read a file containing only one footprint. * Used to import (after exporting) a footprint @@ -44,7 +44,6 @@ static bool CreateDocLibrary( const wxString& LibName ); * This is the same format as .mod files but restricted to only one footprint * The import function can also read gpcb footprint file, in Newlib format * (One footprint per file, Newlib files have no special ext.) - * @param DC = Current Device Context (can be NULL) */ MODULE* WinEDA_ModuleEditFrame::Import_Module( ) { @@ -146,12 +145,11 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( ) * This is the same format as .mod files but restricted to only one footprint * So Create a new lib (which will contains one module) and export a footprint * is basically the same thing - * @param DC = Current Device Context (can be NULL) - * @param createlib : true = use default lib path to create lib - * false = use current path or last used path to export - * footprint + * @param aModule = the module to export + * @param aCreateSysLib : true = use default lib path to create lib + * false = use current path or last used path to export the footprint */ -void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib ) +void WinEDA_ModuleEditFrame::Export_Module( MODULE* aModule, bool aCreateSysLib ) { wxFileName fn; char Line[1025]; @@ -159,21 +157,21 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib ) wxString msg, path, title, wildcard; wxConfig* Config = wxGetApp().m_EDA_Config; - if( ptmod == NULL ) + if( aModule == NULL ) return; - ptmod->m_LibRef = ptmod->m_Reference->m_Text; - fn.SetName( ptmod->m_LibRef ); - fn.SetExt( createlib ? ModuleFileExtension : ModExportFileExtension ); + aModule->m_LibRef = aModule->m_Reference->m_Text; + fn.SetName( aModule->m_LibRef ); + fn.SetExt( aCreateSysLib ? ModuleFileExtension : ModExportFileExtension ); - if( createlib ) + if( aCreateSysLib ) path = wxGetApp().ReturnLastVisitedLibraryPath(); else if( Config ) Config->Read( EXPORT_IMPORT_LASTPATH_KEY, &path ); fn.SetPath( path ); - title = createlib ? _( "Create New Library" ) : _( "Export Module" ); - wildcard = createlib ? ModuleFileWildcard : ModExportFileWildcard; + title = aCreateSysLib ? _( "Create New Library" ) : _( "Export Module" ); + wildcard = aCreateSysLib ? ModuleFileWildcard : ModExportFileWildcard; wxFileDialog dlg( this, msg, fn.GetPath(), fn.GetFullName(), wildcard, wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); @@ -190,7 +188,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib ) return; } - if( !createlib && Config ) // Save file path + if( !aCreateSysLib && Config ) // Save file path { Config->Write( EXPORT_IMPORT_LASTPATH_KEY, fn.GetPath() ); } @@ -202,7 +200,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib ) fprintf( file, "%s %s\n", ENTETE_LIBRAIRIE, DateAndTime( Line ) ); fputs( "$INDEX\n", file ); - fprintf( file, "%s\n", CONV_TO_UTF8( ptmod->m_LibRef ) ); + fprintf( file, "%s\n", CONV_TO_UTF8( aModule->m_LibRef ) ); fputs( "$EndINDEX\n", file ); GetBoard()->m_Modules->Save( file ); diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index 18709b760e..e8db69d43a 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -201,7 +201,7 @@ MODULE* WinEDA_BasePcbFrame::Load_Module_From_Library( const wxString& library, * * Read active libraries or one library to find and load a given module * If found the module is linked to the tail of linked list of modules - * @param aLibrary: the full filename of the library to read. If empty, + * @param aLibraryFullFilename: the full filename of the library to read. If empty, * all active libraries are read * @param aModuleName = module name to load * @param aDisplayMessageError = true to display an error message if any. @@ -351,7 +351,7 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( * one (or more) of these keyworks in their keywork list * ( aKeyWord = wxEmptyString if not used ) * - * @return wxEmptyString if abort or fails, or the selected module name if Ok + * @return wxEmptyString if abort or fails, or the selected module name if Ok */ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List( WinEDA_DrawFrame* aWindow, const wxString& aLibraryFullFilename, diff --git a/pcbnew/magnetic_tracks_functions.cpp b/pcbnew/magnetic_tracks_functions.cpp index 42407f7f1e..73f26d48a3 100644 --- a/pcbnew/magnetic_tracks_functions.cpp +++ b/pcbnew/magnetic_tracks_functions.cpp @@ -92,6 +92,11 @@ bool Project( wxPoint* res, wxPoint on_grid, const TRACK* track ) * tests to see if there are any magnetic items within near reach of the given * "curpos". If yes, then curpos is adjusted appropriately according to that * near magnetic item and true is returned. + * @param m_Pcb = the current board + * @param frame = the current frame + * @param aCurrentTool = the current tool id (from vertical right toolbar) + * @param grid = the grid size + * @param on_grid = TODO * @param curpos The initial position, and what to adjust if a change is needed. * @return bool - true if the position was adjusted magnetically, else false. */ diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 7d6e00576c..349e86d2d4 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -74,12 +74,12 @@ public: * Print the page pointed by ActiveScreen, set by the calling print function * @param aDC = wxDC given by the calling print function * @param aPrint_Sheet_Ref = true to print page references - * @param aPrintMask = not used here + * @param aPrintMaskLayer = not used here * @param aPrintMirrorMode = not used here (Set when printing in mirror mode) * @param aData = a pointer on an auxiliary data (NULL if not used) */ virtual void PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, - int aPrintMask, bool aPrintMirrorMode, + int aPrintMaskLayer, bool aPrintMirrorMode, void * aData = NULL); // BOARD handling @@ -142,7 +142,19 @@ public: void Transform( MODULE* module, int transform ); // importing / exporting Footprint - void Export_Module( MODULE* ptmod, bool createlib ); + /** + * Function Export_Module + * Create a file containing only one footprint. + * Used to export a footprint + * Exported files have the standard ext .emp + * This is the same format as .mod files but restricted to only one footprint + * So Create a new lib (which will contains one module) and export a footprint + * is basically the same thing + * @param aModule = the module to export + * @param aCreateSysLib : true = use default lib path to create lib + * false = use current path or last used path to export the footprint + */ + void Export_Module( MODULE* aModule, bool aCreateSysLib ); /** * Function Import_Module * Read a file containing only one footprint. @@ -151,7 +163,6 @@ public: * This is the same format as .mod files but restricted to only one footprint * The import function can also read gpcb footprint file, in Newlib format * (One footprint per file, Newlib files have no special ext.) - * @param DC = Current Device Context (can be NULL) */ MODULE* Import_Module( ); @@ -188,11 +199,11 @@ public: void End_Edge_Module( EDGE_MODULE* Edge ); /** * Function Enter_Edge_Width - * Edition of the edge items width + * Edition of width of module outlines * Ask for a new width. * Change the width of EDGE_MODULE Edge if aEdge != NULL * @param aEdge = edge to edit, or NULL - * @output ModuleSegmentWidth (global) = new width + * changes ModuleSegmentWidth (global) = new width */ void Enter_Edge_Width( EDGE_MODULE* aEdge ); void Start_Move_EdgeMod( EDGE_MODULE* drawitem, wxDC* DC ); diff --git a/pcbnew/modules.cpp b/pcbnew/modules.cpp index 689421a502..2033455992 100644 --- a/pcbnew/modules.cpp +++ b/pcbnew/modules.cpp @@ -256,28 +256,27 @@ void Montre_Position_Empreinte( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) * Function Delete Module * Remove a footprint from m_Modules linked list and put it in undelete buffer * The ratsnest and pad list are recalculated - * @param module = footprint to delete - * @param DC = currentDevice Context. if NULL: do not redraw new ratsnest and - * screen - * @param aPromptBeforeDeleting : if true: ask for confirmation before deleting + * @param aModule = footprint to delete + * @param aDC = currentDevice Context. if NULL: do not redraw new ratsnest + * @param aAskBeforeDeleting : if true: ask for confirmation before deleting */ -bool WinEDA_PcbFrame::Delete_Module( MODULE* module, - wxDC* DC, +bool WinEDA_PcbFrame::Delete_Module( MODULE* aModule, + wxDC* aDC, bool aAskBeforeDeleting ) { wxString msg; - if( module == NULL ) + if( aModule == NULL ) return FALSE; - module->DisplayInfo( this ); + aModule->DisplayInfo( this ); /* Confirm module delete. */ if( aAskBeforeDeleting ) { msg.Printf( _( "Delete Module %s (value %s) ?" ), - GetChars( module->m_Reference->m_Text ), - GetChars( module->m_Value->m_Text ) ); + GetChars( aModule->m_Reference->m_Text ), + GetChars( aModule->m_Value->m_Text ) ); if( !IsOK( this, msg ) ) { return FALSE; @@ -287,15 +286,15 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module, OnModify(); /* Remove module from list, and put it in undo command list */ - m_Pcb->m_Modules.Remove( module ); - module->SetState( DELETED, ON ); - SaveCopyInUndoList( module, UR_DELETED ); + m_Pcb->m_Modules.Remove( aModule ); + aModule->SetState( DELETED, ON ); + SaveCopyInUndoList( aModule, UR_DELETED ); - if( DC && GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) ) - Compile_Ratsnest( DC, true ); + if( aDC && GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) ) + Compile_Ratsnest( aDC, true ); // Redraw the full screen to ensure perfect display of board and ratsnest. - if( DC ) + if( aDC ) DrawPanel->Refresh(); return true; @@ -531,7 +530,7 @@ void WinEDA_BasePcbFrame::Rotate_Module( wxDC* DC, MODULE* module, /*************************************************/ -/* Redraw mode XOR the silhouette of the module. */ +/* Redraw in XOR mode the outlines of a module. */ /*************************************************/ void DrawModuleOutlines( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* module ) { @@ -559,7 +558,7 @@ void DrawModuleOutlines( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* module ) if( g_Show_Module_Ratsnest && panel ) { WinEDA_BasePcbFrame* frame = (WinEDA_BasePcbFrame*) panel->GetParent(); - frame->build_ratsnest_module( DC, module ); + frame->build_ratsnest_module( module ); frame->trace_ratsnest_module( DC ); } } diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 322e1621a9..d72db25119 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -81,8 +81,7 @@ static FILE * OpenNetlistFile( const wxString& aFullFileName ); static void AddToList( const wxString& NameLibCmp, const wxString& NameCmp, const wxString& TimeStampPath ); -static int SetPadNetName( wxWindow* aFrame, - char* Text, +static int SetPadNetName( char* Text, MODULE* Module, wxTextCtrl* aMessageWindow ); static int ReadListeModules( const wxString& CmpFullFileName, @@ -315,7 +314,7 @@ bool WinEDA_PcbFrame::ReadPcbNetlist( const wxString& aNetlistFullFilename, { if( Module ) { - SetPadNetName( NULL, Text, Module, aMessageWindow ); + SetPadNetName( Text, Module, aMessageWindow ); } State--; } @@ -579,8 +578,7 @@ is [%s] and netlist said [%s]\n" ), * @param aMessageWindow = a wxTextCtrl to print error and warning message * (can be NULL) */ -int SetPadNetName( wxWindow* frame, - char* Text, +int SetPadNetName( char* Text, MODULE* Module, wxTextCtrl* aMessageWindow ) { @@ -784,7 +782,7 @@ void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* aFrame, * Function BuildFootprintsListFromNetlistFile * Fill BufName with footprints names read from the netlist. * @param aNetlistFullFilename = netlist file name - * @param BufName = wxArrayString to fill with footprint names + * @param aBufName = wxArrayString to fill with footprint names * @return Footprint count, or -1 if netlist file cannot opened */ int BuildFootprintsListFromNetlistFile( const wxString& aNetlistFullFilename, diff --git a/pcbnew/print_board_functions.cpp b/pcbnew/print_board_functions.cpp index b67a59182f..d0941435d1 100644 --- a/pcbnew/print_board_functions.cpp +++ b/pcbnew/print_board_functions.cpp @@ -26,7 +26,7 @@ static void Print_Module( WinEDA_DrawPanel* aPanel, wxDC* aDC, MODULE* aModule, * Print the board, but only layers allowed by aPrintMaskLayer * @param aDC = the print device context * @param aPrint_Sheet_Ref = true to print frame references - * @param aPrint_Sheet_Ref = a 32 bits mask: bit n = 1 -> layer n is printed + * @param aPrintMaskLayer = a 32 bits mask: bit n = 1 -> layer n is printed * @param aPrintMirrorMode = true to plot mirrored * @param aData = a pointer to an optional data (NULL if not used) */ @@ -107,7 +107,7 @@ void WinEDA_ModuleEditFrame::PrintPage( wxDC* aDC, * Print the board, but only layers allowed by aPrintMaskLayer * @param aDC = the print device context * @param aPrint_Sheet_Ref = true to print frame references - * @param aPrint_Sheet_Ref = a 32 bits mask: bit n = 1 -> layer n is printed + * @param aPrintMaskLayer = a 32 bits mask: bit n = 1 -> layer n is printed * @param aPrintMirrorMode = true to plot mirrored * @param aData = a pointer to an optional data (NULL if not used) */ diff --git a/pcbnew/ratsnest.cpp b/pcbnew/ratsnest.cpp index 0938633c37..581e3df49e 100644 --- a/pcbnew/ratsnest.cpp +++ b/pcbnew/ratsnest.cpp @@ -109,16 +109,15 @@ static bool DisplayRastnestInProgress; // Enable the display of the * Create the entire board ratsnest. * Must be called after a board change (changes for * pads, footprints or a read netlist ). - * - * @param display_status_pcb : if true, display the computation results + * @param aDC = the current device context (can be NULL) + * @param aDisplayStatus : if true, display the computation results */ -void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb ) +void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* aDC, bool aDisplayStatus ) { wxString msg; DisplayRastnestInProgress = TRUE; - GetBoard()->m_Status_Pcb = 0; /* we want a full ratsnest computation, * from the scratch */ MsgPanel->EraseMsgBox(); @@ -126,13 +125,13 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb ) // Rebuild the full pads and net info list RecalculateAllTracksNetcode(); - if( display_status_pcb ) + if( aDisplayStatus ) { msg.Printf( wxT( " %d" ), m_Pcb->GetPadsCount() ); Affiche_1_Parametre( this, 1, wxT( "pads" ), msg, RED ); } - if( display_status_pcb ) + if( aDisplayStatus ) { msg.Printf( wxT( " %d" ), m_Pcb->m_NetInfo->GetCount() ); Affiche_1_Parametre( this, 8, wxT( "Nets" ), msg, CYAN ); @@ -145,23 +144,23 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb ) * This full ratsnest is not modified by track editing. * It changes only when a netlist is read, or footprints are modified */ - Build_Board_Ratsnest( DC ); + Build_Board_Ratsnest( aDC ); /* Compute the pad connections due to the existing tracks (physical * connections) */ - test_connexions( DC ); + test_connexions( aDC ); /* Compute the active ratsnest, i.e. the unconnected links * it is faster than Build_Board_Ratsnest() * because many optimizations and computations are already made */ - Tst_Ratsnest( DC, 0 ); + Tst_Ratsnest( aDC, 0 ); // Redraw the active ratsnest ( if enabled ) - if( GetBoard()->IsElementVisible(RATSNEST_VISIBLE) && DC ) - DrawGeneralRatsnest( DC, 0 ); + if( GetBoard()->IsElementVisible(RATSNEST_VISIBLE) && aDC ) + DrawGeneralRatsnest( aDC, 0 ); - if( display_status_pcb ) + if( aDisplayStatus ) m_Pcb->DisplayInfo( this ); } @@ -203,8 +202,7 @@ static int sort_by_length( const void* o1, const void* o2 ) * the D_PAD member m_SubRatsnest handles the block number * @param aRatsnestBuffer = a std::vector buffer to fill with * new ratsnest items - * @param aPadBuffer = a std::vector that is the list of pads to - * consider + * @param aPadBuffer = a std::vector that is the list of pads to consider * @param aPadIdxStart = starting index (within the pad list) for search * @param aPadIdxMax = ending index (within the pad list) for search * @return blocks not connected count @@ -518,18 +516,19 @@ void WinEDA_BasePcbFrame::Build_Board_Ratsnest( wxDC* DC ) /** - * Displays the general ratsnest + * function Displays the general ratsnest * Only ratsnest with the status bit CH_VISIBLE is set are displayed - * @param netcode if > 0, Display only the ratsnest relative to the + * @param aDC = the current device context (can be NULL) + * @param aNetcode if > 0, Display only the ratsnest relative to the * corresponding net_code */ -void WinEDA_BasePcbFrame::DrawGeneralRatsnest( wxDC* DC, int net_code ) +void WinEDA_BasePcbFrame::DrawGeneralRatsnest( wxDC* aDC, int aNetcode ) { if( ( m_Pcb->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK ) == 0 ) return; if( ( m_Pcb->m_Status_Pcb & DO_NOT_SHOW_GENERAL_RASTNEST ) ) return; - if( DC == NULL ) + if( aDC == NULL ) return; int state = CH_VISIBLE | CH_ACTIF; for( unsigned ii = 0; ii < m_Pcb->GetRatsnestsCount(); ii++ ) @@ -538,9 +537,9 @@ void WinEDA_BasePcbFrame::DrawGeneralRatsnest( wxDC* DC, int net_code ) if( ( item.m_Status & state ) != state ) continue; - if( ( net_code <= 0 ) || ( net_code == item.GetNet() ) ) + if( ( aNetcode <= 0 ) || ( aNetcode == item.GetNet() ) ) { - item.Draw( DrawPanel, DC, GR_XOR, wxPoint( 0, 0 ) ); + item.Draw( DrawPanel, aDC, GR_XOR, wxPoint( 0, 0 ) ); } } } @@ -556,7 +555,7 @@ void WinEDA_BasePcbFrame::DrawGeneralRatsnest( wxDC* DC, int net_code ) * The analysis is not made pads to pads but uses the general ratsnest list. * The function activate the smallest ratsnest between block 1 and the block n * (activate a logical connexion) - * + * @param aRatsnestBuffer = the buffer to store NETINFO_ITEM* items * @param net = the current NETINFO_ITEM for the current net * output: * .state member of the ratsnest @@ -743,28 +742,26 @@ void WinEDA_BasePcbFrame::Tst_Ratsnest( wxDC* DC, int ref_netcode ) /** * Function Test_1_Net_Ratsnest * Compute the ratsnest relative to the net "net_code" - * @param DC - Device context to draw on. - * @param ref_netcode = netcode used to compute the ratsnest. + * @param aDC - Device context to draw on. + * @param aNetcode = netcode used to compute the ratsnest. */ -int WinEDA_BasePcbFrame::Test_1_Net_Ratsnest( wxDC* DC, int ref_netcode ) +int WinEDA_BasePcbFrame::Test_1_Net_Ratsnest( wxDC* aDC, int aNetcode ) { DisplayRastnestInProgress = FALSE; - DrawGeneralRatsnest( DC, ref_netcode ); - Tst_Ratsnest( DC, ref_netcode ); - DrawGeneralRatsnest( DC, ref_netcode ); + DrawGeneralRatsnest( aDC, aNetcode ); + Tst_Ratsnest( aDC, aNetcode ); + DrawGeneralRatsnest( aDC, aNetcode ); return m_Pcb->GetRatsnestsCount(); } -/** - * Build a ratsnest relative to one footprint. This is a simplified - * computation - * used only in move footprint. It is not optimal, but it is fast and - * sufficient - * to guide a footprint placement +/* + * Function build_ratsnest_module + * Build a ratsnest relative to one footprint. This is a simplified computation + * used only in move footprint. It is not optimal, but it is fast and sufficient + * to help a footprint placement * It shows the connections from a pad to the nearest connected pad - * @param Module = module to consider. * * The ratsnest has 2 sections: * - An "internal" ratsnest relative to pads of this footprint which are @@ -774,7 +771,7 @@ int WinEDA_BasePcbFrame::Test_1_Net_Ratsnest( wxDC* DC, int ref_netcode ) * pad (in an other footprint) * The ratsnest section must be computed for each new position */ -void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module ) +void WinEDA_BasePcbFrame::build_ratsnest_module( MODULE* aModule ) { static unsigned pads_module_count; // node count (node = pad with a net // code) for the footprint being moved @@ -807,7 +804,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module ) s_localPadBuffer.clear(); m_Pcb->m_LocalRatsnest.clear(); - for( pad_ref = Module->m_Pads; pad_ref != NULL; pad_ref = pad_ref->Next() ) + for( pad_ref = aModule->m_Pads; pad_ref != NULL; pad_ref = pad_ref->Next() ) { if( pad_ref->GetNet() == 0 ) continue; @@ -849,7 +846,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module ) for( unsigned jj = 0; jj < net->m_ListPad.size(); jj++ ) { pad_externe = net->m_ListPad[jj]; - if( pad_externe->GetParent() == Module ) + if( pad_externe->GetParent() == aModule ) continue; pad_externe->SetSubRatsnest( 0 ); @@ -889,9 +886,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module ) /* a - first step of lee algorithm : build the pad to pad link list */ int icnt = gen_rats_pad_to_pad( m_Pcb->m_LocalRatsnest, s_localPadBuffer, - ii, - jj, - 0 ); + ii, jj, 0 ); /* b - second step of lee algorithm : build the block to block link *list (Iteration) */ @@ -899,8 +894,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module ) { icnt = gen_rats_block_to_block( m_Pcb->m_LocalRatsnest, s_localPadBuffer, - ii, - jj ); + ii, jj ); } ii = jj; diff --git a/pcbnew/track.cpp b/pcbnew/track.cpp index 280b396a12..de41265914 100644 --- a/pcbnew/track.cpp +++ b/pcbnew/track.cpp @@ -272,7 +272,7 @@ TRACK* Marque_Une_Piste( BOARD* aPcb, * ref_pos on layers allowed in masque_layer * - Put segments fount in aList * Vias are put in list but their flags BUSY is not set - * @param Pcb = the board + * @param aPcb = the board * @param aRef_pos = the reference coordinate of the starting search * @param aLayerMask = the allowed layers for segments to search * (1 layer when starting point is on a segment, but more than one when diff --git a/pcbnew/zones_by_polygon_fill_functions.cpp b/pcbnew/zones_by_polygon_fill_functions.cpp index 1daeb18cef..e8b3303ec7 100644 --- a/pcbnew/zones_by_polygon_fill_functions.cpp +++ b/pcbnew/zones_by_polygon_fill_functions.cpp @@ -34,18 +34,14 @@ #include "zones.h" -/**********************************************************************************/ -void WinEDA_PcbFrame::Delete_Zone_Fill( SEGZONE* aZone, long aTimestamp ) -/**********************************************************************************/ - /** * Function Delete_Zone_Fill * Remove the zone fillig 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) + * 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 */ +void WinEDA_PcbFrame::Delete_Zone_Fill( SEGZONE* aZone, long aTimestamp ) { bool modify = false; unsigned long TimeStamp; diff --git a/pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp b/pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp index 0880d0f47c..635eef26ce 100644 --- a/pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp +++ b/pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp @@ -521,8 +521,8 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) /** AddPolygonCornersToBoolengine * copy a set of polygons in a kbool engine * @param aCornersBuffer = list of polygons defined by corners. - * @ param aBoolengine = the kbool engine to populate - * @ param aGroup = GROUP_A or GROUP_B + * @param aBoolengine = the kbool engine to populate + * @param aGroup = GROUP_A or GROUP_B */ void AddPolygonCornersToBoolengine( std::vector & aCornersBuffer, Bool_Engine* aBoolengine, GroupType aGroup ) diff --git a/pcbnew/zones_functions_for_undo_redo.h b/pcbnew/zones_functions_for_undo_redo.h index 82c87c3503..bcac6e46ff 100644 --- a/pcbnew/zones_functions_for_undo_redo.h +++ b/pcbnew/zones_functions_for_undo_redo.h @@ -63,9 +63,9 @@ int SaveCopyOfZones(PICKED_ITEMS_LIST & aPickList, BOARD* aPcb, int aNetCode, in * check a pick list to remove zones identical to their copies * and set the type of operation in picker (UR_DELETED, UR_CHANGED) * @param aPickList = the main pick list - * @param aDeletedList = the list of dleted items + * @param aAuxiliaryList = the list of deleted or added (new created) items after calculations * @param aPcb = the Board */ -void UpdateCopyOfZonesList( PICKED_ITEMS_LIST& aPickList, PICKED_ITEMS_LIST& aDeletedList, BOARD* aPcb ); +void UpdateCopyOfZonesList( PICKED_ITEMS_LIST& aPickList, PICKED_ITEMS_LIST& aAuxiliaryList, BOARD* aPcb ); #endif // ZONES_FUNCTIONS_TO_UNDO_REDO_H diff --git a/pcbnew/zones_test_and_combine_areas.cpp b/pcbnew/zones_test_and_combine_areas.cpp index 6d23760fbf..08464846c3 100644 --- a/pcbnew/zones_test_and_combine_areas.cpp +++ b/pcbnew/zones_test_and_combine_areas.cpp @@ -328,8 +328,8 @@ int BOARD::ClipAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList, * @param aModifiedZonesList = a PICKED_ITEMS_LIST * where to store deleted or added areas (useful in undo commands * can be NULL * @param modified_area = area to test + * @param bMessageBoxArc if true, shows message when clipping can't be done due to arcs. * @param bMessageBoxInt == true, shows message when clipping occurs. - * @param bMessageBoxArc == true, shows message when clipping can't be done due to arcs. * @return : * -1 if arcs intersect other sides, so polygon can't be clipped * 0 if no intersecting sides