Commit ff9036b2 authored by charras's avatar charras

eeschema: code cleaning

parent 34909473
......@@ -12,8 +12,6 @@
/* Variables Locales */
#include "dialog_backanno.cpp"
/*******************************************************************************************/
bool WinEDA_SchematicFrame::FillFootprintFieldForAllInstancesofComponent(
const wxString& aReference,
......
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_Backanno.cpp
// Purpose:
// Author: Frank Bennett
// Modified by:
// Created: Thu May 1 11:23:06 MDT 2008
// RCS-ID:
// Copyright: License GNU
// Licence:
/////////////////////////////////////////////////////////////////////////////
////@begin includes
////@end includes
#include "dialog_backanno.h"
////@begin XPM images
////@end XPM images
/*!
* WinEDA_BackannoFrame type definition
*/
IMPLEMENT_DYNAMIC_CLASS( WinEDA_BackannoFrame, wxDialog )
/*!
* WinEDA_BackannoFrame event table definition
*/
BEGIN_EVENT_TABLE( WinEDA_BackannoFrame, wxDialog )
////@begin WinEDA_BackannoFrame event table entries
////@end WinEDA_BackannoFrame event table entries
END_EVENT_TABLE()
/*!
* WinEDA_BackannoFrame constructors
*/
WinEDA_BackannoFrame::WinEDA_BackannoFrame( )
{
}
WinEDA_BackannoFrame::WinEDA_BackannoFrame( WinEDA_SchematicFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
m_Parent = parent;
Create(parent, id, caption, pos, size, style);
}
/*!
* WinEDA_BackannoFrame creator
*/
bool WinEDA_BackannoFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin WinEDA_BackannoFrame member initialisation
m_NewTextCtrl = NULL;
////@end WinEDA_BackannoFrame member initialisation
////@begin WinEDA_BackannoFrame creation
SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style );
GetSizer()->Fit(this);
GetSizer()->SetSizeHints(this);
Centre();
////@end WinEDA_BackannoFrame creation
m_NewTextCtrl->SetFocus();
/* does not work here, might work if moved elsewhere,
// see void DrcDialog::OnInitDialog( wxInitDialogEvent& event )
// deselect the existing text, seems SetFocus() wants to emulate
// Microsoft and select all text, which is not desireable here.
m_NewTextCtrl->SetSelection(0,0);
*/
return true;
}
/*!
* Should we show tooltips?
*/
bool WinEDA_BackannoFrame::ShowToolTips()
{
return true;
}
/*!
* Get bitmap resources
*/
wxBitmap WinEDA_BackannoFrame::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
////@begin WinEDA_BackannoFrame bitmap retrieval
wxUnusedVar(name);
return wxNullBitmap;
////@end WinEDA_BackannoFrame bitmap retrieval
}
/*!
* Get icon resources
*/
wxIcon WinEDA_BackannoFrame::GetIconResource( const wxString& name )
{
// Icon retrieval
////@begin WinEDA_BackannoFrame icon retrieval
wxUnusedVar(name);
return wxNullIcon;
////@end WinEDA_BackannoFrame icon retrieval
}
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_backanno.h
// Purpose:
// Author: Frank Bennett
// Modified by:
// Created: Wed Apr 30 16:40:21 MDT 2008
// RCS-ID:
// Copyright: License GNU
// Licence:
/////////////////////////////////////////////////////////////////////////////
#ifndef _DIALOG_BACKANNO_H_
#define _DIALOG_BACKANNO_H_
/*!
* Includes
*/
////@begin includes
#include "wx/valtext.h"
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
#define SYMBOL_WINEDA_BACKANNOFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_BACKANNOFRAME_TITLE _("EESchema Back Annotate")
#define SYMBOL_WINEDA_BACKANNOFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_BACKANNOFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_BACKANNOFRAME_POSITION wxDefaultPosition
#define ID_TEXTCTRL1 10008
#define BACKANNO_SHEET 10001
#define FIND_HIERARCHY 10002
#define FIND_NEXT 10005
#define FIND_MARKERS 10003
#define FIND_NEXT_MARKER 10006
#define LOCATE_IN_LIBRARIES 10004
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
/*!
* WinEDA_BackannoFrame class declaration
*/
class WinEDA_BackannoFrame: public wxDialog
{
DECLARE_DYNAMIC_CLASS( WinEDA_BackannoFrame )
DECLARE_EVENT_TABLE()
public:
/// Constructors
WinEDA_BackannoFrame( );
WinEDA_BackannoFrame( WinEDA_SchematicFrame* parent, wxWindowID id = SYMBOL_WINEDA_BACKANNOFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_BACKANNOFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_BACKANNOFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_BACKANNOFRAME_SIZE, long style = SYMBOL_WINEDA_BACKANNOFRAME_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_BACKANNOFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_BACKANNOFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_BACKANNOFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_BACKANNOFRAME_SIZE, long style = SYMBOL_WINEDA_BACKANNOFRAME_STYLE );
////@begin WinEDA_BackannoFrame event handler declarations
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for BACKANNO_SHEET
void OnBackannoSheetClick( wxCommandEvent& event );
////@end WinEDA_BackannoFrame event handler declarations
////@begin WinEDA_BackannoFrame member function declarations
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end WinEDA_BackannoFrame member function declarations
/// Should we show tooltips?
static bool ShowToolTips();
void BackannoSchematicItem(wxCommandEvent& event);
bool ReadInputStuffFile(const wxString & FullFileName);
void LoadStuffFile( wxCommandEvent& event );
////@begin WinEDA_BackannoFrame member variables
wxTextCtrl* m_NewTextCtrl;
////@end WinEDA_BackannoFrame member variables
WinEDA_SchematicFrame * m_Parent;
};
#endif
// _DIALOG_FIND_H_
......@@ -483,7 +483,6 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
int ii, NbrItem = 0;
EDA_BaseStruct* DrawList;
SCH_COMPONENT* DrawLibItem;
int TransMat[2][2], PartX, PartY, x2, y2;
EDA_LibComponentStruct* Entry;
LibEDA_BaseStruct* DEntry;
Hierarchical_PIN_Sheet_Struct* SheetLabel;
......@@ -529,8 +528,7 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
ObjNet[NbrItem].m_SheetListInclude = *sheetlist;
ObjNet[NbrItem].m_Comp = STRUCT;
ObjNet[NbrItem].m_Type = NET_JONCTION;
ObjNet[NbrItem].m_Start = STRUCT->m_Pos;
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
ObjNet[NbrItem].m_Start = ObjNet[NbrItem].m_End = STRUCT->m_Pos;
}
NbrItem++;
break;
......@@ -544,8 +542,7 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
ObjNet[NbrItem].m_SheetListInclude = *sheetlist;
ObjNet[NbrItem].m_Comp = STRUCT;
ObjNet[NbrItem].m_Type = NET_NOCONNECT;
ObjNet[NbrItem].m_Start = STRUCT->m_Pos;
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
ObjNet[NbrItem].m_Start = ObjNet[NbrItem].m_End = STRUCT->m_Pos;
}
NbrItem++;
break;
......@@ -567,8 +564,7 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
ObjNet[NbrItem].m_Type = NET_HIERLABEL;
ObjNet[NbrItem].m_Label = &STRUCT->m_Text;
ObjNet[NbrItem].m_Start = STRUCT->m_Pos;
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
ObjNet[NbrItem].m_Start = ObjNet[NbrItem].m_End = STRUCT->m_Pos;
/* Si c'est un Bus, eclatement en Label */
if( ii )
......@@ -595,8 +591,7 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
ObjNet[NbrItem].m_Type = NET_HIERLABEL;
ObjNet[NbrItem].m_Label = &STRUCT->m_Text;
ObjNet[NbrItem].m_Start = STRUCT->m_Pos;
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
ObjNet[NbrItem].m_Start = ObjNet[NbrItem].m_End = STRUCT->m_Pos;
/* Si c'est un Bus, eclatement en Label */
if( ii )
......@@ -608,11 +603,6 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
case TYPE_SCH_COMPONENT:
DrawLibItem = (SCH_COMPONENT*) DrawList;
memcpy( TransMat, DrawLibItem->m_Transform, sizeof(TransMat) );
PartX = DrawLibItem->m_Pos.x;
PartY = DrawLibItem->m_Pos.y;
Entry = FindLibPart( DrawLibItem->m_ChipName, wxEmptyString, FIND_ROOT );
if( Entry == NULL )
......@@ -636,11 +626,9 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
&& (DEntry->m_Convert != DrawLibItem->m_Convert) )
continue;
x2 = PartX + TransMat[0][0] * Pin->m_Pos.x
+ TransMat[0][1] * Pin->m_Pos.y;
y2 = PartY + TransMat[1][0] * Pin->m_Pos.x
+ TransMat[1][1] * Pin->m_Pos.y;
wxPoint pos2 =
TransformCoordinate( DrawLibItem->m_Transform,
Pin->m_Pos ) + DrawLibItem->m_Pos;
if( ObjNet )
{
......@@ -652,9 +640,7 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
ObjNet[NbrItem].m_ElectricalType = Pin->m_PinType;
ObjNet[NbrItem].m_PinNum = Pin->m_PinNum;
ObjNet[NbrItem].m_Label = &Pin->m_PinName;
ObjNet[NbrItem].m_Start.x = x2;
ObjNet[NbrItem].m_Start.y = y2;
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
ObjNet[NbrItem].m_Start = ObjNet[NbrItem].m_End = pos2;
}
NbrItem++;
......@@ -669,8 +655,7 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
ObjNet[NbrItem].m_SheetList = *sheetlist;
ObjNet[NbrItem].m_Type = NET_PINLABEL;
ObjNet[NbrItem].m_Label = &Pin->m_PinName;
ObjNet[NbrItem].m_Start.x = x2;
ObjNet[NbrItem].m_Start.y = y2;
ObjNet[NbrItem].m_Start = pos2;
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
}
NbrItem++;
......@@ -706,8 +691,7 @@ static int ListeObjetConnection( DrawSheetPath* sheetlist, ObjetNetListStruct* O
ObjNet[NbrItem].m_ElectricalType = SheetLabel->m_Shape;
ObjNet[NbrItem].m_Label = &SheetLabel->m_Text;
ObjNet[NbrItem].m_SheetListInclude = list;
ObjNet[NbrItem].m_Start = SheetLabel->m_Pos;
ObjNet[NbrItem].m_End = ObjNet[NbrItem].m_Start;
ObjNet[NbrItem].m_Start = ObjNet[NbrItem].m_End = SheetLabel->m_Pos;
/* Si c'est un Bus, eclatement en Label */
if( ii )
......
......@@ -22,7 +22,6 @@
#include "dialog_build_BOM.h"
#include "dialog_erc.h"
#include "dialog_find.h"
#include "dialog_backanno.h"
#include "netlist_control.h"
......
update=14/12/2006-16:06:02
update=19/9/2008-05:53:18
version=1
last_client=pcbnew
last_client=eeschema
[general]
version=1
RootSch=
......@@ -15,67 +15,6 @@ LibDir=
NetType=0
[cvpcb/libraries]
EquName1=devcms
[eeschema]
version=1
LibDir=
NetFmt=1
HPGLSpd=20
HPGLDm=15
HPGLNum=1
offX_A4=0
offY_A4=0
offX_A3=0
offY_A3=0
offX_A2=0
offY_A2=0
offX_A1=0
offY_A1=0
offX_A0=0
offY_A0=0
offX_A=0
offY_A=0
offX_B=0
offY_B=0
offX_C=0
offY_C=0
offX_D=0
offY_D=0
offX_E=0
offY_E=0
RptD_X=0
RptD_Y=100
RptLab=1
PenMin=20
SimCmd=
UseNetN=0
[eeschema/libraries]
LibName1=power
LibName2=device
LibName3=conn
LibName4=linear
LibName5=regul
LibName6=74xx
LibName7=cmos4000
LibName8=adc-dac
LibName9=memory
LibName10=xilinx
LibName11=special
LibName12=microcontrollers
LibName13=dsp
LibName14=microchip
LibName15=analog_switches
LibName16=motorola
LibName17=texas
LibName18=intel
LibName19=audio
LibName20=interface
LibName21=digital-audio
LibName22=philips
LibName23=display
LibName24=cypress
LibName25=siliconi
LibName26=contrib
LibName27=valves
[pcbnew]
version=1
PadDrlX=320
......@@ -140,3 +79,66 @@ LibName5=divers
LibName6=libcms
LibName7=display
LibName8=valves
[eeschema]
version=1
LibDir=
NetFmt=1
HPGLSpd=20
HPGLDm=15
HPGLNum=1
offX_A4=0
offY_A4=0
offX_A3=0
offY_A3=0
offX_A2=0
offY_A2=0
offX_A1=0
offY_A1=0
offX_A0=0
offY_A0=0
offX_A=0
offY_A=0
offX_B=0
offY_B=0
offX_C=0
offY_C=0
offX_D=0
offY_D=0
offX_E=0
offY_E=0
RptD_X=0
RptD_Y=100
RptLab=1
SimCmd=
UseNetN=0
LabSize=60
[eeschema/libraries]
LibName1=power
LibName2=device
LibName3=transistors
LibName4=conn
LibName5=linear
LibName6=regul
LibName7=74xx
LibName8=cmos4000
LibName9=adc-dac
LibName10=memory
LibName11=xilinx
LibName12=special
LibName13=microcontrollers
LibName14=dsp
LibName15=microchip
LibName16=analog_switches
LibName17=motorola
LibName18=texas
LibName19=intel
LibName20=audio
LibName21=interface
LibName22=digital-audio
LibName23=philips
LibName24=display
LibName25=cypress
LibName26=siliconi
LibName27=opto
LibName28=contrib
LibName29=valves
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