Loading eeschema/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ set(EESCHEMA_SRCS class_drawsheet.cpp class_hierarchical_PIN_sheet.cpp class_pin.cpp class_library.cpp class_schematic_items.cpp class_screen.cpp class_text-label.cpp Loading Loading @@ -56,7 +57,6 @@ set(EESCHEMA_SRCS hotkeys.cpp libalias.cpp libarch.cpp libclass.cpp libedit.cpp libedit_onleftclick.cpp libedit_onrightclick.cpp Loading eeschema/libclass.cpp→eeschema/class_library.cpp +0 −0 File moved. View file eeschema/class_library.h +23 −3 Original line number Diff line number Diff line Loading @@ -45,8 +45,21 @@ public: public: LibraryStruct( int type, const wxString& name, const wxString& fullname ); ~LibraryStruct(); bool WriteHeader( FILE* file ); /** * Function SaveLibrary * writes the data structures for this object out to 2 file * the library in "*.lib" format. * the doc file in "*.dcm" format. * creates a backup file for each file (.bak and .bck) * @param aFullFileName The full lib filename. * @return bool - true if success writing else false. */ bool SaveLibrary( const wxString& aFullFileName ); bool ReadHeader( FILE* file, int* LineNum ); private: bool WriteHeader( FILE* file ); }; Loading @@ -73,8 +86,15 @@ public: return wxT( "LibCmpEntry" ); } bool WriteDescr( FILE* File ); /** * Function SaveLibrary * writes the data structures for this object out to 2 FILE in "*.lib" and ".dcm" format. * the main file (.lib) is the library content (set of components) * the second file (.dcm)is the auxiliary file that contents the keywords and description for components) * @param FullFileName the new full filename (*.lib). * @return bool - true if success writing else false. */ bool SaveLibrary( const wxString& FullFileName ); }; Loading eeschema/class_pin.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -761,9 +761,9 @@ int LibDrawPin::ReturnPinDrawOrient( int TransMat[2][2] ) } /****************************************************/ void LibDrawPin::ReturnPinStringNum( wxString& buffer ) /****************************************************/ /***********************************************************/ void LibDrawPin::ReturnPinStringNum( wxString& buffer ) const /***********************************************************/ /* fill the buffer with pin num as a wxString * Pin num is coded as a long Loading @@ -772,7 +772,7 @@ void LibDrawPin::ReturnPinStringNum( wxString& buffer ) { char ascii_buf[5]; strncpy( ascii_buf, (char*) &m_PinNum, 4 ); memcpy(ascii_buf, &m_PinNum , 4); ascii_buf[4] = 0; buffer = CONV_FROM_UTF8( ascii_buf ); Loading eeschema/classes_body_items.h +66 −10 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ public: * @param aOffset = offset to draw * @param aColor = -1 to use the normal body item color, or use this color if >= 0 * @param aDrawMode = GR_OR, GR_XOR, ... * @param aData = pointer used to pass others parametres, depending on body items. * @param aData = value or pointer used to pass others parametres, depending on body items. * used for some items to force to force no fill mode * ( has meaning only for items what can be filled ). used in printing or moving objects mode * or to pass refernce to the lib component for pins Loading @@ -160,6 +160,14 @@ public: virtual void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ) = 0; /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const = 0; void Display_Infos_DrawEntry( WinEDA_DrawFrame* frame ); }; Loading Loading @@ -189,15 +197,21 @@ public: { return wxT( "LibDrawPin" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawPin* GenCopy(); bool WriteDescr( FILE* File ); void Display_Infos( WinEDA_DrawFrame* frame ); wxPoint ReturnPinEndPoint(); int ReturnPinDrawOrient( int TransMat[2][2] ); void ReturnPinStringNum( wxString& buffer ); void ReturnPinStringNum( wxString& buffer ) const; void SetPinNumFromString( wxString& buffer ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, Loading Loading @@ -234,10 +248,16 @@ public: { return wxT( "LibDrawArc" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawArc* GenCopy(); bool WriteDescr( FILE* File ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ); }; Loading @@ -257,10 +277,16 @@ public: { return wxT( "LibDrawCircle" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawCircle* GenCopy(); bool WriteDescr( FILE* File ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ); }; Loading @@ -287,10 +313,16 @@ public: { return wxT( "LibDrawText" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawText* GenCopy(); bool WriteDescr( FILE* File ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ); }; Loading @@ -311,10 +343,16 @@ public: { return wxT( "LibDrawSquare" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawSquare* GenCopy(); bool WriteDescr( FILE* File ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ); }; Loading @@ -334,10 +372,16 @@ public: { return wxT( "LibDrawSegment" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawSegment* GenCopy(); bool WriteDescr( FILE* File ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ); }; Loading Loading @@ -365,10 +409,16 @@ public: return wxT( "LibDrawPolyline" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawPolyline* GenCopy(); void AddPoint( const wxPoint& point ); bool WriteDescr( FILE* File ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ); }; Loading Loading @@ -406,11 +456,17 @@ public: { return wxT( "LibDrawField" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawField* GenCopy(); void Copy( LibDrawField* Target ); bool WriteDescr( FILE* File ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ); }; Loading Loading
eeschema/CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ set(EESCHEMA_SRCS class_drawsheet.cpp class_hierarchical_PIN_sheet.cpp class_pin.cpp class_library.cpp class_schematic_items.cpp class_screen.cpp class_text-label.cpp Loading Loading @@ -56,7 +57,6 @@ set(EESCHEMA_SRCS hotkeys.cpp libalias.cpp libarch.cpp libclass.cpp libedit.cpp libedit_onleftclick.cpp libedit_onrightclick.cpp Loading
eeschema/class_library.h +23 −3 Original line number Diff line number Diff line Loading @@ -45,8 +45,21 @@ public: public: LibraryStruct( int type, const wxString& name, const wxString& fullname ); ~LibraryStruct(); bool WriteHeader( FILE* file ); /** * Function SaveLibrary * writes the data structures for this object out to 2 file * the library in "*.lib" format. * the doc file in "*.dcm" format. * creates a backup file for each file (.bak and .bck) * @param aFullFileName The full lib filename. * @return bool - true if success writing else false. */ bool SaveLibrary( const wxString& aFullFileName ); bool ReadHeader( FILE* file, int* LineNum ); private: bool WriteHeader( FILE* file ); }; Loading @@ -73,8 +86,15 @@ public: return wxT( "LibCmpEntry" ); } bool WriteDescr( FILE* File ); /** * Function SaveLibrary * writes the data structures for this object out to 2 FILE in "*.lib" and ".dcm" format. * the main file (.lib) is the library content (set of components) * the second file (.dcm)is the auxiliary file that contents the keywords and description for components) * @param FullFileName the new full filename (*.lib). * @return bool - true if success writing else false. */ bool SaveLibrary( const wxString& FullFileName ); }; Loading
eeschema/class_pin.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -761,9 +761,9 @@ int LibDrawPin::ReturnPinDrawOrient( int TransMat[2][2] ) } /****************************************************/ void LibDrawPin::ReturnPinStringNum( wxString& buffer ) /****************************************************/ /***********************************************************/ void LibDrawPin::ReturnPinStringNum( wxString& buffer ) const /***********************************************************/ /* fill the buffer with pin num as a wxString * Pin num is coded as a long Loading @@ -772,7 +772,7 @@ void LibDrawPin::ReturnPinStringNum( wxString& buffer ) { char ascii_buf[5]; strncpy( ascii_buf, (char*) &m_PinNum, 4 ); memcpy(ascii_buf, &m_PinNum , 4); ascii_buf[4] = 0; buffer = CONV_FROM_UTF8( ascii_buf ); Loading
eeschema/classes_body_items.h +66 −10 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ public: * @param aOffset = offset to draw * @param aColor = -1 to use the normal body item color, or use this color if >= 0 * @param aDrawMode = GR_OR, GR_XOR, ... * @param aData = pointer used to pass others parametres, depending on body items. * @param aData = value or pointer used to pass others parametres, depending on body items. * used for some items to force to force no fill mode * ( has meaning only for items what can be filled ). used in printing or moving objects mode * or to pass refernce to the lib component for pins Loading @@ -160,6 +160,14 @@ public: virtual void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ) = 0; /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const = 0; void Display_Infos_DrawEntry( WinEDA_DrawFrame* frame ); }; Loading Loading @@ -189,15 +197,21 @@ public: { return wxT( "LibDrawPin" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawPin* GenCopy(); bool WriteDescr( FILE* File ); void Display_Infos( WinEDA_DrawFrame* frame ); wxPoint ReturnPinEndPoint(); int ReturnPinDrawOrient( int TransMat[2][2] ); void ReturnPinStringNum( wxString& buffer ); void ReturnPinStringNum( wxString& buffer ) const; void SetPinNumFromString( wxString& buffer ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, Loading Loading @@ -234,10 +248,16 @@ public: { return wxT( "LibDrawArc" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawArc* GenCopy(); bool WriteDescr( FILE* File ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ); }; Loading @@ -257,10 +277,16 @@ public: { return wxT( "LibDrawCircle" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawCircle* GenCopy(); bool WriteDescr( FILE* File ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ); }; Loading @@ -287,10 +313,16 @@ public: { return wxT( "LibDrawText" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawText* GenCopy(); bool WriteDescr( FILE* File ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ); }; Loading @@ -311,10 +343,16 @@ public: { return wxT( "LibDrawSquare" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawSquare* GenCopy(); bool WriteDescr( FILE* File ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ); }; Loading @@ -334,10 +372,16 @@ public: { return wxT( "LibDrawSegment" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawSegment* GenCopy(); bool WriteDescr( FILE* File ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ); }; Loading Loading @@ -365,10 +409,16 @@ public: return wxT( "LibDrawPolyline" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawPolyline* GenCopy(); void AddPoint( const wxPoint& point ); bool WriteDescr( FILE* File ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ); }; Loading Loading @@ -406,11 +456,17 @@ public: { return wxT( "LibDrawField" ); } /** * Function Save * writes the data structures for this object out to a FILE in "*.brd" format. * @param aFile The FILE to write to. * @return bool - true if success writing else false. */ virtual bool Save( FILE* aFile ) const; LibDrawField* GenCopy(); void Copy( LibDrawField* Target ); bool WriteDescr( FILE* File ); void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset, int aColor, int aDrawMode, void * aData, int aTransformMatrix[2][2] ); }; Loading