Loading include/base_struct.h +5 −1 Original line number Original line Diff line number Diff line Loading @@ -390,6 +390,8 @@ public: */ */ KICAD_T Type() const { return m_StructType; } KICAD_T Type() const { return m_StructType; } void SetTimeStamp( unsigned long aNewTimeStamp ) { m_TimeStamp = aNewTimeStamp; } unsigned long GetTimeStamp() const { return m_TimeStamp; } EDA_ITEM* Next() const { return (EDA_ITEM*) Pnext; } EDA_ITEM* Next() const { return (EDA_ITEM*) Pnext; } EDA_ITEM* Back() const { return (EDA_ITEM*) Pback; } EDA_ITEM* Back() const { return (EDA_ITEM*) Pback; } Loading Loading @@ -728,7 +730,6 @@ enum FILL_T { */ */ class EDA_TEXT class EDA_TEXT { { public: public: int m_Thickness; /* pen size used to draw this text */ int m_Thickness; /* pen size used to draw this text */ int m_Orient; /* Orient in 0.1 degrees */ int m_Orient; /* Orient in 0.1 degrees */ Loading Loading @@ -770,6 +771,9 @@ public: void SetOrientation( int aOrientation ) { m_Orient = aOrientation; } void SetOrientation( int aOrientation ) { m_Orient = aOrientation; } int GetOrientation() const { return m_Orient; } int GetOrientation() const { return m_Orient; } void SetItalic( bool isItalic ) { m_Italic = isItalic; } bool GetItalic() const { return m_Italic; } /** /** * Function SetSize * Function SetSize * sets text size. * sets text size. Loading pcbnew/class_netclass.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -112,6 +112,8 @@ public: return m_Name; return m_Name; } } void SetName( const wxString& aName ) { m_Name = aName; } /** /** * Function GetCount * Function GetCount * returns the number of nets in this NETCLASS, i.e. using these rules. * returns the number of nets in this NETCLASS, i.e. using these rules. Loading pcbnew/class_pcb_text.h +0 −3 Original line number Original line Diff line number Diff line Loading @@ -82,7 +82,6 @@ public: */ */ void DisplayInfo( EDA_DRAW_FRAME* frame ); void DisplayInfo( EDA_DRAW_FRAME* frame ); /** /** * Function HitTest * Function HitTest * tests if the given wxPoint is within the bounds of this object. * tests if the given wxPoint is within the bounds of this object. Loading @@ -94,7 +93,6 @@ public: return TextHitTest( refPos ); return TextHitTest( refPos ); } } /** /** * Function HitTest (overloaded) * Function HitTest (overloaded) * tests if the given EDA_RECT intersect this object. * tests if the given EDA_RECT intersect this object. Loading Loading @@ -149,7 +147,6 @@ public: */ */ virtual void Show( int nestLevel, std::ostream& os ); virtual void Show( int nestLevel, std::ostream& os ); #endif #endif }; }; #endif // #define CLASS_PCB_TEXT_H #endif // #define CLASS_PCB_TEXT_H pcbnew/class_track.h +6 −12 Original line number Original line Diff line number Diff line Loading @@ -117,23 +117,18 @@ public: */ */ virtual void Flip( const wxPoint& aCentre ); virtual void Flip( const wxPoint& aCentre ); /** * Function GetPosition * returns the position of this object. * @return const wxPoint& - The position of this object. */ wxPoint& GetPosition() { return m_Start; // it had to be start or end. } const wxPoint GetPosition() const // overload const wxPoint GetPosition() const // overload { { return m_Start; // it had to be start or end. return m_Start; // it had to be start or end. } } int GetWidth() const { return m_Width; } void SetWidth( int aWidth ) { m_Width = aWidth; } void SetPosition( const wxPoint& aPos ) { m_Start = aPos; } // overload void SetPosition( const wxPoint& aPos ) { m_Start = aPos; } // overload void SetEnd( const wxPoint& aEnd ) { m_Start = aEnd; } EDA_RECT GetBoundingBox() const; EDA_RECT GetBoundingBox() const; /** /** Loading Loading @@ -177,13 +172,13 @@ public: return hypot( dx, dy ); return hypot( dx, dy ); } } /* Display on screen: */ /* Display on screen: */ void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, const wxPoint& aOffset = ZeroOffset ); const wxPoint& aOffset = ZeroOffset ); /* divers */ /* divers */ int Shape() const { return m_Shape & 0xFF; } int Shape() const { return m_Shape & 0xFF; } void SetShape( int aShape ) { m_Shape = aShape; } /** /** * Function TransformShapeWithClearanceToPolygon * Function TransformShapeWithClearanceToPolygon Loading Loading @@ -489,7 +484,6 @@ public: return wxT( "VIA" ); return wxT( "VIA" ); } } virtual wxString GetSelectMenuText() const; virtual wxString GetSelectMenuText() const; virtual BITMAP_DEF GetMenuImage() const { return via_sketch_xpm; } virtual BITMAP_DEF GetMenuImage() const { return via_sketch_xpm; } Loading pcbnew/io_mgr.cpp +13 −9 Original line number Original line Diff line number Diff line Loading @@ -27,22 +27,26 @@ #include <kicad_plugin.h> #include <kicad_plugin.h> // some day plugins could be in separate DLL/DSOs, until then, use the simplest method: // Some day plugins might be in separate DLL/DSOs, simply because of numbers of them // and code size. Until then, use the simplest method: // This implementation is one of two which could be done. // This implementation is one of two which could be done. // the other one would cater to DLL/DSO's. But since it would be nearly // The other one would cater to DLL/DSO's. But since it would be nearly // impossible to link a KICAD type DLL/DSO right now without pulling in all // impossible to link a KICAD type DLL/DSO right now without pulling in all // ::Draw() functions, I forgo that option. // ::Draw() functions, I forgo that option temporarily. // Some day it may be possible to have some built in AND some DLL/DSO, but // Some day it may be possible to have some built in AND some DLL/DSO // only when we can keep things clean enough to link a DLL/DSO without // plugins coexisting. // pulling in the world. static KICAD_PLUGIN kicad_plugin; static KICAD_PLUGIN kicad_plugin; // a secret //static EAGLE_PLUGIN eagle_plugin; //static EAGLE_PLUGIN eagle_plugin; PLUGIN* IO_MGR::PluginFind( PCB_FILE_T aFileType ) PLUGIN* IO_MGR::PluginFind( PCB_FILE_T aFileType ) { { // This implementation is subject to change, any magic is allowed here. // The public IO_MGR API is the only pertinent public information. switch( aFileType ) switch( aFileType ) { { case KICAD: return &kicad_plugin; case KICAD: return &kicad_plugin; Loading Loading @@ -104,7 +108,7 @@ BOARD* PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, PROPERTIES* wxString msg; wxString msg; msg.Printf( _( "Plugin %s does not implement the BOARD Load() function.\n" ), msg.Printf( _( "Plugin %s does not implement the BOARD Load() function.\n" ), Name().GetData() ); PluginName().GetData() ); THROW_IO_ERROR( msg ); THROW_IO_ERROR( msg ); } } Loading @@ -118,7 +122,7 @@ void PLUGIN::Save( const wxString* aFileName, BOARD* aBoard, PROPERTIES* aProper wxString msg; wxString msg; msg.Printf( _( "Plugin %s does not implement the BOARD Save() function.\n" ), msg.Printf( _( "Plugin %s does not implement the BOARD Save() function.\n" ), Name().GetData() ); PluginName().GetData() ); THROW_IO_ERROR( msg ); THROW_IO_ERROR( msg ); } } Loading Loading
include/base_struct.h +5 −1 Original line number Original line Diff line number Diff line Loading @@ -390,6 +390,8 @@ public: */ */ KICAD_T Type() const { return m_StructType; } KICAD_T Type() const { return m_StructType; } void SetTimeStamp( unsigned long aNewTimeStamp ) { m_TimeStamp = aNewTimeStamp; } unsigned long GetTimeStamp() const { return m_TimeStamp; } EDA_ITEM* Next() const { return (EDA_ITEM*) Pnext; } EDA_ITEM* Next() const { return (EDA_ITEM*) Pnext; } EDA_ITEM* Back() const { return (EDA_ITEM*) Pback; } EDA_ITEM* Back() const { return (EDA_ITEM*) Pback; } Loading Loading @@ -728,7 +730,6 @@ enum FILL_T { */ */ class EDA_TEXT class EDA_TEXT { { public: public: int m_Thickness; /* pen size used to draw this text */ int m_Thickness; /* pen size used to draw this text */ int m_Orient; /* Orient in 0.1 degrees */ int m_Orient; /* Orient in 0.1 degrees */ Loading Loading @@ -770,6 +771,9 @@ public: void SetOrientation( int aOrientation ) { m_Orient = aOrientation; } void SetOrientation( int aOrientation ) { m_Orient = aOrientation; } int GetOrientation() const { return m_Orient; } int GetOrientation() const { return m_Orient; } void SetItalic( bool isItalic ) { m_Italic = isItalic; } bool GetItalic() const { return m_Italic; } /** /** * Function SetSize * Function SetSize * sets text size. * sets text size. Loading
pcbnew/class_netclass.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -112,6 +112,8 @@ public: return m_Name; return m_Name; } } void SetName( const wxString& aName ) { m_Name = aName; } /** /** * Function GetCount * Function GetCount * returns the number of nets in this NETCLASS, i.e. using these rules. * returns the number of nets in this NETCLASS, i.e. using these rules. Loading
pcbnew/class_pcb_text.h +0 −3 Original line number Original line Diff line number Diff line Loading @@ -82,7 +82,6 @@ public: */ */ void DisplayInfo( EDA_DRAW_FRAME* frame ); void DisplayInfo( EDA_DRAW_FRAME* frame ); /** /** * Function HitTest * Function HitTest * tests if the given wxPoint is within the bounds of this object. * tests if the given wxPoint is within the bounds of this object. Loading @@ -94,7 +93,6 @@ public: return TextHitTest( refPos ); return TextHitTest( refPos ); } } /** /** * Function HitTest (overloaded) * Function HitTest (overloaded) * tests if the given EDA_RECT intersect this object. * tests if the given EDA_RECT intersect this object. Loading Loading @@ -149,7 +147,6 @@ public: */ */ virtual void Show( int nestLevel, std::ostream& os ); virtual void Show( int nestLevel, std::ostream& os ); #endif #endif }; }; #endif // #define CLASS_PCB_TEXT_H #endif // #define CLASS_PCB_TEXT_H
pcbnew/class_track.h +6 −12 Original line number Original line Diff line number Diff line Loading @@ -117,23 +117,18 @@ public: */ */ virtual void Flip( const wxPoint& aCentre ); virtual void Flip( const wxPoint& aCentre ); /** * Function GetPosition * returns the position of this object. * @return const wxPoint& - The position of this object. */ wxPoint& GetPosition() { return m_Start; // it had to be start or end. } const wxPoint GetPosition() const // overload const wxPoint GetPosition() const // overload { { return m_Start; // it had to be start or end. return m_Start; // it had to be start or end. } } int GetWidth() const { return m_Width; } void SetWidth( int aWidth ) { m_Width = aWidth; } void SetPosition( const wxPoint& aPos ) { m_Start = aPos; } // overload void SetPosition( const wxPoint& aPos ) { m_Start = aPos; } // overload void SetEnd( const wxPoint& aEnd ) { m_Start = aEnd; } EDA_RECT GetBoundingBox() const; EDA_RECT GetBoundingBox() const; /** /** Loading Loading @@ -177,13 +172,13 @@ public: return hypot( dx, dy ); return hypot( dx, dy ); } } /* Display on screen: */ /* Display on screen: */ void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, void Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, const wxPoint& aOffset = ZeroOffset ); const wxPoint& aOffset = ZeroOffset ); /* divers */ /* divers */ int Shape() const { return m_Shape & 0xFF; } int Shape() const { return m_Shape & 0xFF; } void SetShape( int aShape ) { m_Shape = aShape; } /** /** * Function TransformShapeWithClearanceToPolygon * Function TransformShapeWithClearanceToPolygon Loading Loading @@ -489,7 +484,6 @@ public: return wxT( "VIA" ); return wxT( "VIA" ); } } virtual wxString GetSelectMenuText() const; virtual wxString GetSelectMenuText() const; virtual BITMAP_DEF GetMenuImage() const { return via_sketch_xpm; } virtual BITMAP_DEF GetMenuImage() const { return via_sketch_xpm; } Loading
pcbnew/io_mgr.cpp +13 −9 Original line number Original line Diff line number Diff line Loading @@ -27,22 +27,26 @@ #include <kicad_plugin.h> #include <kicad_plugin.h> // some day plugins could be in separate DLL/DSOs, until then, use the simplest method: // Some day plugins might be in separate DLL/DSOs, simply because of numbers of them // and code size. Until then, use the simplest method: // This implementation is one of two which could be done. // This implementation is one of two which could be done. // the other one would cater to DLL/DSO's. But since it would be nearly // The other one would cater to DLL/DSO's. But since it would be nearly // impossible to link a KICAD type DLL/DSO right now without pulling in all // impossible to link a KICAD type DLL/DSO right now without pulling in all // ::Draw() functions, I forgo that option. // ::Draw() functions, I forgo that option temporarily. // Some day it may be possible to have some built in AND some DLL/DSO, but // Some day it may be possible to have some built in AND some DLL/DSO // only when we can keep things clean enough to link a DLL/DSO without // plugins coexisting. // pulling in the world. static KICAD_PLUGIN kicad_plugin; static KICAD_PLUGIN kicad_plugin; // a secret //static EAGLE_PLUGIN eagle_plugin; //static EAGLE_PLUGIN eagle_plugin; PLUGIN* IO_MGR::PluginFind( PCB_FILE_T aFileType ) PLUGIN* IO_MGR::PluginFind( PCB_FILE_T aFileType ) { { // This implementation is subject to change, any magic is allowed here. // The public IO_MGR API is the only pertinent public information. switch( aFileType ) switch( aFileType ) { { case KICAD: return &kicad_plugin; case KICAD: return &kicad_plugin; Loading Loading @@ -104,7 +108,7 @@ BOARD* PLUGIN::Load( const wxString& aFileName, BOARD* aAppendToMe, PROPERTIES* wxString msg; wxString msg; msg.Printf( _( "Plugin %s does not implement the BOARD Load() function.\n" ), msg.Printf( _( "Plugin %s does not implement the BOARD Load() function.\n" ), Name().GetData() ); PluginName().GetData() ); THROW_IO_ERROR( msg ); THROW_IO_ERROR( msg ); } } Loading @@ -118,7 +122,7 @@ void PLUGIN::Save( const wxString* aFileName, BOARD* aBoard, PROPERTIES* aProper wxString msg; wxString msg; msg.Printf( _( "Plugin %s does not implement the BOARD Save() function.\n" ), msg.Printf( _( "Plugin %s does not implement the BOARD Save() function.\n" ), Name().GetData() ); PluginName().GetData() ); THROW_IO_ERROR( msg ); THROW_IO_ERROR( msg ); } } Loading