Commit 819589cf authored by jean-pierre charras's avatar jean-pierre charras

All: fix most of Doxygen warnings.

parent 3ff16a0b
///////////////////////////////////////////////////////////////////////////// /**
// Name: dialog_display_options.cpp * @file cvpcb/dialogs/dialog_display_options.cpp
// Licence: GPL */
/////////////////////////////////////////////////////////////////////////////
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <fctsys.h> #include <fctsys.h>
#include <wxstruct.h> #include <wxstruct.h>
......
/** /**
* @file dialog_display_options.h * @file cvpcb/dialogs/dialog_display_options.h
*/ */
#ifndef _DIALOG_DISPLAY_OPTIONS_H_ #ifndef _DIALOG_DISPLAY_OPTIONS_H_
......
...@@ -110,9 +110,11 @@ void GERBER_LAYER_WIDGET::ReFillRender() ...@@ -110,9 +110,11 @@ void GERBER_LAYER_WIDGET::ReFillRender()
{ {
if( renderRows[row].color != -1 ) // does this row show a color? if( renderRows[row].color != -1 ) // does this row show a color?
{ {
renderRows[row].color = myframe->GetVisibleElementColor( renderRows[row].id ); renderRows[row].color = myframe->GetVisibleElementColor(
(GERBER_VISIBLE_ID)renderRows[row].id );
} }
renderRows[row].state = myframe->IsElementVisible( renderRows[row].id ); renderRows[row].state = myframe->IsElementVisible(
(GERBER_VISIBLE_ID)renderRows[row].id );
} }
AppendRenderRows( renderRows, DIM(renderRows) ); AppendRenderRows( renderRows, DIM(renderRows) );
...@@ -246,13 +248,13 @@ void GERBER_LAYER_WIDGET::OnLayerVisible( int aLayer, bool isVisible, bool isFin ...@@ -246,13 +248,13 @@ void GERBER_LAYER_WIDGET::OnLayerVisible( int aLayer, bool isVisible, bool isFin
void GERBER_LAYER_WIDGET::OnRenderColorChange( int aId, EDA_COLOR_T aColor ) void GERBER_LAYER_WIDGET::OnRenderColorChange( int aId, EDA_COLOR_T aColor )
{ {
myframe->SetVisibleElementColor( aId, aColor ); myframe->SetVisibleElementColor( (GERBER_VISIBLE_ID)aId, aColor );
myframe->GetCanvas()->Refresh(); myframe->GetCanvas()->Refresh();
} }
void GERBER_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) void GERBER_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
{ {
myframe->SetElementVisibility( aId, isEnabled ); myframe->SetElementVisibility( (GERBER_VISIBLE_ID)aId, isEnabled );
myframe->GetCanvas()->Refresh(); myframe->GetCanvas()->Refresh();
} }
......
...@@ -68,7 +68,7 @@ private: ...@@ -68,7 +68,7 @@ private:
* write a via to the board file (always uses a via through). * write a via to the board file (always uses a via through).
* @param aGbrItem = the flashed Gerber item to export * @param aGbrItem = the flashed Gerber item to export
*/ */
void export_flashed_copper_item( GERBER_DRAW_ITEM* aGbrItemr ); void export_flashed_copper_item( GERBER_DRAW_ITEM* aGbrItem );
/** /**
* Function export_segline_copper_item * Function export_segline_copper_item
......
...@@ -34,20 +34,12 @@ extern const wxChar* g_GerberPageSizeList[8]; ...@@ -34,20 +34,12 @@ extern const wxChar* g_GerberPageSizeList[8];
#define GERB_STOP_DRAW 2 // Extinguish light (lift pen) #define GERB_STOP_DRAW 2 // Extinguish light (lift pen)
#define GERB_FLASH 3 // Flash #define GERB_FLASH 3 // Flash
/*
enum PlotFormat
{
FORMAT_HPGL,
FORMAT_GERBER,
FORMAT_POST
};
*/
/** /**
* Enum ITEM_VISIBLE * Enum GERBER_VISIBLE_ID
* is a set of visible PCB elements. * is a set of visible GERBVIEW elements.
*/ */
enum GERBER_VISIBLE enum GERBER_VISIBLE_ID
{ {
DCODES_VISIBLE = 1, // visible item id cannot be 0 because this id is used as wxWidget id DCODES_VISIBLE = 1, // visible item id cannot be 0 because this id is used as wxWidget id
GERBER_GRID_VISIBLE, GERBER_GRID_VISIBLE,
......
...@@ -292,11 +292,11 @@ void GERBVIEW_FRAME::ReFillLayerWidget() ...@@ -292,11 +292,11 @@ void GERBVIEW_FRAME::ReFillLayerWidget()
/** /**
* Function SetElementVisibility * Function SetElementVisibility
* changes the visibility of an element category * changes the visibility of an element category
* @param aItemIdVisible is from the enum by the same name * @param aItemIdVisible is an item id from the enum GERBER_VISIBLE_ID
* @param aNewState = The new visibility state of the element category * @param aNewState = The new visibility state of the element category
* @see enum aGERBER_VISIBLE
*/ */
void GERBVIEW_FRAME::SetElementVisibility( int aItemIdVisible, bool aNewState ) void GERBVIEW_FRAME::SetElementVisibility( GERBER_VISIBLE_ID aItemIdVisible,
bool aNewState )
{ {
switch( aItemIdVisible ) switch( aItemIdVisible )
{ {
...@@ -486,13 +486,11 @@ void GERBVIEW_FRAME::UpdateTitleAndInfo() ...@@ -486,13 +486,11 @@ void GERBVIEW_FRAME::UpdateTitleAndInfo()
/* /*
* Function IsElementVisible * Function IsElementVisible
* tests whether a given element category is visible. Keep this as an * tests whether a given element category is visible
* inline function. * aItemIdVisible is an item id from the enum GERBER_VISIBLE_ID
* @param aGERBER_VISIBLE is from the enum by the same name * return true if the element is visible.
* @return bool - true if the element is visible.
* @see enum PCB_VISIBLE
*/ */
bool GERBVIEW_FRAME::IsElementVisible( int aItemIdVisible ) bool GERBVIEW_FRAME::IsElementVisible( GERBER_VISIBLE_ID aItemIdVisible )
{ {
switch( aItemIdVisible ) switch( aItemIdVisible )
{ {
...@@ -505,7 +503,7 @@ bool GERBVIEW_FRAME::IsElementVisible( int aItemIdVisible ) ...@@ -505,7 +503,7 @@ bool GERBVIEW_FRAME::IsElementVisible( int aItemIdVisible )
break; break;
default: default:
wxLogDebug( wxT( "GERBVIEW_FRAME::SetVisibleElementColor(): bad arg %d" ), aItemIdVisible ); wxLogDebug( wxT( "GERBVIEW_FRAME::IsElementVisible(): bad arg %d" ), aItemIdVisible );
} }
return true; return true;
...@@ -564,7 +562,7 @@ bool GERBVIEW_FRAME::IsLayerVisible( int aLayerIndex ) const ...@@ -564,7 +562,7 @@ bool GERBVIEW_FRAME::IsLayerVisible( int aLayerIndex ) const
* returns the color of a pcb visible element. * returns the color of a pcb visible element.
* @see enum PCB_VISIBLE * @see enum PCB_VISIBLE
*/ */
EDA_COLOR_T GERBVIEW_FRAME::GetVisibleElementColor( int aItemIdVisible ) EDA_COLOR_T GERBVIEW_FRAME::GetVisibleElementColor( GERBER_VISIBLE_ID aItemIdVisible )
{ {
EDA_COLOR_T color = UNSPECIFIED_COLOR; EDA_COLOR_T color = UNSPECIFIED_COLOR;
...@@ -579,7 +577,8 @@ EDA_COLOR_T GERBVIEW_FRAME::GetVisibleElementColor( int aItemIdVisible ) ...@@ -579,7 +577,8 @@ EDA_COLOR_T GERBVIEW_FRAME::GetVisibleElementColor( int aItemIdVisible )
break; break;
default: default:
wxLogDebug( wxT( "GERBVIEW_FRAME::GetVisibleElementColor(): bad arg %d" ), aItemIdVisible ); wxLogDebug( wxT( "GERBVIEW_FRAME::GetVisibleElementColor(): bad arg %d" ),
(int)aItemIdVisible );
} }
return color; return color;
...@@ -595,7 +594,8 @@ void GERBVIEW_FRAME::SetGridVisibility( bool aVisible ) ...@@ -595,7 +594,8 @@ void GERBVIEW_FRAME::SetGridVisibility( bool aVisible )
} }
void GERBVIEW_FRAME::SetVisibleElementColor( int aItemIdVisible, EDA_COLOR_T aColor ) void GERBVIEW_FRAME::SetVisibleElementColor( GERBER_VISIBLE_ID aItemIdVisible,
EDA_COLOR_T aColor )
{ {
switch( aItemIdVisible ) switch( aItemIdVisible )
{ {
...@@ -609,7 +609,8 @@ void GERBVIEW_FRAME::SetVisibleElementColor( int aItemIdVisible, EDA_COLOR_T aCo ...@@ -609,7 +609,8 @@ void GERBVIEW_FRAME::SetVisibleElementColor( int aItemIdVisible, EDA_COLOR_T aCo
break; break;
default: default:
wxLogDebug( wxT( "GERBVIEW_FRAME::SetVisibleElementColor(): bad arg %d" ), aItemIdVisible ); wxLogDebug( wxT( "GERBVIEW_FRAME::SetVisibleElementColor(): bad arg %d" ),
(int) aItemIdVisible );
} }
} }
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <param_config.h> #include <param_config.h>
#include <wxstruct.h> #include <wxstruct.h>
#include <gerbview.h>
#include <class_gbr_layout.h> #include <class_gbr_layout.h>
#include <class_gbr_screen.h> #include <class_gbr_screen.h>
...@@ -263,20 +264,19 @@ public: ...@@ -263,20 +264,19 @@ public:
* Function IsElementVisible * Function IsElementVisible
* tests whether a given element category is visible. Keep this as an * tests whether a given element category is visible. Keep this as an
* inline function. * inline function.
* @param aGERBER_VISIBLE is from the enum by the same name * @param aItemIdVisible is an item id from the enum GERBER_VISIBLE_ID
* @return bool - true if the element is visible. * @return bool - true if the element is visible.
* @see enum PCB_VISIBLE
*/ */
bool IsElementVisible( int aGERBER_VISIBLE ); bool IsElementVisible( GERBER_VISIBLE_ID aItemIdVisible );
/** /**
* Function SetElementVisibility * Function SetElementVisibility
* changes the visibility of an element category * changes the visibility of an element category
* @param aGERBER_VISIBLE is from the enum by the same name * @param aItemIdVisible is an item id from the enum GERBER_VISIBLE_ID
* @param aNewState = The new visibility state of the element category * @param aNewState = The new visibility state of the element category
* @see enum PCB_VISIBLE * (see enum PCB_VISIBLE)
*/ */
void SetElementVisibility( int aGERBER_VISIBLE, bool aNewState ); void SetElementVisibility( GERBER_VISIBLE_ID aItemIdVisible, bool aNewState );
/** /**
* Function SetVisibleAlls * Function SetVisibleAlls
...@@ -317,12 +317,11 @@ public: ...@@ -317,12 +317,11 @@ public:
/** /**
* Function GetVisibleElementColor * Function GetVisibleElementColor
* returns the color of a pcb visible element. * returns the color of a gerber visible element.
* @see enum PCB_VISIBLE
*/ */
EDA_COLOR_T GetVisibleElementColor( int aItemIdVisible ); EDA_COLOR_T GetVisibleElementColor( GERBER_VISIBLE_ID aItemIdVisible );
void SetVisibleElementColor( int aItemIdVisible, EDA_COLOR_T aColor ); void SetVisibleElementColor( GERBER_VISIBLE_ID aItemIdVisible, EDA_COLOR_T aColor );
/** /**
* Function GetLayerColor * Function GetLayerColor
......
/** /**
* @file select_layers_to_pcb.cpp * @file gerbview/select_layers_to_pcb.cpp
* @brief Dialog to choose equivalence between gerber layers and pcb layers * @brief Dialog to choose equivalence between gerber layers and pcb layers
*/ */
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 1992-2010 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
......
...@@ -143,8 +143,8 @@ public: ...@@ -143,8 +143,8 @@ public:
/** /**
* Set the plot offset and scaling for the current plot * Set the plot offset and scaling for the current plot
* @param aIusPerDecimil gives the scaling factor from IUs to device * @param aOffset is the plot offset
* units * @param aIusPerDecimil gives the scaling factor from IUs to device units
* @param aScale is the user set plot scaling factor (either explicitly * @param aScale is the user set plot scaling factor (either explicitly
* or using 'fit to A4') * or using 'fit to A4')
* @param aMirror flips the plot in the Y direction (useful for toner * @param aMirror flips the plot in the Y direction (useful for toner
...@@ -170,6 +170,7 @@ public: ...@@ -170,6 +170,7 @@ public:
/** /**
* moveto/lineto primitive, moves the 'pen' to the specified direction * moveto/lineto primitive, moves the 'pen' to the specified direction
* @param pos is the target position
* @param plume specifies the kind of motion: 'U' only moves the pen, * @param plume specifies the kind of motion: 'U' only moves the pen,
* 'D' draw a line from the current position and 'Z' finish * 'D' draw a line from the current position and 'Z' finish
* the drawing and returns the 'pen' to rest (flushes the trace) * the drawing and returns the 'pen' to rest (flushes the trace)
......
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
* *
...@@ -378,11 +378,9 @@ public: ...@@ -378,11 +378,9 @@ public:
* loads @a aFootprintName from @a aLibraryPath. * loads @a aFootprintName from @a aLibraryPath.
* If found add the module is also added to the BOARD, just for good measure. * If found add the module is also added to the BOARD, just for good measure.
* *
* @param aLibraryFullFilename - the full filename of the library to read. If empty, * @param aLibraryPath - the full filename or the short name of the library to read.
* all active libraries are read * if it is a short name, the file is searched in all library valid paths
*
* @param aFootprintName is the footprint to load * @param aFootprintName is the footprint to load
*
* @param aDisplayError = true to display an error message if any. * @param aDisplayError = true to display an error message if any.
* *
* @return MODULE* - new module, or NULL * @return MODULE* - new module, or NULL
...@@ -390,25 +388,36 @@ public: ...@@ -390,25 +388,36 @@ public:
MODULE* loadFootprintFromLibrary( const wxString& aLibraryPath, MODULE* loadFootprintFromLibrary( const wxString& aLibraryPath,
const wxString& aFootprintName, bool aDisplayError ); const wxString& aFootprintName, bool aDisplayError );
/**
* Function loadFootprintFromLibraries
* Explore the libraries list and
* loads @a aFootprintName from the first library it is found
* If found the module is added to the BOARD, just for good measure.
*
* @param aFootprintName is the footprint to load
* @param aDisplayError = true to display an error message if any.
*
* @return MODULE* - new module, or NULL
*/
MODULE* loadFootprintFromLibraries( const wxString& aFootprintName, MODULE* loadFootprintFromLibraries( const wxString& aFootprintName,
bool aDisplayError ); bool aDisplayError );
/** /**
* Function GetModuleLibrary * Function GetModuleLibrary
* scans active libraries to find and load @a aFootprintName. * scans active libraries to find and load @a aFootprintName.
* If found add the module is also added to the BOARD, just for good measure. * If found the module is added to the BOARD, just for good measure.
* *
* @param aLibraryPath is the full/short name of the library.
* if empty, search in all libraries
* @param aFootprintName is the footprint to load * @param aFootprintName is the footprint to load
*
* @param aDisplayError = true to display an error message if any. * @param aDisplayError = true to display an error message if any.
* *
* @return a pointer to the new module, or NULL * @return a pointer to the new module, or NULL
*
*/ */
MODULE* GetModuleLibrary( const wxString& aLibraryPath, const wxString& aFootprintName, MODULE* GetModuleLibrary( const wxString& aLibraryPath, const wxString& aFootprintName,
bool aDisplayError ) bool aDisplayError )
{ {
if( !aLibraryPath ) if( aLibraryPath.IsEmpty() )
return loadFootprintFromLibraries( aFootprintName, aDisplayError ); return loadFootprintFromLibraries( aFootprintName, aDisplayError );
else else
return loadFootprintFromLibrary( aLibraryPath, aFootprintName, aDisplayError ); return loadFootprintFromLibrary( aLibraryPath, aFootprintName, aDisplayError );
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
*/ */
/** /**
* @file board.cpp * @file routing_matrix.cpp
* @brief Functions for autorouting * @brief Functions to create autorouting maps
*/ */
#include <fctsys.h> #include <fctsys.h>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
/** /**
* Class FOOTPRINT_WIZARD * Class FOOTPRINT_WIZARD
* This is the parent class from where any footprint wizard class must * This is the parent class from where any footprint wizard class must
* derive */ * derive */
class FOOTPRINT_WIZARD class FOOTPRINT_WIZARD
{ {
...@@ -18,45 +18,45 @@ class FOOTPRINT_WIZARD ...@@ -18,45 +18,45 @@ class FOOTPRINT_WIZARD
public: public:
FOOTPRINT_WIZARD() {} FOOTPRINT_WIZARD() {}
~FOOTPRINT_WIZARD() {} ~FOOTPRINT_WIZARD() {}
/** /**
* Function GetName * Function GetName
* @return the name of the wizard * @return the name of the wizard
*/ */
virtual wxString GetName()=0; virtual wxString GetName()=0;
/** /**
* Function GetImage * Function GetImage
* @return an svg image of the wizard to be rendered * @return an svg image of the wizard to be rendered
*/ */
virtual wxString GetImage()=0; virtual wxString GetImage()=0;
/** /**
* Function GetDescription * Function GetDescription
* @return a description of the footprint wizard * @return a description of the footprint wizard
*/ */
virtual wxString GetDescription()=0; virtual wxString GetDescription()=0;
/** /**
* Function GetNumParameterPages * Function GetNumParameterPages
* @return the number of parameter pages that this wizard will show to the user * @return the number of parameter pages that this wizard will show to the user
*/ */
virtual int GetNumParameterPages()=0; virtual int GetNumParameterPages()=0;
/** /**
* Function GetParameterPageName * Function GetParameterPageName
* @param aPage is the page we want the name of * @param aPage is the page we want the name of
* @return a string with the page name * @return a string with the page name
*/ */
virtual wxString GetParameterPageName(int aPage)=0; virtual wxString GetParameterPageName(int aPage)=0;
/** /**
* Function GetParameterNames * Function GetParameterNames
* @param aPage is the page we want the parameter names of * @param aPage is the page we want the parameter names of
* @return an array string with the parameter names on a certain page * @return an array string with the parameter names on a certain page
*/ */
virtual wxArrayString GetParameterNames(int aPage)=0; virtual wxArrayString GetParameterNames(int aPage)=0;
/** /**
* Function GetParameterTypes * Function GetParameterTypes
* @param aPage is the page we want the parameter types of * @param aPage is the page we want the parameter types of
...@@ -64,22 +64,22 @@ public: ...@@ -64,22 +64,22 @@ public:
* "IU" for internal units, "UNITS" for units (0,1,2,3...,N) * "IU" for internal units, "UNITS" for units (0,1,2,3...,N)
*/ */
virtual wxArrayString GetParameterTypes(int aPage)=0; virtual wxArrayString GetParameterTypes(int aPage)=0;
/** /**
* Function GetParameterValues * Function GetParameterValues
* @param aPage is the page we want the parameter values of * @param aPage is the page we want the parameter values of
* @return an array of parameter values * @return an array of parameter values
*/ */
virtual wxArrayString GetParameterValues(int aPage)=0; virtual wxArrayString GetParameterValues(int aPage)=0;
/** /**
* Function GetParameterErrors * Function GetParameterErrors
* @param aPAge is the page we want to know the errors of * @param aPage is the page we want to know the errors of
* @return an array of errors (if any) for the parameters, empty strings for OK parameters * @return an array of errors (if any) for the parameters, empty strings for OK parameters
*/ */
virtual wxArrayString GetParameterErrors(int aPage)=0; virtual wxArrayString GetParameterErrors(int aPage)=0;
/** /**
* Function SetParameterValues * Function SetParameterValues
* @param aPage is the page we want to set the parameters in * @param aPage is the page we want to set the parameters in
...@@ -87,57 +87,59 @@ public: ...@@ -87,57 +87,59 @@ public:
* @return an array of parameter values * @return an array of parameter values
*/ */
virtual wxString SetParameterValues(int aPage,wxArrayString& aValues)=0; virtual wxString SetParameterValues(int aPage,wxArrayString& aValues)=0;
/** /**
* Function GetModule * Function GetModule
* This method builds the module itself and returns it to the caller function * This method builds the module itself and returns it to the caller function
* @return PCB module built from the parameters given to the class * @return PCB module built from the parameters given to the class
*/ */
virtual MODULE *GetModule()=0; virtual MODULE *GetModule()=0;
/** /**
* Function register_wizard * Function register_wizard
* It's the standard method of a "FOOTPRINT_WIZARD" to register itself into * It's the standard method of a "FOOTPRINT_WIZARD" to register itself into
* the FOOTPRINT_WIZARDS singleton manager * the FOOTPRINT_WIZARDS singleton manager
* *
*/ */
void register_wizard(); void register_wizard();
}; };
class FOOTPRINT_WIZARDS class FOOTPRINT_WIZARDS
{ {
private: private:
static std::vector<FOOTPRINT_WIZARD*> m_FootprintWizards; static std::vector<FOOTPRINT_WIZARD*> m_FootprintWizards;
public: public:
/** /**
* Function register_wizard * Function register_wizard
* A footprint wizard calls this static method when it wants to register itself * A footprint wizard calls this static method when it wants to register itself
* into the system wizards * into the system wizards
* *
* @param aWizard is the footprint wizard to be registered * @param aWizard is the footprint wizard to be registered
* *
*/ */
static void register_wizard(FOOTPRINT_WIZARD *wizard); static void register_wizard(FOOTPRINT_WIZARD *aWizard);
/** /**
* Function GetWizard * Function GetWizard
* @param aName is the footprint wizard name
* @return a wizard object by it's name or NULL if it isn't available. * @return a wizard object by it's name or NULL if it isn't available.
* *
*/ */
static FOOTPRINT_WIZARD* GetWizard(wxString aName); static FOOTPRINT_WIZARD* GetWizard(wxString aName);
/** /**
* Function GetWizard * Function GetWizard
* @return a wizard object by it's number or NULL if it isn't available. * @return a wizard object by it's number or NULL if it isn't available.
* * @param aIndex is the wizard index in list
*
*/ */
static FOOTPRINT_WIZARD* GetWizard(int aIndex); static FOOTPRINT_WIZARD* GetWizard( int aIndex );
/** /**
* Function GetSize * Function GetSize
* @return the number of wizards available into the system * @return the number of wizards available into the system
*/ */
......
/** /**
* @file dialog_svg_print.cpp * @file pcbnew/dialogs/dialog_SVG_print.cpp
*/ */
/* /*
......
/** /**
* @file dialod_edit_module_for_Modedit.cpp * @file dialog_edit_module_for_Modedit.cpp
* *
* @brief Dialog for editing a module properties in module editor (modedit) * @brief Dialog for editing a module properties in module editor (modedit)
*/ */
......
...@@ -86,13 +86,13 @@ public: ...@@ -86,13 +86,13 @@ public:
/** /**
* Set auxiliary parameters relative to calucaltions needed * Set auxiliary parameters relative to calucaltions needed
* to find track ends positions while dragging pads * to find track ends positions while dragging pads
* and when modules are rotated, flipped .. * and when modules are rotated, flipped
*/ */
void SetAuxParameters(); void SetAuxParameters();
/** /**
* Calculate track ends position while dragging pads * Calculate track ends position while dragging pads
* and when modules are rotated, flipped .. * and when modules are rotated, flipped
* @param aOffset = offset of module or pad position (when moving) * @param aOffset = offset of module or pad position (when moving)
*/ */
void SetTrackEndsCoordinates(wxPoint aOffset); void SetTrackEndsCoordinates(wxPoint aOffset);
......
...@@ -453,6 +453,7 @@ public: ...@@ -453,6 +453,7 @@ public:
* @param aPad2PadTest Tells whether to test pad to pad distances. * @param aPad2PadTest Tells whether to test pad to pad distances.
* @param aUnconnectedTest Tells whether to list unconnected pads. * @param aUnconnectedTest Tells whether to list unconnected pads.
* @param aZonesTest Tells whether to test zones. * @param aZonesTest Tells whether to test zones.
* @param aKeepoutTest Tells whether to test keepout areas.
* @param aReportName A string telling the disk file report name entered. * @param aReportName A string telling the disk file report name entered.
* @param aSaveReport A boolean telling whether to generate disk file report. * @param aSaveReport A boolean telling whether to generate disk file report.
*/ */
......
...@@ -279,8 +279,9 @@ struct EWIRE ...@@ -279,8 +279,9 @@ struct EWIRE
/** /**
* Constructor EWIRE * Constructor EWIRE
* converts a <wire>'s xml attributes to binary without additional conversion. * converts a "wire"'s xml attributes ( &ltwire&gt )
* This result is an EWIRE with the <wire> textual data merely converted to binary. * to binary without additional conversion.
* This result is an EWIRE with the &ltwire&gt textual data merely converted to binary.
*/ */
EWIRE::EWIRE( CPTREE& aWire ) EWIRE::EWIRE( CPTREE& aWire )
{ {
......
...@@ -260,6 +260,12 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary, ...@@ -260,6 +260,12 @@ MODULE* PCB_BASE_FRAME::Load_Module_From_Library( const wxString& aLibrary,
} }
/* loads aFootprintName from aLibraryPath.
* If found the module is added to the BOARD, just for good measure.
*
* aLibraryPath - the full filename or the short name of the library to read.
* if it is a short name, the file is searched in all library valid paths
*/
MODULE* PCB_BASE_FRAME::loadFootprintFromLibrary( const wxString& aLibraryPath, MODULE* PCB_BASE_FRAME::loadFootprintFromLibrary( const wxString& aLibraryPath,
const wxString& aFootprintName, bool aDisplayError ) const wxString& aFootprintName, bool aDisplayError )
{ {
...@@ -298,6 +304,10 @@ MODULE* PCB_BASE_FRAME::loadFootprintFromLibrary( const wxString& aLibraryPath, ...@@ -298,6 +304,10 @@ MODULE* PCB_BASE_FRAME::loadFootprintFromLibrary( const wxString& aLibraryPath,
} }
/* Explore the libraries list and
* loads aFootprintName from the first library it is found
* If found add the module is also added to the BOARD, just for good measure.
*/
MODULE* PCB_BASE_FRAME::loadFootprintFromLibraries( MODULE* PCB_BASE_FRAME::loadFootprintFromLibraries(
const wxString& aFootprintName, bool aDisplayError ) const wxString& aFootprintName, bool aDisplayError )
{ {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
*/ */
/** /**
* @file pad_change_functions.cpp * @file pad_edition_functions.cpp
*/ */
#include <fctsys.h> #include <fctsys.h>
......
...@@ -384,14 +384,11 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings() ...@@ -384,14 +384,11 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings()
void PCB_EDIT_FRAME::SaveMacros() void PCB_EDIT_FRAME::SaveMacros()
{ {
wxFileName fn;
wxXmlDocument xml; wxXmlDocument xml;
XNODE *rootNode = new XNODE( wxXML_ELEMENT_NODE, wxT( "macrosrootnode" ), wxEmptyString );
XNODE *macrosNode, *hkNode;
wxXmlProperty *macrosProp, *hkProp, *xProp, *yProp; wxXmlProperty *macrosProp, *hkProp, *xProp, *yProp;
wxString str, hkStr, xStr, yStr; wxString str, hkStr, xStr, yStr;
fn = GetBoard()->GetFileName(); wxFileName fn = GetBoard()->GetFileName();
fn.SetExt( MacrosFileExtension ); fn.SetExt( MacrosFileExtension );
wxFileDialog dlg( this, _( "Save Macros File" ), fn.GetPath(), fn.GetFullName(), wxFileDialog dlg( this, _( "Save Macros File" ), fn.GetPath(), fn.GetFullName(),
...@@ -400,6 +397,7 @@ void PCB_EDIT_FRAME::SaveMacros() ...@@ -400,6 +397,7 @@ void PCB_EDIT_FRAME::SaveMacros()
if( dlg.ShowModal() == wxID_CANCEL ) if( dlg.ShowModal() == wxID_CANCEL )
return; return;
XNODE *rootNode = new XNODE( wxXML_ELEMENT_NODE, wxT( "macrosrootnode" ), wxEmptyString );
xml.SetRoot( rootNode ); xml.SetRoot( rootNode );
for( int number = 9; number >= 0; number-- ) for( int number = 9; number >= 0; number-- )
...@@ -407,8 +405,9 @@ void PCB_EDIT_FRAME::SaveMacros() ...@@ -407,8 +405,9 @@ void PCB_EDIT_FRAME::SaveMacros()
str.Printf( wxT( "%d" ), number ); str.Printf( wxT( "%d" ), number );
macrosProp = new wxXmlProperty( wxT( "number" ), str ); macrosProp = new wxXmlProperty( wxT( "number" ), str );
macrosNode = new XNODE( rootNode, wxXML_ELEMENT_NODE, wxT( "macros" ), wxEmptyString, XNODE * macrosNode = new XNODE( rootNode, wxXML_ELEMENT_NODE,
macrosProp ); wxT( "macros" ), wxEmptyString,
macrosProp );
for( std::list<MACROS_RECORD>::reverse_iterator i = m_Macros[number].m_Record.rbegin(); for( std::list<MACROS_RECORD>::reverse_iterator i = m_Macros[number].m_Record.rbegin();
i != m_Macros[number].m_Record.rend(); i != m_Macros[number].m_Record.rend();
...@@ -422,8 +421,8 @@ void PCB_EDIT_FRAME::SaveMacros() ...@@ -422,8 +421,8 @@ void PCB_EDIT_FRAME::SaveMacros()
xProp = new wxXmlProperty( wxT( "x" ), xStr, yProp ); xProp = new wxXmlProperty( wxT( "x" ), xStr, yProp );
hkProp = new wxXmlProperty( wxT( "hkcode" ), hkStr, xProp ); hkProp = new wxXmlProperty( wxT( "hkcode" ), hkStr, xProp );
hkNode = new XNODE( macrosNode, wxXML_ELEMENT_NODE, wxT( "hotkey" ), new XNODE( macrosNode, wxXML_ELEMENT_NODE, wxT( "hotkey" ),
wxEmptyString, hkProp ); wxEmptyString, hkProp );
} }
} }
......
...@@ -70,7 +70,7 @@ PLOTTER *StartPlotBoard( BOARD *aBoard, ...@@ -70,7 +70,7 @@ PLOTTER *StartPlotBoard( BOARD *aBoard,
* @param aLayer = the layer id to plot * @param aLayer = the layer id to plot
* @param aPlotOpt = the plot options (files, sketch). Has meaning for some formats only * @param aPlotOpt = the plot options (files, sketch). Has meaning for some formats only
*/ */
void PlotBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, int Layer, void PlotBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, int aLayer,
const PCB_PLOT_PARAMS& aPlotOpt ); const PCB_PLOT_PARAMS& aPlotOpt );
/** /**
...@@ -97,6 +97,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, long aLayerMask, ...@@ -97,6 +97,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, long aLayerMask,
* Should not be used for other layers * Should not be used for other layers
* @param aBoard = the board to plot * @param aBoard = the board to plot
* @param aPlotter = the plotter to use * @param aPlotter = the plotter to use
* @param aLayerMask = the mask to define the layers to plot (silkscreen Front and/or Back)
* @param aPlotOpt = the plot options (files, sketch). Has meaning for some formats only * @param aPlotOpt = the plot options (files, sketch). Has meaning for some formats only
*/ */
void PlotSilkScreen( BOARD *aBoard, PLOTTER* aPlotter, long aLayerMask, void PlotSilkScreen( BOARD *aBoard, PLOTTER* aPlotter, long aLayerMask,
......
...@@ -661,7 +661,7 @@ void PlotDrawSegment( PLOTTER* aPlotter, const PCB_PLOT_PARAMS& aPlotOpts, ...@@ -661,7 +661,7 @@ void PlotDrawSegment( PLOTTER* aPlotter, const PCB_PLOT_PARAMS& aPlotOpts,
} }
void PlotBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, int Layer, void PlotBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, int aLayer,
const PCB_PLOT_PARAMS& aPlotOpt ) const PCB_PLOT_PARAMS& aPlotOpt )
{ {
// Set the color and the text mode for this layer // Set the color and the text mode for this layer
...@@ -670,12 +670,12 @@ void PlotBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, int Layer, ...@@ -670,12 +670,12 @@ void PlotBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, int Layer,
// Specify that the contents of the "Edges Pcb" layer are to be plotted // Specify that the contents of the "Edges Pcb" layer are to be plotted
// in addition to the contents of the currently specified layer. // in addition to the contents of the currently specified layer.
int layer_mask = GetLayerMask( Layer ); int layer_mask = GetLayerMask( aLayer );
if( !aPlotOpt.GetExcludeEdgeLayer() ) if( !aPlotOpt.GetExcludeEdgeLayer() )
layer_mask |= EDGE_LAYER; layer_mask |= EDGE_LAYER;
switch( Layer ) switch( aLayer )
{ {
case FIRST_COPPER_LAYER: case FIRST_COPPER_LAYER:
case LAYER_N_2: case LAYER_N_2:
...@@ -722,7 +722,7 @@ void PlotBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, int Layer, ...@@ -722,7 +722,7 @@ void PlotBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, int Layer,
if( aPlotter->GetPlotterType() == PLOT_FORMAT_GERBER if( aPlotter->GetPlotterType() == PLOT_FORMAT_GERBER
&& aPlotOpt.GetSubtractMaskFromSilk() ) && aPlotOpt.GetSubtractMaskFromSilk() )
{ {
if( Layer == SILKSCREEN_N_FRONT ) if( aLayer == SILKSCREEN_N_FRONT )
layer_mask = GetLayerMask( SOLDERMASK_N_FRONT ); layer_mask = GetLayerMask( SOLDERMASK_N_FRONT );
else else
layer_mask = GetLayerMask( SOLDERMASK_N_BACK ); layer_mask = GetLayerMask( SOLDERMASK_N_BACK );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment