changes
This commit is contained in:
commit
e9a3b29be6
|
@ -124,7 +124,7 @@ public:
|
|||
double m_BoardScale; /* Normalization scale for coordinates:
|
||||
* when scaled between -1.0 and +1.0 */
|
||||
double m_LayerZcoord[32];
|
||||
double m_ActZpos;
|
||||
double m_ActZpos;
|
||||
public: Info_3D_Visu();
|
||||
~Info_3D_Visu();
|
||||
};
|
||||
|
@ -170,13 +170,15 @@ public:
|
|||
void InitGL();
|
||||
void SetLights();
|
||||
void Draw3D_Track( TRACK* track );
|
||||
/** Function Draw3D_SolidPolygonsInZones
|
||||
/**
|
||||
* Function Draw3D_SolidPolygonsInZones
|
||||
* draw all solid polygons used as filles areas in a zone
|
||||
* @param aZone_c = the zone to draw
|
||||
*/
|
||||
void Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* aZone_c );
|
||||
void Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* aZone_c );
|
||||
|
||||
/** Function Draw3D_Polygon
|
||||
/**
|
||||
* Function Draw3D_Polygon
|
||||
* draw one solid polygon
|
||||
* @param aCornersList = a std::vector<wxPoint> liste of corners, in physical coordinates
|
||||
* @param aZpos = the z position in 3D units
|
||||
|
@ -185,12 +187,12 @@ public:
|
|||
void Draw3D_Via( SEGVIA* via );
|
||||
void Draw3D_DrawSegment( DRAWSEGMENT* segment );
|
||||
void Draw3D_DrawText( TEXTE_PCB* text );
|
||||
|
||||
|
||||
/// Toggles ortographic projection on and off
|
||||
void ToggleOrtho(){ m_ortho = !m_ortho ; Refresh(true);};
|
||||
/// Returns the orthographic projection flag
|
||||
bool ModeIsOrtho() { return m_ortho ;};
|
||||
|
||||
|
||||
|
||||
//int Get3DLayerEnable(int act_layer);
|
||||
|
||||
|
@ -230,7 +232,8 @@ public:
|
|||
void SetToolbars();
|
||||
void GetSettings();
|
||||
void SaveSettings();
|
||||
/** function ReloadRequest
|
||||
/**
|
||||
* Function ReloadRequest
|
||||
* must be called when reloading data from Pcbnew is needed
|
||||
* mainly after edition of the board or footprint beeing displayed.
|
||||
* mainly for the module editor.
|
||||
|
|
|
@ -4,6 +4,27 @@ KiCad ChangeLog 2010
|
|||
Please add newer entries at the top, list the date and your name with
|
||||
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>
|
||||
================================================================================
|
||||
++EESchema
|
||||
* Header file rationalization.
|
||||
* Move schematic object load code into the appropriate schematic object.
|
||||
|
||||
|
||||
2010-nov-3 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
|
||||
================================================================================
|
||||
++common
|
||||
|
|
|
@ -262,9 +262,9 @@ public:
|
|||
* this lower level function returning an int (so the enum does not collide
|
||||
* with another usage).
|
||||
* @return ${enum} - the type of token found next.
|
||||
* @throw IOError - only if the LINE_READER throws it.
|
||||
* @throw IO_ERROR - only if the LINE_READER throws it.
|
||||
*/
|
||||
${enum} NextTok() throw (IOError)
|
||||
${enum} NextTok() throw( IO_ERROR )
|
||||
{
|
||||
return (${enum}) DSNLEXER::NextTok();
|
||||
}
|
||||
|
@ -273,11 +273,11 @@ public:
|
|||
* Function NeedSYMBOL
|
||||
* calls NextTok() and then verifies that the token read in
|
||||
* satisfies bool IsSymbol().
|
||||
* If not, an IOError is thrown.
|
||||
* If not, an IO_ERROR is thrown.
|
||||
* @return int - the actual token read in.
|
||||
* @throw IOError, if the next token does not satisfy IsSymbol()
|
||||
* @throw IO_ERROR, if the next token does not satisfy IsSymbol()
|
||||
*/
|
||||
${enum} NeedSYMBOL() throw( IOError )
|
||||
${enum} NeedSYMBOL() throw( IO_ERROR )
|
||||
{
|
||||
return (${enum}) DSNLEXER::NeedSYMBOL();
|
||||
}
|
||||
|
@ -286,11 +286,11 @@ public:
|
|||
* Function NeedSYMBOLorNUMBER
|
||||
* calls NextTok() and then verifies that the token read in
|
||||
* satisfies bool IsSymbol() or tok==T_NUMBER.
|
||||
* If not, an IOError is thrown.
|
||||
* If not, an IO_ERROR is thrown.
|
||||
* @return int - the actual token read in.
|
||||
* @throw IOError, if the next token does not satisfy the above test
|
||||
* @throw IO_ERROR, if the next token does not satisfy the above test
|
||||
*/
|
||||
${enum} NeedSYMBOLorNUMBER() throw( IOError )
|
||||
${enum} NeedSYMBOLorNUMBER() throw( IO_ERROR )
|
||||
{
|
||||
return (${enum}) DSNLEXER::NeedSYMBOLorNUMBER();
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -12,13 +12,12 @@
|
|||
#include "common.h"
|
||||
#include "base_struct.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "class_base_screen.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxstruct.h"
|
||||
|
||||
#include "wx/valgen.h"
|
||||
|
||||
#ifdef EESCHEMA
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "class_drawpanel.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
|
||||
|
@ -29,10 +28,17 @@ SCH_ITEM::SCH_ITEM( EDA_BaseStruct* aParent, KICAD_T aType ) :
|
|||
m_Layer = 0;
|
||||
}
|
||||
|
||||
|
||||
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.
|
||||
* if it is a new item, it it also put in undo list
|
||||
|
|
|
@ -26,18 +26,21 @@ public:
|
|||
|
||||
void OnSelectOptionToolbar( wxCommandEvent& event );
|
||||
|
||||
/** Function IsGridVisible() , virtual
|
||||
/**
|
||||
* Function IsGridVisible() , virtual
|
||||
* @return true if the grid must be shown
|
||||
*/
|
||||
virtual bool IsGridVisible();
|
||||
|
||||
/** Function SetGridVisibility() , virtual
|
||||
/**
|
||||
* Function SetGridVisibility() , virtual
|
||||
* It may be overloaded by derived classes
|
||||
* if you want to store/retrieve the grid visiblity in configuration.
|
||||
* @param aVisible = true if the grid must be shown
|
||||
*/
|
||||
virtual void SetGridVisibility(bool aVisible);
|
||||
/** Function GetGridColor() , virtual
|
||||
/**
|
||||
* Function GetGridColor() , virtual
|
||||
* @return the color of the grid
|
||||
*/
|
||||
virtual int GetGridColor();
|
||||
|
@ -64,7 +67,8 @@ public:
|
|||
}
|
||||
|
||||
|
||||
/** Function SaveCopyInUndoList (overloaded).
|
||||
/**
|
||||
* Function SaveCopyInUndoList (overloaded).
|
||||
* Creates a new entry in undo list of commands.
|
||||
* add a list of pickers to handle a list of items
|
||||
* @param aItemsList = the list of items modified by the command to undo
|
||||
|
|
|
@ -8,26 +8,16 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
|||
|
||||
set(EESCHEMA_SRCS
|
||||
annotate.cpp
|
||||
annotate_dialog.cpp
|
||||
backanno.cpp
|
||||
block.cpp
|
||||
block_libedit.cpp
|
||||
build_BOM.cpp
|
||||
busentry.cpp
|
||||
bus-wire-junction.cpp
|
||||
class_drawsheet.cpp
|
||||
class_drawsheetpath.cpp
|
||||
class_drc_erc_item.cpp
|
||||
class_hierarchical_PIN_sheet.cpp
|
||||
class_libentry.cpp
|
||||
class_library.cpp
|
||||
class_marker_sch.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
|
||||
cmp_library_keywords.cpp
|
||||
cmp_library_lexer.cpp
|
||||
|
@ -43,7 +33,8 @@ set(EESCHEMA_SRCS
|
|||
dialogs/dialog_plot_schematic_HPGL_base.cpp
|
||||
dialogs/dialog_plot_schematic_PS.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_build_BOM.cpp
|
||||
dialog_build_BOM_base.cpp
|
||||
|
@ -59,8 +50,8 @@ set(EESCHEMA_SRCS
|
|||
dialog_eeschema_config_fbp.cpp
|
||||
dialog_eeschema_options_base.cpp
|
||||
dialog_eeschema_options.cpp
|
||||
dialog_erc.cpp
|
||||
dialog_erc_base.cpp
|
||||
dialogs/dialog_erc.cpp
|
||||
dialogs/dialog_erc_base.cpp
|
||||
dialog_libedit_dimensions.cpp
|
||||
dialog_libedit_dimensions_base.cpp
|
||||
dialog_lib_edit_draw_item.cpp
|
||||
|
@ -69,8 +60,8 @@ set(EESCHEMA_SRCS
|
|||
dialog_lib_edit_pin_base.cpp
|
||||
dialog_lib_new_component.cpp
|
||||
dialog_lib_new_component_base.cpp
|
||||
dialog_print_using_printer_base.cpp
|
||||
dialog_print_using_printer.cpp
|
||||
dialogs/dialog_print_using_printer_base.cpp
|
||||
dialogs/dialog_print_using_printer.cpp
|
||||
dialog_sch_sheet_props.cpp
|
||||
dialog_sch_sheet_props_base.cpp
|
||||
dialogs/dialog_schematic_find.cpp
|
||||
|
@ -122,7 +113,15 @@ set(EESCHEMA_SRCS
|
|||
operations_on_items_lists.cpp
|
||||
pinedit.cpp
|
||||
plot.cpp
|
||||
read_from_file_schematic_items_descriptions.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
|
||||
schematic_undo_redo.cpp
|
||||
schframe.cpp
|
||||
|
|
|
@ -10,10 +10,12 @@
|
|||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "wxstruct.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "class_library.h"
|
||||
#include "protos.h"
|
||||
#include "sch_component.h"
|
||||
#include "netlist.h"
|
||||
#include "lib_pin.h"
|
||||
|
||||
|
|
|
@ -5,15 +5,16 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "program.h"
|
||||
#include "confirm.h"
|
||||
#include "kicad_string.h"
|
||||
#include "gestfich.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
#include "build_version.h"
|
||||
|
||||
#include "general.h"
|
||||
|
||||
#include "build_version.h"
|
||||
#include "sch_sheet_path.h"
|
||||
#include "sch_component.h"
|
||||
|
||||
|
||||
/** function FillFootprintFieldForAllInstancesofComponent
|
||||
|
|
|
@ -9,13 +9,20 @@
|
|||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "block_commande.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "class_marker_sch.h"
|
||||
#include "class_library.h"
|
||||
#include "lib_pin.h"
|
||||
#include "protos.h"
|
||||
#include "sch_marker.h"
|
||||
#include "sch_items.h"
|
||||
#include "sch_text.h"
|
||||
#include "sch_component.h"
|
||||
#include "sch_sheet.h"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
||||
// Imported functions:
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "confirm.h"
|
||||
#include "block_commande.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "class_library.h"
|
||||
#include "protos.h"
|
||||
|
|
|
@ -15,12 +15,15 @@
|
|||
#include "kicad_string.h"
|
||||
#include "gestfich.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "class_library.h"
|
||||
#include "netlist.h"
|
||||
#include "protos.h"
|
||||
#include "sch_sheet.h"
|
||||
#include "template_fieldnames.h"
|
||||
#include "sch_component.h"
|
||||
|
||||
#include "build_version.h"
|
||||
|
||||
|
|
|
@ -7,12 +7,17 @@
|
|||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "lib_draw_item.h"
|
||||
#include "lib_pin.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "sch_items.h"
|
||||
#include "sch_text.h"
|
||||
#include "sch_component.h"
|
||||
#include "sch_sheet.h"
|
||||
|
||||
|
||||
/* Routines Locales */
|
||||
|
@ -119,7 +124,7 @@ void WinEDA_SchematicFrame::BeginSegment( wxDC* DC, int type )
|
|||
}
|
||||
|
||||
newsegment->m_Flags = IS_NEW;
|
||||
if( g_HVLines ) // We need 2 segments to go from a given start pint to
|
||||
if( g_HVLines ) // We need 2 segments to go from a given start pin to
|
||||
// an end point
|
||||
{
|
||||
nextsegment = newsegment->GenCopy();
|
||||
|
|
|
@ -8,10 +8,13 @@
|
|||
#include "class_drawpanel.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "sch_items.h"
|
||||
|
||||
|
||||
static int s_LastShape = '\\';
|
||||
static wxPoint ItemInitialPosition;
|
||||
|
@ -20,8 +23,7 @@ static wxPoint ItemInitialPosition;
|
|||
static void ExitBusEntry( WinEDA_DrawPanel* Panel, wxDC* DC )
|
||||
{
|
||||
/* Exit bus entry mode. */
|
||||
SCH_BUS_ENTRY* BusEntry =
|
||||
(SCH_BUS_ENTRY*) Panel->GetScreen()->GetCurItem();
|
||||
SCH_BUS_ENTRY* BusEntry = (SCH_BUS_ENTRY*) Panel->GetScreen()->GetCurItem();
|
||||
|
||||
if( BusEntry )
|
||||
{
|
||||
|
@ -47,7 +49,7 @@ static void ExitBusEntry( WinEDA_DrawPanel* Panel, wxDC* DC )
|
|||
|
||||
static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
|
||||
{
|
||||
/* Drawing of the bus entry segment" while moving the cursor. */
|
||||
// Draws the bus entry while moving the cursor
|
||||
BASE_SCREEN* screen = panel->GetScreen();
|
||||
SCH_BUS_ENTRY* BusEntry = (SCH_BUS_ENTRY*) screen->GetCurItem();
|
||||
|
||||
|
@ -67,21 +69,12 @@ static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
|
|||
SCH_BUS_ENTRY* WinEDA_SchematicFrame::CreateBusEntry( wxDC* DC,
|
||||
int entry_type )
|
||||
{
|
||||
/* Create a new bus entry, and prepare moving function (for later place it)
|
||||
*/
|
||||
// Create and place a new bus entry at cursor position
|
||||
SCH_BUS_ENTRY* BusEntry = new SCH_BUS_ENTRY( GetScreen()->m_Curseur,
|
||||
s_LastShape,
|
||||
entry_type );
|
||||
|
||||
s_LastShape, entry_type );
|
||||
BusEntry->m_Flags = IS_NEW;
|
||||
|
||||
DrawPanel->CursorOff( DC ); // Erase schematic cursor
|
||||
RedrawOneStruct( DrawPanel, DC, BusEntry, g_XorMode );
|
||||
DrawPanel->CursorOn( DC ); // Display schematic cursor
|
||||
|
||||
BusEntry->Place( this, DC );;
|
||||
OnModify( );
|
||||
|
||||
StartMoveBusEntry( BusEntry, DC );
|
||||
return BusEntry;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,14 +4,17 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "kicad_string.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "plot_common.h"
|
||||
#include "gr_basic.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "template_fieldnames.h"
|
||||
#include "transform.h"
|
||||
#include "class_library.h"
|
||||
#include "class_libentry.h"
|
||||
#include "lib_pin.h"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#ifndef CLASS_LIBENTRY_H
|
||||
#define CLASS_LIBENTRY_H
|
||||
|
||||
#include "general.h"
|
||||
#include "lib_draw_item.h"
|
||||
#include "lib_field.h"
|
||||
|
||||
|
@ -521,13 +522,15 @@ public:
|
|||
|
||||
int GetPartCount() { return m_unitCount; }
|
||||
|
||||
/** function IsMulti
|
||||
/**
|
||||
* Function IsMulti
|
||||
* @return true if the component has multiple parts per package.
|
||||
* When happens, the reference has a sub reference ti identify part
|
||||
*/
|
||||
bool IsMulti() { return m_unitCount > 1; }
|
||||
|
||||
/** function IsMulti
|
||||
/**
|
||||
* Function IsMulti
|
||||
* @return the sub reference for component having multiple parts per package.
|
||||
* The sub reference identify the part (or unit)
|
||||
* @param aUnit = the part identifier ( 1 to max count)
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "kicad_string.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
#include "eda_doc.h"
|
||||
#include "wxstruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "class_library.h"
|
||||
|
|
|
@ -6,8 +6,11 @@
|
|||
#define CLASS_LIBRARY_H
|
||||
|
||||
|
||||
#include <wx/filename.h>
|
||||
|
||||
#include "class_libentry.h"
|
||||
|
||||
|
||||
/*
|
||||
* Component Library version and file header macros.
|
||||
*/
|
||||
|
|
|
@ -5,9 +5,11 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "macros.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "general.h"
|
||||
#include "sch_component.h"
|
||||
#include "class_netlist_object.h"
|
||||
|
||||
#if defined(DEBUG)
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#ifndef _CLASS_NETLIST_OBJECT_H_
|
||||
#define _CLASS_NETLIST_OBJECT_H_
|
||||
|
||||
#include "sch_sheet_path.h"
|
||||
|
||||
#include "lib_pin.h" // LIB_PIN::ReturnPinStringNum( m_PinNum )
|
||||
|
||||
|
||||
|
|
|
@ -7,11 +7,12 @@
|
|||
#include "trigo.h"
|
||||
#include "confirm.h"
|
||||
#include "macros.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "netlist.h"
|
||||
#include "sch_items.h"
|
||||
|
||||
|
||||
/* Routine to start/end segment (BUS or wires) on junctions.
|
||||
|
|
|
@ -7,16 +7,19 @@
|
|||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "eda_dde.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
#include "viewlib_frame.h"
|
||||
#include "lib_draw_item.h"
|
||||
#include "lib_pin.h"
|
||||
#include "class_marker_sch.h"
|
||||
#include "sch_sheet.h"
|
||||
#include "sch_sheet_path.h"
|
||||
#include "sch_marker.h"
|
||||
#include "sch_component.h"
|
||||
|
||||
|
||||
/** Function SchematicGeneralLocateAndDisplay
|
||||
|
|
|
@ -5,14 +5,16 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "eda_dde.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "protos.h"
|
||||
#include "lib_draw_item.h"
|
||||
#include "lib_pin.h"
|
||||
#include "sch_component.h"
|
||||
|
||||
|
||||
/***************************************************************/
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "sch_item_struct.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "class_libentry.h"
|
||||
#include "lib_pin.h"
|
||||
#include "sch_component.h"
|
||||
|
||||
|
||||
/* Returns true if the point P is on the segment S. */
|
||||
|
|
|
@ -5,11 +5,12 @@
|
|||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "confirm.h"
|
||||
#include "eda_doc.h"
|
||||
#include "kicad_string.h"
|
||||
#include "wxstruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "class_library.h"
|
||||
|
@ -29,8 +30,7 @@
|
|||
* Place the name of the component has loaded, select from a list in
|
||||
* BufName
|
||||
*/
|
||||
wxString DataBaseGetName( WinEDA_DrawFrame* frame, wxString& Keys,
|
||||
wxString& BufName )
|
||||
wxString DataBaseGetName( WinEDA_DrawFrame* frame, wxString& Keys, wxString& BufName )
|
||||
{
|
||||
wxArrayString nameList;
|
||||
wxString msg;
|
||||
|
|
|
@ -5,15 +5,19 @@
|
|||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "class_marker_sch.h"
|
||||
#include "sch_marker.h"
|
||||
#include "sch_items.h"
|
||||
#include "sch_sheet.h"
|
||||
#include "sch_text.h"
|
||||
|
||||
|
||||
// Imported function:
|
||||
void DeleteItemsInList( WinEDA_DrawPanel* panel,
|
||||
PICKED_ITEMS_LIST& aItemsList );
|
||||
void DeleteItemsInList( WinEDA_DrawPanel* panel, PICKED_ITEMS_LIST& aItemsList );
|
||||
|
||||
|
||||
/*
|
||||
|
@ -28,7 +32,7 @@ static int CountConnectedItems( WinEDA_SchematicFrame* frame,
|
|||
bool TstJunction )
|
||||
{
|
||||
SCH_ITEM* Struct;
|
||||
int count = 0;
|
||||
int count = 0;
|
||||
|
||||
if( frame->LocatePinEnd( ListStruct, pos ) )
|
||||
count++;
|
||||
|
|
|
@ -6,10 +6,12 @@
|
|||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "sch_sheet.h"
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
|
|
|
@ -12,13 +12,16 @@
|
|||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "dialog_SVG_print_base.h"
|
||||
#include "dcsvg.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "libeditframe.h"
|
||||
#include "sch_sheet_path.h"
|
||||
|
||||
|
||||
// Keys for configuration
|
||||
#define PLOTSVGMODECOLOR_KEY wxT( "PlotSVGModeColor" )
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "wxstruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "netlist.h"
|
||||
|
||||
|
|
|
@ -10,6 +10,11 @@
|
|||
#include "dialog_build_BOM_base.h"
|
||||
|
||||
|
||||
class WinEDA_DrawFrame;
|
||||
class SCH_COMPONENT;
|
||||
class wxConfig;
|
||||
|
||||
|
||||
class DIALOG_BUILD_BOM : public DIALOG_BUILD_BOM_BASE
|
||||
{
|
||||
private:
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "class_libentry.h"
|
||||
#include "libeditframe.h"
|
||||
|
||||
|
|
|
@ -9,12 +9,10 @@
|
|||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
#include "class_library.h"
|
||||
//#include "class_libentry.h"
|
||||
|
||||
#include "dialog_edit_component_in_lib.h"
|
||||
|
||||
|
|
|
@ -8,11 +8,13 @@
|
|||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "class_library.h"
|
||||
#include "sch_component.h"
|
||||
|
||||
#include "dialog_edit_component_in_schematic.h"
|
||||
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
#define __dialog_edit_component_in_schematic__
|
||||
|
||||
|
||||
#include "sch_field.h"
|
||||
#include "template_fieldnames.h"
|
||||
|
||||
#include "dialog_edit_component_in_schematic_fbp.h"
|
||||
|
||||
/**
|
||||
|
@ -85,7 +88,8 @@ public:
|
|||
void InitBuffers( SCH_COMPONENT* aComponent );
|
||||
|
||||
private:
|
||||
/** Function updateDisplay
|
||||
/**
|
||||
* Function updateDisplay
|
||||
* update the listbox showing fields, according to the fields texts
|
||||
* must be called after a text change in fields, if this change is not an edition
|
||||
*/
|
||||
|
|
|
@ -8,13 +8,15 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "wx/valgen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "drawtxt.h"
|
||||
#include "confirm.h"
|
||||
#include "sch_text.h"
|
||||
|
||||
#include "dialog_edit_label.h"
|
||||
|
||||
|
||||
|
|
|
@ -10,6 +10,11 @@
|
|||
|
||||
#include "dialog_edit_label_base.h"
|
||||
|
||||
|
||||
class WinEDA_SchematicFrame;
|
||||
class SCH_TEXT;
|
||||
|
||||
|
||||
class DialogLabelEditor : public DialogLabelEditor_Base
|
||||
{
|
||||
private:
|
||||
|
|
|
@ -9,12 +9,14 @@
|
|||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
#include "class_library.h"
|
||||
#include "sch_field.h"
|
||||
#include "template_fieldnames.h"
|
||||
|
||||
#include "dialog_edit_libentry_fields_in_lib_base.h"
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "netlist.h"
|
||||
|
|
|
@ -12,8 +12,7 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "program.h"
|
||||
#include "class_marker_sch.h"
|
||||
#include "sch_marker.h"
|
||||
|
||||
/**
|
||||
* Class ERC_HTML_LISTBOX
|
||||
|
|
|
@ -3,15 +3,12 @@
|
|||
* Handles the dialog so set current texts and pins sizes in LibEdit
|
||||
*/
|
||||
#include "fctsys.h"
|
||||
//#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
//#include "class_drawpanel.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "libeditframe.h"
|
||||
|
||||
|
||||
#include "dialog_libedit_dimensions_base.h"
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "appl_wxstruct.h"
|
||||
#include "bitmaps.h"
|
||||
#include "common.h"
|
||||
#include "program.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "annotate_dialog.h"
|
||||
|
||||
|
@ -69,6 +69,8 @@ void DIALOG_ANNOTATE::InitValues()
|
|||
annotate_right_down_bitmap->SetBitmap(bitmap1);
|
||||
wxBitmap bitmap2(add_text_xpm);
|
||||
annotate_by_value_bitmap->SetBitmap(bitmap2);
|
||||
|
||||
m_btnApply->SetDefault();
|
||||
}
|
||||
|
||||
|
||||
|
@ -92,12 +94,10 @@ void DIALOG_ANNOTATE::OnApplyClick( wxCommandEvent& event )
|
|||
message += _( "on the current sheet?" );
|
||||
|
||||
message += _( "\n\nThis operation will change the current annotation and cannot be undone." );
|
||||
response = wxMessageBox( message, wxT( "" ),
|
||||
wxICON_EXCLAMATION | wxOK | wxCANCEL );
|
||||
response = wxMessageBox( message, wxT( "" ), wxICON_EXCLAMATION | wxOK | wxCANCEL );
|
||||
if (response == wxCANCEL)
|
||||
return;
|
||||
AnnotateComponents( m_Parent, GetLevel(), GetSortOrder(),
|
||||
GetResetItems() , true );
|
||||
AnnotateComponents( m_Parent, GetLevel(), GetSortOrder(), GetResetItems() , true );
|
||||
m_btnClear->Enable();
|
||||
}
|
||||
|
|
@ -26,6 +26,11 @@
|
|||
|
||||
#include "dialog_annotate_base.h"
|
||||
|
||||
|
||||
class WinEDA_SchematicFrame;
|
||||
class wxConfig;
|
||||
|
||||
|
||||
/*!
|
||||
* DIALOG_ANNOTATE class declaration
|
||||
*/
|
|
@ -9,12 +9,17 @@
|
|||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "kicad_string.h"
|
||||
#include "gestfich.h"
|
||||
#include "bitmaps.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "netlist.h"
|
||||
#include "class_marker_sch.h"
|
||||
#include "sch_marker.h"
|
||||
#include "sch_sheet.h"
|
||||
#include "lib_pin.h"
|
||||
#include "protos.h"
|
||||
|
||||
|
@ -23,6 +28,9 @@
|
|||
#include "erc.h"
|
||||
|
||||
|
||||
bool DIALOG_ERC::m_writeErcFile = false;
|
||||
|
||||
|
||||
BEGIN_EVENT_TABLE( DIALOG_ERC, DIALOG_ERC_BASE )
|
||||
EVT_COMMAND_RANGE( ID_MATRIX_0, ID_MATRIX_0 + ( PIN_NMAX * PIN_NMAX ) - 1,
|
||||
wxEVT_COMMAND_BUTTON_CLICKED,
|
||||
|
@ -49,15 +57,13 @@ void DIALOG_ERC::Init()
|
|||
for( int jj = 0; jj < PIN_NMAX; jj++ )
|
||||
m_ButtonList[ii][jj] = NULL;
|
||||
|
||||
m_WriteResultOpt->SetValue( WriteFichierERC );
|
||||
m_WriteResultOpt->SetValue( m_writeErcFile );
|
||||
|
||||
wxString num;
|
||||
num.Printf( wxT( "%d" ), g_EESchemaVar.NbErrorErc );
|
||||
m_TotalErrCount->SetLabel( num );
|
||||
|
||||
num.Printf( wxT(
|
||||
"%d" ), g_EESchemaVar.NbErrorErc -
|
||||
g_EESchemaVar.NbWarningErc );
|
||||
num.Printf( wxT( "%d" ), g_EESchemaVar.NbErrorErc - g_EESchemaVar.NbWarningErc );
|
||||
m_LastErrCount->SetLabel( num );
|
||||
|
||||
num.Printf( wxT( "%d" ), g_EESchemaVar.NbWarningErc );
|
||||
|
@ -67,6 +73,9 @@ void DIALOG_ERC::Init()
|
|||
|
||||
// Init Panel Matrix
|
||||
ReBuildMatrixPanel();
|
||||
|
||||
// Set the run ERC button as the default button.
|
||||
m_buttonERC->SetDefault();
|
||||
}
|
||||
|
||||
|
||||
|
@ -376,10 +385,171 @@ void DIALOG_ERC::ChangeErrorLevel( wxCommandEvent& event )
|
|||
if( new_bitmap_xpm )
|
||||
{
|
||||
delete Butt;
|
||||
Butt = new wxBitmapButton( m_PanelERCOptions, id,
|
||||
wxBitmap( new_bitmap_xpm ), pos );
|
||||
Butt = new wxBitmapButton( m_PanelERCOptions, id, wxBitmap( new_bitmap_xpm ), pos );
|
||||
|
||||
m_ButtonList[y][x] = Butt;
|
||||
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 @@
|
|||
#include "dialog_erc_base.h"
|
||||
|
||||
/* Variable locales */
|
||||
extern int WriteFichierERC;
|
||||
extern int DiagErc[PIN_NMAX][PIN_NMAX];
|
||||
extern bool DiagErcTableInit; // go to TRUE after DiagErc init
|
||||
extern int DefaultDiagErc[PIN_NMAX][PIN_NMAX];
|
||||
|
@ -35,7 +34,8 @@ class DIALOG_ERC : public DIALOG_ERC_BASE
|
|||
private:
|
||||
WinEDA_SchematicFrame* m_Parent;
|
||||
wxBitmapButton* m_ButtonList[PIN_NMAX][PIN_NMAX];
|
||||
bool m_Initialized;
|
||||
bool m_Initialized;
|
||||
static bool m_writeErcFile;
|
||||
|
||||
public:
|
||||
|
|
@ -28,13 +28,16 @@
|
|||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "plot_common.h"
|
||||
#include "confirm.h"
|
||||
#include "worksheet.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "sch_sheet_path.h"
|
||||
|
||||
#include "dialog_plot_schematic_DXF_base.h"
|
||||
|
||||
|
|
|
@ -31,10 +31,13 @@
|
|||
#include "confirm.h"
|
||||
#include "plot_common.h"
|
||||
#include "worksheet.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "sch_sheet_path.h"
|
||||
|
||||
#include "dialog_plot_schematic_HPGL_base.h"
|
||||
|
||||
enum PageFormatReq
|
||||
|
|
|
@ -31,10 +31,13 @@
|
|||
#include "confirm.h"
|
||||
#include "worksheet.h"
|
||||
#include "plot_common.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "sch_sheet_path.h"
|
||||
|
||||
|
||||
enum PageFormatReq {
|
||||
PAGE_SIZE_AUTO,
|
||||
|
|
|
@ -8,35 +8,15 @@
|
|||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "eeschema_config.h"
|
||||
#include "sch_sheet.h"
|
||||
#include "sch_sheet_path.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(); }
|
||||
};
|
||||
#include "dialog_print_using_printer.h"
|
||||
|
||||
|
||||
/**
|
||||
|
@ -107,25 +87,6 @@ BEGIN_EVENT_TABLE( SCH_PREVIEW_FRAME, wxPreviewFrame )
|
|||
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_BASE( aParent )
|
||||
{
|
||||
|
@ -161,6 +122,8 @@ void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event )
|
|||
}
|
||||
|
||||
SetFocus();
|
||||
|
||||
m_buttonPrint->SetDefault();
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
#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_
|
|
@ -5,11 +5,12 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
|
|
|
@ -7,11 +7,13 @@
|
|||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "class_library.h"
|
||||
#include "sch_component.h"
|
||||
|
||||
|
||||
static void AbortMoveCmpField( WinEDA_DrawPanel* Panel, wxDC* DC );
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
|
|
|
@ -10,10 +10,13 @@
|
|||
#include "drawtxt.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "sch_text.h"
|
||||
|
||||
|
||||
static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase );
|
||||
static void ExitMoveTexte( WinEDA_DrawPanel* panel, wxDC* DC );
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "wxstruct.h"
|
||||
#include "class_drawpanel.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
|
||||
#include "wx/statline.h"
|
||||
|
||||
#include "general.h"
|
||||
|
||||
|
||||
class wxBoxSizer;
|
||||
class wxStaticLine;
|
||||
class wxStdDialogButtonSizer;
|
||||
|
|
|
@ -4,9 +4,10 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "confirm.h"
|
||||
#include "macros.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "class_library.h"
|
||||
|
||||
|
|
|
@ -8,14 +8,20 @@
|
|||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "class_library.h"
|
||||
#include "sch_sheet.h"
|
||||
#include "sch_sheet_path.h"
|
||||
#include "sch_component.h"
|
||||
#include "sch_items.h"
|
||||
|
||||
#include "build_version.h"
|
||||
|
||||
|
||||
static EDA_BaseStruct* HighLightStruct = NULL;
|
||||
|
||||
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
#include "bitmaps.h"
|
||||
#include "eda_dde.h"
|
||||
#include "id.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "hotkeys.h"
|
||||
|
|
|
@ -5,11 +5,12 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
#include "program.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "eeschema_id.h"
|
||||
#include "general.h"
|
||||
#include "netlist.h"
|
||||
#include "protos.h"
|
||||
|
@ -17,6 +18,8 @@
|
|||
#include "eeschema_config.h"
|
||||
#include "worksheet.h"
|
||||
#include "hotkeys.h"
|
||||
#include "sch_sheet.h"
|
||||
|
||||
#include "dialog_eeschema_options.h"
|
||||
#include "dialog_hotkeys_editor.h"
|
||||
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
#define GROUPCOMMON wxT( "/common" )
|
||||
#define GROUPLIB wxT( "libraries" )
|
||||
|
||||
#include "netlist.h"
|
||||
|
||||
extern int g_PenMinWidth;
|
||||
|
||||
/* saving parameters option : */
|
||||
|
|
236
eeschema/erc.cpp
236
eeschema/erc.cpp
|
@ -6,19 +6,18 @@
|
|||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "kicad_string.h"
|
||||
#include "gestfich.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "bitmaps.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "netlist.h"
|
||||
#include "class_marker_sch.h"
|
||||
#include "lib_pin.h"
|
||||
#include "protos.h"
|
||||
#include "erc.h"
|
||||
|
||||
#include "dialog_erc.h"
|
||||
#include "sch_marker.h"
|
||||
#include "sch_component.h"
|
||||
#include "sch_sheet.h"
|
||||
|
||||
|
||||
/* ERC tests :
|
||||
|
@ -28,21 +27,6 @@
|
|||
*/
|
||||
|
||||
|
||||
static bool WriteDiagnosticERC( const wxString& FullFileName );
|
||||
static void Diagnose( WinEDA_DrawPanel* panel,
|
||||
NETLIST_OBJECT* NetItemRef,
|
||||
NETLIST_OBJECT* NetItemTst, int MinConnexion, int Diag );
|
||||
static void TestOthersItems( WinEDA_DrawPanel* panel,
|
||||
unsigned NetItemRef,
|
||||
unsigned NetStart,
|
||||
int* NetNbItems, int* MinConnexion );
|
||||
static void TestLabel( WinEDA_DrawPanel* panel,
|
||||
unsigned NetItemRef,
|
||||
unsigned StartNet );
|
||||
|
||||
/* Local variables */
|
||||
int WriteFichierERC = FALSE;
|
||||
|
||||
/*
|
||||
* Electrical type of pins:
|
||||
* PIN_INPUT = usual pin input: must be connected
|
||||
|
@ -140,13 +124,6 @@ int DefaultDiagErc[PIN_NMAX][PIN_NMAX] =
|
|||
};
|
||||
|
||||
|
||||
/* Minimal connection table */
|
||||
#define NPI 4 /* Net with Pin isolated, but 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 */
|
||||
|
||||
/* Look up table which gives the minimal drive for a pair of connected pins on
|
||||
* a net
|
||||
* Initial state of a net is NOC (Net with No Connection)
|
||||
|
@ -182,7 +159,7 @@ static int MinimalReq[PIN_NMAX][PIN_NMAX] =
|
|||
* @param aCreateMarker: true = create error markers in schematic,
|
||||
* false = calculate error count only
|
||||
*/
|
||||
int TestDuplicateSheetNames(bool aCreateMarker)
|
||||
int TestDuplicateSheetNames( bool aCreateMarker )
|
||||
{
|
||||
int err_count = 0;
|
||||
SCH_SCREENS ScreenList; // Created the list of screen
|
||||
|
@ -234,181 +211,14 @@ int TestDuplicateSheetNames(bool aCreateMarker)
|
|||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
WriteFichierERC = 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 ne 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( WriteFichierERC == TRUE )
|
||||
{
|
||||
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 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Creates an ERC marker to show the ERC problem about aNetItemRef
|
||||
* or between aNetItemRef and aNetItemTst
|
||||
* if MinConn < 0: this is an error on labels
|
||||
*/
|
||||
static void Diagnose( WinEDA_DrawPanel* aPanel,
|
||||
NETLIST_OBJECT* aNetItemRef,
|
||||
NETLIST_OBJECT* aNetItemTst,
|
||||
int aMinConn, int aDiag )
|
||||
void Diagnose( WinEDA_DrawPanel* aPanel,
|
||||
NETLIST_OBJECT* aNetItemRef,
|
||||
NETLIST_OBJECT* aNetItemTst,
|
||||
int aMinConn, int aDiag )
|
||||
{
|
||||
SCH_MARKER* Marker = NULL;
|
||||
SCH_SCREEN* screen;
|
||||
|
@ -433,7 +243,7 @@ static void Diagnose( WinEDA_DrawPanel* aPanel,
|
|||
if( aMinConn < 0 )
|
||||
{
|
||||
if( (aNetItemRef->m_Type == NET_HIERLABEL)
|
||||
|| (aNetItemRef->m_Type == NET_HIERBUSLABELMEMBER) )
|
||||
|| (aNetItemRef->m_Type == NET_HIERBUSLABELMEMBER) )
|
||||
{
|
||||
msg.Printf( _( "HLabel %s not connected to SheetLabel" ),
|
||||
GetChars( aNetItemRef->m_Label ) );
|
||||
|
@ -461,8 +271,7 @@ static void Diagnose( WinEDA_DrawPanel* aPanel,
|
|||
string_pinnum = CONV_FROM_UTF8( ascii_buf );
|
||||
cmp_ref = wxT( "?" );
|
||||
if( aNetItemRef->m_Type == NET_PIN && aNetItemRef->m_Link )
|
||||
cmp_ref = ( (SCH_COMPONENT*) aNetItemRef->m_Link )->GetRef(
|
||||
&aNetItemRef->m_SheetList );
|
||||
cmp_ref = ( (SCH_COMPONENT*) aNetItemRef->m_Link )->GetRef( &aNetItemRef->m_SheetList );
|
||||
|
||||
if( aNetItemTst == NULL )
|
||||
{
|
||||
|
@ -495,8 +304,7 @@ static void Diagnose( WinEDA_DrawPanel* aPanel,
|
|||
|
||||
if( aDiag == UNC )
|
||||
{
|
||||
msg.Printf(
|
||||
_( "More than 1 Pin connected to UnConnect symbol" ) );
|
||||
msg.Printf( _( "More than 1 Pin connected to UnConnect symbol" ) );
|
||||
Marker->SetData( ERCE_NOCONNECT_CONNECTED,
|
||||
aNetItemRef->m_Start,
|
||||
msg,
|
||||
|
@ -540,10 +348,10 @@ static void Diagnose( WinEDA_DrawPanel* aPanel,
|
|||
/* Routine testing electrical conflicts between NetItemRef and other items
|
||||
* of the same net
|
||||
*/
|
||||
static void TestOthersItems( WinEDA_DrawPanel* panel,
|
||||
unsigned NetItemRef,
|
||||
unsigned netstart,
|
||||
int* NetNbItems, int* MinConnexion )
|
||||
void TestOthersItems( WinEDA_DrawPanel* panel,
|
||||
unsigned NetItemRef,
|
||||
unsigned netstart,
|
||||
int* NetNbItems, int* MinConnexion )
|
||||
{
|
||||
unsigned NetItemTst;
|
||||
|
||||
|
@ -684,7 +492,7 @@ static void TestOthersItems( WinEDA_DrawPanel* panel,
|
|||
|
||||
/* Create the Diagnostic file (<xxx>.erc file)
|
||||
*/
|
||||
static bool WriteDiagnosticERC( const wxString& FullFileName )
|
||||
bool WriteDiagnosticERC( const wxString& FullFileName )
|
||||
{
|
||||
SCH_ITEM* DrawStruct;
|
||||
SCH_MARKER* Marker;
|
||||
|
@ -703,9 +511,7 @@ static bool WriteDiagnosticERC( const wxString& FullFileName )
|
|||
|
||||
SCH_SHEET_LIST SheetList;
|
||||
|
||||
for( Sheet = SheetList.GetFirst();
|
||||
Sheet != NULL;
|
||||
Sheet = SheetList.GetNext() )
|
||||
for( Sheet = SheetList.GetFirst(); Sheet != NULL; Sheet = SheetList.GetNext() )
|
||||
{
|
||||
if( Sheet->Last() == g_RootSheet )
|
||||
{
|
||||
|
@ -761,9 +567,7 @@ static bool IsLabelsConnected( NETLIST_OBJECT* a, NETLIST_OBJECT* b )
|
|||
/* Routine to perform erc on a sheetLabel that is connected to a corresponding
|
||||
* sub sheet Glabel
|
||||
*/
|
||||
void TestLabel( WinEDA_DrawPanel* panel,
|
||||
unsigned NetItemRef,
|
||||
unsigned StartNet )
|
||||
void TestLabel( WinEDA_DrawPanel* panel, unsigned NetItemRef, unsigned StartNet )
|
||||
{
|
||||
unsigned NetItemTst;
|
||||
int erc = 1;
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
#ifndef _ERC_H
|
||||
#define _ERC_H
|
||||
|
||||
|
||||
class WinEDA_DrawPanel;
|
||||
class NETLIST_OBJECT;
|
||||
|
||||
/* For ERC markers: error types (used in diags, and to set the color):
|
||||
*/
|
||||
enum errortype
|
||||
|
@ -46,5 +50,25 @@ enum errortype
|
|||
#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
|
||||
|
||||
/* 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
|
||||
|
|
|
@ -2,15 +2,20 @@
|
|||
* events_called_functions.cpp
|
||||
* some events functions
|
||||
*/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "kicad_device_context.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "protos.h"
|
||||
#include "sch_component.h"
|
||||
#include "sch_text.h"
|
||||
|
||||
|
||||
/** Event function WinEDA_SchematicFrame::OnCopySchematicItemRequest
|
||||
* duplicate the current located item
|
||||
|
|
|
@ -7,13 +7,14 @@
|
|||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "class_library.h"
|
||||
#include "libeditframe.h"
|
||||
#include "sch_sheet.h"
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -14,13 +14,17 @@
|
|||
#include "confirm.h"
|
||||
#include "kicad_string.h"
|
||||
#include "gestfich.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "class_marker_sch.h"
|
||||
#include "protos.h"
|
||||
#include "class_library.h"
|
||||
#include "lib_pin.h"
|
||||
#include "sch_marker.h"
|
||||
#include "sch_component.h"
|
||||
#include "sch_sheet.h"
|
||||
#include "sch_sheet_path.h"
|
||||
|
||||
#include "kicad_device_context.h"
|
||||
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
|
||||
#include "block_commande.h"
|
||||
|
||||
#include "program.h"
|
||||
|
||||
|
||||
class SCH_ITEM;
|
||||
class SCH_SHEET;
|
||||
class TRANSFORM;
|
||||
|
||||
|
||||
#define EESCHEMA_VERSION 2
|
||||
|
||||
|
@ -28,14 +28,14 @@ class SCH_SHEET;
|
|||
|
||||
#define MAX_PIN_INFO 10
|
||||
|
||||
#define TXTMARGE 10 /* Offset in mils for placement of labels
|
||||
* and pin numbers. */
|
||||
#define TXTMARGE 10 // Offset in mils for placement of labels and pin numbers.
|
||||
|
||||
#define HIGHLIGHT_COLOR WHITE
|
||||
|
||||
/* Used for EDA_BaseStruct, .m_Select member */
|
||||
#define IS_SELECTED 1
|
||||
|
||||
#define TEXT_NO_VISIBLE 1
|
||||
|
||||
//#define GR_DEFAULT_DRAWMODE GR_COPY
|
||||
#define GR_DEFAULT_DRAWMODE GR_COPY
|
||||
|
@ -105,6 +105,31 @@ typedef enum
|
|||
} 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
|
||||
* by the repeat command. NULL if no
|
||||
* item to repeat */
|
||||
|
|
|
@ -8,11 +8,13 @@
|
|||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "class_library.h"
|
||||
#include "sch_component.h"
|
||||
#include "viewlib_frame.h"
|
||||
|
||||
#include "get_component_dialog.h"
|
||||
|
|
|
@ -8,9 +8,12 @@
|
|||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "bitmaps.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "sch_sheet.h"
|
||||
#include "sch_sheet_path.h"
|
||||
|
||||
#include "wx/imaglist.h"
|
||||
#include "wx/treectrl.h"
|
||||
|
|
|
@ -6,12 +6,15 @@
|
|||
#include "common.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "hotkeys.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
#include "class_libentry.h"
|
||||
#include "sch_items.h"
|
||||
#include "sch_component.h"
|
||||
#include "sch_sheet.h"
|
||||
|
||||
#include "dialogs/dialog_schematic_find.h"
|
||||
|
||||
|
@ -100,16 +103,21 @@ static Ki_HotkeyInfo HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_SHIFT + GR_KB_CTRL +
|
|||
|
||||
// Schematic editor
|
||||
static Ki_HotkeyInfo HkAddLabel( wxT( "add Label" ), HK_ADD_LABEL, 'L' );
|
||||
static Ki_HotkeyInfo HkAddHierarchicalLabel( wxT( "add Hierarchical Label" ), HK_ADD_HLABEL, 'H' );
|
||||
static Ki_HotkeyInfo HkAddGlobalLabel( wxT( "add Global Label" ), HK_ADD_GLABEL, GR_KB_CTRL + 'L' );
|
||||
static Ki_HotkeyInfo HkAddJunction( wxT( "add Junction" ), HK_ADD_JUNCTION, 'J' );
|
||||
static Ki_HotkeyInfo HkBeginWire( wxT( "begin Wire" ), HK_BEGIN_WIRE, 'W' );
|
||||
static Ki_HotkeyInfo HkAddComponent( wxT( "Add Component" ),
|
||||
HK_ADD_NEW_COMPONENT, 'A' );
|
||||
static Ki_HotkeyInfo HkAddNoConn( wxT( "Add NoConnected Flag" ),
|
||||
HK_ADD_NOCONN_FLAG, 'Q' );
|
||||
static Ki_HotkeyInfo HkMirrorYComponent( wxT( "Mirror Y Component" ),
|
||||
HK_MIRROR_Y_COMPONENT, 'Y' );
|
||||
static Ki_HotkeyInfo HkMirrorXComponent( wxT( "Mirror X Component" ),
|
||||
HK_MIRROR_X_COMPONENT, 'X' );
|
||||
static Ki_HotkeyInfo HkBeginBus( wxT( "begin Bus" ), HK_BEGIN_BUS, 'B' );
|
||||
static Ki_HotkeyInfo HkAddComponent( wxT( "Add Component" ), HK_ADD_NEW_COMPONENT, 'A' );
|
||||
static Ki_HotkeyInfo HkAddPower( wxT( "Add Power" ), HK_ADD_NEW_POWER, 'P' );
|
||||
static Ki_HotkeyInfo HkAddNoConn( wxT( "Add NoConnected Flag" ), HK_ADD_NOCONN_FLAG, 'Q' );
|
||||
static Ki_HotkeyInfo HkAddHierSheet( wxT( "Add Sheet" ), HK_ADD_HIER_SHEET, 'S' );
|
||||
static Ki_HotkeyInfo HkAddBusEntry( wxT( "Add Bus Entry" ), HK_ADD_BUS_ENTRY, '/' );
|
||||
static Ki_HotkeyInfo HkAddWireEntry( wxT( "Add Wire Entry" ), HK_ADD_WIRE_ENTRY, 'Z' );
|
||||
static Ki_HotkeyInfo HkAddGraphicPolyLine( wxT( "Add Graphic PolyLine" ), HK_ADD_GRAPHIC_POLYLINE, 'I' );
|
||||
static Ki_HotkeyInfo HkAddGraphicText( wxT( "Add Graphic Text" ), HK_ADD_GRAPHIC_TEXT, 'T' );
|
||||
static Ki_HotkeyInfo HkMirrorYComponent( wxT( "Mirror Y Component" ), HK_MIRROR_Y_COMPONENT, 'Y' );
|
||||
static Ki_HotkeyInfo HkMirrorXComponent( wxT( "Mirror X Component" ), HK_MIRROR_X_COMPONENT, 'X' );
|
||||
static Ki_HotkeyInfo HkOrientNormalComponent( wxT( "Orient Normal Component" ),
|
||||
HK_ORIENT_NORMAL_COMPONENT, 'N' );
|
||||
static Ki_HotkeyInfo HkRotate( wxT( "Rotate Item" ), HK_ROTATE, 'R' );
|
||||
|
@ -172,6 +180,7 @@ Ki_HotkeyInfo* s_Schematic_Hotkey_List[] =
|
|||
&HkCopyComponentOrText,
|
||||
&HkDrag,
|
||||
&HkAddComponent,
|
||||
&HkAddPower,
|
||||
&HkRotate,
|
||||
&HkMirrorXComponent,
|
||||
&HkMirrorYComponent,
|
||||
|
@ -180,9 +189,17 @@ Ki_HotkeyInfo* s_Schematic_Hotkey_List[] =
|
|||
&HkEditComponentValue,
|
||||
&HkEditComponentFootprint,
|
||||
&HkBeginWire,
|
||||
&HkBeginBus,
|
||||
&HkAddLabel,
|
||||
&HkAddHierarchicalLabel,
|
||||
&HkAddGlobalLabel,
|
||||
&HkAddJunction,
|
||||
&HkAddNoConn,
|
||||
&HkAddHierSheet,
|
||||
&HkAddWireEntry,
|
||||
&HkAddBusEntry,
|
||||
&HkAddGraphicPolyLine,
|
||||
&HkAddGraphicText,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -379,6 +396,16 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
|
|||
}
|
||||
break;
|
||||
|
||||
case HK_ADD_NEW_POWER: // Add power component
|
||||
if( !itemInEdit )
|
||||
{
|
||||
// switch to m_ID_current_state = ID_PLACE_POWER_BUTT;
|
||||
if( m_ID_current_state != ID_PLACE_POWER_BUTT )
|
||||
SetToolID( ID_PLACE_POWER_BUTT, wxCURSOR_PENCIL, _( "Add Power" ) );
|
||||
OnLeftClick( DC, MousePos );
|
||||
}
|
||||
break;
|
||||
|
||||
case HK_ADD_LABEL:
|
||||
if( notBusy )
|
||||
{
|
||||
|
@ -389,6 +416,26 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
|
|||
}
|
||||
break;
|
||||
|
||||
case HK_ADD_HLABEL:
|
||||
if( notBusy )
|
||||
{
|
||||
// switch to m_ID_current_state = ID_HIERLABEL_BUTT;
|
||||
if( m_ID_current_state != ID_HIERLABEL_BUTT )
|
||||
SetToolID( ID_HIERLABEL_BUTT, wxCURSOR_PENCIL, _( "Add Hierarchical Label" ) );
|
||||
OnLeftClick( DC, MousePos );
|
||||
}
|
||||
break;
|
||||
|
||||
case HK_ADD_GLABEL:
|
||||
if( notBusy )
|
||||
{
|
||||
// switch to m_ID_current_state = ID_GLABEL_BUTT;
|
||||
if( m_ID_current_state != ID_GLABEL_BUTT )
|
||||
SetToolID( ID_GLABEL_BUTT, wxCURSOR_PENCIL, _( "Add Global Label" ) );
|
||||
OnLeftClick( DC, MousePos );
|
||||
}
|
||||
break;
|
||||
|
||||
case HK_ADD_JUNCTION:
|
||||
if( notBusy )
|
||||
{
|
||||
|
@ -399,26 +446,99 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
|
|||
}
|
||||
break;
|
||||
|
||||
case HK_BEGIN_WIRE:
|
||||
// An item is selected. If not a wire, a new command is not possible
|
||||
case HK_ADD_WIRE_ENTRY:
|
||||
if( notBusy )
|
||||
{
|
||||
if( DrawStruct && DrawStruct->m_Flags )
|
||||
{
|
||||
if( DrawStruct->Type() == DRAW_SEGMENT_STRUCT_TYPE )
|
||||
{
|
||||
SCH_LINE* segment = (SCH_LINE*) DrawStruct;
|
||||
if( segment->GetLayer() != LAYER_WIRE )
|
||||
break;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
// switch to m_ID_current_state = ID_WIRETOBUS_ENTRY_BUTT;
|
||||
if( m_ID_current_state != ID_WIRETOBUS_ENTRY_BUTT )
|
||||
SetToolID( ID_WIRETOBUS_ENTRY_BUTT, wxCURSOR_PENCIL, _( "Add Wire to Bus entry" ) );
|
||||
OnLeftClick( DC, MousePos );
|
||||
}
|
||||
break;
|
||||
|
||||
case HK_ADD_BUS_ENTRY:
|
||||
if( notBusy )
|
||||
{
|
||||
// switch to m_ID_current_state = ID_BUSTOBUS_ENTRY_BUTT;
|
||||
if( m_ID_current_state != ID_BUSTOBUS_ENTRY_BUTT )
|
||||
SetToolID( ID_BUSTOBUS_ENTRY_BUTT, wxCURSOR_PENCIL, _( "Add Bus to Bus entry" ) );
|
||||
OnLeftClick( DC, MousePos );
|
||||
}
|
||||
break;
|
||||
|
||||
case HK_ADD_HIER_SHEET:
|
||||
if( notBusy )
|
||||
{
|
||||
// switch to m_ID_current_state = ID_SHEET_SYMBOL_BUTT;
|
||||
if( m_ID_current_state != ID_SHEET_SYMBOL_BUTT )
|
||||
SetToolID( ID_SHEET_SYMBOL_BUTT, wxCURSOR_PENCIL, _( "Add Sheet" ) );
|
||||
OnLeftClick( DC, MousePos );
|
||||
}
|
||||
break;
|
||||
|
||||
case HK_ADD_GRAPHIC_TEXT:
|
||||
if( notBusy )
|
||||
{
|
||||
// switch to m_ID_current_state = ID_TEXT_COMMENT_BUTT;
|
||||
if( m_ID_current_state != ID_TEXT_COMMENT_BUTT )
|
||||
SetToolID( ID_TEXT_COMMENT_BUTT, wxCURSOR_PENCIL, _( "Add Text" ) );
|
||||
OnLeftClick( DC, MousePos );
|
||||
}
|
||||
break;
|
||||
|
||||
case HK_ADD_GRAPHIC_POLYLINE:
|
||||
if( notBusy )
|
||||
{
|
||||
// switch to m_ID_current_state = ID_LINE_COMMENT_BUTT;
|
||||
if( m_ID_current_state != ID_LINE_COMMENT_BUTT )
|
||||
SetToolID( ID_LINE_COMMENT_BUTT, wxCURSOR_PENCIL, _( "Add Lines" ) );
|
||||
OnLeftClick( DC, MousePos );
|
||||
}
|
||||
break;
|
||||
|
||||
case HK_BEGIN_BUS:
|
||||
// An item can be selected. If not a Bus, a begin command is not possible
|
||||
if( notBusy )
|
||||
{
|
||||
// switch to m_ID_current_state = ID_WIRE_BUTT;
|
||||
if( m_ID_current_state != ID_BUS_BUTT )
|
||||
SetToolID( ID_BUS_BUTT, wxCURSOR_PENCIL, _( "Add Bus" ) );
|
||||
OnLeftClick( DC, MousePos );
|
||||
break;
|
||||
}
|
||||
if( DrawStruct && DrawStruct->IsNew() && ( m_ID_current_state == ID_BUS_BUTT ) )
|
||||
{
|
||||
if( DrawStruct->Type() == DRAW_SEGMENT_STRUCT_TYPE )
|
||||
{
|
||||
SCH_LINE* segment = (SCH_LINE*) DrawStruct;
|
||||
if( segment->GetLayer() != LAYER_BUS )
|
||||
break;
|
||||
// Bus in progress:
|
||||
OnLeftClick( DC, MousePos );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case HK_BEGIN_WIRE:
|
||||
// An item can be selected. If not a wire, a begin command is not possible
|
||||
if( notBusy )
|
||||
{
|
||||
// switch to m_ID_current_state = ID_WIRE_BUTT;
|
||||
if( m_ID_current_state != ID_WIRE_BUTT )
|
||||
SetToolID( ID_WIRE_BUTT, wxCURSOR_PENCIL, _( "Add Wire" ) );
|
||||
OnLeftClick( DC, MousePos );
|
||||
break;
|
||||
}
|
||||
if( DrawStruct && DrawStruct->IsNew() && ( m_ID_current_state == ID_WIRE_BUTT ) )
|
||||
{
|
||||
if( DrawStruct->Type() == DRAW_SEGMENT_STRUCT_TYPE )
|
||||
{
|
||||
SCH_LINE* segment = (SCH_LINE*) DrawStruct;
|
||||
if( segment->GetLayer() != LAYER_WIRE )
|
||||
break;
|
||||
// Wire in progress:
|
||||
OnLeftClick( DC, MousePos );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -30,9 +30,18 @@ enum hotkey_id_commnand {
|
|||
HK_COPY_COMPONENT_OR_LABEL,
|
||||
HK_DRAG,
|
||||
HK_ADD_NEW_COMPONENT,
|
||||
HK_ADD_NEW_POWER,
|
||||
HK_BEGIN_WIRE,
|
||||
HK_BEGIN_BUS,
|
||||
HK_ADD_WIRE_ENTRY,
|
||||
HK_ADD_BUS_ENTRY,
|
||||
HK_ADD_LABEL,
|
||||
HK_ADD_HLABEL,
|
||||
HK_ADD_GLABEL,
|
||||
HK_ADD_JUNCTION,
|
||||
HK_ADD_HIER_SHEET,
|
||||
HK_ADD_GRAPHIC_TEXT,
|
||||
HK_ADD_GRAPHIC_POLYLINE,
|
||||
HK_ADD_NOCONN_FLAG
|
||||
};
|
||||
|
||||
|
|
|
@ -5,9 +5,11 @@
|
|||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "plot_common.h"
|
||||
#include "trigo.h"
|
||||
#include "wxstruct.h"
|
||||
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
|
|
|
@ -5,9 +5,11 @@
|
|||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "plot_common.h"
|
||||
#include "trigo.h"
|
||||
#include "wxstruct.h"
|
||||
#include "bezier_curves.h"
|
||||
|
||||
#include "general.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "class_drawpanel.h"
|
||||
#include "plot_common.h"
|
||||
#include "trigo.h"
|
||||
#include "wxstruct.h"
|
||||
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "gestfich.h"
|
||||
#include "eeschema_id.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "appl_wxstruct.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "base_struct.h"
|
||||
#include "drawtxt.h"
|
||||
#include "kicad_string.h"
|
||||
|
@ -13,12 +14,12 @@
|
|||
#include "plot_common.h"
|
||||
#include "trigo.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "class_libentry.h"
|
||||
#include "transform.h"
|
||||
#include "lib_field.h"
|
||||
#include "template_fieldnames.h"
|
||||
|
||||
|
||||
/*******************/
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef CLASS_LIBENTRY_FIELDS_H
|
||||
#define CLASS_LIBENTRY_FIELDS_H
|
||||
|
||||
#include "program.h"
|
||||
//#include "general.h"
|
||||
#include "lib_draw_item.h"
|
||||
|
||||
|
||||
|
@ -68,7 +68,8 @@ public:
|
|||
*/
|
||||
wxString GetName();
|
||||
|
||||
/** Function GetPenSize virtual pure
|
||||
/**
|
||||
* Function GetPenSize virtual pure
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
int GetPenSize( );
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "gr_basic.h"
|
||||
#include "macros.h"
|
||||
#include "trigo.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "drawtxt.h"
|
||||
#include "plot_common.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
|
|
|
@ -177,7 +177,8 @@ public:
|
|||
}
|
||||
|
||||
|
||||
/** Function ReturnPinStringNum (static function)
|
||||
/**
|
||||
* Function ReturnPinStringNum (static function)
|
||||
* Pin num is coded as a long or 4 ascii chars
|
||||
* @param aPinNum = a long containing a pin num
|
||||
* @return aStringBuffer = the wxString to store the pin num as an
|
||||
|
|
|
@ -5,15 +5,19 @@
|
|||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "plot_common.h"
|
||||
#include "trigo.h"
|
||||
#include "wxstruct.h"
|
||||
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "lib_polyline.h"
|
||||
#include "transform.h"
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
||||
LIB_POLYLINE::LIB_POLYLINE( LIB_COMPONENT* aParent ) :
|
||||
LIB_DRAW_ITEM( COMPONENT_POLYLINE_DRAW_TYPE, aParent )
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "class_drawpanel.h"
|
||||
#include "plot_common.h"
|
||||
#include "trigo.h"
|
||||
#include "wxstruct.h"
|
||||
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
|
|
|
@ -10,12 +10,13 @@
|
|||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "plot_common.h"
|
||||
#include "drawtxt.h"
|
||||
#include "trigo.h"
|
||||
#include "wxstruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "lib_draw_item.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
|
|
|
@ -5,12 +5,15 @@
|
|||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxstruct.h"
|
||||
#include "sch_item_struct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "netlist.h"
|
||||
#include "protos.h"
|
||||
#include "class_library.h"
|
||||
#include "sch_component.h"
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -5,17 +5,19 @@
|
|||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
#include "class_library.h"
|
||||
#include "template_fieldnames.h"
|
||||
|
||||
#include "dialog_lib_new_component.h"
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "confirm.h"
|
||||
#include "eeschema_id.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
|
|
|
@ -8,12 +8,13 @@
|
|||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "confirm.h"
|
||||
#include "bitmaps.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "hotkeys.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
|
|
|
@ -11,14 +11,13 @@
|
|||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
|
||||
//#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
#include "class_library.h"
|
||||
|
||||
|
||||
/** function OnPlotCurrentComponent
|
||||
* plot in SVG or PNG format the curren component
|
||||
*/
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "class_drawpanel.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
|
|
|
@ -7,13 +7,15 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "eda_doc.h"
|
||||
#include "bitmaps.h"
|
||||
#include "gr_basic.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "eeschema_id.h"
|
||||
|
|
|
@ -6,14 +6,16 @@
|
|||
#define __LIBEDITFRM_H__
|
||||
|
||||
#include "wxstruct.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
||||
#include "lib_draw_item.h"
|
||||
|
||||
|
||||
class SCH_SCREEN;
|
||||
class WinEDA_SchematicFrame;
|
||||
class CMP_LIBRARY;
|
||||
class LIB_COMPONENT;
|
||||
class LIB_ALIAS;
|
||||
class LIB_FIELD;
|
||||
class WinEDA_bodygraphics_PropertiesFrame;
|
||||
class Dialog_BodyGraphicText_Properties;
|
||||
|
||||
|
@ -120,7 +122,8 @@ public:
|
|||
Close( false );
|
||||
}
|
||||
|
||||
/** Function OnModify()
|
||||
/**
|
||||
* Function OnModify()
|
||||
* Must be called after a schematic change
|
||||
* in order to set the "modify" flag of the current screen
|
||||
*/
|
||||
|
@ -171,24 +174,28 @@ public:
|
|||
|
||||
FILL_T GetFillStyle( void ) { return m_drawFillStyle; }
|
||||
|
||||
/** Function TempCopyComponent
|
||||
/**
|
||||
* Function TempCopyComponent
|
||||
* create a temporary copy of the current edited component
|
||||
* Used to prepare an Undo ant/or abort command before editing the component
|
||||
*/
|
||||
void TempCopyComponent();
|
||||
|
||||
/** Function RestoreComponent
|
||||
/**
|
||||
* Function RestoreComponent
|
||||
* Restore the current edited component from its temporary copy.
|
||||
* Used to abort a command
|
||||
*/
|
||||
void RestoreComponent();
|
||||
|
||||
/** Function GetTempCopyComponent
|
||||
/**
|
||||
* Function GetTempCopyComponent
|
||||
* @return the temporary copy of the current component.
|
||||
*/
|
||||
LIB_COMPONENT* GetTempCopyComponent() { return m_tempCopyComponent; }
|
||||
|
||||
/** Function ClearTempCopyComponent
|
||||
/**
|
||||
* Function ClearTempCopyComponent
|
||||
* delete temporary copy of the current component and clear pointer
|
||||
*/
|
||||
void ClearTempCopyComponent();
|
||||
|
@ -310,7 +317,8 @@ protected:
|
|||
|
||||
friend class Dialog_BodyGraphicText_Properties;
|
||||
|
||||
/** function CreatePNGorJPEGFile
|
||||
/**
|
||||
* Function CreatePNGorJPEGFile
|
||||
* Create an image (screenshot) of the current component.
|
||||
* Output file format is png or jpeg
|
||||
* @param aFileName = the full filename
|
||||
|
@ -331,7 +339,8 @@ protected:
|
|||
virtual void PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, int aPrintMask,
|
||||
bool aPrintMirrorMode, void * aData = NULL);
|
||||
|
||||
/** function SVG_Print_component
|
||||
/**
|
||||
* Function SVG_Print_component
|
||||
* Creates the SVG print file for the current edited component.
|
||||
* @param aFullFileName = the full filename of the file
|
||||
*/
|
||||
|
|
|
@ -7,12 +7,13 @@
|
|||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
||||
#include "program.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
#include "class_library.h"
|
||||
#include "template_fieldnames.h"
|
||||
|
||||
|
||||
void WinEDA_LibeditFrame::EditField( wxDC* DC, LIB_FIELD* Field )
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue