Commit 76aa3f6e authored by Wayne Stambaugh's avatar Wayne Stambaugh

EESchema schematic object refactoring and header rationalization.

parent 12e6dca4
...@@ -4,6 +4,13 @@ KiCad ChangeLog 2010 ...@@ -4,6 +4,13 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2010-nov-10 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
++EESchema
* Header file rationalization.
* Move schematic object load code into the appropriate schematic object.
2010-nov-3 UPDATE Wayne Stambaugh <stambaughw@verizon.net> 2010-nov-3 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================ ================================================================================
++common ++common
......
...@@ -12,13 +12,12 @@ ...@@ -12,13 +12,12 @@
#include "common.h" #include "common.h"
#include "base_struct.h" #include "base_struct.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "class_base_screen.h" #include "class_sch_screen.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "wx/valgen.h" #include "wx/valgen.h"
#ifdef EESCHEMA #ifdef EESCHEMA
#include "program.h"
#include "general.h" #include "general.h"
#endif #endif
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
...@@ -29,10 +28,17 @@ SCH_ITEM::SCH_ITEM( EDA_BaseStruct* aParent, KICAD_T aType ) : ...@@ -29,10 +28,17 @@ SCH_ITEM::SCH_ITEM( EDA_BaseStruct* aParent, KICAD_T aType ) :
m_Layer = 0; m_Layer = 0;
} }
SCH_ITEM::~SCH_ITEM() SCH_ITEM::~SCH_ITEM()
{ {
// Do not let the connections container go out of scope with any ojbects or they
// will be deleted by the container will cause the EESchema to crash. These objects
// are owned by the sheet object container.
if( !m_connections.empty() )
m_connections.release();
} }
/** /**
* place the struct in EEDrawList. * place the struct in EEDrawList.
* if it is a new item, it it also put in undo list * if it is a new item, it it also put in undo list
......
...@@ -122,7 +122,6 @@ set(EESCHEMA_SRCS ...@@ -122,7 +122,6 @@ set(EESCHEMA_SRCS
operations_on_items_lists.cpp operations_on_items_lists.cpp
pinedit.cpp pinedit.cpp
plot.cpp plot.cpp
read_from_file_schematic_items_descriptions.cpp
schedit.cpp schedit.cpp
schematic_undo_redo.cpp schematic_undo_redo.cpp
schframe.cpp schframe.cpp
......
...@@ -10,10 +10,12 @@ ...@@ -10,10 +10,12 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "class_library.h" #include "class_library.h"
#include "protos.h" #include "protos.h"
#include "class_sch_screen.h"
#include "class_sch_component.h"
#include "netlist.h" #include "netlist.h"
#include "lib_pin.h" #include "lib_pin.h"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "bitmaps.h" #include "bitmaps.h"
#include "common.h" #include "common.h"
#include "program.h" #include "wxEeschemaStruct.h"
#include "annotate_dialog.h" #include "annotate_dialog.h"
......
...@@ -26,6 +26,11 @@ ...@@ -26,6 +26,11 @@
#include "dialog_annotate_base.h" #include "dialog_annotate_base.h"
class WinEDA_SchematicFrame;
class wxConfig;
/*! /*!
* DIALOG_ANNOTATE class declaration * DIALOG_ANNOTATE class declaration
*/ */
......
...@@ -5,15 +5,16 @@ ...@@ -5,15 +5,16 @@
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
#include "program.h"
#include "confirm.h" #include "confirm.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "gestfich.h" #include "gestfich.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "wxEeschemaStruct.h"
#include "build_version.h"
#include "general.h" #include "general.h"
#include "class_drawsheetpath.h"
#include "build_version.h" #include "class_sch_component.h"
/** function FillFootprintFieldForAllInstancesofComponent /** function FillFootprintFieldForAllInstancesofComponent
......
...@@ -9,13 +9,20 @@ ...@@ -9,13 +9,20 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "block_commande.h" #include "block_commande.h"
#include "wxEeschemaStruct.h"
#include "class_sch_screen.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "class_marker_sch.h" #include "class_marker_sch.h"
#include "class_library.h" #include "class_library.h"
#include "lib_pin.h" #include "lib_pin.h"
#include "protos.h" #include "protos.h"
#include "class_schematic_items.h"
#include "class_text-label.h"
#include "class_sch_component.h"
#include "class_drawsheet.h"
#include <boost/foreach.hpp>
// Imported functions: // Imported functions:
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "confirm.h" #include "confirm.h"
#include "block_commande.h" #include "block_commande.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "class_library.h" #include "class_library.h"
#include "protos.h" #include "protos.h"
......
...@@ -15,12 +15,15 @@ ...@@ -15,12 +15,15 @@
#include "kicad_string.h" #include "kicad_string.h"
#include "gestfich.h" #include "gestfich.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "class_sch_screen.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "class_library.h" #include "class_library.h"
#include "netlist.h" #include "netlist.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheet.h"
#include "template_fieldnames.h"
#include "class_sch_component.h"
#include "build_version.h" #include "build_version.h"
......
...@@ -7,12 +7,17 @@ ...@@ -7,12 +7,17 @@
#include "common.h" #include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "wxEeschemaStruct.h"
#include "class_sch_screen.h"
#include "program.h"
#include "lib_draw_item.h" #include "lib_draw_item.h"
#include "lib_pin.h" #include "lib_pin.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_schematic_items.h"
#include "class_text-label.h"
#include "class_sch_component.h"
#include "class_drawsheet.h"
/* Routines Locales */ /* Routines Locales */
......
...@@ -8,10 +8,13 @@ ...@@ -8,10 +8,13 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_schematic_items.h"
static int s_LastShape = '\\'; static int s_LastShape = '\\';
static wxPoint ItemInitialPosition; static wxPoint ItemInitialPosition;
...@@ -20,8 +23,7 @@ static wxPoint ItemInitialPosition; ...@@ -20,8 +23,7 @@ static wxPoint ItemInitialPosition;
static void ExitBusEntry( WinEDA_DrawPanel* Panel, wxDC* DC ) static void ExitBusEntry( WinEDA_DrawPanel* Panel, wxDC* DC )
{ {
/* Exit bus entry mode. */ /* Exit bus entry mode. */
SCH_BUS_ENTRY* BusEntry = SCH_BUS_ENTRY* BusEntry = (SCH_BUS_ENTRY*) Panel->GetScreen()->GetCurItem();
(SCH_BUS_ENTRY*) Panel->GetScreen()->GetCurItem();
if( BusEntry ) if( BusEntry )
{ {
......
...@@ -13,18 +13,23 @@ ...@@ -13,18 +13,23 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "drawtxt.h" #include "drawtxt.h"
#include "confirm.h" #include "confirm.h"
#include "trigo.h" #include "trigo.h"
#include "richio.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheet.h"
#include "class_drawsheetpath.h"
#include "class_sch_component.h"
SCH_SHEET::SCH_SHEET( const wxPoint& pos ) : SCH_SHEET::SCH_SHEET( const wxPoint& pos ) : SCH_ITEM( NULL, DRAW_SHEET_STRUCT_TYPE )
SCH_ITEM( NULL, DRAW_SHEET_STRUCT_TYPE )
{ {
m_Layer = LAYER_SHEET; m_Layer = LAYER_SHEET;
m_Pos = pos; m_Pos = pos;
...@@ -96,6 +101,152 @@ bool SCH_SHEET::Save( FILE* aFile ) const ...@@ -96,6 +101,152 @@ bool SCH_SHEET::Save( FILE* aFile ) const
} }
bool SCH_SHEET::Load( LINE_READER& aLine, wxString& aErrorMsg )
{
int ii, fieldNdx, size;
char Name1[256];
SCH_SHEET_PIN* SheetLabel;
char* ptcar;
m_TimeStamp = GetTimeStamp();
// sheets are added to the EEDrawList like other schematic components.
// however, in order to preserve the hierarchy (through m_Parent pointers),
// a duplicate of the sheet is added to m_SubSheet array.
// must be a duplicate, references just work for a two-layer structure.
// this is accomplished through the Sync() function.
if( ((char*)aLine)[0] == '$' ) // line should be "$Sheet"
{
if( !aLine.ReadLine() )
{
aErrorMsg.Printf( wxT( "Read File Errror" ) );
return false;
}
}
/* Next line: must be "S xx yy nn mm" with xx, yy = sheet position
* ( upper left corner ) et nn,mm = sheet size */
if( ( sscanf( &((char*)aLine)[1], "%d %d %d %d",
&m_Pos.x, &m_Pos.y, &m_Size.x, &m_Size.y ) != 4 )
|| ( ((char*)aLine)[0] != 'S' ) )
{
aErrorMsg.Printf( wxT( " ** EESchema file sheet struct error at line %d, aborted\n" ),
aLine.LineNumber() );
aErrorMsg << CONV_FROM_UTF8( ((char*)aLine) );
return false;
}
/* Read fields */
for( ; ; ) /* Analysis of lines "Fn" text. */
{
if( !aLine.ReadLine() )
return false;
if( ((char*)aLine)[0] == 'U' )
{
sscanf( ((char*)aLine) + 1, "%lX", &m_TimeStamp );
if( m_TimeStamp == 0 ) // zero is not unique!
m_TimeStamp = GetTimeStamp();
continue;
}
if( ((char*)aLine)[0] != 'F' )
break;
sscanf( ((char*)aLine) + 1, "%d", &fieldNdx );
/* Read the field:
* If fieldNdx> = 2: Fn "text" t s posx posy
* If F0 "text" for SheetName
* F1 and "text" for filename
*/
ptcar = ((char*)aLine);
while( *ptcar && ( *ptcar != '"' ) )
ptcar++;
if( *ptcar != '"' )
{
aErrorMsg.Printf( wxT( "EESchema file sheet label F%d at line %d, aborted\n" ),
fieldNdx, aLine.LineNumber() );
aErrorMsg << CONV_FROM_UTF8( (char*) aLine );
return false;
}
for( ptcar++, ii = 0; ; ii++, ptcar++ )
{
Name1[ii] = *ptcar;
if( *ptcar == 0 )
{
aErrorMsg.Printf( wxT( "EESchema file sheet field F at line %d, aborted\n" ),
aLine.LineNumber() );
aErrorMsg << CONV_FROM_UTF8( (char*) aLine );
return false;
}
if( *ptcar == '"' )
{
Name1[ii] = 0;
ptcar++;
break;
}
}
if( ( fieldNdx == 0 ) || ( fieldNdx == 1 ) )
{
if( sscanf( ptcar, "%d", &size ) != 1 )
{
aErrorMsg.Printf( wxT( "EESchema file sheet Label error line %d, aborted\n" ),
aLine.LineNumber() );
aErrorMsg << CONV_FROM_UTF8( (char*) aLine );
}
if( size == 0 )
size = DEFAULT_SIZE_TEXT;
if( fieldNdx == 0 )
{
m_SheetName = CONV_FROM_UTF8( Name1 );
m_SheetNameSize = size;
}
else
{
SetFileName( CONV_FROM_UTF8( Name1 ) );
//printf( "in ReadSheetDescr : m_FileName = %s \n", Name1 );
m_FileNameSize = size;
}
}
if( fieldNdx > 1 )
{
SheetLabel = new SCH_SHEET_PIN( this );
if( !SheetLabel->Load( aLine, aErrorMsg ) )
{
delete SheetLabel;
SheetLabel = NULL;
return false;
}
AddLabel( SheetLabel );
}
}
if( strnicmp( "$End", ((char*)aLine), 4 ) != 0 )
{
aErrorMsg.Printf( wxT( "**EESchema file end_sheet struct error at line %d, aborted\n" ),
aLine.LineNumber() );
aErrorMsg << CONV_FROM_UTF8( ((char*)aLine) );
return false;
}
return true;
}
/* creates a copy of a sheet /* creates a copy of a sheet
* The linked data itself (EEDrawList) is not duplicated * The linked data itself (EEDrawList) is not duplicated
*/ */
......
...@@ -5,12 +5,19 @@ ...@@ -5,12 +5,19 @@
#ifndef CLASS_DRAWSHEET_H #ifndef CLASS_DRAWSHEET_H
#define CLASS_DRAWSHEET_H #define CLASS_DRAWSHEET_H
#include "base_struct.h"
#include <boost/ptr_container/ptr_vector.hpp> #include <boost/ptr_container/ptr_vector.hpp>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include "class_text-label.h" #include "class_text-label.h"
extern SCH_SHEET* g_RootSheet;
class LINE_READER;
class SCH_SCREEN;
class SCH_SHEET;
class SCH_SHEET_PIN;
class SCH_SHEET_PATH;
class DANGLING_END_ITEM;
class WinEDA_SchematicFrame;
/** /**
* Pin (label) used in sheets to create hierarchical schematics. * Pin (label) used in sheets to create hierarchical schematics.
...@@ -117,6 +124,16 @@ public: ...@@ -117,6 +124,16 @@ public:
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/**
* Load schematic sheet hierarchical lable from \a aLine in a .sch file.
*
* @param aLine - Essentially this is file to read the sheet hierarchical label from.
* @param aErrorMsg - Description of the error if an error occurs while loading the sheet
* hierarchical label.
* @return True if the sheet heirarchical label loaded successfully.
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
#if defined(DEBUG) #if defined(DEBUG)
// comment inherited by Doxygen from Base_Struct // comment inherited by Doxygen from Base_Struct
...@@ -169,7 +186,7 @@ public: ...@@ -169,7 +186,7 @@ public:
*/ */
virtual bool Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation ); virtual bool Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation );
virtual void GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList ); virtual void GetEndPoints( std::vector< DANGLING_END_ITEM >& aItemList );
}; };
...@@ -229,6 +246,15 @@ public: ...@@ -229,6 +246,15 @@ public:
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/**
* Load schematic sheet from \a aLine in a .sch file.
*
* @param aLine - Essentially this is file to read the component from.
* @param aErrorMsg - Description of the error if an error occurs while loading the sheet.
* @return True if the sheet loaded successfully.
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
void Place( WinEDA_SchematicFrame* frame, wxDC* DC ); void Place( WinEDA_SchematicFrame* frame, wxDC* DC );
SCH_SHEET* GenCopy(); SCH_SHEET* GenCopy();
void DisplayInfo( WinEDA_DrawFrame* frame ); void DisplayInfo( WinEDA_DrawFrame* frame );
......
...@@ -10,9 +10,15 @@ ...@@ -10,9 +10,15 @@
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "dlist.h" #include "dlist.h"
#include "class_sch_screen.h"
#include "sch_item_struct.h"
#include "class_drawsheet.h"
#include "class_drawsheetpath.h"
#include "class_sch_component.h"
#include "template_fieldnames.h"
#include "dialogs/dialog_schematic_find.h" #include "dialogs/dialog_schematic_find.h"
......
...@@ -50,7 +50,11 @@ ...@@ -50,7 +50,11 @@
*/ */
class wxFindReplaceData;
class SCH_SCREEN;
class SCH_MARKER; class SCH_MARKER;
class SCH_SHEET;
class SCH_ITEM;
/** /**
......
...@@ -18,10 +18,13 @@ ...@@ -18,10 +18,13 @@
#include "drawtxt.h" #include "drawtxt.h"
#include "plot_common.h" #include "plot_common.h"
#include "trigo.h" #include "trigo.h"
#include "richio.h"
#include "class_sch_screen.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheet.h"
/* m_Edge define on which edge the pin is positionned: /* m_Edge define on which edge the pin is positionned:
* *
...@@ -259,6 +262,74 @@ bool SCH_SHEET_PIN::Save( FILE* aFile ) const ...@@ -259,6 +262,74 @@ bool SCH_SHEET_PIN::Save( FILE* aFile ) const
} }
bool SCH_SHEET_PIN::Load( LINE_READER& aLine, wxString& aErrorMsg )
{
int size;
char number[256];
char name[256];
char connectType[256];
char sheetSide[256];
/* Read coordinates. */
if( sscanf( ((char*)aLine), "%s %s %s %s %d %d %d",
number, name, connectType, sheetSide, &m_Pos.x, &m_Pos.y, &size ) != 7 )
{
aErrorMsg.Printf( wxT( "EESchema file sheet hierarchical label error at line %d.\n" ),
aLine.LineNumber() );
aErrorMsg << CONV_FROM_UTF8( ((char*)aLine) );
return false;
}
m_Text = CONV_FROM_UTF8( name );
m_Text = m_Text.AfterFirst( wxChar( '"' ) );
m_Text = m_Text.BeforeLast( wxChar( '"' ) );
if( size == 0 )
size = DEFAULT_SIZE_TEXT;
m_Size.x = m_Size.y = size;
switch( connectType[0] )
{
case 'I':
m_Shape = NET_INPUT;
break;
case 'O':
m_Shape = NET_OUTPUT;
break;
case 'B':
m_Shape = NET_BIDI;
break;
case 'T':
m_Shape = NET_TRISTATE;
break;
case 'U':
m_Shape = NET_UNSPECIFIED;
break;
}
switch( sheetSide[0] )
{
case 'R' : /* pin on right side */
SetEdge( 1 );
break;
case 'T' : /* pin on top side */
SetEdge( 2 );
break;
case 'B' : /* pin on bottom side */
SetEdge( 3 );
break;
case 'L' : /* pin on left side */
default :
SetEdge( 0 );
break;
}
return true;
}
/** function Matches /** function Matches
* Compare hierarchical pin name against search string. * Compare hierarchical pin name against search string.
* @param aSearchData - Criteria to search against. * @param aSearchData - Criteria to search against.
......
...@@ -4,14 +4,17 @@ ...@@ -4,14 +4,17 @@
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "plot_common.h" #include "plot_common.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "class_sch_screen.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "template_fieldnames.h"
#include "transform.h"
#include "class_library.h" #include "class_library.h"
#include "class_libentry.h" #include "class_libentry.h"
#include "lib_pin.h" #include "lib_pin.h"
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#ifndef CLASS_LIBENTRY_H #ifndef CLASS_LIBENTRY_H
#define CLASS_LIBENTRY_H #define CLASS_LIBENTRY_H
#include "general.h"
#include "lib_draw_item.h" #include "lib_draw_item.h"
#include "lib_field.h" #include "lib_field.h"
......
...@@ -5,12 +5,13 @@ ...@@ -5,12 +5,13 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "eda_doc.h" #include "eda_doc.h"
#include "wxstruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
......
...@@ -6,8 +6,11 @@ ...@@ -6,8 +6,11 @@
#define CLASS_LIBRARY_H #define CLASS_LIBRARY_H
#include <wx/filename.h>
#include "class_libentry.h" #include "class_libentry.h"
/* /*
* Component Library version and file header macros. * Component Library version and file header macros.
*/ */
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
/*******************************************/ /*******************************************/
#include "fctsys.h" #include "fctsys.h"
#include "wxstruct.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "common.h" #include "common.h"
#include "program.h"
#include "general.h"
#include "trigo.h" #include "trigo.h"
#include "general.h"
#include "class_marker_sch.h" #include "class_marker_sch.h"
#include "erc.h" #include "erc.h"
/* Marker are mainly used to show an ERC error /* Marker are mainly used to show an ERC error
* but they could be used to give a specific info * but they could be used to give a specific info
*/ */
...@@ -51,8 +51,7 @@ SCH_MARKER::~SCH_MARKER() ...@@ -51,8 +51,7 @@ SCH_MARKER::~SCH_MARKER()
SCH_MARKER* SCH_MARKER::GenCopy() SCH_MARKER* SCH_MARKER::GenCopy()
{ {
SCH_MARKER* newitem = new SCH_MARKER( GetPos(), SCH_MARKER* newitem = new SCH_MARKER( GetPos(), GetReporter().GetMainText() );
GetReporter().GetMainText() );
newitem->SetMarkerType( GetMarkerType() ); newitem->SetMarkerType( GetMarkerType() );
newitem->SetErrorLevel( GetErrorLevel() ); newitem->SetErrorLevel( GetErrorLevel() );
......
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
#include "program.h" #include "macros.h"
#include "general.h" #include "wxEeschemaStruct.h"
#include "general.h"
#include "class_sch_component.h"
#include "class_netlist_object.h" #include "class_netlist_object.h"
#if defined(DEBUG) #if defined(DEBUG)
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#ifndef _CLASS_NETLIST_OBJECT_H_ #ifndef _CLASS_NETLIST_OBJECT_H_
#define _CLASS_NETLIST_OBJECT_H_ #define _CLASS_NETLIST_OBJECT_H_
#include "class_drawsheetpath.h"
#include "lib_pin.h" // LIB_PIN::ReturnPinStringNum( m_PinNum ) #include "lib_pin.h" // LIB_PIN::ReturnPinStringNum( m_PinNum )
......
...@@ -18,11 +18,15 @@ ...@@ -18,11 +18,15 @@
#include "drawtxt.h" #include "drawtxt.h"
#include "macros.h" #include "macros.h"
#include "trigo.h" #include "trigo.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_sch_component.h"
#include "class_sch_cmp_field.h"
#include "template_fieldnames.h"
SCH_FIELD::SCH_FIELD( const wxPoint& aPos, int aFieldId, SCH_FIELD::SCH_FIELD( const wxPoint& aPos, int aFieldId,
......
...@@ -14,6 +14,12 @@ ...@@ -14,6 +14,12 @@
*/ */
#include "sch_item_struct.h"
#include "general.h"
class WinEDA_SchematicFrame;
class SCH_COMPONENT; class SCH_COMPONENT;
class LIB_FIELD; class LIB_FIELD;
......
This diff is collapsed.
...@@ -6,12 +6,14 @@ ...@@ -6,12 +6,14 @@
#define COMPONENT_CLASS_H #define COMPONENT_CLASS_H
#include "class_sch_screen.h"
#include "class_sch_cmp_field.h" #include "class_sch_cmp_field.h"
#include "transform.h" #include "transform.h"
#include "general.h"
class SCH_SHEET_PATH; class SCH_SHEET_PATH;
class LIB_PIN;
class LIB_COMPONENT;
/** /**
...@@ -132,6 +134,14 @@ public: ...@@ -132,6 +134,14 @@ public:
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/**
* Load schematic component from \a aLine in a .sch file.
*
* @param aLine - Essentially this is file to read the component from.
* @param aErrorMsg - Description of the error if an error occurs while loading the component.
* @return True if the component loaded successfully.
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
/** /**
* Function Load * Function Load
......
...@@ -6,11 +6,17 @@ ...@@ -6,11 +6,17 @@
#include "eeschema_id.h" #include "eeschema_id.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "sch_item_struct.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_schematic_items.h"
#include "class_drawsheet.h"
#include <boost/foreach.hpp>
void SetaParent( EDA_BaseStruct* Struct, BASE_SCREEN* Screen ) void SetaParent( EDA_BaseStruct* Struct, BASE_SCREEN* Screen )
......
...@@ -4,12 +4,18 @@ ...@@ -4,12 +4,18 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "trigo.h" #include "trigo.h"
#include "common.h" #include "common.h"
#include "program.h" #include "richio.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_schematic_items.h"
#include <boost/foreach.hpp>
/* used to calculate the pen size from default value /* used to calculate the pen size from default value
* the actual pen size is default value * BUS_WIDTH_EXPAND * the actual pen size is default value * BUS_WIDTH_EXPAND
...@@ -94,6 +100,44 @@ bool SCH_BUS_ENTRY::Save( FILE* aFile ) const ...@@ -94,6 +100,44 @@ bool SCH_BUS_ENTRY::Save( FILE* aFile ) const
} }
bool SCH_BUS_ENTRY::Load( LINE_READER& aLine, wxString& aErrorMsg )
{
char Name1[256];
char Name2[256];
char* line = (char*) aLine;
while( (*line != ' ' ) && *line )
line++;
if( sscanf( line, "%s %s", Name1, Name2 ) != 2 )
{
aErrorMsg.Printf( wxT( "EESchema file bus entry load error at line %d" ),
aLine.LineNumber() );
aErrorMsg << wxT( "\n" ) << CONV_FROM_UTF8( (char*) aLine );
return false;
}
m_Layer = LAYER_WIRE;
if( Name1[0] == 'B' )
m_Layer = LAYER_BUS;
if( !aLine.ReadLine() || sscanf( (char*) aLine, "%d %d %d %d ", &m_Pos.x, &m_Pos.y,
&m_Size.x, &m_Size.y ) != 4 )
{
aErrorMsg.Printf( wxT( "EESchema file bus entry load error at line %d" ),
aLine.LineNumber() );
aErrorMsg << wxT( "\n" ) << CONV_FROM_UTF8( (char*) aLine );
return false;
}
m_Size.x -= m_Pos.x;
m_Size.y -= m_Pos.y;
return true;
}
EDA_Rect SCH_BUS_ENTRY::GetBoundingBox() EDA_Rect SCH_BUS_ENTRY::GetBoundingBox()
{ {
EDA_Rect box; EDA_Rect box;
...@@ -246,6 +290,26 @@ bool SCH_JUNCTION::Save( FILE* aFile ) const ...@@ -246,6 +290,26 @@ bool SCH_JUNCTION::Save( FILE* aFile ) const
} }
bool SCH_JUNCTION::Load( LINE_READER& aLine, wxString& aErrorMsg )
{
char name[256];
char* line = (char*) aLine;
while( (*line != ' ' ) && *line )
line++;
if( sscanf( line, "%s %d %d", name, &m_Pos.x, &m_Pos.y ) != 3 )
{
aErrorMsg.Printf( wxT( "EESchema file connection load error at line %d, aborted" ),
aLine.LineNumber() );
aErrorMsg << wxT( "\n" ) << CONV_FROM_UTF8( (char*) aLine );
return false;
}
return true;
}
EDA_Rect SCH_JUNCTION::GetBoundingBox() EDA_Rect SCH_JUNCTION::GetBoundingBox()
{ {
EDA_Rect rect; EDA_Rect rect;
...@@ -435,6 +499,26 @@ bool SCH_NO_CONNECT::Save( FILE* aFile ) const ...@@ -435,6 +499,26 @@ bool SCH_NO_CONNECT::Save( FILE* aFile ) const
} }
bool SCH_NO_CONNECT::Load( LINE_READER& aLine, wxString& aErrorMsg )
{
char name[256];
char* line = (char*) aLine;
while( (*line != ' ' ) && *line )
line++;
if( sscanf( line, "%s %d %d", name, &m_Pos.x, &m_Pos.y ) != 3 )
{
aErrorMsg.Printf( wxT( "EESchema file No Connect load error at line %d" ),
aLine.LineNumber() );
aErrorMsg << wxT( "\n" ) << CONV_FROM_UTF8( ((char*)aLine) );
return false;
}
return true;
}
/** Function GetPenSize /** Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item * @return the size of the "pen" that be used to draw or plot this item
*/ */
...@@ -631,6 +715,43 @@ bool SCH_LINE::Save( FILE* aFile ) const ...@@ -631,6 +715,43 @@ bool SCH_LINE::Save( FILE* aFile ) const
} }
bool SCH_LINE::Load( LINE_READER& aLine, wxString& aErrorMsg )
{
char Name1[256];
char Name2[256];
char* line = (char*) aLine;
while( (*line != ' ' ) && *line )
line++;
if( sscanf( line, "%s %s", Name1, Name2 ) != 2 )
{
aErrorMsg.Printf( wxT( "EESchema file segment error at line %d, aborted" ),
aLine.LineNumber() );
aErrorMsg << wxT( "\n" ) << CONV_FROM_UTF8( (char*) aLine );
return false;
}
m_Layer = LAYER_NOTES;
if( Name1[0] == 'W' )
m_Layer = LAYER_WIRE;
if( Name1[0] == 'B' )
m_Layer = LAYER_BUS;
if( !aLine.ReadLine() || sscanf( (char*) aLine, "%d %d %d %d ",
&m_Start.x, &m_Start.y, &m_End.x, &m_End.y ) != 4 )
{
aErrorMsg.Printf( wxT( "EESchema file Segment struct error at line %d, aborted" ),
aLine.LineNumber() );
aErrorMsg << wxT( "\n" ) << CONV_FROM_UTF8( (char*) aLine );
return false;
}
return true;
}
/** Function GetPenSize /** Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item * @return the size of the "pen" that be used to draw or plot this item
*/ */
...@@ -917,6 +1038,50 @@ bool SCH_POLYLINE::Save( FILE* aFile ) const ...@@ -917,6 +1038,50 @@ bool SCH_POLYLINE::Save( FILE* aFile ) const
} }
bool SCH_POLYLINE::Load( LINE_READER& aLine, wxString& aErrorMsg )
{
char Name1[256];
char Name2[256];
wxPoint pt;
int ii;
char* line = (char*) aLine;
while( (*line != ' ' ) && *line )
line++;
if( sscanf( line, "%s %s %d", Name1, Name2, &ii ) != 3 )
{
aErrorMsg.Printf( wxT( "EESchema file polyline struct error at line %d, aborted" ),
aLine.LineNumber() );
aErrorMsg << wxT( "\n" ) << CONV_FROM_UTF8( (char*) aLine );
return false;
}
m_Layer = LAYER_NOTES;
if( Name2[0] == 'W' )
m_Layer = LAYER_WIRE;
if( Name2[0] == 'B' )
m_Layer = LAYER_BUS;
for( unsigned jj = 0; jj < (unsigned)ii; jj++ )
{
wxPoint point;
if( !aLine.ReadLine() || sscanf( ((char*) aLine), "%d %d", &pt.x, &pt.y ) != 2 )
{
aErrorMsg.Printf( wxT( "EESchema file polyline struct error at line %d, aborted" ),
aLine.LineNumber() );
aErrorMsg << wxT( "\n" ) << CONV_FROM_UTF8( (char*) aLine );
return false;
}
AddPoint( pt );
}
return true;
}
/** Function GetPenSize /** Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item * @return the size of the "pen" that be used to draw or plot this item
*/ */
......
...@@ -5,6 +5,12 @@ ...@@ -5,6 +5,12 @@
#ifndef CLASS_SCHEMATIC_ITEMS_H #ifndef CLASS_SCHEMATIC_ITEMS_H
#define CLASS_SCHEMATIC_ITEMS_H #define CLASS_SCHEMATIC_ITEMS_H
#include "sch_item_struct.h"
#include "general.h"
/* Flags for BUS ENTRY (bus to bus or wire to bus */ /* Flags for BUS ENTRY (bus to bus or wire to bus */
#define WIRE_TO_BUS 0 #define WIRE_TO_BUS 0
#define BUS_TO_BUS 1 #define BUS_TO_BUS 1
...@@ -26,7 +32,7 @@ public: ...@@ -26,7 +32,7 @@ public:
bool m_EndIsDangling; // TRUE if not connected (wires, tracks...) bool m_EndIsDangling; // TRUE if not connected (wires, tracks...)
public: public:
SCH_LINE( const wxPoint& pos, int layer ); SCH_LINE( const wxPoint& pos = wxPoint( 0, 0 ), int layer = LAYER_NOTES );
~SCH_LINE() { } ~SCH_LINE() { }
SCH_LINE* Next() const { return (SCH_LINE*) Pnext; } SCH_LINE* Next() const { return (SCH_LINE*) Pnext; }
...@@ -68,6 +74,16 @@ public: ...@@ -68,6 +74,16 @@ public:
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/**
* Load schematic line from \a aLine in a .sch file.
*
* @param aLine - Essentially this is file to read schematic line from.
* @param aErrorMsg - Description of the error if an error occurs while loading the
* schematic line.
* @return True if the schematic line loaded successfully.
*/
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 * @return the size of the "pen" that be used to draw or plot this item
*/ */
...@@ -132,7 +148,7 @@ public: ...@@ -132,7 +148,7 @@ public:
wxSize m_Size; // size of this symbol wxSize m_Size; // size of this symbol
public: public:
SCH_NO_CONNECT( const wxPoint& pos ); SCH_NO_CONNECT( const wxPoint& pos = wxPoint( 0, 0 ) );
~SCH_NO_CONNECT() { } ~SCH_NO_CONNECT() { }
virtual wxString GetClass() const virtual wxString GetClass() const
{ {
...@@ -160,6 +176,16 @@ public: ...@@ -160,6 +176,16 @@ public:
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/**
* Load schematic no connect entry from \a aLine in a .sch file.
*
* @param aLine - Essentially this is file to read schematic no connect from.
* @param aErrorMsg - Description of the error if an error occurs while loading the
* schematic no connect.
* @return True if the schematic no connect loaded successfully.
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
/** Function HitTest /** Function HitTest
* @return true if the point aPosRef is within item area * @return true if the point aPosRef is within item area
* @param aPosRef = a wxPoint to test * @param aPosRef = a wxPoint to test
...@@ -215,7 +241,7 @@ public: ...@@ -215,7 +241,7 @@ public:
wxSize m_Size; wxSize m_Size;
public: public:
SCH_BUS_ENTRY( const wxPoint& pos, int shape, int id ); SCH_BUS_ENTRY( const wxPoint& pos = wxPoint( 0, 0 ), int shape = '\\', int id = WIRE_TO_BUS );
~SCH_BUS_ENTRY() { } ~SCH_BUS_ENTRY() { }
virtual wxString GetClass() const virtual wxString GetClass() const
...@@ -239,6 +265,16 @@ public: ...@@ -239,6 +265,16 @@ public:
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/**
* Load schematic bus entry from \a aLine in a .sch file.
*
* @param aLine - Essentially this is file to read schematic bus entry from.
* @param aErrorMsg - Description of the error if an error occurs while loading the
* schematic bus entry.
* @return True if the schematic bus entry loaded successfully.
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
/** /**
* Function GetBoundingBox * Function GetBoundingBox
* returns the orthogonal, bounding box of this object for display * returns the orthogonal, bounding box of this object for display
...@@ -288,7 +324,7 @@ public: ...@@ -288,7 +324,7 @@ public:
std::vector<wxPoint> m_PolyPoints; // list of points (>= 2) std::vector<wxPoint> m_PolyPoints; // list of points (>= 2)
public: public:
SCH_POLYLINE( int layer ); SCH_POLYLINE( int layer = LAYER_NOTES );
~SCH_POLYLINE(); ~SCH_POLYLINE();
virtual wxString GetClass() const virtual wxString GetClass() const
...@@ -311,6 +347,16 @@ public: ...@@ -311,6 +347,16 @@ public:
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/**
* Load schematic poly line entry from \a aLine in a .sch file.
*
* @param aLine - Essentially this is file to read schematic poly line from.
* @param aErrorMsg - Description of the error if an error occurs while loading the
* schematic poly line.
* @return True if the schematic poly line loaded successfully.
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
/** Function AddPoint /** Function AddPoint
* add a corner to m_PolyPoints * add a corner to m_PolyPoints
*/ */
...@@ -361,7 +407,7 @@ public: ...@@ -361,7 +407,7 @@ public:
wxSize m_Size; wxSize m_Size;
public: public:
SCH_JUNCTION( const wxPoint& pos ); SCH_JUNCTION( const wxPoint& pos = wxPoint( 0, 0 ) );
~SCH_JUNCTION() { } ~SCH_JUNCTION() { }
virtual wxString GetClass() const virtual wxString GetClass() const
...@@ -405,6 +451,16 @@ public: ...@@ -405,6 +451,16 @@ public:
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/**
* Load schematic junction entry from \a aLine in a .sch file.
*
* @param aLine - Essentially this is file to read schematic junction from.
* @param aErrorMsg - Description of the error if an error occurs while loading the
* schematic junction.
* @return True if the schematic junction loaded successfully.
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
// Geometric transforms (used in block operations): // Geometric transforms (used in block operations):
/** virtual function Move /** virtual function Move
......
...@@ -5,14 +5,16 @@ ...@@ -5,14 +5,16 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "trigo.h" #include "trigo.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "drawtxt.h" #include "drawtxt.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_text-label.h"
/************************/ /************************/
...@@ -490,6 +492,80 @@ bool SCH_TEXT::Save( FILE* aFile ) const ...@@ -490,6 +492,80 @@ bool SCH_TEXT::Save( FILE* aFile ) const
} }
bool SCH_TEXT::Load( LINE_READER& aLine, wxString& aErrorMsg )
{
char Name1[256];
char Name2[256];
char Name3[256];
int thickness = 0, size = 0, orient = 0;
Name1[0] = 0; Name2[0] = 0; Name3[0] = 0;
char* sline = (char*) aLine;
while( ( *sline != ' ' ) && *sline )
sline++;
// sline points the start of parameters
int ii = sscanf( sline, "%s %d %d %d %d %s %s %d", Name1, &m_Pos.x, &m_Pos.y,
&orient, &size, Name2, Name3, &thickness );
if( ii < 4 )
{
aErrorMsg.Printf( wxT( "EESchema file text load error at line %d" ),
aLine.LineNumber() );
return false;
}
if( !aLine.ReadLine() )
{
aErrorMsg.Printf( wxT( "EESchema file text load error at line %d" ),
aLine.LineNumber() );
return false;
}
if( size == 0 )
size = DEFAULT_SIZE_TEXT;
char* text = strtok( (char*) aLine, "\n\r" );
if( text == NULL )
{
aErrorMsg.Printf( wxT( "EESchema file text load error at line %d" ),
aLine.LineNumber() );
return false;
}
wxString val = CONV_FROM_UTF8( text );
for( ;; )
{
int i = val.find( wxT( "\\n" ) );
if( i == wxNOT_FOUND )
break;
val.erase( i, 2 );
val.insert( i, wxT( "\n" ) );
}
m_Text = val;
m_Size.x = m_Size.y = size;
SetSchematicTextOrientation( orient );
if( isdigit( Name3[0] ) )
{
thickness = atol( Name3 );
m_Bold = ( thickness != 0 );
m_Width = m_Bold ? GetPenSizeForBold( size ) : 0;
}
if( strnicmp( Name2, "Italic", 6 ) == 0 )
m_Italic = 1;
return true;
}
void SCH_TEXT::GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList ) void SCH_TEXT::GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList )
{ {
// Normal text labels cannot be tested for dangling ends. // Normal text labels cannot be tested for dangling ends.
...@@ -713,6 +789,68 @@ bool SCH_LABEL::Save( FILE* aFile ) const ...@@ -713,6 +789,68 @@ bool SCH_LABEL::Save( FILE* aFile ) const
} }
bool SCH_LABEL::Load( LINE_READER& aLine, wxString& aErrorMsg )
{
char Name1[256];
char Name2[256];
char Name3[256];
int thickness = 0, size = 0, orient = 0;
Name1[0] = 0; Name2[0] = 0; Name3[0] = 0;
char* sline = (char*) aLine;
while( ( *sline != ' ' ) && *sline )
sline++;
// sline points the start of parameters
int ii = sscanf( sline, "%s %d %d %d %d %s %s %d", Name1, &m_Pos.x, &m_Pos.y,
&orient, &size, Name2, Name3, &thickness );
if( ii < 4 )
{
aErrorMsg.Printf( wxT( "EESchema file label load error at line %d" ),
aLine.LineNumber() );
return false;
}
if( !aLine.ReadLine() )
{
aErrorMsg.Printf( wxT( "EESchema file label load error atline %d" ),
aLine.LineNumber() );
return false;
}
if( size == 0 )
size = DEFAULT_SIZE_TEXT;
char* text = strtok( (char*) aLine, "\n\r" );
if( text == NULL )
{
aErrorMsg.Printf( wxT( "EESchema file label load error at line %d" ),
aLine.LineNumber() );
return false;
}
m_Text = CONV_FROM_UTF8( text );
m_Size.x = m_Size.y = size;
SetSchematicTextOrientation( orient );
if( isdigit( Name3[0] ) )
{
thickness = atol( Name3 );
m_Bold = ( thickness != 0 );
m_Width = m_Bold ? GetPenSizeForBold( size ) : 0;
}
if( stricmp( Name2, "Italic" ) == 0 )
m_Italic = 1;
return true;
}
/** Function SCH_LABEL::Draw /** Function SCH_LABEL::Draw
* a label is drawn like a text. So just call SCH_TEXT::Draw * a label is drawn like a text. So just call SCH_TEXT::Draw
*/ */
...@@ -805,6 +943,71 @@ bool SCH_GLOBALLABEL::Save( FILE* aFile ) const ...@@ -805,6 +943,71 @@ bool SCH_GLOBALLABEL::Save( FILE* aFile ) const
} }
bool SCH_GLOBALLABEL::Load( LINE_READER& aLine, wxString& aErrorMsg )
{
char Name1[256];
char Name2[256];
char Name3[256];
int thickness = 0, size = 0, orient = 0;
Name1[0] = 0; Name2[0] = 0; Name3[0] = 0;
char* sline = (char*) aLine;
while( (*sline != ' ' ) && *sline )
sline++;
// sline points the start of parameters
int ii = sscanf( sline, "%s %d %d %d %d %s %s %d", Name1, &m_Pos.x, &m_Pos.y,
&orient, &size, Name2, Name3, &thickness );
if( ii < 4 )
{
aErrorMsg.Printf( wxT( "EESchema file global label load error at line %d" ),
aLine.LineNumber() );
return false;
}
if( !aLine.ReadLine() )
{
aErrorMsg.Printf( wxT( "EESchema file global label load error at line %d" ),
aLine.LineNumber() );
return false;
}
if( size == 0 )
size = DEFAULT_SIZE_TEXT;
char* text = strtok( (char*) aLine, "\n\r" );
if( text == NULL )
{
aErrorMsg.Printf( wxT( "EESchema file global label load error at line %d" ),
aLine.LineNumber() );
return false;
}
m_Text = CONV_FROM_UTF8( text );
m_Size.x = m_Size.y = size;
SetSchematicTextOrientation( orient );
m_Shape = NET_INPUT;
m_Bold = ( thickness != 0 );
m_Width = m_Bold ? GetPenSizeForBold( size ) : 0;
if( stricmp( Name2, SheetLabelType[NET_OUTPUT] ) == 0 )
m_Shape = NET_OUTPUT;
if( stricmp( Name2, SheetLabelType[NET_BIDI] ) == 0 )
m_Shape = NET_BIDI;
if( stricmp( Name2, SheetLabelType[NET_TRISTATE] ) == 0 )
m_Shape = NET_TRISTATE;
if( stricmp( Name2, SheetLabelType[NET_UNSPECIFIED] ) == 0 )
m_Shape = NET_UNSPECIFIED;
if( stricmp( Name3, "Italic" ) == 0 )
m_Italic = 1;
return true;
}
/** Function HitTest /** Function HitTest
* @return true if the point aPosRef is within item area * @return true if the point aPosRef is within item area
* @param aPosRef = a wxPoint to test * @param aPosRef = a wxPoint to test
...@@ -1193,6 +1396,70 @@ bool SCH_HIERLABEL::Save( FILE* aFile ) const ...@@ -1193,6 +1396,70 @@ bool SCH_HIERLABEL::Save( FILE* aFile ) const
} }
bool SCH_HIERLABEL::Load( LINE_READER& aLine, wxString& aErrorMsg )
{
char Name1[256];
char Name2[256];
char Name3[256];
int thickness = 0, size = 0, orient = 0;
Name1[0] = 0; Name2[0] = 0; Name3[0] = 0;
char* sline = (char*) aLine;
while( (*sline != ' ' ) && *sline )
sline++;
// sline points the start of parameters
int ii = sscanf( sline, "%s %d %d %d %d %s %s %d", Name1, &m_Pos.x, &m_Pos.y,
&orient, &size, Name2, Name3, &thickness );
if( ii < 4 )
{
aErrorMsg.Printf( wxT( "EESchema file hierarchical label load error at line %d" ),
aLine.LineNumber() );
return false;
}
if( !aLine.ReadLine() )
{
aErrorMsg.Printf( wxT( "EESchema file hierarchical label load error at line %d" ),
aLine.LineNumber() );
return false;
}
if( size == 0 )
size = DEFAULT_SIZE_TEXT;
char* text = strtok( (char*) aLine, "\n\r" );
if( text == NULL )
{
aErrorMsg.Printf( wxT( "EESchema file hierarchical label load error at line %d" ),
aLine.LineNumber() );
return false;
}
m_Text = CONV_FROM_UTF8( text );
m_Size.x = m_Size.y = size;
SetSchematicTextOrientation( orient );
m_Shape = NET_INPUT;
m_Bold = ( thickness != 0 );
m_Width = m_Bold ? GetPenSizeForBold( size ) : 0;
if( stricmp( Name2, SheetLabelType[NET_OUTPUT] ) == 0 )
m_Shape = NET_OUTPUT;
if( stricmp( Name2, SheetLabelType[NET_BIDI] ) == 0 )
m_Shape = NET_BIDI;
if( stricmp( Name2, SheetLabelType[NET_TRISTATE] ) == 0 )
m_Shape = NET_TRISTATE;
if( stricmp( Name2, SheetLabelType[NET_UNSPECIFIED] ) == 0 )
m_Shape = NET_UNSPECIFIED;
if( stricmp( Name3, "Italic" ) == 0 )
m_Italic = 1;
return true;
}
/** Function HitTest /** Function HitTest
* @return true if the point aPosRef is within item area * @return true if the point aPosRef is within item area
......
...@@ -5,8 +5,13 @@ ...@@ -5,8 +5,13 @@
#ifndef CLASS_TEXT_LABEL_H #ifndef CLASS_TEXT_LABEL_H
#define CLASS_TEXT_LABEL_H #define CLASS_TEXT_LABEL_H
#include "macros.h" #include "macros.h"
#include "base_struct.h" #include "sch_item_struct.h"
class LINE_READER;
/* Type of SCH_HIERLABEL and SCH_GLOBALLABEL /* Type of SCH_HIERLABEL and SCH_GLOBALLABEL
* mainly used to handle the graphic associated shape * mainly used to handle the graphic associated shape
...@@ -23,8 +28,7 @@ typedef enum { ...@@ -23,8 +28,7 @@ typedef enum {
extern const char* SheetLabelType[]; /* names of types of labels */ extern const char* SheetLabelType[]; /* names of types of labels */
class SCH_TEXT : public SCH_ITEM, class SCH_TEXT : public SCH_ITEM, public EDA_TextStruct
public EDA_TextStruct
{ {
public: public:
int m_Layer; int m_Layer;
...@@ -133,6 +137,16 @@ public: ...@@ -133,6 +137,16 @@ public:
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/**
* Load schematic text entry from \a aLine in a .sch file.
*
* @param aLine - Essentially this is file to read schematic text from.
* @param aErrorMsg - Description of the error if an error occurs while loading the
* schematic text.
* @return True if the schematic text loaded successfully.
*/
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 * @return the size of the "pen" that be used to draw or plot this item
*/ */
...@@ -246,6 +260,16 @@ public: ...@@ -246,6 +260,16 @@ public:
* @return bool - true if success writing else false. * @return bool - true if success writing else false.
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/**
* Load schematic label entry from \a aLine in a .sch file.
*
* @param aLine - Essentially this is file to read schematic label from.
* @param aErrorMsg - Description of the error if an error occurs while loading the
* schematic label.
* @return True if the schematic label loaded successfully.
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
}; };
...@@ -299,6 +323,16 @@ public: ...@@ -299,6 +323,16 @@ public:
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/**
* Load schematic global label entry from \a aLine in a .sch file.
*
* @param aLine - Essentially this is file to read schematic global label from.
* @param aErrorMsg - Description of the error if an error occurs while loading the
* schematic global label.
* @return True if the schematic global label loaded successfully.
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
/** Function HitTest /** Function HitTest
* @return true if the point aPosRef is within item area * @return true if the point aPosRef is within item area
* @param aPosRef = a wxPoint to test * @param aPosRef = a wxPoint to test
...@@ -390,6 +424,16 @@ public: ...@@ -390,6 +424,16 @@ public:
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/**
* Load schematic hierarchical label entry from \a aLine in a .sch file.
*
* @param aLine - Essentially this is file to read schematic hierarchical label from.
* @param aErrorMsg - Description of the error if an error occurs while loading the
* schematic hierarchical label.
* @return True if the schematic hierarchical label loaded successfully.
*/
virtual bool Load( LINE_READER& aLine, wxString& aErrorMsg );
/** Function HitTest /** Function HitTest
* @return true if the point aPosRef is within item area * @return true if the point aPosRef is within item area
* @param aPosRef = a wxPoint to test * @param aPosRef = a wxPoint to test
......
...@@ -7,11 +7,12 @@ ...@@ -7,11 +7,12 @@
#include "trigo.h" #include "trigo.h"
#include "confirm.h" #include "confirm.h"
#include "macros.h" #include "macros.h"
#include "class_sch_screen.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "netlist.h" #include "netlist.h"
#include "class_schematic_items.h"
/* Routine to start/end segment (BUS or wires) on junctions. /* Routine to start/end segment (BUS or wires) on junctions.
......
...@@ -7,16 +7,19 @@ ...@@ -7,16 +7,19 @@
#include "common.h" #include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "eda_dde.h" #include "eda_dde.h"
#include "eeschema_id.h" #include "wxEeschemaStruct.h"
#include "program.h" #include "eeschema_id.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "viewlib_frame.h" #include "viewlib_frame.h"
#include "lib_draw_item.h" #include "lib_draw_item.h"
#include "lib_pin.h" #include "lib_pin.h"
#include "class_drawsheet.h"
#include "class_drawsheetpath.h"
#include "class_marker_sch.h" #include "class_marker_sch.h"
#include "class_sch_component.h"
/** Function SchematicGeneralLocateAndDisplay /** Function SchematicGeneralLocateAndDisplay
......
...@@ -5,14 +5,16 @@ ...@@ -5,14 +5,16 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "eda_dde.h" #include "eda_dde.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "protos.h" #include "protos.h"
#include "lib_draw_item.h" #include "lib_draw_item.h"
#include "lib_pin.h" #include "lib_pin.h"
#include "class_sch_component.h"
/***************************************************************/ /***************************************************************/
......
...@@ -4,12 +4,14 @@ ...@@ -4,12 +4,14 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "sch_item_struct.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_libentry.h" #include "class_libentry.h"
#include "lib_pin.h" #include "lib_pin.h"
#include "class_sch_component.h"
/* Returns true if the point P is on the segment S. */ /* Returns true if the point P is on the segment S. */
......
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "confirm.h" #include "confirm.h"
#include "eda_doc.h" #include "eda_doc.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "wxstruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
...@@ -29,8 +30,7 @@ ...@@ -29,8 +30,7 @@
* Place the name of the component has loaded, select from a list in * Place the name of the component has loaded, select from a list in
* BufName * BufName
*/ */
wxString DataBaseGetName( WinEDA_DrawFrame* frame, wxString& Keys, wxString DataBaseGetName( WinEDA_DrawFrame* frame, wxString& Keys, wxString& BufName )
wxString& BufName )
{ {
wxArrayString nameList; wxArrayString nameList;
wxString msg; wxString msg;
......
...@@ -5,15 +5,19 @@ ...@@ -5,15 +5,19 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_marker_sch.h" #include "class_marker_sch.h"
#include "class_schematic_items.h"
#include "class_drawsheet.h"
#include "class_text-label.h"
// Imported function: // Imported function:
void DeleteItemsInList( WinEDA_DrawPanel* panel, void DeleteItemsInList( WinEDA_DrawPanel* panel, PICKED_ITEMS_LIST& aItemsList );
PICKED_ITEMS_LIST& aItemsList );
/* /*
...@@ -28,7 +32,7 @@ static int CountConnectedItems( WinEDA_SchematicFrame* frame, ...@@ -28,7 +32,7 @@ static int CountConnectedItems( WinEDA_SchematicFrame* frame,
bool TstJunction ) bool TstJunction )
{ {
SCH_ITEM* Struct; SCH_ITEM* Struct;
int count = 0; int count = 0;
if( frame->LocatePinEnd( ListStruct, pos ) ) if( frame->LocatePinEnd( ListStruct, pos ) )
count++; count++;
......
...@@ -6,10 +6,12 @@ ...@@ -6,10 +6,12 @@
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h" #include "common.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheet.h"
/**************************************************************************/ /**************************************************************************/
......
...@@ -12,13 +12,16 @@ ...@@ -12,13 +12,16 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "dialog_SVG_print_base.h" #include "dialog_SVG_print_base.h"
#include "dcsvg.h" #include "dcsvg.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "class_drawsheetpath.h"
// Keys for configuration // Keys for configuration
#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" ) #define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" )
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h" #include "common.h"
#include "wxstruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "netlist.h" #include "netlist.h"
......
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
#include "dialog_build_BOM_base.h" #include "dialog_build_BOM_base.h"
class WinEDA_DrawFrame;
class SCH_COMPONENT;
class wxConfig;
class DIALOG_BUILD_BOM : public DIALOG_BUILD_BOM_BASE class DIALOG_BUILD_BOM : public DIALOG_BUILD_BOM_BASE
{ {
private: private:
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "common.h" #include "common.h"
#include "confirm.h" #include "confirm.h"
#include "program.h"
#include "class_libentry.h" #include "class_libentry.h"
#include "libeditframe.h" #include "libeditframe.h"
......
...@@ -9,12 +9,10 @@ ...@@ -9,12 +9,10 @@
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "class_library.h" #include "class_library.h"
//#include "class_libentry.h"
#include "dialog_edit_component_in_lib.h" #include "dialog_edit_component_in_lib.h"
......
...@@ -8,11 +8,13 @@ ...@@ -8,11 +8,13 @@
#include "common.h" #include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_sch_component.h"
#include "dialog_edit_component_in_schematic.h" #include "dialog_edit_component_in_schematic.h"
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
#define __dialog_edit_component_in_schematic__ #define __dialog_edit_component_in_schematic__
#include "class_sch_cmp_field.h"
#include "template_fieldnames.h"
#include "dialog_edit_component_in_schematic_fbp.h" #include "dialog_edit_component_in_schematic_fbp.h"
/** /**
......
...@@ -8,13 +8,15 @@ ...@@ -8,13 +8,15 @@
#include "fctsys.h" #include "fctsys.h"
#include "wx/valgen.h" #include "wx/valgen.h"
#include "wxEeschemaStruct.h"
#include "common.h" #include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "drawtxt.h" #include "drawtxt.h"
#include "confirm.h" #include "confirm.h"
#include "class_text-label.h"
#include "dialog_edit_label.h" #include "dialog_edit_label.h"
......
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
#include "dialog_edit_label_base.h" #include "dialog_edit_label_base.h"
class WinEDA_SchematicFrame;
class SCH_TEXT;
class DialogLabelEditor : public DialogLabelEditor_Base class DialogLabelEditor : public DialogLabelEditor_Base
{ {
private: private:
......
...@@ -9,12 +9,14 @@ ...@@ -9,12 +9,14 @@
#include "common.h" #include "common.h"
#include "confirm.h" #include "confirm.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "class_library.h" #include "class_library.h"
#include "class_sch_cmp_field.h"
#include "template_fieldnames.h"
#include "dialog_edit_libentry_fields_in_lib_base.h" #include "dialog_edit_libentry_fields_in_lib_base.h"
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
#include "common.h" #include "common.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "netlist.h" #include "netlist.h"
......
...@@ -10,8 +10,9 @@ ...@@ -10,8 +10,9 @@
#include "common.h" #include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "bitmaps.h" #include "bitmaps.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "netlist.h" #include "netlist.h"
#include "class_marker_sch.h" #include "class_marker_sch.h"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "fctsys.h" #include "fctsys.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "program.h" //#include "general.h"
#include "class_marker_sch.h" #include "class_marker_sch.h"
/** /**
......
...@@ -3,15 +3,12 @@ ...@@ -3,15 +3,12 @@
* Handles the dialog so set current texts and pins sizes in LibEdit * Handles the dialog so set current texts and pins sizes in LibEdit
*/ */
#include "fctsys.h" #include "fctsys.h"
//#include "appl_wxstruct.h"
#include "common.h" #include "common.h"
//#include "class_drawpanel.h" #include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "dialog_libedit_dimensions_base.h" #include "dialog_libedit_dimensions_base.h"
......
...@@ -8,10 +8,13 @@ ...@@ -8,10 +8,13 @@
#include "common.h" #include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "eeschema_config.h" #include "eeschema_config.h"
#include "class_drawsheet.h"
#include "class_drawsheetpath.h"
#include "dialog_print_using_printer_base.h" #include "dialog_print_using_printer_base.h"
......
...@@ -28,13 +28,16 @@ ...@@ -28,13 +28,16 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "plot_common.h" #include "plot_common.h"
#include "confirm.h" #include "confirm.h"
#include "worksheet.h" #include "worksheet.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheetpath.h"
#include "dialog_plot_schematic_DXF_base.h" #include "dialog_plot_schematic_DXF_base.h"
......
...@@ -31,10 +31,13 @@ ...@@ -31,10 +31,13 @@
#include "confirm.h" #include "confirm.h"
#include "plot_common.h" #include "plot_common.h"
#include "worksheet.h" #include "worksheet.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheetpath.h"
#include "dialog_plot_schematic_HPGL_base.h" #include "dialog_plot_schematic_HPGL_base.h"
enum PageFormatReq enum PageFormatReq
......
...@@ -31,10 +31,13 @@ ...@@ -31,10 +31,13 @@
#include "confirm.h" #include "confirm.h"
#include "worksheet.h" #include "worksheet.h"
#include "plot_common.h" #include "plot_common.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheetpath.h"
enum PageFormatReq { enum PageFormatReq {
PAGE_SIZE_AUTO, PAGE_SIZE_AUTO,
......
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
......
...@@ -7,11 +7,13 @@ ...@@ -7,11 +7,13 @@
#include "common.h" #include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_sch_component.h"
static void AbortMoveCmpField( WinEDA_DrawPanel* Panel, wxDC* DC ); static void AbortMoveCmpField( WinEDA_DrawPanel* Panel, wxDC* DC );
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "common.h" #include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
......
...@@ -10,10 +10,13 @@ ...@@ -10,10 +10,13 @@
#include "drawtxt.h" #include "drawtxt.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_text-label.h"
static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
static void ExitMoveTexte( WinEDA_DrawPanel* panel, wxDC* DC ); static void ExitMoveTexte( WinEDA_DrawPanel* panel, wxDC* DC );
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "wxstruct.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
#include "wx/statline.h" #include "wx/statline.h"
#include "general.h"
class wxBoxSizer; class wxBoxSizer;
class wxStaticLine; class wxStaticLine;
class wxStdDialogButtonSizer; class wxStdDialogButtonSizer;
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
#include "fctsys.h" #include "fctsys.h"
#include "confirm.h" #include "confirm.h"
#include "macros.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "class_library.h" #include "class_library.h"
......
...@@ -8,14 +8,20 @@ ...@@ -8,14 +8,20 @@
#include "common.h" #include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_drawsheet.h"
#include "class_drawsheetpath.h"
#include "class_sch_component.h"
#include "class_schematic_items.h"
#include "build_version.h" #include "build_version.h"
static EDA_BaseStruct* HighLightStruct = NULL; static EDA_BaseStruct* HighLightStruct = NULL;
......
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
#include "bitmaps.h" #include "bitmaps.h"
#include "eda_dde.h" #include "eda_dde.h"
#include "id.h" #include "id.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "hotkeys.h" #include "hotkeys.h"
......
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h" #include "common.h"
#include "eeschema_id.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "program.h" #include "wxEeschemaStruct.h"
#include "eeschema_id.h"
#include "general.h" #include "general.h"
#include "netlist.h" #include "netlist.h"
#include "protos.h" #include "protos.h"
...@@ -17,6 +18,8 @@ ...@@ -17,6 +18,8 @@
#include "eeschema_config.h" #include "eeschema_config.h"
#include "worksheet.h" #include "worksheet.h"
#include "hotkeys.h" #include "hotkeys.h"
#include "class_drawsheet.h"
#include "dialog_eeschema_options.h" #include "dialog_eeschema_options.h"
#include "dialog_hotkeys_editor.h" #include "dialog_hotkeys_editor.h"
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
#define GROUPCOMMON wxT( "/common" ) #define GROUPCOMMON wxT( "/common" )
#define GROUPLIB wxT( "libraries" ) #define GROUPLIB wxT( "libraries" )
#include "netlist.h"
extern int g_PenMinWidth; extern int g_PenMinWidth;
/* saving parameters option : */ /* saving parameters option : */
......
...@@ -9,14 +9,17 @@ ...@@ -9,14 +9,17 @@
#include "gestfich.h" #include "gestfich.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "bitmaps.h" #include "bitmaps.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "netlist.h" #include "netlist.h"
#include "class_marker_sch.h" #include "class_marker_sch.h"
#include "lib_pin.h" #include "lib_pin.h"
#include "protos.h" #include "protos.h"
#include "erc.h" #include "erc.h"
#include "class_sch_component.h"
#include "class_drawsheet.h"
#include "dialog_erc.h" #include "dialog_erc.h"
......
...@@ -2,15 +2,20 @@ ...@@ -2,15 +2,20 @@
* events_called_functions.cpp * events_called_functions.cpp
* some events functions * some events functions
*/ */
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "kicad_device_context.h" #include "kicad_device_context.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "protos.h" #include "protos.h"
#include "class_sch_component.h"
#include "class_text-label.h"
/** Event function WinEDA_SchematicFrame::OnCopySchematicItemRequest /** Event function WinEDA_SchematicFrame::OnCopySchematicItemRequest
* duplicate the current located item * duplicate the current located item
......
...@@ -7,13 +7,14 @@ ...@@ -7,13 +7,14 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "class_library.h" #include "class_library.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "class_drawsheet.h"
......
...@@ -14,13 +14,17 @@ ...@@ -14,13 +14,17 @@
#include "confirm.h" #include "confirm.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "gestfich.h" #include "gestfich.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "class_marker_sch.h" #include "class_marker_sch.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "lib_pin.h" #include "lib_pin.h"
#include "class_sch_component.h"
#include "class_drawsheet.h"
#include "class_drawsheetpath.h"
#include "kicad_device_context.h" #include "kicad_device_context.h"
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
#include "block_commande.h" #include "block_commande.h"
#include "program.h"
class SCH_ITEM; class SCH_ITEM;
class SCH_SHEET; class SCH_SHEET;
class TRANSFORM;
#define EESCHEMA_VERSION 2 #define EESCHEMA_VERSION 2
...@@ -28,14 +28,14 @@ class SCH_SHEET; ...@@ -28,14 +28,14 @@ class SCH_SHEET;
#define MAX_PIN_INFO 10 #define MAX_PIN_INFO 10
#define TXTMARGE 10 /* Offset in mils for placement of labels #define TXTMARGE 10 // Offset in mils for placement of labels and pin numbers.
* and pin numbers. */
#define HIGHLIGHT_COLOR WHITE #define HIGHLIGHT_COLOR WHITE
/* Used for EDA_BaseStruct, .m_Select member */ /* Used for EDA_BaseStruct, .m_Select member */
#define IS_SELECTED 1 #define IS_SELECTED 1
#define TEXT_NO_VISIBLE 1
//#define GR_DEFAULT_DRAWMODE GR_COPY //#define GR_DEFAULT_DRAWMODE GR_COPY
#define GR_DEFAULT_DRAWMODE GR_COPY #define GR_DEFAULT_DRAWMODE GR_COPY
...@@ -105,6 +105,31 @@ typedef enum ...@@ -105,6 +105,31 @@ typedef enum
} FileSaveType; } FileSaveType;
/* Rotation, mirror of graphic items in components bodies are handled by a
* transform matrix. The default matix is useful to draw lib entries with
* a defualt matix ( no rotation, no mirror but Y axis is bottom to top, and
* Y draw axis is to to bottom so we must have a default matix that reverses
* the Y coordinate and keeps the X coordiate
*/
extern TRANSFORM DefaultTransform;
#define MIN_BUSLINES_THICKNESS 12 // min bus lines and entries thickness
#define MAX_LAYERS 44
class LayerStruct
{
public:
char LayerNames[MAX_LAYERS + 1][8];
int LayerColor[MAX_LAYERS + 1];
char LayerStatus[MAX_LAYERS + 1];
int NumberOfLayers;
int CurrentLayer;
int CurrentWidth;
int CommonColor;
int Flags;
};
extern SCH_ITEM* g_ItemToRepeat; /* Pointer to the last structure used extern SCH_ITEM* g_ItemToRepeat; /* Pointer to the last structure used
* by the repeat command. NULL if no * by the repeat command. NULL if no
* item to repeat */ * item to repeat */
......
...@@ -8,11 +8,13 @@ ...@@ -8,11 +8,13 @@
#include "common.h" #include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_sch_component.h"
#include "viewlib_frame.h" #include "viewlib_frame.h"
#include "get_component_dialog.h" #include "get_component_dialog.h"
......
...@@ -8,9 +8,12 @@ ...@@ -8,9 +8,12 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "bitmaps.h" #include "bitmaps.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "class_drawsheet.h"
#include "class_drawsheetpath.h"
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/treectrl.h" #include "wx/treectrl.h"
......
...@@ -6,12 +6,15 @@ ...@@ -6,12 +6,15 @@
#include "common.h" #include "common.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "hotkeys.h" #include "hotkeys.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "class_libentry.h" #include "class_libentry.h"
#include "class_schematic_items.h"
#include "class_sch_component.h"
#include "class_drawsheet.h"
#include "dialogs/dialog_schematic_find.h" #include "dialogs/dialog_schematic_find.h"
......
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "plot_common.h" #include "plot_common.h"
#include "trigo.h" #include "trigo.h"
#include "wxstruct.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
......
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "plot_common.h" #include "plot_common.h"
#include "trigo.h" #include "trigo.h"
#include "wxstruct.h"
#include "bezier_curves.h" #include "bezier_curves.h"
#include "general.h" #include "general.h"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "plot_common.h" #include "plot_common.h"
#include "trigo.h" #include "trigo.h"
#include "wxstruct.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include "gestfich.h" #include "gestfich.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "base_struct.h" #include "base_struct.h"
#include "drawtxt.h" #include "drawtxt.h"
#include "kicad_string.h" #include "kicad_string.h"
...@@ -13,12 +14,12 @@ ...@@ -13,12 +14,12 @@
#include "plot_common.h" #include "plot_common.h"
#include "trigo.h" #include "trigo.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_libentry.h" #include "class_libentry.h"
#include "transform.h" #include "transform.h"
#include "lib_field.h" #include "lib_field.h"
#include "template_fieldnames.h"
/*******************/ /*******************/
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#ifndef CLASS_LIBENTRY_FIELDS_H #ifndef CLASS_LIBENTRY_FIELDS_H
#define CLASS_LIBENTRY_FIELDS_H #define CLASS_LIBENTRY_FIELDS_H
#include "program.h" //#include "general.h"
#include "lib_draw_item.h" #include "lib_draw_item.h"
......
...@@ -5,12 +5,13 @@ ...@@ -5,12 +5,13 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "macros.h"
#include "trigo.h" #include "trigo.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "drawtxt.h" #include "drawtxt.h"
#include "plot_common.h" #include "plot_common.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
......
...@@ -5,15 +5,19 @@ ...@@ -5,15 +5,19 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "plot_common.h" #include "plot_common.h"
#include "trigo.h" #include "trigo.h"
#include "wxstruct.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "lib_polyline.h" #include "lib_polyline.h"
#include "transform.h" #include "transform.h"
#include <boost/foreach.hpp>
LIB_POLYLINE::LIB_POLYLINE( LIB_COMPONENT* aParent ) : LIB_POLYLINE::LIB_POLYLINE( LIB_COMPONENT* aParent ) :
LIB_DRAW_ITEM( COMPONENT_POLYLINE_DRAW_TYPE, aParent ) LIB_DRAW_ITEM( COMPONENT_POLYLINE_DRAW_TYPE, aParent )
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "plot_common.h" #include "plot_common.h"
#include "trigo.h" #include "trigo.h"
#include "wxstruct.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
......
...@@ -10,12 +10,13 @@ ...@@ -10,12 +10,13 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "plot_common.h" #include "plot_common.h"
#include "drawtxt.h" #include "drawtxt.h"
#include "trigo.h" #include "trigo.h"
#include "wxstruct.h"
#include "program.h"
#include "lib_draw_item.h" #include "lib_draw_item.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
......
...@@ -5,12 +5,15 @@ ...@@ -5,12 +5,15 @@
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h"
#include "wxstruct.h"
#include "sch_item_struct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "netlist.h" #include "netlist.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_sch_component.h"
/* /*
......
...@@ -5,17 +5,19 @@ ...@@ -5,17 +5,19 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "eeschema_id.h" #include "class_sch_screen.h"
#include "program.h" #include "eeschema_id.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "class_library.h" #include "class_library.h"
#include "template_fieldnames.h"
#include "dialog_lib_new_component.h" #include "dialog_lib_new_component.h"
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "confirm.h" #include "confirm.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
......
...@@ -8,12 +8,13 @@ ...@@ -8,12 +8,13 @@
#include "fctsys.h" #include "fctsys.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "confirm.h" #include "confirm.h"
#include "bitmaps.h" #include "bitmaps.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "hotkeys.h" #include "hotkeys.h"
#include "class_sch_screen.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
......
...@@ -11,14 +11,13 @@ ...@@ -11,14 +11,13 @@
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "class_sch_screen.h"
#include "program.h"
#include "general.h" #include "general.h"
//#include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "class_library.h" #include "class_library.h"
/** function OnPlotCurrentComponent /** function OnPlotCurrentComponent
* plot in SVG or PNG format the curren component * plot in SVG or PNG format the curren component
*/ */
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "common.h" #include "common.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
......
...@@ -7,13 +7,15 @@ ...@@ -7,13 +7,15 @@
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "common.h" #include "common.h"
#include "macros.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "eda_doc.h" #include "eda_doc.h"
#include "bitmaps.h" #include "bitmaps.h"
#include "gr_basic.h" #include "gr_basic.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "eeschema_id.h" #include "eeschema_id.h"
......
...@@ -6,14 +6,16 @@ ...@@ -6,14 +6,16 @@
#define __LIBEDITFRM_H__ #define __LIBEDITFRM_H__
#include "wxstruct.h" #include "wxstruct.h"
#include "class_sch_screen.h"
#include "lib_draw_item.h" #include "lib_draw_item.h"
class SCH_SCREEN; class WinEDA_SchematicFrame;
class CMP_LIBRARY; class CMP_LIBRARY;
class LIB_COMPONENT; class LIB_COMPONENT;
class LIB_ALIAS; class LIB_ALIAS;
class LIB_FIELD;
class WinEDA_bodygraphics_PropertiesFrame; class WinEDA_bodygraphics_PropertiesFrame;
class Dialog_BodyGraphicText_Properties; class Dialog_BodyGraphicText_Properties;
......
...@@ -7,12 +7,13 @@ ...@@ -7,12 +7,13 @@
#include "common.h" #include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "class_sch_screen.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "class_library.h" #include "class_library.h"
#include "template_fieldnames.h"
void WinEDA_LibeditFrame::EditField( wxDC* DC, LIB_FIELD* Field ) void WinEDA_LibeditFrame::EditField( wxDC* DC, LIB_FIELD* Field )
......
This diff is collapsed.
...@@ -4,14 +4,19 @@ ...@@ -4,14 +4,19 @@
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
#include "program.h"
#include "trigo.h" #include "trigo.h"
#include "macros.h" #include "macros.h"
#include "class_sch_screen.h"
#include "general.h" #include "general.h"
#include "class_marker_sch.h" #include "class_marker_sch.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_schematic_items.h"
#include "class_sch_component.h"
#include "class_drawsheet.h"
#include "lib_pin.h"
#include "template_fieldnames.h"
static bool IsItemInBox(EDA_Rect& aBox, SCH_ITEM* DrawStruct ); static bool IsItemInBox(EDA_Rect& aBox, SCH_ITEM* DrawStruct );
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#include "common.h" #include "common.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
#include "bitmaps.h" #include "bitmaps.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "eeschema_id.h" #include "eeschema_id.h"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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