Commit 7bcb4ff3 authored by Dick Hollenbeck's avatar Dick Hollenbeck

merge from testing

parents 69801630 f6265fd2
...@@ -386,12 +386,12 @@ void Pcb3D_GLCanvas::Draw3D_Track( TRACK* track ) ...@@ -386,12 +386,12 @@ void Pcb3D_GLCanvas::Draw3D_Track( TRACK* track )
/** /**
* Function Draw3D_SolidPolygonsInZones * Function Draw3D_SolidPolygonsInZones
* draw all solid polygons used as filles areas in a zone * 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; double zpos;
int layer = zone_c->GetLayer(); int layer = aZone->GetLayer();
if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false ) if( g_Parm_3D_Visu.m_BoardSettings->IsLayerVisible( layer ) == false )
return; return;
...@@ -420,7 +420,7 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c ) ...@@ -420,7 +420,7 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c )
// Draw solid areas contained in this zone // Draw solid areas contained in this zone
int StartContour = 1; 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 ) if( StartContour == 1 )
{ {
...@@ -428,11 +428,11 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c ) ...@@ -428,11 +428,11 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c )
gluTessBeginContour( tess ); gluTessBeginContour( tess );
StartContour = 0; StartContour = 0;
} }
v_data[0] = zone_c->m_FilledPolysList[ii].x * g_Parm_3D_Visu.m_BoardScale; v_data[0] = aZone->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; v_data[1] = -aZone->m_FilledPolysList[ii].y * g_Parm_3D_Visu.m_BoardScale;
gluTessVertex( tess, v_data, &zone_c->m_FilledPolysList[ii] ); 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 ); gluTessEndContour( tess );
gluTessEndPolygon( tess ); gluTessEndPolygon( tess );
......
...@@ -173,9 +173,9 @@ public: ...@@ -173,9 +173,9 @@ public:
/** /**
* Function Draw3D_SolidPolygonsInZones * Function Draw3D_SolidPolygonsInZones
* draw all solid polygons used as filles areas in a zone * 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 * Function Draw3D_Polygon
......
...@@ -267,9 +267,11 @@ void GERBER_PLOTTER::rect( wxPoint p1, wxPoint p2, FILL_T fill, int width ) ...@@ -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 * Plot one circle as segments (6 to 16 depending on its radius
* @param aCentre = center coordinates * @param aCentre = center coordinates
* @param aDiameter = diameter of the circle * @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 * @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 ) int aWidth )
{ {
wxASSERT( output_file ); wxASSERT( output_file );
......
...@@ -944,9 +944,10 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC ) ...@@ -944,9 +944,10 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
* Function DrawAuxiliaryAxis * Function DrawAuxiliaryAxis
* Draw the Auxiliary Axis, used in pcbnew which as origin coordinates * Draw the Auxiliary Axis, used in pcbnew which as origin coordinates
* for gerber and excellon files * 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 ) ) if( m_Parent->m_Auxiliary_Axis_Position == wxPoint( 0, 0 ) )
return; return;
...@@ -954,10 +955,10 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode ) ...@@ -954,10 +955,10 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode )
int Color = DARKRED; int Color = DARKRED;
BASE_SCREEN* screen = GetScreen(); BASE_SCREEN* screen = GetScreen();
GRSetDrawMode( DC, drawmode ); GRSetDrawMode( aDC, aDrawMode );
/* Draw the Y axis */ /* Draw the Y axis */
GRDashedLine( &m_ClipBox, DC, GRDashedLine( &m_ClipBox, aDC,
m_Parent->m_Auxiliary_Axis_Position.x, m_Parent->m_Auxiliary_Axis_Position.x,
-screen->ReturnPageSize().y, -screen->ReturnPageSize().y,
m_Parent->m_Auxiliary_Axis_Position.x, m_Parent->m_Auxiliary_Axis_Position.x,
...@@ -965,7 +966,7 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode ) ...@@ -965,7 +966,7 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode )
0, Color ); 0, Color );
/* Draw the X axis */ /* Draw the X axis */
GRDashedLine( &m_ClipBox, DC, GRDashedLine( &m_ClipBox, aDC,
-screen->ReturnPageSize().x, -screen->ReturnPageSize().x,
m_Parent->m_Auxiliary_Axis_Position.y, m_Parent->m_Auxiliary_Axis_Position.y,
screen->ReturnPageSize().x, screen->ReturnPageSize().x,
...@@ -974,7 +975,7 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode ) ...@@ -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(); BASE_SCREEN* screen = GetScreen();
...@@ -985,10 +986,10 @@ void WinEDA_DrawPanel::DrawGridAxis( wxDC* DC, int drawmode ) ...@@ -985,10 +986,10 @@ void WinEDA_DrawPanel::DrawGridAxis( wxDC* DC, int drawmode )
int Color = m_Parent->GetGridColor(); int Color = m_Parent->GetGridColor();
GRSetDrawMode( DC, drawmode ); GRSetDrawMode( aDC, aDrawMode );
/* Draw the Y axis */ /* Draw the Y axis */
GRDashedLine( &m_ClipBox, DC, GRDashedLine( &m_ClipBox, aDC,
screen->m_GridOrigin.x, screen->m_GridOrigin.x,
-screen->ReturnPageSize().y, -screen->ReturnPageSize().y,
screen->m_GridOrigin.x, screen->m_GridOrigin.x,
...@@ -996,7 +997,7 @@ void WinEDA_DrawPanel::DrawGridAxis( wxDC* DC, int drawmode ) ...@@ -996,7 +997,7 @@ void WinEDA_DrawPanel::DrawGridAxis( wxDC* DC, int drawmode )
0, Color ); 0, Color );
/* Draw the X axis */ /* Draw the X axis */
GRDashedLine( &m_ClipBox, DC, GRDashedLine( &m_ClipBox, aDC,
-screen->ReturnPageSize().x, -screen->ReturnPageSize().x,
screen->m_GridOrigin.y, screen->m_GridOrigin.y,
screen->ReturnPageSize().x, screen->ReturnPageSize().x,
......
...@@ -514,7 +514,7 @@ public: ...@@ -514,7 +514,7 @@ public:
* @return The draw object if found. Otherwise NULL. * @return The draw object if found. Otherwise NULL.
*/ */
LIB_DRAW_ITEM* LocateDrawItem( int aUnit, int aConvert, KICAD_T aType, 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. * Return a reference to the draw item list.
......
...@@ -40,10 +40,8 @@ public: ...@@ -40,10 +40,8 @@ public:
/** /**
* Function SetList * Function AppendToList
* sets the DRC_ITEM_LIST for this listbox. Ownership of the DRC_ITEM_LIST * @param aItem The SCH_MARKER* to add to the current list which will be
* is transferred to this ERC_HTML_LISTBOX.
* @param aList The DRC_ITEM_LIST* containing the DRC_ITEMs which will be
* displayed in the wxHtmlListBox * displayed in the wxHtmlListBox
*/ */
void AppendToList( SCH_MARKER* aItem ) void AppendToList( SCH_MARKER* aItem )
...@@ -87,7 +85,7 @@ public: ...@@ -87,7 +85,7 @@ public:
/** /**
* Function OnGetItem * Function OnGetItemMarkup
* returns the html text associated with the given index 'n'. * returns the html text associated with the given index 'n'.
* @param n An index into the list. * @param n An index into the list.
* @return wxString - the simple html text to show in the listbox. * @return wxString - the simple html text to show in the listbox.
......
...@@ -308,7 +308,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew ) ...@@ -308,7 +308,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew )
/** /**
* Save the entire project and create an archive for components. * Save the entire project and create an archive for components.
* *
* The library archive name is <root_name>-cache.lib * The library archive name is &ltroot_name&gt-cache.lib
*/ */
void SCH_EDIT_FRAME::SaveProject() void SCH_EDIT_FRAME::SaveProject()
{ {
......
...@@ -70,7 +70,7 @@ bool LIB_CIRCLE::Load( char* aLine, wxString& aErrorMsg ) ...@@ -70,7 +70,7 @@ bool LIB_CIRCLE::Load( char* aLine, wxString& aErrorMsg )
/** /**
* Function HitTest * Function HitTest
* tests if the given wxPoint is within the bounds of this object. * 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 * @return - true if a hit, else false
*/ */
bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef ) bool LIB_CIRCLE::HitTest( const wxPoint& aPosRef )
......
...@@ -50,10 +50,10 @@ public: ...@@ -50,10 +50,10 @@ public:
/** /**
* Test if the given point is within the bounds of this object. * 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 * @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 * @param aPosRef - a wxPoint to test
......
...@@ -140,7 +140,7 @@ public: ...@@ -140,7 +140,7 @@ public:
/** /**
* Test if the given point is within the bounds of this object. * 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 * @return True if a hit, else false
*/ */
bool HitTest( const wxPoint& aPosition ); bool HitTest( const wxPoint& aPosition );
......
...@@ -1842,7 +1842,7 @@ wxArrayString LIB_PIN::GetElectricalTypeNames( void ) ...@@ -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 * @return List of valid pin electrical type bitmaps symbols in .xpm format
* for menus and dialogs . * for menus and dialogs .
*/ */
...@@ -1853,7 +1853,7 @@ const char*** LIB_PIN::GetElectricalTypeSymbols( void ) ...@@ -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 * @return List of valid pin orientation bitmaps symbols in .xpm format
* for menus and dialogs . * for menus and dialogs .
......
...@@ -147,7 +147,7 @@ public: ...@@ -147,7 +147,7 @@ public:
* @param aPosRef - a wxPoint to test * @param aPosRef - a wxPoint to test
* @param aThreshold - max distance to this object (usually the half * @param aThreshold - max distance to this object (usually the half
* thickness of a line) * thickness of a line)
* @param aTransMat - the transform matrix * @param aTransform - the transform matrix
* @return - true if the point aPosRef is near this object * @return - true if the point aPosRef is near this object
*/ */
virtual bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform ); virtual bool HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTransform );
......
...@@ -240,6 +240,8 @@ public: ...@@ -240,6 +240,8 @@ public:
/** /**
* Function WriteGENERICNetList * Function WriteGENERICNetList
* creates a generic netlist, now in XML. * 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. * @return bool - true if there were no errors, else false.
*/ */
bool WriteGENERICNetList( SCH_EDIT_FRAME* frame, const wxString& aOutFileName ); bool WriteGENERICNetList( SCH_EDIT_FRAME* frame, const wxString& aOutFileName );
...@@ -248,6 +250,8 @@ public: ...@@ -248,6 +250,8 @@ public:
* Function WriteNetListPCBNEW * Function WriteNetListPCBNEW
* generates a net list file (Format 2 improves ORCAD PCB) * 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),<p> * @param with_pcbnew if true, then format Pcbnew (OrcadPcb2 + reviews and lists of net),<p>
* else output ORCADPCB2 strict format. * else output ORCADPCB2 strict format.
*/ */
...@@ -291,6 +295,8 @@ public: ...@@ -291,6 +295,8 @@ public:
* Are considered in placing orders in the netlist * Are considered in placing orders in the netlist
* [.-] Or PSpice gnucap are beginning * [.-] Or PSpice gnucap are beginning
* + + Gnucap and PSpice are ultimately NetList * + + 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, * @param use_netnames if true, then nodes are identified by the netname,
* else by net number. * else by net number.
*/ */
......
...@@ -81,14 +81,8 @@ END_EVENT_TABLE() ...@@ -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 * 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, EDA_NoteBookPage::EDA_NoteBookPage( wxNotebook* parent,
const wxString& title, const wxString& title,
......
...@@ -50,6 +50,16 @@ public: ...@@ -50,6 +50,16 @@ public:
wxBoxSizer* m_RightOptionsBoxSizer; wxBoxSizer* m_RightOptionsBoxSizer;
wxBoxSizer* m_LowBoxSizer; 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, EDA_NoteBookPage( wxNotebook* parent, const wxString& title,
int id_NetType, int idCheckBox, int idCreateFile, int id_NetType, int idCheckBox, int idCreateFile,
bool selected ); bool selected );
......
...@@ -61,7 +61,7 @@ public: ...@@ -61,7 +61,7 @@ public:
/** /**
* Calculate new coordinate according to the transform. * Calculate new coordinate according to the transform.
* *
* @param aPosition = The position to transform * @param aPoint = The position to transform
* @return The transformed coordinate. * @return The transformed coordinate.
*/ */
wxPoint TransformCoordinate( const wxPoint& aPoint ) const; wxPoint TransformCoordinate( const wxPoint& aPoint ) const;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "gestfich.h" #include "gestfich.h"
#include "gerbview.h" #include "gerbview.h"
#include "gerbview_id.h"
#include "wxGerberFrame.h" #include "wxGerberFrame.h"
#include "pcbplot.h" #include "pcbplot.h"
#include "bitmaps.h" #include "bitmaps.h"
...@@ -78,6 +79,11 @@ bool WinEDA_App::OnInit() ...@@ -78,6 +79,11 @@ bool WinEDA_App::OnInit()
wxFileName fn; wxFileName fn;
WinEDA_GerberFrame* frame = NULL; 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 ); InitEDA_Appl( wxT( "GerbView" ), APP_TYPE_GERBVIEW );
if( m_Checker && m_Checker->IsAnotherRunning() ) if( m_Checker && m_Checker->IsAnotherRunning() )
......
...@@ -155,11 +155,11 @@ public: ...@@ -155,11 +155,11 @@ public:
* Function MenuText * Function MenuText
* returns the text to use in any menu type UI control which must uniquely * returns the text to use in any menu type UI control which must uniquely
* identify this item. * 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 * @return wxString
* @todo: maybe: make this virtual and split into each derived class * @todo: maybe: make this virtual and split into each derived class
*/ */
wxString MenuText( const BOARD* aBoard ) const; wxString MenuText( const BOARD* aPcb ) const;
/** /**
......
...@@ -178,9 +178,9 @@ public: ...@@ -178,9 +178,9 @@ public:
/** /**
* Function CursorRealPosition * Function CursorRealPosition
* @return the position in user units of location ScreenPos * @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 * Function CursorScreenPosition
......
...@@ -300,7 +300,7 @@ public: ...@@ -300,7 +300,7 @@ public:
/** /**
* Function Select_1_Module_From_List * Function Select_1_Module_From_List
* Display a list of modules found in active libraries or a given library * 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 * @param aLibraryFullFilename = library to list (if aLibraryFullFilename
* == void, list all modules) * == void, list all modules)
* @param aMask = Display filter (wildcart)( Mask = wxEmptyString if not * @param aMask = Display filter (wildcart)( Mask = wxEmptyString if not
...@@ -313,18 +313,52 @@ public: ...@@ -313,18 +313,52 @@ public:
* Ok * Ok
*/ */
wxString Select_1_Module_From_List( 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 ); const wxString& aMask, const wxString& aKeyWord );
MODULE* Load_Module_From_Library( const wxString& library, wxDC* DC ); MODULE* Load_Module_From_Library( const wxString& library, wxDC* DC );
// ratsnest functions // ratsnest functions
void Compile_Ratsnest( wxDC* DC, bool affiche ); /**
int Test_1_Net_Ratsnest( wxDC* DC, int net_code ); * Function Compile_Ratsnest
void build_ratsnest_module( wxDC* DC, MODULE* Module ); * 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 trace_ratsnest_module( wxDC* DC );
void Build_Board_Ratsnest( wxDC* DC ); void Build_Board_Ratsnest( wxDC* DC );
void DrawGeneralRatsnest( wxDC* DC, int net_code = 0 );
/**
* 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 trace_ratsnest_pad( wxDC* DC );
void build_ratsnest_pad( BOARD_ITEM* ref, void build_ratsnest_pad( BOARD_ITEM* ref,
const wxPoint& refpos, const wxPoint& refpos,
......
...@@ -162,12 +162,12 @@ public: ...@@ -162,12 +162,12 @@ public:
* Print the page pointed by ActiveScreen, set by the calling print function * Print the page pointed by ActiveScreen, set by the calling print function
* @param aDC = wxDC given by the calling print function * @param aDC = wxDC given by the calling print function
* @param aPrint_Sheet_Ref = true to print page references * @param aPrint_Sheet_Ref = true to print page references
* @param aPrintMask = not used here * @param aPrintMaskLayer = a 32 bits mask: bit n = 1 -> layer n is printed
* @param aPrintMirrorMode = not used here (Set when printing in mirror mode) * @param aPrintMirrorMode = true to plot mirrored
* @param aData = a pointer on an auxiliary data (NULL if not used) * @param aData = a pointer on an auxiliary data (NULL if not used)
*/ */
virtual void PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, virtual void PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref,
int aPrintMask, bool aPrintMirrorMode, int aPrintMaskLayer, bool aPrintMirrorMode,
void * aData = NULL ); void * aData = NULL );
void GetKicadAbout( wxCommandEvent& event ); void GetKicadAbout( wxCommandEvent& event );
...@@ -713,7 +713,17 @@ public: ...@@ -713,7 +713,17 @@ public:
// Footprint edition (see also WinEDA_BasePcbFrame) // Footprint edition (see also WinEDA_BasePcbFrame)
void InstallModuleOptionsFrame( MODULE* Module, wxDC* DC ); void InstallModuleOptionsFrame( MODULE* Module, wxDC* DC );
void StartMove_Module( 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 Change_Side_Module( MODULE* Module, wxDC* DC );
void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule ); void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule );
......
<pkg-contents spec="1.12"><f n="bitmap2component.app" o="marco" g="staff" p="16877" pt="/Users/marco/Development/kicad/kicad/bitmap2component/bitmap2component.app" m="false" t="file"><f n="Contents" o="marco" g="staff" p="16877"><f n="Info.plist" o="marco" g="staff" p="33188"/><f n="MacOS" o="marco" g="staff" p="16877"><f n="bitmap2component" o="marco" g="staff" p="33261"/></f><f n="Resources" o="marco" g="staff" p="16877"><f n="bitmap2component.icns" o="marco" g="staff" p="33188"/></f></f></f></pkg-contents>
\ No newline at end of file
<pkgref spec="1.12" uuid="7E583994-AFBA-404C-916F-A1DFE3A2B504"><config><identifier>net.sourceforge.kicad.kicad.bitmap2component.pkg</identifier><version>1.0</version><description/><post-install type="none"/><requireAuthorization/><installFrom relative="true" includeRoot="true">../../bitmap2component/bitmap2component.app</installFrom><installTo mod="true" relocatable="true">/Applications/Kicad</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>installFrom.isRelativeType</mod><mod>installTo.path</mod><mod>parent</mod><mod>installTo</mod></config><contents><file-list>06bitmap-contents.xml</file-list><component id="org.kicad-eda.bitmap2component" path="/Users/marco/Development/kicad/kicad/bitmap2component/bitmap2component.app" version="" isRelocatable="true"><locator-info><token title="pkmk-token-16"><search-rule><combo identifier="org.kicad-eda.bitmap2component" default-path="/Applications/bitmap2component.app"/></search-rule></token></locator-info></component><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
\ No newline at end of file
<pkmkdoc spec="1.12"><properties><title>Kicad</title><build>/Users/marco/Development/Kicad-19-Sep-2010.mpkg</build><organization>net.sourceforge.kicad</organization><userSees ui="both"/><min-target os="2"/><domain anywhere="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><contents><choice title="kicad" id="choice12" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.kicad"/></choice><choice title="gerbview" id="choice13" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.gerbview"/></choice><choice title="eeschema" id="choice14" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.eeschema"/></choice><choice title="pcbnew" id="choice15" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.pcbnew"/></choice><choice title="cvpcb" id="choice16" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.cvpcb"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"><resource relative="true" mod="true" type="license">../../AUTHORS.txt</resource><resource relative="true" mod="true" type="readme">../../CHANGELOG.txt</resource></locale></resources><flags/><item type="file">01kicad.xml</item><item type="file">02gerbview.xml</item><item type="file">03eeschema.xml</item><item type="file">04pcbnew.xml</item><item type="file">05cvpcb.xml</item><mod>properties.title</mod><mod>properties.anywhereDomain</mod></pkmkdoc> <pkmkdoc spec="1.12"><properties><title>Kicad</title><build>/Users/marco/Development/Kicad-27-Dec-2010.mpkg</build><organization>net.sourceforge.kicad</organization><userSees ui="both"/><min-target os="2"/><domain anywhere="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><contents><choice title="kicad" id="choice12" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.kicad"/></choice><choice title="gerbview" id="choice13" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.gerbview"/></choice><choice title="eeschema" id="choice14" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.eeschema"/></choice><choice title="pcbnew" id="choice15" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.pcbnew"/></choice><choice title="cvpcb" id="choice16" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.cvpcb"/></choice><choice title="bitmap2component" id="choice17" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="net.sourceforge.kicad.kicad.bitmap2component.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"><resource relative="true" mod="true" type="license">../../AUTHORS.txt</resource><resource relative="true" mod="true" type="readme">../../CHANGELOG.txt</resource></locale></resources><flags/><item type="file">01kicad.xml</item><item type="file">02gerbview.xml</item><item type="file">03eeschema.xml</item><item type="file">04pcbnew.xml</item><item type="file">05cvpcb.xml</item><item type="file">06bitmap.xml</item><mod>properties.title</mod><mod>properties.anywhereDomain</mod></pkmkdoc>
\ No newline at end of file \ No newline at end of file
...@@ -660,7 +660,7 @@ int WinEDA_PcbFrame::RecherchePlacementModule( MODULE* Module, wxDC* DC ) ...@@ -660,7 +660,7 @@ int WinEDA_PcbFrame::RecherchePlacementModule( MODULE* Module, wxDC* DC )
if( Penalite >= 0 ) /* c a d if the module can be placed. */ if( Penalite >= 0 ) /* c a d if the module can be placed. */
{ {
error = 0; error = 0;
build_ratsnest_module( DC, Module ); build_ratsnest_module( Module );
cout = Compute_Ratsnest_PlaceModule( DC ); cout = Compute_Ratsnest_PlaceModule( DC );
DisplayChevelu = 1; DisplayChevelu = 1;
Score = cout + (float) Penalite; Score = cout + (float) Penalite;
...@@ -1047,7 +1047,7 @@ static MODULE* PickModule( WinEDA_PcbFrame* pcbframe, wxDC* DC ) ...@@ -1047,7 +1047,7 @@ static MODULE* PickModule( WinEDA_PcbFrame* pcbframe, wxDC* DC )
continue; continue;
pcbframe->GetBoard()->m_Status_Pcb &= ~RATSNEST_ITEM_LOCAL_OK; pcbframe->GetBoard()->m_Status_Pcb &= ~RATSNEST_ITEM_LOCAL_OK;
Module->DisplayInfo( pcbframe ); Module->DisplayInfo( pcbframe );
pcbframe->build_ratsnest_module( DC, Module ); pcbframe->build_ratsnest_module( Module );
/* Calculate external ratsnet. */ /* Calculate external ratsnet. */
for( unsigned ii = 0; for( unsigned ii = 0;
......
...@@ -378,12 +378,11 @@ bool WinEDA_PcbFrame::HandleBlockEnd( wxDC* DC ) ...@@ -378,12 +378,11 @@ bool WinEDA_PcbFrame::HandleBlockEnd( wxDC* DC )
/* Block operations: */ /* Block operations: */
/** /*
* Function Block_SelectItems * Function Block_SelectItems
* Uses GetScreen()->m_BlockLocate * Uses GetScreen()->m_BlockLocate
* select items within the selected block. * select items within the selected block.
* selected items are put in the pick list * selected items are put in the pick list
* @param none
*/ */
void WinEDA_PcbFrame::Block_SelectItems() void WinEDA_PcbFrame::Block_SelectItems()
{ {
...@@ -657,11 +656,10 @@ void WinEDA_PcbFrame::Block_Delete() ...@@ -657,11 +656,10 @@ void WinEDA_PcbFrame::Block_Delete()
} }
/** /*
* Function Block_Rotate * Function Block_Rotate
* Rotate all items within the selected block. * Rotate all items within the selected block.
* The rotation center is the center of the block * The rotation center is the center of the block
* @param none
*/ */
void WinEDA_PcbFrame::Block_Rotate() void WinEDA_PcbFrame::Block_Rotate()
{ {
...@@ -726,7 +724,6 @@ void WinEDA_PcbFrame::Block_Rotate() ...@@ -726,7 +724,6 @@ void WinEDA_PcbFrame::Block_Rotate()
* Function Block_Flip * Function Block_Flip
* flips items within the selected block. * flips items within the selected block.
* The flip center is the center of the block * The flip center is the center of the block
* @param none
*/ */
void WinEDA_PcbFrame::Block_Flip() void WinEDA_PcbFrame::Block_Flip()
{ {
...@@ -788,12 +785,11 @@ void WinEDA_PcbFrame::Block_Flip() ...@@ -788,12 +785,11 @@ void WinEDA_PcbFrame::Block_Flip()
} }
/** /*
* Function Block_Move * Function Block_Move
* moves all tracks and segments within the selected block. * moves all tracks and segments within the selected block.
* New location is determined by the current offset from the selected block's * New location is determined by the current offset from the selected block's
* original location. * original location.
* @param none
*/ */
void WinEDA_PcbFrame::Block_Move() void WinEDA_PcbFrame::Block_Move()
{ {
...@@ -849,12 +845,11 @@ void WinEDA_PcbFrame::Block_Move() ...@@ -849,12 +845,11 @@ void WinEDA_PcbFrame::Block_Move()
} }
/** /*
* Function Block_Duplicate * Function Block_Duplicate
* duplicates all items within the selected block. * duplicates all items within the selected block.
* New location is determined by the current offset from the selected block's * New location is determined by the current offset from the selected block's
* original location. * original location.
* @param none
*/ */
void WinEDA_PcbFrame::Block_Duplicate() void WinEDA_PcbFrame::Block_Duplicate()
{ {
......
...@@ -558,6 +558,7 @@ void D_PAD:: TransformShapeWithClearanceToPolygon( std:: vector < CPolyPt>& aCor ...@@ -558,6 +558,7 @@ void D_PAD:: TransformShapeWithClearanceToPolygon( std:: vector < CPolyPt>& aCor
* @param aCornerBuffer = a buffer to store the polygon * @param aCornerBuffer = a buffer to store the polygon
* @param aPad = the current pad used to create the thermal shape * @param aPad = the current pad used to create the thermal shape
* @param aThermalGap = gap in thermal shape * @param aThermalGap = gap in thermal shape
* @param aCopperThickness = stubs thickness in thermal shape
* @param aMinThicknessValue = min copper thickness allowed * @param aMinThicknessValue = min copper thickness allowed
* @param aCircleToSegmentsCount = the number of segments to approximate a circle * @param aCircleToSegmentsCount = the number of segments to approximate a circle
* @param aCorrectionFactor = the correction to apply to circles radius to keep * @param aCorrectionFactor = the correction to apply to circles radius to keep
......
...@@ -326,22 +326,17 @@ BOARD_ITEM* DuplicateStruct( BOARD_ITEM* aItem ) ...@@ -326,22 +326,17 @@ BOARD_ITEM* DuplicateStruct( BOARD_ITEM* aItem )
} }
/** /*
* Function SaveCopyInUndoList * 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_CHANGED
* UR_NEW * UR_NEW
* UR_DELETED * UR_DELETED
* UR_MOVED * UR_MOVED
* UR_FLIPPED * UR_FLIPPED
* UR_ROTATED * 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, void WinEDA_PcbFrame::SaveCopyInUndoList( BOARD_ITEM* aItem,
UndoRedoOpType aCommandType, UndoRedoOpType aCommandType,
......
...@@ -1180,15 +1180,15 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData, ...@@ -1180,15 +1180,15 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData,
/** /**
* Function FindNet * Function FindNet
* searches for a net with the given netcode. * 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. * @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. // the first valid netcode is 1 and the last is m_NetInfo->GetCount()-1.
// zero is reserved for "no connection" and is not used. // zero is reserved for "no connection" and is not used.
// NULL is returned for non valid netcodes // 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 defined(DEBUG)
if( net ) // item can be NULL if anetcode is not valid if( net ) // item can be NULL if anetcode is not valid
...@@ -1196,7 +1196,7 @@ NETINFO_ITEM* BOARD::FindNet( int anetcode ) const ...@@ -1196,7 +1196,7 @@ NETINFO_ITEM* BOARD::FindNet( int anetcode ) const
if( anetcode != net->GetNet() ) if( anetcode != net->GetNet() )
{ {
printf( "FindNet() anetcode %d != GetNet() %d (net: %s)\n", 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 #endif
...@@ -1431,7 +1431,7 @@ out: ...@@ -1431,7 +1431,7 @@ out:
} }
/** /*
* Function RedrawAreasOutlines * Function RedrawAreasOutlines
* Redraw all areas outlines on layer aLayer ( redraw all if aLayer < 0 ) * Redraw all areas outlines on layer aLayer ( redraw all if aLayer < 0 )
*/ */
...@@ -1479,7 +1479,7 @@ void BOARD::RedrawFilledAreas( WinEDA_DrawPanel* panel, ...@@ -1479,7 +1479,7 @@ void BOARD::RedrawFilledAreas( WinEDA_DrawPanel* panel,
* zone. * zone.
* the test is made on zones on layer from aStartLayer to aEndLayer * 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. * 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 aStartLayer the first layer to test
* @param aEndLayer the last layer (-1 to ignore it) 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 * @return ZONE_CONTAINER* return a pointer to the ZONE_CONTAINER found, else
......
...@@ -270,7 +270,7 @@ public: ...@@ -270,7 +270,7 @@ public:
* Function SetEnabledLayers * Function SetEnabledLayers
* is a proxy function that calls the correspondent function in m_BoardSettings * is a proxy function that calls the correspondent function in m_BoardSettings
* Changes the bit-mask of enabled layers * 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 ); void SetEnabledLayers( int aLayerMask );
...@@ -278,7 +278,7 @@ public: ...@@ -278,7 +278,7 @@ public:
* Function IsLayerEnabled * Function IsLayerEnabled
* is a proxy function that calls the correspondent function in m_BoardSettings * is a proxy function that calls the correspondent function in m_BoardSettings
* tests whether a given layer is enabled * 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. * @return bool - true if the layer is visible.
*/ */
bool IsLayerEnabled( int aLayer ) const bool IsLayerEnabled( int aLayer ) const
...@@ -310,7 +310,7 @@ public: ...@@ -310,7 +310,7 @@ public:
* Function SetVisibleLayers * Function SetVisibleLayers
* is a proxy function that calls the correspondent function in m_BoardSettings * is a proxy function that calls the correspondent function in m_BoardSettings
* changes the bit-mask of visible layers * 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 ); void SetVisibleLayers( int aLayerMask );
...@@ -529,9 +529,10 @@ public: ...@@ -529,9 +529,10 @@ public:
* and turns on or off the brilliance associated with that net according to the * and turns on or off the brilliance associated with that net according to the
* current value of global g_HighLight_Status * current value of global g_HighLight_Status
* @param aDrawPanel is needed for the clipping support. * @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. * @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 * Function Visit
...@@ -596,8 +597,6 @@ public: ...@@ -596,8 +597,6 @@ public:
* Must be called after a Design Rules edition, or after reading a netlist (or editing the list of nets) * 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 * Also this function removes the non existing nets in netclasses and add net nets in default netclass
* (this happens after reading a netlist) * (this happens after reading a netlist)
* @param none
* @return none
*/ */
void SynchronizeNetsAndNetClasses(); void SynchronizeNetsAndNetClasses();
...@@ -713,7 +712,7 @@ public: ...@@ -713,7 +712,7 @@ public:
* tests if the given wxPoint is within the bounds of a filled area of this zone. * 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 * 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. * 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 aStartLayer the first layer to test
* @param aEndLayer the last layer (-1 to ignore it) 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 * @return ZONE_CONTAINER* return a pointer to the ZONE_CONTAINER found, else NULL
...@@ -726,7 +725,7 @@ public: ...@@ -726,7 +725,7 @@ public:
* Function RedrawAreasOutlines * Function RedrawAreasOutlines
* Redraw all areas outlines on layer aLayer ( redraw all if aLayer < 0 ) * Redraw all areas outlines on layer aLayer ( redraw all if aLayer < 0 )
*/ */
void RedrawAreasOutlines( WinEDA_DrawPanel* panel, void RedrawAreasOutlines( WinEDA_DrawPanel* aPanel,
wxDC* aDC, wxDC* aDC,
int aDrawMode, int aDrawMode,
int aLayer ); int aLayer );
...@@ -735,7 +734,7 @@ public: ...@@ -735,7 +734,7 @@ public:
* Function RedrawFilledAreas * Function RedrawFilledAreas
* Redraw all filled areas on layer aLayer ( redraw all if aLayer < 0 ) * Redraw all filled areas on layer aLayer ( redraw all if aLayer < 0 )
*/ */
void RedrawFilledAreas( WinEDA_DrawPanel* panel, void RedrawFilledAreas( WinEDA_DrawPanel* aPanel,
wxDC* aDC, wxDC* aDC,
int aDrawMode, int aDrawMode,
int aLayer ); int aLayer );
...@@ -869,7 +868,8 @@ public: ...@@ -869,7 +868,8 @@ public:
* @param aModifiedZonesList = a PICKED_ITEMS_LIST * where to store deleted or added areas * @param aModifiedZonesList = a PICKED_ITEMS_LIST * where to store deleted or added areas
* (useful in undo commands. Can be NULL * (useful in undo commands. Can be NULL
* @param modified_area = area to test * @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 : * @return :
* -1 if arcs intersect other sides, so polygon can't be clipped * -1 if arcs intersect other sides, so polygon can't be clipped
* 0 if no intersecting sides * 0 if no intersecting sides
......
...@@ -264,41 +264,41 @@ void DIMENSION::Move(const wxPoint& offset) ...@@ -264,41 +264,41 @@ void DIMENSION::Move(const wxPoint& offset)
/** /**
* Function Rotate * Function Rotate
* @param center : Rotation point * @param aRotCentre - the rotation point.
* @param angle : Rotation angle in 0.1 degrees * @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 ); RotatePoint( &m_Text->m_Pos, aRotCentre, aAngle );
m_Text->m_Orient += angle; m_Text->m_Orient += aAngle;
if( m_Text->m_Orient >= 3600 ) if( m_Text->m_Orient >= 3600 )
m_Text->m_Orient -= 3600; m_Text->m_Orient -= 3600;
if( ( m_Text->m_Orient > 900 ) && ( m_Text->m_Orient <2700 ) ) if( ( m_Text->m_Orient > 900 ) && ( m_Text->m_Orient <2700 ) )
m_Text->m_Orient -= 1800; m_Text->m_Orient -= 1800;
RotatePoint( &Barre_ox, &Barre_oy, centre.x, centre.y, angle ); RotatePoint( &Barre_ox, &Barre_oy, aRotCentre.x, aRotCentre.y, aAngle );
RotatePoint( &Barre_fx, &Barre_fy, centre.x, centre.y, angle ); RotatePoint( &Barre_fx, &Barre_fy, aRotCentre.x, aRotCentre.y, aAngle );
RotatePoint( &TraitG_ox, &TraitG_oy, centre.x, centre.y, angle ); RotatePoint( &TraitG_ox, &TraitG_oy, aRotCentre.x, aRotCentre.y, aAngle );
RotatePoint( &TraitG_fx, &TraitG_fy, centre.x, centre.y, angle ); RotatePoint( &TraitG_fx, &TraitG_fy, aRotCentre.x, aRotCentre.y, aAngle );
RotatePoint( &TraitD_ox, &TraitD_oy, centre.x, centre.y, angle ); RotatePoint( &TraitD_ox, &TraitD_oy, aRotCentre.x, aRotCentre.y, aAngle );
RotatePoint( &TraitD_fx, &TraitD_fy, centre.x, centre.y, angle ); RotatePoint( &TraitD_fx, &TraitD_fy, aRotCentre.x, aRotCentre.y, aAngle );
RotatePoint( &FlecheG1_ox, &FlecheG1_oy, centre.x, centre.y, angle ); RotatePoint( &FlecheG1_ox, &FlecheG1_oy, aRotCentre.x, aRotCentre.y, aAngle );
RotatePoint( &FlecheG1_fx, &FlecheG1_fy, centre.x, centre.y, angle ); RotatePoint( &FlecheG1_fx, &FlecheG1_fy, aRotCentre.x, aRotCentre.y, aAngle );
RotatePoint( &FlecheG2_ox, &FlecheG2_oy, centre.x, centre.y, angle ); RotatePoint( &FlecheG2_ox, &FlecheG2_oy, aRotCentre.x, aRotCentre.y, aAngle );
RotatePoint( &FlecheG2_fx, &FlecheG2_fy, centre.x, centre.y, angle ); RotatePoint( &FlecheG2_fx, &FlecheG2_fy, aRotCentre.x, aRotCentre.y, aAngle );
RotatePoint( &FlecheD1_ox, &FlecheD1_oy, centre.x, centre.y, angle ); RotatePoint( &FlecheD1_ox, &FlecheD1_oy, aRotCentre.x, aRotCentre.y, aAngle );
RotatePoint( &FlecheD1_fx, &FlecheD1_fy, centre.x, centre.y, angle ); RotatePoint( &FlecheD1_fx, &FlecheD1_fy, aRotCentre.x, aRotCentre.y, aAngle );
RotatePoint( &FlecheD2_ox, &FlecheD2_oy, centre.x, centre.y, angle ); RotatePoint( &FlecheD2_ox, &FlecheD2_oy, aRotCentre.x, aRotCentre.y, aAngle );
RotatePoint( &FlecheD2_fx, &FlecheD2_fy, centre.x, centre.y, angle ); RotatePoint( &FlecheD2_fx, &FlecheD2_fy, aRotCentre.x, aRotCentre.y, aAngle );
} }
/** /**
* Function Flip * Function Flip
* Flip this object, i.e. change the board side for this object * 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 ) void DIMENSION::Flip(const wxPoint& aCentre )
{ {
...@@ -733,7 +733,7 @@ bool DIMENSION::HitTest( const wxPoint& ref_pos ) ...@@ -733,7 +733,7 @@ bool DIMENSION::HitTest( const wxPoint& ref_pos )
/** /**
* Function HitTest (overlaid) * Function HitTest (overlaid)
* tests if the given EDA_Rect intersect this object. * 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 * @return bool - true if a hit, else false
*/ */
bool DIMENSION::HitTest( EDA_Rect& refArea ) bool DIMENSION::HitTest( EDA_Rect& refArea )
......
...@@ -74,7 +74,7 @@ public: ...@@ -74,7 +74,7 @@ public:
/** /**
* Function Rotate * Function Rotate
* Rotate this object. * Rotate this object.
* @param const wxPoint& aRotCentre - the rotation point. * @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree. * @param aAngle - the rotation angle in 0.1 degree.
*/ */
virtual void Rotate(const wxPoint& aRotCentre, int aAngle); virtual void Rotate(const wxPoint& aRotCentre, int aAngle);
...@@ -82,7 +82,7 @@ public: ...@@ -82,7 +82,7 @@ public:
/** /**
* Function Flip * Function Flip
* Flip this object, i.e. change the board side for this object * 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 ); virtual void Flip(const wxPoint& aCentre );
......
...@@ -50,7 +50,7 @@ void DRAWSEGMENT::Copy( DRAWSEGMENT* source ) ...@@ -50,7 +50,7 @@ void DRAWSEGMENT::Copy( DRAWSEGMENT* source )
/** /**
* Function Rotate * Function Rotate
* Rotate this object. * Rotate this object.
* @param const wxPoint& aRotCentre - the rotation point. * @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree. * @param aAngle - the rotation angle in 0.1 degree.
*/ */
void DRAWSEGMENT::Rotate(const wxPoint& aRotCentre, int aAngle) void DRAWSEGMENT::Rotate(const wxPoint& aRotCentre, int aAngle)
...@@ -62,7 +62,7 @@ void DRAWSEGMENT::Rotate(const wxPoint& aRotCentre, int aAngle) ...@@ -62,7 +62,7 @@ void DRAWSEGMENT::Rotate(const wxPoint& aRotCentre, int aAngle)
/** /**
* Function Flip * Function Flip
* Flip this object, i.e. change the board side for this object * 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 ) void DRAWSEGMENT::Flip(const wxPoint& aCentre )
{ {
...@@ -418,10 +418,10 @@ void DRAWSEGMENT::DisplayInfo( WinEDA_DrawFrame* frame ) ...@@ -418,10 +418,10 @@ void DRAWSEGMENT::DisplayInfo( WinEDA_DrawFrame* frame )
/** /**
* Function HitTest * Function HitTest
* tests if the given wxPoint is within the bounds of this object. * 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 * @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 ux0 = m_Start.x;
int uy0 = m_Start.y; int uy0 = m_Start.y;
...@@ -430,8 +430,8 @@ bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos ) ...@@ -430,8 +430,8 @@ bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos )
int dx = m_End.x - ux0; int dx = m_End.x - ux0;
int dy = m_End.y - uy0; int dy = m_End.y - uy0;
int spot_cX = ref_pos.x - ux0; int spot_cX = aRefPos.x - ux0;
int spot_cY = ref_pos.y - uy0; int spot_cY = aRefPos.y - uy0;
switch(m_Shape){ switch(m_Shape){
case S_CIRCLE: case S_CIRCLE:
...@@ -465,7 +465,7 @@ bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos ) ...@@ -465,7 +465,7 @@ bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos )
case S_CURVE: case S_CURVE:
for( unsigned int i= 1; i < m_BezierPoints.size(); i++) 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 ) ) m_BezierPoints[i-1], m_Width / 2 ) )
return true; return true;
} }
......
...@@ -80,16 +80,16 @@ public: ...@@ -80,16 +80,16 @@ public:
/** /**
* Function HitTest * Function HitTest
* tests if the given wxPoint is within the bounds of this object. * 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 * @return bool - true if a hit, else false
*/ */
bool HitTest( const wxPoint& ref_pos ); bool HitTest( const wxPoint& aRefPos );
/** /**
* Function HitTest (overlayed) * Function HitTest (overlayed)
* tests if the given EDA_Rect intersect this object. * tests if the given EDA_Rect intersect this object.
* For now, an ending point must be inside this rect. * 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 * @return bool - true if a hit, else false
*/ */
bool HitTest( EDA_Rect& refArea ); bool HitTest( EDA_Rect& refArea );
...@@ -121,7 +121,7 @@ public: ...@@ -121,7 +121,7 @@ public:
/** /**
* Function Move * Function Move
* move this object. * 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 ) virtual void Move( const wxPoint& aMoveVector )
{ {
...@@ -133,7 +133,7 @@ public: ...@@ -133,7 +133,7 @@ public:
/** /**
* Function Rotate * Function Rotate
* Rotate this object. * Rotate this object.
* @param const wxPoint& aRotCentre - the rotation point. * @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree. * @param aAngle - the rotation angle in 0.1 degree.
*/ */
virtual void Rotate( const wxPoint& aRotCentre, int aAngle ); virtual void Rotate( const wxPoint& aRotCentre, int aAngle );
...@@ -141,7 +141,7 @@ public: ...@@ -141,7 +141,7 @@ public:
/** /**
* Function Flip * Function Flip
* Flip this object, i.e. change the board side for this object * 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 ); virtual void Flip( const wxPoint& aCentre );
......
...@@ -499,7 +499,7 @@ int EDGE_MODULE::ReadDescr( char* Line, FILE* File, ...@@ -499,7 +499,7 @@ int EDGE_MODULE::ReadDescr( char* Line, FILE* File,
* @param refPos A wxPoint to test * @param refPos A wxPoint to test
* @return bool - true if a hit, else false * @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 uxf, uyf;
int rayon, dist; int rayon, dist;
...@@ -515,8 +515,8 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos ) ...@@ -515,8 +515,8 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos )
switch( m_Shape ) switch( m_Shape )
{ {
case S_SEGMENT: case S_SEGMENT:
spot_cX = ref_pos.x - ux0; spot_cX = refPos.x - ux0;
spot_cY = ref_pos.y - uy0; spot_cY = refPos.y - uy0;
dx = uxf - ux0; dx = uxf - ux0;
dy = uyf - uy0; dy = uyf - uy0;
...@@ -526,21 +526,21 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos ) ...@@ -526,21 +526,21 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos )
case S_CIRCLE: case S_CIRCLE:
rayon = (int) hypot( (double) (uxf - ux0), (double) (uyf - uy0) ); rayon = (int) hypot( (double) (uxf - ux0), (double) (uyf - uy0) );
dist = (int) hypot( (double) (ref_pos.x - ux0), dist = (int) hypot( (double) (refPos.x - ux0),
(double) (ref_pos.y - uy0) ); (double) (refPos.y - uy0) );
if( abs( rayon - dist ) <= m_Width ) if( abs( rayon - dist ) <= m_Width )
return true; return true;
break; break;
case S_ARC: case S_ARC:
rayon = (int) hypot( (double) (uxf - ux0), (double) (uyf - uy0) ); rayon = (int) hypot( (double) (uxf - ux0), (double) (uyf - uy0) );
dist = (int) hypot( (double) (ref_pos.x - ux0), dist = (int) hypot( (double) (refPos.x - ux0),
(double) (ref_pos.y - uy0) ); (double) (refPos.y - uy0) );
if( abs( rayon - dist ) > m_Width ) if( abs( rayon - dist ) > m_Width )
break; 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 stAngle = (int) ArcTangente( uyf - uy0, uxf - ux0 );
int endAngle = stAngle + m_Angle; int endAngle = stAngle + m_Angle;
......
...@@ -82,7 +82,7 @@ void MARKER_PCB::DisplayInfo( WinEDA_DrawFrame* frame ) ...@@ -82,7 +82,7 @@ void MARKER_PCB::DisplayInfo( WinEDA_DrawFrame* frame )
/** /**
* Function Rotate * Function Rotate
* Rotate this object. * Rotate this object.
* @param const wxPoint& aRotCentre - the rotation point. * @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree. * @param aAngle - the rotation angle in 0.1 degree.
*/ */
void MARKER_PCB::Rotate(const wxPoint& aRotCentre, int aAngle) void MARKER_PCB::Rotate(const wxPoint& aRotCentre, int aAngle)
...@@ -95,7 +95,7 @@ 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 * Flip this object, i.e. change the board side for this object
* this function has not reeally sense for a marker. * 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 * 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 ) void MARKER_PCB::Flip(const wxPoint& aCentre )
{ {
......
...@@ -43,7 +43,7 @@ public: ...@@ -43,7 +43,7 @@ public:
/** /**
* Function Move * Function Move
* move this object. * 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) virtual void Move(const wxPoint& aMoveVector)
{ {
...@@ -53,7 +53,7 @@ public: ...@@ -53,7 +53,7 @@ public:
/** /**
* Function Rotate * Function Rotate
* Rotate this object. * Rotate this object.
* @param const wxPoint& aRotCentre - the rotation point. * @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree. * @param aAngle - the rotation angle in 0.1 degree.
*/ */
virtual void Rotate(const wxPoint& aRotCentre, int aAngle); virtual void Rotate(const wxPoint& aRotCentre, int aAngle);
...@@ -61,7 +61,7 @@ public: ...@@ -61,7 +61,7 @@ public:
/** /**
* Function Flip * Function Flip
* Flip this object, i.e. change the board side for this object * 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 ); virtual void Flip(const wxPoint& aCentre );
......
...@@ -195,7 +195,7 @@ bool MIREPCB::HitTest( const wxPoint& refPos ) ...@@ -195,7 +195,7 @@ bool MIREPCB::HitTest( const wxPoint& refPos )
/** /**
* Function HitTest (overlayed) * Function HitTest (overlayed)
* tests if the given EDA_Rect intersect this object. * 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 * @return bool - true if a hit, else false
*/ */
bool MIREPCB::HitTest( EDA_Rect& refArea ) bool MIREPCB::HitTest( EDA_Rect& refArea )
...@@ -209,7 +209,7 @@ bool MIREPCB::HitTest( EDA_Rect& refArea ) ...@@ -209,7 +209,7 @@ bool MIREPCB::HitTest( EDA_Rect& refArea )
/** /**
* Function Rotate * Function Rotate
* Rotate this object. * Rotate this object.
* @param const wxPoint& aRotCentre - the rotation point. * @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree. * @param aAngle - the rotation angle in 0.1 degree.
*/ */
void MIREPCB::Rotate(const wxPoint& aRotCentre, int aAngle) void MIREPCB::Rotate(const wxPoint& aRotCentre, int aAngle)
...@@ -221,7 +221,7 @@ void MIREPCB::Rotate(const wxPoint& aRotCentre, int aAngle) ...@@ -221,7 +221,7 @@ void MIREPCB::Rotate(const wxPoint& aRotCentre, int aAngle)
/** /**
* Function Flip * Function Flip
* Flip this object, i.e. change the board side for this object * 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 ) void MIREPCB::Flip(const wxPoint& aCentre )
{ {
......
...@@ -31,7 +31,7 @@ public: ...@@ -31,7 +31,7 @@ public:
/** /**
* Function Move * Function Move
* move this object. * 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) virtual void Move(const wxPoint& aMoveVector)
{ {
...@@ -41,7 +41,7 @@ public: ...@@ -41,7 +41,7 @@ public:
/** /**
* Function Rotate * Function Rotate
* Rotate this object. * Rotate this object.
* @param const wxPoint& aRotCentre - the rotation point. * @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree. * @param aAngle - the rotation angle in 0.1 degree.
*/ */
virtual void Rotate(const wxPoint& aRotCentre, int aAngle); virtual void Rotate(const wxPoint& aRotCentre, int aAngle);
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
/** /**
* Function Flip * Function Flip
* Flip this object, i.e. change the board side for this object * 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 ); virtual void Flip(const wxPoint& aCentre );
......
...@@ -178,13 +178,13 @@ void MODULE::Copy( MODULE* aModule ) ...@@ -178,13 +178,13 @@ void MODULE::Copy( MODULE* aModule )
/** /**
* Function Draw * Function Draw
* Draws the footprint to the current Device Context * Draws the footprint to the current Device Context
* @param panel = The active Draw Panel (used to know the clip box) * @param aPanel = draw panel, Used to know the clip box
* @param DC = current Device Context * @param aDC = Current Device Context
* @param offset = draw offset (usually wxPoint(0,0) * @param aDrawMode = GR_OR, GR_XOR..
* @param draw_mode = GR_OR, GR_XOR, GR_AND * @param aOffset = draw offset (usually wxPoint(0,0)
*/ */
void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, void MODULE::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
int draw_mode, const wxPoint& offset ) int aDrawMode, const wxPoint& aOffset )
{ {
if( (m_Flags & DO_NOT_DRAW) || (m_Flags & IS_MOVED) ) if( (m_Flags & DO_NOT_DRAW) || (m_Flags & IS_MOVED) )
return; return;
...@@ -194,25 +194,25 @@ void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -194,25 +194,25 @@ void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
if( pad->m_Flags & IS_MOVED ) if( pad->m_Flags & IS_MOVED )
continue; continue;
pad->Draw( panel, DC, draw_mode, offset ); pad->Draw( aPanel, aDC, aDrawMode, aOffset );
} }
BOARD* brd = GetBoard(); BOARD* brd = GetBoard();
// Draws footprint anchor // Draws footprint anchor
DrawAncre( panel, DC, offset, DIM_ANCRE_MODULE, draw_mode ); DrawAncre( aPanel, aDC, aOffset, DIM_ANCRE_MODULE, aDrawMode );
/* Draw graphic items */ /* Draw graphic items */
if( brd->IsElementVisible( MOD_REFERENCES_VISIBLE ) ) if( brd->IsElementVisible( MOD_REFERENCES_VISIBLE ) )
{ {
if( !(m_Reference->m_Flags & IS_MOVED) ) 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( brd->IsElementVisible( MOD_VALUES_VISIBLE ) )
{ {
if( !(m_Value->m_Flags & IS_MOVED) ) 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() ) for( BOARD_ITEM* item = m_Drawings; item; item = item->Next() )
...@@ -224,7 +224,7 @@ void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -224,7 +224,7 @@ void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
{ {
case TYPE_TEXTE_MODULE: case TYPE_TEXTE_MODULE:
case TYPE_EDGE_MODULE: case TYPE_EDGE_MODULE:
item->Draw( panel, DC, draw_mode, offset ); item->Draw( aPanel, aDC, aDrawMode, aOffset );
break; break;
default: default:
......
...@@ -100,7 +100,7 @@ public: ...@@ -100,7 +100,7 @@ public:
void Copy( MODULE* Module ); // Copy structure void Copy( MODULE* Module ); // Copy structure
/** /*
* Function Add * Function Add
* adds the given item to this MODULE and takes ownership of its memory. * adds the given item to this MODULE and takes ownership of its memory.
* @param aBoardItem The item to add to this board. * @param aBoardItem The item to add to this board.
...@@ -154,14 +154,14 @@ public: ...@@ -154,14 +154,14 @@ public:
/** /**
* Function Move * Function Move
* move this object. * 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 ); virtual void Move( const wxPoint& aMoveVector );
/** /**
* Function Rotate * Function Rotate
* Rotate this object. * Rotate this object.
* @param const wxPoint& aRotCentre - the rotation point. * @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree. * @param aAngle - the rotation angle in 0.1 degree.
*/ */
virtual void Rotate( const wxPoint& aRotCentre, int aAngle ); virtual void Rotate( const wxPoint& aRotCentre, int aAngle );
...@@ -169,14 +169,14 @@ public: ...@@ -169,14 +169,14 @@ public:
/** /**
* Function Flip * Function Flip
* Flip this object, i.e. change the board side for this object * 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 ); virtual void Flip( const wxPoint& aCentre );
/** /**
* Function IsLocked * Function IsLocked
* (virtual from BOARD_ITEM ) * (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 bool IsLocked() const
{ {
...@@ -204,7 +204,7 @@ public: ...@@ -204,7 +204,7 @@ public:
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.brd" * writes the data structures for this object out to a FILE in "*.brd"
* format. * format.
* a@param aFile The FILE to write to. * @param aFile The FILE to write to.
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
...@@ -227,15 +227,15 @@ public: ...@@ -227,15 +227,15 @@ public:
/** /**
* Function Draw * Function Draw
* Draw the text according to the footprint pos and orient * Draw the text according to the footprint pos and orient
* @param panel = draw panel, Used to know the clip box * @param aPanel = draw panel, Used to know the clip box
* @param DC = Current Device Context * @param aDC = Current Device Context
* @param offset = draw offset (usually wxPoint(0,0)
* @param aDrawMode = GR_OR, GR_XOR.. * @param aDrawMode = GR_OR, GR_XOR..
* @param aOffset = draw offset (usually wxPoint(0,0)
*/ */
void Draw( WinEDA_DrawPanel* panel, void Draw( WinEDA_DrawPanel* aPanel,
wxDC* DC, wxDC* aDC,
int aDrawMode, int aDrawMode,
const wxPoint& offset = ZeroOffset ); const wxPoint& aOffset = ZeroOffset );
void Draw3D( Pcb3D_GLCanvas* glcanvas ); void Draw3D( Pcb3D_GLCanvas* glcanvas );
void DrawEdgesOnly( WinEDA_DrawPanel* panel, wxDC* DC, void DrawEdgesOnly( WinEDA_DrawPanel* panel, wxDC* DC,
...@@ -293,7 +293,7 @@ public: ...@@ -293,7 +293,7 @@ public:
* Function FindPadByName * Function FindPadByName
* returns a D_PAD* with a matching name. Note that names may not be * returns a D_PAD* with a matching name. Note that names may not be
* unique, depending on how the foot print was created. * 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 * @return D_PAD* - The first matching name is returned, or NULL if not
* found. * found.
*/ */
......
...@@ -122,7 +122,7 @@ int ChangeSideMaskLayer( int masque ) ...@@ -122,7 +122,7 @@ int ChangeSideMaskLayer( int masque )
/** /**
* Function Move (virtual) * Function Move (virtual)
* move this object. * 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) void MODULE::Move(const wxPoint& aMoveVector)
{ {
...@@ -134,7 +134,7 @@ void MODULE::Move(const wxPoint& aMoveVector) ...@@ -134,7 +134,7 @@ void MODULE::Move(const wxPoint& aMoveVector)
/** /**
* Function Rotate * Function Rotate
* Rotate this object. * Rotate this object.
* @param const wxPoint& aRotCentre - the rotation point. * @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree. * @param aAngle - the rotation angle in 0.1 degree.
*/ */
void MODULE::Rotate(const wxPoint& aRotCentre, int aAngle) void MODULE::Rotate(const wxPoint& aRotCentre, int aAngle)
...@@ -149,7 +149,7 @@ void MODULE::Rotate(const wxPoint& aRotCentre, int aAngle) ...@@ -149,7 +149,7 @@ void MODULE::Rotate(const wxPoint& aRotCentre, int aAngle)
/** /**
* Function Flip * Function Flip
* Flip this object, i.e. change the board side for this object * 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 ) void MODULE::Flip(const wxPoint& aCentre )
{ {
......
...@@ -84,6 +84,8 @@ public: ...@@ -84,6 +84,8 @@ public:
/** /**
* Constructor * Constructor
* stuffs a NETCLASS instance with aParent, aName, and optionally the initialParameters * 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 * @param initialParameters is a NETCLASS to copy parameters from, or if
* NULL tells me to copy from g_DesignSettings. * NULL tells me to copy from g_DesignSettings.
*/ */
...@@ -205,6 +207,7 @@ public: ...@@ -205,6 +207,7 @@ public:
* Function ReadDescr * Function ReadDescr
* reads the data structures for this object from a FILE in "*.brd" format. * reads the data structures for this object from a FILE in "*.brd" format.
* @param aFile The FILE to read to. * @param aFile The FILE to read to.
* @param aLineNum a pointer to a line number counter
* @return bool - true if success reading else false. * @return bool - true if success reading else false.
*/ */
bool ReadDescr( FILE* aFile, int* aLineNum ); bool ReadDescr( FILE* aFile, int* aLineNum );
......
...@@ -361,7 +361,7 @@ public: ...@@ -361,7 +361,7 @@ public:
/** /**
* Function SetNetname * Function SetNetname
* @param const wxString : the new netname * @param aNetname : the new netname
*/ */
void SetNetname( const wxString& aNetname ); void SetNetname( const wxString& aNetname );
......
...@@ -93,7 +93,7 @@ out: ...@@ -93,7 +93,7 @@ out:
/** /**
* Function SetNetname * Function SetNetname
* @param const wxString : the new netname * @param aNetname : the new netname
*/ */
void NETINFO_ITEM::SetNetname( const wxString& aNetname ) void NETINFO_ITEM::SetNetname( const wxString& aNetname )
{ {
......
...@@ -180,7 +180,7 @@ void D_PAD::SetPadName( const wxString& name ) ...@@ -180,7 +180,7 @@ void D_PAD::SetPadName( const wxString& name )
/** /**
* Function SetNetname * Function SetNetname
* @param const wxString : the new netname * @param aNetname: the new netname
*/ */
void D_PAD::SetNetname( const wxString& aNetname ) void D_PAD::SetNetname( const wxString& aNetname )
{ {
...@@ -772,17 +772,17 @@ bool D_PAD::IsOnLayer( int aLayer ) const ...@@ -772,17 +772,17 @@ bool D_PAD::IsOnLayer( int aLayer ) const
/** /**
* Function HitTest * Function HitTest
* tests if the given wxPoint is within the bounds of this object. * 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 * @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; int dx, dy;
double dist; double dist;
wxPoint shape_pos = ReturnShapePos(); 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. */ /* Quick test: a test point must be inside the circle. */
if( ( abs( delta.x ) > m_ShapeMaxRadius ) || ( abs( delta.y ) > m_ShapeMaxRadius ) ) if( ( abs( delta.x ) > m_ShapeMaxRadius ) || ( abs( delta.y ) > m_ShapeMaxRadius ) )
......
...@@ -140,7 +140,7 @@ public: ...@@ -140,7 +140,7 @@ public:
/** /**
* Function SetNetname * Function SetNetname
* @param const wxString : the new netname * @param aNetname: the new netname
*/ */
void SetNetname( const wxString& aNetname ); void SetNetname( const wxString& aNetname );
...@@ -230,8 +230,14 @@ public: ...@@ -230,8 +230,14 @@ public:
/* drawing functions */ /* drawing functions */
void Draw( WinEDA_DrawPanel* panel, wxDC* DC, /** Draw a pad:
int aDrawMode, const wxPoint& offset = ZeroOffset ); * @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 ); void Draw3D( Pcb3D_GLCanvas* glcanvas );
...@@ -247,7 +253,7 @@ public: ...@@ -247,7 +253,7 @@ public:
* Has meaning only for polygonal pads (trapezoid and rectangular) * Has meaning only for polygonal pads (trapezoid and rectangular)
* Build the Corner list of the polygonal shape, * Build the Corner list of the polygonal shape,
* depending on shape, extra size (clearance ...) and orientation * 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 aInflateValue = wxSize: the clearance or margin value. value > 0: inflate, < 0 deflate
* @param aRotation = full rotation of the polygon * @param aRotation = full rotation of the polygon
*/ */
...@@ -341,7 +347,7 @@ public: ...@@ -341,7 +347,7 @@ public:
/** /**
* Function Move * Function Move
* move this object. * 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 ) virtual void Move( const wxPoint& aMoveVector )
{ {
......
...@@ -45,7 +45,7 @@ PAD_DRAWINFO::PAD_DRAWINFO() ...@@ -45,7 +45,7 @@ PAD_DRAWINFO::PAD_DRAWINFO()
/** Draw a pad: /** Draw a pad:
* @param aDC = device context * @param aPanel = the WinEDA_DrawPanel panel
* @param aDraw_mode = mode: GR_OR, GR_XOR, GR_AND... * @param aDraw_mode = mode: GR_OR, GR_XOR, GR_AND...
* @param aOffset = draw offset * @param aOffset = draw offset
*/ */
...@@ -663,7 +663,7 @@ int D_PAD::BuildSegmentFromOvalShape(wxPoint& aSegStart, wxPoint& aSegEnd, int a ...@@ -663,7 +663,7 @@ int D_PAD::BuildSegmentFromOvalShape(wxPoint& aSegStart, wxPoint& aSegEnd, int a
* Has meaning only for polygonal pads (trapeziod and rectangular) * Has meaning only for polygonal pads (trapeziod and rectangular)
* Build the Corner list of the polygonal shape, * Build the Corner list of the polygonal shape,
* depending on shape, extra size (clearance ...) and orientation * 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 aInflateValue = wxSize: the clearance or margin value. value > 0: inflate, < 0 deflate
* @param aRotation = full rotation of the polygon, usually m_Orient * @param aRotation = full rotation of the polygon, usually m_Orient
*/ */
......
...@@ -61,6 +61,8 @@ public: ...@@ -61,6 +61,8 @@ public:
/** /**
* Constructor * 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 * @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 * effectively sets the overal size of the widget via the row height and bitmap
* button sizes. * button sizes.
......
...@@ -180,9 +180,8 @@ bool TEXTE_PCB::Save( FILE* aFile ) const ...@@ -180,9 +180,8 @@ bool TEXTE_PCB::Save( FILE* aFile ) const
} }
/** /*
* Function Draw * Function Draw
* DrawMode = GR_OR, GR_XOR ..
* Like tracks, texts are drawn in filled or sketch mode, never in line mode * 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 * because the line mode does not keep the actual size of the text
* and the actual size is very important, especially for copper texts * and the actual size is very important, especially for copper texts
...@@ -258,7 +257,7 @@ void TEXTE_PCB::DisplayInfo( WinEDA_DrawFrame* frame ) ...@@ -258,7 +257,7 @@ void TEXTE_PCB::DisplayInfo( WinEDA_DrawFrame* frame )
/** /**
* Function Rotate * Function Rotate
* Rotate this object. * Rotate this object.
* @param const wxPoint& aRotCentre - the rotation point. * @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree. * @param aAngle - the rotation angle in 0.1 degree.
*/ */
void TEXTE_PCB::Rotate(const wxPoint& aRotCentre, int aAngle) void TEXTE_PCB::Rotate(const wxPoint& aRotCentre, int aAngle)
...@@ -275,7 +274,7 @@ void TEXTE_PCB::Rotate(const wxPoint& aRotCentre, int aAngle) ...@@ -275,7 +274,7 @@ void TEXTE_PCB::Rotate(const wxPoint& aRotCentre, int aAngle)
/** /**
* Function Flip * Function Flip
* Flip this object, i.e. change the board side for this object * 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 ) void TEXTE_PCB::Flip(const wxPoint& aCentre )
{ {
......
...@@ -28,7 +28,7 @@ public: ...@@ -28,7 +28,7 @@ public:
/** /**
* Function Move * Function Move
* move this object. * 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) virtual void Move(const wxPoint& aMoveVector)
{ {
...@@ -38,7 +38,7 @@ public: ...@@ -38,7 +38,7 @@ public:
/** /**
* Function Rotate * Function Rotate
* Rotate this object. * Rotate this object.
* @param const wxPoint& aRotCentre - the rotation point. * @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree. * @param aAngle - the rotation angle in 0.1 degree.
*/ */
virtual void Rotate(const wxPoint& aRotCentre, int aAngle); virtual void Rotate(const wxPoint& aRotCentre, int aAngle);
...@@ -46,7 +46,7 @@ public: ...@@ -46,7 +46,7 @@ public:
/** /**
* Function Flip * Function Flip
* Flip this object, i.e. change the board side for this object * 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 ); virtual void Flip(const wxPoint& aCentre );
......
...@@ -93,11 +93,11 @@ bool TEXTE_MODULE::Save( FILE* aFile ) const ...@@ -93,11 +93,11 @@ bool TEXTE_MODULE::Save( FILE* aFile ) const
/** /**
* Function ReadLineDescr * Function ReadDescr
* Read description from a given line in "*.brd" format. * Read description from a given line in "*.brd" format.
* @param aLine The current line which contains the first line of description. * @param aLine The current line which contains the first line of description.
* @param aLine The FILE to read next lines (currently not used). * @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. * @return int - > 0 if success reading else 0.
*/ */
int TEXTE_MODULE::ReadDescr( char* aLine, FILE* aFile, int* aLineNum ) int TEXTE_MODULE::ReadDescr( char* aLine, FILE* aFile, int* aLineNum )
...@@ -276,10 +276,10 @@ EDA_Rect TEXTE_MODULE::GetTextRect( void ) const ...@@ -276,10 +276,10 @@ EDA_Rect TEXTE_MODULE::GetTextRect( void ) const
/** /**
* Function HitTest * Function HitTest
* tests if the given wxPoint is within the bounds of this object. * 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 * @return true if a hit, else false
*/ */
bool TEXTE_MODULE::HitTest( const wxPoint& refPos ) bool TEXTE_MODULE::HitTest( const wxPoint& aRefPos )
{ {
wxPoint rel_pos; wxPoint rel_pos;
EDA_Rect area = GetTextRect(); EDA_Rect area = GetTextRect();
...@@ -288,7 +288,7 @@ bool TEXTE_MODULE::HitTest( const wxPoint& refPos ) ...@@ -288,7 +288,7 @@ bool TEXTE_MODULE::HitTest( const wxPoint& refPos )
* to test if refPos is within area (which is relative to an horizontal * to test if refPos is within area (which is relative to an horizontal
* text) * text)
*/ */
rel_pos = refPos; rel_pos = aRefPos;
RotatePoint( &rel_pos, m_Pos, -GetDrawRotation() ); RotatePoint( &rel_pos, m_Pos, -GetDrawRotation() );
if( area.Contains( rel_pos ) ) if( area.Contains( rel_pos ) )
......
...@@ -80,12 +80,12 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS ); ...@@ -80,12 +80,12 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/** /**
* Function ReadLineDescr * Function ReadDescr
* Read description from a given line in "*.brd" format. * Read description from a given line in "*.brd" format.
* @param aLine The current line which contains the first line of * @param aLine The current line which contains the first line of
* description. * description.
* @param aLine The FILE to read next lines (currently not used). * @param aFile 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. * @return int - > 0 if success reading else 0.
*/ */
int ReadDescr( char* aLine, FILE* aFile, int* aLineNum = NULL ); int ReadDescr( char* aLine, FILE* aFile, int* aLineNum = NULL );
...@@ -123,10 +123,10 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS ); ...@@ -123,10 +123,10 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
/** /**
* Function HitTest * Function HitTest
* tests if the given wxPoint is within the bounds of this object. * 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 * @return bool - true if a hit, else false
*/ */
bool HitTest( const wxPoint& posref ); bool HitTest( const wxPoint& aRefPos );
/** /**
* Function IsOnLayer * Function IsOnLayer
...@@ -139,12 +139,12 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS ); ...@@ -139,12 +139,12 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
*/ */
bool IsOnLayer( int aLayer ) const; bool IsOnLayer( int aLayer ) const;
/** /*
* Function IsOnOneOfTheseLayers * Function IsOnOneOfTheseLayers
* returns true if this object is on one of the given layers. Is virtual * 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 * so objects like D_PAD, which reside on multiple layers, can do their own
* form of testing. * 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. * @param aLayerMask The bit-mapped set of layers to test for.
* @return bool - true if on one of the given layers, else false. * @return bool - true if on one of the given layers, else false.
* bool IsOnOneOfTheseLayers( int aLayerMask ) const; * bool IsOnOneOfTheseLayers( int aLayerMask ) const;
......
...@@ -271,7 +271,7 @@ EDA_Rect TRACK::GetBoundingBox() const ...@@ -271,7 +271,7 @@ EDA_Rect TRACK::GetBoundingBox() const
/** /**
* Function Rotate * Function Rotate
* Rotate this object. * Rotate this object.
* @param const wxPoint& aRotCentre - the rotation point. * @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree. * @param aAngle - the rotation angle in 0.1 degree.
*/ */
void TRACK::Rotate( const wxPoint& aRotCentre, int aAngle ) void TRACK::Rotate( const wxPoint& aRotCentre, int aAngle )
...@@ -284,7 +284,7 @@ void TRACK::Rotate( const wxPoint& aRotCentre, int aAngle ) ...@@ -284,7 +284,7 @@ void TRACK::Rotate( const wxPoint& aRotCentre, int aAngle )
/** /**
* Function Flip * Function Flip
* Flip this object, i.e. change the board side for this object * 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 ) void TRACK::Flip( const wxPoint& aCentre )
{ {
...@@ -324,11 +324,6 @@ SEARCH_RESULT TRACK::Visit( INSPECTOR* inspector, const void* testData, ...@@ -324,11 +324,6 @@ SEARCH_RESULT TRACK::Visit( INSPECTOR* inspector, const void* testData,
bool SEGVIA::IsOnLayer( int layer_number ) const 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; int bottom_layer, top_layer;
ReturnLayerPair( &top_layer, &bottom_layer ); ReturnLayerPair( &top_layer, &bottom_layer );
...@@ -343,7 +338,6 @@ bool SEGVIA::IsOnLayer( int layer_number ) const ...@@ -343,7 +338,6 @@ bool SEGVIA::IsOnLayer( int layer_number ) const
/***********************************/ /***********************************/
int TRACK::ReturnMaskLayer() int TRACK::ReturnMaskLayer()
/***********************************/ /***********************************/
/* Return the mask layer for this. /* Return the mask layer for this.
* for a via, there is more than one layer used * for a via, there is more than one layer used
*/ */
...@@ -432,22 +426,20 @@ void SEGVIA::ReturnLayerPair( int* top_layer, int* bottom_layer ) const ...@@ -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 * Search the "best" insertion point within the track linked list
* the best point is the of the corresponding net code section * 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; TRACK* track;
if( Type() == TYPE_ZONE ) if( Type() == TYPE_ZONE )
track = Pcb->m_Zone; track = aPcb->m_Zone;
else else
track = Pcb->m_Track; track = aPcb->m_Track;
for( ; track; track = track->Next() ) for( ; track; track = track->Next() )
{ {
...@@ -1136,10 +1128,10 @@ void TRACK::DisplayInfoBase( WinEDA_DrawFrame* frame ) ...@@ -1136,10 +1128,10 @@ void TRACK::DisplayInfoBase( WinEDA_DrawFrame* frame )
/** /**
* Function HitTest * Function HitTest
* tests if the given wxPoint is within the bounds of this object. * 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 * @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; int radius = m_Width >> 1;
...@@ -1148,8 +1140,8 @@ bool TRACK::HitTest( const wxPoint& ref_pos ) ...@@ -1148,8 +1140,8 @@ bool TRACK::HitTest( const wxPoint& ref_pos )
int dy = m_End.y - m_Start.y; 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) // (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_cX = refPos.x - m_Start.x;
int spot_cY = ref_pos.y - m_Start.y; int spot_cY = refPos.y - m_Start.y;
if( Type() == TYPE_VIA ) if( Type() == TYPE_VIA )
{ {
...@@ -1167,10 +1159,10 @@ bool TRACK::HitTest( const wxPoint& ref_pos ) ...@@ -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. * tests if the given EDA_Rect intersect this object.
* For now, an ending point must be inside this rect. * 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 * @return bool - true if a hit, else false
*/ */
bool TRACK::HitTest( EDA_Rect& refArea ) bool TRACK::HitTest( EDA_Rect& refArea )
......
...@@ -39,7 +39,6 @@ public: ...@@ -39,7 +39,6 @@ public:
BOARD_ITEM* start; // pointers to a connected item (pad or track) BOARD_ITEM* start; // pointers to a connected item (pad or track)
BOARD_ITEM* end; BOARD_ITEM* end;
// chain = 0 indique une connexion non encore traitee
int m_Param; // Auxiliary variable ( used in some computations ) int m_Param; // Auxiliary variable ( used in some computations )
protected: protected:
...@@ -64,7 +63,7 @@ public: ...@@ -64,7 +63,7 @@ public:
/** /**
* Function Move * Function Move
* move this object. * 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) virtual void Move(const wxPoint& aMoveVector)
{ {
...@@ -75,7 +74,7 @@ public: ...@@ -75,7 +74,7 @@ public:
/** /**
* Function Rotate * Function Rotate
* Rotate this object. * Rotate this object.
* @param const wxPoint& aRotCentre - the rotation point. * @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree. * @param aAngle - the rotation angle in 0.1 degree.
*/ */
virtual void Rotate(const wxPoint& aRotCentre, int aAngle); virtual void Rotate(const wxPoint& aRotCentre, int aAngle);
...@@ -83,7 +82,7 @@ public: ...@@ -83,7 +82,7 @@ public:
/** /**
* Function Flip * Function Flip
* Flip this object, i.e. change the board side for this object * 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 ); virtual void Flip(const wxPoint& aCentre );
...@@ -256,10 +255,10 @@ public: ...@@ -256,10 +255,10 @@ public:
bool HitTest( const wxPoint& refPos ); bool HitTest( const wxPoint& refPos );
/** /**
* Function HitTest (overlayed) * Function HitTest (overlaid)
* tests if the given wxRect intersect this object. * tests if the given wxRect intersect this object.
* For now, an ending point must be inside this rect. * 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 * @return bool - true if a hit, else false
*/ */
bool HitTest( EDA_Rect& refArea ); bool HitTest( EDA_Rect& refArea );
...@@ -346,9 +345,8 @@ public: ...@@ -346,9 +345,8 @@ public:
/** /**
* Function IsOnLayer * Function IsOnLayer
* tests to see if this object is on the given layer. Is virtual * 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 * from BOARD_ITEM. Tests the starting and ending range of layers for the via.
* via. * @param aLayer the layer to test for.
* @param aLayer The layer to test for.
* @return bool - true if on given layer, else false. * @return bool - true if on given layer, else false.
*/ */
bool IsOnLayer( int aLayer ) const; bool IsOnLayer( int aLayer ) const;
......
...@@ -128,11 +128,11 @@ const KICAD_T GENERAL_COLLECTOR::Tracks[] = { ...@@ -128,11 +128,11 @@ const KICAD_T GENERAL_COLLECTOR::Tracks[] = {
* that it finds and does not do any displaying. * that it finds and does not do any displaying.
* *
* @param testItem An EDA_ITEM to examine. * @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, * @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan,
* else SCAN_CONTINUE; * 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; BOARD_ITEM* item = (BOARD_ITEM*) testItem;
MODULE* module = NULL; MODULE* module = NULL;
......
...@@ -378,7 +378,8 @@ public: ...@@ -378,7 +378,8 @@ public:
* Constructor GENERAL_COLLECTORS_GUIDE * Constructor GENERAL_COLLECTORS_GUIDE
* grabs stuff from global preferences and uses reasonable defaults. * grabs stuff from global preferences and uses reasonable defaults.
* Add more constructors as needed. * 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 ) GENERAL_COLLECTORS_GUIDE( int aVisibleLayerMask, int aPreferredLayer )
{ {
...@@ -403,7 +404,7 @@ public: ...@@ -403,7 +404,7 @@ public:
m_IgnoreMTextsOnCmp = false; m_IgnoreMTextsOnCmp = false;
m_IgnoreModulesOnCu = true; // !Show_Modules_Cmp; m_IgnoreModulesOnCu = true; // !Show_Modules_Cmp;
m_IgnoreModulesOnCmp = false; m_IgnoreModulesOnCmp = false;
m_IgnorePadsOnFront = false; m_IgnorePadsOnFront = false;
m_IgnorePadsOnBack = false; m_IgnorePadsOnBack = false;
} }
......
...@@ -41,8 +41,9 @@ void Dessine_Segments_Dragges( WinEDA_DrawPanel* panel, wxDC* DC ) ...@@ -41,8 +41,9 @@ void Dessine_Segments_Dragges( WinEDA_DrawPanel* panel, wxDC* DC )
{ {
wxPoint pos; wxPoint pos;
Track = g_DragSegmentList[ii].m_Segm; Track = g_DragSegmentList[ii].m_Segm;
#ifndef USE_WX_OVERLAY
Track->Draw( panel, DC, GR_XOR ); // erase from screen at old position Track->Draw( panel, DC, GR_XOR ); // erase from screen at old position
#endif
pt_pad = g_DragSegmentList[ii].m_Pad_Start; pt_pad = g_DragSegmentList[ii].m_Pad_Start;
if( pt_pad ) if( pt_pad )
{ {
......
...@@ -140,24 +140,21 @@ int DRC::Drc( TRACK* aRefSegm, TRACK* aList ) ...@@ -140,24 +140,21 @@ int DRC::Drc( TRACK* aRefSegm, TRACK* aList )
} }
/**************************************************************/
int DRC::Drc( ZONE_CONTAINER* aArea, int CornerIndex )
/*************************************************************/
/** /**
* Function Drc * Function Drc
* tests the outline segment starting at CornerIndex and returns the result and displays the error * tests the outline segment starting at CornerIndex and returns the result and displays the error
* in the status panel only if one exists. * in the status panel only if one exists.
* Test Edge inside other areas * Test Edge inside other areas
* Test Edge too close other areas * Test Edge too close other areas
* @param aEdge The areaparent which contains the corner. * @param aArea The areaparent which contains the corner.
* @param CornerIndex The starting point of the segment to test. * @param aCornerIndex The starting point of the segment to test.
* @return int - BAD_DRC (1) if DRC error or OK_DRC (0) if OK * @return int - BAD_DRC (1) if DRC error or OK_DRC (0) if OK
*/ */
int DRC::Drc( ZONE_CONTAINER* aArea, int aCornerIndex )
{ {
updatePointers(); updatePointers();
if( !doEdgeZoneDrc( aArea, CornerIndex ) ) if( !doEdgeZoneDrc( aArea, aCornerIndex ) )
{ {
wxASSERT( m_currentMarker ); wxASSERT( m_currentMarker );
m_currentMarker->DisplayInfo( m_mainWindow ); m_currentMarker->DisplayInfo( m_mainWindow );
......
...@@ -374,11 +374,11 @@ public: ...@@ -374,11 +374,11 @@ public:
* in the status panel only if one exists. * in the status panel only if one exists.
* Test Edge inside other areas * Test Edge inside other areas
* Test Edge too close other areas * Test Edge too close other areas
* @param aEdge The areaparent which contains the corner. * @param aArea The areaparent which contains the corner.
* @param CornerIndex The starting point of the segment to test. * @param aCornerIndex The starting point of the segment to test.
* @return int - BAD_DRC (1) if DRC error or OK_DRC (0) if OK * @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 * Function DrcBlind
......
...@@ -210,11 +210,11 @@ void WinEDA_ModuleEditFrame::Edit_Edge_Layer( EDGE_MODULE* Edge ) ...@@ -210,11 +210,11 @@ void WinEDA_ModuleEditFrame::Edit_Edge_Layer( EDGE_MODULE* Edge )
/** /**
* Function Enter_Edge_Width * Function Enter_Edge_Width
* Edition of the edge items width * Edition of width of module outlines
* Ask for a new width. * 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 * @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 ) void WinEDA_ModuleEditFrame::Enter_Edge_Width( EDGE_MODULE* aEdge )
{ {
......
...@@ -110,10 +110,10 @@ bool WinEDA_PcbFrame::SetTrackSegmentWidth( TRACK* aTrackItem, ...@@ -110,10 +110,10 @@ bool WinEDA_PcbFrame::SetTrackSegmentWidth( TRACK* aTrackItem,
/** /**
* Function Edit_TrackSegm_Width * Function Edit_TrackSegm_Width
* Modify one track segment width or one via diameter (using DRC control). * 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 * @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; PICKED_ITEMS_LIST itemsListPicker;
bool change = SetTrackSegmentWidth( aTrackItem, &itemsListPicker, false ); bool change = SetTrackSegmentWidth( aTrackItem, &itemsListPicker, false );
...@@ -122,14 +122,14 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem ) ...@@ -122,14 +122,14 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem )
return; // No change return; // No change
// The segment has changed: redraw it and save it in undo list // The segment has changed: redraw it and save it in undo list
if( DC ) if( aDC )
{ {
TRACK* oldsegm = (TRACK*) itemsListPicker.GetPickedItemLink( 0 ); TRACK* oldsegm = (TRACK*) itemsListPicker.GetPickedItemLink( 0 );
wxASSERT( oldsegm ); wxASSERT( oldsegm );
DrawPanel->CursorOff( DC ); // Erase cursor shape DrawPanel->CursorOff( aDC ); // Erase cursor shape
oldsegm->Draw( DrawPanel, DC, GR_XOR ); // Erase old track shape oldsegm->Draw( DrawPanel, aDC, GR_XOR ); // Erase old track shape
aTrackItem->Draw( DrawPanel, DC, GR_OR ); // Display new track shape aTrackItem->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 ); SaveCopyInUndoList( itemsListPicker, UR_CHANGED );
} }
...@@ -139,11 +139,10 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem ) ...@@ -139,11 +139,10 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem )
* Function Edit_Track_Width * Function Edit_Track_Width
* Modify a full track width (using DRC control). * Modify a full track width (using DRC control).
* a full track is the set of track segments between 2 ends: pads or a point that has more than 2 segments ends connected * a full track is the set of track segments between 2 ends: pads or a point that has more than 2 segments ends connected
* @param DC = the curred device context (can be NULL) * @param aDC = the curred device context (can be NULL)
* @param aTrackSegment = a segment or via on the track to change * @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; TRACK* pt_track;
int nb_segm; int nb_segm;
...@@ -166,18 +165,18 @@ void WinEDA_PcbFrame::Edit_Track_Width( wxDC* DC, TRACK* aTrackSegment ) ...@@ -166,18 +165,18 @@ void WinEDA_PcbFrame::Edit_Track_Width( wxDC* DC, TRACK* aTrackSegment )
return; return;
// Some segment have changed: redraw them and save in undo list // 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++ ) for( unsigned ii = 0; ii < itemsListPicker.GetCount(); ii++ )
{ {
TRACK* segm = (TRACK*) itemsListPicker.GetPickedItemLink( 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 = (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 ); SaveCopyInUndoList( itemsListPicker, UR_CHANGED );
......
...@@ -131,7 +131,7 @@ void WinEDA_PcbFrame::Files_io( wxCommandEvent& event ) ...@@ -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. * @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 ) bool aForceFileDialog )
{ {
int ii; int ii;
...@@ -141,7 +141,7 @@ bool WinEDA_PcbFrame::LoadOnePcbFile( const wxString& aFileName, bool Append, ...@@ -141,7 +141,7 @@ bool WinEDA_PcbFrame::LoadOnePcbFile( const wxString& aFileName, bool Append,
ActiveScreen = GetScreen(); ActiveScreen = GetScreen();
if( GetScreen()->IsModify() && !Append ) if( GetScreen()->IsModify() && !aAppend )
{ {
if( !IsOK( this, _( "The current board has been modified. Do you wish to discard \ if( !IsOK( this, _( "The current board has been modified. Do you wish to discard \
the changes?" ) ) ) the changes?" ) ) )
...@@ -150,7 +150,7 @@ the changes?" ) ) ) ...@@ -150,7 +150,7 @@ the changes?" ) ) )
m_TrackAndViasSizesList_Changed = true; m_TrackAndViasSizesList_Changed = true;
if( Append ) if( aAppend )
{ {
GetScreen()->m_FileName = wxEmptyString; GetScreen()->m_FileName = wxEmptyString;
OnModify(); OnModify();
...@@ -182,7 +182,7 @@ the changes?" ) ) ) ...@@ -182,7 +182,7 @@ the changes?" ) ) )
fileName.SetExt( PcbFileExtension ); fileName.SetExt( PcbFileExtension );
} }
if( !Append ) if( !aAppend )
Clear_Pcb( false ); // pass false since we prompted above for a modified board Clear_Pcb( false ); // pass false since we prompted above for a modified board
GetScreen()->m_FileName = fileName.GetFullPath(); GetScreen()->m_FileName = fileName.GetFullPath();
...@@ -224,7 +224,7 @@ this file again." ) ); ...@@ -224,7 +224,7 @@ this file again." ) );
// Reload the corresponding configuration file: // Reload the corresponding configuration file:
wxSetWorkingDirectory( wxPathOnly( GetScreen()->m_FileName ) ); wxSetWorkingDirectory( wxPathOnly( GetScreen()->m_FileName ) );
if( Append ) if( aAppend )
ReadPcbFile( source, true ); ReadPcbFile( source, true );
else else
{ {
...@@ -244,7 +244,7 @@ this file again." ) ); ...@@ -244,7 +244,7 @@ this file again." ) );
GetScreen()->ClrModify(); GetScreen()->ClrModify();
/* If append option: change the initial board name to <oldname>-append.brd */ /* If append option: change the initial board name to <oldname>-append.brd */
if( Append ) if( aAppend )
{ {
wxString new_filename = GetScreen()->m_FileName.BeforeLast( '.' ); wxString new_filename = GetScreen()->m_FileName.BeforeLast( '.' );
if ( ! new_filename.EndsWith( wxT( "-append" ) ) ) if ( ! new_filename.EndsWith( wxT( "-append" ) ) )
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
* ** Commands are case insensitive ** * ** Commands are case insensitive **
* Some commands are relatives to the item under the mouse cursor * Some commands are relatives to the item under the mouse cursor
* @param aDC = current device context * @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 * @param aItem = NULL or pointer on a EDA_ITEM under the mouse cursor
*/ */
void WinEDA_PcbFrame::OnHotKey( wxDC* aDC, int aHotkeyCode, EDA_ITEM* aItem ) void WinEDA_PcbFrame::OnHotKey( wxDC* aDC, int aHotkeyCode, EDA_ITEM* aItem )
......
...@@ -188,7 +188,15 @@ protected: ...@@ -188,7 +188,15 @@ protected:
public: public:
/** Constructor /** Constructor
* @param aParent is the parent window
* @param aFocusOwner is the window that should be sent the focus after * @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. * every operation.
*/ */
LAYER_WIDGET( wxWindow* aParent, wxWindow* aFocusOwner, int aPointSize = -1, LAYER_WIDGET( wxWindow* aParent, wxWindow* aFocusOwner, int aPointSize = -1,
...@@ -315,6 +323,7 @@ public: ...@@ -315,6 +323,7 @@ public:
* not invoke OnRenderEnable(). * not invoke OnRenderEnable().
* @param aId is the same unique id used when adding a ROW to the * @param aId is the same unique id used when adding a ROW to the
* Render tab. * Render tab.
* @param isSet = the new checkbox state
*/ */
void SetRenderState( int aId, bool isSet ); void SetRenderState( int aId, bool isSet );
...@@ -350,6 +359,8 @@ public: ...@@ -350,6 +359,8 @@ public:
* Function OnLayerColorChange * Function OnLayerColorChange
* is called to notify client code about a layer color change. Derived * is called to notify client code about a layer color change. Derived
* classes will handle this accordingly. * 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; virtual void OnLayerColorChange( int aLayer, int aColor ) = 0;
...@@ -358,6 +369,7 @@ public: ...@@ -358,6 +369,7 @@ public:
* is called to notify client code whenever the user selects a different * is called to notify client code whenever the user selects a different
* layer. Derived classes will handle this accordingly, and can deny * layer. Derived classes will handle this accordingly, and can deny
* the change by returning false. * the change by returning false.
* @param aLayer is the board layer to select
*/ */
virtual bool OnLayerSelect( int aLayer ) = 0; virtual bool OnLayerSelect( int aLayer ) = 0;
...@@ -365,6 +377,8 @@ public: ...@@ -365,6 +377,8 @@ public:
* Function OnLayerVisible * Function OnLayerVisible
* is called to notify client code about a layer visibility change. * 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 * @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 * 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. * one time instead of several times in the midst of a multiple layer change.
...@@ -377,6 +391,7 @@ public: ...@@ -377,6 +391,7 @@ public:
* color. * color.
* @param aId is the same id that was established in a Rendering row * @param aId is the same id that was established in a Rendering row
* via the AddRenderRow() function. * via the AddRenderRow() function.
* @param aColor is the new color
*/ */
virtual void OnRenderColorChange( int aId, int aColor ) = 0; virtual void OnRenderColorChange( int aId, int aColor ) = 0;
......
...@@ -36,7 +36,7 @@ static const wxString ModExportFileWildcard( ...@@ -36,7 +36,7 @@ static const wxString ModExportFileWildcard(
static bool CreateDocLibrary( const wxString& LibName ); static bool CreateDocLibrary( const wxString& LibName );
/** /*
* Function Import_Module * Function Import_Module
* Read a file containing only one footprint. * Read a file containing only one footprint.
* Used to import (after exporting) a footprint * Used to import (after exporting) a footprint
...@@ -44,7 +44,6 @@ static bool CreateDocLibrary( const wxString& LibName ); ...@@ -44,7 +44,6 @@ static bool CreateDocLibrary( const wxString& LibName );
* This is the same format as .mod files but restricted to only one footprint * 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 * The import function can also read gpcb footprint file, in Newlib format
* (One footprint per file, Newlib files have no special ext.) * (One footprint per file, Newlib files have no special ext.)
* @param DC = Current Device Context (can be NULL)
*/ */
MODULE* WinEDA_ModuleEditFrame::Import_Module( ) MODULE* WinEDA_ModuleEditFrame::Import_Module( )
{ {
...@@ -146,12 +145,11 @@ 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 * 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 * So Create a new lib (which will contains one module) and export a footprint
* is basically the same thing * is basically the same thing
* @param DC = Current Device Context (can be NULL) * @param aModule = the module to export
* @param createlib : true = use default lib path to create lib * @param aCreateSysLib : true = use default lib path to create lib
* false = use current path or last used path to export * false = use current path or last used path to export the footprint
* footprint
*/ */
void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib ) void WinEDA_ModuleEditFrame::Export_Module( MODULE* aModule, bool aCreateSysLib )
{ {
wxFileName fn; wxFileName fn;
char Line[1025]; char Line[1025];
...@@ -159,21 +157,21 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib ) ...@@ -159,21 +157,21 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
wxString msg, path, title, wildcard; wxString msg, path, title, wildcard;
wxConfig* Config = wxGetApp().m_EDA_Config; wxConfig* Config = wxGetApp().m_EDA_Config;
if( ptmod == NULL ) if( aModule == NULL )
return; return;
ptmod->m_LibRef = ptmod->m_Reference->m_Text; aModule->m_LibRef = aModule->m_Reference->m_Text;
fn.SetName( ptmod->m_LibRef ); fn.SetName( aModule->m_LibRef );
fn.SetExt( createlib ? ModuleFileExtension : ModExportFileExtension ); fn.SetExt( aCreateSysLib ? ModuleFileExtension : ModExportFileExtension );
if( createlib ) if( aCreateSysLib )
path = wxGetApp().ReturnLastVisitedLibraryPath(); path = wxGetApp().ReturnLastVisitedLibraryPath();
else if( Config ) else if( Config )
Config->Read( EXPORT_IMPORT_LASTPATH_KEY, &path ); Config->Read( EXPORT_IMPORT_LASTPATH_KEY, &path );
fn.SetPath( path ); fn.SetPath( path );
title = createlib ? _( "Create New Library" ) : _( "Export Module" ); title = aCreateSysLib ? _( "Create New Library" ) : _( "Export Module" );
wildcard = createlib ? ModuleFileWildcard : ModExportFileWildcard; wildcard = aCreateSysLib ? ModuleFileWildcard : ModExportFileWildcard;
wxFileDialog dlg( this, msg, fn.GetPath(), fn.GetFullName(), wildcard, wxFileDialog dlg( this, msg, fn.GetPath(), fn.GetFullName(), wildcard,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
...@@ -190,7 +188,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib ) ...@@ -190,7 +188,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
return; return;
} }
if( !createlib && Config ) // Save file path if( !aCreateSysLib && Config ) // Save file path
{ {
Config->Write( EXPORT_IMPORT_LASTPATH_KEY, fn.GetPath() ); Config->Write( EXPORT_IMPORT_LASTPATH_KEY, fn.GetPath() );
} }
...@@ -202,7 +200,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib ) ...@@ -202,7 +200,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
fprintf( file, "%s %s\n", ENTETE_LIBRAIRIE, DateAndTime( Line ) ); fprintf( file, "%s %s\n", ENTETE_LIBRAIRIE, DateAndTime( Line ) );
fputs( "$INDEX\n", file ); 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 ); fputs( "$EndINDEX\n", file );
GetBoard()->m_Modules->Save( file ); GetBoard()->m_Modules->Save( file );
......
...@@ -201,7 +201,7 @@ MODULE* WinEDA_BasePcbFrame::Load_Module_From_Library( const wxString& library, ...@@ -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 * 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 * 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 * all active libraries are read
* @param aModuleName = module name to load * @param aModuleName = module name to load
* @param aDisplayMessageError = true to display an error message if any. * @param aDisplayMessageError = true to display an error message if any.
...@@ -351,7 +351,7 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( ...@@ -351,7 +351,7 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module(
* one (or more) of these keyworks in their keywork list * one (or more) of these keyworks in their keywork list
* ( aKeyWord = wxEmptyString if not used ) * ( 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, wxString WinEDA_BasePcbFrame::Select_1_Module_From_List( WinEDA_DrawFrame* aWindow,
const wxString& aLibraryFullFilename, const wxString& aLibraryFullFilename,
......
...@@ -92,6 +92,11 @@ bool Project( wxPoint* res, wxPoint on_grid, const TRACK* track ) ...@@ -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 * 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 * "curpos". If yes, then curpos is adjusted appropriately according to that
* near magnetic item and true is returned. * 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. * @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. * @return bool - true if the position was adjusted magnetically, else false.
*/ */
......
...@@ -74,12 +74,12 @@ public: ...@@ -74,12 +74,12 @@ public:
* Print the page pointed by ActiveScreen, set by the calling print function * Print the page pointed by ActiveScreen, set by the calling print function
* @param aDC = wxDC given by the calling print function * @param aDC = wxDC given by the calling print function
* @param aPrint_Sheet_Ref = true to print page references * @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 aPrintMirrorMode = not used here (Set when printing in mirror mode)
* @param aData = a pointer on an auxiliary data (NULL if not used) * @param aData = a pointer on an auxiliary data (NULL if not used)
*/ */
virtual void PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, virtual void PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref,
int aPrintMask, bool aPrintMirrorMode, int aPrintMaskLayer, bool aPrintMirrorMode,
void * aData = NULL); void * aData = NULL);
// BOARD handling // BOARD handling
...@@ -142,7 +142,19 @@ public: ...@@ -142,7 +142,19 @@ public:
void Transform( MODULE* module, int transform ); void Transform( MODULE* module, int transform );
// importing / exporting Footprint // 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 * Function Import_Module
* Read a file containing only one footprint. * Read a file containing only one footprint.
...@@ -151,7 +163,6 @@ public: ...@@ -151,7 +163,6 @@ public:
* This is the same format as .mod files but restricted to only one footprint * 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 * The import function can also read gpcb footprint file, in Newlib format
* (One footprint per file, Newlib files have no special ext.) * (One footprint per file, Newlib files have no special ext.)
* @param DC = Current Device Context (can be NULL)
*/ */
MODULE* Import_Module( ); MODULE* Import_Module( );
...@@ -188,11 +199,11 @@ public: ...@@ -188,11 +199,11 @@ public:
void End_Edge_Module( EDGE_MODULE* Edge ); void End_Edge_Module( EDGE_MODULE* Edge );
/** /**
* Function Enter_Edge_Width * Function Enter_Edge_Width
* Edition of the edge items width * Edition of width of module outlines
* Ask for a new width. * Ask for a new width.
* Change the width of EDGE_MODULE Edge if aEdge != NULL * Change the width of EDGE_MODULE Edge if aEdge != NULL
* @param aEdge = edge to edit, or 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 Enter_Edge_Width( EDGE_MODULE* aEdge );
void Start_Move_EdgeMod( EDGE_MODULE* drawitem, wxDC* DC ); void Start_Move_EdgeMod( EDGE_MODULE* drawitem, wxDC* DC );
......
...@@ -256,28 +256,27 @@ void Montre_Position_Empreinte( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) ...@@ -256,28 +256,27 @@ void Montre_Position_Empreinte( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
* Function Delete Module * Function Delete Module
* Remove a footprint from m_Modules linked list and put it in undelete buffer * Remove a footprint from m_Modules linked list and put it in undelete buffer
* The ratsnest and pad list are recalculated * The ratsnest and pad list are recalculated
* @param module = footprint to delete * @param aModule = footprint to delete
* @param DC = currentDevice Context. if NULL: do not redraw new ratsnest and * @param aDC = currentDevice Context. if NULL: do not redraw new ratsnest
* screen * @param aAskBeforeDeleting : if true: ask for confirmation before deleting
* @param aPromptBeforeDeleting : if true: ask for confirmation before deleting
*/ */
bool WinEDA_PcbFrame::Delete_Module( MODULE* module, bool WinEDA_PcbFrame::Delete_Module( MODULE* aModule,
wxDC* DC, wxDC* aDC,
bool aAskBeforeDeleting ) bool aAskBeforeDeleting )
{ {
wxString msg; wxString msg;
if( module == NULL ) if( aModule == NULL )
return FALSE; return FALSE;
module->DisplayInfo( this ); aModule->DisplayInfo( this );
/* Confirm module delete. */ /* Confirm module delete. */
if( aAskBeforeDeleting ) if( aAskBeforeDeleting )
{ {
msg.Printf( _( "Delete Module %s (value %s) ?" ), msg.Printf( _( "Delete Module %s (value %s) ?" ),
GetChars( module->m_Reference->m_Text ), GetChars( aModule->m_Reference->m_Text ),
GetChars( module->m_Value->m_Text ) ); GetChars( aModule->m_Value->m_Text ) );
if( !IsOK( this, msg ) ) if( !IsOK( this, msg ) )
{ {
return FALSE; return FALSE;
...@@ -287,15 +286,15 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module, ...@@ -287,15 +286,15 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module,
OnModify(); OnModify();
/* Remove module from list, and put it in undo command list */ /* Remove module from list, and put it in undo command list */
m_Pcb->m_Modules.Remove( module ); m_Pcb->m_Modules.Remove( aModule );
module->SetState( DELETED, ON ); aModule->SetState( DELETED, ON );
SaveCopyInUndoList( module, UR_DELETED ); SaveCopyInUndoList( aModule, UR_DELETED );
if( DC && GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) ) if( aDC && GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) )
Compile_Ratsnest( DC, true ); Compile_Ratsnest( aDC, true );
// Redraw the full screen to ensure perfect display of board and ratsnest. // Redraw the full screen to ensure perfect display of board and ratsnest.
if( DC ) if( aDC )
DrawPanel->Refresh(); DrawPanel->Refresh();
return true; return true;
...@@ -531,7 +530,7 @@ void WinEDA_BasePcbFrame::Rotate_Module( wxDC* DC, MODULE* module, ...@@ -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 ) void DrawModuleOutlines( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* module )
{ {
...@@ -559,7 +558,7 @@ 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 ) if( g_Show_Module_Ratsnest && panel )
{ {
WinEDA_BasePcbFrame* frame = (WinEDA_BasePcbFrame*) panel->GetParent(); WinEDA_BasePcbFrame* frame = (WinEDA_BasePcbFrame*) panel->GetParent();
frame->build_ratsnest_module( DC, module ); frame->build_ratsnest_module( module );
frame->trace_ratsnest_module( DC ); frame->trace_ratsnest_module( DC );
} }
} }
...@@ -81,8 +81,7 @@ static FILE * OpenNetlistFile( const wxString& aFullFileName ); ...@@ -81,8 +81,7 @@ static FILE * OpenNetlistFile( const wxString& aFullFileName );
static void AddToList( const wxString& NameLibCmp, static void AddToList( const wxString& NameLibCmp,
const wxString& NameCmp, const wxString& NameCmp,
const wxString& TimeStampPath ); const wxString& TimeStampPath );
static int SetPadNetName( wxWindow* aFrame, static int SetPadNetName( char* Text,
char* Text,
MODULE* Module, MODULE* Module,
wxTextCtrl* aMessageWindow ); wxTextCtrl* aMessageWindow );
static int ReadListeModules( const wxString& CmpFullFileName, static int ReadListeModules( const wxString& CmpFullFileName,
...@@ -315,7 +314,7 @@ bool WinEDA_PcbFrame::ReadPcbNetlist( const wxString& aNetlistFullFilename, ...@@ -315,7 +314,7 @@ bool WinEDA_PcbFrame::ReadPcbNetlist( const wxString& aNetlistFullFilename,
{ {
if( Module ) if( Module )
{ {
SetPadNetName( NULL, Text, Module, aMessageWindow ); SetPadNetName( Text, Module, aMessageWindow );
} }
State--; State--;
} }
...@@ -579,8 +578,7 @@ is [%s] and netlist said [%s]\n" ), ...@@ -579,8 +578,7 @@ is [%s] and netlist said [%s]\n" ),
* @param aMessageWindow = a wxTextCtrl to print error and warning message * @param aMessageWindow = a wxTextCtrl to print error and warning message
* (can be NULL) * (can be NULL)
*/ */
int SetPadNetName( wxWindow* frame, int SetPadNetName( char* Text,
char* Text,
MODULE* Module, MODULE* Module,
wxTextCtrl* aMessageWindow ) wxTextCtrl* aMessageWindow )
{ {
...@@ -784,7 +782,7 @@ void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* aFrame, ...@@ -784,7 +782,7 @@ void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* aFrame,
* Function BuildFootprintsListFromNetlistFile * Function BuildFootprintsListFromNetlistFile
* Fill BufName with footprints names read from the netlist. * Fill BufName with footprints names read from the netlist.
* @param aNetlistFullFilename = netlist file name * @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 * @return Footprint count, or -1 if netlist file cannot opened
*/ */
int BuildFootprintsListFromNetlistFile( const wxString& aNetlistFullFilename, int BuildFootprintsListFromNetlistFile( const wxString& aNetlistFullFilename,
......
...@@ -26,7 +26,7 @@ static void Print_Module( WinEDA_DrawPanel* aPanel, wxDC* aDC, MODULE* aModule, ...@@ -26,7 +26,7 @@ static void Print_Module( WinEDA_DrawPanel* aPanel, wxDC* aDC, MODULE* aModule,
* Print the board, but only layers allowed by aPrintMaskLayer * Print the board, but only layers allowed by aPrintMaskLayer
* @param aDC = the print device context * @param aDC = the print device context
* @param aPrint_Sheet_Ref = true to print frame references * @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 aPrintMirrorMode = true to plot mirrored
* @param aData = a pointer to an optional data (NULL if not used) * @param aData = a pointer to an optional data (NULL if not used)
*/ */
...@@ -107,7 +107,7 @@ void WinEDA_ModuleEditFrame::PrintPage( wxDC* aDC, ...@@ -107,7 +107,7 @@ void WinEDA_ModuleEditFrame::PrintPage( wxDC* aDC,
* Print the board, but only layers allowed by aPrintMaskLayer * Print the board, but only layers allowed by aPrintMaskLayer
* @param aDC = the print device context * @param aDC = the print device context
* @param aPrint_Sheet_Ref = true to print frame references * @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 aPrintMirrorMode = true to plot mirrored
* @param aData = a pointer to an optional data (NULL if not used) * @param aData = a pointer to an optional data (NULL if not used)
*/ */
......
...@@ -109,16 +109,15 @@ static bool DisplayRastnestInProgress; // Enable the display of the ...@@ -109,16 +109,15 @@ static bool DisplayRastnestInProgress; // Enable the display of the
* Create the entire board ratsnest. * Create the entire board ratsnest.
* Must be called after a board change (changes for * Must be called after a board change (changes for
* pads, footprints or a read netlist ). * pads, footprints or a read netlist ).
* * @param aDC = the current device context (can be NULL)
* @param display_status_pcb : if true, display the computation results * @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; wxString msg;
DisplayRastnestInProgress = TRUE; DisplayRastnestInProgress = TRUE;
GetBoard()->m_Status_Pcb = 0; /* we want a full ratsnest computation, GetBoard()->m_Status_Pcb = 0; /* we want a full ratsnest computation,
* from the scratch */ * from the scratch */
MsgPanel->EraseMsgBox(); MsgPanel->EraseMsgBox();
...@@ -126,13 +125,13 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb ) ...@@ -126,13 +125,13 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb )
// Rebuild the full pads and net info list // Rebuild the full pads and net info list
RecalculateAllTracksNetcode(); RecalculateAllTracksNetcode();
if( display_status_pcb ) if( aDisplayStatus )
{ {
msg.Printf( wxT( " %d" ), m_Pcb->GetPadsCount() ); msg.Printf( wxT( " %d" ), m_Pcb->GetPadsCount() );
Affiche_1_Parametre( this, 1, wxT( "pads" ), msg, RED ); Affiche_1_Parametre( this, 1, wxT( "pads" ), msg, RED );
} }
if( display_status_pcb ) if( aDisplayStatus )
{ {
msg.Printf( wxT( " %d" ), m_Pcb->m_NetInfo->GetCount() ); msg.Printf( wxT( " %d" ), m_Pcb->m_NetInfo->GetCount() );
Affiche_1_Parametre( this, 8, wxT( "Nets" ), msg, CYAN ); Affiche_1_Parametre( this, 8, wxT( "Nets" ), msg, CYAN );
...@@ -145,23 +144,23 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb ) ...@@ -145,23 +144,23 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb )
* This full ratsnest is not modified by track editing. * This full ratsnest is not modified by track editing.
* It changes only when a netlist is read, or footprints are modified * 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 /* Compute the pad connections due to the existing tracks (physical
* connections) */ * connections) */
test_connexions( DC ); test_connexions( aDC );
/* Compute the active ratsnest, i.e. the unconnected links /* Compute the active ratsnest, i.e. the unconnected links
* it is faster than Build_Board_Ratsnest() * it is faster than Build_Board_Ratsnest()
* because many optimizations and computations are already made * because many optimizations and computations are already made
*/ */
Tst_Ratsnest( DC, 0 ); Tst_Ratsnest( aDC, 0 );
// Redraw the active ratsnest ( if enabled ) // Redraw the active ratsnest ( if enabled )
if( GetBoard()->IsElementVisible(RATSNEST_VISIBLE) && DC ) if( GetBoard()->IsElementVisible(RATSNEST_VISIBLE) && aDC )
DrawGeneralRatsnest( DC, 0 ); DrawGeneralRatsnest( aDC, 0 );
if( display_status_pcb ) if( aDisplayStatus )
m_Pcb->DisplayInfo( this ); m_Pcb->DisplayInfo( this );
} }
...@@ -203,8 +202,7 @@ static int sort_by_length( const void* o1, const void* o2 ) ...@@ -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 * the D_PAD member m_SubRatsnest handles the block number
* @param aRatsnestBuffer = a std::vector<RATSNEST_ITEM> buffer to fill with * @param aRatsnestBuffer = a std::vector<RATSNEST_ITEM> buffer to fill with
* new ratsnest items * new ratsnest items
* @param aPadBuffer = a std::vector<D_PAD*> that is the list of pads to * @param aPadBuffer = a std::vector<D_PAD*> that is the list of pads to consider
* consider
* @param aPadIdxStart = starting index (within the pad list) for search * @param aPadIdxStart = starting index (within the pad list) for search
* @param aPadIdxMax = ending index (within the pad list) for search * @param aPadIdxMax = ending index (within the pad list) for search
* @return blocks not connected count * @return blocks not connected count
...@@ -518,18 +516,19 @@ void WinEDA_BasePcbFrame::Build_Board_Ratsnest( wxDC* DC ) ...@@ -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 * 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 * 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 ) if( ( m_Pcb->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK ) == 0 )
return; return;
if( ( m_Pcb->m_Status_Pcb & DO_NOT_SHOW_GENERAL_RASTNEST ) ) if( ( m_Pcb->m_Status_Pcb & DO_NOT_SHOW_GENERAL_RASTNEST ) )
return; return;
if( DC == NULL ) if( aDC == NULL )
return; return;
int state = CH_VISIBLE | CH_ACTIF; int state = CH_VISIBLE | CH_ACTIF;
for( unsigned ii = 0; ii < m_Pcb->GetRatsnestsCount(); ii++ ) for( unsigned ii = 0; ii < m_Pcb->GetRatsnestsCount(); ii++ )
...@@ -538,9 +537,9 @@ void WinEDA_BasePcbFrame::DrawGeneralRatsnest( wxDC* DC, int net_code ) ...@@ -538,9 +537,9 @@ void WinEDA_BasePcbFrame::DrawGeneralRatsnest( wxDC* DC, int net_code )
if( ( item.m_Status & state ) != state ) if( ( item.m_Status & state ) != state )
continue; 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 ) ...@@ -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 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 * The function activate the smallest ratsnest between block 1 and the block n
* (activate a logical connexion) * (activate a logical connexion)
* * @param aRatsnestBuffer = the buffer to store NETINFO_ITEM* items
* @param net = the current NETINFO_ITEM for the current net * @param net = the current NETINFO_ITEM for the current net
* output: * output:
* .state member of the ratsnest * .state member of the ratsnest
...@@ -743,28 +742,26 @@ void WinEDA_BasePcbFrame::Tst_Ratsnest( wxDC* DC, int ref_netcode ) ...@@ -743,28 +742,26 @@ void WinEDA_BasePcbFrame::Tst_Ratsnest( wxDC* DC, int ref_netcode )
/** /**
* Function Test_1_Net_Ratsnest * Function Test_1_Net_Ratsnest
* Compute the ratsnest relative to the net "net_code" * Compute the ratsnest relative to the net "net_code"
* @param DC - Device context to draw on. * @param aDC - Device context to draw on.
* @param ref_netcode = netcode used to compute the ratsnest. * @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; DisplayRastnestInProgress = FALSE;
DrawGeneralRatsnest( DC, ref_netcode ); DrawGeneralRatsnest( aDC, aNetcode );
Tst_Ratsnest( DC, ref_netcode ); Tst_Ratsnest( aDC, aNetcode );
DrawGeneralRatsnest( DC, ref_netcode ); DrawGeneralRatsnest( aDC, aNetcode );
return m_Pcb->GetRatsnestsCount(); return m_Pcb->GetRatsnestsCount();
} }
/** /*
* Build a ratsnest relative to one footprint. This is a simplified * Function build_ratsnest_module
* computation * 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 * used only in move footprint. It is not optimal, but it is fast and sufficient
* sufficient * to help a footprint placement
* to guide a footprint placement
* It shows the connections from a pad to the nearest connected pad * It shows the connections from a pad to the nearest connected pad
* @param Module = module to consider.
* *
* The ratsnest has 2 sections: * The ratsnest has 2 sections:
* - An "internal" ratsnest relative to pads of this footprint which are * - 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 ) ...@@ -774,7 +771,7 @@ int WinEDA_BasePcbFrame::Test_1_Net_Ratsnest( wxDC* DC, int ref_netcode )
* pad (in an other footprint) * pad (in an other footprint)
* The ratsnest section must be computed for each new position * 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 static unsigned pads_module_count; // node count (node = pad with a net
// code) for the footprint being moved // code) for the footprint being moved
...@@ -807,7 +804,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module ) ...@@ -807,7 +804,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
s_localPadBuffer.clear(); s_localPadBuffer.clear();
m_Pcb->m_LocalRatsnest.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 ) if( pad_ref->GetNet() == 0 )
continue; continue;
...@@ -849,7 +846,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module ) ...@@ -849,7 +846,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
for( unsigned jj = 0; jj < net->m_ListPad.size(); jj++ ) for( unsigned jj = 0; jj < net->m_ListPad.size(); jj++ )
{ {
pad_externe = net->m_ListPad[jj]; pad_externe = net->m_ListPad[jj];
if( pad_externe->GetParent() == Module ) if( pad_externe->GetParent() == aModule )
continue; continue;
pad_externe->SetSubRatsnest( 0 ); pad_externe->SetSubRatsnest( 0 );
...@@ -889,9 +886,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module ) ...@@ -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 */ /* a - first step of lee algorithm : build the pad to pad link list */
int icnt = gen_rats_pad_to_pad( m_Pcb->m_LocalRatsnest, int icnt = gen_rats_pad_to_pad( m_Pcb->m_LocalRatsnest,
s_localPadBuffer, s_localPadBuffer,
ii, ii, jj, 0 );
jj,
0 );
/* b - second step of lee algorithm : build the block to block link /* b - second step of lee algorithm : build the block to block link
*list (Iteration) */ *list (Iteration) */
...@@ -899,8 +894,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module ) ...@@ -899,8 +894,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
{ {
icnt = gen_rats_block_to_block( m_Pcb->m_LocalRatsnest, icnt = gen_rats_block_to_block( m_Pcb->m_LocalRatsnest,
s_localPadBuffer, s_localPadBuffer,
ii, ii, jj );
jj );
} }
ii = jj; ii = jj;
......
...@@ -272,7 +272,7 @@ TRACK* Marque_Une_Piste( BOARD* aPcb, ...@@ -272,7 +272,7 @@ TRACK* Marque_Une_Piste( BOARD* aPcb,
* ref_pos on layers allowed in masque_layer * ref_pos on layers allowed in masque_layer
* - Put segments fount in aList * - Put segments fount in aList
* Vias are put in list but their flags BUSY is not set * 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 aRef_pos = the reference coordinate of the starting search
* @param aLayerMask = the allowed layers for segments to search * @param aLayerMask = the allowed layers for segments to search
* (1 layer when starting point is on a segment, but more than one when * (1 layer when starting point is on a segment, but more than one when
......
...@@ -34,18 +34,14 @@ ...@@ -34,18 +34,14 @@
#include "zones.h" #include "zones.h"
/**********************************************************************************/
void WinEDA_PcbFrame::Delete_Zone_Fill( SEGZONE* aZone, long aTimestamp )
/**********************************************************************************/
/** /**
* Function Delete_Zone_Fill * Function Delete_Zone_Fill
* Remove the zone fillig which include the segment aZone, or the zone which have the given time stamp. * 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 * A zone is a group of segments which have the same TimeStamp
* @param DC = current Device Context (can be NULL)
* @param aZone = zone segment within the zone to delete. Can be NULL * @param aZone = zone segment within the zone to delete. Can be NULL
* @param aTimestamp = Timestamp for the zone to delete, used if aZone == NULL * @param aTimestamp = Timestamp for the zone to delete, used if aZone == NULL
*/ */
void WinEDA_PcbFrame::Delete_Zone_Fill( SEGZONE* aZone, long aTimestamp )
{ {
bool modify = false; bool modify = false;
unsigned long TimeStamp; unsigned long TimeStamp;
......
...@@ -521,8 +521,8 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb ) ...@@ -521,8 +521,8 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
/** AddPolygonCornersToBoolengine /** AddPolygonCornersToBoolengine
* copy a set of polygons in a kbool engine * copy a set of polygons in a kbool engine
* @param aCornersBuffer = list of polygons defined by corners. * @param aCornersBuffer = list of polygons defined by corners.
* @ param aBoolengine = the kbool engine to populate * @param aBoolengine = the kbool engine to populate
* @ param aGroup = GROUP_A or GROUP_B * @param aGroup = GROUP_A or GROUP_B
*/ */
void AddPolygonCornersToBoolengine( std::vector <CPolyPt>& aCornersBuffer, void AddPolygonCornersToBoolengine( std::vector <CPolyPt>& aCornersBuffer,
Bool_Engine* aBoolengine, GroupType aGroup ) Bool_Engine* aBoolengine, GroupType aGroup )
......
...@@ -63,9 +63,9 @@ int SaveCopyOfZones(PICKED_ITEMS_LIST & aPickList, BOARD* aPcb, int aNetCode, in ...@@ -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 * check a pick list to remove zones identical to their copies
* and set the type of operation in picker (UR_DELETED, UR_CHANGED) * and set the type of operation in picker (UR_DELETED, UR_CHANGED)
* @param aPickList = the main pick list * @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 * @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 #endif // ZONES_FUNCTIONS_TO_UNDO_REDO_H
...@@ -328,8 +328,8 @@ int BOARD::ClipAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList, ...@@ -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 * @param aModifiedZonesList = a PICKED_ITEMS_LIST * where to store deleted or added areas (useful in undo commands
* can be NULL * can be NULL
* @param modified_area = area to test * @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 bMessageBoxInt == true, shows message when clipping occurs.
* @param bMessageBoxArc == true, shows message when clipping can't be done due to arcs.
* @return : * @return :
* -1 if arcs intersect other sides, so polygon can't be clipped * -1 if arcs intersect other sides, so polygon can't be clipped
* 0 if no intersecting sides * 0 if no intersecting sides
......
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