Commit 845d61ac authored by Dick Hollenbeck's avatar Dick Hollenbeck

coding standards consistency updates

parent 881b6aa7
......@@ -124,7 +124,7 @@ public:
double m_BoardScale; /* Normalization scale for coordinates:
* when scaled between -1.0 and +1.0 */
double m_LayerZcoord[32];
double m_ActZpos;
double m_ActZpos;
public: Info_3D_Visu();
~Info_3D_Visu();
};
......@@ -170,13 +170,15 @@ public:
void InitGL();
void SetLights();
void Draw3D_Track( TRACK* track );
/** Function Draw3D_SolidPolygonsInZones
/**
* Function Draw3D_SolidPolygonsInZones
* draw all solid polygons used as filles areas in a zone
* @param aZone_c = the zone to draw
*/
void Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* aZone_c );
void Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* aZone_c );
/** Function Draw3D_Polygon
/**
* Function Draw3D_Polygon
* draw one solid polygon
* @param aCornersList = a std::vector<wxPoint> liste of corners, in physical coordinates
* @param aZpos = the z position in 3D units
......@@ -185,12 +187,12 @@ public:
void Draw3D_Via( SEGVIA* via );
void Draw3D_DrawSegment( DRAWSEGMENT* segment );
void Draw3D_DrawText( TEXTE_PCB* text );
/// Toggles ortographic projection on and off
void ToggleOrtho(){ m_ortho = !m_ortho ; Refresh(true);};
/// Returns the orthographic projection flag
bool ModeIsOrtho() { return m_ortho ;};
//int Get3DLayerEnable(int act_layer);
......@@ -230,7 +232,8 @@ public:
void SetToolbars();
void GetSettings();
void SaveSettings();
/** function ReloadRequest
/**
* Function ReloadRequest
* must be called when reloading data from Pcbnew is needed
* mainly after edition of the board or footprint beeing displayed.
* mainly for the module editor.
......
......@@ -26,18 +26,21 @@ public:
void OnSelectOptionToolbar( wxCommandEvent& event );
/** Function IsGridVisible() , virtual
/**
* Function IsGridVisible() , virtual
* @return true if the grid must be shown
*/
virtual bool IsGridVisible();
/** Function SetGridVisibility() , virtual
/**
* Function SetGridVisibility() , virtual
* It may be overloaded by derived classes
* if you want to store/retrieve the grid visiblity in configuration.
* @param aVisible = true if the grid must be shown
*/
virtual void SetGridVisibility(bool aVisible);
/** Function GetGridColor() , virtual
/**
* Function GetGridColor() , virtual
* @return the color of the grid
*/
virtual int GetGridColor();
......@@ -64,7 +67,8 @@ public:
}
/** Function SaveCopyInUndoList (overloaded).
/**
* Function SaveCopyInUndoList (overloaded).
* Creates a new entry in undo list of commands.
* add a list of pickers to handle a list of items
* @param aItemsList = the list of items modified by the command to undo
......
......@@ -522,13 +522,15 @@ public:
int GetPartCount() { return m_unitCount; }
/** function IsMulti
/**
* Function IsMulti
* @return true if the component has multiple parts per package.
* When happens, the reference has a sub reference ti identify part
*/
bool IsMulti() { return m_unitCount > 1; }
/** function IsMulti
/**
* Function IsMulti
* @return the sub reference for component having multiple parts per package.
* The sub reference identify the part (or unit)
* @param aUnit = the part identifier ( 1 to max count)
......
......@@ -88,7 +88,8 @@ public:
void InitBuffers( SCH_COMPONENT* aComponent );
private:
/** Function updateDisplay
/**
* Function updateDisplay
* update the listbox showing fields, according to the fields texts
* must be called after a text change in fields, if this change is not an edition
*/
......
......@@ -68,7 +68,8 @@ public:
*/
wxString GetName();
/** Function GetPenSize virtual pure
/**
* Function GetPenSize virtual pure
* @return the size of the "pen" that be used to draw or plot this item
*/
int GetPenSize( );
......
......@@ -177,7 +177,8 @@ public:
}
/** Function ReturnPinStringNum (static function)
/**
* Function ReturnPinStringNum (static function)
* Pin num is coded as a long or 4 ascii chars
* @param aPinNum = a long containing a pin num
* @return aStringBuffer = the wxString to store the pin num as an
......
......@@ -122,7 +122,8 @@ public:
Close( false );
}
/** Function OnModify()
/**
* Function OnModify()
* Must be called after a schematic change
* in order to set the "modify" flag of the current screen
*/
......@@ -173,24 +174,28 @@ public:
FILL_T GetFillStyle( void ) { return m_drawFillStyle; }
/** Function TempCopyComponent
/**
* Function TempCopyComponent
* create a temporary copy of the current edited component
* Used to prepare an Undo ant/or abort command before editing the component
*/
void TempCopyComponent();
/** Function RestoreComponent
/**
* Function RestoreComponent
* Restore the current edited component from its temporary copy.
* Used to abort a command
*/
void RestoreComponent();
/** Function GetTempCopyComponent
/**
* Function GetTempCopyComponent
* @return the temporary copy of the current component.
*/
LIB_COMPONENT* GetTempCopyComponent() { return m_tempCopyComponent; }
/** Function ClearTempCopyComponent
/**
* Function ClearTempCopyComponent
* delete temporary copy of the current component and clear pointer
*/
void ClearTempCopyComponent();
......@@ -312,7 +317,8 @@ protected:
friend class Dialog_BodyGraphicText_Properties;
/** function CreatePNGorJPEGFile
/**
* Function CreatePNGorJPEGFile
* Create an image (screenshot) of the current component.
* Output file format is png or jpeg
* @param aFileName = the full filename
......@@ -333,7 +339,8 @@ protected:
virtual void PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, int aPrintMask,
bool aPrintMirrorMode, void * aData = NULL);
/** function SVG_Print_component
/**
* Function SVG_Print_component
* Creates the SVG print file for the current edited component.
* @param aFullFileName = the full filename of the file
*/
......
......@@ -167,7 +167,8 @@ public:
void SetOrientation( int aOrientation );
/** function GetOrientation()
/**
* Function GetOrientation()
* Used to display component orientation (in dialog editor or info)
* @return the orientation and mirror
* Note: Because there are different ways to have a given orientation/mirror,
......@@ -192,7 +193,8 @@ public:
*/
void ClearAnnotation( SCH_SHEET_PATH* aSheet );
/** function SetTimeStamp
/**
* Function SetTimeStamp
* Change the old time stamp to the new time stamp.
* the time stamp is also modified in paths
* @param aNewTimeStamp = new time stamp
......@@ -324,7 +326,8 @@ public:
// Set the unit selection, for the given sheet path.
void SetUnitSelection( SCH_SHEET_PATH* aSheet, int aUnitSelection );
/** Function GetPenSize
/**
* Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item
* for a component, has no meaning, but it is necessary to satisfy the
* SCH_ITEM class requirements.
......
......@@ -72,19 +72,22 @@ public:
void SwapData( SCH_FIELD* copyitem );
/** Function ImportValues
/**
* Function ImportValues
* copy parameters from a source.
* Pointers and specific values (position) are not copied
* @param aSource = the LIB_FIELD to read
*/
void ImportValues( const LIB_FIELD& aSource );
/** Function GetPenSize
/**
* Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item
*/
int GetPenSize();
/** Function IsVisible
/**
* Function IsVisible
* @return true is this field is visible, false if flagged invisible
*/
bool IsVisible()
......
......@@ -84,7 +84,8 @@ public:
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
/** Function GetPenSize
/**
* Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item
*/
virtual int GetPenSize();
......@@ -158,7 +159,8 @@ public:
SCH_NO_CONNECT* GenCopy();
/** Function GetPenSize
/**
* Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item
*/
virtual int GetPenSize();
......@@ -186,7 +188,8 @@ public:
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
/** Function HitTest
/**
* Function HitTest
* @return true if the point aPosRef is within item area
* @param aPosRef = a wxPoint to test
*/
......@@ -285,7 +288,8 @@ public:
*/
EDA_Rect GetBoundingBox();
/** Function GetPenSize
/**
* Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item
*/
virtual int GetPenSize();
......@@ -357,7 +361,8 @@ public:
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
/** Function AddPoint
/**
* Function AddPoint
* add a corner to m_PolyPoints
*/
void AddPoint( const wxPoint& point )
......@@ -366,13 +371,15 @@ public:
}
/** Function GetCornerCount
/**
* Function GetCornerCount
* @return the number of corners
*/
unsigned GetCornerCount() const { return m_PolyPoints.size(); }
/** Function GetPenSize
/**
* Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item
*/
virtual int GetPenSize();
......@@ -416,7 +423,8 @@ public:
}
/** Function HitTest
/**
* Function HitTest
* @return true if the point aPosRef is within item area
* @param aPosRef = a wxPoint to test
*/
......@@ -434,7 +442,8 @@ public:
SCH_JUNCTION* GenCopy();
/** Function GetPenSize
/**
* Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item
*/
virtual int GetPenSize();
......
......@@ -53,14 +53,16 @@ public:
*/
bool Save( FILE* aFile ) const;
/** Function GetPenSize
/**
* Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item
* for a marker, has no meaning, but it is necessary to satisfy the
* SCH_ITEM class requirements
*/
virtual int GetPenSize() { return 0; };
/** Function HitTest
/**
* Function HitTest
* @return true if the point aPosRef is within item area
* @param aPosRef = a wxPoint to test
*/
......
......@@ -70,7 +70,8 @@ public:
int aDraw_mode,
int aColor = -1 );
/** function CreateGraphicShape (virual)
/**
* Function CreateGraphicShape (virual)
* Calculates the graphic shape (a polygon) associated to the text
* @param aCorner_list = a buffer to fill with polygon corners coordinates
* @param Pos = Position of the shape
......@@ -141,12 +142,14 @@ public:
#endif
/** Function GetPenSize
/**
* Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item
*/
virtual int GetPenSize();
/** function CreateGraphicShape
/**
* Function CreateGraphicShape
* Calculates the graphic shape (a polygon) associated to the text
* @param aCorner_list = list to fill with polygon corners coordinates
* @param Pos = Position of the shape
......@@ -174,7 +177,8 @@ public:
virtual void Mirror_X( int aXaxis_position );
/** function Matches
/**
* Function Matches
* Compare hierarchical pin name against search string.
*
* @param aSearchData - Criteria to search against.
......@@ -324,12 +328,14 @@ public:
*/
bool HasUndefinedLabels();
/** Function GetPenSize
/**
* Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item
*/
virtual int GetPenSize();
/** Function Draw
/**
* Function Draw
* Draw the hierarchical sheet shape
* @param aPanel = the current DrawPanel
* @param aDc = the current Device Context
......@@ -344,26 +350,30 @@ public:
int aDrawMode,
int aColor = -1 );
/** Function HitTest
/**
* Function HitTest
* @return true if the point aPosRef is within item area
* @param aPosRef = a wxPoint to test
*/
bool HitTest( const wxPoint& aPosRef );
/** Function GetBoundingBox
/**
* Function GetBoundingBox
* @return an EDA_Rect giving the bounding box of the sheet
*/
EDA_Rect GetBoundingBox();
void SwapData( SCH_SHEET* copyitem );
/** Function ComponentCount
/**
* Function ComponentCount
* count our own components, without the power components.
* @return the component count.
*/
int ComponentCount();
/** Function Load.
/**
* Function Load.
* for the sheet: load the file m_FileName
* if a screen already exists, the file is already read.
* m_AssociatedScreen point on the screen, and its m_RefCount is
......@@ -375,7 +385,8 @@ public:
*/
bool Load( WinEDA_SchematicFrame* aFrame );
/** Function SearchHierarchy
/**
* Function SearchHierarchy
* search the existing hierarchy for an instance of screen "FileName".
* @param aFilename = the filename to find
* @param aFilename = a location to return a pointer to the screen (if
......@@ -384,7 +395,8 @@ public:
*/
bool SearchHierarchy( wxString aFilename, SCH_SCREEN** aScreen );
/** Function LocatePathOfScreen
/**
* Function LocatePathOfScreen
* search the existing hierarchy for an instance of screen "FileName".
* don't bother looking at the root sheet - it must be unique,
* no other references to its m_AssociatedScreen otherwise there would be
......@@ -397,14 +409,16 @@ public:
bool LocatePathOfScreen( SCH_SCREEN* aScreen,
SCH_SHEET_PATH* aList );
/** Function CountSheets
/**
* Function CountSheets
* calculates the number of sheets found in "this"
* this number includes the full subsheets count
* @return the full count of sheets+subsheets contained by "this"
*/
int CountSheets();
/** Function GetFileName
/**
* Function GetFileName
* return the filename corresponding to this sheet
* @return a wxString containing the filename
*/
......@@ -417,7 +431,8 @@ public:
}
/** Function ChangeFileName
/**
* Function ChangeFileName
* Set a new filename and manage data and associated screen
* The main difficulty is the filename change in a complex hierarchy.
* - if new filename is not already used: change to the new name (and if an
......@@ -479,12 +494,14 @@ public:
*/
void Resize( const wxSize& aSize );
/** function GetSheetNamePosition
/**
* Function GetSheetNamePosition
* @return the position of the anchor of sheet name text
*/
wxPoint GetSheetNamePosition ();
/** function GetFileNamePosition
/**
* Function GetFileNamePosition
* @return the position of the anchor of filename text
*/
wxPoint GetFileNamePosition ();
......
......@@ -93,25 +93,29 @@ public:
}
/** Function Cmp
/**
* Function Cmp
* Compare if this is the same sheet path as aSheetPathToTest
* @param aSheetPathToTest = sheet path to compare
* @return -1 if different, 0 if same
*/
int Cmp( const SCH_SHEET_PATH& aSheetPathToTest ) const;
/** Function Last
/**
* Function Last
* returns a pointer to the last sheet of the list
* One can see the others sheet as the "path" to reach this last sheet
*/
SCH_SHEET* Last();
/** Function LastScreen
/**
* Function LastScreen
* @return the SCH_SCREEN relative to the last sheet in list
*/
SCH_SCREEN* LastScreen();
/** Function LastScreen
/**
* Function LastScreen
* @return a pointer to the first schematic item handled by the
* SCH_SCREEN relative to the last sheet in list
*/
......@@ -125,7 +129,8 @@ public:
*/
SCH_ITEM* FirstDrawList();
/** Function Push
/**
* Function Push
* store (push) aSheet in list
* @param aSheet = pointer to the SCH_SHEET to store in list
* Push is used when entered a sheet to select or analyze it
......@@ -133,7 +138,8 @@ public:
*/
void Push( SCH_SHEET* aSheet );
/** Function Pop
/**
* Function Pop
* retrieves (pop) the last entered sheet and remove it from list
* @return a SCH_SHEET* pointer to the removed sheet in list
* Pop is used when leaving a sheet after a selection or analyze
......@@ -141,7 +147,8 @@ public:
*/
SCH_SHEET* Pop();
/** Function Path
/**
* Function Path
* the path uses the time stamps which do not changes even when editing
* sheet parameters
* a path is something like / (root) or /34005677 or /34005677/00AE4523
......@@ -157,7 +164,8 @@ public:
*/
wxString PathHumanReadable() const;
/** Function BuildSheetPathInfoFromSheetPathValue
/**
* Function BuildSheetPathInfoFromSheetPathValue
* Fill this with data to access to the hierarchical sheet known by its
* path aPath
* @param aPath = path of the sheet to reach (in non human readable format)
......
......@@ -65,7 +65,8 @@ public:
}
/** function SetTextOrientAndJustifyParmeters
/**
* Function SetTextOrientAndJustifyParmeters
* Set m_SchematicOrientation, and initialize
* m_orient,m_HJustified and m_VJustified, according to the value of
* m_SchematicOrientation (for a text )
......@@ -81,7 +82,8 @@ public:
int GetSchematicTextOrientation() { return m_SchematicOrientation; }
/** function GetSchematicTextOffset (virtual)
/**
* Function GetSchematicTextOffset (virtual)
* @return the offset between the SCH_TEXT position and the text itself
* position
* This offset depend on orientation, and the type of text
......@@ -97,7 +99,8 @@ public:
int draw_mode,
int Color = -1 );
/** function CreateGraphicShape
/**
* Function CreateGraphicShape
* Calculates the graphic shape (a polygon) associated to the text
* @param aCorner_list = a buffer to fill with polygon corners coordinates
* @param Pos = Postion of the shape
......@@ -113,7 +116,8 @@ public:
void Place( WinEDA_SchematicFrame* frame, wxDC* DC );
/** Function HitTest
/**
* Function HitTest
* @return true if the point aPosRef is within item area
* @param aPosRef = a wxPoint to test
*/
......@@ -147,7 +151,8 @@ public:
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
/** Function GetPenSize
/**
* Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item
*/
int GetPenSize();
......@@ -218,7 +223,8 @@ public:
}
/** function SetTextOrientAndJustifyParmeters
/**
* Function SetTextOrientAndJustifyParmeters
* Set m_SchematicOrientation, and initialize
* m_orient,m_HJustified and m_VJustified, according to the value of
* m_SchematicOrientation (for a label)
......@@ -232,7 +238,8 @@ public:
*/
virtual void SetSchematicTextOrientation( int aSchematicOrientation );
/** function GetSchematicTextOffset (virtual)
/**
* Function GetSchematicTextOffset (virtual)
* @return the offset between the SCH_TEXT position and the text itself
* position
* This offset depend on orientation, and the type of text
......@@ -291,7 +298,8 @@ public:
}
/** function SetTextOrientAndJustifyParmeters
/**
* Function SetTextOrientAndJustifyParmeters
* Set m_SchematicOrientation, and initialize
* m_orient,m_HJustified and m_VJustified, according to the value of
* m_SchematicOrientation
......@@ -305,7 +313,8 @@ public:
*/
virtual void SetSchematicTextOrientation( int aSchematicOrientation );
/** function GetSchematicTextOffset (virtual)
/**
* Function GetSchematicTextOffset (virtual)
* @return the offset between the SCH_TEXT position and the text itself
* position
* This offset depend on orientation, and the type of text
......@@ -333,7 +342,8 @@ public:
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
/** Function HitTest
/**
* Function HitTest
* @return true if the point aPosRef is within item area
* @param aPosRef = a wxPoint to test
*/
......@@ -348,7 +358,8 @@ public:
*/
EDA_Rect GetBoundingBox();
/** function CreateGraphicShape (virual)
/**
* Function CreateGraphicShape (virual)
* Calculates the graphic shape (a polygon) associated to the text
* @param aCorner_list = a buffer to fill with polygon corners coordinates
* @param aPos = Position of the shape
......@@ -384,7 +395,8 @@ public:
}
/** function SetTextOrientAndJustifyParmeters
/**
* Function SetTextOrientAndJustifyParmeters
* Set m_SchematicOrientation, and initialize
* m_orient,m_HJustified and m_VJustified, according to the value of
* m_SchematicOrientation
......@@ -398,7 +410,8 @@ public:
*/
virtual void SetSchematicTextOrientation( int aSchematicOrientation );
/** function GetSchematicTextOffset (virtual)
/**
* Function GetSchematicTextOffset (virtual)
* @return the offset between the SCH_TEXT position and the text itself
* position
* This offset depend on orientation, and the type of text
......@@ -407,7 +420,8 @@ public:
*/
virtual wxPoint GetSchematicTextOffset();
/** function CreateGraphicShape
/**
* Function CreateGraphicShape
* Calculates the graphic shape (a polygon) associated to the text
* @param aCorner_list = a buffer to fill with polygon corners coordinates
* @param Pos = Postion of the shape
......@@ -434,7 +448,8 @@ public:
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
/** Function HitTest
/**
* Function HitTest
* @return true if the point aPosRef is within item area
* @param aPosRef = a wxPoint to test
*/
......
......@@ -133,7 +133,8 @@ public:
int ReturnUsedDcodeNumber();
void ResetDefaultValues();
/** function GetLayerParams
/**
* Function GetLayerParams
* @return the current layers params
*/
GERBER_LAYER& GetLayerParams()
......@@ -142,14 +143,16 @@ public:
}
/** function ReportMessage
/**
* Function ReportMessage
* Add a message (a string) in message list
* for instance when reading a Gerber file
* @param aMessage = the straing to add in list
*/
void ReportMessage( const wxString aMessage );
/** function ClearMessageList
/**
* Function ClearMessageList
* Clear the message list
* Call it before reading a Gerber file
*/
......@@ -160,12 +163,14 @@ public:
*/
void InitToolTable();
/** function ReadXYCoord
/**
* Function ReadXYCoord
* Returns the current coordinate type pointed to by XnnYnn Text (XnnnnYmmmm)
*/
wxPoint ReadXYCoord( char*& Text );
/** function ReadIJCoord
/**
* Function ReadIJCoord
* Returns the current coordinate type pointed to by InnJnn Text (InnnnJmmmm)
* These coordinates are relative, so if coordinate is absent, it's value
* defaults to 0
......@@ -229,7 +234,8 @@ public:
*/
APERTURE_MACRO* FindApertureMacro( const APERTURE_MACRO& aLookup );
/** Function StepAndRepeatItem
/**
* Function StepAndRepeatItem
* Gerber format has a command Step an Repeat
* This function must be called when reading a gerber file and
* after creating a new gerber item that must be repeated
......@@ -238,7 +244,8 @@ public:
*/
void StepAndRepeatItem( const GERBER_DRAW_ITEM& aItem );
/** Function DisplayImageInfo
/**
* Function DisplayImageInfo
* has knowledge about the frame and how and where to put status information
* about this object into the frame's message panel.
* Display info about Image Parameters.
......
......@@ -107,7 +107,8 @@ public:
/* Draw functions: */
/** function DrawBasicShape
/**
* Function DrawBasicShape
* Draw the primitive shape for flashed items.
* @param aParent = the parent GERBER_DRAW_ITEM which is actually drawn
* @param aClipBox = DC clip box (NULL is no clip)
......@@ -134,7 +135,8 @@ public:
private:
/** function ConvertShapeToPolygon
/**
* Function ConvertShapeToPolygon
* convert a shape to an equivalent polygon.
* Arcs and circles are approximated by segments
* Useful when a shape is not a graphic primitive (shape with hole,
......@@ -155,7 +157,8 @@ struct APERTURE_MACRO
wxString name; ///< The name of the aperture macro
AM_PRIMITIVES primitives; ///< A sequence of AM_PRIMITIVEs
/** function DrawApertureMacroShape
/**
* Function DrawApertureMacroShape
* Draw the primitive shape for flashed items.
* When an item is flashed, this is the shape of the item
* @param aParent = the parent GERBER_DRAW_ITEM which is actually drawn
......
......@@ -120,7 +120,8 @@ public:
return m_LayerNegative;
}
/** function SetLayerParameters
/**
* Function SetLayerParameters
* Initialize parameters from Image and Layer parameters
* found in the gerber file:
* m_UnitsMetric,
......@@ -194,14 +195,16 @@ public:
int aDrawMode,
const wxPoint& aOffset = ZeroOffset );
/** function ConvertSegmentToPolygon
/**
* Function ConvertSegmentToPolygon
* convert a line to an equivalent polygon.
* Useful when a line is plotted using a rectangular pen.
* In this case, the usual segment plot function cannot be used
*/
void ConvertSegmentToPolygon( );
/** function DrawGbrPoly
/**
* Function DrawGbrPoly
* a helper function used id ::Draw to draw the polygon stored in m_PolyCorners
*/
void DrawGbrPoly( EDA_Rect* aClipBox,
......
......@@ -77,7 +77,8 @@ public:
void OnLayerVisible( int aLayer, bool isVisible, bool isFinal );
void OnRenderColorChange( int aId, int aColor );
void OnRenderEnable( int aId, bool isEnabled );
/** Function SetLayersManagerTabsText
/**
* Function SetLayersManagerTabsText
* Update the layer manager tabs labels
* Useful when changing Language or to set labels to a non default value
*/
......
......@@ -189,7 +189,8 @@ public:
*/
static const wxChar* ShowApertureType( APERTURE_T aType );
/** function DrawFlashedShape
/**
* Function DrawFlashedShape
* Draw the dcode shape for flashed items.
* When an item is flashed, the DCode shape is the shape of the item
* @param aParent = the GERBER_DRAW_ITEM being drawn
......@@ -204,7 +205,8 @@ public:
EDA_Rect* aClipBox, wxDC* aDC, int aColor, int aAltColor,
wxPoint aShapePos, bool aFilledShape );
/** function DrawFlashedPolygon
/**
* Function DrawFlashedPolygon
* a helper function used id ::Draw to draw the polygon stored ion m_PolyCorners
* Draw some Apertures shapes when they are defined as filled polygons.
* APT_POLYGON is always a polygon, but some complex shapes are also converted to
......@@ -220,7 +222,8 @@ public:
EDA_Rect* aClipBox, wxDC* aDC, int aColor,
bool aFilled, const wxPoint& aPosition );
/** function ConvertShapeToPolygon
/**
* Function ConvertShapeToPolygon
* convert a shape to an equivalent polygon.
* Arcs and circles are approximated by segments
* Useful when a shape is not a graphic primitive (shape with hole,
......
......@@ -63,7 +63,8 @@ public:
void Update_config();
void OnCloseWindow( wxCloseEvent& Event );
/** function ReportMessage
/**
* Function ReportMessage
* Add a message (a string) in message list
* for instance when reading a Gerber file
* @param aMessage = the straing to add in list
......@@ -72,7 +73,8 @@ public:
{
m_Messages.Add( aMessage );
}
/** function ClearMessageList
/**
* Function ClearMessageList
* Clear the message list
* Call it before reading a Gerber file
*/
......@@ -81,24 +83,28 @@ public:
m_Messages.Clear( );
}
/** Function IsGridVisible() , virtual
/**
* Function IsGridVisible() , virtual
* @return true if the grid must be shown
*/
virtual bool IsGridVisible();
/** Function SetGridVisibility() , virtual
/**
* Function SetGridVisibility() , virtual
* It may be overloaded by derived classes
* if you want to store/retrieve the grid visiblity in configuration.
* @param aVisible = true if the grid must be shown
*/
virtual void SetGridVisibility(bool aVisible);
/** Function GetGridColor() , virtual
/**
* Function GetGridColor() , virtual
* @return the color of the grid
*/
virtual int GetGridColor();
/** Function SetGridColor() , virtual
/**
* Function SetGridColor() , virtual
* @param aColor = the new color of the grid
*/
virtual void SetGridColor(int aColor);
......@@ -178,7 +184,8 @@ public:
*/
void syncLayerBox();
/** function UpdateTitleAndInfo
/**
* Function UpdateTitleAndInfo
* displays the short filename (if exists) of the selected layer
* on the caption of the main gerbview window
* and some other parameters
......@@ -210,7 +217,8 @@ public:
*/
virtual void SaveSettings();
/** function SetLanguage
/**
* Function SetLanguage
* called on a language menu selection
*/
virtual void SetLanguage( wxCommandEvent& event );
......@@ -279,13 +287,15 @@ public:
void InstallDrillFrame( wxCommandEvent& event );
void ToPostProcess( wxCommandEvent& event );
/** Function ToPlotter
/**
* Function ToPlotter
* Open a dialog frame to create plot and drill files
* relative to the current board
*/
void ToPlotter( wxCommandEvent& event );
/** Function ToPrinter
/**
* Function ToPrinter
* Open a dialog frame to print layers
*/
void ToPrinter( wxCommandEvent& event );
......@@ -370,7 +380,8 @@ public:
UndoRedoOpType aTypeCommand = UR_UNSPECIFIED,
const wxPoint& aTransformPoint = wxPoint(0,0) ) { }
/** Function SaveCopyInUndoList (overloaded).
/**
* Function SaveCopyInUndoList (overloaded).
* Creates a new entry in undo list of commands.
* add a list of pickers to handle a list of items
* @param aItemsList = the list of items modified by the command to undo
......
......@@ -83,7 +83,8 @@ public: WinEDA_App();
virtual void MacOpenFile(const wxString &fileName);
/** Function InitEDA_Appl
/**
* Function InitEDA_Appl
* initialize some general parameters
* - Default paths (help, libs, bin)and configuration files names
* - Language and locale
......@@ -97,7 +98,8 @@ public: WinEDA_App();
bool SetLanguage( bool first_time = FALSE );
/** Function AddMenuLanguageList
/**
* Function AddMenuLanguageList
*
* Create menu list for language choice, and add it as submenu to a main
* menu
......@@ -113,7 +115,8 @@ public: WinEDA_App();
void SetLanguagePath( void );
void InitOnLineHelp();
/** Function GetSettings
/**
* Function GetSettings
* Get application settings
* @param aReopenLastUsedDirectory = true to switch to last opened
* directory, false to use current CWD
......@@ -130,7 +133,8 @@ public: WinEDA_App();
const wxString& GroupName,
PARAM_CFG_ARRAY& params );
/** Function SaveCurrentSetupValues()
/**
* Function SaveCurrentSetupValues()
* Save the current setup values in m_EDA_Config
* saved parameters are parameters that have the .m_Setup member set to
* true
......@@ -139,7 +143,8 @@ public: WinEDA_App();
void SaveCurrentSetupValues( PARAM_CFG_BASE** aList );
void SaveCurrentSetupValues( PARAM_CFG_ARRAY& List );
/** Function ReadCurrentSetupValues()
/**
* Function ReadCurrentSetupValues()
* Raed the current setup values previously saved, from m_EDA_Config
* saved parameters are parameters that have the .m_Setup member set to
* true
......@@ -207,14 +212,16 @@ public: WinEDA_App();
wxString ReturnFilenameWithRelativePathInLibPath(
const wxString& aFullFilename );
/** Function RemoveLibraryPath
/**
* Function RemoveLibraryPath
* Removes the given path(s) from the library path list
* @param aPaths = path or path list to remove. paths must be separated by
* ";"
*/
void RemoveLibraryPath( const wxString& aPaths );
/** Function InsertLibraryPath
/**
* Function InsertLibraryPath
* insert path(s) int lib paths list.
* @param aPaths = path or path list to add. paths must be separated by ";"
* @param aIndex = insertion point
......
......@@ -236,7 +236,8 @@ public:
*/
EDA_Rect& Inflate( int aDelta );
/** Function Merge
/**
* Function Merge
* Modify Position and Size of this in order to contain the given rect
* mainly used to calculate bounding boxes
* @param aRect = given rect to merge with this
......@@ -586,7 +587,8 @@ public:
int GetLength() const { return m_Text.Length(); };
/** Function Draw
/**
* Function Draw
* @param aPanel = the current DrawPanel
* @param aDC = the current Device Context
* @param aOffset = draw offset (usually (0,0))
......@@ -603,7 +605,8 @@ public:
private:
/** Function DrawOneLineOfText
/**
* Function DrawOneLineOfText
* Draw a single text line.
* Used to draw each line of this EDA_TextStruct, that can be multiline
* @param aPanel = the current DrawPanel
......@@ -650,7 +653,8 @@ public:
*/
int LenSize( const wxString& aLine ) const;
/** Function GetTextBox
/**
* Function GetTextBox
* useful in multiline texts to calculate the full text or a line area (for
* zones filling, locate functions....)
* @return the rect containing the line of text (i.e. the position and the
......@@ -663,7 +667,8 @@ public:
*/
EDA_Rect GetTextBox( int aLine = -1 );
/** Function GetInterline
/**
* Function GetInterline
* return the distance between 2 text lines
* has meaning only for multiline texts
*/
......
......@@ -76,13 +76,15 @@ public:
BLOCK_SELECTOR();
~BLOCK_SELECTOR();
/** function InitData
/**
* Function InitData
* Init the initial values of a BLOCK_SELECTOR, before starting a block
*command
*/
void InitData( WinEDA_DrawPanel* Panel, const wxPoint& startpos );
/** Function SetMessageBlock
/**
* Function SetMessageBlock
* Displays the type of block command in the status bar of the window
*/
void SetMessageBlock( WinEDA_DrawFrame* frame );
......@@ -92,13 +94,15 @@ public:
int aDrawMode,
int aColor );
/** Function PushItem
/**
* Function PushItem
* Add aItem to the list of items
* @param aItem = an ITEM_PICKER to add to the list
*/
void PushItem( ITEM_PICKER& aItem );
/** Function ClearListAndDeleteItems
/**
* Function ClearListAndDeleteItems
* delete only the list of EDA_BaseStruct * pointers, AND the data printed
* by m_Item
*/
......@@ -111,7 +115,8 @@ public:
return m_ItemsSelection.GetCount();
}
/** Function SetLastCursorPosition
/**
* Function SetLastCursorPosition
* sets m_BlockLastCursorPosition
* @param aPosition = new position
**/
......
......@@ -167,7 +167,8 @@ public:
wxSize ReturnPageSize( void );
virtual int GetInternalUnits( void );
/** Function CursorRealPosition
/**
* Function CursorRealPosition
* @return the position in user units of location ScreenPos
* @param ScreenPos = the screen (in pixel) position co convert
*/
......@@ -185,7 +186,8 @@ public:
/* general Undo/Redo command control */
/** function ClearUndoORRedoList (virtual).
/**
* Function ClearUndoORRedoList (virtual).
* this function must remove the aItemCount old commands from aList
* and delete commands, pickers and picked items if needed
* Because picked items must be deleted only if they are not in use, this
......@@ -198,14 +200,16 @@ public:
*/
virtual void ClearUndoORRedoList( UNDO_REDO_CONTAINER& aList, int aItemCount = -1 ) = 0;
/** Function ClearUndoRedoList
/**
* Function ClearUndoRedoList
* clear undo and redo list, using ClearUndoORRedoList()
* picked items are deleted by ClearUndoORRedoList() according to their
* status
*/
virtual void ClearUndoRedoList();
/** function PushCommandToUndoList
/**
* Function PushCommandToUndoList
* add a command to undo in undo list
* delete the very old commands when the max count of undo commands is
* reached
......@@ -213,7 +217,8 @@ public:
*/
virtual void PushCommandToUndoList( PICKED_ITEMS_LIST* aItem );
/** function PushCommandToRedoList
/**
* Function PushCommandToRedoList
* add a command to redo in redo list
* delete the very old commands when the max count of redo commands is
* reached
......@@ -258,7 +263,8 @@ public:
//----<zoom stuff>---------------------------------------------------------
/** Function GetScalingFactor
/**
* Function GetScalingFactor
* @return the the current scale used to draw items on screen
* draw coordinates are user coordinates * GetScalingFactor( )
*/
......@@ -268,13 +274,15 @@ public:
}
/** Function SetScalingFactor
/**
* Function SetScalingFactor
* @param the the current scale used to draw items on screen
* draw coordinates are user coordinates * GetScalingFactor( )
*/
void SetScalingFactor( double aScale );
/** Function GetZoom
/**
* Function GetZoom
* @return the current zoom factor
* Note: the zoom factor is NOT the scaling factor
* the scaling factor is m_ZoomScalar * GetZoom()
......
......@@ -280,7 +280,8 @@ public:
*/
NETCLASS* GetNetClass() const;
/** function GetNetClassName
/**
* Function GetNetClassName
* @return the Net Class name of this item
*/
wxString GetNetClassName( ) const;
......
......@@ -63,7 +63,7 @@ public:
#ifdef USE_WX_OVERLAY
// MAC Uses overlay to workaround the wxINVERT and wxXOR miss
wxOverlay m_overlay;
wxOverlay m_overlay;
#endif
/* Cursor management (used in editing functions) */
......@@ -89,7 +89,8 @@ public:
void OnPaint( wxPaintEvent& event );
void OnSize( wxSizeEvent& event );
/** Function DrawBackGround
/**
* Function DrawBackGround
* @param DC = current Device Context
* Draws (if allowed) :
* the grid
......@@ -98,7 +99,8 @@ public:
*/
void DrawBackGround( wxDC* DC );
/** Function DrawGrid
/**
* Function DrawGrid
* @param DC = current Device Context
* draws the grid
* - the grid is drawn only if the zoom level allows a good visibility
......@@ -106,7 +108,8 @@ public:
*/
void DrawGrid( wxDC* DC );
/** function DrawAuxiliaryAxis
/**
* Function DrawAuxiliaryAxis
* Draw the Auxiliary Axis, used in pcbnew which as origin coordinates
* for gerber and excellon files
* @param DC = current Device Context
......@@ -159,13 +162,15 @@ public:
void SetBoundaryBox( wxDC* dc );
void ReDraw( wxDC* DC, bool erasebg = TRUE );
/** Function CursorRealPosition
/**
* Function CursorRealPosition
* @return the position in user units of location ScreenPos
* @param ScreenPos = the screen (in pixel) position to convert
*/
wxPoint CursorRealPosition( const wxPoint& ScreenPos );
/** Function CursorScreenPosition
/**
* Function CursorScreenPosition
* @return the curseur current position in pixels in the screen draw area
*/
wxPoint CursorScreenPosition();
......
......@@ -76,7 +76,8 @@ public:
}
/** Function SetData
/**
* Function SetData
* initialize all data in item
* @param aErrorCode = error code
* @param aMainText = the text concerning the schematic or board item
......@@ -91,7 +92,8 @@ public:
m_hasSecondItem = false;
}
/** Function SetData
/**
* Function SetData
* initialize all data in item
* @param aErrorCode = error code
* @param aMainText = the first text (main text) concerning the main schematic or board item
......@@ -111,7 +113,8 @@ public:
m_hasSecondItem = true;
}
/** Function SetAuxiliaryData
/**
* Function SetAuxiliaryData
* initialize data for the second (auxiliary) item
* @param aAuxiliaryText = the second text (main text) concerning the second schematic or board item
* @param aAuxiliaryPos = position the second item
......
......@@ -51,7 +51,8 @@ public:
~MARKER_BASE();
/** Function DrawMarker
/**
* Function DrawMarker
*/
void DrawMarker( WinEDA_DrawPanel* panel, wxDC* DC, int DrawMode, const wxPoint& offset );
......@@ -66,7 +67,8 @@ public:
}
/** Function SetColor
/**
* Function SetColor
* Set the color of this marker
*/
void SetColor( EDA_Colors aColor )
......@@ -75,7 +77,8 @@ public:
}
/** Function to set/get error levels (warning, fatal ..)
/**
* Function to set/get error levels (warning, fatal ..)
* this value is stored in m_MarkerType
*/
void SetErrorLevel( int aErrorLevel )
......@@ -163,7 +166,8 @@ public:
}
/** Function DisplayMarkerInfo()
/**
* Function DisplayMarkerInfo()
* Displays the full info of this marker, in a HTML window
*/
void DisplayMarkerInfo(WinEDA_DrawFrame * aFrame);
......
......@@ -50,7 +50,8 @@ public:
// use BASE_SCREEN::PushCommandToUndoList( PICKED_ITEMS_LIST* aItem )
// use BASE_SCREEN::PushCommandToRedoList( PICKED_ITEMS_LIST* aItem )
/** Function ClearUndoORRedoList
/**
* Function ClearUndoORRedoList
* free the undo or redo list from List element
* Wrappers are deleted.
* datas pointed by wrappers are deleted if not in use in schematic
......
......@@ -71,7 +71,8 @@ public:
// use BASE_SCREEN::PushCommandToUndoList( PICKED_ITEMS_LIST* aItem )
// use BASE_SCREEN::PushCommandToRedoList( PICKED_ITEMS_LIST* aItem )
/** Function ClearUndoORRedoList
/**
* Function ClearUndoORRedoList
* free the undo or redo list from List element
* Wrappers are deleted.
* data pointed by wrappers are deleted if not in use in schematic
......
......@@ -119,18 +119,21 @@ public:
*/
ITEM_PICKER PopItem();
/** Function ClearItemsList
/**
* Function ClearItemsList
* delete only the list of pickers, NOT the picked data itself
*/
void ClearItemsList();
/** Function ClearListAndDeleteItems
/**
* Function ClearListAndDeleteItems
* delete the list of pickers, AND the data pointed
* by m_PickedItem or m_PickedItemLink, according to the type of undo/redo command recorded
*/
void ClearListAndDeleteItems();
/** function GetCount()
/**
* Function GetCount()
* @return the count of pickers stored in this list
*/
unsigned GetCount() const
......@@ -138,7 +141,8 @@ public:
return m_ItemsList.size();
}
/** function ReversePickersListOrder()
/**
* Function ReversePickersListOrder()
* reverses the order of pickers stored in this list
* Useful when pop a list from Undo to Redo (and vice-versa)
* because sometimes undo (or redo) a command needs to keep the
......@@ -148,7 +152,8 @@ public:
void ReversePickersListOrder();
/** function GetItemWrapper
/**
* Function GetItemWrapper
* @return the picker of a picked item
* @param aIdx = index of the picker in the picked list
* if this picker does not exist, a picker is returned,
......@@ -156,40 +161,46 @@ public:
*/
ITEM_PICKER GetItemWrapper( unsigned int aIdx );
/** function GetPickedItem
/**
* Function GetPickedItem
* @return a pointer to the picked item
* @param aIdx = index of the picked item in the picked list
*/
EDA_BaseStruct* GetPickedItem( unsigned int aIdx );
/** function GetPickedItemLink
/**
* Function GetPickedItemLink
* @return link of the picked item, or null if does not exist
* @param aIdx = index of the picked item in the picked list
*/
EDA_BaseStruct* GetPickedItemLink( unsigned int aIdx );
/** function GetPickedItemStatus
/**
* Function GetPickedItemStatus
* @return the type of undo/redo opertaion associated to the picked item,
* or UR_UNSPECIFIED if does not exist
* @param aIdx = index of the picked item in the picked list
*/
UndoRedoOpType GetPickedItemStatus( unsigned int aIdx );
/** function GetPickerFlags
/**
* Function GetPickerFlags
* return the value of the picker flag
* @param aIdx = index of the picker in the picked list
* @return the value stored in the picker, if the picker exists, or 0 if does not exist
*/
int GetPickerFlags( unsigned aIdx );
/** function SetPickedItem
/**
* Function SetPickedItem
* @param aItem = a pointer to the item to pick
* @param aIdx = index of the picker in the picked list
* @return true if the pixker exists, or false if does not exist
*/
bool SetPickedItem( EDA_BaseStruct* aItem, unsigned aIdx );
/** function SetPickedItem
/**
* Function SetPickedItem
* @param aItem = a pointer to the item to pick
* @param aStatus = the type of undo/redo operation associated to the item to pick
* @param aIdx = index of the picker in the picked list
......@@ -197,7 +208,8 @@ public:
*/
bool SetPickedItem( EDA_BaseStruct* aItem, UndoRedoOpType aStatus, unsigned aIdx );
/** function SetPickedItemLink
/**
* Function SetPickedItemLink
* Set the link associated to a given picked item
* @param aLink = the link to the item associated to the picked item
* @param aIdx = index of the picker in the picked list
......@@ -205,7 +217,8 @@ public:
*/
bool SetPickedItemLink( EDA_BaseStruct* aLink, unsigned aIdx );
/** function SetPickedItemStatus
/**
* Function SetPickedItemStatus
* Set the type of undo/redo operation for a given picked item
* @param aStatus = the type of undo/redo operation associated to the picked item
* @param aIdx = index of the picker in the picked list
......@@ -213,7 +226,8 @@ public:
*/
bool SetPickedItemStatus( UndoRedoOpType aStatus, unsigned aIdx );
/** function SetPickerFlags
/**
* Function SetPickerFlags
* Set the flags of the picker (usually to the picked item m_Flags value)
* @param aFlags = the value to save in picker
* @param aIdx = index of the picker in the picked list
......@@ -221,14 +235,16 @@ public:
*/
bool SetPickerFlags( int aFlags, unsigned aIdx );
/** function RemovePicker
/**
* Function RemovePicker
* remove one entry (one picker) from the list of picked items
* @param aIdx = index of the picker in the picked list
* @return true if ok, or false if did not exist
*/
bool RemovePicker( unsigned aIdx );
/** Function CopyList
/**
* Function CopyList
* copy all data from aSource
* Items picked are not copied. just pointer on them are copied
*/
......
......@@ -12,30 +12,33 @@ Subclass of DIALOG_DISPLAY_HTML_TEXT_BASE, which is generated by wxFormBuilder.
class DIALOG_LOAD_ERROR : public DIALOG_DISPLAY_HTML_TEXT_BASE
{
protected:
// Handlers for DIALOG_LOAD_ERROR_BASE events.
void OnCloseButtonClick( wxCommandEvent& event );
// Handlers for DIALOG_LOAD_ERROR_BASE events.
void OnCloseButtonClick( wxCommandEvent& event );
public:
/** Constructor */
DIALOG_LOAD_ERROR( wxWindow* parent );
/** Constructor */
DIALOG_LOAD_ERROR( wxWindow* parent );
/** Function ListSet
/**
* Function ListSet
* Add a list of items.
* @param list = a string containing items. Items are separated by '\n'
*/
void ListSet(const wxString &list);
/** Function ListSet
void ListSet(const wxString &list);
/**
* Function ListSet
* Add a list of items.
* @param list = a wxArrayString containing items.
*/
void ListSet(const wxArrayString &list);
void ListSet(const wxArrayString &list);
void ListClear();
/** Function MessageSet
void ListClear();
/**
* Function MessageSet
* Add a message (in bold) to message list.
* @param message = the message
*/
void MessageSet(const wxString &message);
void MessageSet(const wxString &message);
};
#endif // __dialog_load_error_h_
......@@ -45,7 +45,8 @@ public:
}
/** function GetPlotterType()
/**
* Function GetPlotterType()
* @return the format of the plot file
*/
PlotFormat GetPlotterType()
......
......@@ -85,7 +85,8 @@ public:
*/
void SetLayer( int aLayer ) { m_Layer = aLayer; }
/** Function GetPenSize virtual pure
/**
* Function GetPenSize virtual pure
* @return the size of the "pen" that be used to draw or plot this item
*/
virtual int GetPenSize( ) = 0;
......
......@@ -193,7 +193,8 @@ public:
MODULE* Copie_Module( MODULE* module );
/** Function Save_Module_In_Library
/**
* Function Save_Module_In_Library
* Save in an existing library a given footprint
* @param aLibName = name of the library to use
* @param aModule = the given footprint
......@@ -214,7 +215,8 @@ public:
bool NewModulesOnly );
MODULE* GetModuleByName();
/** Function OnModify()
/**
* Function OnModify()
* Virtual
* Must be called after a change
* in order to set the "modify" flag of the current screen
......@@ -225,7 +227,8 @@ public:
virtual void OnModify( );
// Modules (footprints)
/** Function Create_1_Module
/**
* Function Create_1_Module
* Creates a new module or footprint : A new module contains 2 texts :
* First = REFERENCE
* Second = VALUE: "VAL**"
......@@ -257,7 +260,8 @@ public:
wxDC* DC );
void AddPad( MODULE* Module, bool draw );
/** Function DeletePad
/**
* Function DeletePad
* Delete the pad aPad.
* Refresh the modified screen area
* Refresh modified parameters of the parent module (bounding box, last date)
......@@ -276,7 +280,8 @@ public:
// loading footprints
/** function Get_Librairie_Module
/**
* Function Get_Librairie_Module
*
* Read active libraries or one library to find and load a given module
* If found the module is linked to the tail of linked list of modules
......@@ -291,7 +296,8 @@ public:
const wxString& aModuleName,
bool aDisplayMessageError );
/** Function Select_1_Module_From_List
/**
* Function Select_1_Module_From_List
* Display a list of modules found in active libraries or a given library
* @param aLibraryFullFilename = library to list (if aLibraryFullFilename
* == void, list all modules)
......@@ -354,7 +360,8 @@ public:
int masque_layer,
GRTraceMode trace_mode );
/** function PlotDrillMark
/**
* Function PlotDrillMark
* Draw a drill mark for pads and vias.
* Must be called after all drawings, because it
* redraw the drill mark on a pad or via, as a negative (i.e. white) shape
......@@ -371,7 +378,8 @@ public:
/* Functions relative to Undo/redo commands:
*/
/** Function SaveCopyInUndoList (virtual pure)
/**
* Function SaveCopyInUndoList (virtual pure)
* Creates a new entry in undo list of commands.
* add a picker to handle aItemToCopy
* @param aItemToCopy = the board item modified by the command to undo
......@@ -384,7 +392,8 @@ public:
const wxPoint& aTransformPoint =
wxPoint( 0, 0 ) ) = 0;
/** Function SaveCopyInUndoList (virtual pure, overloaded).
/**
* Function SaveCopyInUndoList (virtual pure, overloaded).
* Creates a new entry in undo list of commands.
* add a list of pickers to handle a list of items
* @param aItemsList = the list of items modified by the command to undo
......
......@@ -179,7 +179,8 @@ public:
}
/** Function OnModify()
/**
* Function OnModify()
* Must be called after a schematic change
* in order to set the "modify" flag of the current screen
* and update the date in frame reference
......@@ -238,7 +239,8 @@ public:
/* netlist generation */
void BuildNetListBase();
/** Function CreateNetlist
/**
* Function CreateNetlist
* Create a netlist file:
* build netlist info
* test issues
......@@ -254,7 +256,8 @@ public:
const wxString& aFullFileName,
bool aUse_netnames );
/** function WriteNetListFile
/**
* Function WriteNetListFile
* Create the netlist file. Netlist info must be existing
* @param aFormat = netlist format (NET_TYPE_PCBNEW ...)
* @param aFullFileName = full netlist file name
......@@ -281,7 +284,8 @@ public:
void InstallPreviousSheet();
void InstallNextScreen( SCH_SHEET* Sheet );
/** Function GetUniqueFilenameForCurrentSheet
/**
* Function GetUniqueFilenameForCurrentSheet
* @return a filename that can be used in plot and print functions
* for the current screen and sheet path.
* This filename is unique and must be used instead of the screen filename
......@@ -407,7 +411,8 @@ private:
void OnUpdateHiddenPins( wxUpdateUIEvent& event );
void OnUpdateBusOrientation( wxUpdateUIEvent& event );
/** function SetLanguage
/**
* Function SetLanguage
* called on a language menu selection
*/
void SetLanguage( wxCommandEvent& event );
......@@ -461,7 +466,8 @@ private:
public:
bool EditSheet( SCH_SHEET* Sheet, wxDC* DC );
/** Function UpdateSheetNumberAndDate
/**
* Function UpdateSheetNumberAndDate
* Set a sheet number, the sheet count for sheets in the whole schematic
* and update the date in all screens
*/
......@@ -513,7 +519,8 @@ private:
/* Undo - redo */
public:
/** Function SaveCopyInUndoList.
/**
* Function SaveCopyInUndoList.
* Creates a new entry in undo list of commands.
* add a picker to handle aItemToCopy
* @param aItemToCopy = the schematic item modified by the command to undo
......@@ -525,7 +532,8 @@ public:
UndoRedoOpType aTypeCommand,
const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
/** Function SaveCopyInUndoList (overloaded).
/**
* Function SaveCopyInUndoList (overloaded).
* Creates a new entry in undo list of commands.
* add a list of pickers to handle a list of items
* @param aItemsList = the list of items modified by the command to undo
......@@ -539,7 +547,8 @@ public:
private:
/** Function PutDataInPreviousState()
/**
* Function PutDataInPreviousState()
* Used in undo or redo command.
* Put data pointed by List in the previous state, i.e. the state
* memorized by List
......@@ -549,7 +558,8 @@ private:
*/
void PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRedoCommand );
/** Function GetSchematicFromRedoList
/**
* Function GetSchematicFromRedoList
* Redo the last edition:
* - Save the current schematic in Undo list
* - Get an old version of the schematic from Redo list
......@@ -557,7 +567,8 @@ private:
*/
void GetSchematicFromRedoList( wxCommandEvent& event );
/** Function GetSchematicFromUndoList
/**
* Function GetSchematicFromUndoList
* Undo the last edition:
* - Save the current schematic in Redo list
* - Get an old version of the schematic from Undo list
......
......@@ -141,13 +141,15 @@ public:
void OnQuit( wxCommandEvent & WXUNUSED(event) );
/** Function ToPlotter
/**
* Function ToPlotter
* Open a dialog frame to create plot and drill files
* relative to the current board
*/
void ToPlotter( wxCommandEvent& event );
/** function ToPrinter
/**
* Function ToPrinter
* Install the print dialog
*/
void ToPrinter( wxCommandEvent& event );
......@@ -167,24 +169,28 @@ public:
void GetKicadAbout( wxCommandEvent& event );
/** Function IsGridVisible() , virtual
/**
* Function IsGridVisible() , virtual
* @return true if the grid must be shown
*/
virtual bool IsGridVisible();
/** Function SetGridVisibility() , virtual
/**
* Function SetGridVisibility() , virtual
* It may be overloaded by derived classes
* if you want to store/retrieve the grid visibility in configuration.
* @param aVisible = true if the grid must be shown
*/
virtual void SetGridVisibility(bool aVisible);
/** Function GetGridColor() , virtual
/**
* Function GetGridColor() , virtual
* @return the color of the grid
*/
virtual int GetGridColor();
/** Function SetGridColor() , virtual
/**
* Function SetGridColor() , virtual
* @param aColor = the new color of the grid
*/
virtual void SetGridColor(int aColor);
......@@ -254,7 +260,8 @@ public:
*/
void SetLastNetListRead( const wxString& aNetListFile );
/** Function OnHotKey.
/**
* Function OnHotKey.
* ** Commands are case insensitive **
* Some commands are relatives to the item under the mouse cursor
* @param aDC = current device context
......@@ -265,7 +272,8 @@ public:
int aHotkeyCode,
EDA_BaseStruct* aItem );
/** Function OnHotkeyDeleteItem
/**
* Function OnHotkeyDeleteItem
* Delete the item found under the mouse cursor
* Depending on the current active tool::
* Tool track
......@@ -280,7 +288,8 @@ public:
bool OnHotkeyEditItem( int aIdCommand );
/** Function OnHotkeyMoveItem
/**
* Function OnHotkeyMoveItem
* Moves or drag the item (footprint, track, text .. ) found under the mouse cursor
* Only a footprint or a track can be dragged
* @param aIdCommand = the hotkey command id
......@@ -288,7 +297,8 @@ public:
*/
bool OnHotkeyMoveItem( int aIdCommand );
/** Function OnHotkeyRotateItem
/**
* Function OnHotkeyRotateItem
* Rotate the item (text or footprint) found under the mouse cursor
* @param aIdCommand = the hotkey command id
* @return true if an item was moved
......@@ -357,7 +367,8 @@ public:
void Show3D_Frame( wxCommandEvent& event );
void GeneralControle( wxDC* DC, wxPoint Mouse );
/** function ShowDesignRulesEditor
/**
* Function ShowDesignRulesEditor
* Display the Design Rules Editor.
*/
void ShowDesignRulesEditor( wxCommandEvent& event );
......@@ -397,7 +408,8 @@ public:
void OnSelectOptionToolbar( wxCommandEvent& event );
void ToolOnRightClick( wxCommandEvent& event );
/** Function SaveCopyInUndoList.
/**
* Function SaveCopyInUndoList.
* Creates a new entry in undo list of commands.
* add a picker to handle aItemToCopy
* @param aItemToCopy = the board item modified by the command to undo
......@@ -410,7 +422,8 @@ public:
const wxPoint& aTransformPoint =
wxPoint( 0, 0 ) );
/** Function SaveCopyInUndoList (overloaded).
/**
* Function SaveCopyInUndoList (overloaded).
* Creates a new entry in undo list of commands.
* add a list of pickers to handle a list of items
* @param aItemsList = the list of items modified by the command to undo
......@@ -423,7 +436,8 @@ public:
const wxPoint& aTransformPoint =
wxPoint( 0, 0 ) );
/** Function PutDataInPreviousState()
/**
* Function PutDataInPreviousState()
* Used in undo or redo command.
* Put data pointed by List in the previous state, i.e. the state memorized
* by List
......@@ -439,7 +453,8 @@ public:
bool aRedoCommand,
bool aRebuildRatsnet = true );
/** Function GetBoardFromRedoList
/**
* Function GetBoardFromRedoList
* Redo the last edition:
* - Save the current board in Undo list
* - Get an old version of the board from Redo list
......@@ -447,7 +462,8 @@ public:
*/
void GetBoardFromRedoList( wxCommandEvent& event );
/** Function GetBoardFromUndoList
/**
* Function GetBoardFromUndoList
* Undo the last edition:
* - Save the current board in Redo list
* - Get an old version of the board from Undo list
......@@ -533,7 +549,8 @@ public:
void OnFileHistory( wxCommandEvent& event );
void Files_io( wxCommandEvent& event );
/** Function LoadOnePcbFile
/**
* Function LoadOnePcbFile
* Load a Kicad board (.brd) file.
*
* @param aFileName - File name including path. If empty, a file dialog will
......@@ -564,7 +581,8 @@ public:
// BOARD handling
/** function Clear_Pcb()
/**
* Function Clear_Pcb()
* delete all and reinitialize the current board
* @param aQuery = true to prompt user for confirmation, false to
* initialize silently
......@@ -648,7 +666,8 @@ public:
MODULE* ListAndSelectModuleName();
/** Function ListNetsAndSelect
/**
* Function ListNetsAndSelect
* called by a command event
* displays the sorted list of nets in a dialog frame
* If a net is selected, it is highlighted
......@@ -681,7 +700,8 @@ public:
void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule );
/** function Exchange_Module
/**
* Function Exchange_Module
* Replaces OldModule by NewModule, using OldModule settings:
* position, orientation, pad netnames ...)
* OldModule is deleted or put in undo list.
......@@ -699,7 +719,8 @@ public:
// Board handling
void RemoveStruct( BOARD_ITEM* Item, wxDC* DC );
/** Function OnEditItemRequest
/**
* Function OnEditItemRequest
* Install the corresponding dialog editor for the given item
* @param DC = the current device context
* @param aItem = a pointer to the BOARD_ITEM to edit
......@@ -742,7 +763,8 @@ public:
void Delete_net( wxDC* DC, TRACK* Track );
void Remove_One_Track( wxDC* DC, TRACK* pt_segm );
/** function Reset_All_Tracks_And_Vias_To_Netclass_Values
/**
* Function Reset_All_Tracks_And_Vias_To_Netclass_Values
* Reset all tracks width and/or vias diameters and drill
* to their default Netclass value
* @param aTrack : bool true to modify tracks
......@@ -751,7 +773,8 @@ public:
bool Reset_All_Tracks_And_Vias_To_Netclass_Values( bool aTrack,
bool aVia );
/** function Change_Net_Tracks_And_Vias_Sizes
/**
* Function Change_Net_Tracks_And_Vias_Sizes
* Reset all tracks width and vias diameters and drill
* to their default Netclass value or current values
* @param aNetcode : the netcode of the net to edit
......@@ -761,7 +784,8 @@ public:
bool Change_Net_Tracks_And_Vias_Sizes( int aNetcode,
bool aUseNetclassValue );
/** Function Edit_Track_Width
/**
* 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
......@@ -770,7 +794,8 @@ public:
*/
void Edit_Track_Width( wxDC* DC, TRACK* Track );
/** Function Edit_TrackSegm_Width
/**
* Function Edit_TrackSegm_Width
* Modify one track segment width or one via diameter (using DRC control).
* @param DC = the current device context (can be NULL)
* @param aTrackItem = the track segment or via to modify
......@@ -790,7 +815,8 @@ public:
bool Add_45_degrees_Segment( wxDC* DC );
bool Genere_Pad_Connexion( wxDC* DC, int layer );
/** function EraseRedundantTrack
/**
* Function EraseRedundantTrack
* Called after creating a track
* Remove (if exists) the old track that have the same starting and the
* same ending point as the new created track
......@@ -807,7 +833,8 @@ public:
int aNewTrackSegmentsCount,
PICKED_ITEMS_LIST* aItemsListPicker );
/** Function SetTrackSegmentWidth
/**
* Function SetTrackSegmentWidth
* Modify one track segment width or one via diameter (using DRC control).
* Basic routine used by other routines when editing tracks or vias
* @param aTrackItem = the track segment or via to modify
......@@ -824,7 +851,8 @@ public:
// zone handling
/** Function Delete_Zone_Fill
/**
* Function Delete_Zone_Fill
* Remove the zone filling 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
......@@ -835,7 +863,8 @@ public:
void Delete_Zone_Fill( SEGZONE* Track, long aTimestamp = 0 );
/** Function Delete_LastCreatedCorner
/**
* Function Delete_LastCreatedCorner
* Used only while creating a new zone outline
* Remove and delete the current outline segment in progress
* @return 0 if no corner in list, or corner number
......@@ -857,7 +886,8 @@ public:
*/
bool End_Zone( wxDC* DC );
/** Function Fill_Zone()
/**
* Function Fill_Zone()
* Calculate the zone filling for the outline zone_container
* The zone outline is a frontier, and can be complex (with holes)
* The filling starts from starting points like pads, tracks.
......@@ -868,7 +898,8 @@ public:
*/
int Fill_Zone( ZONE_CONTAINER* zone_container, bool verbose = TRUE );
/** Function Fill_All_Zones()
/**
* Function Fill_All_Zones()
* Fill all zones on the board
* The old fillings are removed
* @param verbose = true to show error messages
......@@ -939,7 +970,8 @@ public:
*/
void Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_container );
/** Function Delete_Zone
/**
* Function Delete_Zone
* Remove the zone 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
......@@ -984,7 +1016,8 @@ public:
// netlist handling:
void InstallNetlistFrame( wxDC* DC, const wxPoint& pos );
/** Function ReadPcbNetlist
/**
* Function ReadPcbNetlist
* Update footprints (load missing footprints and delete on request extra
* footprints)
* Update connectivity info ( Net Name list )
......@@ -1017,7 +1050,8 @@ public:
bool aDeleteExtraFootprints,
bool aSelect_By_Timestamp );
/** Function RemoveMisConnectedTracks
/**
* Function RemoveMisConnectedTracks
* finds all track segments which are mis-connected (to more than one net).
* When such a bad segment is found, mark it as needing to be removed.
* and remove all tracks having at least one flagged segment.
......@@ -1031,12 +1065,14 @@ public:
// Autoplacement:
void AutoPlace( wxCommandEvent& event );
/** function OnOrientFootprints
/**
* Function OnOrientFootprints
* install the dialog box for the common Orient Footprints
*/
void OnOrientFootprints( void );
/** function ReOrientModules
/**
* Function ReOrientModules
* Set the orientation of footprints
* @param ModuleMask = mask (wildcard allowed) selection
* @param Orient = new orientation
......@@ -1083,7 +1119,8 @@ public:
void Begin_Self( wxDC* DC );
MODULE* Genere_Self( wxDC* DC );
/** function SetLanguage
/**
* Function SetLanguage
* called on a language menu selection
*/
virtual void SetLanguage( wxCommandEvent& event );
......
......@@ -129,13 +129,15 @@ public:
// Read/Save and Import/export hotkeys config
/** Function ReadHotkeyConfig
/**
* Function ReadHotkeyConfig
* Read configuration data and fill the current hotkey list with hotkeys
* @param aDescList = current hotkey list descr. to initialise.
*/
int ReadHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor* aDescList );
/** Function WriteHotkeyConfig
/**
* Function WriteHotkeyConfig
* Store the current hotkey list
* It is stored using the standard wxConfig mechanism or a file.
*
......@@ -148,7 +150,8 @@ public:
int WriteHotkeyConfig( struct Ki_HotkeyInfoSectionDescriptor* aDescList,
wxString * aFullFileName = NULL);
/** Function ReadHotkeyConfigFile
/**
* Function ReadHotkeyConfigFile
* Read an old configuration file (<file>.key) and fill the current hotkey list
* with hotkeys
* @param aFilename = file name to read.
......@@ -157,19 +160,22 @@ public:
int ReadHotkeyConfigFile( const wxString& Filename,
struct Ki_HotkeyInfoSectionDescriptor* aDescList );
/** Function ImportHotkeyConfigFromFile
/**
* Function ImportHotkeyConfigFromFile
* Prompt the user for an old hotkey file to read, and read it.
* @param aDescList = current hotkey list descr. to initialise.
*/
void ImportHotkeyConfigFromFile( struct Ki_HotkeyInfoSectionDescriptor* aDescList );
/** Function ExportHotkeyConfigToFile
/**
* Function ExportHotkeyConfigToFile
* Prompt the user for an old hotkey file to read, and read it.
* @param aDescList = current hotkey list descr. to initialise.
*/
void ExportHotkeyConfigToFile( struct Ki_HotkeyInfoSectionDescriptor* aDescList );
/** function SetLanguage
/**
* Function SetLanguage
* called on a language menu selection
* when using a derived function, do not forget to call this one
*/
......@@ -266,7 +272,8 @@ public:
virtual void OnHotKey( wxDC* DC, int hotkey,
EDA_BaseStruct* DrawStruct );
/** Function AddMenuZoomAndGrid (virtual)
/**
* Function AddMenuZoomAndGrid (virtual)
* Add standard zoom commands and submenu zoom and grid selection to a popup menu
* uses zoom hotkeys info base to add hotkeys info to menu commands
* @param aMasterMenu = the menu to populate.
......@@ -277,7 +284,8 @@ public:
void EraseMsgBox();
void Process_PageSettings( wxCommandEvent& event );
virtual void SetToolbars();
/** function SetLanguage
/**
* Function SetLanguage
* called on a language menu selection
* when using a derived function, do not forget to call this one
*/
......@@ -287,7 +295,8 @@ public:
virtual void ReCreateVToolbar() = 0;
virtual void ReCreateMenuBar();
virtual void ReCreateAuxiliaryToolbar();
/** Function SetToolID
/**
* Function SetToolID
* Enables the icon of the selected tool in the vertical toolbar.
* (Or tool ID_NO_SELECT_BUTT default if no new selection)
* @param aId = new m_ID_current_state value (if aId >= 0)
......@@ -306,7 +315,8 @@ public:
* and /get/set grid color.
* These parameters are saved in kicad config for each main frame
*/
/** Function IsGridVisible() , virtual
/**
* Function IsGridVisible() , virtual
* @return true if the grid must be shown
*/
virtual bool IsGridVisible()
......@@ -314,7 +324,8 @@ public:
return m_DrawGrid;
}
/** Function SetGridVisibility() , virtual
/**
* Function SetGridVisibility() , virtual
* It may be overloaded by derived classes
* @param aVisible = true if the grid must be shown
*/
......@@ -323,7 +334,8 @@ public:
m_DrawGrid = aVisible;
}
/** Function GetGridColor() , virtual
/**
* Function GetGridColor() , virtual
* @return the color of the grid
*/
virtual int GetGridColor()
......@@ -331,7 +343,8 @@ public:
return m_GridColor;
}
/** Function SetGridColor() , virtual
/**
* Function SetGridColor() , virtual
* @param aColor = the new color of the grid
*/
virtual void SetGridColor(int aColor)
......@@ -361,13 +374,13 @@ public:
virtual void OnZoom( wxCommandEvent& event );
void OnGrid( int grid_type );
void Recadre_Trace( bool ToMouse );
/** Adjust the coordinate to the nearest grid value
* @param aCoord = coordinate to adjust
* @param aGridSize = pointer to a grid value. if NULL uses the current grid size
* @param aGridSize = pointer to a grid value. if NULL uses the current grid size
*/
void PutOnGrid( wxPoint* aCoord , wxRealPoint* aGridSize = NULL );
void PutOnGrid( wxPoint* aCoord , wxRealPoint* aGridSize = NULL );
void Zoom_Automatique( bool move_mouse_cursor );
/* Set the zoom level to show the area Rect */
......@@ -384,7 +397,8 @@ public:
void TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width );
void PlotWorkSheet( PLOTTER *plotter, BASE_SCREEN* screen );
/** Function GetXYSheetReferences
/**
* Function GetXYSheetReferences
* Return the X,Y sheet references where the point position is located
* @param aScreen = screen to use
* @param aPosition = position to identify by YX ref
......@@ -805,7 +819,8 @@ public:
void SetToolNormalBitmap( int id, const wxBitmap& bitmap ) {};
void SetRows( int nRows ) {};
/** Function GetDimension
/**
* Function GetDimension
* @return the dimension of this toolbar (Height if horizontal, Width if vertical.
*/
int GetDimension( );
......
......@@ -77,7 +77,8 @@ public:
~WinEDA_MainFrame();
/** Function CreateCommandToolbar
/**
* Function CreateCommandToolbar
* Create the main buttons (fast launch buttons)
*/
void OnCloseWindow( wxCloseEvent& Event );
......
......@@ -50,13 +50,15 @@ protected:
void NewFile( TreeFileType type );
void NewFile( const wxString& name, TreeFileType type,
wxTreeItemId& root );
/** function GetSelectedData
/**
* Function GetSelectedData
* return the item data from item currently selected (highlighted)
* Note this is not necessary the "clicked" item,
* because when expanding, collapsing an item this item is not selected
*/
TREEPROJECT_ITEM* GetSelectedData();
/** function GetItemIdData
/**
* Function GetItemIdData
* return the item data corresponding to a wxTreeItemId identifier
* @param aId = the wxTreeItemId identifier.
* @return a TREEPROJECT_ITEM pointer correspondinfg to item id aId
......@@ -135,7 +137,8 @@ public:
#endif
/** function AddFile
/**
* Function AddFile
* @brief Add filename "name" to the tree \n
* if name is a directory, add the sub directory file names
* @param aName = the filename or the dirctory name to add
......
......@@ -379,7 +379,8 @@ public:
void SetVisibleElementColor( int aPCB_VISIBLE, int aColor );
/** Function GetBoardDesignSettings
/**
* Function GetBoardDesignSettings
* @return the current BOARD_DESIGN_SETTINGS in use
*/
BOARD_DESIGN_SETTINGS* GetBoardDesignSettings() const
......@@ -388,7 +389,8 @@ public:
}
/** Function SetBoardDesignSettings
/**
* Function SetBoardDesignSettings
* @param aDesignSettings = the new BOARD_DESIGN_SETTINGS to use
*/
void SetBoardDesignSettings( BOARD_DESIGN_SETTINGS* aDesignSettings)
......@@ -396,7 +398,8 @@ public:
m_boardDesignSettings = aDesignSettings;
}
/** Function SetBoardSettings
/**
* Function SetBoardSettings
* @return the current COLORS_DESIGN_SETTINGS in use
*/
COLORS_DESIGN_SETTINGS* GetColorsSettings() const
......@@ -404,7 +407,8 @@ public:
return m_colorsSettings;
}
/** Function SetColorsSettings
/**
* Function SetColorsSettings
* @param aColorsSettings = the new COLORS_DESIGN_SETTINGS to use
*/
void SetColorsSettings(COLORS_DESIGN_SETTINGS* aColorsSettings)
......@@ -480,12 +484,14 @@ public:
}
/** Function GetNodesCount
/**
* Function GetNodesCount
* @return the number of pads members of nets (i.e. with netcode > 0)
*/
unsigned GetNodesCount();
/** Function GetPadsCount
/**
* Function GetPadsCount
* @return the number of pads in board
*/
unsigned GetPadsCount()
......@@ -572,7 +578,8 @@ public:
int ReturnSortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount );
/**************************************/
/** function relative to NetClasses: **/
/**
* Function relative to NetClasses: **/
/**************************************/
/**
......@@ -596,12 +603,14 @@ public:
*/
bool SetCurrentNetClass( const wxString& aNetClassName );
/** function GetBiggestClearanceValue
/**
* Function GetBiggestClearanceValue
* @return the biggest clearance value found in NetClasses list
*/
int GetBiggestClearanceValue();
/** function GetCurrentTrackWidth
/**
* Function GetCurrentTrackWidth
* @return the current track width, according to the selected options
* ( using the default netclass value or a preset value )
* the default netclass is always in m_TrackWidthList[0]
......@@ -612,7 +621,8 @@ public:
}
/** function GetCurrentViaSize
/**
* Function GetCurrentViaSize
* @return the current via size, according to the selected options
* ( using the default netclass value or a preset value )
* the default netclass is always in m_TrackWidthList[0]
......@@ -623,7 +633,8 @@ public:
}
/** function GetCurrentViaDrill
/**
* Function GetCurrentViaDrill
* @return the current via size, according to the selected options
* ( using the default netclass value or a preset value )
* the default netclass is always in m_TrackWidthList[0]
......@@ -635,13 +646,15 @@ public:
}
/** function GetCurrentMicroViaSize
/**
* Function GetCurrentMicroViaSize
* @return the current micro via size,
* that is the current netclass value
*/
int GetCurrentMicroViaSize();
/** function GetCurrentMicroViaDrill
/**
* Function GetCurrentMicroViaDrill
* @return the current micro via drill,
* that is the current netclass value
*/
......@@ -775,7 +788,8 @@ public:
/* Functions used in test, merge and cut outlines */
/** Function AddArea
/**
* Function AddArea
* Add an empty copper area to board areas list
* @param aNewZonesList = a PICKED_ITEMS_LIST * where to store new areas pickers (useful in undo commands)
* can be NULL
......@@ -874,7 +888,8 @@ public:
bool bMessageBox,
bool bUseUtility );
/** Function RemoveArea
/**
* Function RemoveArea
* remove copper area from net, and put it in a deleted list (if exists)
* @param aDeletedList = a PICKED_ITEMS_LIST * where to store deleted areas (useful in undo commands
* can be NULL
......
......@@ -40,7 +40,8 @@ public:
*/
void SetLayer( int aLayer );
/** function AdjustDimensionDetails
/**
* Function AdjustDimensionDetails
* Calculate coordinates of segments used to draw the dimension.
* @param aDoNotChangeText (bool) if false, the dimension text is initialized
*/
......
......@@ -145,7 +145,8 @@ public:
*/
virtual void Flip( const wxPoint& aCentre );
/** Function TransformShapeWithClearanceToPolygon
/**
* Function TransformShapeWithClearanceToPolygon
* Convert the track shape to a closed polygon
* Used in filling zones calculations
* Circles and arcs are approximated by segments
......
......@@ -103,7 +103,8 @@ public:
}
/** Function TransformShapeWithClearanceToPolygon
/**
* Function TransformShapeWithClearanceToPolygon
* Convert the track shape to a closed polygon
* Used in filling zones calculations
* Circles and arcs are approximated by segments
......
......@@ -65,7 +65,8 @@ public:
*/
virtual void Flip(const wxPoint& aCentre );
/** Function Draw
/**
* Function Draw
*/
void Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, int aDrawMode, const wxPoint& aOffset = ZeroOffset )
{
......@@ -82,7 +83,8 @@ public:
}
/** Function HitTest
/**
* Function HitTest
* @return true if the point aPosRef is within item area
* @param aPosRef = a wxPoint to test
*/
......
......@@ -115,7 +115,8 @@ public:
*/
void Set_Rectangle_Encadrement();
/** function SetRectangleExinscrit()
/**
* Function SetRectangleExinscrit()
* Calculates the real bounding box according to the board position,
* and real orientation and also calculates the area value (used in
* automatic placement)
......@@ -217,7 +218,8 @@ public:
/* drawing functions */
/** Function Draw
/**
* 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
......
......@@ -57,7 +57,8 @@ public:
}
/** function Draw
/**
* Function Draw
*/
void Draw( WinEDA_DrawPanel* panel,
wxDC* DC,
......@@ -85,7 +86,8 @@ public:
public: NETINFO_LIST( BOARD* aParent );
~NETINFO_LIST();
/** Function GetItem
/**
* Function GetItem
* @param aNetcode = netcode to identify a given NETINFO_ITEM
* @return a NETINFO_ITEM pointer to the selected NETINFO_ITEM by its
* netcode, or NULL if not found
......@@ -105,18 +107,21 @@ public: NETINFO_LIST( BOARD* aParent );
*/
void AppendNet( NETINFO_ITEM* aNewElement );
/** Function DeleteData
/**
* Function DeleteData
* delete the list of nets (and free memory)
*/
void DeleteData();
/** Function BuildListOfNets
/**
* Function BuildListOfNets
* Build or rebuild the list of NETINFO_ITEM m_NetBuffer
* The list is sorted by names.
*/
void BuildListOfNets();
/** Function GetPadsCount
/**
* Function GetPadsCount
* @return the number of pads in board
*/
unsigned GetPadsCount()
......@@ -125,7 +130,8 @@ public: NETINFO_LIST( BOARD* aParent );
}
/** Function GetPad
/**
* Function GetPad
* @return the pad idx from m_PadsFullList
*/
D_PAD* GetPad( unsigned aIdx )
......@@ -139,7 +145,8 @@ public: NETINFO_LIST( BOARD* aParent );
private:
/** Function Build_Pads_Full_List
/**
* Function Build_Pads_Full_List
* Create the pad list
* initialise:
* m_Pads (list of pads)
......@@ -322,7 +329,8 @@ public:
bool Save( FILE* aFile ) const;
/** function Draw
/**
* Function Draw
* @todo we actually could show a NET, simply show all the tracks and
* a pads or net name on pad and vias
*/
......
......@@ -166,7 +166,8 @@ public:
m_Pos = aPos;
}
/** function TransformShapeWithClearanceToPolygon
/**
* Function TransformShapeWithClearanceToPolygon
* Convert the pad shape to a closed polygon
* Used in filling zones calculations
* Circles and arcs are approximated by segments
......@@ -193,7 +194,8 @@ public:
// Mask margins handling:
/** Function GetSolderMaskMargin
/**
* Function GetSolderMaskMargin
* @return the margin for the solder mask layer
* usually > 0 (mask shape bigger than pad
* value is
......@@ -203,7 +205,8 @@ public:
*/
int GetSolderMaskMargin();
/** Function GetSolderPasteMargin
/**
* Function GetSolderPasteMargin
* @return the margin for the solder mask layer
* usually < 0 (mask shape smaller than pad
* because the margin can be dependent on the pad size, the margin has a x and a y value
......@@ -232,13 +235,15 @@ public:
void Draw3D( Pcb3D_GLCanvas* glcanvas );
/** function DrawShape
/**
* Function DrawShape
* basic function to draw a pad.
* used by Draw after calculation of parameters (color, ) final orientation ...
*/
void DrawShape( EDA_Rect* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo );
/** function BuildPadPolygon
/**
* Function BuildPadPolygon
* 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
......@@ -248,7 +253,8 @@ public:
*/
void BuildPadPolygon( wxPoint aCoord[4], wxSize aInflateValue, int aRotation ) const;
/** function BuildSegmentFromOvalShape
/**
* Function BuildSegmentFromOvalShape
* Has meaning only for OVAL (and ROUND) pads
* Build an equivalent segment having the same shape as the OVAL shape,
* Useful in draw function and in DRC and HitTest functions,
......
......@@ -75,7 +75,8 @@ public:
void OnLayerVisible( int aLayer, bool isVisible, bool isFinal );
void OnRenderColorChange( int aId, int aColor );
void OnRenderEnable( int aId, bool isEnabled );
/** Function SetLayersManagerTabsText
/**
* Function SetLayersManagerTabsText
* Update the layer manager tabs labels
* Useful when changing Language or to set labels to a non default value
*/
......
......@@ -111,7 +111,8 @@ public:
return wxT("PTEXT");
}
/** Function TransformShapeWithClearanceToPolygon
/**
* Function TransformShapeWithClearanceToPolygon
* Convert the track shape to a closed polygon
* Used in filling zones calculations
* Circles and arcs are approximated by segments
......
......@@ -50,7 +50,8 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
int GetDrawRotation(); // Return text rotation for drawings and
// plotting
/** Function GetTextRect
/**
* Function GetTextRect
* @return an EDA_Rect which gives the position and size of the text area
* (for the 0 orient text and footprint)
*/
......
......@@ -149,7 +149,8 @@ public:
/* divers */
int Shape() const { return m_Shape & 0xFF; }
/** Function TransformShapeWithClearanceToPolygon
/**
* Function TransformShapeWithClearanceToPolygon
* Convert the track shape to a closed polygon
* Used in filling zones calculations
* Circles (vias) and arcs (ends of tracks) are approximated by segments
......
......@@ -133,7 +133,8 @@ public:
*/
void Test_For_Copper_Island_And_Remove_Insulated_Islands( BOARD* aPcb );
/** function CalculateSubAreaBoundaryBox
/**
* Function CalculateSubAreaBoundaryBox
* Calculates the bounding box of a a filled area ( list of CPolyPt )
* use m_FilledPolysList as list of CPolyPt (that are the corners of one or more polygons or filled areas )
* @return an EDA_Rect as bounding box
......@@ -177,7 +178,8 @@ public:
*/
bool HitTestFilledArea( const wxPoint& aRefPos );
/** function BuildFilledPolysListData
/**
* Function BuildFilledPolysListData
* Build m_FilledPolysList data from real outlines (m_Poly)
* in order to have drawable (and plottable) filled polygons
* drawable filled polygons are polygons without hole
......@@ -188,7 +190,8 @@ public:
*/
int BuildFilledPolysListData( BOARD* aPcb );
/** function AddClearanceAreasPolygonsToPolysList
/**
* Function AddClearanceAreasPolygonsToPolysList
* Add non copper areas polygons (pads and tracks with clearence)
* to a filled copper area
* used in BuildFilledPolysListData when calculating filled areas in a zone
......@@ -200,14 +203,16 @@ public:
*/
void AddClearanceAreasPolygonsToPolysList( BOARD* aPcb );
/** Function CopyPolygonsFromBoolengineToFilledPolysList
/**
* Function CopyPolygonsFromBoolengineToFilledPolysList
* Copy (Add) polygons created by kbool (after Do_Operation) to m_FilledPolysList
* @param aBoolengine = the kbool engine used in Do_Operation
* @return the corner count
*/
int CopyPolygonsFromBoolengineToFilledPolysList( Bool_Engine* aBoolengine );
/** Function CopyPolygonsFromFilledPolysListToBoolengine
/**
* Function CopyPolygonsFromFilledPolysListToBoolengine
* Copy (Add) polygons created by kbool (after Do_Operation) to m_FilledPolysList
* @param aBoolengine = kbool engine
* @param aGroup = group in kbool engine (GROUP_A or GROUP_B only)
......@@ -253,7 +258,8 @@ public:
*/
int Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose = TRUE );
/** Function Fill_Zone_Areas_With_Segments()
/**
* Function Fill_Zone_Areas_With_Segments()
* Fill sub areas in a zone with segments with m_ZoneMinThickness width
* A scan is made line per line, on the whole filled areas, with a step of m_ZoneMinThickness.
* all intersecting points with the horizontal infinite line and polygons to fill are calculated
......@@ -353,7 +359,8 @@ public:
{
return m_Poly->GetHatchStyle();
}
/** function IsSame()
/**
* Function IsSame()
* test is 2 zones are equivalent:
* 2 zones are equivalent if they have same parameters and same outlines
* info relative to filling is not take in account
......
......@@ -26,13 +26,15 @@ public:
public:
ZONE_SETTING( void );
/** function ImportSetting
/**
* Function ImportSetting
* copy settings from a given zone
* @param aSource: the given zone
*/
void ImportSetting( const ZONE_CONTAINER& aSource );
/** function ExportSetting
/**
* Function ExportSetting
* copy settings to a given zone
* @param aTarget: the given zone
* @param aFullExport: if false: some parameters are NOT exported
......
......@@ -48,7 +48,8 @@ public:
void Show3D_Frame( wxCommandEvent& event );
void GeneralControle( wxDC* DC, wxPoint Mouse );
/** function LoadModuleFromBoard
/**
* Function LoadModuleFromBoard
* called from the main toolbar
* to load a footprint from board mainly to edit it
*/
......@@ -62,7 +63,8 @@ public:
*/
virtual void OnModify( );
/** function ToPrinter
/**
* Function ToPrinter
* Install the print dialog
*/
void ToPrinter( wxCommandEvent& event );
......@@ -82,7 +84,8 @@ public:
// BOARD handling
/** function Clear_Pcb()
/**
* Function Clear_Pcb()
* delete all and reinitialize the current board
* @param aQuery = true to prompt user for confirmation, false to
* initialize silently
......@@ -99,7 +102,8 @@ public:
/* Undo and redo functions */
public:
/** Function SaveCopyInUndoList.
/**
* Function SaveCopyInUndoList.
* Creates a new entry in undo list of commands.
* add a picker to handle aItemToCopy
* @param aItem = the board item modified by the command to undo
......@@ -112,7 +116,8 @@ public:
const wxPoint& aTransformPoint =
wxPoint( 0, 0 ) );
/** Function SaveCopyInUndoList (overloaded).
/**
* Function SaveCopyInUndoList (overloaded).
* Creates a new entry in undo list of commands.
* add a list of pickers to handle a list of items
* @param aItemsList = the list of items modified by the command to undo
......@@ -151,14 +156,16 @@ public:
MODULE* Import_Module( );
/** function Load_Module_From_BOARD
/**
* Function Load_Module_From_BOARD
* load in Modedit a footfrint from the main board
* @param Module = the module to load. If NULL, a module reference will we asked to user
* @return true if a module isloaded, false otherwise.
*/
bool Load_Module_From_BOARD( MODULE* Module );
/** Function Select_1_Module_From_BOARD
/**
* Function Select_1_Module_From_BOARD
* Display the list of modules currently existing on the BOARD
* @return a pointer to a module if this module is selected or NULL otherwise
* @param aPcb = the board from modules can be loaded
......@@ -167,7 +174,8 @@ public:
// functions to edit footprint edges
/** Function Edit_Edge_Width
/**
* Function Edit_Edge_Width
* changes the width of module perimeter lines, EDGE_MODULEs.
* param ModuleSegmentWidth (global) = new width
* @param aEdge = edge to edit, or NULL. If aEdge == NULL change
......@@ -178,7 +186,8 @@ public:
void Delete_Edge_Module( EDGE_MODULE* Edge );
EDGE_MODULE* Begin_Edge_Module( EDGE_MODULE* Edge, wxDC* DC, int type_edge );
void End_Edge_Module( EDGE_MODULE* Edge );
/** function Enter_Edge_Width
/**
* Function Enter_Edge_Width
* Edition of the edge items width
* Ask for a new width.
* Change the width of EDGE_MODULE Edge if aEdge != NULL
......
......@@ -23,10 +23,10 @@
// inflection modes for DS_LINE and DS_LINE_VERTEX, used in math_for_graphics.cpp
enum
{
IM_NONE = 0,
IM_90_45,
IM_45_90,
IM_90
IM_NONE = 0,
IM_90_45,
IM_45_90,
IM_90
};
......@@ -181,7 +181,8 @@ public:
// KBOOL functions
/** Function AddPolygonsToBoolEng
/**
* Function AddPolygonsToBoolEng
* and edges contours to a kbool engine, preparing a boolean op between polygons
* @param aStart_contour: starting contour number (-1 = all, 0 is the outlines of zone, > 1 = holes in zone
* @param aEnd_contour: ending contour number (-1 = all after aStart_contour)
......@@ -195,7 +196,8 @@ public:
int aEnd_contour = -1,
std::vector<CArc> * arc_array = NULL );
/** Function MakeKboolPoly
/**
* Function MakeKboolPoly
* fill a kbool engine with a closed polyline contour
* approximates arcs with multiple straight-line segments
* @param aStart_contour: starting contour number (-1 = all, 0 is the outlines of zone, > 1 = holes in zone
......@@ -213,7 +215,8 @@ public:
std::vector<CArc> * arc_array = NULL,
bool aConvertHoles = false);
/** Function NormalizeWithKbool
/**
* Function NormalizeWithKbool
* Use the Kbool Library to clip contours: if outlines are crossing, the self-crossing polygon
* is converted to non self-crossing polygon by adding extra points at the crossing locations
* and reordering corners
......@@ -226,11 +229,13 @@ public:
*/
int NormalizeWithKbool( std::vector<CPolyLine*> * aExtraPolyList, bool bRetainArcs );
/** function GetKboolEngine
/**
* Function GetKboolEngine
* @return the current used Kbool Engine (after normalization using kbool)
*/
Bool_Engine* GetKboolEngine( ) { return m_Kbool_Poly_Engine; }
/** function FreeKboolEngine
/**
* Function FreeKboolEngine
* delete the current used Kbool Engine (free memory after normalization using kbool)
*/
void FreeKboolEngine( ) { delete m_Kbool_Poly_Engine; m_Kbool_Poly_Engine = NULL; }
......
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