Commit 2ab86e74 authored by Wayne Stambaugh's avatar Wayne Stambaugh
Browse files

Documentation and coding policy fixes.

* Fix all Doxygen warnings except polygon files.
* Add footprint library table tasks to TODO.txt.
* Add definition to drag.h to prevent nesting.
* Coding policy fixes.
parent 9a131706
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -5,8 +5,9 @@
Capitalization:

    For any visible text used within KiCad, follow recommendations here:
    http://library.gnome.org/devel/hig-book/2.20/design-text-labels.html.en#layout-capitalization
    This applies to all Menus, Titles, Labels, Tooltips, Buttons, etc.
    http://developer.gnome.org/hig-book/stable/design-text-labels.html.en
    in the "Capitalization" section.  This applies to all Menus, Titles,
    Labels, Tooltips, Buttons, etc.

    The capitalization for the application names is KiCad, Eeschema, CvPcb,
    GerbView, and Pcbnew.  All strings that have application names that are
@@ -19,7 +20,7 @@ Dialogs:

    Follow the recommendations here:

    http://library.gnome.org/devel/hig-book/2.20/windows-dialog.html.en
    http://developer.gnome.org/hig-book/stable/design-window.html.en
    paying particular attention to "initial focus", "sensible default values",
    "default buttons", ESC key termination.  Please note that the escape key
    termination only works properly if there is a dialog button defined with
+37 −0
Original line number Diff line number Diff line
@@ -68,6 +68,43 @@ d) write functions to lookup a footprint from
 i) FPID
 ii) footprint alone since most old netlists don't have nicknames in them.

e) Replace MODULE::m_LibRef which is a wxString with FPID.  FPID supports
   the footprint name only which is backwards compatible with the current
   design.

f) On the first time an empty global footprint table is encountered, add
   standard KiCad and user libraries not located in the project directory
   or any of it's sub-directories to the global footprint library table.

g) When a project is opened and the project footprint library table is
   empty, add any user library that is located in the project path or any
   of it's sub-directories to the project footprint library table.

h) When populating the footprint library tables, use the library  file name
   without the extension as the FPID nickname.  When duplicate names exist,
   append an incremental integer to the nickname so that the second logic
   libraries FPID nickname becomes logic1.  Assign FPID library nicknames
   to each MODULE based on the legacy library search order when loading an
   existing board that does not have fully defined MODULE FPIDs.

i) Add check for KISYSMOD environment variable, on Pcbnew and CvPcb start up
   and set it to the known directory of the default KiCad footprint libraries.
   The code should look something like:

{
    const char* envar;

    envar = getenv( "KISYSMOD" );

    if( !envar )
    {
        envvar = knownDirOfSysMods;

        setenv( "KISYSMOD", envar );
    }
}


These i) and ii) merge into one if footprint alone is a valid FPID.
Incorporate any environment variable in the the uri expansion using:
const wxString FP_LIB_TABLE::ExpandSubtitutions( const wxString aString )
+1 −1
Original line number Diff line number Diff line
@@ -677,7 +677,7 @@ public:
    /**
     * Function RedrawScreen2
     * puts the crosshair back to the screen position it had before zooming
     * @param beforePos The screen position of the crosshair before zooming
     * @param posBefore screen position of the crosshair before zooming
     */
    void RedrawScreen2( const wxPoint& posBefore );

+1 −1
Original line number Diff line number Diff line
@@ -218,7 +218,7 @@ private:
    /// This is also the last used netclass after starting a track.
    wxString                m_currentNetClassName;

    /// Index for #m_ViaSizeList to select the current via size.
    /// Index for #m_ViasDimensionsList to select the current via size.
    /// 0 is the index selection of the default value Netclass
    unsigned                m_viaSizeIndex;

+18 −10
Original line number Diff line number Diff line
@@ -27,12 +27,16 @@
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */

#include <vector>
#include <wx/gdicmn.h>
#ifndef _DRAG_H_
#define _DRAG_H_


#include <class_track.h>
#include <vector>


class wxDC;
class wxPoint;
class EDA_DRAW_PANEL;
class MODULE;
class D_PAD;
@@ -84,7 +88,7 @@ public:
    ~DRAG_SEGM_PICKER() {};

    /**
     * Set auxiliary parameters relative to calucaltions needed
     * Set auxiliary parameters relative to calculations needed
     * to find track ends positions while dragging pads
     * and when modules are rotated, flipped
     */
@@ -104,6 +108,7 @@ public:
    }
};


class DRAG_LIST
{
public:
@@ -166,11 +171,13 @@ void DrawSegmentWhileMovingFootprint( EDA_DRAW_PANEL* panel, wxDC* DC );
void EraseDragList();

/**
 * function Collect_TrackSegmentsToDrag.
 * Function Collect_TrackSegmentsToDrag.
 * used to collect track segments in drag track segment
 * Build the list of tracks connected to the ref point by calling
 * AddSegmentToDragList for each selected track
 * Net codes must be up to date, because only tracks having the right net code are tested.
 *
 * @param aPcb A point the the #BOARD object to collect track segment to drag.
 * @param aRefPos = reference point of connection
 * @param aLayerMask = layers mask to collect tracks
 * @param aNetCode = the net code to consider
@@ -193,3 +200,4 @@ void AddSegmentToDragList( int flag, TRACK* aTrack );
void UndrawAndMarkSegmentsToDrag( EDA_DRAW_PANEL* aCanvas, wxDC* aDC );


#endif    // _DRAG_H_
Loading