Commit 37ad67df authored by Wayne Stambaugh's avatar Wayne Stambaugh

EESchema file name and location house keeping.

parent 32394e05
...@@ -4,6 +4,20 @@ KiCad ChangeLog 2010 ...@@ -4,6 +4,20 @@ 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-11 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
++EESchema
* Make schematic object file naming consistent.
* Move annotate dialog to dialogs subdirectory and set the "Annotation"
button as the default.
* Move ERC dialog to dialogs subdirectory and set the "Test Erc" button
as the default.
* Move the print dialog to dialogs subdirectory and set the "Print" button
as the default.
* Create print dialog header and move the OnPrint() method into
schframe.cpp.
2010-nov-10 UPDATE Wayne Stambaugh <stambaughw@verizon.net> 2010-nov-10 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================ ================================================================================
++EESchema ++EESchema
......
...@@ -8,26 +8,16 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ...@@ -8,26 +8,16 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
set(EESCHEMA_SRCS set(EESCHEMA_SRCS
annotate.cpp annotate.cpp
annotate_dialog.cpp
backanno.cpp backanno.cpp
block.cpp block.cpp
block_libedit.cpp block_libedit.cpp
build_BOM.cpp build_BOM.cpp
busentry.cpp busentry.cpp
bus-wire-junction.cpp bus-wire-junction.cpp
class_drawsheet.cpp
class_drawsheetpath.cpp
class_drc_erc_item.cpp class_drc_erc_item.cpp
class_hierarchical_PIN_sheet.cpp
class_libentry.cpp class_libentry.cpp
class_library.cpp class_library.cpp
class_marker_sch.cpp
class_netlist_object.cpp class_netlist_object.cpp
class_sch_cmp_field.cpp
class_sch_component.cpp
class_schematic_items.cpp
class_sch_screen.cpp
class_text-label.cpp
cleanup.cpp cleanup.cpp
cmp_library_keywords.cpp cmp_library_keywords.cpp
cmp_library_lexer.cpp cmp_library_lexer.cpp
...@@ -43,7 +33,8 @@ set(EESCHEMA_SRCS ...@@ -43,7 +33,8 @@ set(EESCHEMA_SRCS
dialogs/dialog_plot_schematic_HPGL_base.cpp dialogs/dialog_plot_schematic_HPGL_base.cpp
dialogs/dialog_plot_schematic_PS.cpp dialogs/dialog_plot_schematic_PS.cpp
dialogs/dialog_plot_schematic_PS_base.cpp dialogs/dialog_plot_schematic_PS_base.cpp
dialog_annotate_base.cpp dialogs/annotate_dialog.cpp
dialogs/dialog_annotate_base.cpp
dialog_bodygraphictext_properties_base.cpp dialog_bodygraphictext_properties_base.cpp
dialog_build_BOM.cpp dialog_build_BOM.cpp
dialog_build_BOM_base.cpp dialog_build_BOM_base.cpp
...@@ -59,8 +50,8 @@ set(EESCHEMA_SRCS ...@@ -59,8 +50,8 @@ set(EESCHEMA_SRCS
dialog_eeschema_config_fbp.cpp dialog_eeschema_config_fbp.cpp
dialog_eeschema_options_base.cpp dialog_eeschema_options_base.cpp
dialog_eeschema_options.cpp dialog_eeschema_options.cpp
dialog_erc.cpp dialogs/dialog_erc.cpp
dialog_erc_base.cpp dialogs/dialog_erc_base.cpp
dialog_libedit_dimensions.cpp dialog_libedit_dimensions.cpp
dialog_libedit_dimensions_base.cpp dialog_libedit_dimensions_base.cpp
dialog_lib_edit_draw_item.cpp dialog_lib_edit_draw_item.cpp
...@@ -69,8 +60,8 @@ set(EESCHEMA_SRCS ...@@ -69,8 +60,8 @@ set(EESCHEMA_SRCS
dialog_lib_edit_pin_base.cpp dialog_lib_edit_pin_base.cpp
dialog_lib_new_component.cpp dialog_lib_new_component.cpp
dialog_lib_new_component_base.cpp dialog_lib_new_component_base.cpp
dialog_print_using_printer_base.cpp dialogs/dialog_print_using_printer_base.cpp
dialog_print_using_printer.cpp dialogs/dialog_print_using_printer.cpp
dialog_sch_sheet_props.cpp dialog_sch_sheet_props.cpp
dialog_sch_sheet_props_base.cpp dialog_sch_sheet_props_base.cpp
dialogs/dialog_schematic_find.cpp dialogs/dialog_schematic_find.cpp
...@@ -122,6 +113,15 @@ set(EESCHEMA_SRCS ...@@ -122,6 +113,15 @@ set(EESCHEMA_SRCS
operations_on_items_lists.cpp operations_on_items_lists.cpp
pinedit.cpp pinedit.cpp
plot.cpp plot.cpp
sch_component.cpp
sch_field.cpp
sch_items.cpp
sch_marker.cpp
sch_screen.cpp
sch_sheet.cpp
sch_sheet_path.cpp
sch_sheet_pin.cpp
sch_text.cpp
schedit.cpp schedit.cpp
schematic_undo_redo.cpp schematic_undo_redo.cpp
schframe.cpp schframe.cpp
......
...@@ -10,12 +10,12 @@ ...@@ -10,12 +10,12 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "wxstruct.h" #include "wxstruct.h"
#include "class_sch_screen.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "class_library.h" #include "class_library.h"
#include "protos.h" #include "protos.h"
#include "class_sch_screen.h" #include "sch_component.h"
#include "class_sch_component.h"
#include "netlist.h" #include "netlist.h"
#include "lib_pin.h" #include "lib_pin.h"
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
#include "build_version.h" #include "build_version.h"
#include "general.h" #include "general.h"
#include "class_drawsheetpath.h" #include "sch_sheet_path.h"
#include "class_sch_component.h" #include "sch_component.h"
/** function FillFootprintFieldForAllInstancesofComponent /** function FillFootprintFieldForAllInstancesofComponent
......
...@@ -13,14 +13,14 @@ ...@@ -13,14 +13,14 @@
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "general.h" #include "general.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 "sch_marker.h"
#include "class_text-label.h" #include "sch_items.h"
#include "class_sch_component.h" #include "sch_text.h"
#include "class_drawsheet.h" #include "sch_component.h"
#include "sch_sheet.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
......
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
#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 "sch_sheet.h"
#include "template_fieldnames.h" #include "template_fieldnames.h"
#include "class_sch_component.h" #include "sch_component.h"
#include "build_version.h" #include "build_version.h"
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
#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 "sch_items.h"
#include "class_text-label.h" #include "sch_text.h"
#include "class_sch_component.h" #include "sch_component.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
/* Routines Locales */ /* Routines Locales */
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_schematic_items.h" #include "sch_items.h"
static int s_LastShape = '\\'; static int s_LastShape = '\\';
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "general.h" #include "general.h"
#include "class_sch_component.h" #include "sch_component.h"
#include "class_netlist_object.h" #include "class_netlist_object.h"
#if defined(DEBUG) #if defined(DEBUG)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#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 "sch_sheet_path.h"
#include "lib_pin.h" // LIB_PIN::ReturnPinStringNum( m_PinNum ) #include "lib_pin.h" // LIB_PIN::ReturnPinStringNum( m_PinNum )
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "netlist.h" #include "netlist.h"
#include "class_schematic_items.h" #include "sch_items.h"
/* Routine to start/end segment (BUS or wires) on junctions. /* Routine to start/end segment (BUS or wires) on junctions.
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
#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 "sch_sheet.h"
#include "class_drawsheetpath.h" #include "sch_sheet_path.h"
#include "class_marker_sch.h" #include "sch_marker.h"
#include "class_sch_component.h" #include "sch_component.h"
/** Function SchematicGeneralLocateAndDisplay /** Function SchematicGeneralLocateAndDisplay
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#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" #include "sch_component.h"
/***************************************************************/ /***************************************************************/
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#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" #include "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. */
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_marker_sch.h" #include "sch_marker.h"
#include "class_schematic_items.h" #include "sch_items.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
#include "class_text-label.h" #include "sch_text.h"
// Imported function: // Imported function:
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
/**************************************************************************/ /**************************************************************************/
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "general.h" #include "general.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "class_drawsheetpath.h" #include "sch_sheet_path.h"
// Keys for configuration // Keys for configuration
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#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 "sch_component.h"
#include "dialog_edit_component_in_schematic.h" #include "dialog_edit_component_in_schematic.h"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#define __dialog_edit_component_in_schematic__ #define __dialog_edit_component_in_schematic__
#include "class_sch_cmp_field.h" #include "sch_field.h"
#include "template_fieldnames.h" #include "template_fieldnames.h"
#include "dialog_edit_component_in_schematic_fbp.h" #include "dialog_edit_component_in_schematic_fbp.h"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "general.h" #include "general.h"
#include "drawtxt.h" #include "drawtxt.h"
#include "confirm.h" #include "confirm.h"
#include "class_text-label.h" #include "sch_text.h"
#include "dialog_edit_label.h" #include "dialog_edit_label.h"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#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 "sch_field.h"
#include "template_fieldnames.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,7 @@ ...@@ -12,8 +12,7 @@
#include "fctsys.h" #include "fctsys.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
//#include "general.h" #include "sch_marker.h"
#include "class_marker_sch.h"
/** /**
* Class ERC_HTML_LISTBOX * Class ERC_HTML_LISTBOX
......
...@@ -69,6 +69,8 @@ void DIALOG_ANNOTATE::InitValues() ...@@ -69,6 +69,8 @@ void DIALOG_ANNOTATE::InitValues()
annotate_right_down_bitmap->SetBitmap(bitmap1); annotate_right_down_bitmap->SetBitmap(bitmap1);
wxBitmap bitmap2(add_text_xpm); wxBitmap bitmap2(add_text_xpm);
annotate_by_value_bitmap->SetBitmap(bitmap2); annotate_by_value_bitmap->SetBitmap(bitmap2);
m_btnApply->SetDefault();
} }
...@@ -92,12 +94,10 @@ void DIALOG_ANNOTATE::OnApplyClick( wxCommandEvent& event ) ...@@ -92,12 +94,10 @@ void DIALOG_ANNOTATE::OnApplyClick( wxCommandEvent& event )
message += _( "on the current sheet?" ); message += _( "on the current sheet?" );
message += _( "\n\nThis operation will change the current annotation and cannot be undone." ); message += _( "\n\nThis operation will change the current annotation and cannot be undone." );
response = wxMessageBox( message, wxT( "" ), response = wxMessageBox( message, wxT( "" ), wxICON_EXCLAMATION | wxOK | wxCANCEL );
wxICON_EXCLAMATION | wxOK | wxCANCEL );
if (response == wxCANCEL) if (response == wxCANCEL)
return; return;
AnnotateComponents( m_Parent, GetLevel(), GetSortOrder(), AnnotateComponents( m_Parent, GetLevel(), GetSortOrder(), GetResetItems() , true );
GetResetItems() , true );
m_btnClear->Enable(); m_btnClear->Enable();
} }
......
...@@ -9,13 +9,17 @@ ...@@ -9,13 +9,17 @@
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "kicad_string.h"
#include "gestfich.h"
#include "bitmaps.h" #include "bitmaps.h"
#include "appl_wxstruct.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "general.h" #include "general.h"
#include "netlist.h" #include "netlist.h"
#include "class_marker_sch.h" #include "sch_marker.h"
#include "sch_sheet.h"
#include "lib_pin.h" #include "lib_pin.h"
#include "protos.h" #include "protos.h"
...@@ -24,6 +28,9 @@ ...@@ -24,6 +28,9 @@
#include "erc.h" #include "erc.h"
bool DIALOG_ERC::m_writeErcFile = false;
BEGIN_EVENT_TABLE( DIALOG_ERC, DIALOG_ERC_BASE ) BEGIN_EVENT_TABLE( DIALOG_ERC, DIALOG_ERC_BASE )
EVT_COMMAND_RANGE( ID_MATRIX_0, ID_MATRIX_0 + ( PIN_NMAX * PIN_NMAX ) - 1, EVT_COMMAND_RANGE( ID_MATRIX_0, ID_MATRIX_0 + ( PIN_NMAX * PIN_NMAX ) - 1,
wxEVT_COMMAND_BUTTON_CLICKED, wxEVT_COMMAND_BUTTON_CLICKED,
...@@ -50,15 +57,13 @@ void DIALOG_ERC::Init() ...@@ -50,15 +57,13 @@ void DIALOG_ERC::Init()
for( int jj = 0; jj < PIN_NMAX; jj++ ) for( int jj = 0; jj < PIN_NMAX; jj++ )
m_ButtonList[ii][jj] = NULL; m_ButtonList[ii][jj] = NULL;
m_WriteResultOpt->SetValue( WriteFichierERC ); m_WriteResultOpt->SetValue( m_writeErcFile );
wxString num; wxString num;
num.Printf( wxT( "%d" ), g_EESchemaVar.NbErrorErc ); num.Printf( wxT( "%d" ), g_EESchemaVar.NbErrorErc );
m_TotalErrCount->SetLabel( num ); m_TotalErrCount->SetLabel( num );
num.Printf( wxT( num.Printf( wxT( "%d" ), g_EESchemaVar.NbErrorErc - g_EESchemaVar.NbWarningErc );
"%d" ), g_EESchemaVar.NbErrorErc -
g_EESchemaVar.NbWarningErc );
m_LastErrCount->SetLabel( num ); m_LastErrCount->SetLabel( num );
num.Printf( wxT( "%d" ), g_EESchemaVar.NbWarningErc ); num.Printf( wxT( "%d" ), g_EESchemaVar.NbWarningErc );
...@@ -68,6 +73,9 @@ void DIALOG_ERC::Init() ...@@ -68,6 +73,9 @@ void DIALOG_ERC::Init()
// Init Panel Matrix // Init Panel Matrix
ReBuildMatrixPanel(); ReBuildMatrixPanel();
// Set the run ERC button as the default button.
m_buttonERC->SetDefault();
} }
...@@ -377,10 +385,171 @@ void DIALOG_ERC::ChangeErrorLevel( wxCommandEvent& event ) ...@@ -377,10 +385,171 @@ void DIALOG_ERC::ChangeErrorLevel( wxCommandEvent& event )
if( new_bitmap_xpm ) if( new_bitmap_xpm )
{ {
delete Butt; delete Butt;
Butt = new wxBitmapButton( m_PanelERCOptions, id, Butt = new wxBitmapButton( m_PanelERCOptions, id, wxBitmap( new_bitmap_xpm ), pos );
wxBitmap( new_bitmap_xpm ), pos );
m_ButtonList[y][x] = Butt; m_ButtonList[y][x] = Butt;
DiagErc[y][x] = DiagErc[x][y] = level; DiagErc[y][x] = DiagErc[x][y] = level;
} }
} }
void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
{
wxFileName fn;
unsigned NetItemRef;
unsigned OldItem;
unsigned StartNet;
int NetNbItems, MinConn;
if( !DiagErcTableInit )
{
memcpy( DiagErc, DefaultDiagErc, sizeof(DefaultDiagErc) );
DiagErcTableInit = TRUE;
}
m_writeErcFile = m_WriteResultOpt->GetValue();
ReAnnotatePowerSymbolsOnly();
if( m_Parent->CheckAnnotate( aMessagesList, false ) )
{
if( aMessagesList )
{
wxString msg = _( "Annotation required!" );
msg += wxT( "\n" );
aMessagesList->Add( msg );
}
return;
}
/* Erase all DRC markers */
DeleteAllMarkers( MARK_ERC );
g_EESchemaVar.NbErrorErc = 0;
g_EESchemaVar.NbWarningErc = 0;
/* Cleanup the entire hierarchy */
SCH_SCREENS ScreenList;
for( SCH_SCREEN* Screen = ScreenList.GetFirst();
Screen != NULL;
Screen = ScreenList.GetNext() )
{
bool ModifyWires;
ModifyWires = Screen->SchematicCleanUp( NULL );
/* if wire list has changed, delete Undo Redo list to avoid
* pointers on deleted data problems */
if( ModifyWires )
Screen->ClearUndoRedoList();
}
/* Test duplicate sheet names
* inside a given sheet, one cannot have sheets with duplicate names (file
* names can be duplicated).
*/
int errcnt = TestDuplicateSheetNames( true );
g_EESchemaVar.NbErrorErc += errcnt;
m_Parent->BuildNetListBase();
/* Reset the flag m_FlagOfConnection, that will be used next, in
* calculations */
for( unsigned ii = 0; ii < g_NetObjectslist.size(); ii++ )
g_NetObjectslist[ii]->m_FlagOfConnection = UNCONNECTED;
StartNet = OldItem = 0;
NetNbItems = 0;
MinConn = NOC;
for( NetItemRef = 0; NetItemRef < g_NetObjectslist.size(); NetItemRef++ )
{
if( g_NetObjectslist[OldItem]->GetNet() != g_NetObjectslist[NetItemRef]->GetNet() )
{ // New net found:
MinConn = NOC;
NetNbItems = 0;
StartNet = NetItemRef;
}
switch( g_NetObjectslist[NetItemRef]->m_Type )
{
case NET_ITEM_UNSPECIFIED:
case NET_SEGMENT:
case NET_BUS:
case NET_JONCTION:
case NET_LABEL:
case NET_BUSLABELMEMBER:
case NET_PINLABEL:
case NET_GLOBLABEL:
case NET_GLOBBUSLABELMEMBER:
// These items do not create erc problems
break;
case NET_HIERLABEL:
case NET_HIERBUSLABELMEMBER:
case NET_SHEETLABEL:
case NET_SHEETBUSLABELMEMBER:
// ERC problems when pin sheets do not match hierarchical labels.
// Each pin sheet must match a hierarchical label
// Each hierarchical label must match a pin sheet
TestLabel( m_Parent->DrawPanel, NetItemRef, StartNet );
break;
case NET_NOCONNECT:
// ERC problems when a noconnect symbol is connected to more than
// one pin.
MinConn = NET_NC;
if( NetNbItems != 0 )
Diagnose( m_Parent->DrawPanel, g_NetObjectslist[NetItemRef], NULL, MinConn, UNC );
break;
case NET_PIN:
// Look for ERC problems between pins:
TestOthersItems( m_Parent->DrawPanel, NetItemRef, StartNet, &NetNbItems, &MinConn );
break;
}
OldItem = NetItemRef;
}
// Displays global results:
wxString num;
num.Printf( wxT( "%d" ), g_EESchemaVar.NbErrorErc );
m_TotalErrCount->SetLabel( num );
num.Printf( wxT( "%d" ), g_EESchemaVar.NbErrorErc - g_EESchemaVar.NbWarningErc );
m_LastErrCount->SetLabel( num );
num.Printf( wxT( "%d" ), g_EESchemaVar.NbWarningErc );
m_LastWarningCount->SetLabel( num );
// Display diags:
DisplayERC_MarkersList();
// Display new markers:
m_Parent->DrawPanel->Refresh();
if( m_writeErcFile )
{
fn = g_RootSheet->m_AssociatedScreen->m_FileName;
fn.SetExt( wxT( "erc" ) );
wxFileDialog dlg( this, _( "ERC File" ), fn.GetPath(), fn.GetFullName(),
_( "Electronic rule check file (.erc)|*.erc" ),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
if( dlg.ShowModal() == wxID_CANCEL )
return;
if( WriteDiagnosticERC( dlg.GetPath() ) )
{
Close( TRUE );
ExecuteFile( this, wxGetApp().GetEditorName(), QuoteFullPath( fn ) );
}
}
}
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "dialog_erc_base.h" #include "dialog_erc_base.h"
/* Variable locales */ /* Variable locales */
extern int WriteFichierERC;
extern int DiagErc[PIN_NMAX][PIN_NMAX]; extern int DiagErc[PIN_NMAX][PIN_NMAX];
extern bool DiagErcTableInit; // go to TRUE after DiagErc init extern bool DiagErcTableInit; // go to TRUE after DiagErc init
extern int DefaultDiagErc[PIN_NMAX][PIN_NMAX]; extern int DefaultDiagErc[PIN_NMAX][PIN_NMAX];
...@@ -35,7 +34,8 @@ class DIALOG_ERC : public DIALOG_ERC_BASE ...@@ -35,7 +34,8 @@ class DIALOG_ERC : public DIALOG_ERC_BASE
private: private:
WinEDA_SchematicFrame* m_Parent; WinEDA_SchematicFrame* m_Parent;
wxBitmapButton* m_ButtonList[PIN_NMAX][PIN_NMAX]; wxBitmapButton* m_ButtonList[PIN_NMAX][PIN_NMAX];
bool m_Initialized; bool m_Initialized;
static bool m_writeErcFile;
public: public:
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheetpath.h" #include "sch_sheet_path.h"
#include "dialog_plot_schematic_DXF_base.h" #include "dialog_plot_schematic_DXF_base.h"
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheetpath.h" #include "sch_sheet_path.h"
#include "dialog_plot_schematic_HPGL_base.h" #include "dialog_plot_schematic_HPGL_base.h"
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheetpath.h" #include "sch_sheet_path.h"
enum PageFormatReq { enum PageFormatReq {
......
...@@ -13,33 +13,10 @@ ...@@ -13,33 +13,10 @@
#include "general.h" #include "general.h"
#include "eeschema_config.h" #include "eeschema_config.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
#include "class_drawsheetpath.h" #include "sch_sheet_path.h"
#include "dialog_print_using_printer_base.h" #include "dialog_print_using_printer.h"
/**
* Print schematic dialog.
*
* Class derived from DIALOG_PRINT_USING_PRINTER_base created by wxFormBuilder
*/
class DIALOG_PRINT_USING_PRINTER : public DIALOG_PRINT_USING_PRINTER_BASE
{
public:
DIALOG_PRINT_USING_PRINTER( WinEDA_SchematicFrame* aParent );
~DIALOG_PRINT_USING_PRINTER() {};
WinEDA_SchematicFrame* GetParent() const;
private:
void OnCloseWindow( wxCloseEvent& event );
void OnInitDialog( wxInitDialogEvent& event );
void OnPageSetup( wxCommandEvent& event );
void OnPrintPreview( wxCommandEvent& event );
void OnPrintButtonClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event ){ Close(); }
};
/** /**
...@@ -110,25 +87,6 @@ BEGIN_EVENT_TABLE( SCH_PREVIEW_FRAME, wxPreviewFrame ) ...@@ -110,25 +87,6 @@ BEGIN_EVENT_TABLE( SCH_PREVIEW_FRAME, wxPreviewFrame )
END_EVENT_TABLE() END_EVENT_TABLE()
void WinEDA_SchematicFrame::OnPrint( wxCommandEvent& event )
{
wxFileName fn;
DIALOG_PRINT_USING_PRINTER dlg( this );
dlg.ShowModal();
fn = g_RootSheet->m_AssociatedScreen->m_FileName;
wxString default_name = NAMELESS_PROJECT;
default_name += wxT( ".sch" );
if( fn.GetFullName() != default_name )
{
fn.SetExt( ProjectFileExtension );
wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() );
}
}
DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_SchematicFrame* aParent ) : DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_SchematicFrame* aParent ) :
DIALOG_PRINT_USING_PRINTER_BASE( aParent ) DIALOG_PRINT_USING_PRINTER_BASE( aParent )
{ {
...@@ -164,6 +122,8 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event ) ...@@ -164,6 +122,8 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event )
} }
SetFocus(); SetFocus();
m_buttonPrint->SetDefault();
} }
......
#ifndef _DIALOG_PRINT_USING_PRINTER_H_
#define _DIALOG_PRINT_USING_PRINTER_H_
#include "dialog_print_using_printer_base.h"
/**
* Print schematic dialog.
*
* Class derived from DIALOG_PRINT_USING_PRINTER_base created by wxFormBuilder
*/
class DIALOG_PRINT_USING_PRINTER : public DIALOG_PRINT_USING_PRINTER_BASE
{
public:
DIALOG_PRINT_USING_PRINTER( WinEDA_SchematicFrame* aParent );
~DIALOG_PRINT_USING_PRINTER() {};
WinEDA_SchematicFrame* GetParent() const;
private:
void OnCloseWindow( wxCloseEvent& event );
void OnInitDialog( wxInitDialogEvent& event );
void OnPageSetup( wxCommandEvent& event );
void OnPrintPreview( wxCommandEvent& event );
void OnPrintButtonClick( wxCommandEvent& event );
void OnButtonCancelClick( wxCommandEvent& event ){ Close(); }
};
#endif // _DIALOG_PRINT_USING_PRINTER_H_
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#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 "sch_component.h"
static void AbortMoveCmpField( WinEDA_DrawPanel* Panel, wxDC* DC ); static void AbortMoveCmpField( WinEDA_DrawPanel* Panel, wxDC* DC );
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_text-label.h" #include "sch_text.h"
static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ); static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
#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 "sch_sheet.h"
#include "class_drawsheetpath.h" #include "sch_sheet_path.h"
#include "class_sch_component.h" #include "sch_component.h"
#include "class_schematic_items.h" #include "sch_items.h"
#include "build_version.h" #include "build_version.h"
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#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 "sch_sheet.h"
#include "dialog_eeschema_options.h" #include "dialog_eeschema_options.h"
#include "dialog_hotkeys_editor.h" #include "dialog_hotkeys_editor.h"
......
This diff is collapsed.
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
#ifndef _ERC_H #ifndef _ERC_H
#define _ERC_H #define _ERC_H
class WinEDA_DrawPanel;
class NETLIST_OBJECT;
/* For ERC markers: error types (used in diags, and to set the color): /* For ERC markers: error types (used in diags, and to set the color):
*/ */
enum errortype enum errortype
...@@ -46,5 +50,25 @@ enum errortype ...@@ -46,5 +50,25 @@ enum errortype
#define ERCE_HIERACHICAL_LABEL 6 // mismatch between hierarchical labels and pins sheets #define ERCE_HIERACHICAL_LABEL 6 // mismatch between hierarchical labels and pins sheets
#define ERCE_NOCONNECT_CONNECTED 7 // a no connect symbol is connected to more than 1 pin #define ERCE_NOCONNECT_CONNECTED 7 // a no connect symbol is connected to more than 1 pin
/* Minimal connection table */
#define NPI 4 // Net with Pin isolated, this pin has type Not Connected and must be left N.C.
#define DRV 3 // Net driven by a signal (a pin output for instance)
#define NET_NC 2 // Net "connected" to a "NoConnect symbol"
#define NOD 1 // Net not driven ( Such as 2 or more connected inputs )
#define NOC 0 // initial state of a net: no connection
extern bool WriteDiagnosticERC( const wxString& FullFileName );
extern void Diagnose( WinEDA_DrawPanel* panel, NETLIST_OBJECT* NetItemRef,
NETLIST_OBJECT* NetItemTst, int MinConnexion, int Diag );
extern void TestOthersItems( WinEDA_DrawPanel* panel, unsigned NetItemRef, unsigned NetStart,
int* NetNbItems, int* MinConnexion );
extern void TestLabel( WinEDA_DrawPanel* panel, unsigned NetItemRef, unsigned StartNet );
extern int TestDuplicateSheetNames( bool aCreateMarker );
#endif // _ERC_H #endif // _ERC_H
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "protos.h" #include "protos.h"
#include "class_sch_component.h" #include "sch_component.h"
#include "class_text-label.h" #include "sch_text.h"
/** Event function WinEDA_SchematicFrame::OnCopySchematicItemRequest /** Event function WinEDA_SchematicFrame::OnCopySchematicItemRequest
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#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" #include "sch_sheet.h"
......
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "general.h" #include "general.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 "sch_marker.h"
#include "class_drawsheet.h" #include "sch_component.h"
#include "class_drawsheetpath.h" #include "sch_sheet.h"
#include "sch_sheet_path.h"
#include "kicad_device_context.h" #include "kicad_device_context.h"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#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 "sch_component.h"
#include "viewlib_frame.h" #include "viewlib_frame.h"
#include "get_component_dialog.h" #include "get_component_dialog.h"
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "general.h" #include "general.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
#include "class_drawsheetpath.h" #include "sch_sheet_path.h"
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/treectrl.h" #include "wx/treectrl.h"
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
#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 "sch_items.h"
#include "class_sch_component.h" #include "sch_component.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
#include "dialogs/dialog_schematic_find.h" #include "dialogs/dialog_schematic_find.h"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#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" #include "sch_component.h"
/* /*
......
...@@ -11,11 +11,11 @@ ...@@ -11,11 +11,11 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_marker_sch.h" #include "sch_marker.h"
#include "class_schematic_items.h" #include "sch_items.h"
#include "class_sch_component.h" #include "sch_component.h"
#include "class_text-label.h" #include "sch_text.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
bool ReadSchemaDescr( LINE_READER* aLine, wxString& aMsgDiag, BASE_SCREEN* Window ); bool ReadSchemaDescr( LINE_READER* aLine, wxString& aMsgDiag, BASE_SCREEN* Window );
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "general.h" #include "general.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 "sch_marker.h"
#include "class_sch_component.h" #include "sch_items.h"
#include "class_drawsheet.h" #include "sch_component.h"
#include "sch_sheet.h"
#include "lib_pin.h" #include "lib_pin.h"
#include "template_fieldnames.h" #include "template_fieldnames.h"
......
...@@ -45,9 +45,9 @@ ...@@ -45,9 +45,9 @@
#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 "sch_component.h"
#include "class_text-label.h" #include "sch_text.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
#include "template_fieldnames.h" #include "template_fieldnames.h"
#include "xnode.h" // also nests: <wx/xml/xml.h> #include "xnode.h" // also nests: <wx/xml/xml.h>
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "lib_pin.h" #include "lib_pin.h"
#include "class_schematic_items.h" #include "sch_items.h"
#include "class_sch_component.h" #include "sch_component.h"
#include "class_text-label.h" #include "sch_text.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
#include "algorithm" #include "algorithm"
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "netlist.h" #include "netlist.h"
#include "protos.h" #include "protos.h"
#include "netlist_control.h" #include "netlist_control.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
//Imported function: //Imported function:
......
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "general.h" #include "general.h"
#include "class_marker_sch.h"
#include "protos.h" #include "protos.h"
#include "class_text-label.h" #include "sch_text.h"
#include "class_schematic_items.h" #include "sch_marker.h"
#include "class_sch_component.h" #include "sch_items.h"
#include "class_drawsheet.h" #include "sch_component.h"
#include "sch_sheet.h"
static wxArrayString s_CmpNameList; static wxArrayString s_CmpNameList;
......
...@@ -12,15 +12,15 @@ ...@@ -12,15 +12,15 @@
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "general.h" #include "general.h"
#include "class_marker_sch.h"
#include "protos.h" #include "protos.h"
#include "hotkeys.h" #include "hotkeys.h"
#include "class_library.h" #include "class_library.h"
#include "class_text-label.h" #include "sch_marker.h"
#include "class_schematic_items.h" #include "sch_text.h"
#include "class_sch_component.h" #include "sch_items.h"
#include "class_drawsheet.h" #include "sch_component.h"
#include "class_drawsheetpath.h" #include "sch_sheet.h"
#include "sch_sheet_path.h"
#include <iostream> #include <iostream>
using namespace std; using namespace std;
......
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "general.h" #include "general.h"
#include "class_marker_sch.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheet.h" #include "sch_marker.h"
#include "class_sch_component.h" #include "sch_sheet.h"
#include "class_schematic_items.h" #include "sch_component.h"
#include "sch_items.h"
void RotateListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& rotationPoint ) void RotateListOfItems( PICKED_ITEMS_LIST& aItemsList, wxPoint& rotationPoint )
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "lib_pin.h" #include "lib_pin.h"
#include "class_schematic_items.h" #include "sch_items.h"
#include "class_sch_component.h" #include "sch_component.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
#include "class_text-label.h" #include "sch_text.h"
#include "template_fieldnames.h" #include "template_fieldnames.h"
......
/**************************************************************/ /*******************************************************/
/* class_sch_component.cpp : handle the class SCH_COMPONENT */ /* sch_component.cpp : handle the class SCH_COMPONENT */
/**************************************************************/ /*******************************************************/
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
#include "lib_rectangle.h" #include "lib_rectangle.h"
#include "lib_pin.h" #include "lib_pin.h"
#include "lib_text.h" #include "lib_text.h"
#include "class_sch_component.h" #include "sch_component.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
#include "class_drawsheetpath.h" #include "sch_sheet_path.h"
#include "template_fieldnames.h" #include "template_fieldnames.h"
#include "dialogs/dialog_schematic_find.h" #include "dialogs/dialog_schematic_find.h"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#define COMPONENT_CLASS_H #define COMPONENT_CLASS_H
#include "class_sch_cmp_field.h" #include "sch_field.h"
#include "transform.h" #include "transform.h"
#include "general.h" #include "general.h"
......
/**************************************************************/ /***********************************************/
/* class_sch_cmp_field.cpp : handle the class SCH_FIELD */ /* sch_field.cpp : handle the class SCH_FIELD */
/**************************************************************/ /***********************************************/
/* Fields are texts attached to a component, having a special meaning /* Fields are texts attached to a component, having a special meaning
* Fields 0 and 1 are very important: reference and value * Fields 0 and 1 are very important: reference and value
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
#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 "sch_component.h"
#include "class_sch_cmp_field.h" #include "sch_field.h"
#include "template_fieldnames.h" #include "template_fieldnames.h"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_schematic_items.h" #include "sch_items.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "trigo.h" #include "trigo.h"
#include "general.h" #include "general.h"
#include "class_marker_sch.h" #include "sch_marker.h"
#include "erc.h" #include "erc.h"
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
#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 "sch_items.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
......
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: class_drawsheet.cpp // Name: sch_sheet.cpp
// Purpose: member functions for SCH_SHEET // Purpose: member functions for SCH_SHEET
// header = class_drawsheet.h // header = sch_sheet.h
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Modified by: // Modified by:
// Created: 08/02/2006 18:37:02 // Created: 08/02/2006 18:37:02
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
#include "class_drawsheetpath.h" #include "sch_sheet_path.h"
#include "class_sch_component.h" #include "sch_component.h"
SCH_SHEET::SCH_SHEET( const wxPoint& pos ) : SCH_ITEM( NULL, DRAW_SHEET_STRUCT_TYPE ) SCH_SHEET::SCH_SHEET( const wxPoint& pos ) : SCH_ITEM( NULL, DRAW_SHEET_STRUCT_TYPE )
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#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 "sch_text.h"
class LINE_READER; class LINE_READER;
......
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: class_drawsheet.cpp // Name: sch_sheet_path.cpp
// Purpose: member functions for SCH_SHEET // Purpose: member functions for SCH_SHEET_PATH
// header = class_drawsheet.h // header = sch_sheet_path.h
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Modified by: // Modified by:
// License: License GNU // License: License GNU
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "sch_item_struct.h" #include "sch_item_struct.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
#include "class_drawsheetpath.h" #include "sch_sheet_path.h"
#include "class_sch_component.h" #include "sch_component.h"
#include "template_fieldnames.h" #include "template_fieldnames.h"
#include "dialogs/dialog_schematic_find.h" #include "dialogs/dialog_schematic_find.h"
......
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: sch_sheet_pin.cpp
// Name: class_hierarchical_PIN_sheet.cpp
// Purpose: member functions SCH_SHEET_PIN // Purpose: member functions SCH_SHEET_PIN
// header = class_drawsheet.h // header = sch_sheet.h
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Modified by: // Modified by:
// Created: 08/02/2006 18:37:02 // Created: 08/02/2006 18:37:02
...@@ -23,7 +22,7 @@ ...@@ -23,7 +22,7 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
/* m_Edge define on which edge the pin is positionned: /* m_Edge define on which edge the pin is positionned:
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_text-label.h" #include "sch_text.h"
/************************/ /************************/
......
...@@ -13,14 +13,14 @@ ...@@ -13,14 +13,14 @@
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "kicad_device_context.h" #include "kicad_device_context.h"
#include "class_marker_sch.h"
#include "general.h" #include "general.h"
#include "eeschema_id.h" #include "eeschema_id.h"
#include "protos.h" #include "protos.h"
#include "class_library.h" #include "class_library.h"
#include "class_sch_component.h" #include "sch_marker.h"
#include "class_schematic_items.h" #include "sch_component.h"
#include "class_drawsheet.h" #include "sch_items.h"
#include "sch_sheet.h"
void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event ) void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_marker_sch.h" #include "sch_marker.h"
#include "class_schematic_items.h" #include "sch_items.h"
#include "class_sch_component.h" #include "sch_component.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
/* Functions to undo and redo edit commands. /* Functions to undo and redo edit commands.
......
...@@ -22,16 +22,17 @@ ...@@ -22,16 +22,17 @@
#include "wxEeschemaStruct.h" #include "wxEeschemaStruct.h"
#include "class_sch_screen.h" #include "class_sch_screen.h"
#include "annotate_dialog.h"
#include "dialog_build_BOM.h" #include "dialog_build_BOM.h"
#include "dialog_erc.h"
#include "netlist_control.h" #include "netlist_control.h"
#include "dialog_erc.h"
#include "libeditframe.h" #include "libeditframe.h"
#include "viewlib_frame.h" #include "viewlib_frame.h"
#include "hotkeys.h" #include "hotkeys.h"
#include "class_drawsheet.h" #include "eeschema_config.h"
#include "sch_sheet.h"
#include "dialogs/annotate_dialog.h"
#include "dialogs/dialog_erc.h"
#include "dialogs/dialog_print_using_printer.h"
#include "dialogs/dialog_schematic_find.h" #include "dialogs/dialog_schematic_find.h"
...@@ -759,3 +760,21 @@ void WinEDA_SchematicFrame::SetLanguage( wxCommandEvent& event ) ...@@ -759,3 +760,21 @@ void WinEDA_SchematicFrame::SetLanguage( wxCommandEvent& event )
m_LibeditFrame->WinEDA_BasicFrame::SetLanguage( event ); m_LibeditFrame->WinEDA_BasicFrame::SetLanguage( event );
} }
void WinEDA_SchematicFrame::OnPrint( wxCommandEvent& event )
{
wxFileName fn;
DIALOG_PRINT_USING_PRINTER dlg( this );
dlg.ShowModal();
fn = g_RootSheet->m_AssociatedScreen->m_FileName;
wxString default_name = NAMELESS_PROJECT;
default_name += wxT( ".sch" );
if( fn.GetFullName() != default_name )
{
fn.SetExt( ProjectFileExtension );
wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters() );
}
}
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
#include "dialog_sch_sheet_props.h" #include "dialog_sch_sheet_props.h"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
#include "class_drawsheet.h" #include "sch_sheet.h"
static void ExitPinSheet( WinEDA_DrawPanel* Panel, wxDC* DC ); static void ExitPinSheet( WinEDA_DrawPanel* Panel, wxDC* DC );
......
#include "template_fieldnames.h" #include "template_fieldnames.h"
//#include "class_sch_component.h"
#include "dsnlexer.h" #include "dsnlexer.h"
#include "macros.h" #include "macros.h"
......
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