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